unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
What would a Log4Net Wrapper class look like?
===
Greetings,
I have been looking for a logging framework for .net (c#) and decided to give log4net a go after reading up on a few question/answer threads here on stackoverflow. I see people mentioning over and over that they use a wrapper class for log4net and I am wonder what that would look like.
I have my code split up into different projects (data access/business/webservice/..).
How would a log4net wrapper class look like? Would the wrapper class need to be included in all of the projects? Should I build it as a separate project all together?
Should the wrapper be a singleton class? | 0 | [
2,
98,
83,
21,
6738,
300,
2328,
28051,
718,
361,
101,
60,
800,
3726,
3726,
13769,
18,
15,
31,
57,
74,
699,
26,
21,
13,
13919,
6596,
26,
13,
9,
2328,
13,
5,
150,
5910,
6,
17,
868,
20,
590,
6738,
300,
2328,
21,
162,
75,
1876,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Performace of System.IO.ReadAllxxx / WriteAllxxx methods
===
Is there any performance comparison of System.IO.File.ReadAllxxx / WriteAllxxx methods vs StreamReader / StremWriter classes available on web. What you think is the best way(from a performance perspective) to read/write text files in .net 3.0?
When I checked the **[MSDN page of System.IO.File class][1]**, in the sample code MS is using StreamReader / StreamWriter for file operations. Is there any specific reason for avoiding File.ReadAllxxx / WriteAllxxx methods, even though they look much easier to understand?
[1]: http://msdn.microsoft.com/en-us/library/system.io.file.aspx | 0 | [
2,
2985,
6174,
16,
329,
9,
1963,
9,
10647,
1233,
13290,
13,
118,
2757,
1233,
13290,
3195,
800,
3726,
3726,
25,
80,
186,
956,
6050,
16,
329,
9,
1963,
9,
16877,
9,
10647,
1233,
13290,
13,
118,
2757,
1233,
13290,
3195,
4611,
3766,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it worthwile to write a programming tutorial book?
===
I have written an introductory [Python tutorial][1] and I'm working on one for [wxPython][2]. My Python tutorial was used at a college for a programming introduction class.
I know the answer is probably "if you want to", but I'm curious to know if I should take the time to formalize my tutorials into a book format, most likely as an ebook. I don't know enough to compete with the "big boys" of publishing but I think the format would be better structured and easier to learn if it was in a book style. I especially don't expect to make any money with it, though I wouldn't mind it :-).
However, I don't want to waste my time doing something that ultimately won't be of much use to people. I know there are many tutorials and books available, especially for these two topics. Is there room for another set of beginner books?
[1]: http://www.gidnetwork.com/b-26.html
[2]: http://crystalattice.gidblog.com/2008/09/29/developing-guis-with-wxpython-part-1/ | 0 | [
2,
25,
32,
2715,
11106,
62,
20,
2757,
21,
3143,
29724,
360,
60,
800,
3726,
3726,
31,
57,
642,
40,
26958,
636,
6448,
11570,
29724,
500,
2558,
165,
500,
17,
31,
22,
79,
638,
27,
53,
26,
636,
499,
396,
6448,
11570,
500,
2558,
135,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to use Maven Modules without svn:externals
===
I have never quite understood how/why I would use Maven modules (reactor builds). We have tens of libraries that we share (as dependencies) among our products, and between libraries as well. If we were to switch to making them maven modules, how would we set it up, both in svn and in our working copies? Do Maven Modules really need to be subfolders? Do they need to be subfolders in the svn repo too?
Assuming you just need subfolders in the working copy, I suppose svn:externals would work to make, say, a "util" library be a module of multiple projects at the same time. But I've read many bad things about using svn:externals because there is nothing to stop you from modifying the code in the external, but its not tracked.
Any suggestions? Am I missing the boat on modules? | 0 | [
2,
184,
20,
275,
1216,
3124,
17113,
366,
13,
18,
16578,
45,
1706,
8766,
192,
18,
800,
3726,
3726,
31,
57,
243,
1450,
4014,
184,
118,
2256,
31,
83,
275,
1216,
3124,
17113,
13,
5,
99,
20908,
1895,
18,
6,
9,
95,
57,
652,
18,
16,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
msbuild: set a specific preprocessor #define in the command line
===
In a C++ file, I have a code like this:
#if ACTIVATE
# pragma message( "Activated" )
#else
# pragma message( "Not Activated")
#endif
I want to set this ACTIVE define to 1 with the msbuild command line.
It tried this but it doesn't work:
msbuild /p:DefineConstants="ACTIVATE=1"
Any idea?
| 0 | [
2,
4235,
29361,
45,
309,
21,
1903,
782,
16835,
248,
6926,
546,
7509,
19,
14,
1202,
293,
800,
3726,
3726,
19,
21,
272,
20512,
3893,
15,
31,
57,
21,
1797,
101,
48,
45,
6926,
821,
18163,
6926,
3865,
14336,
2802,
5,
13,
7,
25344,
7,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PHP - Custom error handling. Redirected 404 is being hijacked by AVG Anti-Virus. How to stop?
===
I have a website which uses the custom 404 error handling in PHP/Apache to display specific pages.
e.g. http://metachat.org/recent
I've a feeling this is a bad way of doing this, but it's code I inherited...
Although the page displays correctly on most browsers, I'm getting a situation where AVG Anti-Virus is hijacking the page and redirecting it to an offsite 404 page.
I've tried to force a header (Status: 200 OK) using the header command in PHP, but if I do a curl -I of the page, I get the following...
HTTP/1.1 404 Not Found
Date: Fri, 03 Oct 2008 11:43:01 GMT
Server: Apache/2.0.54 (Debian GNU/Linux) DAV/2 SVN/1.1.4 PHP/4.3.10-16 mod_ssl/2
.0.54 OpenSSL/0.9.7e
X-Powered-By: PHP/4.3.10-16
Status: 200 OK
Content-Type: text/html
I guess that first line is the line AVG traps for its forced redirect.
Without rewriting the software to use Mod_rewrite (which I don't really understand), how can I (in PHP) stop the "HTTP:/1/1 404 Not Found" line being sent in the headers when displaying this page?
Thanks. | 0 | [
2,
13,
26120,
13,
8,
5816,
7019,
7988,
9,
302,
14147,
13,
23397,
25,
142,
21691,
69,
34,
21,
22955,
1082,
8,
14792,
9,
184,
20,
747,
60,
800,
3726,
3726,
31,
57,
21,
2271,
56,
2027,
14,
5816,
13,
23397,
7019,
7988,
19,
13,
261... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
detect svn changes in a .bat
===
I have a .bat and inside the .bat i would like to execute a special code if there's some modification inside the svn repository (for example, compile).
| 0 | [
2,
9092,
13,
18,
16578,
1693,
19,
21,
13,
9,
4900,
800,
3726,
3726,
31,
57,
21,
13,
9,
4900,
17,
572,
14,
13,
9,
4900,
31,
83,
101,
20,
15644,
21,
621,
1797,
100,
80,
22,
18,
109,
16135,
572,
14,
13,
18,
16578,
24869,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How can I wrap a call to an .exe (with arguments) with another .exe?
===
I have a Windows executable (say `program.exe`) and I want to provide users with 2 launchers that will pass different arguments to it.
program.exe -a
program.exe -b
I can easily do this with 2 batch files, but I would rather provide users with 2 .exe files as they are more likely to be used correctly without editing.
Is there an easy way to create such an executable? | 0 | [
2,
184,
92,
31,
8118,
21,
645,
20,
40,
13,
9,
1706,
62,
13,
5,
1410,
10553,
6,
29,
226,
13,
9,
1706,
62,
60,
800,
3726,
3726,
31,
57,
21,
1936,
1396,
17194,
5924,
13,
5,
6366,
13,
1,
19746,
9,
1706,
62,
1,
6,
17,
31,
259... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
UTF-8 in Windows
===
How do I get UTF-8 in Windows?
In detail, the problem is that I would like to use a C library which takes a const char* as filename arguments, but I need to support unicode strings.
If I could set the code page to 65001 this would all be fine, but the MSDN documentation for _setmbcp states that UTF-8 is not supported.
How can I get around this? | 0 | [
2,
287,
11720,
8,
457,
19,
1936,
800,
3726,
3726,
184,
107,
31,
164,
287,
11720,
8,
457,
19,
1936,
60,
19,
6110,
15,
14,
1448,
25,
30,
31,
83,
101,
20,
275,
21,
272,
1248,
56,
1384,
21,
11608,
38,
4892,
2483,
28,
3893,
7259,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Finding local IP addresses in Python.
===
How can I find the local IP address (i.e. 192.168.x.x or 10.0.x.x) in python, preferably with only built-in moduals, I would also like it to be platform independent. | 0 | [
2,
3007,
375,
15735,
12636,
19,
20059,
9,
800,
3726,
3726,
184,
92,
31,
477,
14,
375,
15735,
3218,
13,
5,
49,
9,
62,
9,
13,
19532,
9,
13434,
9,
396,
9,
396,
54,
332,
9,
387,
9,
396,
9,
396,
6,
19,
20059,
15,
6369,
4801,
29... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Unix shell events?
===
Is there any way so that i can echo password when asked for in unix shell without use of external binaries ? Something like simple function triggered when password prompt is displayed | 0 | [
2,
22540,
3593,
963,
60,
800,
3726,
3726,
25,
80,
186,
161,
86,
30,
31,
92,
8117,
20884,
76,
411,
26,
19,
22540,
3593,
366,
275,
16,
4886,
4511,
11301,
13,
60,
301,
101,
1935,
1990,
15164,
76,
20884,
11443,
4417,
25,
6115,
3,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Does NetworkStream.DataAvailable see buffered data?
===
Does NetworkStream.DataAvialable know whether the sender's send buffer is empty? Or does it simply indicate whether the receiver's read buffer has data? My assumption is the latter...
Specifically, for some socket work involving an ongoing conversation, I currently use a length-prefix so the the receiver knows exactly how much data is in the current batch; however, I've been sent a .patch suggesting I use NetworkStream.DataAvailable instead. My concern is that this will just tell me what the reciever has got - not what the sender originally sent - but I'm not a sockets expert.
Am I wrong? Or is length-prefix the way to go?
(note I can't simply Read() until the stream is closed, since multiple batches are sent on the same connection, and it is vital that I treat each batch as separate; if I read too much in one batch (even if it gets buffered and discarded) then the conversation will break).
| 0 | [
2,
630,
982,
11260,
9,
18768,
4961,
947,
579,
196,
17497,
69,
1054,
60,
800,
3726,
3726,
630,
982,
11260,
9,
18768,
5271,
192,
579,
143,
1472,
14,
2660,
106,
22,
18,
2660,
17497,
25,
2424,
60,
54,
630,
32,
1659,
4342,
1472,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using boost in embedded system with memory limitation
===
We are using c++ to develop an application that runs in Windows CE 4 on an embedded system.
One of our constraint is that all the memory used by the application shall be allocated during <b>startup only</b>. We wrote a lot of containers and algorithms that are using only preallocated memory instead of allocating new one.
Do you think it is possible for us to use the boost libraries instead of our own containers in these conditions?
Any comments and/or advice are welcomed!
Thanks a lot,
Nic | 0 | [
2,
568,
10419,
19,
12138,
329,
29,
1912,
24943,
800,
3726,
3726,
95,
50,
568,
272,
20512,
20,
2803,
40,
3010,
30,
1461,
19,
1936,
4000,
268,
27,
40,
12138,
329,
9,
53,
16,
318,
28804,
25,
30,
65,
14,
1912,
147,
34,
14,
3010,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Reuse Edit Control as Command Window
===
This is a GUI application (actually MFC). I need a command window with the ability to display a prompt like such:
> Name of favorite porn star:
The user should be able to enter text after the prompt like such:
> Name of favorite porn star: Raven Riley
But I need to prevent the user from moving the cursor into the prompt area. Users should also be prevented from backspacing into the prompt in order to prevent the following:
> Rrraven Rrrileeey Ruuuulez!!! Name of favorite porn star:
Also need to control text selection and so on. And finally, I should have no problem retrieving only the text the user entered (minus prompt text).
Will it be better to create my own window class from scratch (i.e inherit from CWnd) or should I reuse the Windows EDIT control (i.e. inherit from CEdit)?
A similar command window can be seen in AutoCAD and Visual Studio (in debug mode).
| 0 | [
2,
302,
3699,
9392,
569,
28,
1202,
1463,
800,
3726,
3726,
48,
25,
21,
9457,
3010,
13,
5,
15661,
307,
7061,
6,
9,
31,
376,
21,
1202,
1463,
29,
14,
2165,
20,
3042,
21,
11443,
4417,
101,
145,
45,
13,
1,
204,
16,
3839,
5156,
103,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Finding a public facing IP address in Python?
===
How can I find the public facing IP for my net work in Python? | 0 | [
2,
3007,
21,
317,
4325,
15735,
3218,
19,
20059,
60,
800,
3726,
3726,
184,
92,
31,
477,
14,
317,
4325,
15735,
26,
51,
4275,
170,
19,
20059,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
What to put in the IF block and what to put in the ELSE block?
===
This is a minor style question, but every it of readability you add to your code counts.
So if you've got:
if (condition) then
{
// do stuff
}
else
{
// do other stuff
}
How do you decide if it's better like that, or like this:
if (!condition) then
{
// do other stuff
{
else
{
// do stuff
}
My heuristics are:
1. Keep the condition positive (less
mental calculation when reading it)
2. Put the most common path into the
first block | 0 | [
2,
98,
20,
442,
19,
14,
100,
1921,
17,
98,
20,
442,
19,
14,
962,
1921,
60,
800,
3726,
3726,
48,
25,
21,
1689,
1034,
1301,
15,
47,
352,
32,
16,
1302,
4091,
42,
3547,
20,
154,
1797,
9927,
9,
86,
100,
42,
22,
195,
330,
45,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
A good database modeling tool?
===
Could you guys recommend me a good db modelign tool? Mainly for SQL Server...
thanks! | 0 | [
2,
21,
254,
6018,
12807,
5607,
60,
800,
3726,
3726,
110,
42,
2776,
12360,
55,
21,
254,
13,
9007,
1061,
9693,
5607,
60,
2011,
26,
4444,
255,
8128,
9,
9,
9,
3669,
187,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
HTTP reponse splitting
===
im trying to handle this possible exploit and wondering what is the best way to do it? should i use apache's common-validator and create a list of known allowed symbols and use that? | 0 | [
2,
7775,
9411,
218,
870,
17282,
800,
3726,
3726,
797,
749,
20,
3053,
48,
938,
10880,
17,
5712,
98,
25,
14,
246,
161,
20,
107,
32,
60,
378,
31,
275,
17140,
22,
18,
757,
8,
18506,
43,
3457,
17,
1600,
21,
968,
16,
167,
1159,
9794... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Flash IDE - Find a symbol in the library
===
I've inherited a flash project (my first) that has many existing symbols in the library. They are organized in a large complex hierarchy of folders. Often, I find a reference to a symbol in actionscript code, but can't find the symbol in the library. The "Find" feature only searches for instances of a symbol. If none exist, is it possible to find a symbol in the library without manually checking each folder?
| 0 | [
2,
4433,
13,
3448,
13,
8,
477,
21,
4678,
19,
14,
1248,
800,
3726,
3726,
31,
22,
195,
7179,
21,
4433,
669,
13,
5,
915,
64,
6,
30,
63,
151,
3149,
9794,
19,
14,
1248,
9,
59,
50,
2518,
19,
21,
370,
1502,
14417,
16,
19294,
18,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
price of a web site
===
I am looking into starting a project on the side building web pages for people and businesses. This will not be my primary job (unless demand far exceeds my expectations)
I am wondering what type of pricing model I should adopt that will be fair. Is a flat price by site or by page better or should I charge by the hour? | 0 | [
2,
2162,
16,
21,
2741,
689,
800,
3726,
3726,
31,
589,
699,
77,
1422,
21,
669,
27,
14,
270,
353,
2741,
4434,
26,
148,
17,
4426,
9,
48,
129,
52,
44,
51,
1256,
1205,
13,
5,
22731,
3888,
463,
11976,
18,
51,
11870,
6,
31,
589,
57... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I find the version of Apache running without access to the command line?
===
I need to either find a file in which the version is encoded or a way of polling it across the web so it reveals its version. The server is running at a host who will not provide me command line access, although I can browse the install location via ftp. | 0 | [
2,
184,
107,
31,
477,
14,
615,
16,
17140,
946,
366,
1381,
20,
14,
1202,
293,
60,
800,
3726,
3726,
31,
376,
20,
694,
477,
21,
3893,
19,
56,
14,
615,
25,
13665,
54,
21,
161,
16,
20734,
32,
464,
14,
2741,
86,
32,
7082,
82,
615,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PHP Array, key without an assigned value
===
I am currently plowing my way through [IBM's tutorial on CakePHP][1]
At one point I run into this snippet of code:
<?php
class Dealer extends AppModel
{
var $name = 'Dealer';
var $hasMany = array ('Product' => array(
'className' => 'Product',
'conditions'=>, // is this allowed?
'order'=>, // same thing here
'foreignKey'=>'dealer_id')
);
}
?>
When I run it i get the following error-message: "Parse error: syntax error, unexpected ',' in /Applications/MAMP/htdocs/cakephp/app/models/product.php on line 7"
I'm a n00b at PHP so my question is: is it allowed to make an array with keys without assigned values? Has anybody played around with this tut and know what is up?
[1]: http://www-128.ibm.com/developerworks/edu/os-dw-os-php-cake1.html | 0 | [
2,
13,
26120,
7718,
15,
1246,
366,
40,
2467,
1923,
800,
3726,
3726,
31,
589,
871,
19346,
68,
51,
161,
120,
636,
4598,
79,
22,
18,
29724,
27,
8390,
26120,
500,
2558,
165,
500,
35,
53,
454,
31,
485,
77,
48,
13,
29061,
16,
1797,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
"CURLE_OUT_OF_MEMORY" error when posting via https
===
I am attempting to write an application that uses libCurl to post soap requests to a secure web service. This windows application is built against libCurl version 7.19.0 which, in turn, is built against openssl-0.9.8i. The pertinent curl related code follows:
<blockquote>
<pre>
FILE *input_file = fopen(current->post_file_name.c_str(), "rb");
FILE *output_file = fopen(current->results_file_name.c_str(), "wb");
if(input_file && output_file)
{
struct curl_slist *header_opts = 0;
CURLcode rcd;
header_opts = curl_slist_append(header_opts, "Content-Type: application/soap+xml; charset=utf8");
curl_easy_reset(curl_handle);
curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1);
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, output_file);
curl_easy_setopt(curl_handle, CURLOPT_READDATA, input_file);
curl_easy_setopt(curl_handle, CURLOPT_URL, fs_service_url);
curl_easy_setopt(curl_handle, CURLOPT_POST, 1);
curl_easy_setopt(curl_handle, CURLOPT_HTTPHEADER, header_opts);
rcd = curl_easy_perform(curl_handle);
if(rcd != 0)
{
current->curl_result = rcd;
current->curl_error = curl_easy_strerror(rcd);
}
curl_slist_free_all(header_opts);
}
</pre>
</blockquote>
When I attempt to execute the URL, curl returns an CURLE_OUT_OF_MEMORY error which appears to be related to a failure to allocate an SSL context. Has anyone else encountered this problem before?
Regards,
Jon Trauntvein | 0 | [
2,
13,
7,
4734,
413,
1,
1320,
1,
1041,
1,
790,
5171,
93,
7,
7019,
76,
15669,
1197,
7775,
18,
800,
3726,
3726,
31,
589,
6314,
20,
2757,
40,
3010,
30,
2027,
13,
8326,
4734,
255,
20,
678,
6447,
12279,
20,
21,
4315,
2741,
365,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Geolocated version control?
===
Much like it's possible to geotag pictures, I wonder if there is a way to automatically geolocate the code associated with a commit - or any changes - in a version control system like SVN?
I couldn't find any information about this and I don't know if for example SVN stores the IP address used by the committers, which in most situations would be enough to differentiate the different places the changes were made from.
Even in a situation where I use a repository on my own I would find it useful to know which portions of code were written at home, which at the office and which while traveling. That way one could maybe make some statistics about their performance depending on where they are.
So do you know any tool or plugin that lets one do that?
Using a different user account for each location wouldn't be a satisfactory solution, I'm really looking for something that would store the IP or use whatever other technique there might be to locate a user at the time he/she's doing changes. | 0 | [
2,
6389,
18215,
615,
569,
60,
800,
3726,
3726,
212,
101,
32,
22,
18,
938,
20,
6389,
8628,
3104,
15,
31,
2666,
100,
80,
25,
21,
161,
20,
7499,
6389,
1415,
9530,
14,
1797,
1598,
29,
21,
9686,
13,
8,
54,
186,
1693,
13,
8,
19,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PHP utf8 problem
===
I have some problems comparing an array with Norwegian characters with a utf8 character.
All characters except the special Norwegian characters(æ, ø, å) works fine.
function isNorwegianChar($Char)
{
$aNorwegianChars = array('a', 'A', 'b', 'B', 'c', 'C', 'd', 'D', 'e', 'E', 'f', 'F', 'g', 'G', 'h', 'H', 'i', 'I', 'j', 'J', 'k', 'K', 'l', 'L', 'm', 'M', 'n', 'N', 'o', 'O', 'p', 'P', 'q', 'Q', 'r', 'R', 's', 'S', 't', 'T', 'u', 'U', 'v', 'V', 'w', 'W', 'x', 'X', 'y', 'Y', 'z', 'Z', 'æ', 'Æ', 'ø', 'Ø', 'å', 'Å', '=', '(', ')', ' ', '-');
$iArrayLength = count($aNorwegianChars);
for($iCount = 0; $iCount < $iArrayLength; $iCount++)
{
if($aNorwegianChars[$iCount] == $Char)
{
return true;
}
}
return false;
}
If anyone has any idea about what I can do pleas let me know. | 0 | [
2,
13,
26120,
287,
11720,
457,
1448,
800,
3726,
3726,
31,
57,
109,
1716,
15047,
40,
7718,
29,
3780,
1766,
29,
21,
287,
11720,
457,
925,
9,
65,
1766,
1613,
14,
621,
3780,
1766,
5,
1,
15,
13,
1,
15,
21,
6,
693,
1123,
9,
1990,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What kind of damage could one do with a payment gateway API login and transaction key?
===
Currently, I'm in the process of hiring a web developer who will be working on a site that processes credit cards. While he won't have the credentials to log into the payment gateway's UI he will have access to the API login and transaction key since it's embedded in the application's code.
I'd like to be aware of all the "what if" scenarios pertaining to the type of damage one could do with that information. Obviously, he can process credit cards but the money goes into the site owner's bank account so I'm not sure how much damage that could cause. Can anyone think of any other possible scenarios? | 0 | [
2,
98,
825,
16,
2308,
110,
53,
107,
29,
21,
7582,
12171,
21,
2159,
6738,
108,
17,
12799,
1246,
60,
800,
3726,
3726,
871,
15,
31,
22,
79,
19,
14,
953,
16,
16867,
21,
2741,
10058,
72,
129,
44,
638,
27,
21,
689,
30,
5102,
3251,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is using size() for the 2nd expression in a for construct always bad?
===
In the following example should I expect that `values.size()` will be called every time around the loop? In which case it might make sense to introduce a temporary `vectorSize` variable. Or should a modern compiler be able to optimize the calls away by recognising that the vector size cannot change.
double sumVector(const std::vector<double> values) {
double sum = 0.0;
for (size_t ii = 0; ii < values.size(); ++ii) {
h += values.at(ii);
}
}
Note that I don't care if there are more efficient methods to sum the contents of a vector, this question is just about the use of size() in a for construct.
| 0 | [
2,
25,
568,
1072,
5,
6,
26,
14,
172,
706,
1803,
19,
21,
26,
6960,
550,
896,
60,
800,
3726,
3726,
19,
14,
249,
823,
378,
31,
4186,
30,
13,
1,
15165,
18,
9,
10454,
5,
6,
1,
129,
44,
227,
352,
85,
140,
14,
5293,
60,
19,
56,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Perl - Common gotchas
===
The question on [Hidden features of Perl][1] yielded at least one response that could be regarded as either a feature or a mis-feature. It seemed logical to follow up with this question: What are common non-obvious mistakes in Perl? Things that seem like they ought to work, but don't.
I won't give guidelines as to how to structure answers, or what's "too easy" to be considered a gotcha, since that's what the voting is for (and because I'm probably going to find out things that I consider gotchas are actually just noob mistakes ;).
See Also: [ASP.NET - Common gotchas][2]
[1]: http://stackoverflow.com/questions/161872/hidden-features-of-perl
[2]: http://stackoverflow.com/questions/66117/aspnet-common-gotchas | 4 | [
2,
416,
255,
13,
8,
757,
330,
1651,
18,
800,
3726,
3726,
14,
1301,
27,
636,
1822,
43,
817,
967,
16,
416,
255,
500,
2558,
165,
500,
19852,
35,
639,
53,
1627,
30,
110,
44,
3950,
28,
694,
21,
1580,
54,
21,
2462,
8,
26956,
9,
32... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Do you have your own DNUT/NDT ("Do Not Use This/Never Do That") list?
===
I was reviewing this morning a piece of code written by a beginner, when I found these lines:
If
...
ElseIf
...
ElseIf
...
Endif
I told him "Please, Do Not Use This". And the other guy sitting aside (more experimented) said: "Oh no DoN't Use This!". I think there are many reasons explaining this reaction:
- a bad experience when we first discover the instructions ("Great, it's like a SELECT but it allows to compare more than one value") and were finally very disappointed trying to put together multiples overlapping elseifs that no one could ever never debugg properly ...
- The `elseif` trick does not allows you to align your lines of code as you've been doing it for the last 175 years, where you can visually check and adjust the quantity of endifs to add at the end of your procedure.
- But most of all "what is the interest of something that is already correctly done by the traditionnal IF/ELSE/ENDIF or SELECT CASE statements?"
Another example of a DNUT/NDT item was this ["cascade update" thing][1] in SQL SERVER, which seemed to me at first glance a great trick ("Wohh! my keys are automatically updated anywhere in my database"), until I began to think that a really effective key should never be updated, so I banned the use of this cascade update thing in my databases a few hundred years ago, and, until today, nobody complains about that!
I am sure that each one of us has its own DNUT/NDT list, and I am sure there is plenty of time to spare by sharing this kind of knowledge!
[1]: http://stackoverflow.com/questions/59297/whenwhy-to-use-cascading-in-sql-server | 4 | [
2,
107,
42,
57,
154,
258,
13,
43,
12162,
118,
706,
38,
13,
5,
7,
537,
52,
275,
48,
118,
9018,
107,
30,
7,
6,
968,
60,
800,
3726,
3726,
31,
23,
18046,
48,
959,
21,
1855,
16,
1797,
642,
34,
21,
26931,
15,
76,
31,
216,
158,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to make some nant task quite?
===
I am using [MailLogger][1] to send massage about failed/successful release. I whould like to make the mail body simple and easy to read. How can I suppress output for some particular tasks?
[1]: http://nant.sourceforge.net/release/0.85-rc2/help/fundamentals/listeners.html#MailLogger | 0 | [
2,
184,
20,
233,
109,
13,
11028,
3005,
1450,
60,
800,
3726,
3726,
31,
589,
568,
636,
8079,
29480,
500,
2558,
165,
500,
20,
2660,
19464,
88,
1702,
118,
29245,
1566,
830,
9,
31,
72,
1287,
43,
101,
20,
233,
14,
4216,
358,
1935,
17,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Agent-based modelling resources
===
I would like to know what kind of toolkits, languages, libraires exist for agent-based modelling and what are the pros/cons of them?
Some examples of what I am thinking of are
[Swarm][1], [Repast][2], and [MASS][3].
[1]: http://www.swarm.org
[2]: http://repast.sourceforge.net/
[3]: http://www.aitia.hu/services_and_products/simulation_systems/mass | 0 | [
2,
2267,
8,
1281,
23089,
2566,
800,
3726,
3726,
31,
83,
101,
20,
143,
98,
825,
16,
5607,
13703,
18,
15,
2556,
15,
2093,
2559,
7735,
18,
3182,
26,
2267,
8,
1281,
23089,
17,
98,
50,
14,
895,
18,
118,
12124,
16,
105,
60,
109,
377... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Extracting PNG images from Delphi 2009 imagelist
===
The TImageList of Delphi 2009 has support for PNG images by adding them in the imagelist editor. Is there any way to extract a TPngImage from a TImagelist and preserving the alpha channel?
What I want to do is actually to extract the images from one TImageList, make a disabled version of them and then add them to another TImageList. During this operation I would of course like to preserve the alpha channel of the PNG images.
| 0 | [
2,
10962,
68,
351,
2723,
3502,
37,
23030,
588,
1961,
5739,
800,
3726,
3726,
14,
2574,
1303,
5739,
16,
23030,
588,
63,
555,
26,
351,
2723,
3502,
34,
4721,
105,
19,
14,
1961,
5739,
1835,
9,
25,
80,
186,
161,
20,
10962,
21,
13,
137... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best standard to use for business document exchange (invoices, POs etc)?
===
If I need to implement sending and receiving of business documents (invoices, POs, remittance advice, etc) what standard would you recommend for best interop and why? It could be XML or otherwise. | 0 | [
2,
98,
25,
14,
246,
1236,
20,
275,
26,
508,
4492,
1950,
13,
5,
108,
13379,
18,
15,
12928,
2722,
6,
60,
800,
3726,
3726,
100,
31,
376,
20,
8713,
4907,
17,
3396,
16,
508,
4374,
13,
5,
108,
13379,
18,
15,
12928,
15,
11948,
10108,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it possible to select a specific tab in OSX Terminal.app using keyboard shortcuts?
===
I know I can cycle through my tabs using cmd+{ or cmd+}, but is it possible to select a specific tab (i.e. cmd+3 for the third tab in iTerm) in Leopards' Terminal.app?
| 0 | [
2,
25,
32,
938,
20,
5407,
21,
1903,
6523,
19,
13,
759,
396,
3855,
9,
7753,
568,
8896,
502,
4118,
18,
60,
800,
3726,
3726,
31,
143,
31,
92,
4150,
120,
51,
6523,
18,
568,
2390,
43,
2430,
1,
54,
2390,
43,
2430,
1,
15,
47,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to combine cascading updates/deletes between SQL Server and NHibernate?
===
I am writing an application with a hand-crafted domain model (classes) and a hand-crafted data model (tables/relationships), and letting NHibernate take care of the mapping.
Is it best to tell the database to perform cascading updates or deletes or to tell NHibernate to do it (cascade="all-delete-orphan")? Can they both be set up to do it at the same time?
| 0 | [
2,
184,
20,
12287,
7167,
13489,
68,
16779,
118,
24249,
3231,
128,
4444,
255,
8128,
17,
12109,
15191,
8820,
60,
800,
3726,
3726,
31,
589,
1174,
40,
3010,
29,
21,
224,
8,
7856,
69,
4603,
1061,
13,
5,
1898,
160,
6,
17,
21,
224,
8,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to show the loading indicator in the top status bar
===
I have noticed that some apps like Safari and Mail show a loading indicator in the status bar (the bar at the very top of the phone) when they are accessing the network. Is there a way to do the same thing in SDK apps, or is this an Apple only thing? | 0 | [
2,
184,
20,
298,
14,
12797,
13310,
19,
14,
371,
1782,
748,
800,
3726,
3726,
31,
57,
2711,
30,
109,
4865,
18,
101,
25055,
17,
4216,
298,
21,
12797,
13310,
19,
14,
1782,
748,
13,
5,
124,
748,
35,
14,
253,
371,
16,
14,
1132,
6,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Unable to serialize a property on a control
===
**Background**
I am trying to create a copy of a business object I have created in VB.NET. I have implemented the ICloneable interface and in the Clone function, I create a copy of the object by serializing it with a BinaryFormatter and then de-serializing straight back out into another object which I return from the function.
The class I am trying to serialize is marked as "Serializable" along with the child objects that are contained within the class.
I have tested that the clone method works by writing code similar to the following:
Dim obj as New Sheep()
Dim dolly as Sheep = obj.Clone()
All works fine at this point.
**Problem**
I have a custom windows forms control which inherits from a 3rd party control. This custom control basically contains the object which I want to clone (as this object ultimatly feeds the 3rd party control).
I want to create a clone of the object within the windows form control so that I can allow the user to manipulate the properties whilst having the option of cancelling the changes and reverting the object back to how it was before they made the changes. I would like to take the copy of the object before the user starts making changes and hold onto it so I have it ready if they press cancel.
My thought would be to write code along the lines of the following:
Dim copy as Sheep = MyControl.Sheep.Clone()
Then allow the user to manipulate the properties on `MyControl.Sheep`. When I attempt to do this however, the clone method throws an exception stating:
*Type 'MyControl' in Assembly 'My_Assembly_Info_Here' is not marked as serializable*
This error is thrown at the point where I call `BinaryFormatter.Serialize(stream,Me)`.
I have tried creating a method on `MyControl` that returns a copy of the object and also first assigning `MyControl.Sheep` to another variable and then cloning the variable but nothing seems to work. However, creating a new instance of the object directly and cloning it works fine!
Any idea's where I am going wrong? | 0 | [
2,
2343,
20,
5956,
2952,
21,
1354,
27,
21,
569,
800,
3726,
3726,
13,
1409,
1958,
8810,
1409,
31,
589,
749,
20,
1600,
21,
4344,
16,
21,
508,
3095,
31,
57,
679,
19,
13,
20468,
9,
2328,
9,
31,
57,
6807,
14,
13,
596,
16285,
579,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you find which database a table is located in, of which you know the name (e.g. dbo.mytable1), in Microsoft SQL Server Management Studio 2005?
===
I know the name of the table I want to find. I'm using Microsoft SQL Server Management Studio 2005, and I want to search all databases in the database server that I'm attached to in the studio. Is this possible? Do I need to query the system tables? | 0 | [
2,
184,
107,
42,
477,
56,
6018,
21,
859,
25,
335,
19,
15,
16,
56,
42,
143,
14,
204,
13,
5,
62,
9,
263,
9,
13,
43,
1192,
9,
915,
5924,
165,
6,
15,
19,
7099,
4444,
255,
8128,
1097,
1120,
812,
60,
800,
3726,
3726,
31,
143,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Which parallel programming APIs do you use?
===
Trying to get a grip on how people are actually writing parallel code currently, considering the immense importance of multicore and multiprocessing hardware these days. To me, it looks like the dominant paradigm is pthreads (POSIX threads), which is native on Linux and available on Windows. HPC people tend to use OpenMP or MPI, but there are not many of these here on StackOverflow it seems. Or do you rely on Java threading, Windows threading APIs, etc. rather than the portable standards? What is the recommended way, in your opinion, to do parallel programming?
Or are you using more exotic things like Erlang, CUDA, RapidMind, CodePlay, Oz, or even dear old Occam? | 0 | [
2,
56,
3821,
3143,
21,
8954,
107,
42,
275,
60,
800,
3726,
3726,
749,
20,
164,
21,
4466,
27,
184,
148,
50,
1121,
1174,
3821,
1797,
871,
15,
5154,
14,
16248,
3728,
16,
1889,
10375,
17,
1889,
16835,
68,
7610,
158,
509,
9,
20,
55,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
fastest way to cast/copy byte() into single() - noob question!
===
I've got a byte() array returned as result of directx sound capture, but for other parts of my program I want to treat the results as single(). Is trundling down the array item by item the fastest way of doing it or is there a clever way to do it ?
The code that gets it is
CType(Me._applicationBuffer.Read(Me._nextCaptureOffset, GetType(Byte), LockFlag.None, LockSize), Byte())
which creates the byte array, can Ctype handle single ? (note, I can't figure out a way to do it!) | 0 | [
2,
7518,
161,
20,
1325,
118,
19625,
34,
591,
5,
6,
77,
345,
5,
6,
13,
8,
90,
4995,
1301,
187,
800,
3726,
3726,
31,
22,
195,
330,
21,
34,
591,
5,
6,
7718,
587,
28,
829,
16,
1744,
396,
646,
3683,
15,
47,
26,
89,
1341,
16,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Robot simulation environments
===
I would like to make a list of remarkable robot simulation environments including advantages and disadvantages of them. Some examples I know of are [Webots][1] and [Player/Stage][2].
[1]: http://www.cyberbotics.com/
[2]: http://playerstage.sourceforge.net/ | 0 | [
2,
8288,
10926,
11246,
800,
3726,
3726,
31,
83,
101,
20,
233,
21,
968,
16,
9902,
8288,
10926,
11246,
215,
14683,
17,
13387,
18,
16,
105,
9,
109,
3770,
31,
143,
16,
50,
636,
458,
6813,
18,
500,
2558,
165,
500,
17,
636,
14049,
118... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best Linux distribution of for running Mono
===
I'm a .Net developer and would like to investigate building and running our framework on Mono.
If the initial project is successful I will happily invest in an OS learning curve, but right now I want to focus on getting things up and running and seeing the code working.
What would be the best distribution to start with, assuming that I know very little about Linux, but am an experienced developer? How quickly (hours/days/weeks?) can I expect to achieve this? | 4 | [
2,
246,
13024,
2523,
16,
26,
946,
4129,
800,
3726,
3726,
31,
22,
79,
21,
13,
9,
2328,
10058,
17,
83,
101,
20,
7375,
353,
17,
946,
318,
6596,
27,
4129,
9,
100,
14,
2104,
669,
25,
1300,
31,
129,
12356,
15032,
19,
40,
13,
759,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Should I have a dedicated primary key field?
===
I'm designing a small SQL database to be used by a web application.
Let's say a particular table has a Name field for which no two rows will be allowed to have the same value. However, users will be able to change the Name field at any time.
The primary key from this table will be used as a foreign key in other tables. So if the Name field was used as the PK, any changes would need to be propogated to those other tables. On the other hand, the uniqueness requirement would be handled automatically.
My instinct would be to add an integer field to act as the PK, which could be automatically populated by the database. Is there any point in having this field or would it be a waste of time? | 0 | [
2,
378,
31,
57,
21,
2360,
1256,
1246,
575,
60,
800,
3726,
3726,
31,
22,
79,
15026,
21,
284,
4444,
255,
6018,
20,
44,
147,
34,
21,
2741,
3010,
9,
408,
22,
18,
395,
21,
1498,
859,
63,
21,
204,
575,
26,
56,
90,
81,
11295,
129,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C# compiler number literals
===
Does anyone know the full list of C# compiler number literal modifiers?
By default declaring '0' makes it an Int32 and '0.0' makes it a 'Double'. I can use the literal modifier 'f' at the end to ensure something is treated as a 'Single' instead. For example like this...
var x = 0; // x is Int32
var y = 0f; // y is Single
What are the other modifiers I can use? Is there one for forcing to Double, Decimal, UInt32? I tried googling for this but could not find anything. Maybe my terminology is wrong and so that explains why I am coming up blank. Any help much appreciated. | 0 | [
2,
272,
5910,
21486,
234,
20665,
18,
800,
3726,
3726,
630,
1276,
143,
14,
503,
968,
16,
272,
5910,
21486,
234,
20665,
7226,
16292,
18,
60,
34,
12838,
15594,
13,
22,
387,
22,
1364,
32,
40,
19,
38,
3125,
17,
13,
22,
387,
9,
387,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Compare view with stream
===
I use ClearCase. I have a snapshot view. Is there a way to compare this view with some stream to find changed files? | 0 | [
2,
11590,
1418,
29,
3766,
800,
3726,
3726,
31,
275,
1207,
10325,
9,
31,
57,
21,
29946,
1418,
9,
25,
80,
21,
161,
20,
11590,
48,
1418,
29,
109,
3766,
20,
477,
1015,
6488,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Using sIFR in nyroModal lightbox
===
I'm using sIFR in a page that's being popped up in a nyroModal lightbox, but when the page is displayed, the sIFR objects aren't being shown. What do I need to do to get them to show? | 0 | [
2,
568,
2769,
6177,
19,
3071,
661,
20756,
471,
5309,
800,
3726,
3726,
31,
22,
79,
568,
2769,
6177,
19,
21,
2478,
30,
22,
18,
142,
11370,
71,
19,
21,
3071,
661,
20756,
471,
5309,
15,
47,
76,
14,
2478,
25,
6115,
15,
14,
2769,
61... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to update Firefox 2 compatible extensions using IFRAME to Firefox 3?
===
I am trying to update a custom firefox extension that I created for some tasks at work. Basically it is a sidebar that pulls up one of our webpages in an iframe for various purposes. When moving to Firefox 3 the iframe won't appear at all.
Below is an example of the XUL files that contains extension specific code including iframe, currently with just an attempt to load google but it it won't work with anything. I can't find any mention online of changes in FF3 that would cause this. Any suggestions would be appreciated.
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://customsidebar/skin/customsidebar.css" type="text/css"?>
<overlay id="customsidebar-Main" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="chrome://customsidebar/content/customsidebar.js"/>
<vbox flex="1">
<toolbar>
<vbox>
<hbox id="customsidebar_TopToolbarRow">
<toolbarbutton label="Refresh" id="customsidebar_Refresh" oncommand="customsidebar_Refresh()" />
</hbox>
<hbox>
<label control="customsidebar_StatusBox" value="Log"/>
<textbox id="customsidebar_StatusBox" multiline="true" rows="1" wrap="off" />
</hbox>
</vbox>
</toolbar>
<iframe id="customsidebar_Iframe" src="http://www.google.com" />
</vbox>
</overlay>
Here is the overlay XUL file
<?xml version="1.0"?>
<overlay id="CustomSidebar-Overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<menupopup id="viewSidebarMenu">
<menuitem observes="viewCustomSidebar" />
</menupopup>
<broadcasterset id="mainBroadcasterSet">
<broadcaster id="viewCustomSidebar"
autoCheck="false"
label="CustomSidebar"
type="checkbox" group="sidebar"
sidebarurl="chrome://customersidebar/content/customersidebarMain.xul"
sidebartitle="CustomSidebar"
oncommand="toggleSidebar('viewCustomSidebar');"/>
</broadcasterset>
</overlay>
| 0 | [
2,
184,
20,
11100,
535,
18219,
172,
14961,
17529,
568,
31,
8361,
20,
535,
18219,
203,
60,
800,
3726,
3726,
31,
589,
749,
20,
11100,
21,
5816,
535,
18219,
3896,
30,
31,
679,
26,
109,
8674,
35,
170,
9,
11374,
32,
25,
21,
270,
1850... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you manage .vcproj files in souce control which are changed by multiple developers?
===
We use Subversion as our source control system and store the VisualStudio project files (vcproj) in the source control system as is normal I think. With Subversion we don't use any form of file locking, so if two developers are working on the same project at the same time and both add files to the project, or change settings, the second one to commit has to merge the changes.
How do you merge these changes?
The vcproj files are just text files so it is possible to edit them by hand but they are not very amenable to hand editing, especially by junior developers.
The ways I can think of are
- Get the latest version from svn and re-add all local changes manually
- Edit the file by hand to resolve any conflicts from an automatic merge
- Implement some form of locking scheme to prevent simultaneous changes
- Have an agreement between developers so they do not make simultaneous changes
Currently we are using the first option of re-adding all changes manually but this is time consuming and I was wondering if there is a better way.
With source files the automatic merge feature works most of the time and we don't get many conflicts. | 0 | [
2,
184,
107,
42,
4705,
13,
9,
8990,
2740,
728,
6488,
19,
86,
291,
1105,
569,
56,
50,
1015,
34,
1886,
10168,
60,
800,
3726,
3726,
95,
275,
972,
10898,
28,
318,
1267,
569,
329,
17,
1718,
14,
3458,
21026,
669,
6488,
13,
5,
8990,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Java: Newbie-ish inheritance question...
===
Suppose I have a base class B, and a derived class D. I wish to have a method foo() within my base class that returns a new object of whatever type the instance is. So, for example, if I call B.foo() it returns an object of type B, while if I call D.foo() it returns an object of type D; meanwhile, the implementation resides solely in the base class B.
Is this possible? | 0 | [
2,
8247,
45,
78,
5893,
8,
1595,
13852,
1301,
9,
9,
9,
800,
3726,
3726,
5787,
31,
57,
21,
1000,
718,
334,
15,
17,
21,
3981,
718,
13,
43,
9,
31,
2536,
20,
57,
21,
2109,
4310,
111,
5,
6,
363,
51,
1000,
718,
30,
4815,
21,
78,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why is "The referenced component 'X' could not be found." considered a warning?
===
I wonder, why the hell... did the VS team consider that NOT finding a project reference as a non crucial thing?
The referenced component 'X' could not be found. should be considered an error... and nothing else.
**Is there a way (without turning 'Treat all warnings as errors' on) to get this warning as an error in VS2008?** | 0 | [
2,
483,
25,
13,
7,
124,
17571,
5912,
13,
22,
396,
22,
110,
52,
44,
216,
9,
7,
724,
21,
3590,
60,
800,
3726,
3726,
31,
2666,
15,
483,
14,
1094,
9,
9,
9,
144,
14,
4611,
173,
3563,
30,
52,
3007,
21,
669,
2801,
28,
21,
538,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Seperating Demo data in Live system
===
If we put aside the rights and wrongs of putting demo data into a live system for a minute (that's a whole seperate discussion!), we are being asked to store some demo data in our live system so that it can be credibly demonstrated without the appearance of smoke + mirrors (we want to use the same login page for example)
Since I'm sure this is a challenge many other people must have - I'd be interested to know what approaches have people have devised to seperating this data so that it doesn't get in the way of day to day operations on their systems?
As I aluded to above, I'm aware that this probably isn't best practice. :-) | 0 | [
2,
10332,
106,
1880,
8376,
1054,
19,
515,
329,
800,
3726,
3726,
100,
95,
442,
3841,
14,
1096,
17,
1389,
18,
16,
3873,
8376,
1054,
77,
21,
515,
329,
26,
21,
2038,
13,
5,
887,
22,
18,
21,
979,
10332,
106,
1373,
5460,
187,
6,
15,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
XML add <a> hyperlink
===
I have a xml blob that's checked against a schema in sql 2005. My website uses xsl to transform and display the blob. How do I add a hyperlink to the xml (in any node) without the sql 2005 schema complaining a node was found in the wrong place? Or the xsl thinking that the hyperlink is a valid xml node?
thank you
| 0 | [
2,
23504,
3547,
13,
1,
58,
1,
5443,
6258,
800,
3726,
3726,
31,
57,
21,
23504,
334,
10904,
30,
22,
18,
6505,
149,
21,
23874,
19,
4444,
255,
812,
9,
51,
2271,
2027,
993,
18,
255,
20,
8007,
17,
3042,
14,
334,
10904,
9,
184,
107,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Architecture for easy update of application
===
I have a system in place which applies calculations to a set of numbers (the specifics aren't really relevant). There are a number of sets of calculations which can be applied by the system users and new sets are added frequently. Currently when a new set of calculations need to be added to the system they are added in to the code base and a new version of the system released. I'd like to be able to add new calculation sets into the system without having to release a whole new version and also to have these new calculations become visible to system users automatically. Currently a new function is created for each set of calculations and a record containing the appropriate function name is added to a system table. These records are visible to system users (function names are aliased of course!) who then select them from a list. The system uses the Eval() function to run the appropriate calculations.
This is a VB6/Access app that I inherited and am currently re-writing in VB.NET and SQL Server.
Does anyone have any advice on how best to do this? | 0 | [
2,
2607,
26,
2010,
11100,
16,
3010,
800,
3726,
3726,
31,
57,
21,
329,
19,
209,
56,
13169,
19186,
20,
21,
309,
16,
2116,
13,
5,
124,
1903,
18,
4847,
22,
38,
510,
7480,
6,
9,
80,
50,
21,
234,
16,
3415,
16,
19186,
56,
92,
44,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to wait on another process's status in .NET?
===
I'm working on an integration testing project in .NET. The testing framework executable starts a service and then needs to wait for the service to complete an operation.
What is the best approach for the exe to wait on the service's completion?
Both processes have access to the same database, so my first thought was a simple table that records the service's status. Once it's signaled that it's done, the exe can stop waiting and complete its task. Other approaches? | 0 | [
2,
184,
20,
1760,
27,
226,
953,
22,
18,
1782,
19,
13,
9,
2328,
60,
800,
3726,
3726,
31,
22,
79,
638,
27,
40,
8078,
4431,
669,
19,
13,
9,
2328,
9,
14,
4431,
6596,
1396,
17194,
5924,
3244,
21,
365,
17,
94,
2274,
20,
1760,
26,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C# preg_replace?
===
What is the PHP preg_replace in C#?
I have an array of string that I would like to replace by an other array of string. Here is an example in PHP. How can I do something like that in C# without using .Replace("old","new").
$patterns[0] = '/=C0/';
$patterns[1] = '/=E9/';
$patterns[2] = '/=C9/';
$replacements[0] = 'à';
$replacements[1] = 'é';
$replacements[2] = 'é';
return preg_replace($patterns, $replacements, $text);
| 0 | [
2,
272,
5910,
782,
263,
1,
99,
5119,
60,
800,
3726,
3726,
98,
25,
14,
13,
26120,
782,
263,
1,
99,
5119,
19,
272,
5910,
60,
31,
57,
40,
7718,
16,
3724,
30,
31,
83,
101,
20,
3934,
34,
40,
89,
7718,
16,
3724,
9,
235,
25,
40,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best place to put application data?
===
Please can someone advice what is the best place (path) to put some application data which should be accessible and editable by all users.
This is considering both Windows XP and Windows Vista and i expect that change in any file of above path does NOT trigger UAC! | 0 | [
2,
246,
209,
20,
442,
3010,
1054,
60,
800,
3726,
3726,
2247,
92,
737,
4978,
98,
25,
14,
246,
209,
13,
5,
8353,
6,
20,
442,
109,
3010,
1054,
56,
378,
44,
7342,
17,
9392,
579,
34,
65,
3878,
9,
48,
25,
5154,
156,
1936,
23045,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Array Vs. Linked List
===
I apologize--this question may be a bit open-ended but I think there are probably definite, quantifiable answers to it so I'll post it anyway.
A person I know is trying to learn C++ and software development (+1 to him) and he asked me why someone would want to use a linked list in preference to an array. Coding a linked list is, no doubt, a bit more work than using an array and he wondered what would justify the additional effort.
I gave him the answer I know: insertion of new elements is trivial in linked list but it's a major chore in an array. But then I got to thinking about it a bit more. Besides the ease of insertion of a new element into a linked list are there other advantages to using a linked list to store a set of data vs. storing it in an array?
As I said, I'm not meaning to start a long and drawn-out discussion. I'm just looking for other reasons that a developer might prefer a linked list to an array. | 0 | [
2,
7718,
4611,
9,
4727,
968,
800,
3726,
3726,
31,
12059,
8,
8,
1565,
1301,
123,
44,
21,
1142,
368,
8,
10726,
47,
31,
277,
80,
50,
910,
17524,
15,
9836,
38,
25372,
6709,
20,
32,
86,
31,
22,
211,
678,
32,
2774,
9,
21,
840,
31,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Different dependencies for different build profiles in maven
===
Is it possible to have a different set of dependencies in a maven pom.xml file for different profiles?
e.g.
mvn -P debug
mvn -P release
I'd like to pick up a different dependency jar file in one profile that has the same class names and different implementations of the same interfaces. | 0 | [
2,
421,
29411,
26,
421,
1895,
5296,
18,
19,
1216,
3124,
800,
3726,
3726,
25,
32,
938,
20,
57,
21,
421,
309,
16,
29411,
19,
21,
1216,
3124,
16214,
9,
396,
8184,
3893,
26,
421,
5296,
18,
60,
13,
62,
9,
263,
9,
17967,
103,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Formatting a double in JSF
===
I have a problem similar to the one found here : http://stackoverflow.com/questions/86531/jsf-selectitem-label-formatting.
What I want to do is to accept a double as a value for my <h:inputText> and display it with two decimals. Can this be done in an easy way?
I've tried using <f:convertNumber> but that seems to be applied on the value from the inputText that is sent to the server and not on the initial value in the input field.
My code so far:
<h:inputText id="december" value="#{budgetMB.december}" onchange="setDirty()" styleClass="StandardBlack">
<f:convertNumber maxFractionDigits="2" groupingUsed="false" />
</h:inputText> | 0 | [
2,
2595,
1203,
21,
1494,
19,
487,
18,
410,
800,
3726,
3726,
31,
57,
21,
1448,
835,
20,
14,
53,
216,
235,
13,
45,
7775,
6903,
25325,
2549,
9990,
9,
960,
118,
24652,
18,
118,
3274,
4022,
8197,
728,
18,
410,
8,
18,
16964,
2119,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Language showdown: Convert string of digits to array of integers
===
I was trying to convert a string containing only base 10 digits (e.g. "124890") to an array of corresponding integers (for given example: [1, 2, 4, 8, 9, 0]), in Ruby .
I'm curious about how easily this can be accomplished in Ruby and in other languages. | 4 | [
2,
816,
26711,
45,
8406,
3724,
16,
19076,
20,
7718,
16,
13820,
18,
800,
3726,
3726,
31,
23,
749,
20,
8406,
21,
3724,
3503,
104,
1000,
332,
19076,
13,
5,
62,
9,
263,
9,
13,
7,
918,
3216,
3165,
7,
6,
20,
40,
7718,
16,
7265,
13... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to get Selenium working with PHP/Firefox3 on Linux
===
I am trying to get [Selenium RC](http://selenium-rc.openqa.org/tutorial.html) working with Firefox 3 on Linux with PHP/Apache but am experiencing problems. Here's what I've done:
- I have installed the Firefox Selenium-IDE extension.
- On the web server (which in my case is actually the same machine running Firefox), I've started the Selenium server with: java -jar selenium-server.jar -interactive
- I have a PHP script as follows:
PHP:
require_once 'Testing/Selenium.php';
$browser = new Testing_Selenium("*custom /usr/lib/firefox-3.0.3/firefox", "https://www.example.com");
$browser->start();
When I run the PHP script, it does launch a new Firefox tab, but <b>I get this error message</b>:
The requested URL /selenium-server/core/RemoteRunner.html was not found on this server.
I have had more success with Firefox 2 (by using `"*firefox"` instead of `"*custom"` but don't want to use that for my current project.
| 0 | [
2,
184,
20,
164,
23027,
14311,
638,
29,
13,
26120,
118,
5929,
18219,
240,
27,
13024,
800,
3726,
3726,
31,
589,
749,
20,
164,
636,
18,
20110,
2187,
16462,
500,
5,
21127,
6903,
18,
20110,
2187,
8,
5453,
9,
10157,
8681,
9,
5583,
118,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Calling Python in PHP
===
I have a Python script I recently wrote that I call using the command line with some options. I now want a very thin web interface to call this script locally on my Mac.
I don't want to go through the minor trouble of installing mod_python or mod_wsgi on my Mac, so I was just going to do a system() or popen() from PHP to call the Python script.
Any better ideas? Thanks in advance! | 0 | [
2,
2555,
20059,
19,
13,
26120,
800,
3726,
3726,
31,
57,
21,
20059,
3884,
31,
1989,
738,
30,
31,
645,
568,
14,
1202,
293,
29,
109,
6368,
9,
31,
130,
259,
21,
253,
2951,
2741,
6573,
20,
645,
48,
3884,
6680,
27,
51,
1572,
9,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
WinDbg outputs characters to console nonstop
===
I'm developing a POS application that is used in about 200 locations as of right now using .Net 2.0, WCF and SyncFusion components for the GUI.
Two days ago we installed the application in a new location, and it has been suffering sudden termination of the application.
The application has a running log of events and exceptions, so if something happens to it, there's always something in the log. In this case, the log is simply cut off. We've had similar situations in other locations, but they were extremely rare and didn't happen more than once or twice, so we couldn't catch a debug dump.
The computer at that location has a slightly different hardware setup, including a splitter on the LPT out that is meant to be used for both printing to the POS printer, and displaying the output on a video monitor.
In this location though, it's happening about every 1.5 hours. I've tried to open WinDbg and attach to the process, but here's the weird thing, in the area where there's the debug output, I see the trace messages that my application produces, but there's also a nonstop stream of characters, specifically, "b0" that repeats itself.
My problem is that I don't understand where that "b0" is coming from, and what is it meant to be. I suspect that it might be the splitter, but I won't be able to test it until sunday.
Hope someone will have an idea how to go about solving this. | 0 | [
2,
1511,
19924,
5196,
18,
1766,
20,
8650,
26157,
800,
3726,
3726,
31,
22,
79,
3561,
21,
12928,
3010,
30,
25,
147,
19,
88,
2327,
4095,
28,
16,
193,
130,
568,
13,
9,
2328,
172,
9,
387,
15,
11801,
410,
17,
6063,
150,
9818,
5090,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Release COM Components
===
Is it really necessary to release COM components from Office PIA, when you don't need them anymore by invoking Marshal.ReleaseComObject(..)?
I found various and contradictory advices on this topic on the web. In my opinion, since Office PIA is always returning a new references to its interfaces as returning values from its methods, it is not necessary to explicitly release it. Am I right? | 0 | [
2,
830,
13,
960,
5090,
800,
3726,
3726,
25,
32,
510,
2378,
20,
830,
13,
960,
5090,
37,
488,
13009,
15,
76,
42,
221,
22,
38,
376,
105,
3375,
34,
19,
2625,
1581,
7583,
9,
15202,
960,
23793,
5,
9,
9,
6,
60,
31,
216,
617,
17,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How did you choose your Visual Studio productivity addon?
===
I'm evaluating Visual Studio productivity addons for my development team, which includes some folks who are very new to C# and some folks who are very experienced. We don't use VB.NET. I personally like ReSharper, but before I suggest something that I personally like, I would like some opinions for and reasoning behind using a different addon.
Given the choice between ReSharper, CodeRush, and Visual Assist, which one did you choose and why?
For discussion, do you run more than one addon at a time? Or one not on this list? What are your thoughts on these addons? | 0 | [
2,
184,
144,
42,
3538,
154,
3458,
1120,
18211,
3547,
218,
60,
800,
3726,
3726,
31,
22,
79,
26764,
3458,
1120,
18211,
3547,
4710,
26,
51,
522,
173,
15,
56,
1103,
109,
14563,
72,
50,
253,
78,
20,
272,
5910,
17,
109,
14563,
72,
50,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Perforce repository monitor for Windows
===
I used to work with Subversion and a system tray tool ([SVN Notifier][1]) to monitor the repository so I would immediately see when my local copy was not up-to-date anymore, and I am wondering if some equivalent was available for Perforce (on Windows).
[1]: http://svnnotifier.tigris.org/ | 0 | [
2,
416,
8774,
24869,
7626,
26,
1936,
800,
3726,
3726,
31,
147,
20,
170,
29,
972,
10898,
17,
21,
329,
10121,
5607,
13,
5,
2558,
18,
16578,
52,
16292,
500,
2558,
165,
500,
6,
20,
7626,
14,
24869,
86,
31,
83,
1375,
196,
76,
51,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Need a regular expression
===
I generally stay away from regular expressions because I seldom find a good use for them. But in this case, I don't think I have choice. I need a regex for the following situation. I will be looking at three character strings. It will be a match if the first character is 1-9 or the letters o,n,d (lower or upper) AND the second character is 1,2 or 3 and the third character is 0-9.
Can anybody help me out? | 0 | [
2,
376,
21,
1290,
1803,
800,
3726,
3726,
31,
1469,
1179,
229,
37,
1290,
13832,
185,
31,
18001,
477,
21,
254,
275,
26,
105,
9,
47,
19,
48,
610,
15,
31,
221,
22,
38,
277,
31,
57,
1837,
9,
31,
376,
21,
7953,
1706,
26,
14,
249,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using nmake with wildcards in the makefile
===
I am attempting to set up an nmake makefile to export our balsamiq mockup files to png files automatically, but I'm afraid I can't make heads nor tails of how to make a generic rule for doing so, without explicitly listing all the files I want exported.
[This page](http://www.balsamiq.com/blog/?p=231) details the command line syntax for exporting the files, and [this page](http://msdn.microsoft.com/en-us/library/ms925728.aspx) contains an example which looks like it contains a generic rule for .obj files to .exe files.
The makefile I have tried so far looks like this:
.bmml.png:
"C:\Program Files\Balsamiq Mockups\Balsamiq Mockups.exe" export $< $@
But this doesn't work.
If I simply run nmake (with some outdated png files), nmake just does this:
[C:\Temp] :nmake
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
[C:\Temp] :
If I ask it to build one specific file, it does this:
[C:\Temp] :nmake "TestFile.png"
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
NMAKE : fatal error U1073: don't know how to make '"TestFile.png"'
Stop.
[C:\Temp] :
Any nmake gurus out there that can set me straight?
An example makefile which simply makes .dat files from .txt files by copying them, to experiment with, looks like this:
.txt.dat:
copy $< $@
this does nothing as well, so clearly I'm not understanding how such generic rules work. Do I need to specify a goal above that somehow lists the files I want? | 0 | [
2,
568,
13,
103,
11115,
29,
23003,
18,
19,
14,
233,
16877,
800,
3726,
3726,
31,
589,
6314,
20,
309,
71,
40,
13,
103,
11115,
233,
16877,
20,
7487,
318,
3350,
6101,
9908,
10506,
576,
6488,
20,
351,
2723,
6488,
7499,
15,
47,
31,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Fast compiler error messages in Eclipse
===
As a new Eclipse user, I am constantly annoyed by how long it takes compiler error messages to display. This is mostly only a problem for long errors that don't fit in the status bar or the "Problems" tab. But I get enough long errors in Java—especially with generics—that this is a nagging issue. (Note: The correct answer to this question is not "get better at using generics." ;-)
The ways I have found to display an error are:
1. Press `Ctrl+.` or execute the command "Next Annotation". The next error is highlighted and its associated message appears in the status bar (if it is short enough). The error is also highlighted in the "Problems" tab, if it is open, but the tab is not automatically brought to the top.
2. Hover the mouse over the error. After a noticeable lag, the error message appears as a "tool tip", along with any associated "Quick Fixes."
3. Hover the mouse over the error icon on the left side of the editing pane. After a noticeable lag, all of the error messages for that line appear as a "tool tip." Clicking on the icon brings up "Quick Fixes."
What I would like is for `Ctrl+.` to automatically and instantly bring up the complete error message (I don't care where). Is this a configurable option? | 0 | [
2,
1512,
21486,
7019,
7561,
19,
11652,
800,
3726,
3726,
28,
21,
78,
11652,
4155,
15,
31,
589,
7545,
13008,
34,
184,
175,
32,
1384,
21486,
7019,
7561,
20,
3042,
9,
48,
25,
1555,
104,
21,
1448,
26,
175,
11908,
30,
221,
22,
38,
274... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best practice for creating subversion repositories?
===
Our team (5-10 developers) plans to **adopt Subversion** for our .NET (Visual Studio) projects/solutions (VisualSVN Server, TortoiseSVN / VisualSVN).
What is the best way to **organize a new repository tree**? Is it okay to use *one big repository* or is it better to create *different repositories* for every solution / product line etc.?
Our projects can be categorized this way (example):
- Main Product Line
- Main Web App
- Library 1
- Library 2
- ...
- Windows Client
- Another Windows Client
- Windows Service
- Tools
- Tool A
- Tool B
- Product Line 2
- Software 1
- Software 2
- Product Line 3
- App 1
- App 2 | 0 | [
2,
246,
1345,
26,
2936,
972,
10898,
302,
14882,
262,
2829,
60,
800,
3726,
3726,
318,
173,
13,
5,
264,
8,
1036,
10168,
6,
1753,
20,
13,
1409,
5672,
4417,
972,
10898,
1409,
26,
318,
13,
9,
2328,
13,
5,
20893,
1120,
6,
2314,
118,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Should I use threading and recursion together?
===
I have been tinkering with BSP trees for a while now and am also playing with threads. When adding a triangle to a BSP tree, an opportunity arises to create a new thread for the purposes of processing data in parallel.
<pre>
insert(triangle, bspnode)
{
....
else if(triangle spans bspnode)
{
(frontpiece, backpiece) = plane_split(triangle, bspnode)
insert(frontpiece, bspnode.front)
insert(backpiece, bspnode.back)
}
....
}
</pre>
The two insert operations above could be executed by two threads, and since they do not modify the same data, cheap synchronization can be used.
<pre>
insert(triangle, bspnode)
{
....
else if(triangle spans bspnode)
{
(frontpiece, backpiece) = split(triangle, bspnode)
handle = beginthread(insert(backpiece, bspnode.front))
insert(frontpiece, bspnode.back)
if(handle)
{
waitforthread(handle)
}
else
{
insert(backpiece, bspnode.front)
}
}
....
}
</pre>
This new method attempts to create a thread to complete the operation in parallel, but should not fail if the thread cannot be created (it will simply revert to the original algorithm).
Is this a sound programming practice, or am I using threads improperly? I have not been able to find any literature on this technique. I like that it tends to use my CPU to its fullest (2 cores), and would theoretically scale to any number of processors available. I don't like that it might be horribly wasteful on CPU and memory. | 0 | [
2,
378,
31,
275,
9322,
68,
17,
26604,
5991,
429,
60,
800,
3726,
3726,
31,
57,
74,
25438,
68,
29,
334,
3401,
1913,
26,
21,
133,
130,
17,
589,
67,
791,
29,
20396,
9,
76,
4721,
21,
8676,
20,
21,
334,
3401,
1541,
15,
40,
2893,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you right-justify text in an HTML textbox?
===
I have a need to display many numerical values in columns. These values need to be easily editable so I cannot just display them in a table. I am using textboxes to display them. Is there a way for me to right-justify the text displayed in a textbox? It would also be nice if when the user is entering data for it to start displaying what they type from the right. | 0 | [
2,
184,
107,
42,
193,
8,
2759,
8612,
1854,
19,
40,
13,
15895,
1854,
5309,
60,
800,
3726,
3726,
31,
57,
21,
376,
20,
3042,
151,
16010,
4070,
19,
7498,
9,
158,
4070,
376,
20,
44,
2351,
9392,
579,
86,
31,
1967,
114,
3042,
105,
19... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Programatically change keyboard to Dvorak
===
Does anyone know the API call I can use to change the keyboard layout on a windows machine to Dvorak? Doing it through the UI is easy but I'd like to have a script that I can run on new VM's to automate the process. | 0 | [
2,
625,
721,
8438,
753,
8896,
20,
13,
43,
5771,
1378,
800,
3726,
3726,
630,
1276,
143,
14,
21,
2159,
645,
31,
92,
275,
20,
753,
14,
8896,
9106,
27,
21,
1936,
1940,
20,
13,
43,
5771,
1378,
60,
845,
32,
120,
14,
13,
5661,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Multiple database connection
===
I'm trying to understand the best way to get the connection to my databases.
At the moment I've got a method wich parses the url (depending on the url called the application has to connect to a different database, like customer1.xxx.com will connect to the customer1 database) and calls
ActiveRecord::Base.establish_connection(conn_string)
where conn_string contains the name of the database.
This method (set_db) is called with a
before_filter :set_db
in my Application controller, so basicly for each request I get, the url is parsed and the application try to do an establish_connection.
I was wondering if I can have a connection pool somewhere....do you have any suggestion about that? Is it better to have a Singleton which keep all the connections made and gives back the right one?
Thanks!
Roberto
| 0 | [
2,
1886,
6018,
2760,
800,
3726,
3726,
31,
22,
79,
749,
20,
1369,
14,
246,
161,
20,
164,
14,
2760,
20,
51,
6018,
18,
9,
35,
14,
688,
31,
22,
195,
330,
21,
2109,
13,
13583,
2017,
7202,
14,
287,
6362,
13,
5,
19038,
68,
27,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Adding durability to in-memory data structures
===
This could possibly have a simple answer but I couldn't come up with any and searching in Google didn't really yield anything (maybe I didn't use the right keywords).
**What are some of the popular techniques you can adopt to add durability to your in-memory data structures (ie) if the process crashes, you can preserve all previously executed operations on that data structure?**
If my data structure involves just a list of tuples, then I would just store them in a SQL DB and that would give me durability for free. But what if my data structure was a graph or a tree?
The one thing I could think of is to explicitly log all operations to disk (append-only log) and in the event of a crash, replay the log to preserve the previous state. If the log becomes too big, then there will be a compaction step. I'm guessing this is what a database engine does internally for durability (checkpointing is what this process is called)?
Btw note that this is not a scenario where the entire dataset doesn't fit in memory. | 0 | [
2,
4721,
6269,
4091,
20,
19,
8,
790,
5171,
93,
1054,
3815,
800,
3726,
3726,
48,
110,
2879,
57,
21,
1935,
1623,
47,
31,
711,
22,
38,
340,
71,
29,
186,
17,
5792,
19,
8144,
223,
22,
38,
510,
11537,
602,
13,
5,
5138,
31,
223,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MySQL Limit with Many to Many Relationship
===
Given a SCHEMA for implementing tags
ITEM
ItemId, ItemContent
TAG
TagId, TagName
ITEM_TAG
ItemId, TagId
What is the best way to limit the number of ITEMS to return when selecting with tags?
SELECT i.ItemContent, t.TagName FROM item i
INNER JOIN ItemTag it ON i.id = it.ItemId
INNER JOIN tag t ON t.id = it.TagId
is of course the easiest way to get them all back, but using a limit clause breaks down, because you get an duplicate of all the items for each tag, which counts toward the number of rows in LIMIT.
| 0 | [
2,
51,
18,
22402,
4496,
29,
151,
20,
151,
1429,
800,
3726,
3726,
504,
21,
23874,
26,
17333,
3383,
18,
9101,
9101,
1340,
15,
9101,
25424,
3383,
3383,
1340,
15,
3383,
7259,
9101,
1,
8628,
9101,
1340,
15,
3383,
1340,
98,
25,
14,
246,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Free/Paid Flash Players?
===
I've been looking into the [FlowPlayer][1] recently for a new project. What other alternatives are out there (Free OR Paid)? I'm interested in speed, usability, features, and customization capabilities.
Any help or further information is appreciated.
[1]: http://flowplayer.org/index.html | 0 | [
2,
551,
118,
19731,
4433,
1007,
60,
800,
3726,
3726,
31,
22,
195,
74,
699,
77,
14,
636,
9990,
14049,
500,
2558,
165,
500,
1989,
26,
21,
78,
669,
9,
98,
89,
2676,
18,
50,
70,
80,
13,
5,
4639,
54,
2192,
6,
60,
31,
22,
79,
31... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Do MembershipProviders in ASP.net MVC affect stylesheet links?
===
I changed the MembershipProvider in my ASP.net MVC website, and now the stylesheet for the login page isn't referenced correctly. Below is a copy of the forms tag in my web.config if that could be the reason. It looks identical though to the one generated by a new project with the exception of the name and timeout attribute.
<authentication mode="Forms">
<forms loginUrl="~/Account/Login" name=".ADAuthCookie" timeout="10" />
</authentication>
When I visit the page now, the link tag for the CSS looks like this:
<link href="../Content/Site.css" rel="stylesheet" type="text/css" />
When it *should* look like this:
<link href="../../Content/Site.css" rel="stylesheet" type="text/css" /> | 0 | [
2,
107,
4363,
26735,
1224,
19,
28,
306,
9,
2328,
307,
8990,
6245,
1034,
17627,
6271,
60,
800,
3726,
3726,
31,
1015,
14,
4363,
26735,
139,
19,
51,
28,
306,
9,
2328,
307,
8990,
2271,
15,
17,
130,
14,
1034,
17627,
26,
14,
6738,
108... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Moving existing code to Test Driven Development
===
Having recently discovered this method of development, I'm finding it a rather nice methodology. So, for my first project, I have a small DLL's worth of code (in C#.NET, for what it's worth), and I want to make a set of tests for this code, but I am a bit lost as to how and where to start.
I'm using NUnit, and VS 2008, any tips on what sort of classes to start with, what to write tests for, and any tips on generally how to go about moving code across to test based development would be greatly appreciated. | 0 | [
2,
1219,
3149,
1797,
20,
1289,
5355,
522,
800,
3726,
3726,
452,
1989,
1848,
48,
2109,
16,
522,
15,
31,
22,
79,
3007,
32,
21,
864,
2210,
18653,
9,
86,
15,
26,
51,
64,
669,
15,
31,
57,
21,
284,
13,
43,
211,
22,
18,
2715,
16,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Language agnostic skills
===
I am trying to diversify my programming knowledge. I learned Java in College and worked with it a little at work. Now I am working with ruby. I am finding that working with different languages can mean very big shifts in my mindset. I have probably spent more time changing my mind set then actually learning the new syntax. What I am wondering is what skills can I learn/develop that will make the transition to different languages easier?
- Please provide one skill and allow the community to vote which on is best. | 0 | [
2,
816,
21,
21944,
3207,
800,
3726,
3726,
31,
589,
749,
20,
16715,
8612,
51,
3143,
1918,
9,
31,
2691,
8247,
19,
314,
17,
577,
29,
32,
21,
265,
35,
170,
9,
130,
31,
589,
638,
29,
10811,
9,
31,
589,
3007,
30,
638,
29,
421,
255... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Detecting Graphic Options in .NET
===
What is the the best of detecting and later altering the screen resolution and multiple desktop within .net
I have a small app that while runs at work on my multiple monitor/high(ish) resolution however what I want to be able to detect is the users primary monitor and set the application to that (main objective) and adjust the resolution to ensure the application fits(more for my own curiosity) | 0 | [
2,
9092,
68,
8479,
6368,
19,
13,
9,
2328,
800,
3726,
3726,
98,
25,
14,
14,
246,
16,
9092,
68,
17,
138,
7835,
68,
14,
2324,
4302,
17,
1886,
17404,
363,
13,
9,
2328,
31,
57,
21,
284,
4865,
30,
133,
1461,
35,
170,
27,
51,
1886,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is the order of objects returned by FOREACH stable?
===
Is it safe to assume that two itterations over the same collection will return the objects in the same order? Obviously, it is assumed that the collection has not otherwise been changed. | 0 | [
2,
25,
14,
389,
16,
3916,
587,
34,
26,
14322,
4521,
60,
800,
3726,
3726,
25,
32,
1834,
20,
7158,
30,
81,
32,
815,
7504,
84,
14,
205,
1206,
129,
788,
14,
3916,
19,
14,
205,
389,
60,
4409,
15,
32,
25,
3632,
30,
14,
1206,
63,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do I limit which countries can view my website ( PHP )
===
In there an easy way to do this in PHP. I want to make sure that only web requests from certain countries are able to access my website.
Any ideas? | 0 | [
2,
184,
107,
31,
4496,
56,
1166,
92,
1418,
51,
2271,
13,
5,
13,
26120,
13,
6,
800,
3726,
3726,
19,
80,
40,
2010,
161,
20,
107,
48,
19,
13,
26120,
9,
31,
259,
20,
233,
562,
30,
104,
2741,
12279,
37,
1200,
1166,
50,
777,
20,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Does static array constness affect shared library layout?
===
Consider these two C++ header cases:
Case 1:
class Test {
public:
static int TEST_DATA[];
};
int Test::TEST_DATA[] = { 1, 2, 3, 4 };
Case 2:
class Test {
public:
static int const TEST_DATA[];
};
int const Test::TEST_DATA[] = { 1, 2, 3, 4 };
Is const in the latter case only for self-imposed compile-time checks or does it affect shared library layout on Mac/Linux/Windows? | 0 | [
2,
630,
12038,
7718,
11608,
38,
720,
6245,
2592,
1248,
9106,
60,
800,
3726,
3726,
3563,
158,
81,
272,
20512,
157,
106,
1871,
45,
610,
6352,
718,
1289,
13,
1,
317,
45,
12038,
19,
38,
1289,
1,
18768,
2558,
12660,
13,
1,
73,
19,
38... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Removing a subset of a dict from within a list
===
This is really only easy to explain with an example, so to remove the intersection of a list from within a dict I usually do something like this:
a = {1:'', 2:'', 3:'', 4:''}
exclusion = [3, 4, 5]
# have to build up a new list or the iteration breaks
toRemove = []
for var in a.iterkeys():
if var in exclusion:
toRemove.append(var)
for var in toRemove:
del a[var]
This might seem like an unusual example, but it's surprising the number of times I've had to do something like this. Doing this with sets would be much nicer, but I clearly want to retain the 'values' for the dict.
This method is annoying because it requires two loops and an extra array. Is there a cleaner and more efficient way of doing this. | 0 | [
2,
9096,
21,
16622,
16,
21,
13,
16315,
37,
363,
21,
968,
800,
3726,
3726,
48,
25,
510,
104,
2010,
20,
3271,
29,
40,
823,
15,
86,
20,
4681,
14,
5351,
16,
21,
968,
37,
363,
21,
13,
16315,
31,
951,
107,
301,
101,
48,
45,
21,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C# - IEnumerable to delimited string
===
What is the functional programming approach to convert an IEnumerable<string> to a delimited string? I know I can use a loop, but I'm trying to wrap my head around functional programming.
Here's my example:
var selectedValues =
from ListItem item in checkboxList.Items
where item.Selected
select item.Value;
var delimitedString = ??
...Or could I do this in just the first var assignment (append each result to the previous)?
| 0 | [
2,
272,
5910,
13,
8,
13,
660,
6336,
106,
579,
20,
121,
23012,
3724,
800,
3726,
3726,
98,
25,
14,
7652,
3143,
2141,
20,
8406,
40,
13,
660,
6336,
106,
579,
1,
11130,
1,
20,
21,
121,
23012,
3724,
60,
31,
143,
31,
92,
275,
21,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to properly use Struts ActionForms, Value Objects, and Entities?
===
I've inherited a large Java app that uses Struts, Spring, and Hibernate. The classes and interfaces I deal with daily are: Struts Actions, Struts ActionForms, Value Objects, Service Interfaces and Implementations, DAO Interfaces and Implementations, and Entities. I'm pretty clear on the how and why of most of these, except I'm unsure about the correct separation of responsibilities between the ActionForms, Value Objects, and Entities. I should also mention that the Domain Model (i.e. all of the entities) doesn't contain much (if any) real business logic. This is essentially a CRUD app and most of the real logic is in the database (yuck!). Anyway, there are several distinct Java related issues that I'm wondering about:
1) It seems there is not much difference between the Entities and the Value Objects (VOs), and a lot of code must be written to transform on into the other when they pass through the service layer in either direction (Struts Actions deal only with VOs, DAOs deal only with Entities). So, VOs and Entities seem somewhat redundant. Why have them both?
2) Where should the VO<->Entity translation code go? The service layer, the Entity, the VO?
3) VOs are placed directly into ActionForms and directly bound to tags in the JSP (e.g. <html:select/>). Is this a good practice? If not, what's the appropriate design?
4) It is unclear how to properly handle foreign key dependencies in the Value Objects. For example, certain VOs have a type field that, in database terms, represent a foreign key relationship into a type table. In the UI, this translates into a dropdown field that lets the user pick the type, OR a label that simply displays the textual representation of the type (depending on which screen it is). Now, should the VO have a property for the type ID, the textual representation of the type, or both? Who is responsible for translating between the two, and when?
5) The VOs have a field for their database ID. I thought VOs don't have identities? What's up with this?
I hope these questions are generic enough to be of general interest. It seems this would come up all the time in this type of architecture.
Also, I have the suspicion that this architecture is way to heavy for this app, and if you have suggestions about a better one, go ahead. But I'm mainly interested in the answer to the above questions since a different architecture is a long-term refactoring that I can't do right now. | 0 | [
2,
184,
20,
7428,
275,
18316,
18,
1028,
4190,
18,
15,
1923,
3916,
15,
17,
12549,
60,
800,
3726,
3726,
31,
22,
195,
7179,
21,
370,
8247,
4865,
30,
2027,
18316,
18,
15,
1573,
15,
17,
4148,
2102,
8820,
9,
14,
2684,
17,
6573,
18,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
asp.net frameworks and libraries every developer should know...and use
===
I'm still kinda new in ASP.NET and recently I found out about SubSonic, which I started to use. Now it seems funny and such a waste of time (and nerves) when I look back into times when I was developing without SubSonic and jQuery. And there probably are a lot of libraries and frameworks that speeds up development. Which ones do you use? | 0 | [
2,
28,
306,
9,
2328,
6596,
18,
17,
8649,
352,
10058,
378,
143,
9,
9,
9,
290,
275,
800,
3726,
3726,
31,
22,
79,
174,
21096,
78,
19,
28,
306,
9,
2328,
17,
1989,
31,
216,
70,
88,
972,
17766,
15,
56,
31,
373,
20,
275,
9,
130,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Avoiding code change with Microsoft SQLServer and Unicode
===
How can you get MSSQL server to accept Unicode data by default into a VARCHAR or NVARCHAR column?
I know that you can do it by placing a N in front of the string to be placed in the field but to by quite honest this seems a bit archaic in 2008 and particuarily with using SQL Server 2005. | 0 | [
2,
10298,
1797,
753,
29,
7099,
4444,
255,
10321,
106,
17,
28010,
800,
3726,
3726,
184,
92,
42,
164,
4235,
18,
22402,
8128,
20,
3440,
28010,
1054,
34,
12838,
77,
21,
4033,
5433,
54,
13,
103,
3311,
5433,
4698,
60,
31,
143,
30,
42,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Logic: Database or Application/2 (constraints check)
===
This is a specific versione of [this question][1].<br/>
I want to check if I am inserting a duplicate row. Should I check it programmatically in my application layer:
if (exists(obj))
{
throw new DuplicateObjectException();
}
HibernateSessionFactory.getSession().save(obj);
or should I catch the exception thrown by the database layer and triggered when I violate the contraint?
try
{
HibernateSessionFactory.getSession().save(obj);
}
catch(ConstraintViolationException e)
{
throw new DuplicateObjectException();
}
[1]: http://stackoverflow.com/questions/119540/business-logic-database-or-application-layer | 0 | [
2,
7085,
45,
6018,
54,
3010,
15718,
13,
5,
12124,
11809,
38,
18,
2631,
6,
800,
3726,
3726,
48,
25,
21,
1903,
615,
62,
16,
636,
1565,
1301,
500,
2558,
165,
500,
9,
1,
5145,
118,
1,
31,
259,
20,
2631,
100,
31,
589,
14692,
68,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to copy files from one code project to another
===
I have multiple branches of a project checked out, each under their own directory (pretty standard).
src/branch1/some/code/directories
src/branch2/some/code/directories
I often find myself wanting to copy selected files from one branch to another. An example would be copying cvsignore files, or intellij module files. The pseudocommand for what I'm trying to do is "copy all files under branch1 matching PATTERN to branch2, preserving the relative path of the copied file".
[This question][1] looks close to what I'm looking for, but I need an OS X/linux/unix solution.
[1]: http://stackoverflow.com/questions/96264/batch-file-to-copy-files-from-one-directory-to-another | 0 | [
2,
184,
20,
4344,
6488,
37,
53,
1797,
669,
20,
226,
800,
3726,
3726,
31,
57,
1886,
4395,
16,
21,
669,
6505,
70,
15,
206,
131,
66,
258,
16755,
13,
5,
21542,
1236,
6,
9,
13,
18,
5453,
118,
23014,
8197,
3220,
118,
9375,
118,
1019... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Java Tutorial
===
I am interested in learning Java. What is the best online tutorial? | 0 | [
2,
8247,
29724,
800,
3726,
3726,
31,
589,
3158,
19,
2477,
8247,
9,
98,
25,
14,
246,
2087,
29724,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
JPA and 2 simple tables
===
I have 2 tables:
A
s_id(key) name cli type
B
sa_id(key) s_id user pwd
So in Jpa
I have:
@Entity
class A...{
@OneToMany(fetch=FetchType.EAGER)
@JoinTable( name="A_B",
joinColumns={@JoinColumn(name="a_id", table="a",unique=false)},
inverseJoinColumns={@JoinColumn(name="b_id", table="b", unique=true)} )
Collection<B> getB(){...}
}
class b is just a basic entity class with no reference to A.
Hopefully that is clear. My question is: Do I really need a join table to do such a simple join? Can't this be done with a simple joincolumn or something? | 0 | [
2,
487,
1060,
17,
172,
1935,
7484,
800,
3726,
3726,
31,
57,
172,
7484,
45,
21,
13,
18,
1,
1340,
5,
4237,
6,
204,
19391,
1001,
334,
1929,
1,
1340,
5,
4237,
6,
13,
18,
1,
1340,
4155,
351,
14733,
86,
19,
487,
1060,
31,
57,
45,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What C/C++ tools can check for buffer overflows?
===
I've been asked to maintain a large C++ codebase full of memory leaks. While poking around, I found out that we have a lot of buffer overflows that lead to the leaks (how it got this bad, I don't ever want to know).
I've decided to removing the buffer overflows first. To make my bug-hunting easier, what tools can be used to check for buffer overruns? | 0 | [
2,
98,
272,
118,
150,
20512,
4672,
92,
2631,
26,
17497,
20285,
18,
60,
800,
3726,
3726,
31,
22,
195,
74,
411,
20,
4027,
21,
370,
272,
20512,
1797,
8436,
503,
16,
1912,
11724,
18,
9,
133,
24149,
140,
15,
31,
216,
70,
30,
95,
57... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PHP Module for reading torrent files
===
Is there a PHP module that you can use to programmatically read a torrent to find out information about it, Seeders for instance? | 0 | [
2,
13,
26120,
12613,
26,
1876,
23078,
6488,
800,
3726,
3726,
25,
80,
21,
13,
26120,
12613,
30,
42,
92,
275,
20,
625,
6732,
1326,
1302,
21,
23078,
20,
477,
70,
676,
88,
32,
15,
5134,
445,
26,
4851,
60,
3,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How to obtain the sign of a Number in ActionScript 3.0?
===
I have a variable of type Number, and i like to obtain the sign (if is '-' i like to have -1 and if '+' i like to have 1). So, i made this:
var sign = Math.abs(n) / n;
But, there is any other way? Better than this? | 0 | [
2,
184,
20,
5545,
14,
1676,
16,
21,
234,
19,
1028,
8741,
203,
9,
387,
60,
800,
3726,
3726,
31,
57,
21,
7612,
16,
1001,
234,
15,
17,
31,
101,
20,
5545,
14,
1676,
13,
5,
821,
25,
13,
22,
8,
22,
31,
101,
20,
57,
13,
8,
165,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Changing the application pool through a Web Deployment Project
===
Is there a way to configure a Visual Studio 2005 Web Deployment Project to install an application into a named Application Pool rather than the default app pool for a given web site? | 0 | [
2,
4226,
14,
3010,
3067,
120,
21,
2741,
10475,
669,
800,
3726,
3726,
25,
80,
21,
161,
20,
1065,
15951,
21,
3458,
1120,
812,
2741,
10475,
669,
20,
16146,
40,
3010,
77,
21,
377,
3010,
3067,
864,
119,
14,
12838,
4865,
3067,
26,
21,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
rsync ignoring --SUFFIX option
===
rsync -auve ssh --backup --suffix='2008-10-03-1514539' --backup-dir='/tmp/' module.pm root@web1:/path/to/module.pm
I run this command without the --backup-dir option and when it copies the file over, it creates a backup with a current timestamp. When I include the --backup-dir option, it makes the backup into the /tmp/ directory but never attaches my suffix.
There is nothing in the [manual][1] to suggest that you can't use both these options together. I've played around with the order also and nothing seems to fix it.
Does anyone have a solution to this?
[1]: http://samba.anu.edu.au/ftp/rsync/rsync.html | 0 | [
2,
761,
9507,
150,
9321,
13,
8,
8,
18,
5386,
4028,
4255,
800,
3726,
3726,
761,
9507,
150,
13,
8,
1346,
195,
13,
18,
1635,
13,
8,
8,
1958,
576,
13,
8,
8,
18,
5386,
4028,
3726,
22,
2753,
8,
1036,
8,
3601,
8,
1193,
12374,
3412,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best way to tell your perl's running on -e?
===
The question is not how to tell in a oneliner. If you're writing the code in a one-liner, *you know* you are. But how does a module, included by `-MMy::Module::Name` know that it all started from a oneliner.
This is mine. It's non-portable though (although, it can be made portable more or less.)
my $process_info = `ps $$`;
my $is_oneliner
= $process_info =~ m/\s+-[^\P{IsLower}e]*e[^\P{IsLower}e]*\s+/
; | 0 | [
2,
246,
161,
20,
494,
154,
416,
255,
22,
18,
946,
27,
13,
8,
62,
60,
800,
3726,
3726,
14,
1301,
25,
52,
184,
20,
494,
19,
21,
53,
14813,
9,
100,
42,
22,
99,
1174,
14,
1797,
19,
21,
53,
8,
14813,
15,
1637,
245,
143,
2483,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I wrap a transaction around Membership.CreateUser?
===
I'm using the asp.net SqlMembershipProvider and LinqToSql in a hobby/learning application. I have some user properties that I'm keeping in LinqtoSql, so my flow is:
Membership.CreateUser -> MyClass.AddUserDetails. I'd like to wrap the whole thing in a transaction, so if the myclass bit fails I can roll back the membership bit. Any suggestions on how to do so? | 0 | [
2,
184,
92,
31,
8118,
21,
12799,
140,
4363,
9,
6037,
1373,
16704,
60,
800,
3726,
3726,
31,
22,
79,
568,
14,
28,
306,
9,
2328,
4444,
255,
6990,
2418,
26735,
139,
17,
6294,
1251,
262,
18,
22402,
19,
21,
18229,
118,
26001,
3010,
9,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.