Most Popular
1500 questions
1968
votes
35 answers
Disable same origin policy in Chrome
Is there any way to disable the Same-origin policy on Google's Chrome browser?
Landon Kuhn
- 65,613
- 42
- 102
- 130
1968
votes
18 answers
"Debug certificate expired" error in Eclipse Android plugins
I am using Eclipse Android plugins to build a project, but I am
getting this error in the console window:
[2010-02-03 10:31:14 - androidVNC]Error generating final archive:
Debug certificate expired on 1/30/10 2:35 PM!
How do I fix it?
hap497
- 141,763
- 43
- 79
- 93
1966
votes
16 answers
What is the effect of extern "C" in C++?
What exactly does putting extern "C" into C++ code do?
For example:
extern "C" {
void foo();
}
Litherum
- 21,169
- 3
- 21
- 27
1965
votes
11 answers
What is move semantics?
I just finished listening to the Software Engineering radio podcast interview with Scott Meyers regarding C++0x. Most of the new features made sense to me, and I am actually excited about C++0x now, with the exception of one. I still don't get move…
dicroce
- 42,886
- 27
- 97
- 139
1964
votes
22 answers
Loop through an array of strings in Bash?
I want to write a script that loops through 15 strings (array possibly?) Is that possible?
Something like:
for databaseName in listOfNames
then
# Do something
end
Mo.
- 36,934
- 34
- 84
- 130
1960
votes
58 answers
How can I update NodeJS and NPM to their latest versions?
I just installed Node.js & NPM (Node Package Manager)
I installed NPM for access to additional Node.js Modules.
After I installed Node.js & NPM I noticed that neither were the latest versions available.
I would like to know: How do I upgrade…
Dail
- 19,821
- 3
- 15
- 5
1955
votes
34 answers
Config Error: This configuration section cannot be used at this path
I've encountered an error deploying a site to a server. When trying to load the home page, or access authentication on the new site in IIS, I get the error:
Config Error: This configuration section cannot be used at this path.
This happens when…
Alex
- 19,507
- 4
- 15
- 20
1953
votes
40 answers
Difference between static class and singleton pattern?
What real (i.e. practical) difference exists between a static class and a singleton pattern?
Both can be invoked without instantiation, both provide only one "Instance" and neither of them is thread-safe. Is there any other difference?
Jorge Córdoba
- 49,287
- 11
- 78
- 126
1953
votes
28 answers
Preview an image before it is uploaded
I want to be able to preview a file (image) before it is uploaded. The preview action should be executed all in the browser without using Ajax to upload the image.
How can I do this?
Simbian
- 19,753
- 3
- 16
- 8
1953
votes
21 answers
How do I format XML in Notepad++?
I have Notepad++ and I got some XML code which is very long. When I pasted it in Notepad++ there was a long line of code (difficult to read and work with).
I want to know if there is a simple way to make the text readable (by readable I mean…
happyhardik
- 23,925
- 6
- 44
- 59
1951
votes
36 answers
Find object by id in an array of JavaScript objects
I've got an array:
myArray = [{'id':'73','foo':'bar'},{'id':'45','foo':'bar'}, etc.]
I'm unable to change the structure of the array. I'm being passed an id of 45, and I want to get 'bar' for that object in the array.
How do I do this in…
thugsb
- 21,328
- 6
- 29
- 44
1951
votes
29 answers
Easiest way to convert int to string in C++
What is the easiest way to convert from int to equivalent string in C++. I am aware of two methods. Is there any easier way?
(1)
int a = 10;
char *intStr = itoa(a);
string str = string(intStr);
(2)
int a = 10;
stringstream ss;
ss << a;
string str…
Nemo
- 22,988
- 10
- 43
- 58
1949
votes
14 answers
How to compare files from two different branches
I have a script that works fine in one branch and is broken in another. I want to look at the two versions side-by-side and see what's different. Is there a way to do this?
To be clear I'm not looking for a compare tool (I use Beyond Compare). I'm…
Micah
- 106,911
- 83
- 226
- 321
1943
votes
18 answers
Delete an element from a dictionary
Is there a way to delete an item from a dictionary in Python?
Additionally, how can I delete an item from a dictionary to return a copy (i.e., not modifying the original)?
richzilla
- 38,000
- 13
- 54
- 85
1940
votes
8 answers
Regular cast vs. static_cast vs. dynamic_cast
I've been writing C and C++ code for almost twenty years, but there's one aspect of these languages that I've never really understood. I've obviously used regular casts i.e.
MyClass *m = (MyClass *)ptr;
all over the place, but there seem to be two…
Graeme Perrow
- 54,171
- 20
- 78
- 120