instruction stringlengths 0 30k ⌀ |
|---|
Remember also that the script actions are controlled by the "AllowScriptAccess" tag in the <embed> statement. If the web page doesn't want these actions, they should not permit scripts to call out.
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16494 |
The load goes up, as other answers have mentioned.
You'll also get an influx of new users/blog comments/votes from bored folks who are only really interested in vandalism. This is mostly a problem for blogs which allow completely anonymous commenting, where some dreadful stuff will be entered. The blog platform migh... |
Take a look at the hgweb stuff. You can set up RSS feeds and see all the revisions, et cetera. |
First of all, if you are going to look at experts-exchange - do it in FireFox, you'll see the unblocked answers at the bottom of the page.
Second, do you have a subform on that form that's using the autonumber/key field on the master form? Do you require the data that's on that subform to be saved (i.e., having its ... |
Put the onclick event onto the link itself, and return false from the handler if you don't want the default behavior to be executed (the link to be followed) |
In Whitespace, I think:
It probably won't show up. :/ |
It looks like it's a gem, so you need to enable ruby gems before requiring it.
[This site][1] explains many ways of how to do it. But to have the cheat sheet here these are:
1) Require the rubygems package before using a gem.
require "rubygems"
require "optiflag" # etc
2) Add the -rubygems flag to ... |
I think it's just a general extension to the normal clock-face style loading icon. The Firefox [throbber](http://en.wikipedia.org/wiki/Throbber) is the first example of that style that I remember coming across; the only real difference between that and the current trend of straight lines is that the constituent symbol... |
Doh! Someone else here at work figured this out. It was really simple and I should have been able to sort it, but hey, that's how it goes sometimes.
Here the fix:
On the web server, copy the 'aspnet_client' folder from 'C:\Inetpub\wwwroot' to 'C:\Inetpub\wwwroot\your-website-name'.
That's all we did and... |
For a rich, thorough treatment of the subject, with a good balance between computer science and practice, I recommend [The Art of Multiprocessor Programming](http://www.amazon.com/Art-Multiprocessor-Programming-Maurice-Herlihy/dp/0123705916/). A lot of examples are in object-oriented code, i.e. Java, with other languag... |
why do you have a collection of MyObjects? Is there a specific reason you don't have a List? |
Managed OleDB provider written in C# |
|c#|com|oledb| |
An OleDB provider is a binary implementing COM interfaces provided by Microsoft. From that it seems to be possible to create a provider using C#. Is that correct? Is there a sample demonstrating that? If not, would you discourage me from doing that? I see that there are multiple unmanaged samples but I can't find any m... |
In theory, the most efficient way will depend on which implementation of Map. The official way to do this is to call map.entrySet(), which returns a set of Map.Entry, each of which contains a key and a value (entry.getKey() and entry.getValue()).
In an idiosyncratic implementation, it might make some difference whet... |
As a teacher, I can tell you the single best way would be to have human review of the answers. A person can sense copy/paste or an answer that doesn't make sense given the context of the course, expected knowledge level of the students, content of the textbook, etc, etc, etc.
A computer can do things like check for... |
How can I detect if a Flex app looses focus |
|apache-flex|actionscript| |
As a follow up to this question: http://stackoverflow.com/questions/46873/developing-a-online-exam-application-how-do-i-prevent-cheaters
Can I detect when Flex application looses its focus? that is if a user has clicked onto another application or opened a browser tab?
I read this: http://blog.flexmonkeypatches.c... |
The spacing of "Web Developer / Network Assistant" looks a little wonky, maybe there is a hidden character in there (carriage return?)
I'd try taking the slash out, and see if the insert works, if not try taking all punctuation out. Then add it back and maybe you will be able to identify the bug. |
What's the proper way to minimize to tray a C# WinForms app? |
|c#|winforms|trayicon| |
What is the proper way to minimize a WinForms app to the system tray?
I've seen hackish solutions like, "minimize, set ShowInTaskbar = false, then show your NotifyIcon."
Solutions like that are hackish because the app doesn't appear to minimize to the tray like other apps, the code has to detect when to set ShowI... |
You can also try using the Mouse.DirectlyOver property to get the top-most element that is under the mouse. |
We've used [Aspose][1] with good results.
[1]: http://www.aspose.com/categories/default.aspx |
How can a simple tree algorithm be coded in a functional language? |
|algorithm|functional-programming| |
Suppose I want to implement a reasonably efficient 'keyword recognition algorithm', that is first given a list of keyword, and must then answer if another given word was in the list.
In an imperative language, I would store the keywords in a tree (one node per character). Then, when receiving a word to test, I woul... |
You need to find out where the time is going before you can optimise it. Don't just ngen it without finding that out first, as if the problem is loading a 150MB background bitmap resource then you won't have done anything useful at all with ngen.
You should disregard all specific advice or hunches about optimisat... |
There are a few really easy ways to do this with Delphi, although I am sure the RemObjects SDK works really well too.
1. Have a central server that has a * TIdTCPServer listening* on it. Then each client has a *TIdTCPClient* on it. They connect to the server and **block on a read** *waiting* for the **server to wr... |
I skimmed through the comments and looks like nobody mentioned Foundations of Programming from [www.CodeBetter.com][1]. Although it requires a bit of foundation, it can certainly be a next step in the learning process.
[1]: http://www.CodeBetter.com |
I skimmed through the comments and looks like nobody mentioned [Foundations of Programming][1] from [www.CodeBetter.com][2]. Although it requires a bit of foundation, it can certainly be a next step in the learning process.
[1]: http://codebetter.com/blogs/karlseguin/archive/2008/06/24/foundations-of-programming... |
What Mark said.
The problem is that Do takes a Delegate parameter. The compiler can't convert the anonymous methods to Delegate, only a "delegate type" i.e. a concrete type derived from Delegate.
If that Do function had took Action<>, Action<,> ... etc. overloads, you wouldn't need the cast.
|
Here is another very good reference that compliments what Keith mentioned.
[http://www.scribd.com/doc/2547864/msnetformattingstrings][1]
[1]: http://www.scribd.com/doc/2547864/msnetformattingstrings "http://www.scribd.com/doc/2547864/msnetformattingstrings" |
The `var hello` stuff is compiler magic and will work without Linq.
Try adding a reference to `System.Core` |
The `var hello` stuff is compiler magic and will work without Linq.
Try adding a reference to `System.Core`
----------
Sorry, I wasn't clear. I meant add `System.Core` to the web project's references, not to the page.
The `Import` on the page are basically just using statements, allowing you to skip the names... |
Although we all **should** know basic maths, the math puzzle could cause some confusion. In your example i'm sure some people would answer with "8" instead of "1".
Would a simple string of text with random characters highlighted in bold or italics be suitable? The user just needs to enter the bold/italic letters as ... |
Although we all **should** know basic maths, the math puzzle could cause some confusion. In your example i'm sure some people would answer with "8" instead of "1".
Would a simple string of text with random characters highlighted in bold or italics be suitable? The user just needs to enter the bold/italic letters as ... |
Import Namespace System.Query |
|asp.net|linq| |
I am trying to load Linq on my .Net 3.5 enabled web server by adding the following to my .aspx page:
<%@ Import Namespace="System.Query" %>
However, this fails and tells me it cannot find the namespace.
> The type or namespace name 'Query' does not exist in the namespace 'System'
I have also tried wit... |
I am trying to load Linq on my .Net 3.5 enabled web server by adding the following to my .aspx page:
<%@ Import Namespace="System.Query" %>
However, this fails and tells me it cannot find the namespace.
> The type or namespace name 'Query' does not exist in the namespace 'System'
I have also tried wit... |
HQL:
select entity from Entity entity where :type = some elements(entity.types)
I think that you can also write it like:
select entity from Entity entity where :type in(entity.types)
Kind Regards |
In your case MyObjectsA and MyObjectsB doesn't have common predecessor. Generic class is template for *different* classes not a common base class. If you want to have common properties in different classes use interfaces |
In your case MyObjectsA and MyObjectsB don't have common predecessor. Generic class is template for *different* classes not a common base class. If you want to have common properties in different classes use interfaces. You can't call *ToList* in a loop cause it has different signature in different classes. You can cre... |
How do you delete wild card cookies in Rails? |
|ruby-on-rails| |
How do you delete a cookie in rails that was set with a wild card domain:
cookies[:foo] = {:value => 'bar', :domain => '.acme.com'}
When, following the docs, you do:
cookies.delete :foo
the logs say
Cookie set: foo=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT
Notice that the domain is m... |
How do you delete a cookie in rails that was set with a wild card domain:
cookies[:foo] = {:value => 'bar', :domain => '.acme.com'}
When, following the [docs][1], you do:
cookies.delete :foo
the logs say
Cookie set: foo=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT
Notice that the domain... |
For your situation of being at a public computer that you cannot switch the keyboard layout on, you can go to this website:
<http://www.geocities.com/malibu_malv/convert.html>
Use this to translate your typing and then use copy paste. I found this very useful when I was out of the country and had to write a bunc... |
A service shouldn't have a GUI, since it should run without any needing any intervention from a user, and there are all sorts of problems associated with finding and communicating with the correct users desktop.
Since, presumably the reason for asking this is to be able to remotely monitor the application, the way t... |
this might be a little too processor intensive but going over the whole list of div elements on a page, finding their positions and sizes then testing if they're under the mouse. i don't think i'd want to do that to a browser though. |
Programmatically retrieve database table creation script in .NET |
|.net|sql|sql-server|sqldmo| |
I need to be able to retrieve a CREATE TABLE script to recreate a specific table in a SQL Server (2000) database, programmatically (I'm using C#). Obviously you can do this with Enterprise Manager but I would like to automate it.
I've been playing around with SQLDMO which offers a Backup command, but I'm not sure i... |
This bit of javascript in the 'select':
onchange="if(this.options[this.selectedIndex].value!=''){this.form.submit()}"
It's not ideal (because form submissions in ASP.NET MVC which I'm using don't appear to use the routing engine for URLs) but it does its job.
|
A rule of thumb I have heard is inheritance should be used when its a "is-a" relationship and composition when its a "has-a". Even with that I feel that you should always lean towards composition because it eliminates a lot of complexity. |
Think of containment as a **has a** relationship. A car "has an" engine, a person "has a" name, etc.
Think of inheritance as an **is a** relationship. A car "is a" vehicle, a person "is a" mammal, etc.
I take no credit for this approach. I took it straight from the [Second Edition of Code Complete][1] by [Steve M... |
Think of containment as a **has a** relationship. A car "has an" engine, a person "has a" name, etc.
Think of inheritance as an **is a** relationship. A car "is a" vehicle, a person "is a" mammal, etc.
I take no credit for this approach. I took it straight from the [Second Edition of Code Complete][1] by [Steve M... |
Take a look at [my solution][1]. It's a sql script which uses the INFORMATION_SCHEMA tables to get the necessary information. It's basic, but might work for you.
[1]: http://beta.stackoverflow.com/questions/21547/in-mssql-how-do-i-generate-a-create-table-statement-for-a-given-table |
I think using some method like [aku's][1] or [Guy's][2] is the way to go, but a couple of things to take away from the specific examples:
1. The basic premise would be to show your splash on a separate thread as soon as possible. That's the way I would lean, similar to what aku's illustrated, since it's the way I'... |
Apparently EO has compatibility issues with MS Ajax Control Toolkit. http://www.essentialobjects.com/Forum/Default.aspx?g=posts&t=1319
I guess I'll leave this question open to see if anyone figures out some sort of workaround. |
I believe that CAPTCHA is dying. If someone really wants to break it, it will be broken. I read (somewhere, don't remember where) about a site that gave you free porn in exchange for answering CAPTCHAs to they can be rendered obsolete by bots. So, why bother? |
I've helped develop an application that was used by Dutch, English, Spanish and Portuguese speaking users. Because the application installed from CD we just added all the language packs. Mostly because it saved us a lot of work not having to maintain 4 different versions.
If your application distributed from a websi... |
It hit me last night that our core processes aren't multi-threaded, but the machine in question does have a bunch of system processes that are. In particular, it acts as an NFS server. It sounds like running hundreds of processes will benefit from all those cores, as well.
I'll see if we can get a demo unit to tes... |
I agree with Thomas. Captcha is on its way out. But if you must use it, [reCAPTCHA][1] is a pretty good provider with a simple API.
[1]: http://www.recaptcha.net |
Help convert this delegate to an anonymous method or lambda |
|c#|lambda|.net-3.5| |
I am new to all the anonymous features and need some help. I have gotten the following to work:
public void FakeSaveWithMessage(Transaction t) {
t.Message = "I drink goats blood";
}
public delegate void FakeSave(Transaction t);
public void SampleTestFunction() {
...
Expect.Call(delegate { _da... |
|c#|.net-3.5|lambda| |
I am new to all the anonymous features and need some help. I have gotten the following to work:
public void FakeSaveWithMessage(Transaction t) {
t.Message = "I drink goats blood";
}
public delegate void FakeSave(Transaction t);
public void SampleTestFunction() {
...
Expect.Call(delegate { _da... |
At my last employer I set up a buildserver with cc.net. Expect at least one or two days work to set it up. I used cc.net together with nant and msbuild. These projects have a lot of overlap in functionality so it might be a good idea to think about how you want to set everything up.
The setup I eventually settled wi... |
How to detect READ_COMMITTED_SNAPSHOT is enabled? |
|sql-server|microsoft| |
In MS SQL Server is there a way to detect whether a database has had its isolation level set via the T-SQL command `ALTER DATABASE <database> SET READ_COMMITTED_SNAPSHOT ON;`
I cannot find a simple way to detect this in either T-SQL or via the Management Studio's GUI.
TIA
|
[ORM][1]s have already solved the problem of dynamic SQL generation (I prefer [NHibernate][2]/[ActiveRecord][3]). Using these tools you can create a query with an unknown number of conditions by looping across user input and generating an array of Expression objects. Then execute the built-in query methods with that cu... |
[Hudson][1] is the easiest continuous-integration / daily-build tool I've seen. Not sure if it meets all your requirements.
[1]: https://hudson.dev.java.net/ |
You need to increase postgres' caches to the point where the whole working set fits into memory before you can expect to see perfomance comparable to doing it in-memory with a program. |
SELECT is_read_committed_snapshot_on FROM
sys.databases WHERE name= 'YourDatabase'
|
One liner, using EXIT trick:
FOR /F %%I IN ('DIR *.TXT /B /O:-D') DO NOTEPAD %%I & EXIT
|
One liner, using EXIT trick:
FOR /F %%I IN ('DIR *.TXT /B /O:-D') DO NOTEPAD %%I & EXIT
**EDIT:**
@pam: you're right, I was assuming that the files were in date order, but you can change the command to:
FOR /F %%I IN ('DIR *.TXT /B /O:-N') DO NOTEPAD %%I & EXIT
then you have the file list sorted ... |
I don't know if I'd call it production-ready, but there's [jGABL](http://www.math.tu-berlin.de/jGABL/). |
Owen, I'm using Chrome on XP and I don't see "Vista Aero" glass theme on the Chrome window. I see it as solid blue.
If it's custom theming of controls and windows title bars you want, that can be accomplished. There's an excellent, free UI toolkit for WinForms that does exactly that: [KryptonToolkit][1]
[1]: ... |
Typical code for iterating over a map is:
Map<String,Thing> map = ...;
for (Map.Entry<String,Thing> entry : map.entrySet()) {
String key = entry.getKey();
Thing thing = entry.getValue();
...
}
HashMap is the canonical map implementation and doesn't make guarantees (or thou... |
this.WindowState = FormWindowState.Minimized
That is the built in way to do it and it looks fine to me most of the time. The only time is has some weirdness to it is if you call it on startup which has some weirdness sometimes which is why most people will also set the ShowInTaskbar = false and hide the form t... |
Yes, the order depends on the specific Map implementation. I would do something like this:
Iterator entries = myMap.entrySet().iterator();
while (entries.hasNext()) {
Entry thisEntry = (Entry) entries.next();
Object key = thisEntry.getKey();
Object value = thisEntry.getValue();
... |
Yes, the order depends on the specific Map implementation.
@ScArcher2 has the more elegant Java 1.5 syntax. In 1.4, I would do something like this:
Iterator entries = myMap.entrySet().iterator();
while (entries.hasNext()) {
Entry thisEntry = (Entry) entries.next();
Object key = thisEntry... |
I beleive "position" is a reserved word.
Try...
INSERT into tblExcel (ename, [position], phone, email) VALUES (...
[Reserved Words][1]
[1]: http://office.microsoft.com/en-us/access/HP010322491033.aspx |
No, browsers are designed to limit the amount of damage a website or application can do to the system. You might be able to accomplish your goals through Java, an activex control, or a custom plugin, but other than that you aren't going to be able to 'watch' what they're doing on their system, much less control it. (... |
How do I make a fully statically linked .exe with Visual Studio Express 2005 ? |
|c++|visual-studio|linker| |
My current preferred C++ environment is the free and largely excellent Microsoft Visual Studio 2005 Express edition. From time to time I have sent release .exe files to other people with pleasing results. However recently I made the disturbing discovery that the pleasing results were based on more luck that I would lik... |
My current preferred C++ environment is the free and largely excellent Microsoft Visual Studio 2005 Express edition. From time to time I have sent release .exe files to other people with pleasing results. However recently I made the disturbing discovery that the pleasing results were based on more luck that I would lik... |
[popen is supported on Windows][1]. If you want it to be cross-platform, popen is the way to go.
[1]: http://msdn.microsoft.com/en-us/library/96ayss4b.aspx |
popen is supported on Windows, see here:
[http://msdn.microsoft.com/en-us/library/96ayss4b.aspx][1]
If you want it to be cross-platform, popen is the way to go.
[1]: http://msdn.microsoft.com/en-us/library/96ayss4b.aspx |
You can still probably access the ToList() method, but since you are unsure of the type, won't this work?
foreach(var obj in MyObject.ToList())
//do something |
You can still probably access the ToList() method, but since you are unsure of the type, won't this work?
foreach(var myObject in myObjectsList)
foreach(var obj in myObject.ToList())
//do something
Of course this will only work on C# 3.0. |
How do I reset a sequence in Oracle? |
|database|oracle-database| |
In postgresql I can do something like this:
ALTER SEQUENCE serial RESTART WITH 0;
Is there a oracle equivalent? |