unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
What is the maximum length of a C#/CLR identifier?
===
Which other restrictions are there on names (beside the obvious uniqueness within a scope)?
Where are those defined? | 0 | [
2,
98,
25,
14,
2979,
1476,
16,
21,
272,
5910,
118,
5316,
139,
25570,
60,
800,
3726,
3726,
56,
89,
9245,
50,
80,
27,
1817,
13,
5,
863,
1416,
14,
4674,
2619,
720,
363,
21,
9914,
6,
60,
113,
50,
273,
2811,
60,
3,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Mapstraction as a library to access to Google maps
===
Do you suggest [Mapstraction][1] (library) as a layer to access Google maps?
Is it an actively maintained project? Do I stand to again/ lose anything by using this library apart from the primary reason that its provider independent?
[1]: http://www.mapstraction.com/ | 0 | [
2,
6867,
19915,
872,
28,
21,
1248,
20,
1381,
20,
8144,
6867,
800,
3726,
3726,
107,
42,
5601,
636,
15022,
9729,
8645,
500,
2558,
165,
500,
13,
5,
1210,
2559,
622,
6,
28,
21,
5385,
20,
1381,
8144,
6867,
60,
25,
32,
40,
8754,
3926,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 my datagridview repositions on escape.
===
I have a DataGridView control on a form in a manged c# project. (.net 2.0)
When I use the scroll button on my mouse and then click a cell and click the escape button or select another cell the grid will reposition it self. But if i use the scrollbar on the control, this behavior does not happen.
Have anyone seen behavior like this before or have any idea to what might cause it? | 0 | [
2,
483,
630,
51,
1054,
16375,
4725,
302,
9339,
18,
27,
2220,
9,
800,
3726,
3726,
31,
57,
21,
1054,
16375,
4725,
569,
27,
21,
505,
19,
21,
169,
6430,
272,
5910,
669,
9,
13,
5,
9,
2328,
172,
9,
387,
6,
76,
31,
275,
14,
12159,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
@@IDENTITY after INSERT statement always returns 0
===
I need a function which executes an INSERT statement on a database and returns the Auto_Increment primary key. I have the following C# code but, while the INSERT statement works fine (I can see the record in the database, the PK is generated correctly and rows == 1), the id value is always 0. Any ideas on what might be going wrong?
public int ExecuteInsertStatement(string statement)
{
InitializeAndOpenConnection();
int id = -1;
IDbCommand cmdInsert = connection.CreateCommand();
cmdInsert.CommandText = statement;
int rows = cmdInsert.ExecuteNonQuery();
if (rows == 1)
{
IDbCommand cmdId = connection.CreateCommand();
cmdId.CommandText = "SELECT @@Identity;";
id = (int)cmdId.ExecuteScalar();
}
return id;
}
| 0 | [
2,
13,
1,
13384,
856,
75,
14692,
3331,
550,
4815,
713,
800,
3726,
3726,
31,
376,
21,
1990,
56,
15644,
18,
40,
14692,
3331,
27,
21,
6018,
17,
4815,
14,
3108,
1,
28461,
1256,
1246,
9,
31,
57,
14,
249,
272,
5910,
1797,
47,
15,
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... |
iis6+httpmodule+This operation requires IIS integrated pipeline mode
===
i am using iis6 ,after write a httpmodule and i got this error?after google the web i find that this problem is cause by the netframework 3.5,then i put this on a machine didn't install net3.5,but the problem still there!! | 0 | [
2,
595,
18,
379,
2430,
21127,
19673,
62,
2430,
1565,
1453,
4781,
595,
18,
5547,
12250,
3740,
800,
3726,
3726,
31,
589,
568,
595,
18,
379,
13,
15,
5162,
2757,
21,
7775,
19673,
62,
17,
31,
330,
48,
7019,
60,
5162,
8144,
14,
2741,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Anyone using Microsoft ASML language?
===
To me the concept of "Gurevich Abstract State Machine" (formerly known as "evolving algebras") seems very promising to provide a solid fundation to systems behaviours. It could be what relational algebra is for databases: the underlying theoretic fundation.
The most complete implementation, to my knowledge, is the Microsoft **[ASML][1]** language that produces .NET assemblies.
Is anyone really using it in a working context? And, in case, with what degree of success?
I would really like to start investigating more, if others have success stories to share.
[1]: http://research.microsoft.com/fse/asml/ | 0 | [
2,
1276,
568,
7099,
28,
8184,
816,
60,
800,
3726,
3726,
20,
55,
14,
2420,
16,
13,
7,
11147,
11387,
8502,
146,
1940,
7,
13,
5,
6092,
167,
28,
13,
7,
62,
5847,
8397,
10999,
18,
7,
6,
2206,
253,
10466,
20,
1181,
21,
2941,
2780,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Automate file copying from Windows command line
===
Say you have 100 directories and for each directory you have a file named <DIR_NAME>.pdf stored somewhere else. If you want to move/copy each file into the directory with the same name, can this be done on the Windows command line? | 0 | [
2,
3108,
5281,
3893,
4344,
68,
37,
1936,
1202,
293,
800,
3726,
3726,
395,
42,
57,
808,
559,
1596,
17,
26,
206,
16755,
42,
57,
21,
3893,
377,
13,
1,
9035,
1,
7259,
1,
9,
11124,
8214,
3493,
962,
9,
100,
42,
259,
20,
780,
118,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Does a user need admin rights to install Flash player?
===
Will users who do not have admin rights on their computers be able to upgrade to new Flash player version by themselves?
This would be interesting to know for:
Windows 98
Windows XP/2000/Vista
Macs
Unix/Linux | 0 | [
2,
630,
21,
4155,
376,
21,
43,
2160,
1096,
20,
16146,
4433,
517,
60,
800,
3726,
3726,
129,
3878,
72,
107,
52,
57,
21,
43,
2160,
1096,
27,
66,
7774,
44,
777,
20,
9483,
20,
78,
4433,
517,
615,
34,
1366,
60,
48,
83,
44,
4883,
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... |
Retriving date in sql server, CURRENT_TIMESTAMP vs GetDate()
===
Using SQL server - which is the fastest or best practice method to use for date retrival? Is there a difference? | 0 | [
2,
302,
3367,
8397,
1231,
19,
4444,
255,
8128,
15,
866,
1,
891,
384,
10158,
4611,
164,
8209,
5,
6,
800,
3726,
3726,
568,
4444,
255,
8128,
13,
8,
56,
25,
14,
7518,
54,
246,
1345,
2109,
20,
275,
26,
1231,
13,
6239,
25109,
60,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
When do you design the GUI first and the backend code later, or vice versa?
===
When I'm working on a project, sometimes I'll design the GUI first and then write the backend code to make it work, but other times I'll do the opposite and make the GUI once I have the system working. How do you choose which way round to code and are there any particular types of project or circumstances that would lean you either way? | 0 | [
2,
76,
107,
42,
704,
14,
9457,
64,
17,
14,
97,
2451,
1797,
138,
15,
54,
1821,
18596,
60,
800,
3726,
3726,
76,
31,
22,
79,
638,
27,
21,
669,
15,
1030,
31,
22,
211,
704,
14,
9457,
64,
17,
94,
2757,
14,
97,
2451,
1797,
20,
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... |
Which is fastest? SELECT SQL_CALC_FOUND_ROWS FROM `table`, or SELECT COUNT(*)
===
When you limit the number of rows to be returned by a SQL query, usually used in paging, there are two methods to determine the total number of records:
###Method 1
Include the `SQL_CALC_FOUND_ROWS` option in the original `SELECT`, and then get the total number of rows by running `SELECT FOUND_ROWS()`:
SELECT SQL\_CALC\_FOUND\_ROWS * FROM table WHERE id > 100 LIMIT 10;
SELECT FOUND_ROWS();
###Method 2
Run the query normally, and then get the total number of rows by running `SELECT COUNT(*)`
SELECT * FROM table WHERE id > 100 LIMIT 10;
SELECT COUNT(*) WHERE id > 100;
**Which method is the best / fastest?** | 0 | [
2,
56,
25,
7518,
60,
5407,
4444,
255,
1,
16304,
1,
12235,
1,
5417,
18,
37,
13,
1,
5924,
1,
15,
54,
5407,
2468,
5,
2483,
6,
800,
3726,
3726,
76,
42,
4496,
14,
234,
16,
11295,
20,
44,
587,
34,
21,
4444,
255,
25597,
15,
951,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Get Visual Studio to throw exceptions across threads
===
In my Silverlight project I have a thread that fires every x milliseconds. In this thread I was attempting to change the state of the application. This wasn't working and I didn't know why, so put a breakpoint in to the Timer callback. The breakpoint was hit, but the minute I attempted to change the state it just bailed out of the function (assuming an exception has been thrown).
I know *why* the error occurred - you can't change GUI stuff via a non-GUI thread.
My question is - how can I get Visual Studio to actually break when an exception like that occurs? (Rather than just silently bailing out, which doesn't notify me if there is a problem).
I've tried the "Break when exceptions cross AppDomain or managed / native boundaries", but that didn't have any effect. | 0 | [
2,
164,
3458,
1120,
20,
3814,
13392,
464,
20396,
800,
3726,
3726,
19,
51,
1172,
3130,
669,
31,
57,
21,
9322,
30,
11327,
352,
993,
13436,
5007,
18,
9,
19,
48,
9322,
31,
23,
6314,
20,
753,
14,
146,
16,
14,
3010,
9,
48,
526,
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... |
Microsoft online e-learning courses any good?
===
There's heaps on the Microsoft website, small 2-hour courses or bundled in packs like this <a href="https://www.microsoftelearning.com/eLearning/offerDetail.aspx?offerPriceId=217346">Collection 6460: Visual Studio 2008: Windows Presentation Foundation</a>
Are they good in terms of knowledge received? Value for money? Do employers approve if they are on the resume? | 0 | [
2,
7099,
2087,
13,
62,
8,
26001,
4392,
186,
254,
60,
800,
3726,
3726,
80,
22,
18,
15414,
18,
27,
14,
7099,
2271,
15,
284,
172,
8,
4754,
4392,
54,
10194,
43,
19,
18936,
101,
48,
13,
1,
58,
746,
14057,
3726,
7,
21127,
18,
6903,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Zend Framework fetchAll
===
Can i override fetchall method in a model? I need to check sth everytime fetchAll is called. The model extends Zend_db_table_abstract | 0 | [
2,
10526,
43,
6596,
18312,
1233,
800,
3726,
3726,
92,
31,
84,
11891,
18312,
1233,
2109,
19,
21,
1061,
60,
31,
376,
20,
2631,
13,
18,
96,
352,
891,
18312,
1233,
25,
227,
9,
14,
1061,
9073,
10526,
43,
1,
9007,
1,
5924,
1,
2297,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How to set up Eclipse TPTP
===
I need to profile a java application for a customer. It's an eclipse/maven project, so I decided on using eclipse TPTP ( http://www.eclipse.org/tptp ).
I tried to install eclipse TPTP through the update manager from a standard eclipse installation, but I gave up because of the unbelievable complex setup and downloading of dependencies with very cryptic names.
Then I downloaded the "all in one TPTP 4.5.1" package from http://www.eclipse.org/tptp/home/downloads/?ver=4.5.1 but when I start it up, it pops up an error saying "The eclipse executable launcher was unable to locate it's companion shared library".
I'm running Windows XP, Sun Java 1.5, and clicked on "eclipse.exe" in the unpacked eclipse TPTP installation.
What do I need to do to get eclipse TPTP running? | 0 | [
2,
184,
20,
309,
71,
11652,
13,
13726,
13726,
800,
3726,
3726,
31,
376,
20,
5296,
21,
8247,
3010,
26,
21,
7705,
9,
32,
22,
18,
40,
11652,
118,
540,
3124,
669,
15,
86,
31,
868,
27,
568,
11652,
13,
13726,
13726,
13,
5,
7775,
690... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 unit test a pseudo random number generator?
===
I have a pseudo random number generator (PRNG) class that I want to unit test. There are two approaches:
1. write a test case that takes a large amount of samples and test whether they are properly distributed. This approach may lead to a fairly long execution time for the test case;
2. calculate a small series of samples 'by hand' and verify if the PRNG algorithm reproduces it. This approach may lead to a not random sequence being generated without being noticed;
I would say that the first approach is not really unit testing because it does not perform a white box test of the generator, but on the other hand it properly tests the responsibility of the class. The second approach is more like a real unit test, focusing on the algorithm, but it does not provide as much evidence as to whether the class fulfills its responsibility.
Which approach do you prefer, and why?
----------
| 0 | [
2,
184,
20,
1237,
1289,
21,
8452,
5477,
234,
15286,
60,
800,
3726,
3726,
31,
57,
21,
8452,
5477,
234,
15286,
13,
5,
4899,
2723,
6,
718,
30,
31,
259,
20,
1237,
1289,
9,
80,
50,
81,
7501,
45,
137,
9,
2757,
21,
1289,
610,
30,
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 add jars dinamically with jython embedded in Tomcat app?
===
I want to let the users of my app, which is in turn an app container (app contains subapps), add java jars to their jython path.
I let the subapp managers write thir own extensions in jython, but some of the functionality they want to add needs additional jars. For example, if they want to check a svn repo, they need the svn access jars, which I would rather not copy to /WEB-INF/lib, but rather to /subapps/appX/lib.
While I can add a class directory structure to sys.path, it seems that I can't add a jar. Is it possible? | 0 | [
2,
184,
20,
3547,
5112,
18,
926,
6865,
8438,
29,
487,
93,
11570,
12138,
19,
2067,
5782,
4865,
60,
800,
3726,
3726,
31,
259,
20,
408,
14,
3878,
16,
51,
4865,
15,
56,
25,
19,
805,
40,
4865,
12147,
13,
5,
7753,
1588,
972,
7753,
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... |
VB6 Date Datatype: Precision and formatting
===
Does anyone know 1) how precise the vb6 Date date type is (by way of fractions of a second) and how to format it to show fractions of a second.
I'm revisiting vb6 after many years absence, and for the life of me can't remember.
The things I used to know . . .
Thanks
Mark
P.S. I considered putting a "memory-leak" tag on this, because my memory leaked (hur hur hur) | 0 | [
2,
13,
20468,
379,
1231,
1054,
4474,
45,
13133,
17,
2595,
1203,
800,
3726,
3726,
630,
1276,
143,
137,
6,
184,
11114,
14,
13,
20468,
379,
1231,
1231,
1001,
25,
13,
5,
779,
161,
16,
10885,
18,
16,
21,
153,
6,
17,
184,
20,
2595,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
REST / SOAP endpoints for a WCF service
===
I have a WCF service and I want to expose it as both a RESTfull service and as a SOAP service.
Anyone has done something like this before? | 0 | [
2,
760,
13,
118,
6447,
241,
3132,
18,
26,
21,
11801,
410,
365,
800,
3726,
3726,
31,
57,
21,
11801,
410,
365,
17,
31,
259,
20,
13833,
32,
28,
156,
21,
760,
13727,
365,
17,
28,
21,
6447,
365,
9,
1276,
63,
677,
301,
101,
48,
11... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
window.showModalDialog Page Load not being executed.
===
I am actually loading a page as a modal dialog box as window.showModalDialog("url.aspx"). The first time the modal dialog is poped up the page load event gets called. When i close it and call the same again, the Control does not come to the PageLoad. Instead the page pops up with the previous values in all its controls.
I actually want the PageLoad to be triggered everytime the modal dialog pops up. | 0 | [
2,
1463,
9,
9303,
20756,
4286,
5567,
2478,
6305,
52,
142,
5557,
9,
800,
3726,
3726,
31,
589,
1121,
12797,
21,
2478,
28,
21,
13,
20756,
28223,
1649,
28,
1463,
9,
9303,
20756,
4286,
5567,
5,
7,
911,
255,
9,
472,
306,
396,
7,
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... |
Lazy initialization causing System.ArgumentException in Silverlight 2.0 beta
===
I've got the following example running in a simple Silverlight page:
public Page()
{
InitializeComponent();
InitializeOther();
}
private DoubleCollection dashes;
public DoubleCollection Dashes
{
get
{
//dashes = new DoubleCollection(); //works ok
//dashes.Add(2.0);
//dashes.Add(2.0);
if (dashes == null)
{
dashes = new DoubleCollection(); //causes exception
dashes.Add(2.0);
dashes.Add(2.0);
}
return dashes;
}
set
{
dashes = value;
}
}
private void InitializeOther()
{
Line line;
for (int i = 0; i < 10; i++)
{
line = new Line();
line.Stroke = new SolidColorBrush(Colors.Blue);
line.StrokeDashArray = Dashes; //exception thrown here
line.X1 = 10;
line.Y2 = 10;
line.X2 = 400;
line.Y2 = 10 + (i * 40);
canvas1.Children.Add(line);
}
}
The above code throws a System.ArgumentException on the line marked. One solution to the problem is also marked in the example.
Does anybody know if this problem is related to the fact that the property System.Windows.Shapes.Shape.StrokeDashArray is a dependency property?
Many thanks for any hints! | 0 | [
2,
16792,
2104,
1829,
3242,
329,
9,
512,
3073,
1130,
10066,
872,
19,
1172,
3130,
172,
9,
387,
8434,
800,
3726,
3726,
31,
22,
195,
330,
14,
249,
823,
946,
19,
21,
1935,
1172,
3130,
2478,
45,
317,
2478,
5,
6,
13,
1,
2104,
2952,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Create COM component and ActiveX controls in .Net (C#)
===
Is is possible to create COM component and ActiveX controls in .Net (using c# language). I searched internet but i could`t get anything.<br><br>
Thanks,<br>
santhosh | 0 | [
2,
1600,
13,
960,
5912,
17,
1348,
396,
8671,
19,
13,
9,
2328,
13,
5,
150,
5910,
6,
800,
3726,
3726,
25,
25,
938,
20,
1600,
13,
960,
5912,
17,
1348,
396,
8671,
19,
13,
9,
2328,
13,
5,
12655,
272,
5910,
816,
6,
9,
31,
9036,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 References and versioning - how does it work?
===
We have several common libs. Ideally we want them all to use the latest version of a dll even if they have been compiled against an older different version (assume the latest version is backward compatible)
e.g we have:<BR>
<BR>
Project dll<BR>
Common controls dll<BR>
Logging dll<BR>
Database access dll
Project and common controls reference v2 of database dll. Logging however references v1.
If different versions are referenced in different components how does VS pick which one to use? <BR>
Do we have to recompile v1 dll to use the latest database (v2) or can we get this to pick up automatically?<BR>
Is it possible to force a particular version to be used?
Thanks,
Alex
| 0 | [
2,
3458,
1120,
7231,
17,
615,
68,
13,
8,
184,
630,
32,
170,
60,
800,
3726,
3726,
95,
57,
238,
757,
13,
8326,
18,
9,
5628,
102,
95,
259,
105,
65,
20,
275,
14,
5736,
615,
16,
21,
13,
43,
211,
166,
100,
59,
57,
74,
9316,
149,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 organize C++ test apps and related files?
===
I'm working on a C++ library that (among other stuff) has functions to read config files; and I want to add tests for this. So far, this has lead me to create lots of valid and invalid config files, each with only a few lines that test one specific functionality. But it has now got very unwieldy, as there are so many files, and also lots of small C++ test apps. Somehow this seems wrong to me :-) so do you have hints how to organise all these tests, the test apps, and the test data?
Note: the library's public API itself is not easily testable (it requires a config file as parameter). The juicy, bug-prone methods for actually reading and interpreting config values are private, so I don't see a way to test them directly?
So: would you stick with testing against real files; and if so, how would you organise all these files and apps so that they are still maintainable?
| 0 | [
2,
184,
20,
9213,
272,
20512,
1289,
4865,
18,
17,
1597,
6488,
60,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
272,
20512,
1248,
30,
13,
5,
21068,
89,
3217,
6,
63,
3719,
20,
1302,
13,
14093,
2816,
6488,
73,
17,
31,
259,
20,
3547,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Aren't there any better ways of displaying an object other than using hierarchy?
===
I have a class hierarchy as such:
+-- VirtualNode
|
INode --+ +-- SiteNode
| |
+-- AbstractNode --+
|
+-- SiteSubNode
And a corresponding `NodeCollection` class that is build on `INode`. In order to display a `NodeCollection` I need to know the final type of each member. So I need a function like this
foreach (INode n in myNodeCollection)
{
switch(n.GetType())
{
case(typeof(SiteNode)):
// Display n as SiteNode
}
}
Now, this is really not an object oriented way of doing it. **Are there any patterns or recommended ways of doing the same thing, in your opinion?** | 0 | [
2,
4847,
22,
38,
80,
186,
574,
2847,
16,
17418,
40,
3095,
89,
119,
568,
14417,
60,
800,
3726,
3726,
31,
57,
21,
718,
14417,
28,
145,
45,
2754,
8,
8,
6599,
251,
546,
13,
1,
19,
8355,
13,
8,
8,
2430,
2754,
8,
8,
689,
251,
54... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
c# indexof n th occurence of a string
===
Unless I am missing an obvious built in method what is the quickest way to get the n th occurrence of a string within a string.
I could loop the indexof method with the start index being updated on each loop but it sounds wasteful to me. | 0 | [
2,
272,
5910,
4348,
1041,
13,
103,
13,
96,
3744,
2940,
16,
21,
3724,
800,
3726,
3726,
4003,
31,
589,
2863,
40,
4674,
392,
19,
2109,
98,
25,
14,
2231,
1430,
161,
20,
164,
14,
13,
103,
13,
96,
12933,
16,
21,
3724,
363,
21,
3724,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Access date bug- dd/mm automatically got changed to mm/dd
===
I coded something using Date statement in ms-access vba. It was working fine till the start of this month. But now I am seeing a very peculiar bug in access vba that the Date has automatically changed the format from dd/mm/yyyy to mm/dd/yyyy. Has anyone else encountered the same problem | 0 | [
2,
1381,
1231,
6256,
8,
13,
8096,
118,
3363,
7499,
330,
1015,
20,
1620,
118,
8096,
800,
3726,
3726,
31,
13,
22254,
301,
568,
1231,
3331,
19,
4235,
8,
20604,
566,
969,
9,
32,
23,
638,
1123,
3924,
14,
799,
16,
48,
1617,
9,
47,
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... |
where to store uploaded files (sound ,pitctures and video)
===
A while a go I had to developed a music site that allowed audio files to be uploaded to a site and then converted in to various formats using ffmpeg, people would then download the uploaded audio files after purchasing them and a tmp file would be created and placed at the download location and was only valid for each download instance and the tmp file would then get deleted.
Now I am revisiting the project, I have to add pictures and video as upload content also.
I want to find the best method for storing the files,
option 1 : storing the files in a folder and reference them in the database
option 2 : storing the actual file in the database(mysql) as blob.
I am toying around with this idea to consider the security implications of each method, and other issues I might have not calculated for. | 0 | [
2,
113,
20,
1718,
23782,
6488,
13,
5,
8489,
13,
15,
7328,
150,
6418,
18,
17,
763,
6,
800,
3726,
3726,
21,
133,
21,
162,
31,
41,
20,
885,
21,
232,
689,
30,
1159,
4023,
6488,
20,
44,
23782,
20,
21,
689,
17,
94,
3494,
19,
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... |
Enable ViewState for few controls and disable for others/page
===
When I disable ViewState for the page. It does not allow any other control to use ViewState .. even if I set EnableViewState="true" for that particular control ..
is it possible to enable ViewState for a control when ViewState is disabled for the page itself?
if not how can disable viewstate for controls on page except for few without specifying EnableViewState="false" explicitly .. typing the same into so many controls is hectic .. | 0 | [
2,
9240,
1418,
3859,
26,
310,
8671,
17,
1460,
579,
26,
654,
118,
6486,
800,
3726,
3726,
76,
31,
1460,
579,
1418,
3859,
26,
14,
2478,
9,
32,
630,
52,
1655,
186,
89,
569,
20,
275,
1418,
3859,
13,
9,
9,
166,
100,
31,
309,
9240,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
XSD and Automatic Class / Message Generation
===
What avenues are there for using an XSD to generate message instances? I seem to remember reading about generating classes from XSD, but can't find anything specific now.
BTW, SO is my knowledge sharer of choice, not Google. | 0 | [
2,
993,
18,
43,
17,
6715,
718,
13,
118,
2802,
2782,
800,
3726,
3726,
98,
2054,
18,
50,
80,
26,
568,
40,
993,
18,
43,
20,
7920,
2802,
13946,
60,
31,
2260,
20,
1518,
1876,
88,
13500,
2684,
37,
993,
18,
43,
15,
47,
92,
22,
38,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I cope with rounding errors on doubles in vb.net?
===
I'm trying to balance a set of currency values using vb.net. The totals for both these values is cast as a double. I'm getting rounding errors in some situations.
What's the best way to avoid this? Is there a type I can use in preference to double? How do I round the resultant value to two decimal places?
Here's my code - I probably don't need to show it, but just in case.
Dim nInvValue As Double
Dim nCreditValue As Double
For Each oReferenceItem In oMatchInvoices
Dim nUnallocated As Double = oReferenceItem.DocumentOutstandingValue - oReferenceItem.DocumentAllocatedValue
If ((nUnallocated <> 0) And (sReferenceValue = oReferenceItem.InstrumentNo)) Then
iCount = iCount + 1
If (oReferenceItem.IsDebit) And (nUnallocated > 0) Then
nInvValue = nInvValue + nUnallocated
InvoiceList.Add(nUnallocated.ToString("c"), oReferenceItem.URN.ToString)
End If
If (oReferenceItem.IsCredit) And (nUnallocated < 0) Then
nCreditValue = nCreditValue - nUnallocated
CreditList.Add(nUnallocated.ToString("c"), oReferenceItem.URN.ToString)
End If
End If
Next
| 0 | [
2,
184,
107,
31,
11624,
29,
560,
68,
11908,
27,
7784,
19,
13,
20468,
9,
2328,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
4468,
21,
309,
16,
10507,
4070,
568,
13,
20468,
9,
2328,
9,
14,
600,
18,
26,
156,
158,
4070,
25,
1325,
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... |
Displaying RichText in Crystal Reports
===
I have a report created in Crystal (the version that comes with Visual Studio 2005) that contains an IFieldObject that I want to use to display some rich text. I have set the TextFormat of the IFieldObject to crRTFText, however when I run the report the textbox displays all the rtf markup rather than actually displaying the formatted text.
Is there some other settings that need to be changed in order for Crystal to display rich text? | 0 | [
2,
17418,
2042,
11969,
19,
4282,
2813,
800,
3726,
3726,
31,
57,
21,
1330,
679,
19,
4282,
13,
5,
124,
615,
30,
1624,
29,
3458,
1120,
812,
6,
30,
1588,
40,
31,
1109,
23793,
30,
31,
259,
20,
275,
20,
3042,
109,
2042,
1854,
9,
31,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
When reviewing requirements specification what "deadly sins" need to be addressed?
===
When reviewing requirements specification (that includes functional, non-functional requirements, constraints etc) however small or large it is what are the "deadly sins" committed by authors to look out for?
Please list not more than 7 most essential things (in order of decreasing severity) that being done (or not done) in requirements specification have adverse effect on the quality of software product. Less than 7 is perfectly OK.
| 0 | [
2,
76,
18046,
4786,
14177,
98,
13,
7,
14260,
102,
18898,
7,
376,
20,
44,
7832,
60,
800,
3726,
3726,
76,
18046,
4786,
14177,
13,
5,
887,
1103,
7652,
15,
538,
8,
27983,
4786,
15,
16747,
2722,
6,
207,
284,
54,
370,
32,
25,
98,
50... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Delphi 7 exception not caught
===
I have some really complicated legacy code I've been working on that crashes when collecting big chunks of data. I've been unable to find the exact reason for the crashes and am trying different ways to solve it or at least recover nicely. The last thing I did was enclose the crashing code in a
try
...
except
cleanup();
end;
just to make it behave. But the cleanup never gets done. Under what circumstances does an exception not get caught? This might be due to some memory overflow or something since the app is collecting quite a bit of data.
Oh and the exception I got before adding the `try` was "Access violation" (what else?) and the CPU window points to very low addresses. Any ideas or pointers would be much appreciated! | 0 | [
2,
23030,
453,
5391,
52,
1383,
800,
3726,
3726,
31,
57,
109,
510,
8343,
7780,
1797,
31,
22,
195,
74,
638,
27,
30,
21563,
76,
10079,
580,
15009,
18,
16,
1054,
9,
31,
22,
195,
74,
2343,
20,
477,
14,
5340,
1215,
26,
14,
21563,
17... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
GDI resource leak in DrawFrameControl
===
It seems that DrawFrameControl() creates Font and Brush objects, select them into dc, and doesn't delete them. (according to BoundsChecker messages). Does anyone faced such thing? | 0 | [
2,
489,
1115,
6577,
11724,
19,
2003,
8361,
12898,
800,
3726,
3726,
32,
2206,
30,
2003,
8361,
12898,
5,
6,
9695,
9978,
17,
7588,
3916,
15,
5407,
105,
77,
4752,
15,
17,
1437,
22,
38,
27448,
105,
9,
13,
5,
18821,
20,
4138,
2992,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do I detect Mobile Safari server side using PHP?
===
Mobile Safari is a very capable browser, and it can handle my website as it is perfectly. However, there are a few elements on my page that could be optimized for browsing using this device; such as serving specific thumbnails that are smaller than the desktop counterparts to help fit more content into the screen.
I would like to know how I can detect Mobile Safari (all versions, preferably) using PHP, so then I can serve a) a specific css file and b) different sized image thumbnails. | 0 | [
2,
184,
107,
31,
9092,
3241,
25055,
8128,
270,
568,
13,
26120,
60,
800,
3726,
3726,
3241,
25055,
25,
21,
253,
3868,
16495,
15,
17,
32,
92,
3053,
51,
2271,
28,
32,
25,
5759,
9,
207,
15,
80,
50,
21,
310,
2065,
27,
51,
2478,
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... |
What's the fastest way to delete a large folder in Windows?
===
I want to delete a folder that contains thousands of files and folders. If I use Windows Explorer to delete the folder it can take 10-15 minutes (not always, but often). Is there a faster way in Windows to delete folders?
Other details:
- I don't care about the recycle bin.
- It's an NTFS drive. | 2 | [
2,
98,
22,
18,
14,
7518,
161,
20,
27448,
21,
370,
19294,
19,
1936,
60,
800,
3726,
3726,
31,
259,
20,
27448,
21,
19294,
30,
1588,
3805,
16,
6488,
17,
19294,
18,
9,
100,
31,
275,
1936,
8520,
20,
27448,
14,
19294,
32,
92,
247,
33... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 book to learn about technical writing?
===
I just realized that the ability to express ideas in writing is an important skill as a programmer. With a good writing ability, we can write blogs, technical paper, comments, or documentation better. I have poor writing skill, limiting me in expressing my ideas clearly. Is there any book which can help improve my writing skill? | 0 | [
2,
98,
22,
18,
21,
254,
360,
20,
2484,
88,
2447,
1174,
60,
800,
3726,
3726,
31,
114,
1896,
30,
14,
2165,
20,
2999,
3478,
19,
1174,
25,
40,
681,
6148,
28,
21,
17968,
9,
29,
21,
254,
1174,
2165,
15,
95,
92,
2757,
8146,
18,
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... |
Groovy question: "except" syntax?
===
I am a total Groovy newbie. I saw the following code on http://docs.huihoo.com/grails/1.0.3/ref/Controllers/beforeInterceptor.html
def beforeInterceptor = [action:this.&auth,except:'login']
How would I expand this to also include a second exception, say, if the action was 'login2'? | 0 | [
2,
3452,
2026,
93,
1301,
45,
13,
7,
10066,
7,
22649,
60,
800,
3726,
3726,
31,
589,
21,
600,
3452,
2026,
93,
78,
5893,
9,
31,
441,
14,
249,
1797,
27,
7775,
6903,
13799,
18,
9,
9974,
8884,
9,
960,
118,
263,
7301,
18,
11698,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to generate a range of numbers in Mysql
===
How do I generate a range of consecutive numbers (one per line) from a mysql query so that I can insert them into a table?
for example :
nr
1
2
3
4
5
I would like to use only mysql for this (not php or other languages)
| 0 | [
2,
184,
20,
7920,
21,
978,
16,
2116,
19,
51,
18,
22402,
800,
3726,
3726,
184,
107,
31,
7920,
21,
978,
16,
4195,
2116,
13,
5,
849,
416,
293,
6,
37,
21,
51,
18,
22402,
25597,
86,
30,
31,
92,
14692,
105,
77,
21,
859,
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... |
Can you use Amazon S3 via Flex?
===
Due to the lack of clientaccesspolicy.xml, there appears to be problems with using Amazon S3 via Flex. Are there any work arounds? | 0 | [
2,
92,
42,
275,
8059,
13,
18,
240,
1197,
14409,
60,
800,
3726,
3726,
397,
20,
14,
1792,
16,
6819,
20604,
8147,
2731,
9,
396,
8184,
15,
80,
1780,
20,
44,
1716,
29,
568,
8059,
13,
18,
240,
1197,
14409,
9,
50,
80,
186,
170,
140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Transitioning from WinForms to AJAX, what do I need to know?
===
I currently have a functioning in-house Windows Forms application which extensively uses the DataGridView control for data entry. There are some support issues which are expected when we roll this out to more locations, so one of our consultants has recommended putting together an AJAX application with substantially the same functionality.
I have used ASP.NET a bit in the past with the old model where basically everything goes to the server, but I've heard AJAX applications can be made more UI responsive than that. So my question is, what's the best way to get started with AJAX, for someone who has worked mostly in WinForms C#? | 0 | [
2,
4513,
68,
37,
628,
4190,
18,
20,
20624,
15,
98,
107,
31,
376,
20,
143,
60,
800,
3726,
3726,
31,
871,
57,
21,
14175,
19,
8,
1682,
1936,
1997,
3010,
56,
7802,
2027,
14,
1054,
16375,
4725,
569,
26,
1054,
2792,
9,
80,
50,
109,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best security practices in Linux
===
What security best-practices would you strongly recommend in maintaining a Linux server? (i.e. bring up a firewall, disable unnecessary services, beware of suid executables, and so on.)
Also: is there a definitive reference on Selinux?
| 0 | [
2,
246,
1221,
5242,
19,
13024,
800,
3726,
3726,
98,
1221,
246,
8,
7310,
14468,
5052,
83,
42,
5020,
12360,
19,
8215,
21,
13024,
8128,
60,
13,
5,
49,
9,
62,
9,
1499,
71,
21,
535,
6051,
15,
1460,
579,
16435,
687,
15,
44,
5011,
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... |
How to determine what log level to use?
===
The log levels WARN, ERROR and FATAL are pretty clear. But when is something DEBUG, and when INFO?
I've seen some projects that are annoyingly verbose on the INFO level, but I've also seen code that favors the DEBUG level too much. In both cases, useful information is hidden in the noise.
What are the criteria for determining log levels? | 4 | [
2,
184,
20,
3746,
98,
6738,
662,
20,
275,
60,
800,
3726,
3726,
14,
6738,
2216,
9296,
15,
7019,
17,
8773,
50,
1772,
1207,
9,
47,
76,
25,
301,
121,
16254,
15,
17,
76,
15404,
60,
31,
22,
195,
541,
109,
2314,
30,
50,
17610,
102,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ResultSet: Retrieving column values by index versus retrieving by label
===
When using JDBC, I often come across constructs like
ResultSet rs = ps.executeQuery();
while (rs.next()) {
int id = rs.getInt(1);
// Some other actions
}
I asked myself (and authors of code too) why not to use labels for retrieving column values:
int id = rs.getInt("CUSTOMER_ID");
The best explanation I've heard is something concerning performance. But actually, does it make processing extremely fast? I don't believe so, though I have never performed measurements. Even if retrieving by label would be a bit slower, nevertheless, it provide better readability and flexibility, in my opinion.
So could someone give me good explanation of avoiding to retrieve column values by column index instead of column label? What are pros and cons of both approaches (maybe, concerning certain DBMS)? | 0 | [
2,
1736,
1198,
45,
13,
6239,
3272,
8397,
4698,
4070,
34,
4348,
5706,
13,
6239,
3272,
8397,
34,
1899,
800,
3726,
3726,
76,
568,
487,
43,
7229,
15,
31,
478,
340,
464,
6960,
18,
101,
1736,
1198,
13,
1224,
800,
8613,
9,
1706,
17194,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it possible to specify web service credentials in your web.config?
===
I need to configure a website to access a webservice on another machine, via a proxy. I can configure the website to use a proxy, but I can't find a way of specifying the credentials that the proxy requires, is that possible? Here is my current configuration:
<defaultProxy useDefaultCredentials="false">
<proxy usesystemdefault="true" proxyaddress="<proxy address>" bypassonlocal="true" />
</defaultProxy>
I know you can do this via code, but the software the website is running is a closed-source CMS so I can't do this.
Is there any way to do this? MSDN isn't helping me much.. | 0 | [
2,
25,
32,
938,
20,
19077,
2741,
365,
5059,
43,
10107,
18,
19,
154,
2741,
9,
14093,
2816,
60,
800,
3726,
3726,
31,
376,
20,
1065,
15951,
21,
2271,
20,
1381,
21,
2741,
11449,
27,
226,
1940,
15,
1197,
21,
27188,
9,
31,
92,
1065,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 extract common named_scopes from ActiveRecord models
===
I have named_scope which is reused in multiple ActiveRecord models.
For example:
named_scope :limit, lambda {|limit| {:limit => limit}}
What is the best practice to extract this code to be shared across models.
Is it possible to extract it to a module or should I rather reopen ActiveRecord::Base class? | 0 | [
2,
184,
20,
10962,
757,
377,
1,
11555,
18,
37,
1348,
14953,
2761,
800,
3726,
3726,
31,
57,
377,
1,
11555,
56,
25,
302,
8795,
19,
1886,
1348,
14953,
2761,
9,
26,
823,
45,
377,
1,
11555,
13,
45,
20565,
15,
13,
24187,
13,
1,
2056... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What's the best way to cache a user control or it's associated data in asp.net mvc
===
I am in the middle of implementing an application using ASP.NET MVC and would love to cache the data passed to user controls or the output rendering on some user controls that I render using the Html.RenderPartial, that way I don't have to query the DB with every request I do to the controller for a new view.
Thanks. | 0 | [
2,
98,
22,
18,
14,
246,
161,
20,
16522,
21,
4155,
569,
54,
32,
22,
18,
1598,
1054,
19,
28,
306,
9,
2328,
307,
8990,
800,
3726,
3726,
31,
589,
19,
14,
772,
16,
17333,
40,
3010,
568,
28,
306,
9,
2328,
307,
8990,
17,
83,
339,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 have you customised work items in Team System?
===
At my company we use the default agile process template with some modificiations. One modification we have made is added a field that indicates how to report time spent on a work item.
What customisations of the default process templates have you made? Have you customised a third party process template or maybe rolled your own from scratch?
I think it would be interesting to learn from others customisations of Team System's process templates. | 0 | [
2,
184,
57,
42,
5816,
2541,
170,
3755,
19,
173,
329,
60,
800,
3726,
3726,
35,
51,
237,
95,
275,
14,
12838,
27475,
953,
22894,
29,
109,
7226,
821,
9198,
7504,
9,
53,
16135,
95,
57,
117,
25,
905,
21,
575,
30,
6475,
184,
20,
1330... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Capturing the Console Output
===
Hi i want to invoke the Console application from my application but i would like to capture all the output generated in the console. (Remember, i dont want to save the information first in a file and then relist as i would love to receive it as live) | 0 | [
2,
12859,
14,
8650,
5196,
800,
3726,
3726,
4148,
31,
259,
20,
28371,
14,
8650,
3010,
37,
51,
3010,
47,
31,
83,
101,
20,
3683,
65,
14,
5196,
6756,
19,
14,
8650,
9,
13,
5,
18342,
15,
31,
1049,
259,
20,
2079,
14,
676,
64,
19,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... |
SMTP with CRAM_MD5 in java
===
i need to send email throug a (external)SMTP server from java
however this server wil only accept CRAM_MD5 authentication, wich is not supported by javamail.
what would be a good way to get these emails send?
(it must be in java) | 0 | [
2,
7613,
13726,
29,
6803,
79,
1,
79,
43,
264,
19,
8247,
800,
3726,
3726,
31,
376,
20,
2660,
8517,
25057,
5127,
21,
13,
5,
1706,
8766,
192,
6,
18,
79,
13726,
8128,
37,
8247,
207,
48,
8128,
5266,
104,
3440,
6803,
79,
1,
79,
43,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
IPv6 and ports
===
How do ports (or their functional equivalent) work with IPv6?
| 0 | [
2,
31,
10166,
379,
17,
9551,
800,
3726,
3726,
184,
107,
9551,
13,
5,
248,
66,
7652,
4602,
6,
170,
29,
31,
10166,
379,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Interesting UTF-8 Yahoo File Download Headers
===
My company runs a webmail service, and we were trying to diagnose a problem with Word downloads not opening automatically - the same *.doc file download from Yahoo Mail would open, but one from ours would not.
In the course of investigating the headers we saw this coming from Yahoo:
content-disposition attachment; filename*="utf-8''word document.doc";
Whereas our headers were like this:
content-disposition attachment; filename="word document.doc";
What exactly is Yahoo doing with the additional asterisk and utf-8'' designation? | 0 | [
2,
4883,
287,
11720,
8,
457,
23553,
3893,
7121,
157,
445,
800,
3726,
3726,
51,
237,
1461,
21,
2741,
8079,
365,
15,
17,
95,
46,
749,
20,
28438,
21,
1448,
29,
833,
7121,
18,
52,
1214,
7499,
13,
8,
14,
205,
1637,
9,
13799,
3893,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to prevent an exception in a background thread from terminating an application?
===
I can hookup to AppDomain.CurrentDomain.UnhandledException to log exceptions from background threads, but how do I prevent them terminating the runtime? | 0 | [
2,
184,
20,
2501,
40,
5391,
19,
21,
2395,
9322,
37,
25724,
40,
3010,
60,
800,
3726,
3726,
31,
92,
5559,
576,
20,
4865,
537,
6232,
9,
17657,
537,
6232,
9,
1020,
3203,
1294,
10066,
872,
20,
6738,
13392,
37,
2395,
20396,
15,
47,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Splitting a semicolon-separated string to a dictionary, in Python
===
I have a string that looks like this:
"Name1=Value1;Name2=Value2;Name3=Value3"
Is there a built-in class/function in Python that will take that string and construct a dictionary, as though I had done this:
dict = {
"Name1": "Value1",
"Name2": "Value2",
"Name3": "Value3"
}
I have looked through the modules available but can't seem to find anything that matches. | 0 | [
2,
17282,
21,
1922,
12805,
103,
8,
18,
14189,
7432,
3724,
20,
21,
9186,
15,
19,
20059,
800,
3726,
3726,
31,
57,
21,
3724,
30,
1879,
101,
48,
45,
13,
7,
7259,
165,
3726,
15165,
165,
73,
7259,
135,
3726,
15165,
135,
73,
7259,
240,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
The most flexible framework architecture for web development?
===
Obviously, there is no one single solution that would satisfy everyone's needs; an architecture is always a trade-off. I want to create a framework, originally aimed at <acronym title="Rapid Application Development">RAD</acronym> of web games. Target language is PHP, although the architecture should be widely applicable.
Goals that I have in head for this framework are: flexibility in ways you can achieve the result; maximal comfort for developers; connecting modules like LEGO® blocks; many types of input, many types of output, one format for processing.
The goals that are not a priority are speed, enterprise use and making money. It's supposed to be an open source project.
The cornerstone of this design is that all content, before transformation, is processed in XML (idea based on <acronym title="Enterprise Application Integration">EAI</acronym> system I've worked with, eGate). The data abstraction layer - hopefully some smart ORM - is not important now. The output will be generated using XSLT or any other custom modules, for virtually any client - HTML for old browsers, XHTML/HTML5 for modern browsers, simple HTML for mobile clients, XML for AJAX/XMLRPC, etc.
Main reasons for using XML are:
<ul><li>it's a well-known standard</li>
<li>existing tools like XPath, SimpleXML and DOM for navigating and modifying the content</li>
<li>XSLT providing a powerful and unified way to transform the code into any tag soup</li>
<li>I find the XML markup very easily readable, therefore I don't think that advantages of JSON or YAML make a difference here</li>
<li>The content can be stacked easily, and it the order of the content doesn't really matter as long as it's transformed correctly with XSLT</li>
</ul>
The page generation process would consist of these phases:
<ol><li>Pre-processing: initializing modules, processing <acronym title="GET POST COOKIE SESSION">GPCS</acronym> data, applying default [XML] templates</li>
<li>Processing/generation: main part of business logic, generating the bloated XML with maximum data (although hopefully optimized not to generate balast)</li>
<li>Processing: some additional business logic, e.g. cutting down some of the markup, preparing for transformation, reporting, statistics, etc.</li>
<li>Post-processing: parsing XML through the transformation engine (most probably just XSLT), output.</li>
</ol>
The content would be generated with a lot of meta-data (e.g. tags, permissions, importance, necessity, aimed output type), which would be stripped down during post-processing.
So, my question is: except for speed, what is the downfall of this solution? Where it could go wrong both during the development/maintenance of the framework, and its applications? What are the downsides of this architecture? | 0 | [
2,
14,
127,
13568,
6596,
2607,
26,
2741,
522,
60,
800,
3726,
3726,
4409,
15,
80,
25,
90,
53,
345,
4295,
30,
83,
14711,
1266,
22,
18,
2274,
73,
40,
2607,
25,
550,
21,
1238,
8,
1299,
9,
31,
259,
20,
1600,
21,
6596,
15,
912,
54... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What content type to force download of text response?
===
I need to stream a file to the Response for saving on the end user's machine. The file is plain text, so what content type can I use to prevent the text being displayed in the browser? | 0 | [
2,
98,
2331,
1001,
20,
558,
7121,
16,
1854,
1627,
60,
800,
3726,
3726,
31,
376,
20,
3766,
21,
3893,
20,
14,
1627,
26,
7599,
27,
14,
241,
4155,
22,
18,
1940,
9,
14,
3893,
25,
3748,
1854,
15,
86,
98,
2331,
1001,
92,
31,
275,
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,
0,
0,
0,
0,
0,
0,
0... |
jQuery CSS selectors in IE
===
The following works in Firefox, but breaks in IE7 & 8:
$("#my-first-div, #my-second-div").hide();
so I have to do this:
$("#my-first-div").hide();
$("#my-second-div").hide();
Is this normal? | 0 | [
2,
487,
8190,
93,
272,
18,
18,
23946,
18,
19,
13,
660,
800,
3726,
3726,
14,
249,
693,
19,
535,
18219,
15,
47,
7947,
19,
13,
660,
465,
279,
469,
45,
5579,
5,
7,
5910,
915,
8,
3552,
8,
12916,
15,
6926,
915,
8,
5007,
8,
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... |
Best Practice: Erlang Application Deploy on windows.
===
When deploying a ready to use erlang application I **don't** want the user to
- Find the right erl release on the
internet.
- Install the erl vm
- unzip and decide a location for the beam files (with the application)
- read a readme
- modify anything that even looks like a config file
I have a couple of ideas of what could be a way but I would like to get some input.
| 0 | [
2,
246,
1345,
45,
13,
106,
9949,
3010,
17617,
27,
1936,
9,
800,
3726,
3726,
76,
17617,
68,
21,
1451,
20,
275,
13,
106,
9949,
3010,
31,
13,
1409,
804,
22,
38,
1409,
259,
14,
4155,
20,
13,
8,
477,
14,
193,
13,
106,
255,
830,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to meake file upload control with resume in ASP.Net ?
===
How to make ASP.net file upload control with resume, without file size limitation and with secure connection?
Any idea? | 0 | [
2,
184,
20,
55,
13297,
3893,
71,
8294,
569,
29,
13113,
19,
28,
306,
9,
2328,
13,
60,
800,
3726,
3726,
184,
20,
233,
28,
306,
9,
2328,
3893,
71,
8294,
569,
29,
13113,
15,
366,
3893,
1072,
24943,
17,
29,
4315,
2760,
60,
186,
882... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Why use ref keyword when passing an Object?
===
If I am passing an object to a method, why should I use the ref keyword? Isn't this the default behaviour anyway?
For example:
class Program
{
static void Main(string[] args)
{
TestRef t = new TestRef();
t.Something = "Foo";
DoSomething(t);
Console.WriteLine(t.Something);
}
static public void DoSomething(TestRef t)
{
t.Something = "Bar";
}
}
public class TestRef
{
public string Something { get; set; }
}
The output is "Bar" which means that the object was passed as a reference. | 0 | [
2,
483,
275,
13,
14057,
1246,
9587,
76,
2848,
40,
3095,
60,
800,
3726,
3726,
100,
31,
589,
2848,
40,
3095,
20,
21,
2109,
15,
483,
378,
31,
275,
14,
13,
14057,
1246,
9587,
60,
2532,
22,
38,
48,
14,
12838,
7727,
2774,
60,
26,
82... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best way to test if a website is alive from a C# applicaiton
===
I am looking for the best way to test if a website is alive from a C# application.
**Background**<br/>
My application consists of a *Winforms UI*, a backend *WCF service* and a *website* to publish content to the UI and other consumers. To prevent the situation where the UI starts up and fails to work properly because of a missing WCF service or website being down I have added an app startup check to ensure that all everything is alive.
The application is being writen in C#, .Net 3.5, Visual Studio 2008 SP1
**Current Solution**<br/>
Currently I am making a web request to a test page on the website that will inturn test the web site and then display a result.
WebRequest request = WebRequest.Create("http://localhost/myContentSite/test.aspx");
WebResponse response = request.GetResponse();
I am assuming that if there are no exceptions thown during this call then all is well and the UI can start.
**Question**<br/>
Is this the simplest/ right way or is there some other shneaky call that I do no know about in C# or a better way to do it.
| 0 | [
2,
246,
161,
20,
1289,
100,
21,
2271,
25,
2481,
37,
21,
272,
5910,
4865,
16904,
49,
444,
800,
3726,
3726,
31,
589,
699,
26,
14,
246,
161,
20,
1289,
100,
21,
2271,
25,
2481,
37,
21,
272,
5910,
3010,
9,
13,
1409,
1958,
8810,
140... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Automatic namespaces import
===
Is there a way in Visual Studio (a hotkey) to automatically import a type (or choosing between known namespaces) like the CTRL+O in Eclipse? | 0 | [
2,
6715,
204,
5582,
18,
9010,
800,
3726,
3726,
25,
80,
21,
161,
19,
3458,
1120,
13,
5,
58,
1047,
4237,
6,
20,
7499,
9010,
21,
1001,
13,
5,
248,
10883,
128,
167,
204,
5582,
18,
6,
101,
14,
13,
4812,
6362,
2430,
111,
19,
11652,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Tool for web server redirect management?
===
I'm considering rolling my own, but just in case there's a good piece of software already available, I'm asking here: Is there something that will provide an interface to webserver redirect configuration, and allow redirects to be managed by a fairly non-technical userbase. The following requirements must be fulfilled:
* Open-source
* Apache
* Support for internal / external redirects
* Support for both web-server config and htaccess or meta-refresh files (for users who cannot restart the server)
* Date range for validity | 0 | [
2,
5607,
26,
2741,
8128,
302,
14706,
1097,
60,
800,
3726,
3726,
31,
22,
79,
5154,
3929,
51,
258,
15,
47,
114,
19,
610,
80,
22,
18,
21,
254,
1855,
16,
2306,
614,
904,
15,
31,
22,
79,
3379,
235,
45,
25,
80,
301,
30,
129,
1181,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Configuration file with list of key-value pairs in python
===
I have a python scripts that analyzes a set of error messages and checks for each message if it matches a certain pattern (regular expression) in order to group these messages. For example "file x does not exist" and "file y does not exist" would match "file .* does not exist" and be accounted as two occurrences of "file not found" category.
As the number of patterns and categories is growing, I'd like to put these couples "regular expression/display string" in a configuration file, basically a dictionary serialization of some sort.
I would like this file to be editable by hand, so I'm discarding any form of binary serialization, and also I'd rather not resort to xml serialization to avoid problems with characters to escape (& <> and so on...).
Do you have any idea of what could be a good way of accomplishing this? | 0 | [
2,
8091,
3893,
29,
968,
16,
1246,
8,
15165,
7473,
19,
20059,
800,
3726,
3726,
31,
57,
21,
20059,
17505,
30,
16051,
18,
21,
309,
16,
7019,
7561,
17,
16602,
26,
206,
2802,
100,
32,
1717,
21,
1200,
3732,
13,
5,
25049,
1803,
6,
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 do I catch ClassCastException?
===
I'm trying to catch a ClassCastException when deserializing an object from xml.
So,
try {
restoredItem = (T) decoder.readObject();
} catch (ClassCastException e){
//don't need to crash at this point,
//just let the user know that a wrong file has been passed.
}
And yet this won't as the exception doesn't get caught. What would you suggest?
| 0 | [
2,
184,
107,
31,
2949,
718,
6146,
10066,
872,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
2949,
21,
718,
6146,
10066,
872,
76,
1746,
106,
2815,
3335,
40,
3095,
37,
23504,
9,
86,
15,
1131,
13,
1,
4617,
2119,
79,
800,
13,
5,
38,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C# - How to change HTML elements attributes
===
My master page contains a list as shown here. What I'd like to do though, is add the "class=active" attribute to the list li thats currently active but I have no idea how to do this. I know that the code goes in the aspx page's page_load event, but no idea how to access the li I need to add the attribute. Please enlighten me. Many thanks.
<div id="menu">
<ul id="nav">
<li class="forcePadding"><img src="css/site-style-images/menu_corner_right.jpg" /></li>
<li id="screenshots"><a href="screenshots.aspx" title="Screenshots">Screenshots</a></li>
<li id="future"><a href="future.aspx" title="Future">Future</a></li>
<li id="news"><a href="news.aspx" title="News">News</a></li>
<li id="download"><a href="download.aspx" title="Download">Download</a></li>
<li id="home"><a href="index.aspx" title="Home">Home</a></li>
<li class="forcePadding"><img src="css/site-style-images/menu_corner_left.jpg" /></li>
</ul>
</div> | 0 | [
2,
272,
5910,
13,
8,
184,
20,
753,
13,
15895,
2065,
13422,
800,
3726,
3726,
51,
1129,
2478,
1588,
21,
968,
28,
1721,
235,
9,
98,
31,
22,
43,
101,
20,
107,
362,
15,
25,
3547,
14,
13,
7,
1898,
3726,
7889,
7,
35,
14755,
20,
14,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can I speed up the YUI layout manager, when I have a large table on the page?
===
I am using the YUI layout manager which seems to work at an OK speed. However if the page contains a large `<Table>` with about 500 rows. The YUI `render()` function takes about a **minute** longer to run.
When I open the same page without the layout manager it opens in less than a second.
My *only* concern is with **IE 7**. I did try it on firefox and it only took three seconds.
Any ideas on what is taking so long? Can I somehow tell the layout manager to ignore the table? | 0 | [
2,
92,
31,
1362,
71,
14,
2600,
49,
9106,
1382,
15,
76,
31,
57,
21,
370,
859,
27,
14,
2478,
60,
800,
3726,
3726,
31,
589,
568,
14,
2600,
49,
9106,
1382,
56,
2206,
20,
170,
35,
40,
5854,
1362,
9,
207,
100,
14,
2478,
1588,
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... |
Remote log viewer for Java/Glassfish log files
===
I'm looking for a log viewer with similar capablilties as Chainsaw, in which I can tail Glassfish log files over for instance SSH/SCP. Does anyone know if such a tool exist? | 0 | [
2,
5388,
6738,
16812,
26,
8247,
118,
11539,
4934,
6738,
6488,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
6738,
16812,
29,
835,
2605,
58,
12834,
255,
3915,
28,
2858,
10561,
15,
19,
56,
31,
92,
3424,
1350,
4934,
6738,
6488,
84,
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,
0,
0... |
[C lib] Adding a TLS/SSL layer to communications..?
===
My stuff is made with several components among which some are written in C. As I would like to add some security features, I am thinking of communicating over an SSL/TLS layer.
Could you advise me some good lib to do this (if possible) ? | 0 | [
2,
636,
150,
13,
8326,
500,
4721,
21,
13,
7786,
18,
118,
18,
18,
255,
5385,
20,
3380,
9,
9,
60,
800,
3726,
3726,
51,
3217,
25,
117,
29,
238,
5090,
497,
56,
109,
50,
642,
19,
272,
9,
28,
31,
83,
101,
20,
3547,
109,
1221,
96... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
iPhone "Web Site Error"
===
I'm writing server-side programs in PHP for an iPhone app. And I have no iPhone. :P
The iPhone app requests XML files from the site whenever a user runs the iPhone app. You may visit http://www.appvee.com/iphone/ads or http://www.appvee.com/iphone/latest for the XML files.
And a message box will show up with the following error messages:
"Web Site Error
Conversion of data failed. The file is not UTF-8, or in the encoding specified in XML header if XML.
"
![alt text][1]
Maybe I must add header("Content-type: text/xml"); at the beginning of the PHP files? I didn't add this line and it worked well before.
Any help is greatly appreciated.
[1]: http://farm4.static.flickr.com/3195/2925993535_bd62b7cf42.jpg?v=0 | 0 | [
2,
21024,
13,
7,
14113,
689,
7019,
7,
800,
3726,
3726,
31,
22,
79,
1174,
8128,
8,
1416,
1726,
19,
13,
26120,
26,
40,
21024,
4865,
9,
17,
31,
57,
90,
21024,
9,
13,
45,
306,
14,
21024,
4865,
12279,
23504,
6488,
37,
14,
689,
6634... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Generate Multiple and Filtered Drop + Create Stored Procedures
===
I have this script:
select name,create_date,modify_date from sys.procedures order by modify_date desc
I can see what procedures were modified lately.
I will add a "where modify_date >= <five days ago> "
And I'd like to use some system stored procedure, that will generate me :
drop + create scripts for the (let's say 5 matching) stored procedures
Can i do this somehow?
thanks
| 0 | [
2,
7920,
1886,
17,
25090,
2804,
2754,
1600,
8214,
8876,
800,
3726,
3726,
31,
57,
48,
3884,
45,
5407,
204,
15,
6037,
1373,
1,
8209,
15,
13670,
8612,
1,
8209,
37,
10315,
18,
9,
15617,
69,
4221,
18,
389,
34,
17579,
1,
8209,
1746,
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... |
Importing Delphi Web Services into Java
===
I have a web server built in Delphi, and I'm trying to import its web services on Java (I'm using Eclipse IDE). The Web Services Explorer recognice it, but when trying to import, the wizard says there's an "unexpected attribute" and cannot import it.
This is my wsdl file (the one that my Delphi Web Server publishes).
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="ITSOAPWebServiceservice" targetNamespace="http://tempuri.org/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/">
<message name="WebMethod0Request">
<part name="Document" type="xs:string"/>
</message>
<message name="WebMethod0Response">
<part name="return" type="xs:boolean"/>
</message>
<portType name="ITSOAPWebService">
<operation name="WebMethod">
<input message="tns:WebMethod0Request"/>
<output message="tns:WebMethod0Response"/>
</operation>
</portType>
<binding name="ITSOAPWebServicebinding" type="tns:ITSOAPWebService">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="WebMethod">
<soap:operation soapAction="urn:TWebServiceIntf1-ITSOAPWebService#WebMethod" style="rpc"/>
<input message="tns:WebMethod0Request">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:TWebServiceIntf1-ITSOAPWebService"/>
</input>
<output message="tns:WebMethod0Response">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:TWebServiceIntf1-ITSOAPWebService"/>
</output>
</operation>
</binding>
<service name="ITSOAPWebServiceservice">
<port name="ITSOAPWebServicePort" binding="tns:ITSOAPWebServicebinding">
<soap:address location="http://localhost:1024/soap/ITSOAPWebService"/>
</port>
</service>
</definitions>
Now, Eclipse says that the "message" attribute in both:
definicions.binding.operation.input
definitions.binding.operation.output
is unexpected. I know it's redundant, since these are already defined in
definitions.portType.operation.input
definitions.portType.operation.output
but still, I can't import the web service.
So, any idea on how to make Eclipse ignore these attributes, or Delphi not to publish them? | 0 | [
2,
9010,
68,
23030,
2741,
687,
77,
8247,
800,
3726,
3726,
31,
57,
21,
2741,
8128,
392,
19,
23030,
15,
17,
31,
22,
79,
749,
20,
9010,
82,
2741,
687,
27,
8247,
13,
5,
49,
22,
79,
568,
11652,
13,
3448,
6,
9,
14,
2741,
687,
8520... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best automated system testing approach?
===
The system consists of a hardware device and a PC. The PC runs a GUI that controls the hardware device. To test the device various test hardware is used that can be controlled by RS232 or GPIB.
What is the best way to automate the testing of this system? | 0 | [
2,
98,
25,
14,
246,
14904,
329,
4431,
2141,
60,
800,
3726,
3726,
14,
329,
2043,
16,
21,
7610,
3646,
17,
21,
5168,
9,
14,
5168,
1461,
21,
9457,
30,
8671,
14,
7610,
3646,
9,
20,
1289,
14,
3646,
617,
1289,
7610,
25,
147,
30,
92,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to stop Excel to prompt to reopen a workbook.
===
I have a readonly Excel workbook containing a VBA application. The application saves any data that needs to be saved in a database, and the workbook is always closed without saving (by setting ThisWorkbook.Saved = True in BeforeClose).
I have the following problem:
- User double-clicks on the workbook in Windows Explorer, workbook opens.
- User double-clicks a second time on the workbook in Windows Explorer.
- Excel prompts: "MyWorkbook.xls is already open. Reopening will cause any changes you made to be discarded. Do you want to reopen MyWorkbook.xls?"
- If the user clicks on "Yes", the workbook is reopened *without executing the BeforeClose event handler of the instance that was already open*.
This is a problem in my application, because it means that some important cleanup code in the BeforeClose event handler does not get executed.
Can anyone suggest a VBA solution to this. Which could be:
- Suppressing the prompt to reopen the workbook. Instead silently use the already-open instance.
- Somehow get the BeforeClose or some other event handler to run in the original instance before it is closed, so I can run my cleanup code.
| 0 | [
2,
184,
20,
747,
20700,
20,
11443,
4417,
20,
21398,
21,
170,
5199,
9,
800,
3726,
3726,
31,
57,
21,
1302,
4965,
20700,
170,
5199,
3503,
21,
566,
969,
3010,
9,
14,
3010,
16815,
186,
1054,
30,
2274,
20,
44,
4377,
19,
21,
6018,
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... |
Java core API anti-Patterns. What is wrong?
===
Despite that the work of the guys from SUN with the Java core API is awesome, as they are humans, are not error prone. I have read in several books some criticism about Some huge mistakes that (my guess) are still there for backward compatibility and legacy code. My question here is which ones do you know?
As examples:
- Observable is a Class. Should be an interface in order to allow inheritance.
- Cloneable: It shouldn't be a marker interface. (Should have the clone method instead of be in Object class).
| 0 | [
2,
8247,
2884,
21,
2159,
1082,
8,
5972,
8766,
18,
9,
98,
25,
1389,
60,
800,
3726,
3726,
869,
30,
14,
170,
16,
14,
2776,
37,
939,
29,
14,
8247,
2884,
21,
2159,
25,
13706,
15,
28,
59,
50,
2840,
15,
50,
52,
7019,
15957,
9,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What ReSharper 4.0 templates for C# do you use?
===
What ReSharper 4.0 templates for **C#** do you use?
Let's share these in the following format:
----------
**shortcut**: [Description]
// Resharper template code snippet
// comes here
**Macros properties** (if present):
- **Macro1** - Value - EditableOccurence
- **Macro2** - Value - EditableOccurence
----------
- One macro per answer, please!
- Here are some samples for [NUnit test fixture][1] and [Standalone NUnit test case][2] that describe live templates in the suggested format.
[1]: http://stackoverflow.com/questions/186970/what-resharper-40-templates-for-c-do-you-use#186978
[2]: http://stackoverflow.com/questions/186970/what-resharper-40-templates-for-c-do-you-use#186978 | 4 | [
2,
98,
302,
23646,
106,
268,
9,
387,
22894,
18,
26,
272,
5910,
107,
42,
275,
60,
800,
3726,
3726,
98,
302,
23646,
106,
268,
9,
387,
22894,
18,
26,
13,
1409,
150,
5910,
1409,
107,
42,
275,
60,
408,
22,
18,
1891,
158,
19,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Large File Download - Connection With Server Reset
===
I have an asp.net website that allows the user to download largish files - 30mb to about 60mb. Sometimes the download works fine but often it fails at some varying point before the download finishes with the message saying that the connection with the server was reset.
Originally I was simply using Server.TransmitFile but after reading up a bit I am now using the code posted below. I am also setting the Server.ScriptTimeout value to 3600 in the Page_Init event.
private void DownloadFile(string fname, bool forceDownload)
{
string path = MapPath(fname);
string name = Path.GetFileName(path);
string ext = Path.GetExtension(path);
string type = "";
// set known types based on file extension
if (ext != null)
{
switch (ext.ToLower())
{
case ".mp3":
type = "audio/mpeg";
break;
case ".htm":
case ".html":
type = "text/HTML";
break;
case ".txt":
type = "text/plain";
break;
case ".doc":
case ".rtf":
type = "Application/msword";
break;
}
}
if (forceDownload)
{
Response.AppendHeader("content-disposition",
"attachment; filename=" + name.Replace(" ", "_"));
}
if (type != "")
{
Response.ContentType = type;
}
else
{
Response.ContentType = "application/x-msdownload";
}
System.IO.Stream iStream = null;
// Buffer to read 10K bytes in chunk:
byte[] buffer = new Byte[10000];
// Length of the file:
int length;
// Total bytes to read:
long dataToRead;
try
{
// Open the file.
iStream = new System.IO.FileStream(path, System.IO.FileMode.Open,
System.IO.FileAccess.Read, System.IO.FileShare.Read);
// Total bytes to read:
dataToRead = iStream.Length;
//Response.ContentType = "application/octet-stream";
//Response.AddHeader("Content-Disposition", "attachment; filename=" + filename);
// Read the bytes.
while (dataToRead > 0)
{
// Verify that the client is connected.
if (Response.IsClientConnected)
{
// Read the data in buffer.
length = iStream.Read(buffer, 0, 10000);
// Write the data to the current output stream.
Response.OutputStream.Write(buffer, 0, length);
// Flush the data to the HTML output.
Response.Flush();
buffer = new Byte[10000];
dataToRead = dataToRead - length;
}
else
{
//prevent infinite loop if user disconnects
dataToRead = -1;
}
}
}
catch (Exception ex)
{
// Trap the error, if any.
Response.Write("Error : " + ex.Message);
}
finally
{
if (iStream != null)
{
//Close the file.
iStream.Close();
}
Response.Close();
}
} | 0 | [
2,
370,
3893,
7121,
13,
8,
2760,
29,
8128,
23422,
800,
3726,
3726,
31,
57,
40,
28,
306,
9,
2328,
2271,
30,
2965,
14,
4155,
20,
7121,
7841,
263,
1595,
6488,
13,
8,
712,
5024,
20,
88,
2083,
5024,
9,
1030,
14,
7121,
693,
1123,
47... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
WCF Custom Http Proxy Authentication
===
Is it possible to provide WCF with a custom proxy address and custom credentials?
I've found this answer on stackoverflow: http://stackoverflow.com/questions/105499/how-to-set-proxy-with-credentials-to-generated-wcf-client, but I've got a complication, the service I'm authenticating against uses its own authentication, so I've got to use two sets of credentials (one to get through the proxy, and the other to authenticate against the service)
I'm using the technique described in the answers to the other question to provide the service credentials. e.g.
client.ClientCredentials.UserName.UserName = username;
client.ClientCredentials.UserName.Password = password;
I can set the address of the proxy using something like this:
(client.Endpoint.Binding as WSHttpBinding).ProxyAddress = ...;
How do I set what is effectively two sets of credentials? (NB: The credentials for the proxy and the actual service are different!) Also note that the proxy details are not necessarily the default system proxy details. | 0 | [
2,
11801,
410,
5816,
7775,
27188,
27963,
800,
3726,
3726,
25,
32,
938,
20,
1181,
11801,
410,
29,
21,
5816,
27188,
3218,
17,
5816,
5059,
43,
10107,
18,
60,
31,
22,
195,
216,
48,
1623,
27,
7566,
2549,
9990,
45,
7775,
6903,
25325,
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... |
Are there any text based "timesheet" or "work log" JSON or YAML formats which I can use to record time spent on tasks?
===
I just need a simple JSON or YAML (or other) text based format for recording the time I spend on tasks. I prefer to do as much work as possible in my text editor (e text editor) so it is more natural to me to stay in the editor and not switch back and forth to programs like Excel (plus this way I retain portable and "open" data). The idea is that if I record all my tasks in JSON or YAML format then I could easily use IRB (interactive Ruby) or some other interactive programming session to create a work log report for myself. Also I could use this to generate reports for my clients pretty easily at the end of some particular time period.
It would nice if the format already exists and that the format has some mechanism for coping with the following problem: some data that I record should be for "internal use only" whereas other data could be safe for "external" use. In other words, one problem I would like to avoid is the trouble of sifting back through text work logs in order to filter items that should not be forward to the client.
| 0 | [
2,
50,
80,
186,
1854,
432,
13,
7,
891,
17627,
7,
54,
13,
7,
3783,
6738,
7,
487,
528,
54,
2167,
8184,
13767,
56,
31,
92,
275,
20,
571,
85,
1111,
27,
8674,
60,
800,
3726,
3726,
31,
114,
376,
21,
1935,
487,
528,
54,
2167,
8184,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Tools for finding Shared Mutable data bugs in Java
===
I have a large legacy system to maintain. The codebase uses threads all over the place and those threads share a lot of mutable data. I know, sounds bad. Anyway, don't answer "rewrite the whole application from scratch" or I'll vote you down :-) I have tried to run some static analysis tools on the codebase, but none of those seem to catch this case which occurs a lot in our source code: multiple threads are reading and writing variables which are not marked as volatile or synchronized at all. Typically this occurs on "runFlag"-type variables. An example of this is on Effective Java 2nd edition page 260:
public class StopThread
{
private static boolean stopRequested;
public static void main(String[] args) throws InterruptedException
{
Thread backgroundThread = new Thread(new Runnable()
{
public void run()
{
int i = 0;
while (!stopRequested)
{
i++;
}
}
});
backgroundThread.start();
Thread.sleep(1000);
stopRequested = true;
}
}
This example never finishes on Windows/Linux with "-server" startup parameter given to Sun JVM. So, is there any (semi-)automatic way to find these issues, or do I have to rely totally on code reviews? | 0 | [
2,
4672,
26,
3007,
2592,
2832,
5924,
1054,
13925,
19,
8247,
800,
3726,
3726,
31,
57,
21,
370,
7780,
329,
20,
4027,
9,
14,
1797,
8436,
2027,
20396,
65,
84,
14,
209,
17,
273,
20396,
1891,
21,
865,
16,
2832,
5924,
1054,
9,
31,
143,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Implementing LDAP compliance
===
I'm working profesionally on a php web application which contains contacts, among other data. I was wondering how hard it would be to make this data available to external programs using the LDAP protocol.
Are there specific tools out there for this? I couldn't really find anything, but I can't imagine I'm the first to think about this. | 0 | [
2,
17333,
644,
20472,
14969,
800,
3726,
3726,
31,
22,
79,
638,
8721,
160,
872,
1326,
27,
21,
13,
26120,
2741,
3010,
56,
1588,
11894,
15,
497,
89,
1054,
9,
31,
23,
5712,
184,
552,
32,
83,
44,
20,
233,
48,
1054,
904,
20,
4886,
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 expose objects through WCF?
===
My project is split up into a typical 3 layer structure for a Silverlight app. That is:
- A base layer, which is a class library that contains all my business objects, logic, data access etc.
- A middle layer which is a WCF service which communicates with;
- My Silverlight front end
The problem I have is that currently the BO's exposed through WCF to my UI only contain the private variables, and none of the propertys or methods.
Is there an easy way to expose the full object (via attributes or configuration)?
What is the best solution? | 0 | [
2,
184,
20,
13833,
3916,
120,
11801,
410,
60,
800,
3726,
3726,
51,
669,
25,
2132,
71,
77,
21,
3874,
203,
5385,
1411,
26,
21,
1172,
3130,
4865,
9,
30,
25,
45,
13,
8,
21,
1000,
5385,
15,
56,
25,
21,
718,
1248,
30,
1588,
65,
51... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Resources and communities for data caching methodology
===
The subject on data chaching within software systems must be one of the oldest ever in the software design community. However, being such a vast subject also makes it hard to locate good resources about it.
Please share your pointers to serious resources and material on this subject. Books, wikipedia articles, forums, etc.
Thanks.
/R | 0 | [
2,
2566,
17,
2584,
26,
1054,
1658,
7192,
18653,
800,
3726,
3726,
14,
1550,
27,
1054,
2438,
7192,
363,
2306,
1242,
491,
44,
53,
16,
14,
2976,
462,
19,
14,
2306,
704,
514,
9,
207,
15,
142,
145,
21,
4658,
1550,
67,
1364,
32,
552,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 create a route like "/x/{*path}/y" in ASP.NET routing?
===
I have routes like "x/{*path}" where the `path` parameter is used by the controller to navigate a tree structure to end up with a resource which is served to the client.
I would now like to extend this scheme in an orthogonal fashion with other controllers that provide other "aspects" of the resource such as meta-data or a thumbnail. It should be possible to add these other controllers so that the main controller does not have to be aware of their existence. I was planning to use routes like "x/{*path}/y" to index these aspects but the routing system will not accept such paths.
I could use a constraint to only match my additional routes if the path parameter ends in "/y" for example but then the controller would have to be aware of the "extension" added to be able to remove it when parsing the path - this is not acceptable.
Am I forced to write my own Route? | 0 | [
2,
184,
20,
1600,
21,
858,
101,
13,
7,
118,
396,
118,
1,
2483,
8353,
1,
118,
93,
7,
19,
28,
306,
9,
2328,
19880,
60,
800,
3726,
3726,
31,
57,
5050,
101,
13,
7,
396,
118,
1,
2483,
8353,
1,
7,
113,
14,
13,
1,
8353,
1,
1890... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can I add ASP.NET AJAX Extentions to a page programmatically (server side)?
===
In a page, on the load event, I am dynamically creating controls for display on the page. This is all working properly. the trouble I am having is when adding extenders from the AJAX control toolkit, specifically I am trying to add rounded corners to a button control. No errors are thrown, but the AJAX Extension functionality does not appear in the displayed page.
Does anyone have any ideas on what I am not doing correctly, or if its even possible?
Dim edit As Button
Dim editRoundedCorners As AjaxControlToolkit.RoundedCornersExtender
For each item in items
edit = New Button()
edit.ID = "edit_" & item.code
edit.Text = "Edit"
edit.Style("padding") = "0 0 0 4px"
edit.SkinID = "smallEditButton"
editRoundedCorners = New AjaxControlToolkit.RoundedCornersExtender()
editRoundedCorners.BorderColor = edit.BorderColor
editRoundedCorners.ID = edit.ID & "_RoundedCorners"
editRoundedCorners.Corners = AjaxControlToolkit.BoxCorners.All
editRoundedCorners.Radius = 3
editRoundedCorners.TargetControlID = edit.ID
'add them to page control container
Next | 0 | [
2,
92,
31,
3547,
28,
306,
9,
2328,
20624,
5674,
5757,
20,
21,
2478,
625,
6732,
1326,
13,
5,
10321,
106,
270,
6,
60,
800,
3726,
3726,
19,
21,
2478,
15,
27,
14,
6305,
807,
15,
31,
589,
7782,
1326,
2936,
8671,
26,
3042,
27,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do i return an exit code from a VBA\VB6 console application
===
Have an old vbs script file being kicked off by an AutoSys job. Can I, and how do i return an int return value to indicate success or failure.
Thanks
| 0 | [
2,
184,
107,
31,
788,
40,
4350,
1797,
37,
21,
566,
969,
1,
20468,
379,
8650,
3010,
800,
3726,
3726,
57,
40,
315,
13,
20468,
18,
3884,
3893,
142,
5437,
168,
34,
40,
3108,
4980,
18,
1205,
9,
92,
31,
15,
17,
184,
107,
31,
788,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Code Coverage and Blame
===
Has anyone seen a tool that will integrate code coverage results with SCM/VCS to attribute untested lines of code to developers?
For example, is there a tool that will take NCover's Coverage.Xml, combine it with SVN blame, and produce a report that tells me things like developer who commits most untested code? | 0 | [
2,
1797,
5245,
17,
6149,
800,
3726,
3726,
63,
1276,
541,
21,
5607,
30,
129,
18399,
1797,
5245,
1736,
29,
4729,
79,
118,
8990,
18,
20,
35,
14755,
367,
22372,
1560,
16,
1797,
20,
10168,
60,
26,
823,
15,
25,
80,
21,
5607,
30,
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... |
glBlendFunc and alpha blending
===
I want to know how the glBlendFunc works. For example, i have 2 gl textures, where the alpha is on tex1, i want to have alpha in my final image. Where the color is on tex1, i want the color from tex2 to be. | 0 | [
2,
13,
8430,
2854,
706,
16638,
150,
17,
5705,
25359,
800,
3726,
3726,
31,
259,
20,
143,
184,
14,
13,
8430,
2854,
706,
16638,
150,
693,
9,
26,
823,
15,
31,
57,
172,
13,
8430,
12714,
18,
15,
113,
14,
5705,
25,
27,
14012,
165,
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... |
How to get all the controls in page using javascript in ASP.net page.
===
I am having a page with tab control and each control has almost 15 controls.totally there are 10 tabs. totally there are about 150 controls in a page(controls like drop down list, textbox, radiobutton, listbox only).
My requirement is there is button(submit) at the bottom the page. I need to check with javascript that at least 3 options should be selected out of 150 controls in that page irrespective of tabs which they choose.
Please suggest me the simplest and easy way which should be done in javascript for my aspx page. | 0 | [
2,
184,
20,
164,
65,
14,
8671,
19,
2478,
568,
8247,
8741,
19,
28,
306,
9,
2328,
2478,
9,
800,
3726,
3726,
31,
589,
452,
21,
2478,
29,
6523,
569,
17,
206,
569,
63,
557,
357,
8671,
9,
20148,
102,
80,
50,
332,
6523,
18,
9,
5139... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best solution for modifying a key in a record while selecting on it
===
I have an UPDATE sql command that modifies a Date/Time field in a particular table. This table has two keys, ProductionCode and TestTime, which is what is being modified. The Production Code never changes for a particular record, but often a user will find that they entered the wrong test time and need to change it.
I have the updated time which I can retrieve from the datagrid, however, I need to select the right record to change. In order to do that, one of my where criteria has to be the current time that that record is set at in the database.
Currently, I keep an array of old times, which are updated whenever an UPDATE command is run. So in the WHERE block of the sql command, the old time is used. Once its updated in the database, then I update the time array. The difficulties come in when times are entered out of order, or when the datagrid is sorted on a different field than the time. I have to keep track of what order all the old times are in corresponding to the data grid rows, and its caused a number of bugs in the past. Currently it works fine, but its delicate at best.
So what I'm really looking for is a better solution. Should I just store the results of the SELECT statement that is used to populate the UI, and rely on them? Currently, the only place my database results go, is directly into the datagrid. Or is there another way? I have avoided automatic data binding in favor of manually using SQL commands because my datagrids are dynamically configured and use different schemas from one load to the next, and the only columns guaranteed to be there are the ProductionCode and the TestTime. | 0 | [
2,
246,
4295,
26,
17579,
68,
21,
1246,
19,
21,
571,
133,
20764,
27,
32,
800,
3726,
3726,
31,
57,
40,
11100,
4444,
255,
1202,
30,
7226,
12970,
21,
1231,
118,
891,
575,
19,
21,
1498,
859,
9,
48,
859,
63,
81,
5534,
15,
637,
9375,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the single task in your development activity you would like to see automated?
===
What is that single action you do over and over again during your development time?
What task eats your development time like nothing else?
What is the task you want to perform, but you never convince yourself to do, because it would take forever to accomplish?
Please, provide environment information relevant to the task you mention:
- IDE and its version
- Tools, add-ins, plug-ins and other extensions
- Programming language | 0 | [
2,
98,
25,
14,
345,
3005,
19,
154,
522,
2358,
42,
83,
101,
20,
196,
14904,
60,
800,
3726,
3726,
98,
25,
30,
345,
1028,
42,
107,
84,
17,
84,
188,
112,
154,
522,
85,
60,
98,
3005,
2749,
18,
154,
522,
85,
101,
626,
962,
60,
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... |
Can not operate ObservableCollection in multi threads
===
It seems the ObservableCollection only support add, remove, clear operation from the UI thread, It throw Not Support Exception if it is operated by a NO UI thread. I tried to override methods of ObservableCollection, unfortunatly, I met lots of problems.
Any one can provide me a ObservableCollection sample which can be operated by multi-threads?
Many thanks! | 0 | [
2,
92,
52,
4055,
5122,
10321,
579,
15015,
872,
19,
1889,
20396,
800,
3726,
3726,
32,
2206,
14,
5122,
10321,
579,
15015,
872,
104,
555,
3547,
15,
4681,
15,
1207,
1453,
37,
14,
13,
5661,
9322,
15,
32,
3814,
52,
555,
5391,
100,
32,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
jQuery sortables
===
I'm using the sortable function in jquery to sequence a faq list. Needless to say, i'm new to this concept. Anybody have any good examples of the backend for this. I have the front working fine, but updating the sequence in the database is another story. My backend is ColdFusion btw.
Thanks in advance | 0 | [
2,
487,
8190,
93,
2058,
579,
18,
800,
3726,
3726,
31,
22,
79,
568,
14,
2058,
579,
1990,
19,
487,
8190,
93,
20,
4030,
21,
1399,
1251,
968,
9,
17023,
18,
20,
395,
15,
31,
22,
79,
78,
20,
48,
2420,
9,
11181,
57,
186,
254,
3770,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Replacing or Removing a new line with something else but only between single or double quotes using PHP on a CSV file
===
I have a CSV file that holds about 200,000 - 300,000 records. Most of the records can be separated and inserted into a MySQL database with a simple
$line = explode("\n", $fileData);
and then the values separated with
$lineValues = explode(',', $line);
and then inserted into the database using the proper data type i.e int, float, string, text, etc.
However, some of the records have a text column that includes a \n in the string. Which breaks when using the $line = explode("\n", $fileData); method. Each line of data that needs to be inserted into the database has approximately 216 columns. not every line has a record with a \n in the string. However, each time a \n is found in the line it is enclosed between a pair of single quotes (')
each line is set up in the following format:
id,data,data,data,text,more data
example:
1,0,0,0,'Hello World,0
2,0,0,0,'Hello
World',0
3,0,0,0,'Hi',0
4,0,0,0,,0
As you can see from the example, most records can be easily split with the methods shown above. Its the second record in the example that causes the problem.
New lines are only \n and the file does not include \r in the file at all.
| 0 | [
2,
5496,
54,
9096,
21,
78,
293,
29,
301,
962,
47,
104,
128,
345,
54,
1494,
18901,
568,
13,
26120,
27,
21,
272,
18,
710,
3893,
800,
3726,
3726,
31,
57,
21,
272,
18,
710,
3893,
30,
2763,
88,
13,
14335,
13,
8,
3565,
15,
3993,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Cross-platform, cross-browser way to play sound from Javascript?
===
I am writing a dhtml application that creates an interactive simulation of a system. The data for the simulation is generated from another tool, and there is already a very large amount of legacy data.
Some steps in the simulation require that we play "voice-over" clips of audio. I've been unable to find an easy way to accomplish this across multiple browsers.
[Soundmanager2](http://www.schillmania.com/projects/soundmanager2/) comes pretty close to what I need, but it will only play mp3 files, and the legacy data may contain some .wav files as well.
Does anyone have any other libraries that might help? | 0 | [
2,
919,
8,
27035,
15,
919,
8,
25699,
4104,
161,
20,
418,
646,
37,
8247,
8741,
60,
800,
3726,
3726,
31,
589,
1174,
21,
13,
43,
15895,
3010,
30,
9695,
40,
9194,
10926,
16,
21,
329,
9,
14,
1054,
26,
14,
10926,
25,
6756,
37,
226,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Implement validation as a method or as a property?
===
I have an object that needs a test if the object data is valid. The validation itself would be called from the thread that instatiated the object, it looks like this:
{
if (_step.Equals(string.Empty)) return false;
if (_type.Equals(string.Empty)) return false;
if (_setup.Equals(string.Empty)) return false;
return true;
}
Would it be better to implement this as a property, or as a method, and why? I have read the answers to a [related question][1], but I don't think this specific question is covered there.
[1]: http://stackoverflow.com/questions/164023/what-guidelines-are-appropriate-for-determining-when-to-implement-a-class-membe | 0 | [
2,
8713,
27999,
28,
21,
2109,
54,
28,
21,
1354,
60,
800,
3726,
3726,
31,
57,
40,
3095,
30,
2274,
21,
1289,
100,
14,
3095,
1054,
25,
7394,
9,
14,
27999,
1145,
83,
44,
227,
37,
14,
9322,
30,
19,
10631,
49,
1669,
14,
3095,
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... |
Is there a FOSS batch compiling solution for Delphi that takes version as an input parameter?
===
Is there a FOSS batch compiling solution for Delphi that takes version as an input parameter?
I am using Delphi 7 and this remains the most tedious operation. Are there any other solutions, workarounds to make this easy. | 0 | [
2,
25,
80,
21,
13,
15912,
13064,
24378,
4295,
26,
23030,
30,
1384,
615,
28,
40,
6367,
18906,
60,
800,
3726,
3726,
25,
80,
21,
13,
15912,
13064,
24378,
4295,
26,
23030,
30,
1384,
615,
28,
40,
6367,
18906,
60,
31,
589,
568,
23030,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Missing Workflow project templates in Visual Studio 2008
===
I cannot add workflow item to my WPF project.
I create a new WPF project and want to add a sequential workflow. When I do "Add new item" there is no item template to select.
Any hints? | 0 | [
2,
2863,
170,
9990,
669,
22894,
18,
19,
3458,
1120,
570,
800,
3726,
3726,
31,
1967,
3547,
170,
9990,
9101,
20,
51,
619,
7721,
669,
9,
31,
1600,
21,
78,
619,
7721,
669,
17,
259,
20,
3547,
21,
1353,
5495,
10107,
170,
9990,
9,
76,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Unit test Custom membership provider with NUnit throws null reference error
===
Trying to create a user account in a test. But getting a Object reference is not set to an instanve of an object error when running it.
Here's my MemberShip provider class, it's in a class library MyCompany.MyApp.Domain.dll:
using System;
using System.Collections.Generic;
using System.Web.Security;
namespace MyCompany.MyApp.Domain
{
public class MyMembershipProvider : SqlMembershipProvider
{
const int defaultPasswordLength = 8;
private int resetPasswordLength;
public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)
{
resetPasswordLength = defaultPasswordLength;
string resetPasswordLengthConfig = config["resetPasswordLength"];
if (!String.IsNullOrEmpty(resetPasswordLengthConfig))
{
config.Remove("resetPasswordLength");
if (!int.TryParse(resetPasswordLengthConfig, out resetPasswordLength))
{
resetPasswordLength = defaultPasswordLength;
}
}
base.Initialize(name, config);
}
public override string GeneratePassword()
{
return Utils.PasswordGenerator.GeneratePasswordAsWord(resetPasswordLength);
}
}
}
Here's my App.Config for my seperate Test Class Library MyCompany.MyApp.Doman.Test.dll that references my business domain library above:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="SqlServer" connectionString="data source=mycomp\SQL2008;Integrated Security=SSPI;Initial Catalog=myDatabase" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<membership defaultProvider="MyMembershipProvider" userIsOnlineTimeWindow="15">
<providers>
<clear/>
<add name="MyMembershipProvider"
type="MyCompany.MyApp.Domain.MyMembershipProvider,MyCompany.MyApp.Domain"
connectionStringName="SqlServer"
applicationName="MyApp"
minRequiredNonalphanumericCharacters="0"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
requiresUniqueEmail="true"
passwordFormat="Hashed"/>
</providers>
</membership>
</system.web>
</configuration>
Here's my method that throws "Object reference is not set to an instanve of an object"
public class MemberTest
{
public static void CreateAdminMemberIfNotExists()
{
MembershipCreateStatus status;
status = MembershipCreateStatus.ProviderError;
NhsImpSysMembershipProvider provider = new NhsImpSysMembershipProvider();
provider.CreateUser("Admin", "qwerty*123", "support@weblogik.co.uk", "Question", "Answer", true, Guid.NewGuid(), out status);
}
}
it throws on the provider.CreateUser line
| 0 | [
2,
1237,
1289,
5816,
4363,
11747,
29,
10210,
242,
13566,
16203,
2801,
7019,
800,
3726,
3726,
749,
20,
1600,
21,
4155,
2176,
19,
21,
1289,
9,
47,
1017,
21,
3095,
2801,
25,
52,
309,
20,
40,
19,
6114,
195,
16,
40,
3095,
7019,
76,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.