unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Project Euler Problem
===
I have been trying to work my way through Project Euler, and have noticed a handful of problems ask for you to determine a prime number as part of it.
1) I know I can just divide x by 2, 3, 4, 5, ..., square root of X and if I get to the square root, I can (safely) assume that the number is prime. Unfortunately this solution seems quite klunky.
2) I've looked into better algorithms on how to determine if a number is prime, but get confused fast.
Is there a simple algorithm that can determine if X is prime, and not confuse a mere mortal programmer?
Thanks much! | 0 | [
2,
669,
28027,
1448,
800,
3726,
3726,
31,
57,
74,
749,
20,
170,
51,
161,
120,
669,
28027,
15,
17,
57,
2711,
21,
8893,
16,
1716,
1349,
26,
42,
20,
3746,
21,
1621,
234,
28,
141,
16,
32,
9,
137,
6,
31,
143,
31,
92,
114,
8918,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What's a good AJAX Autocomplete Plugin for jQuery?
===
I usually use jQuery as my JS library on my sites, and I would like to stick with it since I'm familiar with it.
I need to implement an AJAX autocomplete, mainly for suggesting search results. Here are a few I have found:
- [Dylan Verheul's version][1]
- [Jörn Zaefferer's version][2]
- [A modification of Dylan Verheul's version][3]
If you have tried any of these plugins, were you happy with them? Which one do you think is the most (and easily) customizable?
[1]: http://www.dyve.net/jquery/?autocomplete
[2]: http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
[3]: http://www.pengoworks.com/workshop/jquery/autocomplete.htm | 0 | [
2,
98,
22,
18,
21,
254,
20624,
3108,
15990,
10922,
108,
26,
487,
8190,
93,
60,
800,
3726,
3726,
31,
951,
275,
487,
8190,
93,
28,
51,
487,
18,
1248,
27,
51,
3259,
15,
17,
31,
83,
101,
20,
5258,
29,
32,
179,
31,
22,
79,
3694,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Reading/Writing MS Word files in Python
===
Is it possible to read and write Word (2003 and 2007) files in Python without using a COM object?<br />
I know that I can:
file = file('c:\file.doc')
file.write(text)
file.close()
but Word will read it as an HTML file not a native .doc file. | 0 | [
2,
1876,
118,
12646,
4235,
833,
6488,
19,
20059,
800,
3726,
3726,
25,
32,
938,
20,
1302,
17,
2757,
833,
13,
5,
3325,
17,
624,
6,
6488,
19,
20059,
366,
568,
21,
13,
960,
3095,
60,
1,
5145,
13,
118,
1,
31,
143,
30,
31,
92,
45,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What are some techniques for limiting compilation dependencies in C++ projects?
===
In a C++ project, compilation dependencies can make a software project difficult to maintain. What are some of the best practices for limiting dependencies, both within a module and across modules? | 0 | [
2,
98,
50,
109,
4212,
26,
17567,
4868,
29411,
19,
272,
20512,
2314,
60,
800,
3726,
3726,
19,
21,
272,
20512,
669,
15,
4868,
29411,
92,
233,
21,
2306,
669,
1956,
20,
4027,
9,
98,
50,
109,
16,
14,
246,
5242,
26,
17567,
29411,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Reading/Writing a MS Word file in PHP
===
Is it possible to read and write Word (2003 and 2007) files in PHP without using a COM object?
I know that I can:
$file = fopen('c:\file.doc', 'w+');
fwrite($file, $text);
fclose();
but Word will read it as an HTML file not a native .doc file. | 0 | [
2,
1876,
118,
12646,
21,
4235,
833,
3893,
19,
13,
26120,
800,
3726,
3726,
25,
32,
938,
20,
1302,
17,
2757,
833,
13,
5,
3325,
17,
624,
6,
6488,
19,
13,
26120,
366,
568,
21,
13,
960,
3095,
60,
31,
143,
30,
31,
92,
45,
5579,
16... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Switch Statement Fallthrough...should it be allowed?
===
For as long as I can remember I have avoided using switch statement fallthrough. Actually, I can't remember it ever entering my consciousness as a possible way to do things as it was drilled into my head early on that it was nothing more than a bug in the switch statement. However, today I ran across some code that uses it by design, which got me immediately wondering what everyone in the community thinks about switch statement fallthrough.
Is it something that a programming language should explicitly not allow (like C# does, though it supplies a workaround) or is it a feature of any language that is powerful enough to leave in the programmer's hands? | 4 | [
2,
5521,
3331,
1080,
11639,
9,
9,
9,
14941,
32,
44,
1159,
60,
800,
3726,
3726,
26,
28,
175,
28,
31,
92,
1518,
31,
57,
9460,
568,
5521,
3331,
1080,
11639,
9,
1121,
15,
31,
92,
22,
38,
1518,
32,
462,
4604,
51,
8298,
28,
21,
93... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 are the maximum columns in an Access 2003 query?
===
What are the maximum allowed number of columns in a query in access 2003? | 0 | [
2,
98,
50,
14,
2979,
7498,
19,
40,
1381,
973,
25597,
60,
800,
3726,
3726,
98,
50,
14,
2979,
1159,
234,
16,
7498,
19,
21,
25597,
19,
1381,
973,
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... | [
1,
1,
1,
1,
1,
1,
1,
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... |
Can I run LAMP and Rails from the same Apache instance?
===
We have a RedHat box with Apache2, PHP5 and MySQL 5 for much of our development. Now, we have a Rails client, and we need to set up a Rails app on the same server. Can we install Ruby and the Rails framework with the same Apache, or should we avoid this? Why or Why not? Is it possible to direct subdomains to either PHP or Ruby in the individual V-host definitions? | 0 | [
2,
92,
31,
485,
6792,
17,
2240,
18,
37,
14,
205,
17140,
4851,
60,
800,
3726,
3726,
95,
57,
21,
402,
6775,
1649,
29,
17140,
135,
15,
13,
26120,
264,
17,
51,
18,
22402,
331,
26,
212,
16,
318,
522,
9,
130,
15,
95,
57,
21,
2240,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Comparing Two Strings producing a numeric delta
===
Does anyone know of a simple way to compare two strings together to generate the "amount of difference" between the two? (in a numeric value) I have been crawling google with little luck on this. And after doing some coding it's not as simple as I had thought. Any clues? | 0 | [
2,
15047,
81,
7887,
4081,
21,
15764,
596,
6395,
800,
3726,
3726,
630,
1276,
143,
16,
21,
1935,
161,
20,
11590,
81,
7887,
429,
20,
7920,
14,
13,
7,
58,
9780,
16,
2841,
7,
128,
14,
81,
60,
13,
5,
108,
21,
15764,
596,
1923,
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... |
group collaboration open source php app
===
I am on a committee that would benefit from an online application that allows the members to collaborate w/ members.
I would want the ability to post messages and upload documents.
Is there any free, easy to install on your server apps that you would suggest? | 0 | [
2,
214,
4004,
368,
1267,
13,
26120,
4865,
800,
3726,
3726,
31,
589,
27,
21,
940,
30,
83,
4234,
37,
40,
2087,
3010,
30,
2965,
14,
443,
20,
19884,
619,
118,
443,
9,
31,
83,
259,
14,
2165,
20,
678,
7561,
17,
71,
8294,
4374,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Prevent programmers from knowing passwords used at runtime
===
My application connects to an FTP server with a username and password. I can create an encryption routine to encrypt and decrypt the password, but anybody with access to the source code and the encrypted password can decrypt the password.
Is there an easy way to prevent every human being from knowing the entire password used by an application? (I think it's okay if multiple people know part of the password.) | 0 | [
2,
2501,
17968,
18,
37,
2506,
20884,
18,
147,
35,
485,
891,
800,
3726,
3726,
51,
3010,
8534,
20,
40,
1187,
306,
8128,
29,
21,
4155,
7259,
17,
20884,
9,
31,
92,
1600,
40,
24420,
8275,
20,
1957,
11435,
17,
121,
11435,
14,
20884,
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... |
Open Source Virgin - What steps to take?
===
I'm thinking about releasing some of my PHP work as open source using one of the popular open-source licenses out there. I'd like to build a community around it and let contributors other than myself help grow the codebase.
For someone who has never released anything as open source before, what are some important things to consider when doing so? What important steps do you recommend I take? I want to make sure I have all my bases covered and go into this well informed. Would anyone with more experience be willing to share advice/experience/lessons learned?
| 0 | [
2,
368,
1267,
4701,
13,
8,
98,
2382,
20,
247,
60,
800,
3726,
3726,
31,
22,
79,
1440,
88,
8054,
109,
16,
51,
13,
26120,
170,
28,
368,
1267,
568,
53,
16,
14,
844,
368,
8,
12097,
3962,
18,
70,
80,
9,
31,
22,
43,
101,
20,
1895... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Detecting the number of processors
===
How do you detect the number of physical processors/cores in .net? | 0 | [
2,
9092,
68,
14,
234,
16,
21034,
800,
3726,
3726,
184,
107,
42,
9092,
14,
234,
16,
1825,
21034,
118,
10375,
18,
19,
13,
9,
2328,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do I track down obsolete build configurations in VS 2008?
===
I have a large solution containing many C# projects. When I open the solution and hit F5 for the first time, I get compile errors like the following:
>Error 3 Metadata file 'C:\Users\david\Documents\VS.Projects\CeoTrunk\Ceoimage\bin\x86\Release\Ceoimage.dll' could not be found.
I'm compiling the solution and the projects producing the error for "Debug (Any CPU)" and I haven't selected "Release (x86)" for a long time. Maybe months. These errors go away after I build the solution for "Debug (Any CPU)" the first time. If I close the solution and hit F5 again, the problem reappears.
Where could this "Release (x86)" remnant be hiding? How do I get rid of it? Why does it keep coming back?
| 0 | [
2,
184,
107,
31,
792,
125,
18562,
1895,
8091,
18,
19,
4611,
570,
60,
800,
3726,
3726,
31,
57,
21,
370,
4295,
3503,
151,
272,
5910,
2314,
9,
76,
31,
368,
14,
4295,
17,
770,
398,
264,
26,
14,
64,
85,
15,
31,
164,
26561,
11908,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 a string as a telephone number in C#
===
I have a string "1112224444' it is a telephone number. I want to format as 111-222-4444 before I store it in a file. It is on a datarecord and I would prefer to be able to do this without assigning a new variable.
I was thinking:
String.Format("{0:###-###-####}", i["MyPhone"].ToString() );
but that does not seem to do the trick. | 0 | [
2,
184,
20,
2595,
21,
3724,
28,
21,
5600,
234,
19,
272,
5910,
800,
3726,
3726,
31,
57,
21,
3724,
13,
7,
1306,
918,
19236,
26457,
22,
32,
25,
21,
5600,
234,
9,
31,
259,
20,
2595,
28,
14091,
8,
19428,
8,
4268,
4268,
115,
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... |
How to import data from Excel 2007 xlsx file into SQL Server 2000 Database?
===
SQL Server 2000 doesn't seem to support the xml based .xlsx file types. Besides converting the file to a 97-2003 file type, how else can I achieve this? | 0 | [
2,
184,
20,
9010,
1054,
37,
20700,
624,
993,
7532,
396,
3893,
77,
4444,
255,
8128,
824,
6018,
60,
800,
3726,
3726,
4444,
255,
8128,
824,
1437,
22,
38,
2260,
20,
555,
14,
23504,
432,
13,
9,
396,
7532,
396,
3893,
2551,
9,
3410,
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,
0... |
How do I enforce function signatures on a set of function declarations in C?
===
I want to make sure that a set of functions have the same signature in some C code. Ideally I would be able to define a new type that described the return value and arguments of a function and then declare my set of functions using this new type. I know that C has a typedef keyword but I've only every used it for data before and am not sure of the syntax I would need to use it for functions, if that is even possible. | 0 | [
2,
184,
107,
31,
16525,
1990,
19506,
27,
21,
309,
16,
1990,
7098,
18,
19,
272,
60,
800,
3726,
3726,
31,
259,
20,
233,
562,
30,
21,
309,
16,
3719,
57,
14,
205,
7810,
19,
109,
272,
1797,
9,
5628,
102,
31,
83,
44,
777,
20,
9267... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Regular Expression for extracting text from an RTF string
===
I was looking for a way to remove text from and RTF string and I found the following regex:
({\\)(.+?)(})|(\\)(.+?)(\b)
However the resulting string has two right angle brackets "}"
**Before:** {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 MS Shell Dlg 2;}{\f1\fnil MS Shell Dlg 2;}} {\colortbl ;\red0\green0\blue0;} {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\tx720\cf1\f0\fs20 can u send me info for the call pls\f1\par }
**After:** } can u send me info for the call pls }
Any thoughts on how to improve the regex? | 0 | [
2,
1290,
1803,
26,
10962,
68,
1854,
37,
40,
761,
11720,
3724,
800,
3726,
3726,
31,
23,
699,
26,
21,
161,
20,
4681,
1854,
37,
17,
761,
11720,
3724,
17,
31,
216,
14,
249,
7953,
1706,
45,
13,
5,
1,
6,
5,
9,
2430,
60,
6,
5,
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... |
SCRUM - How do you (developer) deal with unclear requirements and mutiple acting POs?
===
Here's another question trying to figure out how Scrum could/should work in real life. Here is a typical scenario I encounter:
Note: The term "Product Owner" is not used below. That is because the true "Product Owner" - the Product Manager in this case - does not make the final decisions. The DB Lead has final say on many things as he decides how the app interacts with the DB. QA has their own ideas on how things should look / work - and their ideas are entered as bugs and generally expected (by everyone) to be treated as such.
1. Product Manager writes a story like this "X User needs a page to do Y".
2. At the sprint planning meeting the story is added to the sprint backlog.
3. Some poor developer grabs (or is assigned) the story.
4. The developer asks the Product Manager "what do you want the page to be like".
5. Product Manager (if available) says, "Hmm, well, it needs to collect A, B, and C."
6. Developer starts working on his best guess as to what that should be like.
7. Developer tries to hook up the page to the Stored Proc and asks the DB lead some questions. DB lead says "Page also needs D and E. And shouldn't need B".
8. Developer makes changes and commits it.
9. QA says "I think E is confusing".
10. Developer has to wrangle around trying to get the QA, DB lead, and Product Manager to agree on what the final page should be.
My understanding (according to how we have been taught scrum) is that it's the developer's responsibility to flesh out the requirements for the page. In our environment, as illustrated above, this makes for a frustrating experience for the developer as well as a lot of wasted time for the developer while waiting to get all the powers that be to come to a unified decision about what the requirements are.
Sometimes it could take hours over multiple days to nail down the requirements for a 2 hour task! It's hard enough to get enough time with 1 person - even harder for 3!
I know it is anti-scrum, but it seems to me that the Product Manager, the DB Lead, and the QA team should meet before the Planning Meeting and hash out the details of the tasks to be added to the sprint. (Developers rarely have any input that is considered, and when we've tried to do this in meetings it could take a full day - not kidding - to hash out all of the details for all of the items in the backlog.)
Has anyone dealt with this? Any suggestions? I don't want to ramble on too long, so let me know if you need additional detail.
Thank you! | 0 | [
2,
26562,
13,
8,
184,
107,
42,
13,
5,
26051,
106,
6,
1183,
29,
11293,
4786,
17,
22072,
5106,
2180,
12928,
60,
800,
3726,
3726,
235,
22,
18,
226,
1301,
749,
20,
1465,
70,
184,
26562,
110,
118,
14941,
170,
19,
683,
201,
9,
235,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Login.aspx always wants to be my home page!
===
Just starting out in asp.net.
Have just created a login.aspx page in my site and stuck on a asp login control - that's all I did. Now my Welcome.aspx page won't show as the start page of my site when I debug - even though it is set as this.
Plus I have even edited my web.config - (see below) - and it still does the same thing. How do I make it work so I have my Welcome.aspx page start up as default?
<authentication mode="Forms">
<forms defaultUrl="~/Welcome.aspx" loginUrl="~/login.aspx" timeout="1440" ></forms>
</authentication> | 0 | [
2,
6738,
108,
9,
472,
306,
396,
550,
2846,
20,
44,
51,
213,
2478,
187,
800,
3726,
3726,
114,
1422,
70,
19,
28,
306,
9,
2328,
9,
57,
114,
679,
21,
6738,
108,
9,
472,
306,
396,
2478,
19,
51,
689,
17,
4549,
27,
21,
28,
306,
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... |
Check for click event in page_load
===
In c#, how can I check to see if a link button has been clicked in the page load method? I need to know if it was clicked before the click event is fired. | 0 | [
2,
2631,
26,
10840,
807,
19,
2478,
1,
8294,
800,
3726,
3726,
19,
272,
5910,
15,
184,
92,
31,
2631,
20,
196,
100,
21,
3508,
5167,
63,
74,
15802,
19,
14,
2478,
6305,
2109,
60,
31,
376,
20,
143,
100,
32,
23,
15802,
115,
14,
10840... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Is there a fix or a workaround for the memory leak in getpwnam?
===
Is there a fix or a workaround for the memory leak in getpwnam? | 0 | [
2,
25,
80,
21,
6098,
54,
21,
170,
10037,
26,
14,
1912,
11724,
19,
164,
17230,
6865,
60,
800,
3726,
3726,
25,
80,
21,
6098,
54,
21,
170,
10037,
26,
14,
1912,
11724,
19,
164,
17230,
6865,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
From SPSS, import data from SQL Server Analysis Services
===
I'm wondering if there is an easy way to load data from analysis services (SSAS) into SPSS. | 0 | [
2,
37,
3782,
18,
18,
15,
9010,
1054,
37,
4444,
255,
8128,
2495,
687,
800,
3726,
3726,
31,
22,
79,
5712,
100,
80,
25,
40,
2010,
161,
20,
6305,
1054,
37,
2495,
687,
13,
5,
8234,
18,
6,
77,
3782,
18,
18,
9,
3,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How to make junit testing to stop after first failing test
===
Is there a way to make running junit test to stop after a test fails? | 0 | [
2,
184,
20,
233,
7446,
242,
4431,
20,
747,
75,
64,
7250,
1289,
800,
3726,
3726,
25,
80,
21,
161,
20,
233,
946,
7446,
242,
1289,
20,
747,
75,
21,
1289,
13614,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Accessing Controls on page loaded in IFrame in MS CRM 4.0 using Javascript
===
I have a custom aspx page loaded in a IFrame in one of the modules in MS CRM 4.0. This page basically has 6 textboxes (txtValue1, txtValue2 and so on..) with values in it. I want to access these values through javascript code either on the load event or save event. Does anybody know how to do it ? I tried couple of codes that i got from net but nothing seems to work. Any help on this would appreciated. | 0 | [
2,
1381,
68,
8671,
27,
2478,
8572,
19,
31,
8361,
19,
4235,
6186,
79,
268,
9,
387,
568,
8247,
8741,
800,
3726,
3726,
31,
57,
21,
5816,
28,
306,
396,
2478,
8572,
19,
21,
31,
8361,
19,
53,
16,
14,
17113,
19,
4235,
6186,
79,
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... |
What interface or method should my class implement to print what I want in Console.WriteLine?
===
I have an object of class F. I want to output the contents of the object using Console.WriteLine for quick and dirty status updates like this:
Console.WriteLine(objectF);
This prints out only the name of the class to the console:
F
I want to overload this somehow so that I can instead print out some useful information about the object and its properties.
I have a workaround already: To overload the ToString method in my class and then call:
Console.WriteLine(objectF.ToString());
But I would rather have the simpler syntax. Any ideas? | 0 | [
2,
98,
6573,
54,
2109,
378,
51,
718,
8713,
20,
4793,
98,
31,
259,
19,
8650,
9,
23716,
1143,
60,
800,
3726,
3726,
31,
57,
40,
3095,
16,
718,
398,
9,
31,
259,
20,
5196,
14,
8478,
16,
14,
3095,
568,
8650,
9,
23716,
1143,
26,
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... |
Problem with System.IO.Directory.Exists
===
I’m getting an intermittent false negative on the call “if (!System.IO.Directory.Exists(folder))” in code in an ASP.NET 2 web site [1]. The folder clearly exists, and even contains a log file that is written to when the CLR doesn’t lie about the folder’s existence. Any help would be appreciated.
[1] BugTracker.NET
| 0 | [
2,
1448,
29,
329,
9,
1963,
9,
10197,
93,
9,
1706,
3163,
800,
3726,
3726,
31,
1,
79,
1017,
40,
19667,
4997,
3682,
27,
14,
645,
13,
1,
821,
13,
5,
187,
10724,
9,
1963,
9,
10197,
93,
9,
1706,
3163,
5,
8814,
106,
6,
6,
1,
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... |
How to determine if an assembly is in use?
===
In particular, how to discern an assembly being in use versus, say, not having write access to the file? | 0 | [
2,
184,
20,
3746,
100,
40,
1475,
25,
19,
275,
60,
800,
3726,
3726,
19,
1498,
15,
184,
20,
19241,
40,
1475,
142,
19,
275,
5706,
15,
395,
15,
52,
452,
2757,
1381,
20,
14,
3893,
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,
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... |
How to force restart a windows box using vbscript?
===
I'm trying to find a way to force windows to reboot and running into issues. I've tried
<pre><code>`Set OpSysSet = GetObject("winmgmts:{authenticationlevel=Pkt," _
& "(Shutdown)}").ExecQuery("select * from Win32_OperatingSystem where "_
& "Primary=true")
for each OpSys in OpSysSet
retVal = OpSys.Reboot()
next`</pre></code>I've also tried using the `shutdown -f -r` command, and in both cases I sometimes get no response, and if I try again I get an error saying "Action could not complete because the system is shutting down" even though no matter how long I leave it it doesn't shut down, it still allows me to start new programs, and doing a `shutdown -a` gives the same error. Anyone know of a way to use a script to force windows to reboot? | 0 | [
2,
184,
20,
558,
22767,
21,
1936,
1649,
568,
13,
20468,
8741,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
477,
21,
161,
20,
558,
1936,
20,
25312,
17,
946,
77,
1549,
9,
31,
22,
195,
794,
13,
1,
3515,
1,
9375,
1,
3554,
13,
11314... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Strip Windows DLL debug info?
===
I normally don't work on Windows development, and am completely unfamiliar with the toolchain and build system. My embedded product includes some Windows DLLs from a third party in its filesystem (which are used by a Windows machine which mounts the filesystem).
I have a problem: the most recent release of these DLLs have tripled in size compared to previous builds, and they no longer fit in the filesystem. There have not been many changes in the functionality of the DLLs, so I suspect the developers simply forgot to strip debug symbols in this drop. I will ask them, but getting an answer often takes days due to timezone and language differences.
Could someone explain, using simple steps for someone unfamiliar with VisualC, how to determine if a DLL still contains debugging information and how to strip it out? | 0 | [
2,
4998,
1936,
13,
43,
211,
121,
16254,
15404,
60,
800,
3726,
3726,
31,
4147,
221,
22,
38,
170,
27,
1936,
522,
15,
17,
589,
1524,
17819,
29,
14,
5607,
17317,
17,
1895,
329,
9,
51,
12138,
2374,
1103,
109,
1936,
13,
43,
211,
18,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
JQuery JavaScript Design: Self Executing Function or Object Literal?
===
I'm curious as to if there are any best practices relating to JQuery when constructing encapsulated code blocks.
Generally, when I construct a page I like to encapsulate the functions used within that page inside an object. This allows me some encapsulation when building applications. There's nothing I hate more than seeing a JavaScript file with a bunch of this
function doSomethingOnlyRelevantOnThisPage() {
// do some stuff
}
I this makes for messy design, and doesn't really encapsulate functionality nicely.
Commonly in many frameworks, there is a standard that is used to perform this encapsulation.
In Mootools they favor the Object Literal Notation:
var Site = {
// properties and methods
}
In YUI they favor the Self Executing Function notation:
(function() { // properties and methods })()
The nice thing about the second example is that a closure is created, thus allowing you to define private properties and methods.
My question is this: Do any JQuery aficionados have any best practices for creating these cleanly encapsulated structures? What is the rationale behind their use?
| 0 | [
2,
487,
8190,
93,
8247,
8741,
704,
45,
1119,
25836,
1990,
54,
3095,
20665,
60,
800,
3726,
3726,
31,
22,
79,
7686,
28,
20,
100,
80,
50,
186,
246,
5242,
8456,
20,
487,
8190,
93,
76,
18660,
1957,
4666,
18,
13045,
1797,
5198,
9,
146... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ajax loading image
===
I have a page being loaded with jquery. The initial load includes 100 records with 6 icons per record. Needless to say, it takes a few seconds to load and I want to give the user a "loading" prompt/animation. Any ideas? | 0 | [
2,
20624,
12797,
1961,
800,
3726,
3726,
31,
57,
21,
2478,
142,
8572,
29,
487,
8190,
93,
9,
14,
2104,
6305,
1103,
808,
742,
29,
400,
9801,
18,
416,
571,
9,
17023,
18,
20,
395,
15,
32,
1384,
21,
310,
2582,
20,
6305,
17,
31,
259,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Apache - mod_rewrite RewriteRule question
===
I have a few problems with my mod_rewrite rules. There a three different url pattern I want to handle.
1. http://example.com/%module%/%view%-%args%.html
2. http://example.com/%module%/%view%.html
3. http://example.com/%module%
The following mod_rewrite rules don't really work. Also I've the problem that the query (example: user.html?foo=bar) doesn't have an effect.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^([0-9A-Za-z_-]*)/?([0-9A-Za-z_]+)-?([0-9A-Za-z_,]*)\.html$ index.php?__module=$1&__view=$2&__argv=$3
RewriteRule ^([0-9A-Za-z_-]*)/?$ index.php?__module=$1&__view=&__argv=
</IfModule> | 0 | [
2,
17140,
13,
8,
7226,
1,
99,
23716,
27891,
16154,
1301,
800,
3726,
3726,
31,
57,
21,
310,
1716,
29,
51,
7226,
1,
99,
23716,
1761,
9,
80,
21,
132,
421,
287,
6362,
3732,
31,
259,
20,
3053,
9,
137,
9,
7775,
6903,
29041,
9,
960,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Software developer (C#/ASP.NET) training resources in the Washington, DC area
===
Looking for any input on quality training opportunities in the vicinity of Washington, DC for C# and/or ASP.NET. Night classes, conferences, or weekly training sessions, all ideas are welcome.
So if you've had a good experience with a particular facility/program in the area (or know of any quality resources) I'd like to hear about.
Thanks! | 2 | [
2,
2306,
10058,
13,
5,
150,
5910,
118,
472,
306,
9,
2328,
6,
838,
2566,
19,
14,
1033,
15,
4752,
217,
800,
3726,
3726,
699,
26,
186,
6367,
27,
2190,
838,
5699,
19,
14,
10162,
16,
1033,
15,
4752,
26,
272,
5910,
17,
118,
248,
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... |
Are there any style guides for HTML?
===
I have found that my HTML is, to be honest, very clunky. Small, simple pages are OK. But there comes a point when between indenting and the kinds of tags I have, it's impossible to keep lines short. Is there a W3C (or otherwise "official" or well accepted) formatting guide for clean, maintainable HTML? If not, what suggestions can the community provide? | 0 | [
2,
50,
80,
186,
1034,
14838,
26,
13,
15895,
60,
800,
3726,
3726,
31,
57,
216,
30,
51,
13,
15895,
25,
15,
20,
44,
6964,
15,
253,
272,
22033,
93,
9,
284,
15,
1935,
4434,
50,
5854,
9,
47,
80,
1624,
21,
454,
76,
128,
19,
817,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Recommendations for converting raster images to vector graphics
===
If a person is looking to batch convert a large number of raster images into vector graphics, are there any tools out there that do that well?
For an example, think of just about any diagram that has standard shapes (ellipses, rectangles) and text. | 0 | [
2,
12121,
26,
19583,
7172,
815,
3502,
20,
7497,
8351,
800,
3726,
3726,
100,
21,
840,
25,
699,
20,
13064,
8406,
21,
370,
234,
16,
7172,
815,
3502,
77,
7497,
8351,
15,
50,
80,
186,
4672,
70,
80,
30,
107,
30,
134,
60,
26,
40,
823... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Change asp.net generated WSDL for an asp.net web service
===
is there any way to change the way asp.net generates elements in the WSDL generated from a .asmx file? Specifically, it seems to mark all elements minoccurs="0" and there are some elements that I want to be minoccurs="1" (aka required fields). One of these is an argument to the web service (e.g. foo(arg1, arg2) where I want arg2 to be generated in the WSDL as minoccurs="1") the other is a particular field in the class that corresponds to arg1. Do I have to forego auto WSDL generation and take a "contract first" approach? | 0 | [
2,
753,
28,
306,
9,
2328,
6756,
619,
18,
8643,
26,
40,
28,
306,
9,
2328,
2741,
365,
800,
3726,
3726,
25,
80,
186,
161,
20,
753,
14,
161,
28,
306,
9,
2328,
7920,
18,
2065,
19,
14,
619,
18,
8643,
6756,
37,
21,
13,
9,
472,
79... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 does the tilde (~) mean in C#?
===
I am looking at some code and it has this statement:
~ConnectionManager()
{
Dispose(false);
}
The class implements the IDisposable interface, but I do not know if that is part of that the tilde(~) is used for.
Thank you,
Keith | 0 | [
2,
98,
630,
14,
9189,
546,
13,
5,
1,
6,
884,
19,
272,
5910,
60,
800,
3726,
3726,
31,
589,
699,
35,
109,
1797,
17,
32,
63,
48,
3331,
45,
13,
1,
25996,
872,
22256,
5,
6,
13,
1,
17913,
5,
13192,
870,
6,
73,
13,
1,
14,
718,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 write my own confirm dialog in javascript?
===
I want to write something that acts just like confirm() in javascript, but I want to write it myself so I can skin the dialog box. In having trouble thinking through how I would basically force the javascript thread to wait until the user responds and then return true or false. | 0 | [
2,
184,
107,
31,
2757,
51,
258,
10265,
28223,
19,
8247,
8741,
60,
800,
3726,
3726,
31,
259,
20,
2757,
301,
30,
3167,
114,
101,
10265,
5,
6,
19,
8247,
8741,
15,
47,
31,
259,
20,
2757,
32,
992,
86,
31,
92,
1188,
14,
28223,
1649,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 use EventArgs.Empty instead of null?
===
I recall reading, on multiple occasions and in multiple locations, that when firing the typical event:
protected virtual OnSomethingHappened()
{
this.SomethingHappened(this, EventArgs.Empty);
}
e should be EventArgs.Empty if there are no interesting event args, not null.
I've followed the guidance in my code, but I realized that I'm not clear on why that's the preferred technique.
1. Why does the stated contract prefer
EventArgs.Empty over null?
2. What sort of situations in my own
code would justify a similar design
decision? When should I consider
creating some static "Nothing
interesting here" property instead of
using null to indicate the absence
of something interesting?
3. Has the addition of nullable value types impacted these decisions?
| 0 | [
2,
483,
275,
807,
10663,
18,
9,
26542,
700,
16,
16203,
60,
800,
3726,
3726,
31,
7111,
1876,
15,
27,
1886,
5795,
17,
19,
1886,
4095,
15,
30,
76,
7139,
14,
3874,
807,
45,
3803,
6599,
27,
9099,
252,
22358,
69,
5,
6,
13,
1,
48,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is the destructor called if the constructor throws an exception?
===
Looking for an answer for C# and C++. (in C#, replace 'destructor' with 'finalizer') | 0 | [
2,
25,
14,
13,
20137,
248,
227,
100,
14,
6960,
248,
13566,
40,
5391,
60,
800,
3726,
3726,
699,
26,
40,
1623,
26,
272,
5910,
17,
272,
20512,
9,
13,
5,
108,
272,
5910,
15,
3934,
13,
22,
20137,
248,
22,
29,
13,
22,
4932,
11907,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Color Coherence Vector in C#
===
A friend and I are about to embark on creating a machine that performs some image comparison for sorting. I know about histogram comparison and am generally confident that a small grid of histograms per image precalculated and stored in columns in a database table will generally give us pretty good matches on the first pass because we are matching like things.
The second comparison we want to perform is to use a [color coherence vector][1] (CCV) of images which passed the histogram match test from our subject image to the candidate images. I know that this sort of comparison is more precise.
My friend is confident that he can develop CCV in C# using the [C# wrapper][2] to [OpenCV][3]. I am pretty sure he can too. However I would like to know:
1. Has anyone already done this in C# and released the source code? Or a C# wrapper?
2. Are we barking up the wrong tree? (Should we just use CCV and forgo histogram comparisons at the database level? Or is CCV too much?)
[1]: http://tinyurl.com/4lo8nl
[2]: http://www.codeproject.com/KB/cs/Intel_OpenCV.aspx
[3]: http://sourceforge.net/projects/opencvlibrary/ | 0 | [
2,
1665,
326,
1694,
2940,
7497,
19,
272,
5910,
800,
3726,
3726,
21,
860,
17,
31,
50,
88,
20,
20116,
27,
2936,
21,
1940,
30,
11563,
109,
1961,
6050,
26,
2058,
68,
9,
31,
143,
88,
33,
38,
20476,
6050,
17,
589,
1469,
9019,
30,
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... |
Any way to transfer value from one cell to another?
===
Is there any way in the sql language or in mysql (or other DBMA) to transfer a value from one cell to another? For example, say there is a table called user_cars with the following structure:
|id| |user_name| |num_cars|
Bob has 5 cars, and John has 3 cars. Is there any way to in one query subtract 2 cars from Bob and add 2 to John? I know this can be done with two update queries, but I'd just like to know if there was a more efficient way. | 0 | [
2,
186,
161,
20,
2617,
1923,
37,
53,
1667,
20,
226,
60,
800,
3726,
3726,
25,
80,
186,
161,
19,
14,
4444,
255,
816,
54,
19,
51,
18,
22402,
13,
5,
248,
89,
13,
9007,
540,
6,
20,
2617,
21,
1923,
37,
53,
1667,
20,
226,
60,
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... |
Is it sensible to dynamically generate SVG images on websites yet?
===
I'm just learning about SVG, and it seems great but I'm not sure about browser support - have people successfully got around this, or is it still too early? | 0 | [
2,
25,
32,
24599,
20,
7782,
1326,
7920,
13,
18,
22955,
3502,
27,
13931,
768,
60,
800,
3726,
3726,
31,
22,
79,
114,
2477,
88,
13,
18,
22955,
15,
17,
32,
2206,
374,
47,
31,
22,
79,
52,
562,
88,
16495,
555,
13,
8,
57,
148,
3673... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Why should I use Carp instead of warn in Perl?
===
People keep giving me examples with carp instead of warn. Why? What makes carp better than warn? | 0 | [
2,
483,
378,
31,
275,
349,
306,
700,
16,
9296,
19,
416,
255,
60,
800,
3726,
3726,
148,
643,
1438,
55,
3770,
29,
349,
306,
700,
16,
9296,
9,
483,
60,
98,
1364,
349,
306,
574,
119,
9296,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Is there a way to cast generic lists to lists of interface/base class types?
===
I'm trying to show someone a use for interfaces in a crazy situation they've created. They have several unrelated objects in lists, and need to perform an operation on two string properties in each object. I'm pointing out that if they define the properties as part of an interface, they can use the interface object as the type for a method parameter that acts on it; for example:
<pre><code>void PrintProperties(IEnumerable<ISpecialProperties> list)
{
foreach (var item in list)
{
Console.WriteLine("{0} {1}", item.Prop1, item.Prop2);
}
}</code></pre>
This seems like it's all good, but the lists that need to be worked on aren't (and shouldn't) be declared with the interface as the type parameter. However, it doesn't seem like you can cast to a different type parameter. For example, this fails and I can't understand why:
<pre><code>using System;
using System.Collections.Generic;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
List<Test> myList = new List<Test>();
for (int i = 0; i < 5; i++)
{
myList.Add(new Test());
}
PrintList((IEnumerable<IDoSomething>)myList);
}
static void PrintList(IEnumerable<IDoSomething> list)
{
foreach (IDoSomething item in list)
{
item.DoSomething();
}
}
}
interface IDoSomething
{
void DoSomething();
}
public class Test : IDoSomething
{
public void DoSomething()
{
Console.WriteLine("Test did it!");
}
}
}</code></pre>
I *can* use the <code>Enumerable.Cast<T></code> member to do this, but I was looking for a method that might work in .NET 2.0 as well. It seems like this should be possible; what am I missing? | 0 | [
2,
25,
80,
21,
161,
20,
1325,
12733,
7227,
20,
7227,
16,
6573,
118,
8436,
718,
2551,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
298,
737,
21,
275,
26,
6573,
18,
19,
21,
3328,
1858,
59,
22,
195,
679,
9,
59,
57,
238,
17379,
391... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 assign a process to a core in windows xp
===
Is there a way to assign a process to a core (or more than one core) on a multi-core system running Windows XP?
An answer using a GUI is acceptable. | 0 | [
2,
184,
20,
13952,
21,
953,
20,
21,
2884,
19,
1936,
23045,
800,
3726,
3726,
25,
80,
21,
161,
20,
13952,
21,
953,
20,
21,
2884,
13,
5,
248,
91,
119,
53,
2884,
6,
27,
21,
1889,
8,
10375,
329,
946,
1936,
23045,
60,
40,
1623,
56... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
grep: matching on literal "+"
===
I need to find occurrences of "(+)" in my sql scripts, (i.e., Oracle outer join expressions). Realizing that "+", "(", and ")" are all special regex characters, I tried:
<pre>
grep "\(\+\)" *
</pre>
Now this does return occurrences of "(+)", but other lines as well. (Seemingly anything with open and close parens on the same line.) Recalling that parens are only special for extended grep, I tried:
<pre>
grep "(\+)" *
grep "(\\+)" *
</pre>
Both of these returned only lines that contain "()". So assuming that "+" can't be escaped, I tried an old trick:
<pre>
grep "([+])" *
</pre>
That works. I cross-checked the result with a non-regex tool.
**Question**: Can someone explain what exactly is going on with the "+" character? Is there a less klugy way to match on "(+)"?
(I am using the cygwin grep command.) | 0 | [
2,
5604,
306,
45,
10120,
27,
20665,
13,
7,
2430,
7,
800,
3726,
3726,
31,
376,
20,
477,
12933,
18,
16,
13,
7,
5,
2430,
6,
7,
19,
51,
4444,
255,
17505,
15,
13,
5,
49,
9,
62,
9,
15,
15759,
4896,
1865,
13832,
6,
9,
9308,
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... |
How to perform seam carving on an image using PHP's GD library?
===
I am working on a project that resizes images using [PHP's GD][1] library. I would like to be able to add the option to use [seam carving][2] to resize images but don't want to require something like [ImageMagick][3] (which can do seam carving with [its liquid rescale feature][4]) to accomplish this.
Since there are no built-in seam carving functions in GD, **is there a way to perform seam carving on an image using PHP's GD library** or other built-in PHP functions? Alternatively, do you know if seam carving will eventually be baked into GD?
[1]: http://us.php.net/gd
[2]: http://en.wikipedia.org/wiki/Seam_carving
[3]: http://www.imagemagick.org/script/index.php
[4]: http://www.imagemagick.org/Usage/resize/#liquid-rescale | 0 | [
2,
184,
20,
2985,
13927,
15475,
27,
40,
1961,
568,
13,
26120,
22,
18,
489,
43,
1248,
60,
800,
3726,
3726,
31,
589,
638,
27,
21,
669,
30,
10719,
13569,
3502,
568,
636,
26120,
22,
18,
489,
43,
500,
2558,
165,
500,
1248,
9,
31,
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... |
Why does Word freeze when I'm debugging?
===
Whenever I'm at a break point in a certain C#.NET application in Visual Studio 2008 and I fire up Microsoft Word 2007, word will fail to open until I restart the C# application. I have a few theories about why, but does anyone know for sure? | 0 | [
2,
483,
630,
833,
11551,
76,
31,
22,
79,
121,
16254,
2762,
60,
800,
3726,
3726,
6634,
31,
22,
79,
35,
21,
1442,
454,
19,
21,
1200,
272,
5910,
9,
2328,
3010,
19,
3458,
1120,
570,
17,
31,
535,
71,
7099,
833,
624,
15,
833,
129,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C# : Textbox multiple line and blank line disappear
===
I have a Winform application build with C# and .Net 2.0. I have a textbox set with MultiLine.
The problem is when someone write and press few enters and press my button SAVE. All the new line disappear.
Example:
Line1
Line3
This will be if I save and load :
Line1 Line3
Any idea why?
| 2 | [
2,
272,
5910,
13,
45,
1854,
5309,
1886,
293,
17,
6463,
293,
10866,
800,
3726,
3726,
31,
57,
21,
628,
4190,
3010,
1895,
29,
272,
5910,
17,
13,
9,
2328,
172,
9,
387,
9,
31,
57,
21,
1854,
5309,
309,
29,
1889,
1143,
9,
14,
1448,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SQL - table alias scope.
===
I've just learned ( yesterday ) to use "exists" instead of "in".
BAD
select * from table where nameid in (
select nameid from othertable where otherdesc = 'SomeDesc' )
GOOD
select * from table t where exist (
select nameid from othertable o where t.nameid = o.nameid and otherdesc = 'SomeDesc' )
And I have some questions about this:
1) The explanation as I understood was: *"The reason why this is better is because only the matching values will be returned instead of building a massive list of possible results"*. Does that mean that while the first subquery might return 900 results the second will return only 1 ( yes or no )?
2) In the past I have had the RDBMS complainin: "only the first 1000 rows might be retrieved", this second approach would solve that problem?
3) What is the scope of the alias in the second subquery?... does the alias only lives in the parenthesis?
for example
select * from table t where exist (
select nameid from othertable o where t.nameid = o.nameid and otherdesc = 'SomeDesc' )
AND
select nameid from othertable o where t.nameid = o.nameid and otherdesc = 'SomeOtherDesc' )
That is, if I use the same alias ( o for table othertable ) In the second "exist" will it present any problem with the first exists? or are they totally independent?
Is this something Oracle only related or it is valid for most RDBMS?
Thanks a lot | 0 | [
2,
4444,
255,
13,
8,
859,
15794,
9914,
9,
800,
3726,
3726,
31,
22,
195,
114,
2691,
13,
5,
7124,
13,
6,
20,
275,
13,
7,
1706,
3163,
7,
700,
16,
13,
7,
108,
7,
9,
896,
5407,
1637,
37,
859,
113,
204,
1340,
19,
13,
5,
5407,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
why is my ASP.NET AutoCompleteExtender is returning undefined?
===
Why am I getting a textbox that returns undefined list of variables?
When I run this code:
var query = (from tisa in db.TA_Info_Step_Archives
where tisa.ta_Serial.ToString().StartsWith(prefixText)
select tisa.TA_Serial.ToString()).Distinct().Take(Convert.ToInt32(count));
return query.ToList<string>().ToArray();
I get this XML file:
<string>200700160</string>
<string>200700161</string>
<string>200700162</string>
<string>200700163</string>
<string>200700164</string>
<string>200700170</string>
<string>200700171</string>
<string>200700172</string>
<string>200700173</string>
<string>200700174</string>
<string>200700175</string>
<string>200700176</string>
<string>200700177</string>
<string>200700178</string>
<string>200700179</string>
<string>200700180</string>
<string>200700181</string>
<string>200700182</string>
<string>200700183</string>
<string>200700184</string>
BUT, the textbox returns a list of "undefined"....
Help please? | 0 | [
2,
483,
25,
51,
28,
306,
9,
2328,
3108,
15990,
1706,
38,
13630,
25,
2485,
367,
13439,
60,
800,
3726,
3726,
483,
589,
31,
1017,
21,
1854,
5309,
30,
4815,
367,
13439,
968,
16,
12157,
60,
76,
31,
485,
48,
1797,
45,
4033,
25597,
800... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Pronouncable passwords?
===
Modules or software solutions for generating English pronounceable passwords?
Are there similar modules for other languages?
-Adam | 0 | [
2,
18362,
150,
579,
20884,
18,
60,
800,
3726,
3726,
17113,
54,
2306,
6776,
26,
13500,
486,
25059,
579,
20884,
18,
60,
50,
80,
835,
17113,
26,
89,
2556,
60,
13,
8,
15932,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Function pointer cast to different signature.
===
I use a structure of function pointers to implement an interface for different backends. The signatures are very different, but the return values are almost all void, void * or int.
<pre><code>
struct my_interface {
void (*func_a)(int i);
void *(*func_b)(const char *bla);
...
int (*func_z)(char foo);
};
</code></pre>
But it is not required that a backends supports functions for every interface function. So I have two possibilities, first option is to check before every call if the pointer is unequal NULL. I don't like that very much, because of the readability and because I fear the performance impacts (I haven't measured it, however). The other option is to have a dummy function, for the rare cases an interface function doesn't exist.
Therefore I'd need a dummy function for every signature, I wonder if it is possible to have only one for the different return values. And cast it to the given signature.
<pre><code>
#include <stdio.h>
int nothing(void) {return 0;}
typedef int (*cb_t)(int);
int main(void)
{
cb_t func;
int i;
func = (cb_t) nothing;
i = func(1);
printf("%d\n", i);
return 0;
}
</code></pre>
I tested this code with gcc and it works. But is it sane? Or can it corrupt the stack or can it cause other problems? | 0 | [
2,
1990,
454,
106,
1325,
20,
421,
7810,
9,
800,
3726,
3726,
31,
275,
21,
1411,
16,
1990,
454,
445,
20,
8713,
40,
6573,
26,
421,
97,
2451,
18,
9,
14,
19506,
50,
253,
421,
15,
47,
14,
788,
4070,
50,
557,
65,
11364,
15,
11364,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 techniques do you use when you are designing an Object Model alone?
===
So no doubt that building a domain model is something that I think happens best when you approach it as as team. Even going so far as to involve someone who is not technical and a member of the 'business' in the modeling sessions. So much can get done quickly when you put the right people in a room and hammer out things on a whiteboard. But what about the times that you don't have that luxury? What about when you have to build a complex domain model alone? I have been doing this for the past month or so and have done the following:
1. Start off by Noun Idendtification, then use Class-Role-Collaborations to analyze relationships
2. Look for analysis patterns that can be used to refine the model, Party, etc..
3. As soon as I have a handle on the basics, I'll bust out an IDE and start writing XUnit tests to show that the model let's me do the things that I want
While these techniques have worked well, I'm not sure they are as efficient as a truely collaborative effort. I think it is easy to get carried away with a concept only to realize later that it violates x or y requirement. What techniques have you used when working in isolation to ensure that your object/domain model is on target?
| 0 | [
2,
98,
4212,
107,
42,
275,
76,
42,
50,
15026,
40,
3095,
1061,
1056,
60,
800,
3726,
3726,
86,
90,
3063,
30,
353,
21,
4603,
1061,
25,
301,
30,
31,
277,
5531,
246,
76,
42,
2141,
32,
28,
28,
173,
9,
166,
228,
86,
463,
28,
20,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I highlight/outline a Visual object in WPF?
===
If I had a Canvas with n number of Visual objects of any shape or size, how would I highlight/outline a Visual object programmatically?
Is there something built into WPF to help me? | 0 | [
2,
184,
92,
31,
14373,
118,
1320,
1143,
21,
3458,
3095,
19,
619,
7721,
60,
800,
3726,
3726,
100,
31,
41,
21,
9696,
29,
13,
103,
234,
16,
3458,
3916,
16,
186,
2539,
54,
1072,
15,
184,
83,
31,
14373,
118,
1320,
1143,
21,
3458,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... |
How to launch multiple ie windows/tabs from batch file
===
I would like a batch file to launch two seperate programs then have the cmd window close. Actually, to clarify, I am launching IE with two different urls.
so far I have something like this:
start "~\iexplore.exe" "url1"
start "~\iexplore.exe" "url2"
what I get is one instance of IE with only the second url loaded. Seems the second is replacing the second. I seem to remember a syntax where I would load a new cmd window and pass the cmd to execute on load, but can't find the reference.
as a second part of the question: what is a good reference url to keep for the times you need to write a quick batch file?
| 0 | [
2,
184,
20,
3394,
1886,
13,
660,
1936,
118,
15783,
18,
37,
13064,
3893,
800,
3726,
3726,
31,
83,
101,
21,
13064,
3893,
20,
3394,
81,
10332,
106,
1373,
1726,
94,
57,
14,
2390,
43,
1463,
543,
9,
1121,
15,
20,
23116,
15,
31,
589,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 isn't IIS executing the PHP code of my site root index.php file?
===
IIS is literally sending `<?php ... ?>` code to the browser rather then executing it.
But, only for the root *http://domain.com/index.php* file.
All other .php files in that folder and index.php files in subfolders execute as expected.
How can I get my root index.php code to execute? | 0 | [
2,
483,
2532,
22,
38,
595,
18,
25836,
14,
13,
26120,
1797,
16,
51,
689,
5900,
4348,
9,
26120,
3893,
60,
800,
3726,
3726,
595,
18,
25,
6949,
4907,
13,
1,
60,
26120,
13,
9,
9,
9,
13,
60,
1,
1797,
20,
14,
16495,
864,
94,
25836,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Software testing for a bare-metal system
===
I am writing a project in C++ for an embedded system with no OS support; almost no library support. Very bare-metal. Hence, a fair amount of my code is tightly coupled(e.g., software triggered interrupts and the layer directly above them).
Part of what I am doing involves changing the serial port configuration, thus driving concurrent change on the PC end (the UI end) and the microprocessor(the activity end).
I'm doing okay so far in a super-careful incremental type development(piece by piece fitting it in). However, I'd like to be more confident about my code working in an engineering sense.
What kind of methodologies/frameworks would you recommend for this kind of situation? | 0 | [
2,
2306,
4431,
26,
21,
4856,
8,
13651,
329,
800,
3726,
3726,
31,
589,
1174,
21,
669,
19,
272,
20512,
26,
40,
12138,
329,
29,
90,
13,
759,
555,
73,
557,
90,
1248,
555,
9,
253,
4856,
8,
13651,
9,
5796,
15,
21,
1768,
2006,
16,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Should I use default(Foo), Foo.Empty, or null?
===
So C# now allows you to use `default(Foo)` to get a recognized "not filled in yet"/empty instance of a class -- I'm not sure if it is exactly the same as `new Foo()` or not. Many library classes also implement a `Foo.Empty` property, which returns a similar instance. And of course any reference type can point to `null`. So really, what's the difference? When is one right or wrong? What's more consistent, or performs better? What tests should I use when checking if an object is conceptually "not ready for prime time"? Not everybody has `Foo.IsNullOrEmpty()`. | 0 | [
2,
378,
31,
275,
12838,
5,
4120,
111,
6,
15,
4310,
111,
9,
26542,
15,
54,
16203,
60,
800,
3726,
3726,
86,
272,
5910,
130,
2965,
42,
20,
275,
13,
1,
13862,
9708,
5,
4120,
111,
6,
1,
20,
164,
21,
2124,
13,
7,
1270,
1943,
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... |
How to use c# to sanitize input on an html page?
===
Is there a library or acceptable method for sanitizing the input to an html page.
In this case I have a form with just a name, phone number, and email address.
Code must be c#.
Thanks, | 0 | [
2,
184,
20,
275,
272,
5910,
20,
523,
242,
2952,
6367,
27,
40,
13,
15895,
2478,
60,
800,
3726,
3726,
25,
80,
21,
1248,
54,
12513,
2109,
26,
523,
242,
3335,
14,
6367,
20,
40,
13,
15895,
2478,
9,
19,
48,
610,
31,
57,
21,
505,
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... |
Moving from VS Professional to VS Team System
===
We are looking at moving from Visual Studio 2008 Professional to Visual Studio Team System. I believe I've read that the client Development Edition is a superset of what Professional has/does. I'd like to ease into the transition with the client end first, then get the Team Foundation Server up and running later, and I want to be sure I won't be losing any functionality. If all goes well, the rest of my team will be following along with the upgrade. Let me know if this sounds like the right direction to go, or if you've had issues migrating in this direction. Thanks. | 0 | [
2,
1219,
37,
4611,
736,
20,
4611,
173,
329,
800,
3726,
3726,
95,
50,
699,
35,
1219,
37,
3458,
1120,
570,
736,
20,
3458,
1120,
173,
329,
9,
31,
985,
31,
22,
195,
1302,
30,
14,
6819,
522,
1322,
25,
21,
1026,
3554,
16,
98,
736,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Django: Inject errors into already validated form?
===
After my form.Form validates the user input values I pass them to a separate (external) process for further processing. This external process can potentially find further errors in the values.
Is there a way to inject these errors into the already validated form so they can be displayed via the usual form error display methods? Or, are there better alternative approaches?
One suggestions was to include the external processing in the form validation. I'm not crazy about this since the external process does a lot more than just validate. | 0 | [
2,
3857,
14541,
45,
20316,
11908,
77,
614,
7394,
1669,
505,
60,
800,
3726,
3726,
75,
51,
505,
9,
4190,
7394,
7759,
14,
4155,
6367,
4070,
31,
1477,
105,
20,
21,
1725,
13,
5,
1706,
8766,
192,
6,
953,
26,
653,
5511,
9,
48,
4886,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
AutoCompleteExtender in ASP.NET additional info
===
how do I pass additional information to the service method returning the collection of items? I'll attempt to explain what I mean, I have 2 text boxes on a form, I need to fill out names, based of a specific account id in a database. so, I need to pass an integer to the getNamesForDropDown method. I couldn't figure out what to do, so I did the wrong thing, and used the CompletionSetCount to actually pass the information I needed:
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public string[] getNamesForDropDown(string prefixText, int count)
{
String sql = "Select fldName From idAccountReps Where idAccount = " + count.ToString();
//... rest of the method removed, this should be enough code to understand
//... the evil wrongness I did.
}
in my front side aspx file, i set the CompletionSetCount based off the Account id the user is currently viewing on that page.
<ajaxtk:AutoCompleteExtender
runat="server"
ID="AC1"
TargetControlID="txtAccName"
ServiceMethod="getNamesForDropDown"
ServicePath="AccountInfo.asmx"
MinimumPrefixLength="1"
EnableCaching="true"
CompletionSetCount='<%# Eval("idAccount") %>'
/>
So, that's definitely a wrong way... what would be the right way?
| 0 | [
2,
3108,
15990,
1706,
38,
13630,
19,
28,
306,
9,
2328,
1351,
15404,
800,
3726,
3726,
184,
107,
31,
1477,
1351,
676,
20,
14,
365,
2109,
2485,
14,
1206,
16,
3755,
60,
31,
22,
211,
1735,
20,
3271,
98,
31,
884,
15,
31,
57,
172,
18... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
non-RegEx pattern matching
===
Is there a built-in mechanism in .NET to match patterns other than Regular Expressions? I'd like to match using UNIX style wildcards (* = any number of any character). | 0 | [
2,
538,
8,
12463,
1706,
3732,
10120,
800,
3726,
3726,
25,
80,
21,
392,
8,
108,
6534,
19,
13,
9,
2328,
20,
730,
6282,
89,
119,
1290,
13832,
60,
31,
22,
43,
101,
20,
730,
568,
22540,
1034,
23003,
18,
13,
5,
2483,
800,
186,
234,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Phone Number Formatting, OnBlur
===
I have a .NET WinForms textbox for a phone number field. After allowing free-form text, I'd like to format the text as a "more readable" phone number after the user leaves the textbox. (Outlook has this feature for phone fields when you create/edit a contact)
- 1234567 becomes 123-4567
- 1234567890 becomes (123) 456-7890
- (123)456.7890 becomes (123) 456-7890
- 123.4567x123 becomes 123-4567 x123
- etc
| 0 | [
2,
1132,
234,
2595,
1203,
15,
27,
220,
14130,
800,
3726,
3726,
31,
57,
21,
13,
9,
2328,
628,
4190,
18,
1854,
5309,
26,
21,
1132,
234,
575,
9,
75,
2719,
551,
8,
4190,
1854,
15,
31,
22,
43,
101,
20,
2595,
14,
1854,
28,
21,
13,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why does IIS crash when I print to stderr in Perl?
===
This has been driving me crazy. We have IIS (6) and windows 2008 and ActiveState perl 5.10. For some reason whenever we do a warn or a carp it eventually corrupts the app pool. Of course that's a pretty big deal since it means that our errors actually cause problems.
This happened with the previous version of perl (5.8) and windows (2003) and IIS (5.) Anyway, basically I put in a carp or a warn and I get an error message and then some garbage text. Any thoughts? | 0 | [
2,
483,
630,
595,
18,
4597,
76,
31,
4793,
20,
354,
1157,
139,
19,
416,
255,
60,
800,
3726,
3726,
48,
63,
74,
2891,
55,
3328,
9,
95,
57,
595,
18,
13,
5,
379,
6,
17,
1936,
570,
17,
1348,
3859,
416,
255,
331,
9,
1036,
9,
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... |
Is there a way in VBA to know about variables that aren't being used?
===
Is there a tool, method or setting in VBA to warn about variables that have been DIMmed, but aren't being used? | 0 | [
2,
25,
80,
21,
161,
19,
566,
969,
20,
143,
88,
12157,
30,
4847,
22,
38,
142,
147,
60,
800,
3726,
3726,
25,
80,
21,
5607,
15,
2109,
54,
2697,
19,
566,
969,
20,
9296,
88,
12157,
30,
57,
74,
5937,
4688,
15,
47,
4847,
22,
38,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How to document a WCF web-service in a technical spec?
===
Other than pasting a WDSL in the tech spec, what are the recommended ways to document a WCF web-service before you begin coding? | 0 | [
2,
184,
20,
4492,
21,
11801,
410,
2741,
8,
11449,
19,
21,
2447,
12737,
60,
800,
3726,
3726,
89,
119,
640,
68,
21,
13,
14733,
18,
255,
19,
14,
6145,
12737,
15,
98,
50,
14,
5773,
2847,
20,
4492,
21,
11801,
410,
2741,
8,
11449,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
What programming language paradigm fits which job?
===
As far as I know (not much I'll admit), the currently popular programming paradigms are Object Orientated (Java, C#), functional (F#), and dynamic (Ruby, Perl). As someone who is mostly familiar with the first paradigm, I have several questions:
- Can a programmer simply stick with one paradigm all of his/her life? Or in other words, can all problems be reduced to nails for one hammer?
- If not, which tool is suited for which type of task? For instance: web-based vs desktop, creating beautiful and responsive interfaces, able to crunch data quickly, etc.
- Have people ever needed to learn a new paradigm? For my past two jobs, my workplaces required Java and C#. Are there workplaces that specifically use non-OO languages?
Obviously, there are no "best" languages, but I'm wondering whether it's worth the investment of time and energy to learn a new paradigm. Thanks in advance!
| 0 | [
2,
98,
3143,
816,
20234,
2742,
18,
56,
1205,
60,
800,
3726,
3726,
28,
463,
28,
31,
143,
13,
5,
1270,
212,
31,
22,
211,
5251,
6,
15,
14,
871,
844,
3143,
20234,
18,
50,
3095,
13,
9712,
1669,
13,
5,
1004,
1385,
15,
272,
5910,
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... |
What's in your web-developer toolbox?
===
What's in your web-developer toolbox, please share. | 0 | [
2,
98,
22,
18,
19,
154,
2741,
8,
26051,
106,
5607,
5309,
60,
800,
3726,
3726,
98,
22,
18,
19,
154,
2741,
8,
26051,
106,
5607,
5309,
15,
2247,
1891,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
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... |
What is the correct LINQtoSQL-ish way to do a table truncate?
===
I have a project with a formidable data access layer using LinqtoSQL for just about anything touching our databases. I needed to build a helper class that bridges some common crud operations from CLSA objects to LinqToSql ones. Everything has been operating swimmingly until I needed to do a truncate on a table and all I had were “delete” methods.
Uh-oh. A quick search reveals that some people are using YourContext.ExecuteCommand(), which is nice and all, but I am trying to go “t-sql-less” as much as possible these days.
Is there a LINQ way to perform a [truncate on a table][1]? Or am I just [clueless][2]?
[1]: http://msdn.microsoft.com/en-us/library/aa260621(SQL.80).aspx
[2]: http://en.wikipedia.org/wiki/Clueless_(film) | 0 | [
2,
98,
25,
14,
4456,
6294,
1251,
262,
18,
22402,
8,
1595,
161,
20,
107,
21,
859,
22328,
62,
60,
800,
3726,
3726,
31,
57,
21,
669,
29,
21,
20839,
1054,
1381,
5385,
568,
6294,
1251,
262,
18,
22402,
26,
114,
88,
602,
6652,
318,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you iterate backwards through an STL list ?
===
I'm writing some cross-platform code between Windows and Mac.
If list::end() "returns an iterator that addresses the location succeeding the last element in a list" and can be checked when traversing a list forward, what is the best way to traverse backwards?
This code workson the Mac but not on Windows (can't decrement beyond first element):
list<DVFGfxObj*>::iterator iter = m_Objs.end();
for (iter--; iter!=m_Objs.end(); iter--)// By accident discovered that the iterator is circular ?
{
}
this works on Windows:
list<DVFGfxObj*>::iterator iter = m_Objs.end();
do{
iter--;
} while (*iter != *m_Objs.begin());
Is there another way to traverse backward that could be implemented in a for loop? | 0 | [
2,
184,
107,
42,
32,
106,
1373,
12207,
120,
40,
354,
255,
968,
13,
60,
800,
3726,
3726,
31,
22,
79,
1174,
109,
919,
8,
27035,
1797,
128,
1936,
17,
1572,
9,
100,
968,
45,
45,
2451,
5,
6,
13,
7,
24632,
18,
40,
32,
106,
3457,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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/Swing: How to draw a simple bar graph in a custom renderer for a JLabel.
===
I would like to dynamically create a minimal transparent bar graph to display over a canvas.
I was thinking of using a custom renderer for a JButton or a JLabel; but how do I draw my bar graph in this renderer? | 0 | [
2,
8247,
118,
18,
3546,
45,
184,
20,
2003,
21,
1935,
748,
7210,
19,
21,
5816,
16535,
106,
26,
21,
487,
21018,
9,
800,
3726,
3726,
31,
83,
101,
20,
7782,
1326,
1600,
21,
8663,
14862,
748,
7210,
20,
3042,
84,
21,
9696,
9,
31,
23... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Connecting to SQL Server with Visual Studio Express Editions
===
I find it odd that in Visual C# 2008 Express edition, when you use the database explorer, your options are:
1) Microsoft Access
2) SQL Server Compact 3.5, and
3) SQL Server Database File.
BUT if you use Visual Web Developer 2008 Express, you can connect to a regular SQL Server, Oracle, ODBC, etc.
For people developing command-line or other C# apps that need to talk to a SQL Server database, do you really need to build your LINQ/Data Access code with one IDE (Visual Web Developer) and your program in another (Visual C#)? It's not a hard workaround, but it seems weird. If Microsoft wanted to force you to upgrade to Visual Studio to connect to SQL Server, why would they include that feature in one of their free IDEs but not the other? I feel like I might be missing something (like how to do it all in Visual C#).
Thanks!
Tom | 4 | [
2,
6440,
20,
4444,
255,
8128,
29,
3458,
1120,
2999,
6179,
800,
3726,
3726,
31,
477,
32,
4210,
30,
19,
3458,
272,
5910,
570,
2999,
1322,
15,
76,
42,
275,
14,
6018,
8520,
15,
154,
6368,
50,
45,
137,
6,
7099,
1381,
172,
6,
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... |
How do I determine if a column is an identity column in MSSQL 2000?
===
I want to do this in code, not with ALT+F1. | 0 | [
2,
184,
107,
31,
3746,
100,
21,
4698,
25,
40,
3270,
4698,
19,
4235,
18,
22402,
824,
60,
800,
3726,
3726,
31,
259,
20,
107,
48,
19,
1797,
15,
52,
29,
7051,
2430,
410,
165,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
SQL Server 2000 constraint involving column on different table
===
I would like a constraint on a SQL Server 2000 table column that is sort of a combination of a foreign key and a check constraint. The value of my column must exist in the other table, but I am only concerned with values in the other table where one of its columns equal a specified value. The simplified tables are:
<pre>
import_table:
part_number varchar(30)
quantity int
inventory_master:
part_number varchar(30)
type char(1)
</pre>
So I want to ensure the `part_number` exists in `inventory_master`, but only if the type is 'C'. Is this possible? Thanks. | 0 | [
2,
4444,
255,
8128,
824,
28804,
4838,
4698,
27,
421,
859,
800,
3726,
3726,
31,
83,
101,
21,
28804,
27,
21,
4444,
255,
8128,
824,
859,
4698,
30,
25,
2058,
16,
21,
3733,
16,
21,
1228,
1246,
17,
21,
2631,
28804,
9,
14,
1923,
16,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
catching exceptions from another thread
===
I have a method running in a seperate thread. The thread is created and started from a form in a windows application. If an exception is thrown from inside the thread, what is the best way to pass it back to the main application. Right now, I'm passing a reference to the main form into the thread, then invoking the method from the thread, and causing the method to be called by the main application thread. Is there a best practice way to do this because I'm not comfortable with how I'm doing it now.
Example of my form:
public class frmMyForm : System.Windows.Forms.Form
{
/// <summary>
/// Create a thread
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnTest_Click(object sender, EventArgs e)
{
try
{
//Create and start the thread
ThreadExample pThreadExample = new ThreadExample(this);
pThreadExample.Start();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, Application.ProductName);
}
}
/// <summary>
/// Called from inside the thread
/// </summary>
/// <param name="ex"></param>
public void HandleError(Exception ex)
{
//Invoke a method in the GUI's main thread
this.Invoke(new ThreadExample.delThreadSafeTriggerScript(HandleError), new Object[] { ex });
}
private void __HandleError(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
Example of my thread class:
public class ThreadExample
{
public delegate void delThreadSafeHandleException(System.Exception ex);
private Thread thExample_m;
frmMyForm pForm_m;
private frmMyForm Form
{
get
{
return pForm_m;
}
}
public ThreadExample(frmMyForm pForm)
{
pForm_m = pForm;
thExample_m = new Thread(new ThreadStart(Main));
thExample_m.Name = "Example Thread";
}
public void Start()
{
thExample_m.Start();
}
private void Main()
{
try
{
throw new Exception("Test");
}
catch (Exception ex)
{
Form.HandleException(ex);
}
}
} | 0 | [
2,
9436,
13392,
37,
226,
9322,
800,
3726,
3726,
31,
57,
21,
2109,
946,
19,
21,
10332,
106,
1373,
9322,
9,
14,
9322,
25,
679,
17,
373,
37,
21,
505,
19,
21,
1936,
3010,
9,
100,
40,
5391,
25,
6027,
37,
572,
14,
9322,
15,
98,
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... |
Keep documentation with the code, or in a central Wiki?
===
My company does custom software for several companies. We have dozens of small software projects (and some larger ones), each with its own history, quirks and processes. We document this in an instance of <a href="http://www.mediawiki.org/wiki/MediaWiki">MediaWiki</a>), and that has worked wonderfully. Code documentation, on the other hand, is usually put with the code in source control. That is, through comments, diagram files, etc., and also a readme file that usually just describes how to set up the dev environment.
My problem is this: The wiki is much better than plain text files or word processor docs for higher level code and development documentation, but it bugs me that it's not in the source control system with the code. I couldn't easily bring the wiki with me on a plane, for instance.
So where and in what format should I keep code documentation? | 0 | [
2,
643,
13945,
29,
14,
1797,
15,
54,
19,
21,
521,
13,
17375,
60,
800,
3726,
3726,
51,
237,
630,
5816,
2306,
26,
238,
1532,
9,
95,
57,
10273,
16,
284,
2306,
2314,
13,
5,
290,
109,
1662,
53,
18,
6,
15,
206,
29,
82,
258,
447,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
NHibernate DetachedCriteria.SetFirstResult?
===
I found an example of implementing the repository pattern in NHibernate on the web, and one of the methods uses this code to get the first result of a query:
public IEnumerable<T> FindAll(DetachedCriteria criteria, int firstResult, int numberOfResults, params Order[] orders)
{
criteria.SetFirstResult(firstResult).SetMaxResults(numberOfResults);
return FindAll(criteria, orders);
}
But VS intellisense isn't picking up this method from DetachedCriteria. Does anyone know if this is possible with DetachedCriteria? I'm using NHibernate version 1.2.1. | 0 | [
2,
12109,
15191,
8820,
14631,
16063,
9605,
9,
3554,
3552,
29955,
60,
800,
3726,
3726,
31,
216,
40,
823,
16,
17333,
14,
24869,
3732,
19,
12109,
15191,
8820,
27,
14,
2741,
15,
17,
53,
16,
14,
3195,
2027,
48,
1797,
20,
164,
14,
64,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Set same icon for all my Forms
===
Is there anyway to set the same icon to all my forms without having to change one by one?
Something like when you setup GlobalAssemblyInfo for all your projects inside your solution.
Thanks for your time. | 0 | [
2,
309,
205,
9801,
26,
65,
51,
1997,
800,
3726,
3726,
25,
80,
2774,
20,
309,
14,
205,
9801,
20,
65,
51,
1997,
366,
452,
20,
753,
53,
34,
53,
60,
301,
101,
76,
42,
18161,
2062,
29432,
108,
4120,
26,
65,
154,
2314,
572,
154,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
having trouble with insertChildBefore and insertChildAfter in AS3
===
i have an xml document:
var xml:XML = new XML(<rootNode>
<head>
<meta name="template" content="Default" />
</head>
<mainSection>
<itemList>
<item>
<video src={this.videoURL} />
<img src={this.src}></img>
</item>
</itemList>
</mainSection>
</rootNode>);
What i'd like to do, is when certain conditions are me, insert another <item> at the beginning of itemList.
var newNode:XMLList = new XMLList("<item><video src=\"" + _videoSource + "\"></video></item>");
I'm able to generate and trace newNode just fine, but whenever I try to add it using insertChildBefore, it always returns undefined.
var contentNode:XML = new XML(xml.mainSection.itemList.item);
xml.insertChildBefore(contentNode ,newNode)
contentNode always traces fine, but it always fails when trying insertChildBefore or insertChildAfter. the weird thing is, if I make contentNode less specific (like xml.mainSection) then it works as expected.
Thanks for any help, this is driving me insane! | 0 | [
2,
452,
2572,
29,
14692,
11287,
12750,
17,
14692,
11287,
5162,
19,
28,
240,
800,
3726,
3726,
31,
57,
40,
23504,
4492,
45,
4033,
23504,
45,
396,
8184,
800,
78,
23504,
5,
1,
14032,
251,
546,
1,
13,
1,
1743,
1,
13,
1,
5909,
58,
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... |
Change background color of Solution Explorer in Visual Studio
===
Is there any way to change the background color of the Solution Explorer in Visual Studio using a Theme? - or any other way for that matter?
I can change it by changing windows-wide color settings, but obviously that affects too much. | 0 | [
2,
753,
2395,
1665,
16,
4295,
8520,
19,
3458,
1120,
800,
3726,
3726,
25,
80,
186,
161,
20,
753,
14,
2395,
1665,
16,
14,
4295,
8520,
19,
3458,
1120,
568,
21,
3184,
60,
13,
8,
54,
186,
89,
161,
26,
30,
1161,
60,
31,
92,
753,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... |
Is Iterator initialization inside for loop considered bad style, and why?
===
Typically you will find STL code like this:
for (SomeClass::SomeContainer::iterator Iter = m_SomeMemberContainerVar.begin(); Iter != m_SomeMemberContainerVar.end(); ++Iter)
{
}
But we actually have the recommendation to write it like this:
SomeClass::SomeContainer::iterator Iter = m_SomeMemberContainerVar.begin();
SomeClass::SomeContainer::iterator IterEnd = m_SomeMemberContainerVar.end();
for (; Iter != IterEnd; ++Iter)
{
}
If you're worried about scoping, add enclosing braces:
{
SomeClass::SomeContainer::iterator Iter = m_SomeMemberContainerVar.begin();
SomeClass::SomeContainer::iterator IterEnd = m_SomeMemberContainerVar.end();
for (; Iter != IterEnd; ++Iter)
{
}
}
This is supposed to give a speed and efficiency gain, especially if you are programming consoles, because the .end() function is not called on each iteration of the loop. I just take the performance improvement for granted, it sounds reasonable but i don't know how much and it certainly depends on the type of container and actual STL implementation in use. But having used this style for a couple months now i actually prefer it over the first anyway.
The reason being readability: the for line is neat and tidy. With qualifiers and member variables in real production code it is quite easy to have **really** long for lines if you use the style in the first example. That's why i intentionally made it to have a horizontal scrollbar in this example, just so you see what i'm talking about. ;)
On the other hand, you suddenly introduce the Iter variables to the outer scope of the for loop. But then, at least in the environment i work in, the Iter would have been accessible in the outer scope even in the first example.
What is your take on this? Are there any pro's to the first style other than possibly limiting the scope of Iter?
| 0 | [
2,
25,
32,
106,
3457,
2104,
1829,
572,
26,
5293,
724,
896,
1034,
15,
17,
483,
60,
800,
3726,
3726,
2442,
42,
129,
477,
354,
255,
1797,
101,
48,
45,
26,
13,
5,
3220,
1898,
45,
45,
3220,
1126,
5851,
106,
45,
45,
242,
106,
3457,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Does a MasterPage know what page is being displayed?
===
When I navigate on a website utilizing MasterPages, does the application know what page I am on? If so, does it store it in an object I can access? | 0 | [
2,
630,
21,
1129,
6486,
143,
98,
2478,
25,
142,
6115,
60,
800,
3726,
3726,
76,
31,
20782,
27,
21,
2271,
19894,
1129,
6486,
18,
15,
630,
14,
3010,
143,
98,
2478,
31,
589,
27,
60,
100,
86,
15,
630,
32,
1718,
32,
19,
40,
3095,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Metrics & Object-oriented programming
===
I would like to know if somebody often uses metrics to validate its code/design.
As example, I think I will use:
- number of lines per method (< 20)
- number of variables per method (< 7)
- number of paremeters per method (< 8)
- number of methods per class (< 20)
- number of field per class (< 20)
- inheritance tree depth (< 6).
- Lack of Cohesion in Methods
Most of these metrics are very simple.
What is your policy about this kind of mesure ? Do you use a tool to check them (e.g. NDepend) ? | 0 | [
2,
11544,
18,
279,
3095,
8,
6800,
3143,
800,
3726,
3726,
31,
83,
101,
20,
143,
100,
8861,
478,
2027,
11544,
18,
20,
7394,
1373,
82,
1797,
118,
19862,
9,
28,
823,
15,
31,
277,
31,
129,
275,
45,
13,
8,
234,
16,
1560,
416,
2109,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
as a web designer/web developer, conferences...which ones do you suggest?
===
I am interested in hearing which conferences you have attended that you feel covers the right material for a person who designs and develops websites?
just in case you need to know what i design/develop in: html/css, php, mysql.
I work in higher ed and administration is more in tune w/ sending their employees to higher ed conferences, so I want to get a good mix of conferences that I could research and present to my higher ups to possibly attend. - Thanks. | 0 | [
2,
28,
21,
2741,
4742,
118,
14113,
10058,
15,
10462,
9,
9,
9,
2140,
53,
18,
107,
42,
5601,
60,
800,
3726,
3726,
31,
589,
3158,
19,
3229,
56,
10462,
42,
57,
1394,
30,
42,
583,
2937,
14,
193,
1492,
26,
21,
840,
72,
4748,
17,
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... |
jQuery animation
===
I'm having some minor problems with some animations I'm trying to set up. I have a couple divs stacked on top of each other kind of like this.
<div id="div1">
Stuff...
</div>
<div id="div2">
More Stuff...
</div>
Each of these divs has a drop shadow applied to it via jQuery plugin (jquery.dropshadow.js).
The problem occurs when I expand one of the divs using some kind of animation. The shadow does not update with the size of the div. I can redraw the shadow in the callback of the animation but still looks pretty joggy.
Is there a way that I can update the status of my shadows periodically throughout the course of the animation or can anyone recommend a better drop shadow library that would fix the problem? It doesn't have to be jQuery plugin. | 0 | [
2,
487,
8190,
93,
6236,
800,
3726,
3726,
31,
22,
79,
452,
109,
1689,
1716,
29,
109,
6236,
18,
31,
22,
79,
749,
20,
309,
71,
9,
31,
57,
21,
1335,
13,
12916,
18,
20054,
27,
371,
16,
206,
89,
825,
16,
101,
48,
9,
13,
1,
12916... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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, in python, iterate over multiple 2d lists at once, cleanly?
===
If I'm making a simple grid based game, for example, I might have a few 2d lists. One might be for terrain, another might be for objects, etc. Unfortunately, when I need to iterate over the lists and have the contents of a square in one list affect part of another list, I have to do something like this.
for i in range(len(alist)):
for j in range(len(alist[i])):
if alist[i][j].isWhatever:
blist[i][j].doSomething()
Is there a nicer way to do something like this?
| 0 | [
2,
184,
92,
31,
15,
19,
20059,
15,
32,
106,
1373,
84,
1886,
172,
43,
7227,
35,
382,
15,
2745,
102,
60,
800,
3726,
3726,
100,
31,
22,
79,
544,
21,
1935,
7354,
432,
250,
15,
26,
823,
15,
31,
530,
57,
21,
310,
172,
43,
7227,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 scan a folder in Java?
===
How can I get a tree of all the files from a current folder in Java? | 0 | [
2,
184,
20,
8313,
21,
19294,
19,
8247,
60,
800,
3726,
3726,
184,
92,
31,
164,
21,
1541,
16,
65,
14,
6488,
37,
21,
866,
19294,
19,
8247,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How do I get current page full URL in PHP
===
I moved a WordPress installation to a new folder on a Windows/IIS server. I'm setting up 301 redirects in PHP, but it doesn't seem to be working. My post URL's have the following format:
http:://www.example.com/OLD_FOLDER/index.php/post-title/
I can't figure out how to grab the `/post-title/` part of the URL.
`$_SERVER["REQUEST_URI"]` - which everyone seems to recommend - is returning an empty string. `$_SERVER["PHP_SELF"]` is just returning index.php. | 0 | [
2,
184,
107,
31,
164,
866,
2478,
503,
287,
6362,
19,
13,
26120,
800,
3726,
3726,
31,
385,
21,
833,
5890,
7758,
20,
21,
78,
19294,
27,
21,
1936,
118,
2865,
18,
8128,
9,
31,
22,
79,
2697,
71,
13,
18979,
302,
14706,
18,
19,
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... |
What are your most-recommended Visual Studio perferences?
===
There are so many little options and settings within Microsoft Visual Studio. Which do you recommend to others? | 0 | [
2,
98,
50,
154,
127,
8,
99,
960,
79,
10726,
3458,
1120,
416,
2407,
2940,
18,
60,
800,
3726,
3726,
80,
50,
86,
151,
265,
6368,
17,
12410,
363,
7099,
3458,
1120,
9,
56,
107,
42,
12360,
20,
654,
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... |
MVP dependency injection
===
using MVP, what is the normal order of construction and dependency injection.
normally you create a presenter for each view and pass the view into the presenter on constructor. But what if you have:
1. A Service that multiple views need to listen to events on.
2. Multiple views all pointing to the same data model cache.
can someone display a normal flow of info from a user click to data coming back in a service from a server.
| 0 | [
2,
13552,
26835,
13646,
800,
3726,
3726,
568,
13552,
15,
98,
25,
14,
1826,
389,
16,
900,
17,
26835,
13646,
9,
4147,
42,
1600,
21,
9391,
26,
206,
1418,
17,
1477,
14,
1418,
77,
14,
9391,
27,
6960,
248,
9,
47,
98,
100,
42,
57,
45... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Good language & framework for cross platform desktop application.
===
The last cross platform desktop development I did was Java/Swing. What about flex? | 0 | [
2,
254,
816,
279,
6596,
26,
919,
2452,
17404,
3010,
9,
800,
3726,
3726,
14,
236,
919,
2452,
17404,
522,
31,
144,
23,
8247,
118,
18,
3546,
9,
98,
88,
14409,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
VSS front end for SVN
===
This is a little unholy (from whichever end of the spectrum you look at it).
Has anyone built (commercial or open sourced) a front end for SVN that will allow you to access it through a VSS plugin (like the [Access 2003 Source Code Control Add-in][1]").
I already know about Vss2Svn, that's not really what I'm looking for.
[1]: http://blogs.msdn.com/access/archive/2008/05/14/access-source-code-control-and-team-foundation-server.aspx | 0 | [
2,
4611,
18,
431,
241,
26,
13,
18,
16578,
800,
3726,
3726,
48,
25,
21,
265,
367,
15496,
13,
5,
2665,
56,
5221,
241,
16,
14,
8815,
42,
361,
35,
32,
6,
9,
63,
1276,
392,
13,
5,
22547,
54,
368,
1267,
43,
6,
21,
431,
241,
26,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I report an error midway through a chunked http repsonse if I'm willing to close the connection?
===
(See related question: http://stackoverflow.com/questions/162917/how-do-i-report-an-error-midway-through-a-chunked-http-repsonse-without-closing)
In my case, the #1 desire is for the browser to display an error message. No matter how uninformative.
Closing the ServletResponse outputStream obviously doesn't work. Neither does throwing an exception, even if I don't close first (tested on Tomcat 6.0.16). I think that what I want is either a RST packet, FIN in the middle of a chunk, or badly formed chunk headers.
After that I can worry about how various browsers respond.
| 0 | [
2,
184,
107,
31,
1330,
40,
7019,
13486,
120,
21,
15009,
69,
7775,
9411,
528,
870,
100,
31,
22,
79,
4452,
20,
543,
14,
2760,
60,
800,
3726,
3726,
13,
5,
1798,
1597,
1301,
45,
7775,
6903,
25325,
2549,
9990,
9,
960,
118,
24652,
18,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Visual Studio MSTest run failing to even start
===
I've got a bunch of unit tests built using Visual Studio 2005's built-in unit testing functionality. For the last little while, it's been taking absolutely <i>forever</i> to start the tests... Everything just sits there at "Pending" for two minutes or more. Now Visual Studio's decided to take things to a new level and never even start the tests. After two to three minutes, it aborts the run and barfs an error message into the log:
Failed to Queue Test Run '(blahblahblah)' with id {bfba05b1-afe5-499e-b452-29167f414f0f}: Microsoft.VisualStudio.TestTools.TestManagement.ExecutionException: Failed to establish communication environment for local run.
Anyone have any ideas? In the medium term, we are planning to switch to NUnit, but for now I'd prefer to stick to Visual Studio because the rest of the team already has that installed and that makes it easier to convince them to actually run the tests... ;-) | 0 | [
2,
3458,
1120,
4235,
10543,
485,
7250,
20,
166,
799,
800,
3726,
3726,
31,
22,
195,
330,
21,
7653,
16,
1237,
4894,
392,
568,
3458,
1120,
812,
22,
18,
392,
8,
108,
1237,
4431,
18548,
9,
26,
14,
236,
265,
133,
15,
32,
22,
18,
74,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Facial recognition - software, algorithms, etc?
===
I'm interested in writing software that depends on being able to identify that there is a face in a picture (or video frame). It doesn't have to ID the face - so no metrics other than:
- Is there a human face in the picture (or more than one)
- Where, approximately, are the eyes and mouth or nose tip (whatever it keyed on.)
It's popping up in cheap digital cameras now, so I expect there are open source packages that do this, or research that is easy enough to follow when rolling your own.
-Adam | 0 | [
2,
14951,
3514,
13,
8,
2306,
15,
15935,
15,
2722,
60,
800,
3726,
3726,
31,
22,
79,
3158,
19,
1174,
2306,
30,
9597,
27,
142,
777,
20,
5808,
30,
80,
25,
21,
276,
19,
21,
2151,
13,
5,
248,
763,
3523,
6,
9,
32,
1437,
22,
38,
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... |
Coupling is too high - how to design this class better?
===
Running FxCop on my code, I get this warning:
> Microsoft.Maintainability :
> 'FooBar.ctor is coupled with 99
> different types from 9 different
> namespaces. Rewrite or refactor the
> method to decrease its class coupling,
> or consider moving the method to one
> of the other types it is tightly
> coupled with. A class coupling above
> 40 indicates poor maintainability, a
> class coupling between 40 and 30
> indicates moderate maintainability,
> and a class coupling below 30
> indicates good maintainability.
My class is a landing zone for all messages from the server. The server can send us messages of different EventArgs types:
public FooBar()
{
var messageHandlers = new Dictionary<Type, Action<EventArgs>>();
messageHandlers.Add(typeof(YouHaveBeenLoggedOutEventArgs), HandleSignOut);
messageHandlers.Add(typeof(TestConnectionEventArgs), HandleConnectionTest);
// ... etc for 90 other types
}
The "HandleSignOut" and "HandleConnectionTest" methods have little code in them; they usually pass the work off to a function in another class.
How can I make this class better with lower coupling? | 0 | [
2,
20920,
25,
266,
183,
13,
8,
184,
20,
704,
48,
718,
574,
60,
800,
3726,
3726,
946,
13,
16488,
9734,
27,
51,
1797,
15,
31,
164,
48,
3590,
45,
13,
1,
7099,
9,
6232,
5851,
4091,
13,
45,
13,
1,
13,
22,
4120,
111,
1850,
9,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.