unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Andybody know why SQL Server 2005 throws "'SQLOLEDB' failed with no error message available, result code: E_FAIL(0x80004005). "?
===
We've got a web system running SQL Server 2005 for the back end, and ASP.Net for the front end (using .net 2.0).
Every now and then, the system barfs out the error in the title: 'SQLOLEDB' failed with no error message available, result code: E_FAIL(0x80004005).
The web system runs just fine 24/7, and then every now and then will toss this out on a select or some such. I've tried re-running the exact select that throws the error, but (of course) it works fine when I do it. And, to answer the obvious follow-up question, no we haven't done any code changes or upgrades to speak of lately.
Has anyone ever run into this before? Nosing around on google seems to only turn up situations where Access has some kind of file issue (permissions, missing data file, etc.) | 0 | [
2,
17,
93,
9760,
143,
483,
4444,
255,
8128,
812,
13566,
13,
7,
22,
18,
22402,
6069,
9007,
22,
1702,
29,
90,
7019,
2802,
904,
15,
829,
1797,
45,
13,
62,
1,
24910,
5,
387,
396,
28064,
7114,
264,
6,
9,
13,
7,
60,
800,
3726,
372... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 of doing an SVn checkout/update on a web hosting package
===
I want to deploy my site on my web hosting package by doing a checkout through subversion. I do not have SSH access to my hosting package, which is just a basic LAMP web hosting package, but I do know that there is an SVN client installed on the web server.
I was thinking of writing some sort of script (PHP or Shell) that can do different functions. Like a checkout, update, switch to another tag etc. and that I can call externally in some sort of fashion.
Any input on best practices, things to look out for and how to go about this is very much appreciated.
| 0 | [
2,
246,
161,
16,
845,
40,
13,
18,
16578,
2631,
1320,
118,
576,
8209,
27,
21,
2741,
10637,
6030,
800,
3726,
3726,
31,
259,
20,
17617,
51,
689,
27,
51,
2741,
10637,
6030,
34,
845,
21,
2631,
1320,
120,
972,
10898,
9,
31,
107,
52,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Saving the time the user is logged on.
===
In the application I am developing I have to store the time some particular users remain logged into the application, unfortunately, in web applications there are several ways the user can log off.
1.- User clicks log off.
2.- User session expires.
3.- User closes the window.
4.- User types another site url in the address bar.
The first one is quite easy because the application gets control of the logging off process. But in the other ones it gets tricky.
What would you do to solve this problem? | 0 | [
2,
7599,
14,
85,
14,
4155,
25,
13,
19287,
27,
9,
800,
3726,
3726,
19,
14,
3010,
31,
589,
3561,
31,
57,
20,
1718,
14,
85,
109,
1498,
3878,
2166,
13,
19287,
77,
14,
3010,
15,
6200,
15,
19,
2741,
3767,
80,
50,
238,
2847,
14,
41... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 overcome the "error C2100: illegal indirection" when accessing the contents of a void* in VS2008
===
I have a C application that I've created in VS2008. I am creating a mock creation function that overrides function references in a struct. However if I try and do this in a straight forward fashion with something like:
void *ptr = &(*env)->GetVersion;
*ptr = <address of new function>
then I get a "error C2100: illegal indirection" error as *ptr, when ptr is a void * seems to be a banned construct. I can get around it by using a int/long pointer as well, mapping that to the same address and modifying the contents of the long pointer:
*structOffsetPointer = &(*env)->GetVersion;
functionPointer = thisGetVersion;
structOffsetPointerAsLong = (long *)structOffsetPointer;
*structOffsetPointerAsLong = (long)functionPointer;
but I am concerned that using long or int pointers will cause problems if I switch between 32 and 64 bit environments.
So is there are easy way to disable this error? Assuming not, is either int or long 64 bits under win64? | 0 | [
2,
184,
92,
31,
9059,
14,
13,
7,
29992,
272,
135,
4031,
45,
5143,
17132,
872,
7,
76,
1381,
68,
14,
8478,
16,
21,
11364,
2483,
19,
4611,
2753,
800,
3726,
3726,
31,
57,
21,
272,
3010,
30,
31,
22,
195,
679,
19,
4611,
2753,
9,
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... |
How to run a program in 32-bit mode on Vista 64?
===
I am building an app that talks to an Access database via OleDB/Jet. There is only a 32-bit Jet provider, no 64-bit provider, so the app needs to be running in 32-bit mode. My dev box is Vista 64, so I set the project to build for x86 instead of any cpu. That gets my app running and talking to the database.
But now I want to run some unit tests with Gallio Icarus, which is built for any cpu and is strongly signed (meaning using CorFlags.exe (in the SDK) to force-switch to 32-bit only
will cause the assembly not to run until it's been re-signed).
Is there some way to run Gallio Icarus in 32-bit mode so I can load these unit tests?
| 0 | [
2,
184,
20,
485,
21,
625,
19,
2512,
8,
3326,
3740,
27,
13520,
4384,
60,
800,
3726,
3726,
31,
589,
353,
40,
4865,
30,
7837,
20,
40,
1381,
6018,
1197,
12116,
9007,
118,
10307,
9,
80,
25,
104,
21,
2512,
8,
3326,
4797,
11747,
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... |
XMLSocket working in firefox but not IE
===
I'm helping a customer who has a problem with a flash app. The flash app uses an XMLSocket to connect to a service running on localhost. It works fine under firefox.
It uses the following line to setup the security policy:
System.security.loadPolicyFile("xmlsocket://localhost:10032");
Running the flash app under firefox, the service listening on port 10032 gets a connection with a <policy-file-request/>, responds to it, and it works well. Under IE, the service never gets the <policy-file-request/> connection and the subsequent socket connection do not work.
Thanks for any ideas!
| 0 | [
2,
23504,
18,
5668,
1198,
638,
19,
535,
18219,
47,
52,
13,
660,
800,
3726,
3726,
31,
22,
79,
3713,
21,
7705,
72,
63,
21,
1448,
29,
21,
4433,
4865,
9,
14,
4433,
4865,
2027,
40,
23504,
18,
5668,
1198,
20,
6379,
20,
21,
365,
946,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 CSS Framework and are they worth the effort?
===
Reading on another forum I've came across the world of CSS Frameworks. The one I've been specifically looking at is [BluePrint][1]. I was wondering if anyone else had come across CSS frameworks, make a suggestion on which is the best and if they are worth the effort?
[1]: http://www.blueprintcss.org/ | 0 | [
2,
98,
25,
14,
246,
272,
18,
18,
6596,
17,
50,
59,
2715,
14,
2150,
60,
800,
3726,
3726,
1876,
27,
226,
5691,
31,
22,
195,
281,
464,
14,
126,
16,
272,
18,
18,
6596,
18,
9,
14,
53,
31,
22,
195,
74,
3524,
699,
35,
25,
636,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 "glass box" testing when it leads to *fewer* tests?
===
For example, I'm writing tests against a CsvReader. It's a simple class that enumerates and splits rows of text. Its only _raison d'être_ is ignoring commas within quotes. It's less than a page.
By "black box" testing the class, I've checked things like
- What if the file doesn't exist?
- What if I don't have permission on the file?
- What if the file has non-Windows line-breaks?
But in fact, all of these things are the StreamReader's business. My class works without doing anything about these cases. So in essence, my tests are catching errors thrown by StreamReader, and testing behavior handled by the framework. It feels like a lot of work for nothing.
I've seen the related questions
- [Should QA test from a strictly black-box perspective?](http://stackoverflow.com/questions/164170/should-qa-test-from-a-strictly-black-box-perspective)
- [Rigor in capturing test cases for unit testing](http://stackoverflow.com/questions/12569/rigor-in-capturing-test-cases-for-unit-testing)
My question is, am I missing the point of "glass box" testing if I use what I know to _avoid_ this kind of work? | 0 | [
2,
378,
31,
275,
13,
7,
11539,
1649,
7,
4431,
76,
32,
4259,
20,
1637,
3739,
4662,
2483,
4894,
60,
800,
3726,
3726,
26,
823,
15,
31,
22,
79,
1174,
4894,
149,
21,
272,
18,
710,
10647,
106,
9,
32,
22,
18,
21,
1935,
718,
30,
269... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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# for 64bits OS?
===
How can I make my compilation optimized for Windows 64 bits?
| 0 | [
2,
272,
5910,
26,
4384,
3326,
18,
13,
759,
60,
800,
3726,
3726,
184,
92,
31,
233,
51,
4868,
22864,
43,
26,
1936,
4384,
10181,
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... | [
1,
1,
1,
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,
0,
0... |
How to get current datetime on windows command line, in a suitable format for using in a filename?
===
What's a windows command line statement(s) I can use to get the current datetime in a format that I can put into a filename?
I want to have a .bat file that zips up a directory into an archive with the current date & time as part of the name, eg "Code_2008-10-14_2257.zip". Is there any easy way I can do this, independent of the regional settings of the machine? I don't really mind about the date format, ideally it'd be yyyy-mm-dd but anything simple is fine.
So far I've got this, which on my machine gives me "Tue_10_14_2008_230050_91"
rem Get the datetime in a format that can go in a filename.
set _my_datetime=%date%_%time%
set _my_datetime=%_my_datetime: =_%
set _my_datetime=%_my_datetime::=%
set _my_datetime=%_my_datetime:/=_%
set _my_datetime=%_my_datetime:.=_%
rem now use the timestamp by in a new zip file name
"d:\Program Files\7-Zip\7z.exe" a -r Code_%_RM_datetime%.zip Code
I can live with this but it seems a bit clunky. Ideally it'd be briefer and have the format mentioned earlier.
I'm using Windows Server 2003 and Win XP Pro. I don't want to install additional utilities to achieve this (although I realise there are some that will do nice date formatting). | 0 | [
2,
184,
20,
164,
866,
1231,
891,
27,
1936,
1202,
293,
15,
19,
21,
6445,
2595,
26,
568,
19,
21,
3893,
7259,
60,
800,
3726,
3726,
98,
22,
18,
21,
1936,
1202,
293,
3331,
5,
18,
6,
31,
92,
275,
20,
164,
14,
866,
1231,
891,
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... |
Interop Controls not picking up XP Styles
===
I created an Interop user control in VS2005. When the user control is shown inside VB6, it does not pickup/use the XP styles (The buttons and the tabs look like VB6 buttons/tabs).
How do I get the XP styles to work with my control while it is in VB6? | 0 | [
2,
1480,
2594,
8671,
52,
7833,
71,
23045,
6443,
800,
3726,
3726,
31,
679,
40,
1480,
2594,
4155,
569,
19,
4611,
2835,
9,
76,
14,
4155,
569,
25,
1721,
572,
13,
20468,
379,
15,
32,
630,
52,
15181,
118,
3699,
14,
23045,
6443,
13,
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... |
Use javascript to inject script references as needed?
===
I have a JS function that may occasionally get used on some pages. It is dependent on another JS file (swfObject.js), but I'd like to avoid having to include this file all over the place, as thats a wasted request most of the time.
Instead, I'd like to create a generic function that can inject a script reference into the page DOM as needed, so if this function is called, it would check for the script, and if it does not exist, load it in.
I'm fairly sure this is possible (and I'm not going to use document.write), but before I venture off into uncharted territory, has anyone done this before, and if so, any pointers?
| 0 | [
2,
275,
8247,
8741,
20,
20316,
3884,
7231,
28,
851,
60,
800,
3726,
3726,
31,
57,
21,
487,
18,
1990,
30,
123,
4533,
164,
147,
27,
109,
4434,
9,
32,
25,
9063,
27,
226,
487,
18,
3893,
13,
5,
18,
15263,
23793,
9,
728,
18,
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... |
Week() function in sql script.
===
I am using sql server 2005. I just want to know is there something we can get the week number for the particular month. Example Date = '2008-10-16' Is there something we can have SELECT WEEK(Date). Or any better suggestion. | 0 | [
2,
877,
5,
6,
1990,
19,
4444,
255,
3884,
9,
800,
3726,
3726,
31,
589,
568,
4444,
255,
8128,
812,
9,
31,
114,
259,
20,
143,
25,
80,
301,
95,
92,
164,
14,
877,
234,
26,
14,
1498,
1617,
9,
823,
1231,
800,
13,
22,
2753,
8,
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... |
How does the C++ compiler know which implementation of a virtual function to call?
===
Here is an example of polymorphism from <http://www.cplusplus.com/doc/tutorial/polymorphism.html> (edited for readability):
// abstract base class
#include <iostream>
using namespace std;
class Polygon {
protected:
int width;
int height;
public:
void set_values(int a, int b) { width = a; height = b; }
virtual int area(void) =0;
};
class Rectangle: public Polygon {
public:
int area(void) { return width * height; }
};
class Triangle: public Polygon {
public:
int area(void) { return width * height / 2; }
};
int main () {
Rectangle rect;
Triangle trgl;
Polygon * ppoly1 = ▭
Polygon * ppoly2 = &trgl;
ppoly1->set_values (4,5);
ppoly2->set_values (4,5);
cout << ppoly1->area() << endl; // outputs 20
cout << ppoly2->area() << endl; // outputs 10
return 0;
}
My question is how does the compiler know that ppoly1 is a Rectangle and that ppoly2 is a Triangle, so that it can call the correct area() function? It could find that out by looking at the "Polygon * ppoly1 = ▭" line and knowing that rect is a Rectangle, but that wouldn't work in all cases, would it? What if you did something like this?
cout << ((Polygon *)0x12345678)->area() << endl;
Assuming that you're allowed to access that random area of memory.
I would test this out but I can't on the computer I'm on at the moment.
(I hope I'm not missing something obvious...) | 0 | [
2,
184,
630,
14,
272,
20512,
21486,
143,
56,
6123,
16,
21,
6599,
1990,
20,
645,
60,
800,
3726,
3726,
235,
25,
40,
823,
16,
3446,
13348,
37,
13,
1,
21127,
6903,
6483,
9,
150,
13349,
13349,
9,
960,
118,
13799,
118,
2473,
9819,
192... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 convert between Socket and TcpClient objects?
===
Here's another C#/.NET question based merely on curiousity more than an immediate *need* ...
If you had a `Socket` instance and you wanted to wrap it in the higher-level `TcpClient` class, is that possible and how would you do it?
Conversely if you have an instance of `TcpClient`, is it possible to get the underlying `Socket`? | 0 | [
2,
25,
32,
938,
20,
8406,
128,
18482,
17,
13,
6668,
5779,
18513,
38,
3916,
60,
800,
3726,
3726,
235,
22,
18,
226,
272,
5910,
118,
9,
2328,
1301,
432,
5494,
27,
7686,
856,
91,
119,
40,
5231,
1637,
556,
69,
2483,
13,
9,
9,
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... |
Prevent series from using clWhite with Delphi TChart
===
I have a report that uses a TChart that I am maintaining. One of the TLineSeries that gets added automatically gets assigned the color clWhite, which is too close to the background (clBtnFace).
If I change it, then the next series that gets added takes clWhite. So short of going back and changing it after all the other series are created, is there some way to tell the TChart that I don't want any of my series to be clWhite? | 0 | [
2,
2501,
231,
37,
568,
10842,
5051,
29,
23030,
13,
9744,
2900,
800,
3726,
3726,
31,
57,
21,
1330,
30,
2027,
21,
13,
9744,
2900,
30,
31,
589,
8215,
9,
53,
16,
14,
13,
38,
1143,
8231,
30,
3049,
905,
7499,
3049,
2467,
14,
1665,
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... |
How to get around a 'NS_ERROR_ILLEGAL_VALUE' error using Ajax?
===
Im just writing a small Ajax framework for re-usability in small projects and i've hit a problem. Basically i get a '`NS_ERROR_ILLEGAL_VALUE`' error while sending the request and i've no idea what is happening.
The HTML Page
(trimmed but shows the error)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Ajax Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
var COMPLETE = 4;
var OK = 200;
function GetXMLHttpRequestObject()
{
var XMLHttpRequestObject = false;
if(window.XMLHttpRequest)
{
if(typeof XMLHttpRequest != 'undefined')
{
try
{
XMLHttpRequestObject = new XMLHttpRequest();
}
catch (e)
{
XMLHttpRequestObject = false;
}
}
}
else if (window.ActiveXObject)
{
try
{
XMLHttpRequestObject = new ActiveXObject('Msxml2.XMLHTTP');
}
catch (e)
{
try
{
XMLHttpRequestObject = new ActiveXObject('Microsoft.XMLHTTP');
}
catch (e)
{
XMLHttpRequestObject = false;
}
}
}
else
{
XMLHttpRequestObject = false;
}
return XMLHttpRequestObject;
}
//The Main Ajax Object
function AjaxRequest(p_RequestMethod, p_DestinationURL)
{
this.XMLHttpRequestObject = GetXMLHttpRequestObject();
this.RequestedMethod = p_RequestMethod;
this.DestinationURL = p_DestinationURL;
this.XMLHttpRequestObject.open(this.RequestMethod, this.DestinationURL);
this.OnStateChange = function(Callback)
{
this.XMLHttpRequestObject.onreadystatechange = Callback;
}
this.Send = function(p_Content)
{
this.XMLHttpRequestObject.send(p_Content);
}
this.GetState()
{
return this.XMLHttpRequestObject.readyState;
}
this.GetResponseText = function()
{
return this.XMLHttpRequestObject.responseText;
}
this.GetResponseStatus = function()
{
return this.XMLHttpRequestObject.status;
}
this.GetResponseStatusText = function()
{
return this.XMLHttpRequestObject.statusText;
}
}
var Request;
function GetData()
{
Request = new AjaxRequest('POST', 'http://www.kalekold.net/ajax/Ajax.php');
Request.OnStateChange = StateChange;
Request.Send();
}
function StateChange()
{
window.alert("State: " + Request.GetState());
window.alert("Response: " + Request.GetResponseStatus());
window.alert("Response Text: " + Request.GetResponseStatusText());
if(Request.GetState() == COMPLETE && Request.GetResponseStatus() == OK)
{
Result = Request.GetResponseText();
window.alert(Result);
}
}
</script>
</head>
<body>
<form>
<textarea name="TextArea" rows="10" cols="80"></textarea><br />
<input type="button" value="Load" onClick="GetData();">
</form>
</body>
</html>
The PHP File:
<?php
$XML = <<< PROLOG
<?xml version="1.0" encoding="iso-8859-1"?>
PROLOG;
$XML .= "<results>";
$XML .= "<result>";
$XML .= "<FirstName>Gary</FirstName>";
$XML .= "<SecondName>Willoughby</SecondName>";
$XML .= "<Age>35</Age>";
$XML .= "</result>";
$XML .= "<result>";
$XML .= "<FirstName>Sara</FirstName>";
$XML .= "<SecondName>Gostick</SecondName>";
$XML .= "<Age>35</Age>";
$XML .= "</result>";
$XML .= "</results>";
header("Content-Type: text/xml");
echo $XML;
?>
The full error:
uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: http://www.kalekold.net/ajax/ :: AjaxRequest :: line 63" data: no]
Line 0
I just can't see where it's going wrong, any ideas? | 0 | [
2,
184,
20,
164,
140,
21,
13,
22,
2172,
1,
29992,
1,
5564,
4941,
1,
15165,
22,
7019,
568,
20624,
60,
800,
3726,
3726,
797,
114,
1174,
21,
284,
20624,
6596,
26,
302,
8,
267,
4091,
19,
284,
2314,
17,
31,
22,
195,
770,
21,
1448,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Bookmarklet link in Markdown document
===
How can I include a bookmarklet in a Markdown parsed document? Is there any "tag" for markdown that basically says "don't parse this"??
For example you could have something like:
<a href="javascript:function my_bookmarklet()
{alert('Hello World');}
my_bookmarklet();">Hello</a>
But if I try to past the javascript from that into a link in markdown like this:
[Hello World!](javascript:function my_bookmarklet(){alert('Hello World');}my_bookmarklet();)
You get a messed up link, like below.
[Hello World!](javascript:function my_bookmarklet(){alert('Hello World');}my_bookmarklet();)
Is there anyway around this?
And no, I'm not trying to put malicious bookmarklets in SO or anything, but I want to use markdown for my site and would like to post some bookmarklets I wrote.
Any ideas?
| 0 | [
2,
360,
4527,
1336,
3508,
19,
943,
2968,
4492,
800,
3726,
3726,
184,
92,
31,
468,
21,
360,
4527,
1336,
19,
21,
943,
2968,
2017,
18,
69,
4492,
60,
25,
80,
186,
13,
7,
8628,
7,
26,
943,
2968,
30,
11374,
898,
13,
7,
804,
22,
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... |
How to get doxygen to run faster?
===
Doxygen is a bit slow - it takes about a couple of minutes to process my whole project, so for small incremental changes this is longer than actually building the rest of my code. There are thousands of files without any documentation so I guess it is spending most of its time processing them. Is there any way to get it to skip files without any documentation?
What about getting it to only process changed files? | 0 | [
2,
184,
20,
164,
107,
15161,
1863,
20,
485,
4233,
60,
800,
3726,
3726,
107,
15161,
1863,
25,
21,
1142,
2276,
13,
8,
32,
1384,
88,
21,
1335,
16,
902,
20,
953,
51,
979,
669,
15,
86,
26,
284,
29977,
1693,
48,
25,
1045,
119,
1121,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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's a good Java API for creating Word documents?
===
I have a new app I'll be working on where I have to generate a Word document that contains tables, graphs, a table of contents and text. What's a good API to use for this? How sure are you that it supports graphs, ToCs, and tables? What are some hidden gotcha's in using them?
Some clarifications:
- I can't output a PDF, they want a Word doc.
- They're using MS Word 2003 (or 2007), not OpenOffice
It'd be nice if I could start with a template doc and just fill in some spaces with tables, graphs, etc.
Thanks for the help. | 4 | [
2,
98,
22,
18,
21,
254,
8247,
21,
2159,
26,
2936,
833,
4374,
60,
800,
3726,
3726,
31,
57,
21,
78,
4865,
31,
22,
211,
44,
638,
27,
113,
31,
57,
20,
7920,
21,
833,
4492,
30,
1588,
7484,
15,
7210,
18,
15,
21,
859,
16,
8478,
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... |
compiling only part of the source tree with ant
===
Say I have my sources in my src/ tree (and possibly in my test/ tree). Say I would like to compile only *part* of that tree. The reasons why I might want to do that are various. Just as an example, I might want to create the smallest possible jar (without including certain classes), or I might want the fastest compile time for what I am compiling. I absolutely want to compile all the dependencies, though!
This can be easily achieved from the command line with:
javac -d build/ -cp whatever -sourcepath src src/path/to/MyClass.java
Now, how can you do that with ant? The javac ant [task compiles everything][1]:
> The source and destination directory
> will be recursively scanned for Java
> source files to compile.
One can use the `excludes` and `includes` parameters, but they are problematic for this purpose. In fact, it seems that one has to explicitly setup all the `includes` (not automatic dependency lookup), and **even worst** that [excludes has priority on includes][2]:
> When both inclusion and exclusion are
> used, only files/directories that
> match at least one of the include
> patterns and don't match *any* of the
> exclude patterns are used.
Thus, you cannot use
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="classpath"
excludes="**/*.java" includes="src/path/to/MyClass.java" />
Because it will not compile anything :-(
Is there any way of achieving that simple command line `javac` with ant?
[1]: http://ant.apache.org/manual/CoreTasks/javac.html
[2]: http://ant.apache.org/manual/dirtasks.html#patternset | 0 | [
2,
24378,
104,
141,
16,
14,
1267,
1541,
29,
40,
38,
800,
3726,
3726,
395,
31,
57,
51,
2662,
19,
51,
13,
18,
5453,
118,
1541,
13,
5,
290,
2879,
19,
51,
1289,
118,
1541,
6,
9,
395,
31,
83,
101,
20,
26561,
104,
1637,
3091,
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... |
School Management Software (NOT Content Management System)
===
I'm looking for management software for schools, that provides management for courses, students, registrations, classes, etc. Can any one name some free ones? I prefer Java/(j)Ruby but any good stuff will do. I'm not sure a CMS will fit my needs, since I will need some custom stuff like notifications and emitting grades/classifications. | 0 | [
2,
116,
1097,
2306,
13,
5,
1270,
2331,
1097,
329,
6,
800,
3726,
3726,
31,
22,
79,
699,
26,
1097,
2306,
26,
1055,
15,
30,
1927,
1097,
26,
4392,
15,
573,
15,
8587,
18,
15,
2684,
15,
2722,
9,
92,
186,
53,
204,
109,
551,
53,
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... |
Integrating "really simple history" with Rails
===
In trying to solve the "ajax back button" problem I have found the [Really Simply History][1] library.
Has anyone tried to integrate it with Rails?
It's plain old javascript so it seems like it should integrate just fine, but I know next to nothing about JS itself, so I'm not too confident in trying to do the integration without a tutorial or something.
[1]: http://code.google.com/p/reallysimplehistory/ | 0 | [
2,
24529,
13,
7,
15257,
1935,
447,
7,
29,
2240,
18,
800,
3726,
3726,
19,
749,
20,
8402,
14,
13,
7,
6881,
7522,
97,
5167,
7,
1448,
31,
57,
216,
14,
636,
15257,
1659,
447,
500,
2558,
165,
500,
1248,
9,
63,
1276,
794,
20,
18399,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 image gallery engines
===
I want to create a website for my (amateur) photography. Flickr is the simplest option, but for various reasons I would like to host this separately. What I'm after is a slick gallery engine, ideally satisfying:
- Open source so I can customise as much as possible
- Could be a plugin for a framework/blog engine such as Wordpress (happy either way).
- Good back-end for uploading and annotating photos
- Also nice-to have: Arrow keys can be set up to cycle through images - Facebook style
Any suggestions? Hopefully we can build a good list here over time. | 0 | [
2,
246,
1961,
2246,
4016,
800,
3726,
3726,
31,
259,
20,
1600,
21,
2271,
26,
51,
13,
5,
3812,
20130,
6,
4691,
9,
12407,
139,
25,
14,
24384,
4255,
15,
47,
26,
617,
2932,
31,
83,
101,
20,
2015,
48,
10714,
9,
98,
31,
22,
79,
75,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 a named function as the callback for $.getJSON in jQuery to satisfy Facebook request signing demands
===
I'm trying to access the Facebook API Admin.getMetrics method via jQuery. I'm correctly composing the request url on the server side (in order to keep my app secret secret). I'm then sending the url over to the browser to be request using `jQuey.getJSON()`.
Facebook requires that I send a copy of all of my request params hashed with my application secret along with the request in order to verify my authenticity. The problem is that jQuery wants to generate the name of the callback function itself in order to match the name it gives to the anonymous function you pass in to be called when the data returns. Therefore, the name of the function is not available until `jQuery.getJSON()` executes and Facebook considers my request to be inauthentic due to a mismatched signature (the signature I send along does not include the correct callback param because that was not generated until `jQuery.getJSON()` ran).
The only way I can think of out of this problem is to somehow specify the name of my function to `jQuery.getJSON()` instead of allowing it to remain anonymous. But I cannot find any option for doing so in the jQuery AP.
| 0 | [
2,
568,
21,
377,
1990,
28,
14,
645,
1958,
26,
5579,
9,
3060,
728,
528,
19,
487,
8190,
93,
20,
14711,
9090,
3772,
5479,
7311,
800,
3726,
3726,
31,
22,
79,
749,
20,
1381,
14,
9090,
21,
2159,
21,
43,
2160,
9,
3060,
15321,
18,
210... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 detect VC++ 2008 redistributable?
===
Is there a Registry setting that I can look for to determine whether or not the Visual C++ redistributable is installed, whether standalone or as part of Visual Studio 2008? I know that I could launch the VC++ 2008 redistributable installer and let it handle the detection, but it would look cleaner if I can check for it and not bother launching the installer if the redistributable is already on the system.
It's no biggie if there is no setting to search for, as this is just for the preliminary installers that we have for the new version of our software. We won't need it for the new Windows Installer-based installers that we are working on that will replace the old tech ones and will use the merge modules. | 0 | [
2,
184,
20,
9092,
13,
8990,
20512,
570,
402,
403,
13202,
5924,
60,
800,
3726,
3726,
25,
80,
21,
18269,
2697,
30,
31,
92,
361,
26,
20,
3746,
1472,
54,
52,
14,
3458,
272,
20512,
402,
403,
13202,
5924,
25,
4066,
15,
1472,
26986,
54... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
JQuery: Event binding on dynamically created elements?
===
Thanks for reading.
I have a bit of code where I am looping though all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouseon/off.
This happens on page ready, and works just fine.
The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.
I have found this plugin (JQuery Live Query Plugin: [http://brandonaaron.net/docs/livequery/#getting-started][1] ), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with JQuery directly or by another option.
I can provide a code example if anyone needs it...
Thanks!
[1]: http://brandonaaron.net/docs/livequery/#getting-started | 0 | [
2,
487,
8190,
93,
45,
807,
8728,
27,
7782,
1326,
679,
2065,
60,
800,
3726,
3726,
3669,
26,
1876,
9,
31,
57,
21,
1142,
16,
1797,
113,
31,
589,
5293,
68,
362,
65,
14,
5407,
8120,
27,
21,
2478,
17,
8728,
21,
13,
9,
252,
2549,
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... |
Is it possible to get Message Box in web forms.
===
I tried but I guess Message Box only work with win forms. What is the best alternative to use in webforms. | 0 | [
2,
25,
32,
938,
20,
164,
2802,
1649,
19,
2741,
1997,
9,
800,
3726,
3726,
31,
794,
47,
31,
2321,
2802,
1649,
104,
170,
29,
628,
1997,
9,
98,
25,
14,
246,
2676,
20,
275,
19,
2741,
4190,
18,
9,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Undo changes to MSSQL 2005 database
===
I've ran some "ALTER" scripts on the database [MSSQL Server 2005], and overwrote some sprocs. Is there any way to undo changes and get my old sprocs back?
Is there a way to get the scripts that were executed out of the .LDf file? That way i can re-run my initial "create" script for my sprocs.
I don't have a backup file with old sprocs. | 0 | [
2,
367,
537,
1693,
20,
4235,
18,
22402,
812,
6018,
800,
3726,
3726,
31,
22,
195,
717,
109,
13,
7,
16201,
7,
17505,
27,
14,
6018,
636,
79,
18,
18,
22402,
8128,
812,
500,
15,
17,
84,
12331,
109,
13,
18,
15617,
18,
9,
25,
80,
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... |
CSS Browser Support Chart
===
Is there any resource that provides a chart of CSS properties and their support through most browser/OS combinations? For example, if I want to know what browser supports `overflow` or `min-height` and any quirks to be aware of in the implementation of these properties and their values, what is the best place to get all this?
I have found a couple places but I haven't been impressed.
Any suggestions? | 0 | [
2,
272,
18,
18,
16495,
555,
1795,
800,
3726,
3726,
25,
80,
186,
6577,
30,
1927,
21,
1795,
16,
272,
18,
18,
3704,
17,
66,
555,
120,
127,
16495,
118,
759,
17908,
60,
26,
823,
15,
100,
31,
259,
20,
143,
98,
16495,
6747,
13,
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... |
Preventing the Circumvention of Copy Protection
===
Anyone visiting a torrent tracker is sure to find droves of "cracked" programs ranging from simple shareware to software suites costing thousands of dollars. It seems that as long as the program does not rely on a remote service for its usage (i.e., an MMORPG) that any built-in copy protection or user authentication is useless.
Is it effectively not possible to prevent a cracker from circumventing the copy protection of your (my) product? Why? | 0 | [
2,
11520,
14,
28986,
872,
16,
4344,
2057,
800,
3726,
3726,
1276,
4803,
21,
23078,
792,
106,
25,
562,
20,
477,
3664,
18,
16,
13,
7,
150,
13135,
69,
7,
1726,
7657,
37,
1935,
1891,
5011,
20,
2306,
6160,
18,
1516,
68,
3805,
16,
5415... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 keep a console open until CancelKeyPress event is fired?
===
What is the best way to keep a console application open as long as the CancelKeyPress event has not been fired?
I would prefer to not use Console.Read or Console.ReadLine as I do not want to accept input. I just want to enable the underlying application to print to the console event details as they are fired. Then once the CancelKeyPress event is fired I want to gracefully shut down the application. | 0 | [
2,
184,
92,
31,
643,
21,
8650,
368,
163,
14815,
4237,
5890,
807,
25,
3899,
60,
800,
3726,
3726,
98,
25,
14,
246,
161,
20,
643,
21,
8650,
3010,
368,
28,
175,
28,
14,
14815,
4237,
5890,
807,
63,
52,
74,
3899,
60,
31,
83,
6369,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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's the best audio compression library for .NET?
===
I'm looking for a good audio compression library for .NET. Anything using MP3 is out (because of the licensing issue). Basically I just need to be able to compress regular WAV audio data into some format, and decompress back to WAV. Preferably the code would be all .NET (C# or VB.NET), but I don't think this is likely. It should either be lossless or relatively lossless (as good as 192 MP3s, preferably), with a compression ratio at least as good as 4:1. I'd prefer a buffer-based API, but a file-based API is OK too.
Does anyone know of anything like this? | 0 | [
2,
98,
22,
18,
14,
246,
4023,
14864,
1248,
26,
13,
9,
2328,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
254,
4023,
14864,
1248,
26,
13,
9,
2328,
9,
602,
568,
4628,
240,
25,
70,
13,
5,
4451,
16,
14,
15038,
1513,
6,
9,
113... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 a list of installed True Type Fonts on Linux using C or C++?
===
How can my app get a list of the True Type Fonts that are available on Linux.
Is there a standard directory where they are stored across different distributions? Or some other standard way to locate them?
| 0 | [
2,
184,
20,
164,
21,
968,
16,
4066,
1151,
1001,
9978,
18,
27,
13024,
568,
272,
54,
272,
20512,
60,
800,
3726,
3726,
184,
92,
51,
4865,
164,
21,
968,
16,
14,
1151,
1001,
9978,
18,
30,
50,
904,
27,
13024,
9,
25,
80,
21,
1236,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
CSS Performance
===
Usually when I build a site, I put all the CSS into one file, and all the properties that relate to a set of elements are defined at once. Like this:
#myElement {
color: #fff;
background-color: #000;
padding: 10px;
border: 1px solid #ccc;
font-size: 14pt;
}
.myClass {
font-size: 12pt;
padding: 5px;
color: #ee3;
}
I've been considering splitting up my definitions into a number of different files (colours.css, layout.css, fonts.css ...) as I have seen recommended. Something like this:
/* colours.css */
#myElement {
color: #fff;
background-color: #000;
border-color: #ccc;
}
.myClass {
color: #ee3;
}
/* layout.css */
#myElement {
padding: 10px;
border: 1px solid;
}
.myClass {
padding: 5px;
}
/* fonts.css */
#myElement {
font-size: 14pt;
}
.myClass {
font-size: 12pt;
}
To reduce HTTP requests, I'd be combining the files and stripping whitespace prior to rollout, so that's not an issue, but my question is: does having all those selectors repeated over and over cause any performance issues in browsers?
Alternatively, are there any tools which avoid this (potential) issue by merging definitions from different files? ie: take the input given in my second example (3 different files), and combine them into one file, like the first example. | 0 | [
2,
272,
18,
18,
956,
800,
3726,
3726,
951,
76,
31,
1895,
21,
689,
15,
31,
442,
65,
14,
272,
18,
18,
77,
53,
3893,
15,
17,
65,
14,
3704,
30,
16464,
20,
21,
309,
16,
2065,
50,
2811,
35,
382,
9,
101,
48,
45,
6926,
915,
27567,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Are you using event streaming products?
===
Maybe you're familiar with the concept of event streaming processing (ESP) ... if you are, I'd love to hear what you're using and what platforms you're using them on. I am an active contributor to the Esper project (http://esper.codehaus.org/) but I'd be interested in hearing what others are using? Anyone using Coral8, Aleri or Streambase? What platforms are you using them on? | 0 | [
2,
50,
42,
568,
807,
11920,
1985,
60,
800,
3726,
3726,
913,
42,
22,
99,
3694,
29,
14,
2420,
16,
807,
11920,
5511,
13,
5,
160,
306,
6,
13,
9,
9,
9,
100,
42,
50,
15,
31,
22,
43,
339,
20,
990,
98,
42,
22,
99,
568,
17,
98,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Are clean url's a backend or a frontend thing
===
What do you think.. are clean url's a backend or frontend 'discipline' | 0 | [
2,
50,
2745,
287,
6362,
22,
18,
21,
97,
2451,
54,
21,
431,
2451,
584,
800,
3726,
3726,
98,
107,
42,
277,
9,
9,
50,
2745,
287,
6362,
22,
18,
21,
97,
2451,
54,
431,
2451,
13,
22,
28974,
22,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 does ruby on rails work?
===
I'm a PHP developer who knows a little bit of Ruby. I want to learn Ruby on Rails, but most of the resources I've come across treat RoR functionality as "magic" -- i.e., it has a certain internal consistency, but don't bother asking how it works in terms of Ruby, MySQL, etc.
Anyway, I want a deep understanding of how RoR works, the design decisions that went into building it, etc. In particular I'm interested in ActiveRecord, but really I'm looking for the whole package.
Any books / sites / advice welcome. | 0 | [
2,
184,
630,
10811,
27,
2240,
18,
170,
60,
800,
3726,
3726,
31,
22,
79,
21,
13,
26120,
10058,
72,
3620,
21,
265,
1142,
16,
10811,
9,
31,
259,
20,
2484,
10811,
27,
2240,
18,
15,
47,
127,
16,
14,
2566,
31,
22,
195,
340,
464,
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... |
Multiple NSURLConnection delegate's
===
I have two NSURLConnection's the second one depends on the content of the first. So handling the data received from the connection will be different for the two connections.
I'm just picking up objective-c and I would like to know what the proper way to implement the delegates is?
Right now i'm using:
NSURL *url=[NSURL URLWithString:feedURL];
NSURLRequest *urlR=[[[NSURLRequest alloc] initWithURL:url] autorelease];
NSURLConnection *conn=[[NSURLConnection alloc] initWithRequest:urlR delegate:self];
I don't want to use self as the delegate, how do I define two connections with different delegates?
NSURLConnection *c1 = [[NSURLConnection alloc] initWithRequest:url delegate:handle1];
NSURLConnection *c2 = [[NSURLConnection alloc] initWithRequest:url delegate:handle2];
How would do i create handle1 and handle2 as implementations? or interfaces? I don't really get how you would do this.
Any help would be awesome.
Thanks,
Brian Gianforcaro | 0 | [
2,
1886,
13,
103,
4082,
255,
25996,
872,
11300,
22,
18,
800,
3726,
3726,
31,
57,
81,
13,
103,
4082,
255,
25996,
872,
22,
18,
14,
153,
53,
9597,
27,
14,
2331,
16,
14,
64,
9,
86,
7988,
14,
1054,
420,
37,
14,
2760,
129,
44,
421... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Colour blindness simulator
===
Like any responsible developer, I'd like to make sure that the sites I produce are accessible to the widest possible audience, and that includes the significant fraction of the population with some form of colour blindness.
There are many websites which offer to filter a URL you feed it, either by rendering a picture or by filtering all content. However, both approaches seem to fail when rendering even moderately complex layouts, so I'd be interested in finding a client-side approach.
The ideal solution would be a system filter over the whole screen that can be used to test any program. The next best thing would be a browser plugin. | 0 | [
2,
4609,
28049,
24565,
800,
3726,
3726,
101,
186,
1864,
10058,
15,
31,
22,
43,
101,
20,
233,
562,
30,
14,
3259,
31,
2213,
50,
7342,
20,
14,
1051,
384,
938,
2663,
15,
17,
30,
1103,
14,
1505,
10885,
16,
14,
350,
29,
109,
505,
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... |
What is the SQL for 'next' and 'previous' in a table?
===
I have a table of items, each of which has a date associated with it. If I have the date associated with one item, how do I query the database with SQL to get the 'previous' and 'subsequent' items in the table?
It is not possible to simply add (or subtract) a value, as the dates do not have a regular gap between them.
One possible application would be 'previous/next' links in a photo album or blog web application, where the underlying data is in a SQL table.
As an example, if I have the data:
1,3,8,19,67,45
What query (or queries) would give 3 and 19 when supplied 8 as the parameter? | 0 | [
2,
98,
25,
14,
4444,
255,
26,
13,
22,
20021,
22,
17,
13,
22,
3515,
1755,
1291,
22,
19,
21,
859,
60,
800,
3726,
3726,
31,
57,
21,
859,
16,
3755,
15,
206,
16,
56,
63,
21,
1231,
1598,
29,
32,
9,
100,
31,
57,
14,
1231,
1598,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Find leaf nodes in hierarchical tree
===
I have a table in my database which stores a tree structure. Here are the relevant fields:
mytree (id, parentid, otherfields...)
I want to find all the leaf nodes (that is, any record whose `id` is not another record's `parentid`)
I've tried this:
SELECT * FROM mytree WHERE `id` NOT IN (SELECT DISTINCT `parentid` FROM `mytree`)
But that returned an empty set. Strangely, removing the "NOT" returns the set of all the non-leaf nodes.
Can anyone see where I'm going wrong? | 0 | [
2,
477,
5164,
16272,
19,
21376,
4272,
1541,
800,
3726,
3726,
31,
57,
21,
859,
19,
51,
6018,
56,
4134,
21,
1541,
1411,
9,
235,
50,
14,
7480,
2861,
45,
51,
8101,
13,
5,
1340,
15,
4766,
1340,
15,
89,
1109,
18,
9,
9,
9,
6,
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... |
TSQL Extended Procedure 'xp_dirscan'?
===
What is the equivalent of the extended procedure 'xp_dirscan' in SQL Server 2005? | 0 | [
2,
13,
38,
18,
22402,
1984,
7004,
13,
22,
396,
306,
1,
9035,
18,
1245,
22,
60,
800,
3726,
3726,
98,
25,
14,
4602,
16,
14,
1984,
7004,
13,
22,
396,
306,
1,
9035,
18,
1245,
22,
19,
4444,
255,
8128,
812,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Creating the Singleton design pattern in PHP5
===
How would one create a Singleton class using PHP5 classes? | 0 | [
2,
2936,
14,
345,
444,
704,
3732,
19,
13,
26120,
264,
800,
3726,
3726,
184,
83,
53,
1600,
21,
345,
444,
718,
568,
13,
26120,
264,
2684,
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... |
JQuery: Current, Well-Formatted, Printable Documentation?
===
I'm looking for a current (1.2), well-formatted, printable version of the jQuery documentation. I've checked the alternative resources page and see the PDF versions from CF and Java, but both are out of date.
The jQuery site has the API browser with "Printable Version" in the toolbox, but it prints terribly, and I don't really want to print one page or tab at a time.
I have a hard time believing that there is no print doc for a tool this popular - all I want is a simple listing with descriptions and examples ON PAPER.
Am I missing something?
I can buy one of the books if I need to, but not sure which is for the current version.
Thanks!
| 0 | [
2,
487,
8190,
93,
45,
866,
15,
134,
8,
29850,
15,
4793,
579,
13945,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
866,
13,
5,
165,
9,
135,
6,
15,
134,
8,
29850,
15,
4793,
579,
615,
16,
14,
487,
8190,
93,
13945,
9,
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... |
Is there any way to detect the monitor state in Windows (on or off)?
===
Does anyone know if there is an API to get the current monitor state (on or off) in Windows (XP/Vista/2000/2003)?
All of my searches seem to indicate there is no real way of doing this.
[This thread][1] tries to use [GetDevicePowerState][2] which according to Microsoft's docs does not work for display devices.
In Vista I can listen to [GUID_MONITOR_POWER_ON][3] but I do not seem to get events when the monitor is turned off manually.
In XP I can hook into `WM_SYSCOMMAND` `SC_MONITORPOWER`, looking for status 2. This only works for situations where the system triggers the power off.
The WMI `Win32_DesktopMonitor` class does not seem to help out as well.
Anyone else have any other ideas?
[1]: http://www.promixis.com/forums/archive/index.php/t-1282.html
[2]: http://msdn.microsoft.com/en-us/library/aa372690(VS.85).aspx
[3]: http://msdn.microsoft.com/en-us/library/aa373195(VS.85).aspx | 0 | [
2,
25,
80,
186,
161,
20,
9092,
14,
7626,
146,
19,
1936,
13,
5,
218,
54,
168,
6,
60,
800,
3726,
3726,
630,
1276,
143,
100,
80,
25,
40,
21,
2159,
20,
164,
14,
866,
7626,
146,
13,
5,
218,
54,
168,
6,
19,
1936,
13,
5,
396,
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... |
Setting style on first and last visible TabItem of TabControl
===
I want to set a style on the first and last TabItems in a TabControl, and have them updated as the visibility of the TabItems is changed. I can't see a way to do so with triggers.
How would you approach this? | 0 | [
2,
2697,
1034,
27,
64,
17,
236,
4560,
6523,
2119,
79,
16,
6523,
12898,
800,
3726,
3726,
31,
259,
20,
309,
21,
1034,
27,
14,
64,
17,
236,
6523,
2119,
79,
18,
19,
21,
6523,
12898,
15,
17,
57,
105,
6372,
28,
14,
19476,
16,
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... |
Do stateless random number generators exist?
===
Is there a difference between generating multiple numbers using a single random number generator (RNG) versus generating one number per generator and discarding it? Do both implementations generate numbers which are equally random? Is there a difference between the normal RNGs and the secure RNGs for this?
I have a web application that is supposed to generate a list of random numbers on behalf of clients. That is, the numbers should appear to be random from each client's point of view. Does this mean I need retain a separate random RNG per client session? Or can I share a single RNG across all sessions? Or can I create and discard a RNG on a per-request basis? | 0 | [
2,
107,
146,
923,
5477,
234,
20495,
3182,
60,
800,
3726,
3726,
25,
80,
21,
2841,
128,
13500,
1886,
2116,
568,
21,
345,
5477,
234,
15286,
13,
5,
139,
2723,
6,
5706,
13500,
53,
234,
416,
15286,
17,
26251,
68,
32,
60,
107,
156,
612... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 name for array indexed by id with boolean value
===
I get obsessed with the best names for arrays and variables that I use, I'll look up words in the thesaurus, dictionary, etc..
So I'm trying to name this array / structure:
$nameMe = array(
'392' => TRUE,
'234' => TRUE,
'754' => TRUE,
'464' => TRUE,
);
and it's used to check if that id has a certain property, like so
if(isset($name[$id])) {
doSomething();
}
Problem being I'm getting really long variable names like
$propertyNameArrayIdIndexed
Any ideas for how I can better name this particular function of array? or better names in general | 0 | [
2,
246,
204,
26,
7718,
4348,
69,
34,
4924,
29,
9827,
413,
210,
1923,
800,
3726,
3726,
31,
164,
19262,
29,
14,
246,
1817,
26,
7718,
18,
17,
12157,
30,
31,
275,
15,
31,
22,
211,
361,
71,
715,
19,
14,
14,
23227,
15,
9186,
15,
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 to tell when Windows is inactive
===
Various programs can do stuff only when you haven't used the computer for a while (eg screensaver, Google Desktop indexing, etc).
How do they know when it has been inactive? Is there some function in Windows that tells you how long it has been inactive, or do you have to use some kind of keyboard/mouse hook to track activity yourself?
I'm using C#, but I'm interested in any method of determining the inactivity. | 0 | [
2,
184,
20,
494,
76,
1936,
25,
19,
7889,
800,
3726,
3726,
617,
1726,
92,
107,
3217,
104,
76,
42,
2933,
22,
38,
147,
14,
1428,
26,
21,
133,
13,
5,
5431,
14236,
11937,
15,
8144,
17404,
4348,
68,
15,
2722,
6,
9,
184,
107,
59,
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... |
Context help in Visual Studio
===
Is there a way to change the context sensitive help in Visual Studio so that it will only search against the text under the caret instead of a complilation error in your code? | 0 | [
2,
4141,
448,
19,
3458,
1120,
800,
3726,
3726,
25,
80,
21,
161,
20,
753,
14,
4141,
7830,
448,
19,
3458,
1120,
86,
30,
32,
129,
104,
2122,
149,
14,
1854,
131,
14,
781,
38,
700,
16,
21,
6479,
1210,
10832,
7019,
19,
154,
1797,
60... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do you write a case insensative query for both mySQL and postgres?
===
I'm running a mySQL database locally for development, but deploying to Heroku which uses postgres. Heroku handles almost everything, except that my case insensitive Like statements become case sensitive. I know I could use iLike statements, but my local mySQL database can't handle that.
What is the best way to write a case insensitive query that is compatible with both mySQL and postgres? Or do I need to write separate Like and iLike statements depending on the DB my app is talking to? | 0 | [
2,
184,
107,
42,
2757,
21,
610,
19,
1264,
18,
3366,
25597,
26,
156,
51,
18,
22402,
17,
678,
6879,
18,
60,
800,
3726,
3726,
31,
22,
79,
946,
21,
51,
18,
22402,
6018,
6680,
26,
522,
15,
47,
17617,
68,
20,
36,
9266,
56,
2027,
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... |
How do you auto-deploy a website during a release build?
===
I'd like to upload (via ftp) a website when doing a release build in visual studio 2008. I don't want any source code files to be uploaded and it would be nice to configure which folders should get uploaded. I'm using either ASP.NET Web Applications or MVC. How do I configure VS.NET to automatically upload (and overwrite) the last deployed website? | 0 | [
2,
184,
107,
42,
3108,
8,
17309,
10892,
21,
2271,
112,
21,
830,
1895,
60,
800,
3726,
3726,
31,
22,
43,
101,
20,
71,
8294,
13,
5,
5034,
1187,
306,
6,
21,
2271,
76,
845,
21,
830,
1895,
19,
3458,
1120,
570,
9,
31,
221,
22,
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... |
What is the mask for emails using swing's MaskFormatter
===
Using Java swing, what is the string that correspond to a correct email mask when using the [`MaskFormatter`][1]?
Is that possible at all to actually use a `MaskFormatter` for emails?
[1]: http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/text/MaskFormatter.html | 0 | [
2,
98,
25,
14,
5983,
26,
8517,
18,
568,
5587,
22,
18,
5983,
23588,
815,
800,
3726,
3726,
568,
8247,
5587,
15,
98,
25,
14,
3724,
30,
14217,
20,
21,
4456,
8517,
5983,
76,
568,
14,
636,
1,
23265,
23588,
815,
1,
500,
2558,
165,
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... |
SQL DTS Database Copy Fails
===
Hey All, I have been working on this problem for a while and the usual google searches are not helping :(
I have a production database in SQL 2000. I want to copy it over the top of a training database to refresh it. I want this to be something that is scheduled to happen once a week to keep the training database up-to-date.
I have a DTS job created for doing this. Within that DTS job I have a single "Copy SQL Server Objects" task. That task is set up to:
- Create all copied objects
- Drop destination objects first
- Copy data
- Replace existing data
- Copy indexes, triggers, primary and foreign keys
- Copy all user tables, views, functions and stored procedures.
When I run this DTS package (in pre-production for testing of course) it gets to 99% done and throws the following error:
Step Error Source: Microsoft SQL-DMO (ODBC SQLState: 42S02)
Step Error Description:[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'dbo.vwEstAssetStationAddress'.
Step Error code: 800400D0
Step Error Help File:SQLDMO80.hlp
Step Error Help Context ID:1131
My searches on the net didn't provide much help. There are reports of these errors getting hit, but none seem to match my circumstances. One suggestion I found was the the sysdepends table had become corrupted, making the DTS job run its scripts in the wrong order. Howeever, I ran the following script to correct that table and it still throws the same error:
USE master
GO
ALTER DATABASE [DATABASE NAME]
SET SINGLE_USER
GO
USE [DATABASE NAME]
GO
DBCC CHECKTABLE('sysdepends',REPAIR_REBUILD )
GO
USE master
GO
ALTER DATABASE [DATABASE NAME]
SET MULTI_USER
GO
I have also seen that having different object owners can cause this error. But I have confirmed that the objects are all owned by the dbo user in this case.
Any suggestions? | 0 | [
2,
4444,
255,
13,
43,
38,
18,
6018,
4344,
13614,
800,
3726,
3726,
8409,
65,
15,
31,
57,
74,
638,
27,
48,
1448,
26,
21,
133,
17,
14,
3820,
8144,
19994,
50,
52,
3713,
13,
45,
5,
31,
57,
21,
637,
6018,
19,
4444,
255,
824,
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... |
Format of PR_SEARCH_KEY
===
Does anyone know the format of the MAPI property `PR_SEARCH_KEY`?
The [online documentation][1] has this to say about it:
> The search key is formed by
> concatenating the address type (in
> uppercase characters), the colon
> character ':', the e-mail address in
> canonical form, and the terminating
> null character.
And the exchange document [MS-OXOABK][2] says this:
> The PidTagSearchKey property of type
> PtypBinary is a binary value formed by
> concatenating the ASCII string "EX: "
> followed by the DN for the object
> converted to all upper case, followed
> by a zero byte value.
However all the MAPI messages I've seen with this property have it as some sort of binary 16 byte sequence that looks like a GUID. Does anyone else have any more information about it? Is it always 16 bytes?
Thanks!
[1]: http://msdn.microsoft.com/en-us/library/ms529414(EXCHG.10).aspx
[2]: http://msdn.microsoft.com/en-us/library/cc433489(EXCHG.80).aspx | 0 | [
2,
2595,
16,
5396,
1,
25136,
1,
4237,
800,
3726,
3726,
630,
1276,
143,
14,
2595,
16,
14,
2942,
49,
1354,
13,
1,
4899,
1,
25136,
1,
4237,
1,
60,
14,
636,
218,
1143,
13945,
500,
2558,
165,
500,
63,
48,
20,
395,
88,
32,
45,
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... |
Does LISTSERV have an API?
===
I have a custom application that was built to send opt-in newsletters and marketing emails. It does a pretty good job sending mail, but it doesn't respond at all to bounces or unsubscribe requests. It seems to me that rather than building that functionality myself I should use a mailing list manager such as LISTSERV.
However, I'm not sure if LISTSERV fits the bill. I need something that I can integrate with existing data and code.
For example, the newsletters are sent out to registered users on a couple of web sites. I can't figure out if there's a way to pull the addresses for a newsletter from an existing database. Also, I'd like people to be able to opt in and out using the same account administration interfaces they use now. I'd rather not expose users to the underlying mailing list management software.
Does LISTSERV have an API that would allow me to extend it to suit my needs? If not, is there another quality mailing list management tool that does?
| 0 | [
2,
630,
968,
10321,
57,
40,
21,
2159,
60,
800,
3726,
3726,
31,
57,
21,
5816,
3010,
30,
23,
392,
20,
2660,
17034,
8,
108,
17782,
18,
17,
4743,
8517,
18,
9,
32,
630,
21,
1772,
254,
1205,
4907,
4216,
15,
47,
32,
1437,
22,
38,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 get the icon from the excutable file only haveing an instance of it's Process in C#
===
I can get the executable location from the process, how do I get the icon from file? | 0 | [
2,
184,
92,
31,
164,
14,
9801,
37,
14,
1396,
4118,
579,
3893,
104,
57,
68,
40,
4851,
16,
32,
22,
18,
953,
19,
272,
5910,
800,
3726,
3726,
31,
92,
164,
14,
1396,
17194,
5924,
1474,
37,
14,
953,
15,
184,
107,
31,
164,
14,
9801... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Good resource for learning Silverlight 2 Development?
===
Now that Silverlight 2 has been released, I'm looking for good resources to learn Silverlight. I messed around with v1, but I chose at that point to wait until 2 was out before getting heavily involved.
I would prefer a book, but it seems that it will be a few months before major publishers release (Wrox, for example).
Any good resources? Bonus points if you are actually doing development in Silverlight 2 :) | 0 | [
2,
254,
6577,
26,
2477,
1172,
3130,
172,
522,
60,
800,
3726,
3726,
130,
30,
1172,
3130,
172,
63,
74,
261,
15,
31,
22,
79,
699,
26,
254,
2566,
20,
2484,
1172,
3130,
9,
31,
21537,
140,
29,
566,
165,
15,
47,
31,
3305,
35,
30,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Scalable/Reusable Authorization Model
===
Ok, so I'm looking for a bit of architecture guidance, my team is getting a chance to re-cast certain decisions with a new feature that we're building, and I wanted to see what SO thought :-) There are of course certain things that we're not changing, so the solution would have to fit in this model. Namely, that we've got an ASP.NET application, which uses web services to allow users to perform actions on the system.
The problem comes in because, as with many systems, different users need access to different functions. Some roles have access to Y button, and others have access to Y and B button, while another still only has access to B. Most of the time that I see this, developers just put in a mish-mosh of if statements to deal with the UI state. My fear is that left unchecked, this will become an unmaintainable mess, because in addition to putting authorization logic in the GUI, it needs to be put in the web services (which are called via ajax) to ensure that only authorized users call certain methods.
so my question to you is, how can a system be designed to decrease the random ad-hoc if statements here and there that check for specific roles, which could be re-used in both GUI/webform code, and web service code.
Just for clarity, this is an ASP.NET web application, using webforms, and [Script#][1] for the AJAX functionality. Don't let the script# throw you off of answering, it's not fundamentally different than asp.net ajax :-)
[1]: http://projects.nikhilk.net/ScriptSharp/ | 0 | [
2,
18957,
579,
118,
99,
267,
579,
22677,
1061,
800,
3726,
3726,
5854,
15,
86,
31,
22,
79,
699,
26,
21,
1142,
16,
2607,
8193,
15,
51,
173,
25,
1017,
21,
1504,
20,
302,
8,
6146,
1200,
6003,
29,
21,
78,
1580,
30,
95,
22,
99,
35... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 enums in Oracle?
===
How do you use enums in Oracle using SQL only? (No PSQL) | 0 | [
2,
184,
20,
275,
1957,
723,
18,
19,
15759,
60,
800,
3726,
3726,
184,
107,
42,
275,
1957,
723,
18,
19,
15759,
568,
4444,
255,
104,
60,
13,
5,
251,
8613,
22402,
6,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How do I group by date in Crystal Reports 8.0?
===
I have a Crystal Report that looks like:
*Date | Person | Ticket | Summary <br>
Date | Person | Ticket | Summary <br>
Date | Person | Ticket | Summary*
I would like it to look like:
*Date <br>
Person | Ticket | Summary <br>
Person | Ticket | Summary <br><br>
Date <br>
Person | Ticket | Summary*
All values are pulled from a MS SQL 2000 database, the application that will ultimately use the report is a VB 6 app that I unfortunately have to support. | 0 | [
2,
184,
107,
31,
214,
34,
1231,
19,
4282,
2813,
469,
9,
387,
60,
800,
3726,
3726,
31,
57,
21,
4282,
1330,
30,
1879,
101,
45,
1637,
8209,
13,
1,
840,
13,
1,
6133,
13,
1,
14740,
13,
1,
5145,
1,
1231,
13,
1,
840,
13,
1,
6133,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 identify immutable objects in Java
===
In my code, I am creating a collection of objects which will be accessed by various threads in a fashion that is only safe if the objects are immutable. When an attempt is made to insert a new object into my collection, I want to test to see if it is immutable (if not, I'll throw an exception).
One thing I can do is to check a few well-known immutable types:
private static final Set<Class> knownImmutables = new HashSet<Class>(Arrays.asList(
String.class, Byte.class, Short.class, Integer.class, Long.class,
Float.class, Double.class, Boolean.class, BigInteger.class, BigDecimal.class
));
...
public static boolean isImmutable(Object o) {
return knownImmutables.contains(o.getClass());
}
This actually gets me 90% of the way, but sometimes my users will want to create simple immutable types of their own:
public class ImmutableRectangle {
private final int width;
private final int height;
public ImmutableRectangle(int width, int height) {
this.width = width;
this.height = height;
}
public int getWidth() { return width; }
public int getHeight() { return height; }
}
Is there some way (perhaps using reflection) that I could reliably detect whether a class is immutable? False positives (thinking it's immutable when it isn't) are not acceptable but false negatives (thinking it's mutable when it isn't) are. | 0 | [
2,
184,
107,
31,
5808,
797,
7903,
579,
3916,
19,
8247,
800,
3726,
3726,
19,
51,
1797,
15,
31,
589,
2936,
21,
1206,
16,
3916,
56,
129,
44,
12904,
34,
617,
20396,
19,
21,
3161,
30,
25,
104,
1834,
100,
14,
3916,
50,
797,
7903,
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 does CSS formatting in a Google Maps bubble work?
===
I'm using KML and the GGeoXml object to overlay some shapes on an embedded Google map. The placemarks in the KML file have some custom descriptive information that shows up in the balloons.
<Placemark>
<name />
<description>
<![CDATA[
<div class="MapPopup">
<h6>Concession</h6>
<h4>~Name~</h4>
<p>Description goes here</p>
<a class="Button GoRight FloatRight" href="#"><span></span>View details</a>
</div>
]]>
</description>
<styleUrl>#masterPolyStyle</styleUrl>
...Placemarks go here ...
</Placemark>
So far so good - the popups show up and have the correct text in them. Here's the weird thing: I'm trying to use CSS to format what goes in the popups, and it halfway works.
Specifically:
- The `<h6>` and `<h4>` elements are rendered using the colors and background images I've specified in my stylesheet.
- Everything shows up in Arial, not in the font I've specified in my CSS.
- The class names seem to be ignored (e.g. none of the `a.Button` formatting is applied; if I define a style like the one below, it's ignored.)
div.MapPopup { background:pink; }
Any ideas? I wouldn't have been surprised for the CSS not to work at all, but it's weird that it only partly works.
| 0 | [
2,
184,
630,
272,
18,
18,
2595,
1203,
19,
21,
8144,
6867,
10937,
170,
60,
800,
3726,
3726,
31,
22,
79,
568,
401,
255,
17,
14,
489,
834,
6326,
8184,
3095,
20,
84,
4414,
109,
12129,
27,
40,
12138,
8144,
2942,
9,
14,
209,
4527,
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... |
Oracle 10gr2: ensure timestamps are between 9am and 5pm
===
I want to enforce that date-times that are entered fall between 9am and 5pm. How do I enforce this with ORACLE CHECK constraints? | 0 | [
2,
15759,
332,
8807,
135,
45,
4062,
436,
4919,
1919,
50,
128,
561,
765,
17,
331,
5576,
800,
3726,
3726,
31,
259,
20,
16525,
30,
1231,
8,
891,
18,
30,
50,
1297,
1080,
128,
561,
765,
17,
331,
5576,
9,
184,
107,
31,
16525,
48,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Creating self-contained python applications
===
I'm trying to create a self-contained version of <a href="http://www.htmltopdf.org/">pisa</a> (html to pdf converter, <a href="http://pypi.python.org/pypi/pisa/3.0.27">latest version</a>), but I can't succeed due to several errors. I've tried <code>py2exe</code>, <code>bb-freeze</code> and <code>cxfreeze</code>.
This has to be in windows, which makes my life a bit harder. I remember that a couple of months ago the author had a zip file containing the install, but now it's gone, leaving me only with the python dependent way.
How would you work this out? | 0 | [
2,
2936,
1119,
8,
28578,
20059,
3767,
800,
3726,
3726,
31,
22,
79,
749,
20,
1600,
21,
1119,
8,
28578,
615,
16,
13,
1,
58,
746,
14057,
3726,
7,
21127,
6903,
6483,
9,
15895,
262,
11124,
9,
5583,
118,
7,
1,
8954,
58,
1,
118,
58,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Find records with more than one ActiveRecord HABTM Association
===
I've got two models, joined by a Has and Belongs To Many join table. Lets call these models User and Event. The majority of Users have 0 events, while few have one or more. I want to do something like:
User.find(:all, :joins => :events, :conditions => ["***'Something that count the events'*** > ?"], 0)
The problem is, I'm not sure how to select only users that have 1 or more associated events. | 0 | [
2,
477,
742,
29,
91,
119,
53,
1348,
14953,
13,
9075,
38,
79,
607,
800,
3726,
3726,
31,
22,
195,
330,
81,
2761,
15,
670,
34,
21,
63,
17,
7034,
20,
151,
1865,
859,
9,
6884,
645,
158,
2761,
4155,
17,
807,
9,
14,
1698,
16,
3878,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 does Oracle 9i treat an empty string as NULL?
===
I know that it _does_ consider ' ' as `NULL`, but that doesn't do much to tell me _why_ this is the case. As I understand the SQL specifications, ' ' is not the same as `NULL` -- one is a valid datum, and the other is indicating the absence of that same information.
Feel free to speculate, but please indicate if that's the case. If there's anyone from Oracle who can comment on it, that'd be fantastic! | 0 | [
2,
483,
630,
15759,
561,
49,
5752,
40,
2424,
3724,
28,
16203,
60,
800,
3726,
3726,
31,
143,
30,
32,
13,
1,
10739,
1,
3563,
13,
22,
13,
22,
28,
13,
1,
4215,
211,
1,
15,
47,
30,
1437,
22,
38,
107,
212,
20,
494,
55,
13,
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... |
Teting REST webservices
===
HI There,
My organization is working on building RESTful webservices on JBoss appserver. The QA team is used to testing SOAP webservices so far using SoapUI. SoapUI has a new version that has REST capabilities. We're considering using that.
What do others out there use for testing RESTful webservices ? Are there any publicly available RESTful services available on the net for free that someone could test ? IF yes, what tools are available ?
Thank you in Advance,
BR,<BR>
~A | 0 | [
2,
2392,
1203,
760,
2741,
11449,
18,
800,
3726,
3726,
4148,
80,
15,
51,
1165,
25,
638,
27,
353,
760,
1566,
2741,
11449,
18,
27,
487,
10349,
18,
4865,
10321,
106,
9,
14,
7234,
173,
25,
147,
20,
4431,
6447,
2741,
11449,
18,
86,
46... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
SQL Server rowversion column question
===
If a table has a rowversion column in it and you make an update to that row, the value of the rowversion column increases. I know that this is by design and the purpose of rowversion columns, however is there any way to make it such that an update operation will have no effect on rowversion value? | 0 | [
2,
4444,
255,
8128,
3131,
10898,
4698,
1301,
800,
3726,
3726,
100,
21,
859,
63,
21,
3131,
10898,
4698,
19,
32,
17,
42,
233,
40,
11100,
20,
30,
3131,
15,
14,
1923,
16,
14,
3131,
10898,
4698,
7104,
9,
31,
143,
30,
48,
25,
34,
70... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 discriminate between data binding and user actions on controls
===
I have what must be a typical catch-22 problem. I have a .NET WinForm control that contains a textbox and a checkbox. Both controls are data bound to properties on a data class instance. The textbox is for price, the check box to indicate that the price is a price override. Also on the data class is a property that holds the item's original price.
I would like the controls to respect the following rules:
- When the user enters a value into the price textbox, the checkbox is automatically checked to indicate they are overriding the price value
- When the check box is un-checked, the item's price is restored to the original price.
When the user unchecks the checkbox, the event handler tests the checked state, and sets the item's price property to the original price value. However, the price value being databound, a bind event is fired, which updates the textbox value, which fires the text changed event handler which re-checks the checkbox.
I've attempted to trap the conditions where I'm explicitly updating something that would trigger a control change event. This only works for part of it though. The textbox change event fires other times that are outside my control, such as when databinding fires when the form is initially shown.
I've been searching around and I guess I'm just not coming up with the right search terms to find what I'm looking for. It seems that databinding is all wonderful and nifty until you need to do something pratical with it, like having two bound controls interact with each other. There just doesn't seem to be a way to discriminate between what triggered the control events.
I've also looked at the events available on the binding source component but there doesn't seem to be anything there that is any more useful. I can handle the event that fires after binding is complete, but that's after the problems occur.
Anyone have any suggestions? | 0 | [
2,
184,
107,
31,
28285,
128,
1054,
8728,
17,
4155,
3078,
27,
8671,
800,
3726,
3726,
31,
57,
98,
491,
44,
21,
3874,
2949,
8,
2287,
1448,
9,
31,
57,
21,
13,
9,
2328,
628,
4190,
569,
30,
1588,
21,
1854,
5309,
17,
21,
2631,
5309,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 simplest way to get indented XML with line breaks from XmlDocument?
===
When I build XML up from scratch with `XmlDocument`, the `OuterXml` property already has everything nicely indented with line breaks. However, if I call `LoadXml` on some very "compressed" XML (no line breaks or indention) then the output of `OuterXml` stays that way. So ...
What is the simplest way to get beautified XML output from an instance of `XmlDocument`? | 0 | [
2,
98,
25,
14,
24384,
161,
20,
164,
19,
817,
1427,
23504,
29,
293,
7947,
37,
23504,
28132,
60,
800,
3726,
3726,
76,
31,
1895,
23504,
71,
37,
12395,
29,
13,
1,
396,
8184,
28132,
1,
15,
14,
13,
1,
1320,
106,
396,
8184,
1,
1354,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Ajax and GridView-Fu -- how to make AccordionPanes work with GridViews?
===
Ok, I know someone here has tried this ninja-elite level of coding before. Essentially what I want to do is this:
I want a GridView where each row returned becomes the header portion of an asp.net-ajax AccordionPane. Each row also has some unique key, and when you click on each of those AcccordionPane headers, that will in turn reveal the content pane which will then open up another GridView which is populated with the information from that is pulled from a database with that unique key.
Now I KNOW someone out there has tried something this insane --- and it doesn't seem to be that insanely hard, look in the cooments section from the poster named awni:
http://www.asp.net/learn/ajax-videos/video-87.aspx
'<ajaxToolkit:AccordionPane ID="AccordionPane2 >'
'<Header>'
**********EACH HEADER IS A ROW FROM A DATABASE
'</Header>'
'<Content>'
'<asp:GridView DataSourceID="SqlDataSource1">'
'<Columns>'
**********THIS GRIDVIEW IS POPULATED WITH A DATABASE QUERY
'</Columns>'
'</asp:GridView>'
'</Content>'
'</ajaxToolkit:AccordionPane>'
Is it possible? | 0 | [
2,
20624,
17,
7354,
4725,
8,
4096,
13,
8,
8,
184,
20,
233,
20753,
16660,
18,
170,
29,
7354,
4725,
18,
60,
800,
3726,
3726,
5854,
15,
31,
143,
737,
235,
63,
794,
48,
14727,
8,
62,
10601,
662,
16,
13,
15458,
115,
9,
7398,
98,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 necessary in any circumstance to modify Wordpress other than writing plugins and themes?
===
I recently had to work on a project where the previous developer modified the wp-admin directory. It seems like a bad idea to me, since Wordpress is constantly updated. Am I just not at that level of expertise with modifying Wordpress? | 0 | [
2,
25,
32,
2378,
19,
186,
26579,
20,
17579,
833,
5890,
89,
119,
1174,
10922,
108,
18,
17,
6876,
60,
800,
3726,
3726,
31,
1989,
41,
20,
170,
27,
21,
669,
113,
14,
1158,
10058,
5372,
14,
13,
13790,
8,
1283,
2160,
16755,
9,
32,
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... |
Undefined Symbol ___gxx_personality_v0 on link
===
I've been getting this undefined symbol building with this command line:
$ gcc test.cpp
Undefined symbols:
"___gxx_personality_v0", referenced from:
etc...
test.cpp is simple and should build fine. What is the deal? | 0 | [
2,
367,
13439,
4678,
13,
1,
263,
8962,
1,
18160,
856,
1,
710,
387,
27,
3508,
800,
3726,
3726,
31,
22,
195,
74,
1017,
48,
367,
13439,
4678,
353,
29,
48,
1202,
293,
45,
5579,
489,
3384,
1289,
9,
150,
3421,
367,
13439,
9794,
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's the benefit of Connectedness?
===
What is the benefit of Connectedness as defined by Resource Oriented Architecture (ROA)? The way I understand it, the crux of Connectedness is the ability to crawl the entire application state using only the root URIs.
But how useful is that really?
For example, imagine that HTTP GET http://example.com/users/joe returns a link to http://examples.com/uses/joe/bookmarks.
Unless you're writing a dumb web crawler (and even then I wonder), you still need to teach the client what each link means at compile-time. That is, the client needs to know that the "bookmarks URI" returns a URI to Bookmark resources, and then pass control over to special Bookmark-handling algorithms. You can't just pass links blindly to some general client method.
Since you need this logic anyway, what's the difference between the client figuring out the URI at runtime versus providing it at compile-time (making http://example.com/users/bookmarks a root URI)?
If you have a better example which illustrates the benefit of Connectedness I'd love to hear about it. | 0 | [
2,
98,
22,
18,
14,
4234,
16,
2587,
720,
60,
800,
3726,
3726,
98,
25,
14,
4234,
16,
2587,
720,
28,
2811,
34,
6577,
13,
6800,
2607,
13,
5,
661,
58,
6,
60,
14,
161,
31,
1369,
32,
15,
14,
11498,
396,
16,
2587,
720,
25,
14,
216... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
.NET WinForms: Graphics.MeasureString returns different values than Win32 GetTextExtent
===
i've been trying to find a method in C# to measure the size of a string. The [standard method][1] to measure a string in Win32 is to use GetTextExtent. The real goal is to find the *average* width and height of a font character. The standard method to find the average width of a character starts from getting the width of all alphabetic characters and divide by 52:
size = dc.GetTextExtent(
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", 52);
averageWidth = size / 52;
Microsoft has a page that lists the [average character widths][2] for some font sizes at certain DPI settings, and i've confirmed them by my own calls to GetTextExtent.
- **Tahoma 8pt, 96dpi:** 13x6 px
- **Tahoma 9pt, 96dpi:** 14x7 px
- **Segoe UI 9pt, 96dpi**: 15x7 px
Now i want to perform the same calculations under .NET WinForms. Using Graphics.MeasureString() i come up with code:
public static SizeF GetAvgCharSizeF(Graphics g, Font font)
{
String s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
SizeF textSize = g.MeasureString(s, font);
float baseUnitX = (textSize.Width / s.Length);
float baseUnitY = textSize.Height;
return new SizeF(baseUnitX, baseUnitY);
}
Unfortunatly the values do not match the known, accepted, true values:
- **Tahoma 8pt, 96dpi:** 14x6 px *(14.21x6.09 px)*
- **Tahoma 9pt, 96dpi:** 16x7 px *(15.98x6.85 px)*
- **Segoe UI 9pt, 96dpi:** 17x7 px *(17.46x6.91 px)*
The average character widths turn out OK, but the character heights are too large by about 13%. i assume that the extra height is due to a difference in the classification of height having been changed to include ascenders and descenders. If the measuring string was measuring too tall, i tried changing it from:
String s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
to
String s = "acemnorsuvwxyz";
thinking that now the string is not as tall, and so the measured Height should be shorter. Nope, it returns the *exact* same heights as the version of the string that included ascenders and descenders (although the average widths are slightly larger).
What can be the cause of this, and can get the average character height what can be done to the average text height so that it matches the accepted values returned by GetTextExtent?
Note: Even though the standard practice to get the average character height is to use GetTextMetrics, the height returned by GetTextExtents returns the same value.
[1]: http://support.microsoft.com/kb/145994
[2]: http://msdn.microsoft.com/en-us/library/bb847924.aspx | 0 | [
2,
13,
9,
2328,
628,
4190,
18,
45,
8351,
9,
24493,
11130,
4815,
421,
4070,
119,
628,
3125,
164,
11969,
1706,
1316,
38,
800,
3726,
3726,
31,
22,
195,
74,
749,
20,
477,
21,
2109,
19,
272,
5910,
20,
4058,
14,
1072,
16,
21,
3724,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 Servlets: Performance
===
I am working on a web application in Java which gets data from servlets via AJAX calls.
This application features several page elements which get new data from the server at fairly rapid intervals.
With a lot of users, the demand on the server has a potential to get fairly high, so I am curious:
**Which approach offers the best performance:**
Many servlets (one for each type of data request)?
**Or:**
a single servlet that can handle all of the requests?
| 0 | [
2,
8247,
13,
10321,
11045,
45,
956,
800,
3726,
3726,
31,
589,
638,
27,
21,
2741,
3010,
19,
8247,
56,
3049,
1054,
37,
13,
10321,
11045,
1197,
20624,
3029,
9,
48,
3010,
967,
238,
2478,
2065,
56,
164,
78,
1054,
37,
14,
8128,
35,
66... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
iPhone SDK: Assertion failure in -[UILabel setFont:]
===
I have an iPhone app that compiles and runs fine in the Simulator on my laptop. Now, I try to build and run the same code in the Simulator on an iMac, and it starts up and lets me click a button, but then I get an assertion failure.
Here is what is in the console:
*** Assertion failure in -[UILabel setFont:], /SourceCache/UIKit/UIKit-738/UILabel.m:438
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: font != nil'
Stack: (
2493366603,
2432871995,
2493366059,
2459146836,
817183141,
817926218,
837317240,
837317032,
837315376,
837314643,
2492860866,
2492867620,
2492869880,
85304,
85501,
816175835,
816221412,
9096,
8930
)
Here's the stack trace:
#0 0x949dbff4 in ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___
#1 0x9102ae3b in objc_exception_throw
#2 0x94962ad3 in CFRunLoopRunSpecific
#3 0x94962cf8 in CFRunLoopRunInMode
#4 0x00014d38 in GSEventRunModal
#5 0x00014dfd in GSEventRun
#6 0x30a5dadb in -[UIApplication _run]
#7 0x30a68ce4 in UIApplicationMain
#8 0x00002388 in main at main.m:16
My code does not make any direct calls to setFont:. However, this would be the point in the program's execution where some buttons are made visible for the first time.
I've Googled. A few people say that this gets magically fixed when they edit the NIB, or change their time zone, or other weirdness.
Any ideas what the real cause is?
(Please no whining about NDA's.)
| 0 | [
2,
21024,
13,
18,
43,
197,
45,
20878,
2990,
19,
13,
8,
2558,
5661,
21018,
309,
21931,
45,
500,
800,
3726,
3726,
31,
57,
40,
21024,
4865,
30,
26561,
18,
17,
1461,
1123,
19,
14,
24565,
27,
51,
12294,
9,
130,
15,
31,
1131,
20,
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... |
Include directory in VS 2003
===
Where is the setting in Visual Studio 2003 to set the include path for individual projects? I know about the VC Directories option in Tools>Options but that is machine specific and won't help when I hand this off to other developers. | 0 | [
2,
468,
16755,
19,
4611,
973,
800,
3726,
3726,
113,
25,
14,
2697,
19,
3458,
1120,
973,
20,
309,
14,
468,
2013,
26,
1359,
2314,
60,
31,
143,
88,
14,
13,
8990,
559,
1596,
4255,
19,
4672,
1,
25458,
4710,
47,
30,
25,
1940,
1903,
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,
0,
0,
0,
0... |
Projection/Replication in SQL Query?
===
My SQL is a bit rusty -- is there a SQL way to project an input table that looks something like this:
Name SlotValue Slots
---- --------- -----
ABC 3 1
ABC 4 2
ABC 6 5
Into a 'projected' result table that looks like this:
Name SlotSum Slot
---- ------- ----
ABC 13 1
ABC 10 2
ABC 6 3
ABC 6 4
ABC 6 5
In other words, the result set should contain a number of rows equal to MAX(Slots), enumerated (Slot) from 1 to MAX(Slots), and Sum for each of these 'slots' should reflect the sum of the SlotValues projected out to the 'Slots' position. for the pathological case:
Name SlotValue Slots
---- --------- -----
ABC 4 3
we should get:
Name SlotSum Slot
---- ------- ----
ABC 4 1
ABC 4 2
ABC 4 3
| 0 | [
2,
11607,
118,
99,
20669,
19,
4444,
255,
25597,
60,
800,
3726,
3726,
51,
4444,
255,
25,
21,
1142,
15395,
13,
8,
8,
25,
80,
21,
4444,
255,
161,
20,
669,
40,
6367,
859,
30,
1879,
301,
101,
48,
45,
204,
7958,
15165,
7958,
18,
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... |
[:print:] character class for regular expressions
===
Is [:print:] dependant upon locale in any regular expression implementation that incorporates this character class? For example, will it match Japanese character 'あ', since it is not a control character, or is [:print:] always going to be ASCII codes 0x20 to 0x7E?
Is there any character class, including Perl REs, that can be used to match anything other than a control character? If [:print:] includes only characters in ASCII range I would assume [:cntrl:] does too.
I'm looking for a way to match only fully composed characters in a Unicode string. | 0 | [
2,
636,
45,
10299,
45,
500,
925,
718,
26,
1290,
13832,
800,
3726,
3726,
25,
636,
45,
10299,
45,
500,
12547,
1830,
685,
375,
62,
19,
186,
1290,
1803,
6123,
30,
13760,
48,
925,
718,
60,
26,
823,
15,
129,
32,
730,
1095,
925,
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... |
Why does C# not provide the C++ style 'friend' keyword?
===
The C++ friend keyword allows a class A to designate class B as it's friend. This allows Class B to access the private/protected members of class A.
I've never seen or read anything as to why this was left out of C# (and VB.NET). Most answers to this [earlier StackOverflow question](http://stackoverflow.com/questions/17434/when-should-you-use-friend-in-c) seem to be saying it is a useful part of C++ and there are good reasons to use it. I'd have to agree.
Another [recent question](http://stackoverflow.com/questions/200079/inheritance-trees-and-protected-constructors-in-c#200117) seems to me to be really asking how to do something similar to friend in a C# application. While the answers generally revolve around nested classes, it doesn't seem quite as elegant as using the friend keyword.
The original [Design Patterns book](http://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional/dp/0201633612) uses the friend keyword quite often throughout its examples.
Why is friend missing from C#, and what is the "best practice" way (or ways) of simulating it in C#?
(By the way, the "internal" keyword is not the same thing, it allows ALL classes within the entire assembly to access internal members, friend allows you to give access to just one other class.) | 0 | [
2,
483,
630,
272,
5910,
52,
1181,
14,
272,
20512,
1034,
13,
22,
12299,
22,
1246,
9587,
60,
800,
3726,
3726,
14,
272,
20512,
860,
1246,
9587,
2965,
21,
718,
21,
20,
24124,
718,
334,
28,
32,
22,
18,
860,
9,
48,
2965,
718,
334,
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 to name variables.
===
- What rules do you use to name your variables?
- Where are single letter vars allows?
- How much info do you put in the name?
- how about for example code?
- what are your preferred meaningless variable names? (after foo & bar)
- why are they spelled ["foo" and "bar"][1] rather than [FUBAR][2]
[1]: http://en.wikipedia.org/wiki/Foobar
[2]: http://en.wikipedia.org/wiki/FUBAR | 0 | [
2,
184,
20,
204,
12157,
9,
800,
3726,
3726,
13,
8,
98,
1761,
107,
42,
275,
20,
204,
154,
12157,
60,
13,
8,
113,
50,
345,
1748,
4033,
18,
2965,
60,
13,
8,
184,
212,
15404,
107,
42,
442,
19,
14,
204,
60,
13,
8,
184,
88,
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... |
How to make a bilingual site without creating a separate ASP page for each language?
===
I need ideas on how to go about table layout problem.
I want to set different width of the columns dependent on the picked language.
| 0 | [
2,
184,
20,
233,
21,
18693,
689,
366,
2936,
21,
1725,
28,
306,
2478,
26,
206,
816,
60,
800,
3726,
3726,
31,
376,
3478,
27,
184,
20,
162,
88,
859,
9106,
1448,
9,
31,
259,
20,
309,
421,
9456,
16,
14,
7498,
9063,
27,
14,
2114,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
OSGi and JSF custom components: problems?
===
Has anyone used OSGi and JSF together?
I ask because JSF uses class-loader magic to find custom components. From a tutorial (emphasis mine):
> This configuration file will end up
> being META-INF/faces-config.xml in the
> .jar file that represents this
> component. **JSF will look for such a
> file name in each of the .jar files
> that are loaded at runtime** (in the
> WEB-INF/lib directory for .war files)
> and use each of them in its
> configuration. In this way, multiple
> component .jar files can be combined
> into one web application, and all of
> the components described in each .jar
> will be available to the application.
I would like to be able to have JSF custom components as OSGi bundles (i.e. custom components are in different OSGi bundles than the JSF runtime) and for JSF to be able to find these at runtime.
Has anyone done anything similar? | 0 | [
2,
13,
759,
2234,
17,
487,
18,
410,
5816,
5090,
45,
1716,
60,
800,
3726,
3726,
63,
1276,
147,
13,
759,
2234,
17,
487,
18,
410,
429,
60,
31,
1349,
185,
487,
18,
410,
2027,
718,
8,
8294,
106,
2154,
20,
477,
5816,
5090,
9,
37,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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++ "Named Parameter Idiom" vs. Boost::Parameter library
===
I've looked at both the [Named Parameter Idiom][1] and the [Boost::Parameter library][2]. What advantages does each one have over the other? Is there a good reason to always choose one over the other, or might each of them be better than the other in some situations (and if so, what situations)?
[1]: http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.18
[2]: http://www.boost.org/doc/libs/1_36_0/libs/parameter/doc/html/index.html | 0 | [
2,
272,
20512,
13,
7,
11482,
18906,
28380,
7,
4611,
9,
10419,
45,
45,
6351,
7307,
1248,
800,
3726,
3726,
31,
22,
195,
292,
35,
156,
14,
636,
11482,
18906,
28380,
500,
2558,
165,
500,
17,
14,
636,
10858,
384,
45,
45,
6351,
7307,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 use NLP to parse recipe ingredients?
===
I need to parse recipe ingredients into amount, measurement, item, and description as applicable to the line, such as 1 cup flour, the peel of 2 lemons and 1 cup packed brown sugar etc. What would be the best way of doing this? I am interested in using python for the project so I am assuming using the nltk is the best bet but I am open to other languages. | 0 | [
2,
184,
92,
31,
275,
13,
103,
5478,
20,
2017,
870,
20510,
14129,
60,
800,
3726,
3726,
31,
376,
20,
2017,
870,
20510,
14129,
77,
2006,
15,
11688,
15,
9101,
15,
17,
5318,
28,
14535,
20,
14,
293,
15,
145,
28,
137,
480,
14736,
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... |
Stability of .NET serialization across different framework versions
===
A project I'm working on requires serializing a data structure before shutting down and restores its state from this serialized data when it start up again.
Last year, we were building for .NET 1.1, and ran into a tricky issue where
- our code ran on .NET 2.0
- a customer upgraded with some software that somehow set 1.1 as default
- our code ran on .NET 1.1 and was unable to deserialize its stored state
This particular issue was "resolved" by barring that particular software upgrade, and shouldn't be a problem now that we're targeting the .NET 2.0 framework (so we can't possibly run on 1.1).
What is the chance that this serialization could again change incompatibly between, 2.0 and newer frameworks? If we use `<supportedVersion>` to fix our code to 2.0.50727, what are the chances of changes between 2.0.50727.1434 and 2.0.50727.nnnn (some future release)? The data structures being serialized are arrays, maps, strings, et cetera from the standard class libraries.
Additionally, is it guaranteed that a 2.0.50727 framework will be always installed even after further .NET upgrades? Pointers to Microsoft documentation welcome. | 0 | [
2,
9307,
16,
13,
9,
2328,
5956,
1829,
464,
421,
6596,
3281,
800,
3726,
3726,
21,
669,
31,
22,
79,
638,
27,
4781,
5956,
3335,
21,
1054,
1411,
115,
19796,
125,
17,
8454,
18,
82,
146,
37,
48,
27877,
1054,
76,
32,
799,
71,
188,
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... |
Structure Vs Class in C#
===
when you create instance of class with new operator memory get allocated on heap but
when you create instance of structure with new operator wherememory get allocated
on heap or on stack ?
| 0 | [
2,
1411,
4611,
718,
19,
272,
5910,
800,
3726,
3726,
76,
42,
1600,
4851,
16,
718,
29,
78,
6022,
1912,
164,
11685,
27,
15414,
47,
76,
42,
1600,
4851,
16,
1411,
29,
78,
6022,
113,
790,
5171,
93,
164,
11685,
27,
15414,
54,
27,
7566,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Any way to ignore files coming from the repository for NTFS?
===
Ok, so at some point in time, somebody checked in some files with names that require a case sensitive file system into the trunk of a repository that I constantly check out. This of course leads to my local working copy locking up when I try to check it out (on my Windows computer). Is there any way that I can set my local subversion copy so that it will ignore any files whose names differ only in case? | 0 | [
2,
186,
161,
20,
7174,
6488,
880,
37,
14,
24869,
26,
13,
2877,
11754,
60,
800,
3726,
3726,
5854,
15,
86,
35,
109,
454,
19,
85,
15,
8861,
6505,
19,
109,
6488,
29,
1817,
30,
4077,
21,
610,
7830,
3893,
329,
77,
14,
6436,
16,
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... |
Difference between jQuery selectors "ancestor descendant" and "parent > child"
===
The following two forms of jQuery selectors seem to do the same thing:
- $("div > ul.posts")
- $("div ul.posts")
which is to select all the "ul" elements of class "posts" under "div" elements.
Is there any difference?
| 0 | [
2,
2841,
128,
487,
8190,
93,
23946,
18,
13,
7,
2416,
18,
2153,
13783,
7,
17,
13,
7,
18908,
13,
1,
850,
7,
800,
3726,
3726,
14,
249,
81,
1997,
16,
487,
8190,
93,
23946,
18,
2260,
20,
107,
14,
205,
584,
45,
13,
8,
5579,
5,
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... |
How do you determine the which interface is the hardwired LAN port on a Windows pc?
===
I'm looking for a method to acurately determine if an interface is the hardwired 802.3 ethernet port on a pc in windows.
Using ipconfig /all I can list all the interfaces, but how can I determine which interface is the hardwared one?
When I do this on my pc several entries can be listed here including VPN, Bluetooth, Wifi and the hardwired ethernet interface. | 0 | [
2,
184,
107,
42,
3746,
14,
56,
6573,
25,
14,
552,
13482,
43,
6178,
1295,
27,
21,
1936,
5168,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
2109,
20,
21,
4734,
1373,
102,
3746,
100,
40,
6573,
25,
14,
552,
13482,
43,
2972,
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... |
acts as taggable with merb?
===
Is there a acts as taggable solution out there for merb users already? | 0 | [
2,
3167,
28,
3383,
263,
579,
29,
55,
7549,
60,
800,
3726,
3726,
25,
80,
21,
3167,
28,
3383,
263,
579,
4295,
70,
80,
26,
55,
7549,
3878,
614,
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... | [
1,
1,
1,
1,
1,
1,
1,
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... |
Error Log information in VB Script while processing
===
I am having an VBScript files which runs by many instance of jobs. I need to log the error information if any error occurs in the script processing. If i maintain a log file then how can i differentiate the log file for each instances (around 10 simultaneous instances) of vb script calling.
I dont go for any db logging.
Please suggest some good ways. | 0 | [
2,
7019,
6738,
676,
19,
13,
20468,
3884,
133,
5511,
800,
3726,
3726,
31,
589,
452,
40,
13,
20468,
8741,
6488,
56,
1461,
34,
151,
4851,
16,
4844,
9,
31,
376,
20,
6738,
14,
7019,
676,
100,
186,
7019,
3690,
19,
14,
3884,
5511,
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... |
Why does instanceof return false for some literals?
===
"foo" instanceof String //=> false
"foo" instanceof Object //=> false
true instanceof Boolean //=> false
true instanceof Object //=> false
false instanceof Boolean //=> false
false instanceof Object //=> false
// the tests against Object really don't make sense
Array literals and Object literals match...
[0,1] instanceof Array //=> true
{0:1} instanceof Object //=> true
Why don't all of them? Or, why don't _none_ of them?
And, what are they an instance of, then? `Nothing()`?
It's the same in FF3, IE7, Opera, and Chrome. So, at least it's consistent. ;) | 0 | [
2,
483,
630,
4851,
1041,
788,
4997,
26,
109,
20665,
18,
60,
800,
3726,
3726,
13,
7,
4120,
111,
7,
4851,
1041,
3724,
12894,
3726,
1,
4997,
13,
7,
4120,
111,
7,
4851,
1041,
3095,
12894,
3726,
1,
4997,
1151,
4851,
1041,
9827,
413,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 join a thread that is hanging on blocking IO?
===
I have a thread running in the background that is reading events from an input device in a blocking fashion, now when I exit the application I want to clean up the thread properly, but I can't just run a pthread_join() because the thread would never exit due to the blocking IO.
How do I properly solve that situation? Should I send a pthread_kill(theard, SIGIO) or a pthread_kill(theard, SIGALRM) to break the block? Is either of that even the right signal? Or is there another way to solve this situation and let that child thread exit the blocking read?
Currently a bit puzzled since none of my googling turned up a decent solution.
This is on Linux and using pthreads. | 0 | [
2,
184,
20,
1865,
21,
9322,
30,
25,
4505,
27,
11828,
13,
1963,
60,
800,
3726,
3726,
31,
57,
21,
9322,
946,
19,
14,
2395,
30,
25,
1876,
963,
37,
40,
6367,
3646,
19,
21,
11828,
3161,
15,
130,
76,
31,
4350,
14,
3010,
31,
259,
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... |
Google's language of choice
===
What is Google's language of choice for backend development on their webapps? For the longest time I have thought it was Python. Is there a definitive source on this? | 0 | [
2,
8144,
22,
18,
816,
16,
1837,
800,
3726,
3726,
98,
25,
8144,
22,
18,
816,
16,
1837,
26,
97,
2451,
522,
27,
66,
2741,
7753,
18,
60,
26,
14,
5646,
85,
31,
57,
289,
32,
23,
20059,
9,
25,
80,
21,
15676,
1267,
27,
48,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
javascript - Firefox
===
How to debug javascript in visual studio when an asp.net application is run under mozilla firefox browser? IE supports by enabling javascript debug option . | 0 | [
2,
8247,
8741,
13,
8,
535,
18219,
800,
3726,
3726,
184,
20,
121,
16254,
8247,
8741,
19,
3458,
1120,
76,
40,
28,
306,
9,
2328,
3010,
25,
485,
131,
13,
18057,
3247,
535,
18219,
16495,
60,
13,
660,
6747,
34,
13168,
8247,
8741,
121,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Recieve socket size limits good?
===
I am writing a program in Python that will act as a server and accept data from a client, is it a good idea to impose a hard limit as to the amount of data, if so why? | 0 | [
2,
302,
10486,
195,
18482,
1072,
5887,
254,
60,
800,
3726,
3726,
31,
589,
1174,
21,
625,
19,
20059,
30,
129,
601,
28,
21,
8128,
17,
3440,
1054,
37,
21,
6819,
15,
25,
32,
21,
254,
882,
20,
18009,
21,
552,
4496,
28,
20,
14,
2006... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.