unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Unit Tests Visual Studio
===
Can anbyody tell me how to include a certain folder when running unit tests in visual studio. In the folder are xml-files needed by the tests. I can't seem to find anymore where I need to add this folder.
Thx, Lieven Cardoen aka Johlero | 0 | [
2,
1237,
4894,
3458,
1120,
800,
3726,
3726,
92,
40,
779,
18200,
494,
55,
184,
20,
468,
21,
1200,
19294,
76,
946,
1237,
4894,
19,
3458,
1120,
9,
19,
14,
19294,
50,
23504,
8,
16877,
18,
851,
34,
14,
4894,
9,
31,
92,
22,
38,
2260... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 a MySQL command to convert a string to lowercase?
===
I have a MySQL database of keywords that are presently mixed-case. However, I want to convert them all to lowercase. Is there an easy command to do this, either using MySQL or MySQL and PHP? | 0 | [
2,
25,
80,
21,
51,
18,
22402,
1202,
20,
8406,
21,
3724,
20,
987,
10325,
60,
800,
3726,
3726,
31,
57,
21,
51,
18,
22402,
6018,
16,
1246,
12827,
30,
50,
14431,
2198,
8,
10325,
9,
207,
15,
31,
259,
20,
8406,
105,
65,
20,
987,
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... |
"A control is already associated with the element" exception
===
We are migrating a web applicatin from vs05 to vs08. This application is using Telerik web controls. After I converted the project, and run, I get the exception: "A control is already associated with the element". I traced it down to a use control that has Telerik RadCombo box on it. However, I don't see anything out of place. Researching it, hasn't gotten me any results. I would appreciate any pointers.
Thanks!
| 0 | [
2,
13,
7,
58,
569,
25,
614,
1598,
29,
14,
4520,
7,
5391,
800,
3726,
3726,
95,
50,
28749,
21,
2741,
4865,
16904,
2864,
37,
4611,
4071,
20,
4611,
3099,
9,
48,
3010,
25,
568,
4338,
6639,
2741,
8671,
9,
75,
31,
3494,
14,
669,
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... |
UdpClient, Receive() right after Send() does not work?
===
Consider the following code:
client.Send(data, data.Length, endpoint);
byte[] response = client.Receive(ref endpoint);
While, according to WireShark (network sniffer), the remote host does reply with data,
the application here just waits for data forever... it does not receive the answer from the remote host for some reason.
Any ideas?
| 0 | [
2,
13,
3192,
5779,
18513,
38,
15,
2588,
5,
6,
193,
75,
2660,
5,
6,
630,
52,
170,
60,
800,
3726,
3726,
3563,
14,
249,
1797,
45,
6819,
9,
18,
2451,
5,
18768,
15,
1054,
9,
6325,
15,
241,
3132,
6,
73,
34,
591,
2558,
500,
1627,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Visual studio (2008) 'Clean Solution' option
===
What does this option do. It is accessible from the Build Menu | 0 | [
2,
3458,
1120,
13,
5,
2753,
6,
13,
22,
20254,
4295,
22,
4255,
800,
3726,
3726,
98,
630,
48,
4255,
107,
9,
32,
25,
7342,
37,
14,
1895,
11379,
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,
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... |
Debugging backwards
===
I have two questions :
1.)
While doing source level debugging (using any debugger) does nay debugger save state of some iteration/for-loop/any code executed and allow the user to go back to that previously executed code/data state at a later point of time during debugging.
The need for this is some variable/pointer is corrupted somewhere earlier in time during execution but is accessed after some time / later in the execution of code and thats when it crashes/hangs the code, so i would like to go back and see which function/at what time the variable was corrupted/wrong value computed and written to it ? Is it possible in any debugger (gcc, MSVC6.0 ...)
2.)Does any debugger/IDE have provision that when a memory address/variable is marked for "analysis", it should display which function in which file, and which code changed that memory(write), every time it is changed/written?
-AD
| 0 | [
2,
121,
16254,
2762,
12207,
800,
3726,
3726,
31,
57,
81,
2346,
13,
45,
137,
9,
6,
133,
845,
1267,
662,
121,
16254,
2762,
13,
5,
12655,
186,
121,
2345,
11356,
6,
630,
13,
10118,
121,
2345,
11356,
2079,
146,
16,
109,
23534,
118,
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... |
Mylyn type plugin for Visual Studio
===
[Mylyn][1] is a task oriented plugin that allows for example to assign a set of files to a task. Is there a Mylyn type plugin for Visual Studio?
[1]: http://www.eclipse.org/mylyn/ | 0 | [
2,
51,
4859,
1001,
10922,
108,
26,
3458,
1120,
800,
3726,
3726,
636,
915,
4859,
500,
2558,
165,
500,
25,
21,
3005,
13,
6800,
10922,
108,
30,
2965,
26,
823,
20,
13952,
21,
309,
16,
6488,
20,
21,
3005,
9,
25,
80,
21,
51,
4859,
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... |
Source for Flash based RSS1/RSS2/ATOM/RDF reader?
===
Does anyone know where to find a good, opensource RSS reader in Flash? I see lots that implement RSS or ATOM or RSS2, but none that do all of the different RSS style formats out there. I'd prefer to keep this in Flash, as I'm trying to keep this so it'll run with minimal server requirements...
Requirements:
- Parses RSS1/RSS2/ATOM/RDF, and more if possible
- Works in ActionScript 2
- Is preferabbly opensource, though I will consider commercial if it comes with source code.
Thanks,
Brad. | 0 | [
2,
1267,
26,
4433,
432,
13,
1224,
18,
8197,
1224,
18,
9298,
58,
6015,
118,
897,
410,
7765,
60,
800,
3726,
3726,
630,
1276,
143,
113,
20,
477,
21,
254,
15,
368,
12097,
13,
1224,
18,
7765,
19,
4433,
60,
31,
196,
7503,
30,
8713,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Sybase Developer Asks: How To Create a Temporary Table in Oracle?
===
I'm familiar with Sybase / SQL server, where I can create a temp. table like this:
SELECT *
INTO #temp
FROM tab1 ,
tab2
WHERE tab1.key = tab2.fkey
SELECT *
FROM #temp
WHERE field1 = 'value'
\#temp only exists for the duration of this session, and can only be seen by me.
I would like to do a similar thing in Oracle, but I'm reading about "global temporary tables", which don't sound like the same thing.
How can I do the same thing in Oracle as I'm doing in Sybase?
Thanks :)
| 0 | [
2,
10315,
8436,
10058,
3913,
45,
184,
20,
1600,
21,
4700,
859,
19,
15759,
60,
800,
3726,
3726,
31,
22,
79,
3694,
29,
10315,
8436,
13,
118,
4444,
255,
8128,
15,
113,
31,
92,
1600,
21,
13,
9577,
9,
859,
101,
48,
45,
5407,
1637,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Daylight saving changes affecting UTC conversion
===
Basically I'm converting dates stored in the database into UTC. But I've read somewhere that daylight saving rules have changed in 2007. So does the Date.ToUniversalTime() function still work correctly. Basically the dates before 2007(when the new rules came into effect) would be converted correctly but the dates after that would be not. Am I right here? Or would .Net take care of the conversion internally i.e. depending upon the different daylight saving rules? | 0 | [
2,
12344,
7599,
1693,
13808,
13,
11440,
6263,
800,
3726,
3726,
11374,
31,
22,
79,
19583,
4076,
8214,
19,
14,
6018,
77,
13,
11440,
9,
47,
31,
22,
195,
1302,
3493,
30,
12344,
7599,
1761,
57,
1015,
19,
624,
9,
86,
630,
14,
1231,
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... |
Alternatives to Access
===
Are there any alternatives to MS Access?
Requirements:
- Portable Database file
- Integrated form development for data entry
- No compiling necessary. Can be modified on the fly. | 0 | [
2,
2676,
18,
20,
1381,
800,
3726,
3726,
50,
80,
186,
2676,
18,
20,
4235,
1381,
60,
4786,
45,
13,
8,
13469,
6018,
3893,
13,
8,
5547,
505,
522,
26,
1054,
2792,
13,
8,
90,
24378,
2378,
9,
92,
44,
5372,
27,
14,
2855,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Hot Deploy a Java EAR to Minimize or Eliminate Downtime of an Application on a Server?
===
I have heard that this is what JavaRebel does but is there any other good way to deploy a new version of an EAR while allowing users to remain active on the previous version? We use JBoss for the application server... | 0 | [
2,
1047,
17617,
21,
8247,
2330,
20,
16713,
54,
10628,
125,
891,
16,
40,
3010,
27,
21,
8128,
60,
800,
3726,
3726,
31,
57,
752,
30,
48,
25,
98,
8247,
99,
3512,
630,
47,
25,
80,
186,
89,
254,
161,
20,
17617,
21,
78,
615,
16,
40... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Entity Framework model update on a remote machine
===
I'm building a web application that uses the Entity Framework. The files are located on a remote machine, the same is for the database and the web server.
In visual studio (2k8sp1), the path to the project is: \\\Server\Web\XXXX
Now, I've generated the EF entities from the database, and later I've updated the database and added there a stored procedure.
When I wanted to update my model after that in visual studio, I was getting an error message that says:
> An exception of type Systen.ArgumentException occured while attepting to update from the database. The exception message is: 'A relative path is not possible for files on different devices'.
Any ideas on how to update my model?
ps. I also cannot change my connection string in the EF model designer. | 0 | [
2,
9252,
6596,
1061,
11100,
27,
21,
5388,
1940,
800,
3726,
3726,
31,
22,
79,
353,
21,
2741,
3010,
30,
2027,
14,
9252,
6596,
9,
14,
6488,
50,
335,
27,
21,
5388,
1940,
15,
14,
205,
25,
26,
14,
6018,
17,
14,
2741,
8128,
9,
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... |
TFS 2008 checks out code automatically on edit
===
I am working on a Visual Studio 2008 project that is already added to TFS server.
I am not sure which settings and policies have been configured for the TFS (this is done by a separate dept, not developers)
Every time I make an edit to a code file , the file is checked out automatically (without explicitly checking out the code file myself)
Please help me locate this setting or policy because it is not very useful at the moment. Sometime you want to make a local change to try out something, and not necessarily check out the code.... | 0 | [
2,
13,
11720,
18,
570,
16602,
70,
1797,
7499,
27,
9392,
800,
3726,
3726,
31,
589,
638,
27,
21,
3458,
1120,
570,
669,
30,
25,
614,
905,
20,
13,
11720,
18,
8128,
9,
31,
589,
52,
562,
56,
12410,
17,
4845,
57,
74,
28895,
26,
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... |
Java extendable enumeration
===
Is there a way to write an enumeration that can be extended. I have several methods that I would like to alway have available for my enumerations. For example I use an enumeration for my database fields. I include the actual field name in the database.
public enum ORDERFIELDS
{
OrderID("Order_ID");
private String FieldName;
private ORDERFIELDS(String fname)
{
this.FieldName = fname;
}
public String getFieldName()
{
return FieldName;
}
}
| 0 | [
2,
8247,
7206,
579,
26940,
872,
800,
3726,
3726,
25,
80,
21,
161,
20,
2757,
40,
26940,
872,
30,
92,
44,
1984,
9,
31,
57,
238,
3195,
30,
31,
83,
101,
20,
493,
1443,
57,
904,
26,
51,
26940,
5757,
9,
26,
823,
31,
275,
40,
26940... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 do you use checklists for?
===
Apart from the archetypical code-review checklist, what are some good places to use checklists in software engineering? | 0 | [
2,
98,
107,
42,
275,
2631,
5739,
18,
26,
60,
800,
3726,
3726,
2629,
37,
14,
13,
21943,
22371,
1797,
8,
99,
4725,
2631,
5739,
15,
98,
50,
109,
254,
1489,
20,
275,
2631,
5739,
18,
19,
2306,
1552,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
javafx on client side
===
Do the clients need something else than a proper jdk and javafx compliant browser to visit javafx applets? | 0 | [
2,
8247,
16488,
27,
6819,
270,
800,
3726,
3726,
107,
14,
7421,
376,
301,
962,
119,
21,
4119,
487,
43,
197,
17,
8247,
16488,
13,
25509,
16495,
20,
2139,
8247,
16488,
4037,
38,
18,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Oracle PL/SQL - Are NO_DATA_FOUND Exceptions bad for stored procedure performance?
===
I'm writing a stored procedure that needs to have a lot of conditioning in it. With the general knowledge from C#.NET coding that exceptions can hurt performance, I've always avoided using them in PL/SQL as well. My conditioning in this stored proc mostly revolves around whether or not a record exists, which I could do one of two ways:
SELECT COUNT(*) INTO var WHERE condition;
IF var > 0 THEN
SELECT NEEDED_FIELD INTO otherVar WHERE condition;
....
<b>-or-</b>
SELECT NEEDED_FIELD INTO var WHERE condition;
EXCEPTION
WHEN NO_DATA_FOUND
....
The second case seems a bit more elegant to me, because then I can use NEEDED_FIELD, which I would have had to select in the first statement after the condition in the first case. Less code. But if the stored procedure will run faster using the COUNT(*), then I don't mind typing a little more to make up processing speed.
Any hints? Am I missing another possibility? | 0 | [
2,
15759,
12443,
118,
18,
22402,
13,
8,
50,
90,
1,
18768,
1,
12235,
13392,
896,
26,
8214,
7004,
956,
60,
800,
3726,
3726,
31,
22,
79,
1174,
21,
8214,
7004,
30,
2274,
20,
57,
21,
865,
16,
19124,
19,
32,
9,
29,
14,
297,
1918,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 3.5 SP1 Bootstrapper not found for Setup
===
I am getting a warning when trying to include the .net 3.5 sp1 prerequisite for my setup project. The warning states Prerequisite could not found for bootstrapping.
Any suggestions?
Thanks | 0 | [
2,
13,
9,
2328,
203,
9,
264,
3782,
165,
5894,
1939,
8763,
52,
216,
26,
18161,
800,
3726,
3726,
31,
589,
1017,
21,
3590,
76,
749,
20,
468,
14,
13,
9,
2328,
203,
9,
264,
3782,
165,
782,
99,
3003,
9097,
26,
51,
18161,
669,
9,
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... |
perl script warnings: switch or use statement?
===
is there a difference between the two examples below for beginning a perl script? if so, when would i use one over the other?
example 1:
#!/usr/bin/perl
use warnings;
example 2:
#!/usr/bin/perl -w | 0 | [
2,
416,
255,
3884,
3590,
18,
45,
5521,
54,
275,
3331,
60,
800,
3726,
3726,
25,
80,
21,
2841,
128,
14,
81,
3770,
1021,
26,
997,
21,
416,
255,
3884,
60,
100,
86,
15,
76,
83,
31,
275,
53,
84,
14,
89,
60,
823,
6352,
6926,
187,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
grep --exclude/--include syntax (do not grep through certain files)
===
I'm looking for the string "foo=" (without quotes) in text files in a directory tree. It's on a common Linux machine, I have bash shell:
grep -ircl "foo=" *
In the directories are also many binary files which match "foo=". As these results are not relevant and slow down the search, I want grep to skip searching these files (mostly JPEG and PNG images): how would I do that?
I know there are the --exclude=PATTERN and --include=PATTERN options, but so far haven't found the pattern syntax - none of these work as expected:
grep -ircl --exclude="png" "foo=" *
grep -ircl --exclude=".png" "foo=" *
grep -ircl --exclude="\.png" "foo=" *
grep -ircl --exclude="png$" "foo=" *
grep -ircl --exclude="^.*png$" "foo=" *
manpage of grep says:
--include=PATTERN Recurse in directories only searching file matching PATTERN.
--exclude=PATTERN Recurse in directories skip file matching PATTERN.
Searching on *grep include*, *grep include exclude*, *grep exclude* and variants did not find anything relevant
If there's a better way of grepping only in certain files, I'm all for it; moving the offending files is not an option, I also can't search only certain directories (the directory structure is a big mess, with everything everywhere). | 0 | [
2,
5604,
306,
13,
8,
8,
1706,
150,
17405,
118,
8,
8,
22640,
22649,
13,
5,
537,
52,
5604,
306,
120,
1200,
6488,
6,
800,
3726,
3726,
31,
22,
79,
699,
26,
14,
3724,
13,
7,
4120,
111,
3726,
7,
13,
5,
14506,
18901,
6,
19,
1854,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Creating a byte array from a stream
===
What is the preffered method for creating a byte array from an input stream? Here is my current solution with .NET 3.5, is it still a better idea to read and write chunks of the stream?
Stream s;
byte[] b;
using (BinaryReader br = new BinaryReader(s)) {
b = br.ReadBytes(s.Length);
} | 0 | [
2,
2936,
21,
34,
591,
7718,
37,
21,
3766,
800,
3726,
3726,
98,
25,
14,
782,
6866,
69,
2109,
26,
2936,
21,
34,
591,
7718,
37,
40,
6367,
3766,
60,
235,
25,
51,
866,
4295,
29,
13,
9,
2328,
203,
9,
264,
15,
25,
32,
174,
21,
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 can I stop ASP.NET Menu controls from generating inline html style elements
===
I have a master page that contains an ASP.NET server side Menu control (System.Web.UI.WebControls.Menu)
I *am* using the CSSFriendly adapters from here
http://www.asp.net/CSSAdapters/Menu.aspx
and they do make the rendered HTML much cleaner however I am still getting inline styles output into the HEAD element in the HTML like this
<style type="text/css">
.ctl00_SiteHeader1_TabBar1_Menu1_0 { background-color:white;visibility:hidden;display:none;position:absolute;left:0px;top:0px; }
.ctl00_SiteHeader1_TabBar1_Menu1_1 { text-decoration:none; }
.ctl00_SiteHeader1_TabBar1_Menu1_2 { }
.ctl00_LeftColumnContent_LeftHandNavigator1_Menu1_0 { text-decoration:none; }
</style>
</head>
<body>
I thik these styles are being generated by ASP.NET, I don't think I need them as I am using the CSSAdapters so is there any way of stopping them from being generated?
Derek
| 0 | [
2,
184,
92,
31,
747,
28,
306,
9,
2328,
11379,
8671,
37,
13500,
19,
1143,
13,
15895,
1034,
2065,
800,
3726,
3726,
31,
57,
21,
1129,
2478,
30,
1588,
40,
28,
306,
9,
2328,
8128,
270,
11379,
569,
13,
5,
10724,
9,
14113,
9,
5661,
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... |
cross-domain hosted Silverlight app not loading in a https webpage
===
I want to provide silverlight app to my customer while hosting the app at my own site for streamlined maintenance.
- my Silverlight .xap is hosted in, let say, domain *me-supplier.com*
- i want to embed it in, let say, domain *my-customer.com*
It works perfectly for *http://my-customer.com*, not for ***https**://my-customer.com*
- i have added the (*me-supplier.com* hosted) cross domain silverlight policy file to allow *my-customer.com*
- i have configured the mime types for .xap
- the silverlight app needs html dom access so the iframe approach is not viable i believe.
this works for javascript code, so why not for silverlight ? any idea, workaround ? | 0 | [
2,
919,
8,
537,
6232,
2812,
1172,
3130,
4865,
52,
12797,
19,
21,
7775,
18,
2741,
6486,
800,
3726,
3726,
31,
259,
20,
1181,
1172,
3130,
4865,
20,
51,
7705,
133,
10637,
14,
4865,
35,
51,
258,
689,
26,
29274,
5010,
9,
13,
8,
51,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Where to look for white papers on software development?
===
I'm interested on following the formal research on universities and academia, related to software development, and I wonder if anyone knows some centralized rss feed (blogs maybe) , mailing list, newsgroup or anything that keeps updating on the subject.
I want to keep up to date on the field and discover sources, so if you have only one source or knows a couple of diferent sites with public access on the subject, please share. =) | 0 | [
2,
113,
20,
361,
26,
359,
3747,
27,
2306,
522,
60,
800,
3726,
3726,
31,
22,
79,
3158,
27,
249,
14,
3337,
527,
27,
4165,
17,
19450,
15,
1597,
20,
2306,
522,
15,
17,
31,
2666,
100,
1276,
3620,
109,
25176,
13,
1224,
18,
4063,
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... |
Operations on arbitrary value types
===
This [article][1] describes a way, in C#, to allow the addition of arbitrary value types which have a + operator defined for them. In essence it allows the following code:
public T Add(T val1, T val2)
{
return val1 + val2;
}
This code does not compile as there is no guarantee that the T type has a definition for the '+' operator, but the effect is achieved with code like this:
public T Add(T val1, T val2)
{
//Num<T> defines a '+' operation which returns a value of type T
return (new Num<T>(val1) + new Num<T>(val2));
}
Follow the link to see how the Num class achieves this. Anyways, on to the question. Is there any way to achieve the same effect in C or C++? For the curious, the problem I'm trying to solve is to allow a CUDA kernel to be more flexible/general by allowing it to operate on more types.
[1]: http://themechanicalbride.blogspot.com/2008/04/using-operators-with-generics.html | 0 | [
2,
1311,
27,
17237,
1923,
2551,
800,
3726,
3726,
48,
636,
20360,
500,
2558,
165,
500,
4359,
21,
161,
15,
19,
272,
5910,
15,
20,
1655,
14,
848,
16,
17237,
1923,
2551,
56,
57,
21,
2754,
6022,
2811,
26,
105,
9,
19,
11887,
32,
2965,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
User Interface design books/resources for programmers
===
I'm going to make my monthly trip to the bookstore soon and I'm kind of interested in learning some user interface and/or design stuff - mostly web related, what are some good books I should look at? One that I've seen come up frequently in the past is <a href="http://www.amazon.com/Dont-Make-Me-Think-Usability/dp/0321344758/ref=sr_1_1?ie=UTF8&s=books&qid=1224596398&sr=1-1">Don't Make Me Think</a>, which looks promising.
I'm aware of the fact that programmers often don't make great designers, and as such this is more of a potential hobby thing than a move to be a professional designer.
I'm also looking for any good web resources on this topic. I subscribed to Jakob Nielsen's <a href="http://www.useit.com/alertbox/">Alertbox newsletter</a>, for instance, although it seems to come only once a month or so.
Thanks!
Somewhat related questions:
http://stackoverflow.com/questions/75863/what-are-the-best-resources-for-designing-user-interfaces
http://stackoverflow.com/questions/7973/user-interface-design | 4 | [
2,
4155,
6573,
704,
964,
118,
99,
12097,
18,
26,
17968,
18,
800,
3726,
3726,
31,
22,
79,
228,
20,
233,
51,
6460,
2305,
20,
14,
21899,
651,
17,
31,
22,
79,
825,
16,
3158,
19,
2477,
109,
4155,
6573,
17,
118,
248,
704,
3217,
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... |
Returning a gif image from a method
===
I am creating an application in java which will be the part of an external application. My application contains a viewport which shows some polygons and stuff like that. The external application needs to get the image of the viewport in gif format. For that it calls a method in an interface (implemented by my application) and my application returns the image. The external application needs to store the image in database (or something related to it which I dont need to worry about).
My question is:- What should be the data container type of the image when my application send it to the external application? I mean what should be the return type of the method?
Currently my gif encoder class returns a byte array. Is there any other 'better' option? | 0 | [
2,
2485,
21,
489,
821,
1961,
37,
21,
2109,
800,
3726,
3726,
31,
589,
2936,
40,
3010,
19,
8247,
56,
129,
44,
14,
141,
16,
40,
4886,
3010,
9,
51,
3010,
1588,
21,
1418,
1993,
56,
1285,
109,
21309,
18,
17,
3217,
101,
30,
9,
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... |
How to tell if Excel Application is in cell-edit mode?
===
I'm writing an Excel Addin using COM Interop from .net. I have a command that pops up a dialog, and from the dialog I do some work like collecting data from the used range of several sheets. The problem is that if a cell is in edit mode, some of the calls that I need to make will throw exceptions. I would like a way of determining before-hand that Excel is in edit mode, so that I can warn the user to finish editing the cell first.
Any ideas? | 0 | [
2,
184,
20,
494,
100,
20700,
3010,
25,
19,
1667,
8,
69,
242,
3740,
60,
800,
3726,
3726,
31,
22,
79,
1174,
40,
20700,
3547,
108,
568,
13,
960,
1480,
2594,
37,
13,
9,
2328,
9,
31,
57,
21,
1202,
30,
1675,
18,
71,
21,
28223,
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... |
MS Access Alternative
===
###Background
I work for a large organisation which has thousands of MS Access applpications floating around. I didn't write any of these - in fact, most of the original authors have long since left the company - but from time to time another Access app lands on my desk for support. I would _soooo_ love to replace access with a different solution.
###Requirement
I know that there are several good alternatives for the database part of MS Access (the Jet database), such as SQLite, MySQL, VistaDB, etc.
What I would like to know is: Is there anything that will replace the front end part of MS Access?
I.e. Something which can be used to build forms, write simple scripts and queries, etc?
###For extra credit
what I would _really_ love to find is something which can read in an MDB file and output something like C# which replicates the functionality. (Or any language - not fussy).
I hope this is all clear. If not, please post a comment and I'll re-write/add detail. | 0 | [
2,
4235,
1381,
2676,
800,
3726,
3726,
6926,
5910,
5910,
1958,
8810,
31,
170,
26,
21,
370,
4080,
56,
63,
3805,
16,
4235,
1381,
4865,
255,
7763,
7504,
8319,
140,
9,
31,
223,
22,
38,
2757,
186,
16,
158,
13,
8,
19,
837,
15,
127,
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... |
ASP.NET MVC: PathInfo Limit?
===
One of the limitations of ASP.NET 2.0 was that PathInfo was limited to 255 characters. Is that limit a problem in ASP.NET MVC urls, or is there any sort of length limit with ASP.NET MVC routing urls?
| 0 | [
2,
28,
306,
9,
2328,
307,
8990,
45,
2013,
108,
4120,
4496,
60,
800,
3726,
3726,
53,
16,
14,
14070,
16,
28,
306,
9,
2328,
172,
9,
387,
23,
30,
2013,
108,
4120,
23,
1317,
20,
13,
20038,
1766,
9,
25,
30,
4496,
21,
1448,
19,
28,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Guidelines for using the ASP.NET Wizard efficiently
===
A web app our group has put together uses the ASP.NET Wizard control. Each step in the wizard contains a corresponding custom UserControl.
The trouble is that as you go through the wizard steps, *all* the UserControls are loaded on each step, rather than just the one used in that step. That doesn't seem right to me.
So...is there anybody here that's done a lot of work with the Wizard control and can give some guidelines on how to use it correctly, and keep it from loading way too much junk with each step? | 0 | [
2,
12629,
26,
568,
14,
28,
306,
9,
2328,
10276,
20519,
800,
3726,
3726,
21,
2741,
4865,
318,
214,
63,
442,
429,
2027,
14,
28,
306,
9,
2328,
10276,
569,
9,
206,
1424,
19,
14,
10276,
1588,
21,
7265,
5816,
4155,
12898,
9,
14,
2572,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Target Framework Mismatch
===
When adding a reference to a project I sometimes see the message...
"The Target Framework version for the project is higher than the current project Target Framework version. Would you like to add this reference to your project anyway?"
If I say 'Yes' what potential issue could I be storing up for myself? | 0 | [
2,
2935,
6596,
2462,
12280,
800,
3726,
3726,
76,
4721,
21,
2801,
20,
21,
669,
31,
1030,
196,
14,
2802,
9,
9,
9,
13,
7,
124,
2935,
6596,
615,
26,
14,
669,
25,
1184,
119,
14,
866,
669,
2935,
6596,
615,
9,
83,
42,
101,
20,
3547... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 JMS good for?
===
I'm looking for (simple) examples of problems for which JMS is a good solution, and also reasons why JMS is a good solution in these cases. In the past I've simply used the database as a means of passing messages from A to B when the message cannot necessarily be processed by B immediately.
A hypothetical example of such a system is where all newly registered users should be sent a welcome e-mail within 24 hours of registration. For the sake of argument, assume the DB does not record the time when each user registered, but instead a reference (foreign key) to each new user is stored in the pending_email table. The e-mail sender job runs once every 24 hours, sends an e-mail to all the users in this table, then deletes all the pending_email records.
This seems like the kind of problem for which JMS should be used, but it's not clear to me what benefit JMS would have over the approach I've described. One advantage of the DB approach is that the messages are persistent. I understand that JMS message queues can also be persisted, but in that case there seems to be little difference between JMS and the "database as message queue" approach I've described?
What am I missing?
- Don | 0 | [
2,
98,
25,
487,
79,
18,
254,
26,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
13,
5,
24629,
6,
3770,
16,
1716,
26,
56,
487,
79,
18,
25,
21,
254,
4295,
15,
17,
67,
2932,
483,
487,
79,
18,
25,
21,
254,
4295,
19,
158,
1871,
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... |
How to format numbers in JavaScript?
===
How to format numbers in JavaScript? | 0 | [
2,
184,
20,
2595,
2116,
19,
8247,
8741,
60,
800,
3726,
3726,
184,
20,
2595,
2116,
19,
8247,
8741,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How to use MySQL prepared statement caching?
===
How do i take advantage of MySQL's ability to cache prepared statements?
One reason to use prepared statements is that there is no need to send the prepared statement itself multiple times if the same prepared statement is to be used again.
Class.forName("com.mysql.jdbc.Driver");
Connection conn = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/mydb" +
"?cachePrepStmts=true", "user", "pass");
for (int i = 0; i < 5; i++) {
PreparedStatement ps = conn.prepareStatement("select * from MYTABLE where id=?");
ps.setInt(1, 1);
ps.execute();
}
conn.close()
When running the above Java example I see 5 pairs of Prepare and Execute commands in the mysqld log file. Moving the ps assignment outside of the loop results in a single Prepare and 5 Execute commands of course. The connection parameter "cachePrepStmts=true" doesn't seem to make any difference here.
When running a similar program using Spring and Hibernate the number of Prepare commands sent (1 or 5) depends on whether the cachePrepStmts connection parameter is enabled. How does Hibernate execute prepared statements to take advantage of the cachePrepStmts setting? Is it possible to mimic this using pure JDBC?
I was running this on MySQL Server 4.1.22 and mysql-connector-java-5.0.4.jar | 0 | [
2,
184,
20,
275,
51,
18,
22402,
3268,
3331,
1658,
7192,
60,
800,
3726,
3726,
184,
107,
31,
247,
3314,
16,
51,
18,
22402,
22,
18,
2165,
20,
16522,
3268,
9015,
60,
53,
1215,
20,
275,
3268,
9015,
25,
30,
80,
25,
90,
376,
20,
2660... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 expose an EJB as a webservice that will later let me keep client compatibility when ejb changes ?
===
Lots of frameworks let me expose an ejb as a webservice.
But then 2 months after publishing the initial service I need to change the ejb or any part of its interface. I still have clients that need to access the old interface, so I obviously need to have 2 webservices with different signatures.
Anyone have any suggestions on how I can do this, preferably letting the framework do the grunt work of creating wrappers and copying logic (unless there's an even smarter way).
| 0 | [
2,
184,
20,
13833,
40,
13,
10022,
220,
28,
21,
2741,
11449,
30,
129,
138,
408,
55,
643,
6819,
13,
21618,
76,
13,
10022,
220,
1693,
13,
60,
800,
3726,
3726,
7503,
16,
6596,
18,
408,
55,
13833,
40,
13,
10022,
220,
28,
21,
2741,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Drag WPF Popup control
===
the WPF Popup control is nice, but somewhat limited in my opinion. is there a way to "drag" a popup around when it is opened (like with the DragMove() method of windows)?
can this be done without big problems or do i have to write a substitute for the popup class myself?
thanks | 0 | [
2,
5501,
619,
7721,
1675,
576,
569,
800,
3726,
3726,
14,
619,
7721,
1675,
576,
569,
25,
2210,
15,
47,
4131,
1317,
19,
51,
4052,
9,
25,
80,
21,
161,
20,
13,
7,
43,
11208,
7,
21,
1675,
576,
140,
76,
32,
25,
520,
13,
5,
1403,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 create 7-Zip archives with .NET?
===
How can I create 7-Zip files from my C# console application? | 0 | [
2,
184,
107,
31,
1600,
453,
8,
2553,
306,
8111,
29,
13,
9,
2328,
60,
800,
3726,
3726,
184,
92,
31,
1600,
453,
8,
2553,
306,
6488,
37,
51,
272,
5910,
8650,
3010,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
ASP.NET Tab Controls
===
I'm currently attempting to create a tabbed interface in a web application, and based on my search, there aren't any 'built in' tab controls in ASP.NET. There are some in the [ASP.NET AJAX][1] downloadable toolkit, as well as a wealth of 'pay for use' third party Tab Controls.
My question is: What Tab control have you used for ASP.NET applications, and why do you use it?
[1]: http://www.asp.net/ajax/ | 0 | [
2,
28,
306,
9,
2328,
6523,
8671,
800,
3726,
3726,
31,
22,
79,
871,
6314,
20,
1600,
21,
6523,
4283,
6573,
19,
21,
2741,
3010,
15,
17,
432,
27,
51,
2122,
15,
80,
4847,
22,
38,
186,
13,
22,
8607,
19,
22,
6523,
8671,
19,
28,
306... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 simplest way of adding one to a binary string in perl?
===
I have a variable that contains a 4 byte, network-order, IPv4 address (this was created using pack and the integer representation). I have another variable, also 4 byte network-order, subnet. I'm trying to add them together and add one to get the first IP in the subnet.
To get the ascii representation, I can do inet_ntoa($ip&$netmask) to get the base address, but it's an error to do inet_ntoa((($ip&$netmask)+1) - I get a message like:
Argument "\n\r&\0" isn't numeric in addition (+) at test.pm line 95.
So what's happening, the best as I can tell, is it's looking at the 4 bytes, and seeing that the 4 bytes don't represent a numeric string, and then refusing to add 1.
Another way of putting it: What I want it to do is add 1 to the least significant byte, which I know is the 4th byte - that is, I want to take the string "\n\r&\0" and end up with the string "\n\r&\1". What's the simplest way of doing that?
Is there a way to do this without having to unpack and re-pack the variable? | 0 | [
2,
98,
22,
18,
14,
24384,
161,
16,
4721,
53,
20,
21,
14171,
3724,
19,
416,
255,
60,
800,
3726,
3726,
31,
57,
21,
7612,
30,
1588,
21,
268,
34,
591,
15,
982,
8,
7861,
15,
31,
10166,
300,
3218,
13,
5,
1565,
23,
679,
568,
3607,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 update a label that is in a ControlTemplate of a Toolbar in WPF?
===
I have a ControlTemplate that is made up of a ToolBarTray and a ToolBar. In my ToolBar, I have several buttons and then a label. I want to be able to update the label in my toolbar with something like "1 of 10"
My first thought is to programatically find the label and set it, but I'm reading that this should be done with Triggers. I am having a hard time understanding how to accomplish this. Any ideas?
<Style x:Key="DocViewerToolBarStyle" TargetType="{x:Type ContentControl}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ContentControl}">
<ToolBarTray... />
<ToolBar.../>
<Button../>
<Button..>
<Label x:Name="myStatusLabel" .. />
| 0 | [
2,
184,
107,
31,
11100,
21,
1899,
30,
25,
19,
21,
569,
9577,
6554,
16,
21,
5607,
1850,
19,
619,
7721,
60,
800,
3726,
3726,
31,
57,
21,
569,
9577,
6554,
30,
25,
117,
71,
16,
21,
5607,
1850,
38,
2787,
17,
21,
5607,
1850,
9,
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... |
BaseType of a Basetype
===
this is my first question here so I hope I can articulate it well and hopefully it won't be too mind-numbingly easy.
I have the following class *SubSim* which extends *Sim*, which is extending *MainSim*. In a completely separate class (and library as well) I need to check if an object being passed through is a type of *MainSim*. So the following is done to check;
<pre>
Type t = GetType(sim);
//in this case, sim = SubSim
if (t != null)
{
return t.BaseType == typeof(MainSim);
}
</pre>
Obviously *t.BaseType* is going to return *Sim* since *Type.BaseType* gets the type from which the current Type directly inherits.
Short of having to do *t.BaseType.BaseType* to get *MainSub*, is there any other way to get the proper type using .NET libraries? Or are there overrides that can be redefined to return the main class?
Thank you in advance | 0 | [
2,
1000,
4474,
16,
21,
1000,
4474,
800,
3726,
3726,
48,
25,
51,
64,
1301,
235,
86,
31,
1376,
31,
92,
18291,
32,
134,
17,
13416,
32,
230,
22,
38,
44,
266,
594,
8,
6336,
8136,
102,
2010,
9,
31,
57,
14,
249,
718,
1637,
7563,
86... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Webform_SaveScrollPositionSubmit is not defined
===
Cut a short story even shorter, Have a asp.net page with MaintainScrollPositionOnPostback="true" in the page directive (And I tried setting the same to true in page_load), but I get the above javascript error (Webform_SaveScrollPositionSubmit is not defined) and im guessing the page dosent scroll because that js function is "not defined"...
Using asp.net 2.0 and firefox 3...dosent work in internut exploader too. Have tried running aspnet_regiis -c, but no joy... | 0 | [
2,
2741,
4190,
1,
19863,
3862,
8694,
9339,
7563,
5130,
25,
52,
2811,
800,
3726,
3726,
1077,
21,
502,
609,
166,
7622,
15,
57,
21,
28,
306,
9,
2328,
2478,
29,
9767,
150,
8694,
9339,
218,
6962,
1958,
3726,
7,
13398,
7,
19,
14,
2478... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 difference between creating a UNIQUE index as "index" or as "constraint" in SQL Server?
===
When creating an index over a column that is going to be UNIQUE (but not the primary key of the table), SQL server let's me choose a few options:
1) I can choose for it to be a Constraint or an Index.
I'm guessing this means that if I set it as constraint, it won't use it when querying, only when writing. However, the only efficient way I can think of for SQL Server to enforce that constraint is by actually building an index. What is the use for this option?
2) Also, if I set it as "index", it let's me specify that it should ignore duplicate keys.
This is the most puzzling for me...
I again guess it means the opposite of constraint. It probably means "use it when querying, but don't even check when writing".
But then why would I set it as UNIQUE?
I'm guessing there are some optimizations SQL Server can do, but i'd like to understand it better.
Does anyone know what exactly SQL Server does with these options?
What's the use case for setting an index to be Unique, but ignore duplicate keys?
NOTE: This is for SQL Server 2000
Thanks! | 0 | [
2,
98,
22,
18,
14,
2841,
128,
2936,
21,
2619,
4348,
28,
13,
7,
25671,
7,
54,
28,
13,
7,
12124,
11809,
38,
7,
19,
4444,
255,
8128,
60,
800,
3726,
3726,
76,
2936,
40,
4348,
84,
21,
4698,
30,
25,
228,
20,
44,
2619,
13,
5,
811... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 speed up WPF programs?
===
I love programming with and for Windows Presentation Framework. Mostly I write browser-like apps using WPF and XAML.
But what really annoys me is the slowness of WPF. A simple page with only a few controls loads fast enough, but as soon as a page is a teeny weeny bit more complex, like containing a lot of data entry fields, one or two tab controls, and stuff, it gets painful.
Loading of such a page can take more than one second. Seconds, indeed, especially on not so fast computers (read: the customers computers) it can take 10 or more seconds for a page to display.
This is so mean! They give me this beautiful framework, but make it so excruciangly slow so I'll have to apologize to our customers all the time!
My Question:
1. what do you do to speed up WPF?
2. How do you profile bottlenecks (the
profiler output for WPF is not
helpful).
3. How do you deal with the slowness?
| 0 | [
2,
184,
20,
1362,
71,
619,
7721,
1726,
60,
800,
3726,
3726,
31,
339,
3143,
29,
17,
26,
1936,
6364,
6596,
9,
1555,
31,
2757,
16495,
8,
1403,
4865,
18,
568,
619,
7721,
17,
13,
6791,
8184,
9,
47,
98,
510,
13,
28328,
18,
55,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Has Microsoft paid support been worth it to you?
===
I saw this quote in [this question][1]:
> MS support is poor, except when you've
> paid for a support contract... then
> its very very good. – gbjbaanb
This got me thinking. My company has had 2 support incidents with Microsoft a few months ago (before Stackoverflow was live). In both cases, we were pushing the limits of the SharePoint system we were building, and the API did not expose events to let us know when operations were completed. Both times, Microsoft's response was to tell us to add a Thread.Sleep() call and just wait for the operation to finish.
Now, I am all for the community working together to answer questions, but sometimes there just aren't answers to your question available online.
For the times when you can't find an answer, has paid support been worth it to you?
If you have had success with Microsoft paid support, please share what type of problem it was. I am trying to understand exactly what to expect from a support incident.
[1]: http://stackoverflow.com/questions/221716/most-large-companies-prefer-wisa-over-lamp-why | 0 | [
2,
63,
7099,
2192,
555,
74,
2715,
32,
20,
42,
60,
800,
3726,
3726,
31,
441,
48,
16371,
19,
636,
1565,
1301,
500,
2558,
165,
500,
45,
13,
1,
4235,
555,
25,
1696,
15,
1613,
76,
42,
22,
195,
13,
1,
2192,
26,
21,
555,
1305,
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... |
[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
===
[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
I got this error when trying to run a query in SQL server query analyser .
What is the reason ? | 0 | [
2,
636,
22019,
12980,
500,
2558,
5648,
7229,
4444,
255,
8128,
2425,
500,
1020,
2929,
20,
2853,
420,
37,
4444,
255,
8128,
800,
3726,
3726,
636,
22019,
12980,
500,
2558,
5648,
7229,
4444,
255,
8128,
2425,
500,
1020,
2929,
20,
2853,
420,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
In C#, if 2 processes are reading and writing to the same file, what is the best way to avoid process locking exceptions?
===
With the following file reading code:
using (FileStream fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.None))
{
using (TextReader tr = new StreamReader(fileStream))
{
string fileContents = tr.ReadToEnd();
}
}
And the following file write code:
using (TextWriter tw = new StreamWriter(fileName))
{
tw.Write(fileContents);
tw.Close();
}
The following exception details are seen:
> The process cannot access the file
> 'c:\temp\myfile.txt' because it is
> being used by another process.
What is the best way of avoiding this? Does the reader need to retry upon receipt of the exception or is there some better way?
Note that the reader process is using a *FileSystemWatcher* to know when the file has changed.
Also note that, in this instance, I'm **not** looking for alternatives ways of sharing strings between the 2 processes.
| 0 | [
2,
19,
272,
5910,
15,
100,
172,
5102,
50,
1876,
17,
1174,
20,
14,
205,
3893,
15,
98,
25,
14,
246,
161,
20,
2658,
953,
17538,
13392,
60,
800,
3726,
3726,
29,
14,
249,
3893,
1876,
1797,
45,
568,
13,
5,
16877,
11260,
3893,
11260,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 Eclipse launch configurations programmatically?
===
I'm finding it difficult to phrase this question well, as there are quite a few generic terms (run, configuration, launch, etc.). Here goes:
You can [save run configurations in a `.launch` file][1]. (in the Run Configuration Dialog, under the Common tab, Save as a shared file.
We check these in to SVN. The developers can pass them around, and it helps getting new devs running a working application quicker.
I'd like to check these out as part of our build and use them to programatically run the application, the tests, etc, without spinning up the whole IDE.
What would be the best way to run a `.launch` file outside of the UI?
[1]: http://eclipsesnippets.blogspot.com/2007/07/tip-creating-and-sharing-launch.html | 0 | [
2,
184,
20,
485,
11652,
3394,
8091,
18,
625,
6732,
1326,
60,
800,
3726,
3726,
31,
22,
79,
3007,
32,
1956,
20,
6845,
48,
1301,
134,
15,
28,
80,
50,
1450,
21,
310,
12733,
1663,
13,
5,
3169,
15,
8091,
15,
3394,
15,
2722,
9,
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... |
Any way to add some default assemblies to resolve types from in Unity / ObjectBuilder?
===
I'm working on my 1st project using MS Unity IoC framework.
If I have this in my unity configuration:
<container name="TestBusiness">
<types>
<type type="PFServer.DataAccess.TestDataAccess" />
Then I get the error:
> Could not load type
> 'PFServer.DataAccess.TestDataAccess'
> from assembly
> 'Microsoft.Practices.Unity.Configuration,
> Version=1.1.0.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35'.
However, if I add the assembly name to the type definition:
<container name="TestBusiness">
<types>
<type type="PFServer.DataAccess.TestDataAccess, PFServer" />
Then it works fine. Is there any way to add some default set of assemblies to load types from? The odd thing in this case is that "PFServer.dll" is the assembly that contains all this configuration anyway. I find it odd that the current assembly isn't in the path to resolve objects... Or am I just doing something wrong?
| 0 | [
2,
186,
161,
20,
3547,
109,
12838,
21066,
20,
9854,
2551,
37,
19,
8385,
13,
118,
3095,
20904,
60,
800,
3726,
3726,
31,
22,
79,
638,
27,
51,
137,
384,
669,
568,
4235,
8385,
31,
2499,
6596,
9,
100,
31,
57,
48,
19,
51,
8385,
8091... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Getting the stack trace of run-away Java thread
===
On my busiest production installation, on occasion I get a single thread that seems to get stuck in an infinite loop. I've not managed to figure out who is the culprit, after much research and debugging, but it seems like it should be possible. Here are the gory details:
***Current debugging notes:***
1) **ps -eL 18975** shows me the the Linux pid the problem child thread, 19269
$ps -eL | grep 18975
...
PID LWP TTY TIME CMD
18975 18994 ? 00:00:05 java
18975 19268 ? 00:00:00 java
18975 19269 ? 05:16:49 java
18975 19271 ? 00:01:22 java
18975 19273 ? 00:00:00 java
...
2) **jstack -l 18975** says there are no deadlocks, **jstack -m 18975** does not work
3) **jstack -l 18975** does give me the stack trace for all my threads (~400). Example thread stack:
<pre>"http-342.877.573.944-8080-360" daemon prio=10 tid=0x0000002adaba9c00 nid=0x754c in Object.wait() [0x00000000595bc000..0x00000000595bccb0]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0000002ab7f776d0> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
at java.lang.Object.wait(Object.java:485)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416)
- locked <0x0000002ab7f776d0> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442)
at java.lang.Thread.run(Thread.java:619)
</pre>
4) The ps -eL output's thread ID does not match the output from jstack, or at least I cannot see it. (jstack documentation is a bit sparse.)
5) There are no heavy IO, memory usage or other corresponding activity clues to work with.
***Platform:***
* Java 6
* Tomcat 6
* RHEL 4 (64-bit)
Does anybody know how I can make that connection from the linux ps output to my problem child java thread? So close, yet so far...
| 0 | [
2,
1017,
14,
7566,
5565,
16,
485,
8,
5533,
8247,
9322,
800,
3726,
3726,
27,
51,
23838,
637,
7758,
15,
27,
5434,
31,
164,
21,
345,
9322,
30,
2206,
20,
164,
4549,
19,
40,
9698,
5293,
9,
31,
22,
195,
52,
1471,
20,
1465,
70,
72,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Garbage collection and runtime type information
===
[The fixnum question][1] brought my mind to an other question I've wondered for a long time.
[1]: [http://stackoverflow.com/questions/106597/why-are-fixnums-in-emacs-only-29-bits]
Many online material about garbage collection does not tell about how runtime type information can be implemented. Therefore I know lots about all sorts of garbage collectors, but not really about how I can implement them.
The fixnum solution is actually quite nice, it's very clear which value is a pointer and which isn't. What other commonly used solutions for storing type information there is?
Also, I wonder about fixnum -thing. Doesn't that mean that you are being limited to fixnums on every array index? Or is there some sort of workaround for getting full 64-bit integers? | 0 | [
2,
15024,
1206,
17,
485,
891,
1001,
676,
800,
3726,
3726,
636,
124,
6098,
6336,
1301,
500,
2558,
165,
500,
809,
51,
594,
20,
40,
89,
1301,
31,
22,
195,
3519,
26,
21,
175,
85,
9,
636,
165,
500,
45,
636,
21127,
6903,
25325,
2549,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 2005 - Error_Message() not showing full message
===
I have encapsulated a backup database command in a Try/Catch and it appears that the error message is being lost somewhere. For example:
BACKUP DATABASE NonExistantDB TO DISK = 'C:\TEMP\NonExistantDB.bak'
..gives error:
***Could not locate entry in sysdatabases for database 'NonExistantDB'. No entry found with that name. Make sure that the name is entered correctly. BACKUP DATABASE is terminating abnormally.***
Whereas:
BEGIN TRY
BACKUP DATABASE NonExistantDB TO DISK = 'C:\TEMP\NonExistantDB.bak'
END TRY
BEGIN CATCH
PRINT ERROR_MESSAGE()
END CATCH
... only gives error: ***BACKUP DATABASE is terminating abnormally.***
Is there a way to get the full error message or is this a limitation of try/catch?
| 0 | [
2,
4444,
255,
8128,
812,
13,
8,
7019,
1,
3845,
18,
1303,
5,
6,
52,
3187,
503,
2802,
800,
3726,
3726,
31,
57,
1957,
4666,
18,
13045,
21,
10119,
6018,
1202,
19,
21,
1131,
118,
18208,
17,
32,
1780,
30,
14,
7019,
2802,
25,
142,
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... |
Best approach with dynamic classes using Python globals()
===
I'm working on a web application that will return a variable set of modules depending on user input. Each module is a Python class with a constructor that accepts a single parameter and has an '.html' property that contains the output.
Pulling the class dynamically from the global namespace works:
result = globals()[classname](param).html
And it's certainly more succinct than:
if classname == 'Foo':
result = Foo(param).html
elif classname == 'Bar':
...
What is considered the best way to write this, stylistically? Are there risks or reasons not to use the global namespace? | 0 | [
2,
246,
2141,
29,
7782,
2684,
568,
20059,
2062,
18,
5,
6,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
2741,
3010,
30,
129,
788,
21,
7612,
309,
16,
17113,
4758,
27,
4155,
6367,
9,
206,
12613,
25,
21,
20059,
718,
29,
21,
6960,
248... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 far should you break up stylesheets?
===
I'm building a new site for my company, and I'm at the stage where I've created the html mockup of the first page. I'm going to use this as a basis for the rest of the site. I'm thinking of organising my stylesheet better now I've got the design looking consistent cross-browser, but I'm wondering how far to go when I'm breaking it up.
One idea is to have the following:
- reset.css
- typography.css
- layout.css
- colors.css
but where do I draw the line? theoretically I could go on and break them down into classes, ids etc, but I think thats going overboard.
Does this seem a reasonable method? | 0 | [
2,
184,
463,
378,
42,
1442,
71,
1034,
17627,
18,
60,
800,
3726,
3726,
31,
22,
79,
353,
21,
78,
689,
26,
51,
237,
15,
17,
31,
22,
79,
35,
14,
876,
113,
31,
22,
195,
679,
14,
13,
15895,
10506,
576,
16,
14,
64,
2478,
9,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I change the top value name in a text box on a Cognos Report?
===
The default value for the first item in a drop down list is the name of the database field. I need to change it to a more user friendly name. How do I change the value? | 0 | [
2,
184,
107,
31,
753,
14,
371,
1923,
204,
19,
21,
1854,
1649,
27,
21,
326,
17036,
18,
1330,
60,
800,
3726,
3726,
14,
12838,
1923,
26,
14,
64,
9101,
19,
21,
2804,
125,
968,
25,
14,
204,
16,
14,
6018,
575,
9,
31,
376,
20,
753,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0... |
.NET COM Interop Method Signature
===
What interop signature would you use for the following COM method? I am interested particularly in the final two parameters, and whether to try to use `MarshalAs` with a `SizeParamIndex` or not.
HRESULT GetOutputSetting(
DWORD dwOutputNum,
LPCWSTR pszName,
WMT_ATTR_DATATYPE* pType,
BYTE* pValue,
WORD* pcbLength
);
Documentation states:
> **pValue** [out] Pointer to a byte buffer containing the value. Pass NULL
> to retrieve the length of the buffer
> required.
>
> **pcbLength** [in, out] On input, pointer to a variable containing the
> length of pValue. On output, the
> variable contains the number of bytes
> in pValue used.
| 0 | [
2,
13,
9,
2328,
13,
960,
1480,
2594,
2109,
7810,
800,
3726,
3726,
98,
1480,
2594,
7810,
83,
42,
275,
26,
14,
249,
13,
960,
2109,
60,
31,
589,
3158,
1653,
19,
14,
426,
81,
12905,
15,
17,
1472,
20,
1131,
20,
275,
13,
1,
19988,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 destructor is not called on exception?
===
I expected `A::~A()` to be called in this program, but it doesn't:
#include <iostream>
struct A {
~A() { std::cout << "~A()" << std::endl; }
};
void f() {
A a;
throw "spam";
}
int main()
{ f(); }
However, if I change last line to
try { f(); } catch (...) { throw; }
then `A::~A()` *is* called.
I am compiling with "Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86" from Visual Studio 2005. Command line is `cl /EHa my.cpp`.
Is compiler right as usual? What does standard say on this matter? | 0 | [
2,
483,
13,
20137,
248,
25,
52,
227,
27,
5391,
60,
800,
3726,
3726,
31,
1727,
13,
1,
58,
45,
45,
1,
58,
5,
6,
1,
20,
44,
227,
19,
48,
625,
15,
47,
32,
1437,
22,
38,
45,
6926,
22640,
13,
1,
1963,
11260,
1,
13,
10346,
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... |
Open Source Project & Language Selection
===
I'm getting ready to start an open-source project that will target .NET/Mono.
For those who have started their own open source venture...
- Do you let the fact that a project is going to be open-source weigh on the decision of what language to use?
- For example. Most .NET open-source projects are written in C#. However, if you were more comfortable with VB.NET, Boo, Nemerle, etc... would you use it?
- What other considerations are there? | 0 | [
2,
368,
1267,
669,
279,
816,
3155,
800,
3726,
3726,
31,
22,
79,
1017,
1451,
20,
799,
40,
368,
8,
12097,
669,
30,
129,
2935,
13,
9,
2328,
118,
20027,
9,
26,
273,
72,
57,
373,
66,
258,
368,
1267,
5998,
9,
9,
9,
13,
8,
107,
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... |
In-memory search index for application takes up too much memory - any suggestions?
===
In our desktop application, we have implemented a simple search engine using an [inverted index][1].
Unofrtunately, some of our users datasets can get very large, e.g. taking up ~1GB of memory before the inverted index has been created. The inverted index itself takes up a lot of memory, almost as much as the data being indexed (another 1GB of RAM).
Obviously this creates problems with out of memory errors, as the 32 bit Windows limit of 2GB memory per application is hit, or users with lesser spec computers struggle to cope with the memory demand.
Our inverted index is stored as a:
Dictionary<string, List<applicationObject>>
And this is created during the data load when each object is processed such that the applicationObject's key string and description words are stored in the inverted index.
So, my question is: is it possible to store the search index more efficiently space-wise? Perhaps a different structure or strategy needs to be used? Alternatively is it possible to create a kind of CompressedDictionary? As it is storing lots of strings I would expect it to be highly compressible.
[1]: http://en.wikipedia.org/wiki/Inverted_index | 0 | [
2,
19,
8,
790,
5171,
93,
2122,
4348,
26,
3010,
1384,
71,
266,
212,
1912,
13,
8,
186,
18389,
60,
800,
3726,
3726,
19,
318,
17404,
3010,
15,
95,
57,
6807,
21,
1935,
2122,
1406,
568,
40,
636,
108,
8122,
69,
4348,
500,
2558,
165,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to check JRE version prior to launch?
===
What's the best way to determine if the version of the JRE installed on a machine is high enough for the application which the user wants to run? Is there a way of doing it using java-only stuff? I'd like the solution to work on Windows/Linux/MacOSX - if the JRE version is too low a message should be displayed. Currently I'm getting an exception if i try to run it on Java 1.5 (the app is built for Java 1.6). If there's no universal solution, what's the best way to do it on Windows? | 0 | [
2,
184,
20,
2631,
487,
99,
615,
1313,
20,
3394,
60,
800,
3726,
3726,
98,
22,
18,
14,
246,
161,
20,
3746,
100,
14,
615,
16,
14,
487,
99,
4066,
27,
21,
1940,
25,
183,
511,
26,
14,
3010,
56,
14,
4155,
2846,
20,
485,
60,
25,
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... |
Tortoise SVN hidden _svn folders
===
They are specially annoying when I need to upload to the server a web solution.
Is there a way of configuring SVN to create the _svn folders outside my working directory?
If not, what is the best way to deal with them when you need to copy only the code?
| 0 | [
2,
25691,
13,
18,
16578,
3689,
13,
1,
18,
16578,
19294,
18,
800,
3726,
3726,
59,
50,
13444,
17610,
76,
31,
376,
20,
71,
8294,
20,
14,
8128,
21,
2741,
4295,
9,
25,
80,
21,
161,
16,
1065,
13549,
68,
13,
18,
16578,
20,
1600,
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... |
Is it correct to export data members? (C++)
===
As the title suggests, is it correct or valid to import/export static data from within a C++ class?
Many thanks | 0 | [
2,
25,
32,
4456,
20,
7487,
1054,
443,
60,
13,
5,
150,
20512,
6,
800,
3726,
3726,
28,
14,
581,
5049,
15,
25,
32,
4456,
54,
7394,
20,
9010,
118,
1706,
1993,
12038,
1054,
37,
363,
21,
272,
20512,
718,
60,
151,
3669,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Are there gotchas using varargs with reference parameters
===
I have this piece of code (summarized)...
AnsiString working(AnsiString format,...)
{
va_list argptr;
AnsiString buff;
va_start(argptr, format);
buff.vprintf(format.c_str(), argptr);
va_end(argptr);
return buff;
}
And, on the basis that pass by reference is preferred where possible, I changed it thusly.
AnsiString broken(const AnsiString &format,...)
{
... the rest, totally identical ...
}
My calling code is like this:-
AnsiString s1, s2;
s1 = working("Hello %s", "World");
s2 = broken("Hello %s", "World");
But, s1 contains "Hello World", while s2 has "Hello (null)". I think this is due to the way va_start works, but I'm not exactly sure what's going on.
| 0 | [
2,
50,
80,
330,
1651,
18,
568,
4033,
10663,
18,
29,
2801,
12905,
800,
3726,
3726,
31,
57,
48,
1855,
16,
1797,
13,
5,
18,
723,
1615,
1333,
6,
9,
9,
9,
40,
18,
49,
11130,
638,
5,
5950,
49,
11130,
2595,
15,
9,
9,
9,
6,
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... |
Use commandline arguments in creationComplete
===
How can I use command line arguments in a *creationComplete* event handler? It seems the *invoke* event happens in my AIR app **after** creationComplete gets called, so I can't use the args in that function, although I really would like to. Any other event that might always fire ***after*** the *invoke* event happens?
| 0 | [
2,
275,
1202,
1143,
10553,
19,
2502,
15990,
800,
3726,
3726,
184,
92,
31,
275,
1202,
293,
10553,
19,
21,
1637,
6037,
857,
15990,
2483,
807,
24641,
60,
32,
2206,
14,
1637,
108,
2625,
1048,
2483,
807,
5531,
19,
51,
282,
4865,
13,
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... |
How do I force a rollover at application startup with Log4net RolloverFileAppender?
===
Have Log4Net configured in our application to use a date stamped name and a 10Meg file size limit.
This automatically causes a rollover to a new file at midnight and whenever the 10Meg limit is reached.
I would also like to roll over the logging to a new file each time the application is started (or closed).
Can I get all three roll over behaviours? | 0 | [
2,
184,
107,
31,
558,
21,
3001,
2549,
35,
3010,
20205,
29,
6738,
300,
2328,
3001,
2549,
16877,
22358,
1157,
60,
800,
3726,
3726,
57,
6738,
300,
2328,
28895,
19,
318,
3010,
20,
275,
21,
1231,
15320,
204,
17,
21,
332,
790,
263,
3893... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Managing constructors with many parameters in Java 1.4
===
In some of our projects, there's an class hierarchy that adds more parameters as it goes down the chain. At the bottom, some of the classes can have up to 30 parameters, 28 of which are just being passed into the super constructor.
I'll acknowledge that using automated DI through something like Guice would be nice, but because of some technical reasons, these specific projects are constrained to Java 1.4.
A convention of organizing the arguments alphabetically by type doesn't work because if a type is refactored (the Circle you were passing in for argument 2 is now a Shape) it can suddenly be out of order.
This question might be to specific and fraught with "If that's your problem, you're doing it wrong at a design level" criticisms, but I'm just looking for any viewpoints. | 0 | [
2,
5616,
6960,
248,
18,
29,
151,
12905,
19,
8247,
137,
9,
300,
800,
3726,
3726,
19,
109,
16,
318,
2314,
15,
80,
22,
18,
40,
718,
14417,
30,
10621,
91,
12905,
28,
32,
1852,
125,
14,
2858,
9,
35,
14,
2129,
15,
109,
16,
14,
268... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 determine if a Column is in the Primary key of it's table? (MSSQL)
===
I am currently using...
select Table_Name, Column_name, data_type, is_Nullable
from information_Schema.Columns
...to determine information about columns in a given database for the purposes of generating a DataAccess Layer.
**From where can I retrieve information about if these columns are participants in the primary key of their table?** | 0 | [
2,
184,
107,
31,
3746,
100,
21,
4698,
25,
19,
14,
1256,
1246,
16,
32,
22,
18,
859,
60,
13,
5,
79,
18,
18,
22402,
6,
800,
3726,
3726,
31,
589,
871,
568,
9,
9,
9,
5407,
859,
1,
7259,
15,
4698,
1,
7259,
15,
1054,
1,
4474,
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... |
In PHP, how can I correct missing keys in an array?
===
After using [`array_unique`][1], an array without the duplicate values is removed. However, it appears that the keys are also removed, which leaves gaps in an array with numerical indexes (although is fine for an associative array). If I iterate using a for loop, I have to account for the missing indexes and just copy the keys to a new array, but that seems clumsy.
[1]: http://us.php.net/array_unique | 0 | [
2,
19,
13,
26120,
15,
184,
92,
31,
4456,
2863,
5534,
19,
40,
7718,
60,
800,
3726,
3726,
75,
568,
636,
1,
8576,
93,
1,
1020,
5312,
1,
500,
2558,
165,
500,
15,
40,
7718,
366,
14,
19429,
4070,
25,
1974,
9,
207,
15,
32,
1780,
30... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
IIS 7.0 Multiple Domain Site Bindings
===
I've got three web sites each with its own domain going to my one Windows Server 2008 IIS 7.0 web server.
- `example1.com`
- `example2.com`
- `example3.com`
The site bindings for each:
![IIS 7.0 Site Bindings example1.com][1]
![IIS 7.0 Site Bindings example2.com][2]
![IIS 7.0 Site Bindings example3.com][3]
When I navigate to `example1.com`, then I see my *example1* web site.
When I navigate to `example2.com`, then I see my *example2* web site.
But, when I navigate to `example3.com`, I see my *example1* web site--not the *example3* web site I expect.
What's going on? Why might `example2.com` work, but `example3.com` fail?
[1]: http://img371.imageshack.us/img371/4215/example1pf4.gif
[2]: http://img371.imageshack.us/img371/2567/example2xx0.gif
[3]: http://img266.imageshack.us/img266/8186/example3rh9.gif | 0 | [
2,
595,
18,
453,
9,
387,
1886,
4603,
689,
8728,
18,
800,
3726,
3726,
31,
22,
195,
330,
132,
2741,
3259,
206,
29,
82,
258,
4603,
228,
20,
51,
53,
1936,
8128,
570,
595,
18,
453,
9,
387,
2741,
8128,
9,
13,
8,
13,
1,
29041,
165,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best way of using Scrum and Sprint for Infrastructure improvement
===
Does anybody use Scrum & Sprint for Infrastructure.
I'm struggling with the concept of a Sprint that never finishes i.e. a Network enhancement project.
Also any suggestions on how Item time can be built up to a Product Backlog, so that I can sanity check that resources are not overcommited on the sprint. | 0 | [
2,
246,
161,
16,
568,
26562,
17,
6672,
26,
5282,
6984,
800,
3726,
3726,
630,
11181,
275,
26562,
279,
6672,
26,
5282,
9,
31,
22,
79,
7587,
29,
14,
2420,
16,
21,
6672,
30,
243,
13625,
31,
9,
62,
9,
21,
982,
19415,
669,
9,
67,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 there a good date parser for Java?
===
Does everyone know a good date parser for different languages/locales. The build in parser of Java (SimpleDateFormat) is very strict. It should complete missing parts with the current date.
For example
- if I does not enter the year (only day and month) then the current year should be used.
- if the years is 08 then it should not parse 0008 because the current year pattern has 4 digit. | 0 | [
2,
50,
80,
21,
254,
1231,
2017,
4104,
26,
8247,
60,
800,
3726,
3726,
630,
1266,
143,
21,
254,
1231,
2017,
4104,
26,
421,
2556,
118,
15580,
160,
9,
14,
1895,
19,
2017,
4104,
16,
8247,
13,
5,
24629,
8209,
23588,
6,
25,
253,
8170,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Volume Control Number of Channels XP different than Vista
===
When I run this code:
MIXERLINE MixerLine;
memset( &MixerLine, 0, sizeof(MIXERLINE) );
MixerLine.cbStruct = sizeof(MIXERLINE);
MixerLine.dwComponentType = MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT;
mmResult = mixerGetLineInfo( (HMIXEROBJ)m_dwMixerHandle, &MixerLine, MIXER_GETLINEINFOF_COMPONENTTYPE );
Under XP MixerLine.cChannels comes back as the number of channels that the sound card supports. Often 2, these days often many more.
Under Vista MixerLine.cChannels comes back as one.
I have been then getting a MIXERCONTROL_CONTROLTYPE_VOLUME control and setting the volume for each channel that is supported, and setting the volumne control to different levels on different channels so as to pan music back and forth between the speakers (left to right).
Obviously under Vista this approach isn't working since there is only one channel. I can set the volume and it is for both channels at the same time.
I tried to get a MIXERCONTROL_CONTROLTYPE_PAN for this device, but that was not a valid control.
So, the question for all you MMSystem experts is this: what type of control do I need to get to adjust the left/right balance? Alternately, is there a better way? I would like a solution that works with both XP and Vista.
| 0 | [
2,
2310,
569,
234,
16,
6328,
23045,
421,
119,
13520,
800,
3726,
3726,
76,
31,
485,
48,
1797,
45,
24752,
1143,
24752,
1143,
73,
55,
79,
3554,
5,
279,
15743,
106,
1143,
15,
713,
15,
1072,
1041,
5,
15743,
106,
1143,
6,
13,
6,
73,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Sharepoint custom user and document library specific properties
===
Is there a standard way to assosciate custom properties with a user? In particular I need to store the number of items per page a user selected in a grid of a document library separately for each user and document library. | 0 | [
2,
1891,
3132,
5816,
4155,
17,
4492,
1248,
1903,
3704,
800,
3726,
3726,
25,
80,
21,
1236,
161,
20,
28,
656,
3862,
15882,
5816,
3704,
29,
21,
4155,
60,
19,
1498,
31,
376,
20,
1718,
14,
234,
16,
3755,
416,
2478,
21,
4155,
1704,
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,
0,
0,
0,
0... |
Safely punning char* to double in C
===
In an Open Source <a href="http://honeypot.net/project/pgdbf">program I
wrote</a>, I'm reading binary data from a file and outputting ints, doubles,
and other assorted data types. One of the challenges is that it needs to
run on 32-bit and 64-bit machines of both endiannesses, which means that I
end up having to do quite a bit of low-level bit-twiddling. I know a (very)
little bit about type punning and strict aliasing and want to make sure I'm
doing things the right way.
Basically, it's easy to convert from a char* to an int of various sizes:
int64_t snativeint64_t(const char *buf)
{
/* Interpret the first 8 bytes of buf as a 64-bit int */
return *(int64_t *) buf;
}
and I have a cast of support functions to swap byte orders as needed, such
as:
int64_t swappedint64_t(const int64_t wrongend)
{
/* Change the endianness of a 64-bit integer */
return (((wrongend & 0xff00000000000000LL) >> 56) |
((wrongend & 0x00ff000000000000LL) >> 40) |
((wrongend & 0x0000ff0000000000LL) >> 24) |
((wrongend & 0x000000ff00000000LL) >> 8) |
((wrongend & 0x00000000ff000000LL) << 8) |
((wrongend & 0x0000000000ff0000LL) << 24) |
((wrongend & 0x000000000000ff00LL) << 40) |
((wrongend & 0x00000000000000ffLL) << 56));
}
At runtime, the program detects the endianness of the machine and assigns
one of the above to a function pointer:
int64_t (*slittleint64_t)(const char *);
if(littleendian) {
slittleint64_t = snativeint64_t;
} else {
slittleint64_t = sswappedint64_t;
}
Now, the tricky part comes when I'm trying to cast a char* to a double. I'd
like to re-use the endian-swapping code like so:
union
{
double d;
int64_t i;
} int64todouble;
int64todouble.i = slittleint64_t(bufoffset);
printf("%lf", int64todouble.d);
However, some compilers could optimize away the "int64todouble.i" assignment
and break the program. Is there a safer way to do this, while considering
that this program must stay optimized for performance, and also that I'd
prefer not to write a parallel set of transformations to cast char* to
double directly? If the union method of punning is safe, should I be
re-writing my functions like <tt>snativeint64_t</tt> to use it? | 0 | [
2,
9817,
11582,
2981,
4892,
2483,
20,
1494,
19,
272,
800,
3726,
3726,
19,
40,
368,
1267,
13,
1,
58,
746,
14057,
3726,
7,
21127,
6903,
18478,
4296,
9,
2328,
118,
21011,
118,
9623,
43,
12425,
7,
1,
19746,
31,
738,
1,
118,
58,
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 do I compile an ASP.NET website into a single .DLL?
===
I have finally finished my web site. I published it and I was surprised at the results. Although the App_Code compiled into a single .dll, every pages code behind compiled into it's own .dll. How do i make it so that it is one .dll?
Also, is it possible to compile everything (SubSonic,AJAX,etc) into that same single .dll? | 0 | [
2,
184,
107,
31,
26561,
40,
28,
306,
9,
2328,
2271,
77,
21,
345,
13,
9,
43,
211,
60,
800,
3726,
3726,
31,
57,
722,
842,
51,
2741,
689,
9,
31,
467,
32,
17,
31,
23,
2948,
35,
14,
1736,
9,
419,
14,
4865,
1,
9375,
9316,
77,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Asp.Net MVC Beta ModelState WTF: ModelState overrides RouteData?
===
I have something similar to the following method:
public ActionResult Details(int id)
{
var viewData = new DetailsViewData
{
Booth = BoothRepository.yFind(id),
Category = ItemType.HotBuy
};
return View(viewData);
}
and the following Route:
routes.MapRoute("shows","shows/{controller}/{action}/{id}", new {id = 0});
Everything worked fine before the Beta, when I had Preview 3. Now the method will fill the id correctly the first time I execute the action. However the second time the controller's `ModelState` contains the last-use id value. This causes the `ActionInvoker` to use it in the method's parameter instead of the `Route` value.
So if I call the action twice on two different entities the results are such:
www.mysite.com/shows/Booth/Details/1 => Details(1)
www.mysite.com/shows/Booth/Details/2 => Details(1) //from ModelState["id"]
From my quick scan with Reflector it seems it first binds parameters to the ModelState then to Routes. However, I never even posted anything from the model. As far as I can tell the ModelState should not contain anything.
Is this a bug in the Beta, possibly a bug somewhere in my code, or is there some design feature that I am ignorant of? Any insight into the nature of ModelState and why this happens is appreciated. | 0 | [
2,
28,
306,
9,
2328,
307,
8990,
8434,
1061,
3859,
619,
11720,
45,
1061,
3859,
84,
11891,
18,
858,
18768,
60,
800,
3726,
3726,
31,
57,
301,
835,
20,
14,
249,
2109,
45,
317,
1028,
29955,
3289,
5,
6391,
4924,
6,
13,
1,
4033,
1418,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Excluding some ActiveRecord properties from xml rendering in rails
===
I have an ActiveRecord model that I would like to convert to xml, but I do not want all the properties rendered in xml. Is there a parameter I can pass into the render method to keep a property from being rendered in xml?
Below is an example of what I am talking about.
def show
@person = Person.find(params[:id])
respond_to do |format|
format.xml { render :xml => @person }
end
end
produces the following xml
<pre>
<person>
<name>Paul</name>
<age>25</age>
<phone>555.555.5555</phone>
</person>
</pre>
However, I do not want the phone property to be shown. Is there some parameter in the render method that excludes properties from being rendered in xml? Kind of like the following example
def show
@person = Person.find(params[:id])
respond_to do |format|
format.xml { render :xml => @person, :exclude_attribute => :phone }
end
end
which would render the following xml
<pre>
<person>
<name>Paul</name>
<age>25</age>
</person>
</pre> | 0 | [
2,
13,
14938,
109,
1348,
14953,
3704,
37,
23504,
15307,
19,
2240,
18,
800,
3726,
3726,
31,
57,
40,
1348,
14953,
1061,
30,
31,
83,
101,
20,
8406,
20,
23504,
15,
47,
31,
107,
52,
259,
65,
14,
3704,
10877,
19,
23504,
9,
25,
80,
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... |
Nested transactions in LINQ to SQL
===
I need help with realizing quite complex business logic which operates on many tables and executes quite a few SQL commands. However I want to be sure that the data will not be left in incosistent state and to this moment I don't see the solution which would not require nested transactions. I wrote a simple pseudo-code which illustrates a scenario similar to what I want to accomplish:
Dictionary<int, bool> opSucceeded = new Dictionary<int, bool> ();
for (int i = 0; i < 10; i++)
{
try
{
// this operation must be atomic
Operation(dbContext, i);
// commit (?)
opSucceeded[i] = true;
}
catch
{
// ignore
}
}
try
{
// this operation must know which Operation(i) has succeeded;
// it also must be atomic
FinalOperation(dbContext, opSucceeded);
// commit all
}
catch
{
// rollback FinalOperation and operation(i) where opSucceeded[i] == true
}
The biggest problem for me is: how to ensure that if the FinalOperation fails, all operations Operation(i) which succeeded are rolled back? Note that I also would like to be able to ignore failures of single Operation(i).
Is it possible to achieve this by using nested TransactionScope objects and if not - how would you approach such problem? | 0 | [
2,
5618,
69,
13147,
19,
6294,
1251,
20,
4444,
255,
800,
3726,
3726,
31,
376,
448,
29,
9308,
1450,
1502,
508,
7085,
56,
4554,
27,
151,
7484,
17,
15644,
18,
1450,
21,
310,
4444,
255,
14294,
9,
207,
31,
259,
20,
44,
562,
30,
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... |
How do you diagnose network issues on Windows?
===
I often run into problems where I can't get something to connect to something else. Today I can't get one Virtual Machine to ping another one. I usually forget to check something obvious. Can you help with:
- A tip/technique for diagnosing a connection issue
- The name of a tool or application that can help (and the situation in which its useful)
Thanks.
*I know the question is a little non-specific, but hopefully the answers can form a useful starting point for anybody who's stuck trying to get computers/programs talking to each other.*
| 0 | [
2,
184,
107,
42,
28438,
982,
1549,
27,
1936,
60,
800,
3726,
3726,
31,
478,
485,
77,
1716,
113,
31,
92,
22,
38,
164,
301,
20,
6379,
20,
301,
962,
9,
786,
31,
92,
22,
38,
164,
53,
6599,
1940,
20,
13,
3181,
226,
53,
9,
31,
95... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Iterate enumerable object while debugging in Visual Studio
===
Is it possible to iterate collection and list only filtered object information while debugging in Visual Studio? I'd use Immediate window for that, but although it allows to execute methods on objects, it seems not to allow execute custom loop statements.
Simplest example in ASP.NET:
this.Page.Validate();
if (!this.Page.IsValid())
{
// breakpoint here
}
How can we iterate `Page.Validators` collection and find those which are invalid + output their information at that breakpoint? (this is not the main question, it's just a sample)
If it's not possible to do it straight forward, do you have any workarounds for this? Workarounds which would not involve code modification, just writing code in Immediate window or some Watch expression.
While googling I've found just one workaround quoted [here][1] (although could not find the original):
> "Add a debug method to your code that
> does something like iterate through
> all the objects in a collection. Then
> you can call that method from the
> immediate window while in debug mode
> and it will enumerate various things
> for you. Think of it like a
> command-line-debugger-helper. You can
> write as many of those as you like."
But it's still a workaround. I image it should be doable without too much hacking and more importantly without modifying code.
Of course it should be possible to do some kind of collection transformations in one statement.
And let's stick to non-generic collections.
[1]: http://visualstudiohacks.com/articles/ask-the-pros/ask-the-pros-debugging/ | 0 | [
2,
32,
106,
1373,
1957,
723,
106,
579,
3095,
133,
121,
16254,
2762,
19,
3458,
1120,
800,
3726,
3726,
25,
32,
938,
20,
32,
106,
1373,
1206,
17,
968,
104,
25090,
3095,
676,
133,
121,
16254,
2762,
19,
3458,
1120,
60,
31,
22,
43,
27... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 detach Perforce jobs from their changelists en masse?
===
I've been fighting with the miserable Perforce Defect Tracking Gateway (P4DTG) in an attempt to integrate Perforce with our defect tracker (FogBugz). During this battle, P4DTG has managed to corrupt a bunch of jobs and I'd like to delete them all and have the POS, er P4DTG, rebuild them.
So, I have a list of about 600 jobs that I can't delete from the command line because they are attached to changelists. The only way I know how to detach them is via the GUI, but that would take forever. Does anyone know a better (i.e., faster) way? | 0 | [
2,
184,
107,
31,
28683,
416,
8774,
4844,
37,
66,
753,
5739,
18,
1957,
1619,
62,
60,
800,
3726,
3726,
31,
22,
195,
74,
1849,
29,
14,
13938,
416,
8774,
18929,
10353,
12171,
13,
5,
306,
300,
43,
38,
263,
6,
19,
40,
1735,
20,
1839... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Generating ActionScript value objects from middle-tier Java classes
===
In a Flex / Java app stack using remoting (via BlazeDS), classes to hold data passed back and forth between client and server need to be maintained in both the client (in ActionScript) and server (in Java).
I want a way to maintain theses classes in Java only, and have the corresponding ActionScript value object classes generated by the build process. | 0 | [
2,
13500,
1028,
8741,
1923,
3916,
37,
772,
8,
5259,
8247,
2684,
800,
3726,
3726,
19,
21,
14409,
13,
118,
8247,
4865,
7566,
568,
302,
7662,
68,
13,
5,
5034,
9849,
43,
18,
6,
15,
2684,
20,
1027,
1054,
1100,
97,
17,
5882,
128,
6819... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 a good tool to get SQL code completion with SQL Server 2005?
===
I've tried Red Gate's SQL Prompt and like it, but cannot afford it at the moment. I miss the good code completion that this tool provides. Are there any good free tools out there that have SQL code completion (table and column names, etc)?
I've tried TOAD, but it was quite buggy. It would crash, and would also leave connections open to the database after the app was closed?
Any good recommendations? | 0 | [
2,
98,
25,
21,
254,
5607,
20,
164,
4444,
255,
1797,
5392,
29,
4444,
255,
8128,
812,
60,
800,
3726,
3726,
31,
22,
195,
794,
402,
3315,
22,
18,
4444,
255,
11443,
4417,
17,
101,
32,
15,
47,
1967,
7829,
32,
35,
14,
688,
9,
31,
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... |
What naming convention do you use for Decorators?
===
I just recently really truly groked dependency injection and the wonder of the Decorator design pattern and am using it all over the place.
As wonderful as it is however, one thing that I've been having difficulty with is naming my decorator classes so I would just like to know what others do. Do you always append the word Decorator? Do you incorporate the name of the interface its decorating? Do they get their own namespace?
What do you guys do? | 0 | [
2,
98,
10929,
3087,
107,
42,
275,
26,
17650,
9922,
60,
800,
3726,
3726,
31,
114,
1989,
510,
4574,
3452,
4616,
26835,
13646,
17,
14,
2666,
16,
14,
17650,
3457,
704,
3732,
17,
589,
568,
32,
65,
84,
14,
209,
9,
28,
5934,
28,
32,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Option Strict On and .NET for VB6 programmers
===
I'm preparing a class on Visual Basic 2005 targeting Visual Basic 6 programmers migrating to the .NET platform.<br /><br/>
I would like a word of advice about whether to recommend them to always enable **Option Strict** or not.<br /><br/>
I've worked exclusively with C-style programming languages, more precisely Java and C#, so for me **explicit casting** is something I always expect I have to, since it's never been an option.<br/>However I recognize the value of working with a language that has built-in support for **late-binding**, because not having to be excessively explicit about types in the code indeed saves time. This is further proved by the popular diffusion of **dynamic typed languages**, even on the .NET platform with the Dynamic Language Runtime.
<br><br/>
With this in mind, should someone who is approaching .NET for the first time using VB.NET and with a VB6 background be encouraged to get into the mindset of **having to work with compile-time type checking** because that's the "best practice" in the CLR? Or is it "OK" to continue enjoying the benefits of late-binding?
| 0 | [
2,
4255,
8170,
27,
17,
13,
9,
2328,
26,
13,
20468,
379,
17968,
18,
800,
3726,
3726,
31,
22,
79,
7575,
21,
718,
27,
3458,
2125,
812,
15972,
3458,
2125,
400,
17968,
18,
28749,
20,
14,
13,
9,
2328,
2452,
9,
1,
5145,
13,
118,
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... |
ElementTree XPath - Select Element based on attribute.
===
I am having trouble using the attribute XPath Selector in ElementTree, which I should be able to do according to the [Documentation][1]
Here's some sample code
**XML**
<root>
<target name="1">
<a></a>
<b></b>
</target>
<target name="2">
<a></a>
<b></b>
</target>
</root>
**Python**
def parse(document):
root = et.parse(document)
for target in root.findall("//target[@name='a']"):
print target._children
I am receiving the following Exception:
expected path separator ([)
[1]: http://effbot.org/zone/element-xpath.htm
| 2 | [
2,
4520,
8101,
993,
8353,
13,
8,
5407,
4520,
432,
27,
35,
14755,
9,
800,
3726,
3726,
31,
589,
452,
2572,
568,
14,
35,
14755,
993,
8353,
23946,
19,
4520,
8101,
15,
56,
31,
378,
44,
777,
20,
107,
496,
20,
14,
636,
28132,
857,
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... |
With MVC, do interactions with autonomous peripherals belong in the Model or the Controller?
===
Using MVC with an observer pattern, if a user action requires polling a device (such as a camera) for data, should the polling be done in the Controller and the result passed off the Model or should a request be sent to the Model and the Model itself performs the polling.
This question is my attempt to reconcile everything I am reading that touts the "skinny Controllers" maxim with my gut intuition that the Model should only be acting on data not acquiring it.
(Note: This question *might* be subjective. I'm not entirely sure that there is a one-true-answer to this question. If not, feel free to retag as I will be very interested to hear opinions on the subject.) | 0 | [
2,
29,
307,
8990,
15,
107,
11224,
29,
8087,
17219,
18,
6219,
19,
14,
1061,
54,
14,
9919,
60,
800,
3726,
3726,
568,
307,
8990,
29,
40,
9855,
3732,
15,
100,
21,
4155,
1028,
4781,
20734,
21,
3646,
13,
5,
4289,
28,
21,
3336,
6,
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... |
JavaDoc like framework for shell scripts?
===
Is there an open source or public domain framework that can document shell scripts similar to what JavaDoc produces? I don't need to limit this just to a specific flavor of shell script, ideally I would like a generic framework for documenting API or command line type commands on a web page that is easy to extend or even better is self documenting.
| 0 | [
2,
8247,
13799,
101,
6596,
26,
3593,
17505,
60,
800,
3726,
3726,
25,
80,
40,
368,
1267,
54,
317,
4603,
6596,
30,
92,
4492,
3593,
17505,
835,
20,
98,
8247,
13799,
6700,
60,
31,
221,
22,
38,
376,
20,
4496,
48,
114,
20,
21,
1903,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
Tab Character Entity for XHTML?
===
Does anyone know what the character entity for a tab is in xhtml?
(Um if there is one)... | 0 | [
2,
6523,
925,
9252,
26,
993,
15895,
60,
800,
3726,
3726,
630,
1276,
143,
98,
14,
925,
9252,
26,
21,
6523,
25,
19,
993,
15895,
60,
13,
5,
723,
100,
80,
25,
53,
6,
9,
9,
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,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
what is unicode?
===
being a application developer do i need to know about it. | 0 | [
2,
98,
25,
28010,
60,
800,
3726,
3726,
142,
21,
3010,
10058,
107,
31,
376,
20,
143,
88,
32,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Casting an object to a generic interface
===
I have the following interface:
internal interface IRelativeTo<T> where T : IObject
{
T getRelativeTo();
void setRelativeTo(T relativeTo);
}
and a bunch of classes that (should) implement it, such as:
public class AdminRateShift : IObject, IRelativeTo<AdminRateShift>
{
AdminRateShift getRelativeTo();
void setRelativeTo(AdminRateShift shift);
}
I realise that these three are not the same:
IRelativeTo<>
IRelativeTo<AdminRateShift>
IRelativeTo<IObject>
but nonetheless, I need a way to work with all the different classes like AdminRateShift (and FXRateShift, DetRateShift) that should all implement IRelativeTo. Let's say I have an function which returns AdminRateShift as an Object:
IRelativeTo<IObject> = getObjectThatImplementsRelativeTo(); // returns Object
By programming against the interface, I can do what I need to, but I can't actually cast the Object to IRelativeTo so I can use it.
It's a trivial example, but I hope it will clarify what I am trying to do. | 0 | [
2,
9087,
40,
3095,
20,
21,
12733,
6573,
800,
3726,
3726,
31,
57,
14,
249,
6573,
45,
3117,
6573,
31,
7256,
3366,
262,
1,
38,
1,
113,
13,
38,
13,
45,
31,
23793,
13,
1,
13,
38,
164,
7256,
3366,
262,
5,
6,
73,
11364,
309,
7256,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... |
develop on SQL 2008 and one SQL 2005
===
The company I work for has several clients. I'm currently splitting my time between 2 .net projects. For Client A I need Visual Studio 2008, SQL Server 2008 and the 3.5 framework. For Client B 2005 versions/2.0 Framework.
Others in the company are using Microsoft Virtual PC to keep the development environments separate.
What do you suggest? | 0 | [
2,
2803,
27,
4444,
255,
570,
17,
53,
4444,
255,
812,
800,
3726,
3726,
14,
237,
31,
170,
26,
63,
238,
7421,
9,
31,
22,
79,
871,
17282,
51,
85,
128,
172,
13,
9,
2328,
2314,
9,
26,
6819,
21,
31,
376,
3458,
1120,
570,
15,
4444,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 the shortest path in a graph which visits certain nodes.
===
I have a undirected graph with about 100 nodes and about 200 edges. One node is labelled 'start', one is 'end', and there's about a dozen labelled 'mustpass'.
I need to find the shortest path through this graph that starts at 'start', ends at 'end', **and passes through all of the 'mustpass' nodes (in any order).**
( http://3e.org/local/maize-graph.png / http://3e.org/local/maize-graph.dot.txt is the graph in question - it represents a corn maze in Lancaster, PA) | 0 | [
2,
477,
14,
23576,
2013,
19,
21,
7210,
56,
7659,
1200,
16272,
9,
800,
3726,
3726,
31,
57,
21,
367,
14147,
7210,
29,
88,
808,
16272,
17,
88,
2327,
7840,
9,
53,
15421,
25,
21854,
13,
22,
13680,
22,
15,
53,
25,
13,
22,
2451,
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... |
Asynchronous shell exec in PHP
===
I've got a PHP script that needs to invoke a shell script but doesn't care at all about the output. The shell script makes a number of SOAP calls and is slow to complete, so I don't want to slow down the PHP request while it waits for a reply. In fact, the PHP request should be able to exit without terminating the shell process.
I've looked into the various exec(), shell_exec(), pcntl_fork(), etc. functions, but none of them seem to offer exactly what I want. (Or, if they do, it's not clear to me how.) Any suggestions?
Thanks in advance. | 0 | [
2,
21,
16023,
1291,
3593,
1396,
3319,
19,
13,
26120,
800,
3726,
3726,
31,
22,
195,
330,
21,
13,
26120,
3884,
30,
2274,
20,
28371,
21,
3593,
3884,
47,
1437,
22,
38,
781,
35,
65,
88,
14,
5196,
9,
14,
3593,
3884,
1364,
21,
234,
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... |
SQL Server - Running large script files
===
I have a database table on a development server that is now fully populated after I set it running with an import routine for a CSV file containing 1.4 million rows.
I ran the Database Publishing Wizard on the table, and now I have a 286MB SQL script on my local machine. The problem is, I can't figure out how to run it. If I load it into SQL Server Management Studio Express I get an alert window that says "The operation could not be completed".
Any ideas on how I can get this SQL script to run? | 0 | [
2,
4444,
255,
8128,
13,
8,
946,
370,
3884,
6488,
800,
3726,
3726,
31,
57,
21,
6018,
859,
27,
21,
522,
8128,
30,
25,
130,
2337,
11111,
75,
31,
309,
32,
946,
29,
40,
9010,
8275,
26,
21,
272,
18,
710,
3893,
3503,
137,
9,
300,
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... |
Castor performance issues
===
We recently upgraded to Castor 1.2 from version 0.9.5.3 and we've noticed a dramatic drop in performance when calling unmarshal on XML. We're unmarshaling to java classes that were generated by castor in both cases. For comparison, using identical XML the time for the XML unmarshal call used to take about 10-20ms and now takes about 2300ms. Is there something obvious I might be missing in our new castor implementation, maybe in a property file that I missed or should I start looking at reverting to the old version? Maybe there was something in the java class file generation that is killing the unmarshal call? I might also consider Castor alternatives if there were a good reason to drop it in favor of something else. We're using java 1.5 in a weblogic server. | 0 | [
2,
1325,
248,
956,
1549,
800,
3726,
3726,
95,
1989,
9958,
20,
1325,
248,
137,
9,
135,
37,
615,
713,
9,
518,
9,
264,
9,
240,
17,
95,
22,
195,
2711,
21,
6153,
2804,
19,
956,
76,
2555,
367,
19988,
192,
27,
23504,
9,
95,
22,
99,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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 script Visual Studio from Python?
===
I'd like to write Python scripts that drive Visual Studio 2008 and Visual C++ 2008. All the examples I've found so far use `win32com.client.Dispatch`. This works fine for Excel 2007 and Word 2007 but fails for Visual Studio 2008:
import win32com.client
app1 = win32com.client.Dispatch( 'Excel.Application' ) # ok
app2 = win32com.client.Dispatch( 'Word.Application' ) # ok
app3 = win32com.client.Dispatch( 'MSDev.Application' ) # error
Any ideas? Does Visual Studio 2008 use a different string to identify itself? Is the above method out-dated?
| 0 | [
2,
184,
20,
3884,
3458,
1120,
37,
20059,
60,
800,
3726,
3726,
31,
22,
43,
101,
20,
2757,
20059,
17505,
30,
1493,
3458,
1120,
570,
17,
3458,
272,
20512,
570,
9,
65,
14,
3770,
31,
22,
195,
216,
86,
463,
275,
13,
1,
4181,
3125,
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... |
How to stop Hibernate from eagerly fetching many-to-one associated object
===
I have a property on a domain object that is declared in a many-to-one element. The basic syntax of this property looks like this:
<many-to-one name="propertyName" class="propertyClass" fetch="select" not-found="ignore" lazy="proxy" />
Now, the idea is to have Hibernate NOT eagerly fetch this property. It may be null, so the not-found ignore is set.
But, Hibernate, upon loading the class containing this association, takes it upon itself to load the actual class (not even a proxy) instance when the parent class is loaded. Since some properties are over 1MB in size, they take up a lot of the heap space.
If, however, not-found is set to exception (or defaulted to exception), the parent classes which have this property do load a proxy!
How can I stop hibernate from not loading a proxy, while still allowing this property to be null?
I found lazy=no-proxy, but the documentation talks about some sort of bytecode modification and doesn't go into any details. Can someone help me out?
If it matters, it is the Java version of Hibernate, and it is at least version 3 (I can look up the actual version if it helps, but it is Hibernate 3+ for now). | 0 | [
2,
184,
20,
747,
4148,
2102,
8820,
37,
20755,
18312,
68,
151,
8,
262,
8,
849,
1598,
3095,
800,
3726,
3726,
31,
57,
21,
1354,
27,
21,
4603,
3095,
30,
25,
2482,
19,
21,
151,
8,
262,
8,
849,
4520,
9,
14,
2125,
22649,
16,
48,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.