unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Why doesn't this JavaScript display a confirm box?
===
I am trying to fix some bugs in a product I inherited, and I have this snippet of javascript that is supposed to hilight a couple of boxes and pop up a confirm box. What currently happens is I see the boxes change color and there is a 5 or so second delay, then it's as if the missing confirm just accepts itself. Does anyone smarter than I see anything amiss in this code?
function lastCheckInv() {
document.getElementById("ctl00$ContentPlaceHolderMain$INDet$txtInvNumber").style.background = "yellow";
document.getElementById("ctl00$ContentPlaceHolderMain$INDet$txtInvNumber").focus();
document.getElementById("ctl00_ContentPlaceHolderMain_INDet_AddCharges").style.background = "yellow";
document.getElementById("ctl00_ContentPlaceHolderMain_INDet_lblFreight").style.background = "yellow";
bRetVal = confirm("Are you sure the information associated with this invoice is correct?");
return bRetVal;
}
| 0 | [
2,
483,
1437,
22,
38,
48,
8247,
8741,
3042,
21,
10265,
1649,
60,
800,
3726,
3726,
31,
589,
749,
20,
6098,
109,
13925,
19,
21,
2374,
31,
7179,
15,
17,
31,
57,
48,
13,
29061,
16,
8247,
8741,
30,
25,
2293,
20,
4148,
3130,
21,
133... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using explicit interfaces to ensure programming against an interface.
===
I have seen arguments for using explicit interfaces as a method of locking a classes usage to that interface. The argument seems to be that by forcing others to program to the interface you can ensure better decoupling of the classes and allow easier testing.
Example:
public interface ICut
{
void Cut();
}
public class Knife : ICut
{
void ICut.Cut()
{
//Cut Something
}
}
And to use the Knife object:
ICut obj = new Knife();
obj.Cut();
Would you recommend this method of interface implementation? Why or why not? | 0 | [
2,
568,
14990,
6573,
18,
20,
4062,
3143,
149,
40,
6573,
9,
800,
3726,
3726,
31,
57,
541,
10553,
26,
568,
14990,
6573,
18,
28,
21,
2109,
16,
17538,
21,
2684,
7514,
20,
30,
6573,
9,
14,
5476,
2206,
20,
44,
30,
34,
6135,
654,
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... |
What is the best way to create a Factory Method when using WCF?
===
I have built a complex query mechanism which I want to provide a factory for in order to assist people with common query patterns. My methods are all revealed via WCF as a SOAP web service. What is the best way to ensure that my factory is easy to use across all clients that may wish to use my service (as I don't expect all of my customers to use .net)? | 0 | [
2,
98,
25,
14,
246,
161,
20,
1600,
21,
3129,
2109,
76,
568,
11801,
410,
60,
800,
3726,
3726,
31,
57,
392,
21,
1502,
25597,
6534,
56,
31,
259,
20,
1181,
21,
3129,
26,
19,
389,
20,
5404,
148,
29,
757,
25597,
6282,
9,
51,
3195,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Only creating a COM object if the DLL that implements it is signed?
===
We've got some code that uses LoadLibrary and GetProcAddress to implement a plugin architecture for one of our products. We ensure that the DLL about to be loaded is signed with our code-signing key.
We're changing the plugin architecture to use COM instead. Is there a way to enforce code-signing (preferably with our certificate) when instantiating a COM object?
| 0 | [
2,
104,
2936,
21,
13,
960,
3095,
100,
14,
13,
43,
211,
30,
8713,
18,
32,
25,
908,
60,
800,
3726,
3726,
95,
22,
195,
330,
109,
1797,
30,
2027,
6305,
1210,
2559,
622,
17,
164,
15617,
27950,
20,
8713,
21,
10922,
108,
2607,
26,
53... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Math Equation Web Control?
===
Is there any easy web application or user control that allows math equations to be easily created and stored as a text string? | 0 | [
2,
5057,
8020,
2741,
569,
60,
800,
3726,
3726,
25,
80,
186,
2010,
2741,
3010,
54,
4155,
569,
30,
2965,
5057,
12853,
20,
44,
2351,
679,
17,
8214,
28,
21,
1854,
3724,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Regex to find repeating letters ( Perl )
===
I am looking for a regex that will find repeating letters.
So any letter twice or more, for example:
***booooooot or abbott***
I won't know the letter I am looking for ahead of time.
I was thinking \w{2.} but I am pretty sure this won't work because it will match 2 or more letter not necessarily the same. | 0 | [
2,
7953,
1706,
20,
477,
17389,
2516,
13,
5,
416,
255,
13,
6,
800,
3726,
3726,
31,
589,
699,
26,
21,
7953,
1706,
30,
129,
477,
17389,
2516,
9,
86,
186,
1748,
2088,
54,
91,
15,
26,
823,
45,
8980,
10858,
28290,
2779,
54,
15498,
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... |
Dereferencing Variable Size Arrays in Structs
===
Structs seem like a useful way to parse a binary blob of data (ie a file or network packet). This is fine and dandy until you have variable size arrays in the blob. For instance:
struct nodeheader{
int flags;
int data_size;
char data[];
};
This allows me to find the last data character:
nodeheader b;
cout << b.data[b.data_size-1];
Problem being, I want to have multiple variable length arrays:
struct nodeheader{
int friend_size;
int data_size;
char data[];
char friend[];
};
As I'm trying to parse a binary file (more specifically a class file). I've written an implementation in Java (which was my class assignment), no I'm doing a personal version in C++ and was hoping to get away without having to write 100 lines of code. Any ideas?
Thanks,
Stefan | 0 | [
2,
121,
29254,
7612,
1072,
7718,
18,
19,
13,
10346,
18,
800,
3726,
3726,
13,
10346,
18,
2260,
101,
21,
4811,
161,
20,
2017,
870,
21,
14171,
334,
10904,
16,
1054,
13,
5,
660,
21,
3893,
54,
982,
12795,
6,
9,
48,
25,
1123,
17,
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... |
Calculate weeknumber from a date value
===
Is there some simple way to calculate a Weeknumber value from a date value stored in XML? | 0 | [
2,
18469,
877,
16299,
37,
21,
1231,
1923,
800,
3726,
3726,
25,
80,
109,
1935,
161,
20,
18469,
21,
877,
16299,
1923,
37,
21,
1231,
1923,
8214,
19,
23504,
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... | [
1,
1,
1,
1,
1,
1,
1,
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... |
Visual Studio intellisense stopped working
===
I had installed resharper evaluation version and uninstalled it. After this the intellisense stopped working. I have restarted computer but still i have this problem.
Can anyone plesae help me here?
I am using Visual Studio 2005
thanks
| 0 | [
2,
3458,
1120,
14635,
3159,
6498,
1175,
638,
800,
3726,
3726,
31,
41,
4066,
302,
23646,
106,
8670,
615,
17,
367,
108,
21300,
69,
32,
9,
75,
48,
14,
14635,
3159,
6498,
1175,
638,
9,
31,
57,
27440,
1428,
47,
174,
31,
57,
48,
1448,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... |
oledb/ado.net: Get the command's text, with all parameters replaced
===
Is it possible to get the text of an `OleDbCommand` with all parameters replaced with their values? E.g. in the code below I'm looking for a way to get the query text
SELECT * FROM my_table WHERE c1 = 'hello' and c2 = 'world'
after I finished assigning the parameters.
var query = "SELECT * FROM my_table WHERE c1 = ? and c2 = ?";
var cmd = new OleDbCommand(query, connection);
cmd.Parameters.Add("@p1", OleDbType.WChar).Value = "hello";
cmd.Parameters.Add("@p2", OleDbType.WChar).Value = "world"; | 0 | [
2,
12116,
9007,
118,
5672,
9,
2328,
45,
164,
14,
1202,
22,
18,
1854,
15,
29,
65,
12905,
1141,
800,
3726,
3726,
25,
32,
938,
20,
164,
14,
1854,
16,
40,
13,
1,
6069,
9007,
16239,
1,
29,
65,
12905,
1141,
29,
66,
4070,
60,
13,
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... |
code igniter / cakephp and ms access
===
I'm trying to use Microsoft Access as the db for a demo project that I'm thinking of doing in either Code Igniter or CakePHP. Ignoring the possibly folly of using MS Access, I haven't been able to figure out precisely how the connection string corresponds to the frameworks' db settings. In straight php, I can use this code to connect to an access db:
$db_connection = odbc_connect(
"DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=\\path\\to\\db.mdb",
"ADODB.Connection", "", "SQL_CUR_USE_ODBC"
);
How do those strings correspond to the Code Igniter db settings? This doesn't seem to be quite working:
$db['access']['hostname'] = "{Microsoft Access Driver (*.mdb)}";
$db['access']['username'] = "ADODB.Connection";
$db['access']['password'] = "";
$db['access']['database'] = "\\path\\to\\db.mdb";
$db['access']['dbdriver'] = "odbc";
$db['access']['dbprefix'] = "";
$db['access']['pconnect'] = TRUE;
$db['access']['db_debug'] = TRUE;
$db['access']['cache_on'] = FALSE;
$db['access']['cachedir'] = "";
$db['access']['char_set'] = "utf8";
$db['access']['dbcollat'] = "utf8_general_ci";
| 0 | [
2,
1797,
31,
16606,
815,
13,
118,
8390,
26120,
17,
4235,
1381,
800,
3726,
3726,
31,
22,
79,
749,
20,
275,
7099,
1381,
28,
14,
13,
9007,
26,
21,
8376,
669,
30,
31,
22,
79,
1440,
16,
845,
19,
694,
1797,
31,
16606,
815,
54,
8390,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Change Theme / CSS based on user
===
I am building a product that we are eventually going to white-label. Right now I am trying to figure out the best way to facilitate these requirements programmatically so the user can update the basic design of the site (ie header color, etc) via their profile/settings form.
Requirements:
- User can update the logo (this is complete)
- User can update basic design elements (based on CSS), ie header color, footer color, sidebar color - all basic CSS overrides
We don't want to use ASP.Net Themes/Skins because that requires storing static themes in the local file system. We would like to use CSS to override the base style and store this in the database.
Our initial plan is to store the CSS in a simple varchar field in the database and write that CSS out to the Master Page on Pre-Init event using "!" to override the base styles. Is this the best solution? If not, what have you done to accomplish this functionality/ | 0 | [
2,
753,
3184,
13,
118,
272,
18,
18,
432,
27,
4155,
800,
3726,
3726,
31,
589,
353,
21,
2374,
30,
95,
50,
878,
228,
20,
359,
8,
21018,
9,
193,
130,
31,
589,
749,
20,
1465,
70,
14,
246,
161,
20,
9681,
158,
4786,
625,
6732,
1326... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 happens if I don't use the --Reintegrate option in Subversion 1.5?
===
I thought I had figured out everything I needed to know about Subversion 1.5 and was happily merging between my feature branches and the trunk.
Then I realized I've not been doing what I thought I had.
I have not been using the --reintegrate parameter when merging back to the trunk from a feature branch.
Specifically I use TortoiseSVN 1.5.3 and I had always been choosing the 1st Merge option "Merge a range of revisions" without specifying a range.
This I understood to be correct when merging from the trunk to the branch but I also understood that I should have used the --reintegrate parameter when merging the other way.
Instead I have been choosing the 2st option when merging in either direction, obviously picking the opposing url in each case.
It did seem to process the correct files in each case...
**So what (if anything) have I screwed up ?** | 0 | [
2,
98,
5531,
100,
31,
221,
22,
38,
275,
14,
13,
8,
8,
99,
12370,
1373,
4255,
19,
972,
10898,
137,
9,
264,
60,
800,
3726,
3726,
31,
289,
31,
41,
5700,
70,
796,
31,
851,
20,
143,
88,
972,
10898,
137,
9,
264,
17,
23,
12356,
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... |
Can I create a Database Deadlock test in Nunit?
===
In this asp.net I'm cleaning up it's possible for deadlocks to occur. I want to make sure that the code deals with them properly, so I'm trying to write NUnit tests which trigger a deadlock.....
The DAO is split by entity. Each entity has a set of tests which are surrounded by Startup() and Teardown() methods which create a transactionscope and then roll it back after the tests are complete. This works great for everything else, but is completely useless for deadlocks.
How can I setup and run a "deadlock" test using TransactionScope and SQL2000 (ie MSDTC is involved) that can be reliably reproduced?
And yes, I did start with the "Why don't you stop the deadlocks happening in the first place" plan of action, but I have no control over the code where the deadlocks can occur - I just call the functions and they can deadlock.
| 0 | [
2,
92,
31,
1600,
21,
6018,
828,
3966,
1289,
19,
10210,
242,
60,
800,
3726,
3726,
19,
48,
28,
306,
9,
2328,
31,
22,
79,
9724,
71,
32,
22,
18,
938,
26,
828,
3966,
18,
20,
3744,
9,
31,
259,
20,
233,
562,
30,
14,
1797,
10342,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Changing form opactity without changing opacity of contained controls
===
Does anybody know if it is possible, with windows forms in .net, to change the opacity of a form without it automatically changing the opacity of the controls within the form?
I have a form that is running maximized, that contains a flowlayoutpanel in the centre of the form with controls inside it. I would like to lower the opacity of the form so that the "spare" part around the flowlayoutpanel is partly transparent, but the flowlayoutpanel itself remains solid (im aiming for a [lightbox][1] style effect)
[1]: http://www.huddletogether.com/projects/lightbox/ | 0 | [
2,
4226,
505,
3088,
5183,
856,
366,
4226,
13,
11490,
5788,
16,
3437,
8671,
800,
3726,
3726,
630,
11181,
143,
100,
32,
25,
938,
15,
29,
1936,
1997,
19,
13,
9,
2328,
15,
20,
753,
14,
13,
11490,
5788,
16,
21,
505,
366,
32,
7499,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Console window displays at WinForm startup (C#)
===
This is a minor bug (one I'm willing to live with in the interest of go-live, frankly), but I'm wondering if anyone else has ideas to fix it.
I have a C# WinForms application. When the app is launched via the executable (not via the debugger), the first thing the user sees is a console window, followed by the main window (after pre-loading is complete.)
I'd like to not display the console window. (Like I said, it's a minor bug.)
Here's (most of) the code for the Main() method. I've snipped out various proprietary/security related stuff, replacing it with comments where appropriate.
[STAThread]
static void Main()
{
try
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
// SNIP: Get username from Windows, associate with DB user
if (user == null || user.UID == 0 || (user.Active.HasValue && !(user.Active.Value)))
{
MessageBox.Show(ErrorStrings.UnknownUser, ErrorStrings.TitleBar, MessageBoxButtons.OK,
MessageBoxIcon.Error);
Application.Exit();
return;
}
// SNIP: Associate user with employee object
Application.Run(new MainForm());
}
catch (Exception ex)
{
if (ExceptionPolicy.HandleException(ex, UiStrings.ExceptionPolicy))
{
string message = ErrorStrings.UnhandledPreface + ex.ToString();
MessageBox.Show(message, ErrorStrings.TitleBar, MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
}
}
}
Anyone have any ideas? | 0 | [
2,
8650,
1463,
9412,
35,
628,
4190,
20205,
13,
5,
150,
5910,
6,
800,
3726,
3726,
48,
25,
21,
1689,
6256,
13,
5,
849,
31,
22,
79,
4452,
20,
515,
29,
19,
14,
1163,
16,
162,
8,
5928,
15,
22662,
6,
15,
47,
31,
22,
79,
5712,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Experience with laptop Keyboards?
===
I'm thinking of retiring my 3 year old HP laptop I want to know which manufacturor makes laptops with the best Keyboards?
I loved my Full width keyboard, with numberic pad on my HP, I've tried a a few laptop keyboards in shops and have found none of them satisfying to type with.
What I want is something that will maximise my typing comfort. All the ones I see in shops seem to be designed to look good but feel horible. The keys are either too shiny, too small, or don't press down enough.
All I want it a keyboard thats comfortable, I've been given a Lenovo laptop by my work and I've had to resort to pluging in a USB keyboard while I work, which is less than ideal. | 0 | [
2,
1496,
29,
12294,
5362,
60,
800,
3726,
3726,
31,
22,
79,
1440,
16,
9151,
51,
203,
159,
315,
5301,
12294,
31,
259,
20,
143,
56,
18868,
16839,
911,
248,
1364,
12294,
18,
29,
14,
246,
5362,
60,
31,
2199,
51,
503,
9456,
8896,
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... |
C# WebBrowser Control System.AccessViolationException
===
I have a program that uses the built in webbrowser control. At some point during the usage of this, I'm not sure at what point, but it appears to be random, I get the following error:
System.AccessViolationException
FullText = System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
Does anyone have any clues as to why I would get this and how to prevent it? | 0 | [
2,
272,
5910,
10192,
5417,
4104,
569,
329,
9,
20604,
13327,
10832,
10066,
872,
800,
3726,
3726,
31,
57,
21,
625,
30,
2027,
14,
392,
19,
10192,
5417,
4104,
569,
9,
35,
109,
454,
112,
14,
7514,
16,
48,
15,
31,
22,
79,
52,
562,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Serializing Lists of Classes to XML
===
I've got a collection of classes that I want to serialize out to an XML file. It looks something like this:
public class Foo
{
public list<Bar> BarList { get; set; }
}
Where a bar is just a wrapper for a collection of properties, like this:
public class Bar
{
public string Property1 { get; set; }
public string Property2 { get; set; }
}
I want to mark this up so that it outputs to an XML file - this will be used for both persistence, and also to render the settings via an XSLT to a nice human-readable form.
I want to get a nice XML representation like this:
<?xml version="1.0" encoding="utf-8"?>
<Foo>
<BarList>
<Bar>
<Property1>Value</Property1>
<Property2>Value</Property2>
</Bar>
<Bar>
<Property1>Value</Property1>
<Property2>Value</Property2>
</Bar>
</Barlist>
</Foo>
where are all of the Bars in the Barlist are written out with all of their properties. I'm fairly sure that I'll need some markup on the class definition to make it work, but I can't seem to find the right combination.
I've marked Foo with the attribute
[XmlRoot("Foo")]
and the list<Bar> with the attribute
[XmlArray("BarList"), XmlArrayItem(typeof(Bar), ElementName="Bar")]
in an attempt to tell the Serialiser what I want to happen. This doesn't seem to work however and I just get an empty tag, looking like this:
<?xml version="1.0" encoding="utf-8"?>
<Foo>
<Barlist />
</Foo>
I'm not sure if the fact I'm using Automatic Properties should have any effect, or if the use of generics requires any special treatment. I've gotten this to work with simpler types like a list of strings, but a list of classes so far eludes me.
Apologies for the length of the question - any insight on how I might make this work would be much appreciated!
Thanks,
Jon
| 0 | [
2,
5956,
3335,
7227,
16,
2684,
20,
23504,
800,
3726,
3726,
31,
22,
195,
330,
21,
1206,
16,
2684,
30,
31,
259,
20,
5956,
2952,
70,
20,
40,
23504,
3893,
9,
32,
1879,
301,
101,
48,
45,
317,
718,
4310,
111,
13,
1,
317,
968,
1,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Simple JavaScript question: wtf is this thing?
===
var something = {
wtf: null,
omg: null
};
My JavaScript knowledge is still horribly patchy since I last programmed with it, but I think I've relearned most of it now. Except for this. I don't recall ever seeing this before. What is it? And where can I learn more about it? | 0 | [
2,
1935,
8247,
8741,
1301,
45,
619,
11720,
25,
48,
584,
60,
800,
3726,
3726,
4033,
301,
800,
13,
1,
619,
11720,
45,
16203,
15,
13,
2636,
263,
45,
16203,
13,
1,
73,
51,
8247,
8741,
1918,
25,
174,
28441,
7331,
93,
179,
31,
236,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
From XML to XSD
===
If i have a complex XML file, is there a cheap or free way to get a rough approximation of an XSD from it?
| 0 | [
2,
37,
23504,
20,
993,
18,
43,
800,
3726,
3726,
100,
31,
57,
21,
1502,
23504,
3893,
15,
25,
80,
21,
9148,
54,
551,
161,
20,
164,
21,
4182,
20289,
16,
40,
993,
18,
43,
37,
32,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How can I draw arrows on my left-docked MenuStrip?
===
I have a C# form into which I've placed a left-docked `MenuStrip`. This `MenuStrip` contains some menu items which contain submenus, and some menu items which are effectively buttons (clicking on them results in an action taking place; n.b., I realize this is not a good design).
I would like to have the menu items which have menus associated with them draw the right-pointing arrow on the menu item, the same way a contextual menu does. I've subclassed `ToolStripProfessionalRenderer` and can call `OnRenderArrow()` at the appropriate time (e.g., within `OnRenderItemText()` or similar), but I don't seem to have a way to determine the correct location of the arrow.
So, two interrelated questions here:
1. Is there a way to force the arrows to be drawn on top-level menu items?
2. If not, is there a way to determine the proper location of the arrow on the menu item so that `OnRenderArrow()` can be called manually?
Thanks! | 0 | [
2,
184,
92,
31,
2003,
13912,
27,
51,
225,
8,
11458,
69,
11379,
19992,
60,
800,
3726,
3726,
31,
57,
21,
272,
5910,
505,
77,
56,
31,
22,
195,
1037,
21,
225,
8,
11458,
69,
13,
1,
755,
267,
17851,
1,
9,
48,
13,
1,
755,
267,
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... |
Partition a list of sets by shared elements
===
Here's the jist of the problem: Given a list of sets, such as:
[ (1,2,3), (5,2,6), (7,8,9), (6,12,13), (21,8,34), (19,20) ]
Return a list of groups of the sets, such that sets that have a shared element are in the same group.
[ [ (1,2,3), (5,2,6), (6,12,13) ], [ (7,8,9), (21,8,34) ], [ (19,20) ] ]
Note the stickeyness - the set (6,12,13) doesn't have a shared element with (1,2,3), but they get put in the same group because of (5,2,6).
To complicate matters, I should mention that I don't really have these neat sets, but rather a DB table with several million rows that looks like:
key | group_id
----------------
1 | 1
2 | 1
3 | 1
5 | 2
2 | 2
6 | 2
and so on. So I would love a way to do it in SQL, but I would be happy with a general direction for the solution. | 0 | [
2,
10711,
21,
968,
16,
3415,
34,
2592,
2065,
800,
3726,
3726,
235,
22,
18,
14,
487,
702,
16,
14,
1448,
45,
504,
21,
968,
16,
3415,
15,
145,
28,
45,
636,
13,
5,
15793,
15,
240,
6,
15,
13,
5,
264,
15,
135,
15,
379,
6,
15,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to save picture to iPhone photo library?
===
What do I need to do to save an image my program has generated (possibly from the camera, possibly not) to the system photo library on the iPhone? | 0 | [
2,
184,
20,
2079,
2151,
20,
21024,
3056,
1248,
60,
800,
3726,
3726,
98,
107,
31,
376,
20,
107,
20,
2079,
40,
1961,
51,
625,
63,
6756,
13,
5,
21628,
37,
14,
3336,
15,
2879,
52,
6,
20,
14,
329,
3056,
1248,
27,
14,
21024,
60,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do I create a context menu for the tab header of a TabControlAdv
===
I'd like to have a context menu for my tab headers in a Syncfusion TabControlAdv control, and have a separate menu for the controls inside each tab. The likely menu entries will be "Add Tab", "Delete Tab" and "Clone Tab", and neither of them makes much sense to show when the user rightclicks in the middle of my control (which will have a data grid). Can someone share a link or code snippet showing how I can do this?
thanks | 0 | [
2,
184,
107,
31,
1600,
21,
4141,
11379,
26,
14,
6523,
157,
106,
16,
21,
6523,
12898,
1283,
710,
800,
3726,
3726,
31,
22,
43,
101,
20,
57,
21,
4141,
11379,
26,
51,
6523,
157,
445,
19,
21,
6063,
150,
9818,
6523,
12898,
1283,
710,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
IE 7 redirecting after jQuery ajax calls
===
I have the following code in my file to load a div with HTML from an AJAX call:
$('#searchButton').click( function() {
$('#inquiry').load('/search.php?pid=' + $('#searchValue').val());
});
This works fine in Firefox and Google Chrome, but whenever I do the search in IE I get redirected back to index.php. I grabbed the URL from Firebug and pasted that into IE and no redirection happens, I just get the output that should be returned.
I also tried changing it to a $.get() request and a full $.ajax() request but still the same redirection. | 0 | [
2,
13,
660,
453,
302,
14706,
68,
75,
487,
8190,
93,
20624,
3029,
800,
3726,
3726,
31,
57,
14,
249,
1797,
19,
51,
3893,
20,
6305,
21,
13,
12916,
29,
13,
15895,
37,
40,
20624,
645,
45,
5579,
5,
22,
5910,
25136,
811,
444,
22,
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... |
Iterators.. why use them?
===
In the STL library some containers have iterators and it is commonly held that they are a superior way of iterating through these containers rather than simple for loops e.g.
for ( int i=0; i < vecVector.size(); i++ )
{
..
}
Can anyone tell me why and in what cases I should use iterators and in what cases the code snippet above please? | 0 | [
2,
32,
106,
9922,
9,
9,
483,
275,
105,
60,
800,
3726,
3726,
19,
14,
354,
255,
1248,
109,
18988,
57,
32,
106,
9922,
17,
32,
25,
2524,
269,
30,
59,
50,
21,
4475,
161,
16,
32,
106,
1880,
120,
158,
18988,
864,
119,
1935,
26,
196... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I unzip the newest file in a directory in a BAT file?
===
I am working on a build system. The build system posts the results as a zip file in a directory. Unfortunately I have no easy way to know the name of the zip file, because it is timestamped. For the next operation, I must decompress this zip file to some specific location and then do some more file operations.
I guess I could change the build system so I specify the name of the result zip file from the command line, however, I though it might be easiest just to find out which one is the newest file and unzip it (if the previous process is successful).
How can I issue an unzip command that will only take effect on the newest zip file in the directory, ignoring all others? | 0 | [
2,
184,
92,
31,
367,
2553,
306,
14,
17175,
3893,
19,
21,
16755,
19,
21,
3570,
3893,
60,
800,
3726,
3726,
31,
589,
638,
27,
21,
1895,
329,
9,
14,
1895,
329,
9868,
14,
1736,
28,
21,
12133,
3893,
19,
21,
16755,
9,
6200,
31,
57,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Filter "list" of divs with Javascript
===
I have a repeater that outputs divs like the following for every item returned from some method.
<div class="editor-area">
<div class="title">the title</div>
<div>the description</div>
<div class="bottom-bar">
<a href="link">Modify</a>
<a href="link2">Delete</a>
</div>
</div>
I need to have a textbox on the page that allows the user to filter the list based on what's in the title field. I would like it to happen as the user types.
I could get this done without asking for help, but I want to do it right. I'm using ASP.Net 2.0 WebForms (unfortunately), and I can use jQuery if it would be useful for this (i have very little experience with it).
Any tips or samples would be appreciated.
If the filter operation takes a couple of seconds, how do you keep it from locking up the screen? What event should I do the filter on? Is there anything in jQuery that would make the javascript a little cleaner? | 0 | [
2,
11945,
13,
7,
5739,
7,
16,
13,
12916,
18,
29,
8247,
8741,
800,
3726,
3726,
31,
57,
21,
6830,
106,
30,
5196,
18,
13,
12916,
18,
101,
14,
249,
26,
352,
9101,
587,
37,
109,
2109,
9,
13,
1,
12916,
718,
3726,
7,
13401,
8,
1776... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Adding floats with gmp gives "correct" results, sort of ...
===
In the code below I use `mpf_add` to add the string representation of two floating values. What I don't understand at this point is why `2.2 + 3.2 = 5.39999999999999999999999999999999999999`. I would have thought that `gmp` was smart enough to give `5.4`.
What am I not comprehending about how gmp does floats?
(BTW, when I first wrote this I wasn't sure how to insert a decimal point, thus the plus/minus digit stuff at the end)
BSTR __stdcall FBIGSUM(BSTR p1, BSTR p2 ) {
USES_CONVERSION;
F(n1);
F(n2);
F(res);
LPSTR sNum1 = W2A( p1 );
LPSTR sNum2 = W2A( p2 );
mpf_set_str( n1, sNum1, 10 );
mpf_set_str( n2, sNum2, 10 );
mpf_add( res, n1, n2 );
char * buff = (char *) _alloca( 1024 );
char expBuffer[ 20 ];
mp_exp_t exp;
mpf_get_str(buff, &exp, 10, 0, res);
char * temp = ltoa( (long) exp, expBuffer, 10 );
if (exp >= 0) {
strcat(buff, "+" );
}
strcat(buff, expBuffer );
BSTR bResult = _com_util::ConvertStringToBSTR( buff );
return bResult;
}
| 0 | [
2,
4721,
11510,
18,
29,
489,
2554,
2352,
13,
7,
25345,
7,
1736,
15,
2058,
16,
13,
9,
9,
9,
800,
3726,
3726,
19,
14,
1797,
1021,
31,
275,
13,
1,
79,
7721,
1,
14854,
1,
20,
3547,
14,
3724,
5442,
16,
81,
8319,
4070,
9,
98,
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... |
flex (lexical analyzer) regular expressions - Reusing definitions
===
I have this working definition:
IDENTIFIER [a-zA-Z][a-zA-Z0-9]*
I don't want to keep repeating the [a-zA-Z] and [0-9], so I made two new definitions
DIGIT [0-9]
VALID [a-zA-Z]
How can I rewrite the IDENTIFIER rule to use the DIGIT and VALID definitions?
I don't know how to do the "second" match, I'm stuck here:
IDENTIFIER {VALID}[{VALID}{DIGIT}]* // This syntax is incorrect
Thanks. | 0 | [
2,
14409,
13,
5,
20718,
4272,
16051,
139,
6,
1290,
13832,
13,
8,
302,
12655,
18544,
800,
3726,
3726,
31,
57,
48,
638,
5465,
45,
25570,
636,
58,
8,
1153,
8,
380,
500,
2558,
58,
8,
1153,
8,
380,
387,
8,
518,
500,
2483,
31,
221,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 fast is a log4net logging method (Debug, Info, etc)?
===
I'm a big fan of [log4net][1], but recently, some (in my department) have questioned its inclusion in our projects because of the seemingly heaviness of each logging method. I would argue that there are better techniques than others, but that's another question.
I'm curious to know, what is the typical impact of a log4net DebugFormat-type call on your applications. I'm going to leave out variables like number of log statements per lines of code, etc, because I'm just looking for anything that you've seen in the real world.
And, I am aware of the simple technique of adding a guard clause to long evaluation statements eg:
if (log.IsDebug)
{
log.DebugFormat(...);
}
So, let's exclude that from consideration for now.
[1]: http://logging.apache.org/log4net | 0 | [
2,
184,
1512,
25,
21,
6738,
300,
2328,
13,
13919,
2109,
13,
5,
546,
16254,
15,
15404,
15,
2722,
6,
60,
800,
3726,
3726,
31,
22,
79,
21,
580,
2514,
16,
636,
5567,
300,
2328,
500,
2558,
165,
500,
15,
47,
1989,
15,
109,
13,
5,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Sanitizing Database Return Data
===
I am wondering what everyone thinks the best method of handling results from your own database is. Other teams may be involved and there is always the chance the procedure/data could be altered and erroneous results would occur. My question is this. Is it better to let and exception occur, catch and log it or try to handle all contingencies and hide the error? Say, something like below.
if (dr.Table.Columns.Contains("column") && !dr["column"].Equals(DBNull.Value))
{
this.value = (type)dr["column"];
}
else
{
this.value= null;
} | 0 | [
2,
523,
242,
3335,
6018,
788,
1054,
800,
3726,
3726,
31,
589,
5712,
98,
1266,
7973,
14,
246,
2109,
16,
7988,
1736,
37,
154,
258,
6018,
25,
9,
89,
952,
123,
44,
1013,
17,
80,
25,
550,
14,
1504,
14,
7004,
118,
18768,
110,
44,
87... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using a the same panel in multiple tabs
===
In the Ajax toolkit you can use a Tab Container and add TabPanels to this.
I have some controls that I want to be able to use across all tabs and the tailor the tabs with other controls as neccessary.
My question is how do I reuse a panel on multiple tabs?
Essentially I after something like this
<TabContainer>
<tabPanel1>
<contentTemplate>
<pnl1></pnl1>
//other controls here
</contentTemplate>
</tabPanel1>
<tabPanel2>
<contentTemplate>
<pnl1></pnl1>
//other controls here
</contentTemplate>
<tabPanel2>
</tabContainer>
<pnl1>
//some controls here
</pnl1> | 0 | [
2,
568,
21,
14,
205,
4113,
19,
1886,
6523,
18,
800,
3726,
3726,
19,
14,
20624,
5607,
13703,
42,
92,
275,
21,
6523,
12147,
17,
3547,
6523,
3206,
6798,
20,
48,
9,
31,
57,
109,
8671,
30,
31,
259,
20,
44,
777,
20,
275,
464,
65,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What are some good techniques for logging your applications?
===
Logging can get complicated, quickly. Considering that you have some code, how do you add logging to it? What library(ies) do you use?
What are some good code techniques for getting the most out of your logging statements while having minimal impact on your application? | 0 | [
2,
98,
50,
109,
254,
4212,
26,
13,
13919,
154,
3767,
60,
800,
3726,
3726,
13,
13919,
92,
164,
8343,
15,
976,
9,
5154,
30,
42,
57,
109,
1797,
15,
184,
107,
42,
3547,
13,
13919,
20,
32,
60,
98,
1248,
5,
1596,
6,
107,
42,
275,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 would you do when you are about to add some new features to a large (and dirty) codebase which has virtually *NO* unit-testing code?
===
[Martin Fowler][1] says that we should do refactoring before adding new features (given that the original program is not well-structured).
So we all want to refactor this *dirty* codebase, that's for sure. We also know that without unit-testing code it's very easy to introduce subtle bugs.
But it's a large codebase. Adding a complete suite of tests to it seems impracticable.
What would you do in this case?
[1]: http://www.amazon.com/Refactoring-Improving-Existing-Addison-Wesley-Technology/dp/0201485672/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1223392051&sr=8-1 | 0 | [
2,
98,
83,
42,
107,
76,
42,
50,
88,
20,
3547,
109,
78,
967,
20,
21,
370,
13,
5,
290,
6121,
6,
1797,
8436,
56,
63,
9149,
1637,
251,
2483,
1237,
8,
10543,
68,
1797,
60,
800,
3726,
3726,
636,
17067,
16973,
500,
2558,
165,
500,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 manage shared libraries?
===
Every time I make a project I develop several generic routines/modules/libraries that I expect I'll be using with other projects.
Due to the speed of development I don't spend a lot of time making these modules perfect - just good enough for this project, and well enough documented and isolatable that I can easily add them to another project.
So far so good.
Now when I use them in another project inevitably I improve them - either adding new features/functions, fixing bugs, making them more general, etc.
At that point I have several problems:
- I need to maintain the changes in the module for the code I'm working on
- I need to maintain those same changes in a central "module" repository
- I need to make sure that the updated modules are available for, but not automatically used in older projects, or sometimes even existing projects I'm already working on.
How do you manage this? How are these problems different when you have teams working on various modules in different projects?
-Adam | 0 | [
2,
184,
20,
4705,
2592,
8649,
60,
800,
3726,
3726,
352,
85,
31,
233,
21,
669,
31,
2803,
238,
12733,
8275,
18,
118,
19673,
160,
118,
1210,
2559,
2829,
30,
31,
4186,
31,
22,
211,
44,
568,
29,
89,
2314,
9,
397,
20,
14,
1362,
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 change envelope from adress using PHP mail?
===
I am using PHP with Apache on Linux, with sendmail. I use the PHP mail() function. The email is sent, but the envelope has the Apache_user@localhostname in MAIL FROM (example nobody@conniptin.internal) and some remote mailservers reject this because the domain doesn't exist (obviously). Using PHP mail(), can I force change the envelope MAIL FROM?
I can force it by spawning sendmail with "sendmail -t -odb -oi -frealname@realhost" and piping the email contents to it. Is this a better approach?
Is there a better, simpler, more PHP appropriate way of doing this? | 0 | [
2,
184,
20,
753,
9127,
37,
21,
19137,
18,
568,
13,
26120,
4216,
60,
800,
3726,
3726,
31,
589,
568,
13,
26120,
29,
17140,
27,
13024,
15,
29,
2660,
8079,
9,
31,
275,
14,
13,
26120,
4216,
5,
6,
1990,
9,
14,
8517,
25,
795,
15,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Adding a JAR to an Eclipse Java library
===
How do you add a JAR file to an already existing Java library in Eclipse?
That is, if you look at the Java Build Path for a Java project and click on the Libraries tab, you will see the list of libraries used by the project. If you expand a given library, you will see a list of JAR files included in that library. I want to add an additional JAR file to one of these libraries.
| 0 | [
2,
4721,
21,
5112,
20,
40,
11652,
8247,
1248,
800,
3726,
3726,
184,
107,
42,
3547,
21,
5112,
3893,
20,
40,
614,
3149,
8247,
1248,
19,
11652,
60,
30,
25,
15,
100,
42,
361,
35,
14,
8247,
1895,
2013,
26,
21,
8247,
669,
17,
10840,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
imaplib search with gmail?
===
In gmail, I have a bunch of labeled messages.
I'd like to use an IMAP client to get those messages, but I'm not sure what the search incantation is for that.
c = imaplib.IMAP4_SSL('imap.gmail.com')
c.list()
('OK', [..., '(\\HasNoChildren) "/" "GM"', ...])
c.search(???)
I'm not finding many examples for this sort of thing. | 0 | [
2,
31,
15022,
8326,
2122,
29,
489,
8079,
60,
800,
3726,
3726,
19,
489,
8079,
15,
31,
57,
21,
7653,
16,
14348,
7561,
9,
31,
22,
43,
101,
20,
275,
40,
31,
15022,
6819,
20,
164,
273,
7561,
15,
47,
31,
22,
79,
52,
562,
98,
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... |
Creating a compressed (or zipped) folder
===
Is there a way to programmatically create a compressed folder in Windows? I can't see a way to do this using the FileSystemObject (although there is the 'Compressed' attribute).
I've seen zip dll's but I'd prefer to avoid having to re-distribute a dll if possible. Windows XP natively supports compressed folders after all. | 0 | [
2,
2936,
21,
18472,
13,
5,
248,
28693,
6,
19294,
800,
3726,
3726,
25,
80,
21,
161,
20,
625,
6732,
1326,
1600,
21,
18472,
19294,
19,
1936,
60,
31,
92,
22,
38,
196,
21,
161,
20,
107,
48,
568,
14,
3893,
10724,
23793,
13,
5,
8655,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
UTM and MGRS to Latitude/Longitude conversion source-code?
===
What open-source / public domain software is there "out there" for conversion between Latitude/Longitude, UTM (Universal Transform Mercator) and MGRS (Military Grid Reference System)? We're using a VB6 library at the moment and would prefer to use something in another language and with a longer pedigree. | 0 | [
2,
13,
1982,
79,
17,
11791,
1224,
20,
16337,
118,
2701,
16731,
6263,
1267,
8,
9375,
60,
800,
3726,
3726,
98,
368,
8,
12097,
13,
118,
317,
4603,
2306,
25,
80,
13,
7,
1320,
80,
7,
26,
6263,
128,
16337,
118,
2701,
16731,
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... |
Font size for programming?
===
After reading [this][1] question I installed Consolas. The trouble is, now the text seems too small. I have to adjust it to size 12 to use it comfortably. Anyone else experience this when switching to Consolas (or any other font)? Do my eyes just have to adjust to this new font or is it a sign that my eyesight is deteriorating?
[1]: http://stackoverflow.com/questions/4689/recommended-fonts-for-programming | 0 | [
2,
9978,
1072,
26,
3143,
60,
800,
3726,
3726,
75,
1876,
636,
1565,
500,
2558,
165,
500,
1301,
31,
4066,
11608,
2268,
18,
9,
14,
2572,
25,
15,
130,
14,
1854,
2206,
266,
284,
9,
31,
57,
20,
14328,
32,
20,
1072,
390,
20,
275,
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... |
Is there any good or reliable way to figure out where a JavaScript error is using only an Internet Explorer error message?
===
I'm writing an app which for various reasons involves Internet Explorer (IE7, for the record), ActiveX controls, and a heroic amount of JavaScript, which is spread across multiple .js includes.
One of our remote testers is experiencing an error message and IE's error message says something to the effect of:
Line: 719
Char: 5
Error: Unspecified Error
Code: 0
URL: (the URL of the machine)
There's only one JavaScript file which has over 719 lines and line 719 is a blank line (in this case).
None of the HTML or other files involved in the project have 719 or more lines, but the resulting HTML (it's sort of a server-side-include thing), at least as IE shows from "View Source" does have 719 or more lines - but line 719 (in this case) is a closing table row tag (no JavaScript, in other words).
The results of "View Generated Source" is only 310 lines in this case.
I would imagine that it could possibly be that the entire page, with the contents of the JavaScript files represented inline with the rest of the HTML could be where the error is referring to but I don't know any good way to view what that would be,
So, given a JavaScript error from Internet Explorer **where the line number is the only hint** but the page is actually spread across multiple files? | 0 | [
2,
25,
80,
186,
254,
54,
11398,
161,
20,
1465,
70,
113,
21,
8247,
8741,
7019,
25,
568,
104,
40,
2620,
8520,
7019,
2802,
60,
800,
3726,
3726,
31,
22,
79,
1174,
40,
4865,
56,
26,
617,
2932,
6569,
2620,
8520,
13,
5,
660,
465,
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 store key-value pairs in application settings at runtime?
===
How can dynamic Key-value pairs of objects be stored in app.config in using the application settings api, at runtime?
I've been trying to get my head around, and I can't find any meaningful example or documentation.
I seems that .Net dictionary classes can't be serialized in XML to store them in app.config
Is the only way to do it by using custom XML serialized classes, or are there any other ways?
| 0 | [
2,
184,
20,
1718,
1246,
8,
15165,
7473,
19,
3010,
12410,
35,
485,
891,
60,
800,
3726,
3726,
184,
92,
7782,
1246,
8,
15165,
7473,
16,
3916,
44,
8214,
19,
4865,
9,
14093,
2816,
19,
568,
14,
3010,
12410,
21,
2159,
15,
35,
485,
891,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Has using the HttpRuntime.Cache changed in ASP.NET MVC?
===
So, I was looking over my standard cache utility when preparing to unit test a controller and thought, hey, is accessing the HttpRuntime.Cache directly considered harmful in MVC?
I wrap the cache in a proxy class that implements a cache-like interface (tho much simpler) so that I can mock it during tests. But I'm wondering if that's already done for me in the new framework. I can't find anything, however.
Here's an idea of how I do it:
public ActionResult DoStuffLol(guid id)
{
var model = CacheUtil.GetOrCreateAndStore(
"DoStuffLolModel",
() =>
{
/* construct model here; time consuming stuff */
return model;
});
return View("DoStuffLol", model);
}
So, has the old patterns of accessing the cache changed? Are there any better patterns for caching action results in MVC?
| 0 | [
2,
63,
568,
14,
7775,
3169,
891,
9,
793,
2569,
1015,
19,
28,
306,
9,
2328,
307,
8990,
60,
800,
3726,
3726,
86,
15,
31,
23,
699,
84,
51,
1236,
16522,
10082,
76,
7575,
20,
1237,
1289,
21,
9919,
17,
289,
15,
8409,
15,
25,
1381,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Multiple Indexes vs Multi-Column Indexes
===
I've just been adding an Index to a table in SQL Server 2005 and it got me thinking. What is the difference between creating 1 index and defining multiple columns over having 1 index per column you want to index.
Are there certain reasons why one should be used over the other?
For example
Create NonClustered Index IX_IndexName On TableName
(Column1 Asc, Column2 Asc, Column3 Asc)
Versus
Create NonClustered Index IX_IndexName1 On TableName
(Column1 Asc)
Create NonClustered Index IX_IndexName2 On TableName
(Column2 Asc)
Create NonClustered Index IX_IndexName3 On TableName
(Column3 Asc) | 0 | [
2,
1886,
4348,
160,
4611,
1889,
8,
716,
4404,
103,
4348,
160,
800,
3726,
3726,
31,
22,
195,
114,
74,
4721,
40,
4348,
20,
21,
859,
19,
4444,
255,
8128,
812,
17,
32,
330,
55,
1440,
9,
98,
25,
14,
2841,
128,
2936,
137,
4348,
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... |
Where does the Toolbar Metadata live in Visual Studio on the Filesystem
===
My IDE crashes any time I try add a new component to the toolbar. I've already tried Resetting the toolbar.
Where does the the information about the toolbar exist on the filesystem to see what may be the offending control? | 0 | [
2,
113,
630,
14,
5607,
1850,
28057,
515,
19,
3458,
1120,
27,
14,
3893,
10724,
800,
3726,
3726,
51,
13,
3448,
21563,
186,
85,
31,
1131,
3547,
21,
78,
5912,
20,
14,
5607,
1850,
9,
31,
22,
195,
614,
794,
302,
19831,
14,
5607,
1850,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Buildprocess for ActiveX / COM / VB6 enterprise projects
===
We have developed a software system using ActiveX/COM (VB6) technology from microsoft. In the last year, i get more and more interested in automated build processes and SCM at a whole. I intensively searched big parts of the web for information about best practices how to do scm with COM based software systems.
The "problem" with COM is, that a referencing component holds the reference by an unique interface id. When you recompile the referenced component, the id may change and the reference isn't valid any more. The main problem here is, that the iid is compiled into the binary. So when i don't want to check in the compiled files into version control, every developer has to compile his/her own versions and gets other ids.
When i want to check out the source on a clean build machine to compile the system, its just impossible, because all the references are invalid (no binary files, no interface ids).
Im just wondering, if there are some best practices floating around, how to set up an automated build sytem for COM projects (VB6)?
| 0 | [
2,
1895,
16835,
26,
1348,
396,
13,
118,
13,
960,
13,
118,
13,
20468,
379,
6002,
2314,
800,
3726,
3726,
95,
57,
885,
21,
2306,
329,
568,
1348,
396,
118,
960,
13,
5,
20468,
379,
6,
1099,
37,
7099,
9,
19,
14,
236,
159,
15,
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... |
Getting a System.Type from a type name
===
I want to get a System.Type given only the type name in a string.
For instance, if I have an object:<br>
MyClass abc = new MyClass();<br><br>
I can then say:<br>
System.Type type = abc.GetType();<br><br>
But what if all I have is:<br>
string className = "MyClass"; | 0 | [
2,
1017,
21,
329,
9,
4474,
37,
21,
1001,
204,
800,
3726,
3726,
31,
259,
20,
164,
21,
329,
9,
4474,
504,
104,
14,
1001,
204,
19,
21,
3724,
9,
26,
4851,
15,
100,
31,
57,
40,
3095,
45,
1,
5145,
1,
51,
1898,
5079,
800,
78,
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... |
Why shouldn't you use references to smart pointers?
===
I recall reading somewhere that using references to smart pointers can cause memory corruption. Is this simply because of using the reference of the smart pointer after its been destroyed? Or does the reference counting get messed up?
Thanks for clarifying | 0 | [
2,
483,
5714,
22,
38,
42,
275,
7231,
20,
3978,
454,
445,
60,
800,
3726,
3726,
31,
7111,
1876,
3493,
30,
568,
7231,
20,
3978,
454,
445,
92,
1679,
1912,
7858,
9,
25,
48,
1659,
185,
16,
568,
14,
2801,
16,
14,
3978,
454,
106,
75,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Need a way to authenticate to Exchange Web Services
===
I'm using Exchange Web Services to Find, Create, Update, and Delete appointments from the calendars for one or more people. The application would be used by a manager to view employees' vacation time, as well as assign appointments based on availability.
In order for this to all work, an authenticated user's credentials must be sent to the web service. So far, the two methods that I have found that would allow for this are 1) passing in the username and password of each user and 2) impersonating a user to use DefaultCredentials. The DefaultCredentials option doesn't work for us because we do not allow impersonating users.
Does anyone know another way? | 0 | [
2,
376,
21,
161,
20,
14351,
1373,
20,
1950,
2741,
687,
800,
3726,
3726,
31,
22,
79,
568,
1950,
2741,
687,
20,
477,
15,
1600,
15,
11100,
15,
17,
27448,
17368,
37,
14,
7036,
18,
26,
53,
54,
91,
148,
9,
14,
3010,
83,
44,
147,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Graceful handling of dependent scheduled tasks?
===
Say I've got two scheduled processes: A and B.
Given that B should not run until A has completed, how might I gracefully enforce this dependency?
Approaches that have been considered:
1. Have A schedule B upon completion. This has the downside of B never being scheduled if for some reason A failed.
2. When B runs, have it ping A to see if the latter has completed. How this might be accomplished (network, file, database record, message queue) could be messy and problematic introducing a third dependency.
3. Combine A and B into a single process. This has the downside of tightly binding the two, making it harder to re-run one or the other in isolation if need be.
Thoughts? | 0 | [
2,
22609,
7988,
16,
9063,
3758,
8674,
60,
800,
3726,
3726,
395,
31,
22,
195,
330,
81,
3758,
5102,
45,
21,
17,
334,
9,
504,
30,
334,
378,
52,
485,
163,
21,
63,
1066,
15,
184,
530,
31,
28138,
16525,
48,
26835,
60,
7501,
30,
57,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to prevent Windows XP from stealing my input Ctrl-Space which is meant to for Emacs
===
I am learning and using Emacs. What I found annoying is that Ctrl-Space input will be stolen by Windows XP to switch the language bar instead of setting the mark in Emacs. Is there a way to temporarily prevent XP from stealing it? Thank you very much. | 0 | [
2,
184,
20,
2501,
1936,
23045,
37,
12222,
51,
6367,
13,
4812,
6362,
8,
5582,
56,
25,
1380,
20,
26,
13,
62,
6893,
18,
800,
3726,
3726,
31,
589,
2477,
17,
568,
13,
62,
6893,
18,
9,
98,
31,
216,
17610,
25,
30,
13,
4812,
6362,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I edit an incorrect commit message in git
===
I stupidly did a git commit while half asleep, and wrote totally the wrong thing in the commit message, How do I change the commit message? I have not yet pushed the commit to anyone | 0 | [
2,
184,
107,
31,
9392,
40,
18867,
9686,
2802,
19,
13,
10404,
800,
3726,
3726,
31,
3553,
102,
144,
21,
13,
10404,
9686,
133,
519,
5718,
15,
17,
738,
5139,
14,
1389,
584,
19,
14,
9686,
2802,
15,
184,
107,
31,
753,
14,
9686,
2802,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Reading compound documents in c#
===
I'm starting a project which requires reading outlook msg files in c#. I have the specs for compound documents but am having trouble reading them in c#. Any pointers would be greatly appreciated.
Thanks. | 0 | [
2,
1876,
6089,
4374,
19,
272,
5910,
800,
3726,
3726,
31,
22,
79,
1422,
21,
669,
56,
4781,
1876,
19837,
4235,
263,
6488,
19,
272,
5910,
9,
31,
57,
14,
12737,
18,
26,
6089,
4374,
47,
589,
452,
2572,
1876,
105,
19,
272,
5910,
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,
0,
0,
0,
0,
0,
0,
0,
0... |
How do I find out when the Spring.NET context has loaded?
===
I have a web service running, and it uses Spring.NET for it's IoCness. One of the classes needs to do some stuff when it loads (I'm using <code>AfterPropertiesSet</code>) and "some stuff" involves a call to <code>ContextRegistry.GetContext()</code>. The problem is that:
if (rootContextCurrentlyInCreation)
{
throw new InvalidOperationException("root context is currently in creation. You must not call ContextRegistry.GetContext() from e.g. constructors of your singleton objects");
}
How can I have that object register itself to be notified once the context is fully created?
| 0 | [
2,
184,
107,
31,
477,
70,
76,
14,
1573,
9,
2328,
4141,
63,
8572,
60,
800,
3726,
3726,
31,
57,
21,
2741,
365,
946,
15,
17,
32,
2027,
1573,
9,
2328,
26,
32,
22,
18,
31,
2499,
720,
9,
53,
16,
14,
2684,
2274,
20,
107,
109,
321... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 make IEditableObject.EndEdit atomic?
===
If I have an Address class that implements ***IEditableObject***, I might have ***EndEdit*** implementation like this:
public void EndEdit()
{
// BeginEdit would have set _editInProgress and save to *Editing fields
if (_editInProgress)
{
_line1 = _line1Editing;
_line2 = _line2Editing;
_city = _cityEditing;
_state = _stateEditing;
_postalCode = _postalCodeEditing;
_editInProgress = false;
}
}
If there is an exception on ***_city***, then ***_line1***, ***_line2***, and possibly ***_city*** should revert.
This problem isn't limited to ***EndEdit*** but probably found in other places as well. | 0 | [
2,
184,
107,
31,
233,
31,
69,
242,
579,
23793,
9,
10726,
242,
9692,
60,
800,
3726,
3726,
100,
31,
57,
40,
3218,
718,
30,
8713,
18,
8980,
660,
1115,
5924,
23793,
2483,
1409,
15,
31,
530,
57,
8980,
10726,
242,
2483,
1409,
6123,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is a DVCS useful for one developer?
===
Or would a conventional client-server VCS be more appropriate? I'm currently using TortoiseSVN, but I'm interested in a DVCS, but I'm not sure if it's even a good idea to try to use something like that solo. | 0 | [
2,
25,
21,
13,
43,
8990,
18,
4811,
26,
53,
10058,
60,
800,
3726,
3726,
54,
83,
21,
6533,
6819,
8,
10321,
106,
13,
8990,
18,
44,
91,
4593,
60,
31,
22,
79,
871,
568,
25691,
18,
16578,
15,
47,
31,
22,
79,
3158,
19,
21,
13,
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... |
Hashtable implementation for Delphi 5
===
Do you know a good and free Hashtable imlementation for Delphi 5 ?
I need to organize a huge amount of data in a hastable and I am bit worried about memory leak issues that I found in most available implementations on the web.
Tks | 0 | [
2,
19170,
5924,
6123,
26,
23030,
331,
800,
3726,
3726,
107,
42,
143,
21,
254,
17,
551,
19170,
5924,
797,
413,
1130,
857,
26,
23030,
331,
13,
60,
31,
376,
20,
9213,
21,
2329,
2006,
16,
1054,
19,
21,
63,
5924,
17,
31,
589,
1142,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Append XML string block to existing XmlDocument
===
I have an XmlDocument that already exists and is read from a file.
I would like to add a chunk of Xml to a node in the document. Is there a good way to create and add all the nodes without cluttering my code with many .CreateNote and .AppendChild calls?
I would like some way of making a string or stringBuilder of a valid Xml section and just appending that to an XmlNode.
ex:
Original XmlDoc:
<MyXml>
<Employee>
</Employee>
</MyXml>
and, I would like to add a Demographic (with several children) tag to Employee:
<MyXml>
<Employee>
<Demographic>
<Age/>
<DOB/>
</Demographic>
</Employee>
</MyXml> | 0 | [
2,
4865,
2451,
23504,
3724,
1921,
20,
3149,
23504,
28132,
800,
3726,
3726,
31,
57,
40,
23504,
28132,
30,
614,
5636,
17,
25,
1302,
37,
21,
3893,
9,
31,
83,
101,
20,
3547,
21,
15009,
16,
23504,
20,
21,
15421,
19,
14,
4492,
9,
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... |
Create SQL Table from Excel spreadsheet
===
Is there an easy way to create a table in SQL Server (2005) from an Excel spreadsheet. I'm thinking maybe some tool?
Thanks in advance. | 0 | [
2,
1600,
4444,
255,
859,
37,
20700,
1789,
17627,
800,
3726,
3726,
25,
80,
40,
2010,
161,
20,
1600,
21,
859,
19,
4444,
255,
8128,
13,
5,
2835,
6,
37,
40,
20700,
1789,
17627,
9,
31,
22,
79,
1440,
913,
109,
5607,
60,
3669,
19,
36... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 can be in conflict mysql with the standard c++ library
===
The problem is that the compiler sais that there is a redefinition of a funciton between a library that belongs to mysql and math.h from the std library
I have been over this for two days and I still can't figure it out. Does this ever happened to someone??
This is the output from the compiler
----------
C:\mingw\bin\mingw32-make.exe all
'Building file: ../src/interfaz/ventanaconf.cpp'
'Invoking: GCC C++ Compiler'
C:\mingw\bin\mingw32-g++.exe -mms-bitfields -I"c:\dev-cpp\gtkmm\include\gtkmm-2.4" -I"c:\dev-cpp\gtkmm\lib\gtkmm-2.4\include" -I"c:\dev-cpp\gtkmm\include\glibmm-2.4" -I"c:\dev-cpp\gtkmm\lib\glibmm-2.4\include" -I"c:\dev-cpp\gtkmm\include\gdkmm-2.4" -I"c:\dev-cpp\gtkmm\lib\gdkmm-2.4\include" -I"c:\dev-cpp\gtkmm\include\pangomm-1.4" -I"c:\dev-cpp\gtkmm\include\atkmm-1.6" -I"c:\dev-cpp\gtkmm\include\sigc++-2.0" -I"c:\dev-cpp\gtkmm\lib\sigc++-2.0\include" -I"c:\dev-cpp\gtkmm\include\cairomm-1.0" -I"c:\gtk\include\gtk-2.0" -I"c:\gtk\include\glib-2.0" -I"c:\gtk\lib\glib-2.0\include" -I"c:\gtk\lib\gtk-2.0\include" -I"c:\gtk\include\pango-1.0" -I"c:\gtk\include\cairo" -I"c:\gtk\include\freetype2" -I"c:\gtk\include" -I"c:\gtk\include\atk-1.0" -I"c:\Archivos de programa\MySQL\MySQL Server 5.0\include" -O0 -g3 -w -c -fmessage-length=0 -MMD -MP -MF"src/interfaz/ventanaconf.d" -MT"src/interfaz/ventanaconf.d" -o"src/interfaz/ventanaconf.o" "../src/interfaz/ventanaconf.cpp"
In file included from c:/Archivos de programa/MySQL/MySQL Server 5.0/include/my_global.h:73,
from ../src/interfaz/../gestiondb/gestordb.h:6,
from ../src/interfaz/../gestiondb/operacionesdb.h:5,
from ../src/interfaz/ventanamodulos.h:20,
from ../src/interfaz/ventanaconf.h:27,
from ../src/interfaz/ventanaconf.cpp:1:
c:/Archivos de programa/MySQL/MySQL Server 5.0/include/config-win.h: **In function `double rint(double)':
c:/Archivos de programa/MySQL/MySQL Server 5.0/include/config-win.h:228: error: redefinition of `double rint(double)'
C:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/math.h:620: **error: `double rint(double)' previously defined here**
C:\mingw\bin\mingw32-make.exe: *** [src/interfaz/ventanaconf.o] Error 1**
----------
Thanks in advance!!!
| 0 | [
2,
184,
92,
44,
19,
2930,
51,
18,
22402,
29,
14,
1236,
272,
20512,
1248,
800,
3726,
3726,
14,
1448,
25,
30,
14,
21486,
8417,
18,
30,
80,
25,
21,
302,
28643,
16,
21,
2414,
1892,
444,
128,
21,
1248,
30,
7034,
20,
51,
18,
22402,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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++ #include semantics
===
This is a multiple question for the same pre-processing instruction.
##1 - <> or "" ?
Appart from the info found in the MSDN:
<http://msdn.microsoft.com/en-us/library/36k2cdd4(VS.80).aspx>
1.a: What are the differences between the two notations?<br>
1.b: Do all compilers implement them the same way?<br>
1.c: When would you use the <>, and when would you use the "" (i.e. what are the criteria you would use to use one or the other for a header include)?<br>
##2 - #include "TheProject/TheHeader.hpp" or "TheHeader.hpp" ?
I've seen at least two ways of writing includes of one's project headers.
Considering that you have at least 4 types of headers, that is:
* private headers of your project?
* headers of your project, but which are exporting symbols (and thus, "public")
* headers of another project you module links with
* headers of a compiler or standard library
For each kind of headers:
2.a: Would you use <> or "" ?<br>
2.b: Would you include with TheProject/TheHeader.hpp, or with TheHeader.hpp only?<br>
| 0 | [
2,
272,
20512,
6926,
22640,
17220,
18,
800,
3726,
3726,
48,
25,
21,
1886,
1301,
26,
14,
205,
782,
8,
16835,
68,
7304,
9,
6926,
5910,
165,
13,
8,
279,
255,
38,
73,
1569,
263,
38,
73,
54,
13,
7,
7,
13,
60,
4865,
2900,
37,
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... |
Best Cryptography Algorithm?
===
Out of curiosity, what is "the best cryptography algorithm" for you as a programmer, given both security and ease of implementation? | 0 | [
2,
246,
16277,
15438,
9083,
60,
800,
3726,
3726,
70,
16,
11581,
15,
98,
25,
13,
7,
124,
246,
16277,
15438,
9083,
7,
26,
42,
28,
21,
17968,
15,
504,
156,
1221,
17,
6378,
16,
6123,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do you inherit StringBuilder in vb.net?
===
I want to add my own member to the StringBuilder class, but when I go to create it IntelliSense doesn't bring it up.
public class myStringBuilder()
Inherits System.Text.[StringBuilder should be here]
....
end class
Is it even possible? thanks | 0 | [
2,
184,
107,
42,
17569,
3724,
20904,
19,
13,
20468,
9,
2328,
60,
800,
3726,
3726,
31,
259,
20,
3547,
51,
258,
322,
20,
14,
3724,
20904,
718,
15,
47,
76,
31,
162,
20,
1600,
32,
14635,
3159,
6498,
1437,
22,
38,
1499,
32,
71,
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... |
Reloading configuration without restarting application using ConfigurationManager.RefreshSection
===
Has anyone got this working in a web application?
No matter what I do it seems that my appSettings section (redirected from web.config using appSettings file=".\Site\site.config") does not get reloaded.
Am I doomed to the case of having to just restart the application? I was hoping this method would lead me to a more performant solution. | 0 | [
2,
27339,
68,
8091,
366,
22767,
68,
3010,
568,
8091,
22256,
9,
99,
22373,
10579,
800,
3726,
3726,
63,
1276,
330,
48,
638,
19,
21,
2741,
3010,
60,
90,
1161,
98,
31,
107,
32,
2206,
30,
51,
4865,
19831,
18,
1050,
13,
5,
99,
14147,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 make IEditableObject.EndEdit atomic?
===
If I have an Address object which implements IEditableObject, I might have EndEdit implementation like this:
public void EndEdit()
{
// BeginEdit would set _editInProgress and update *Editing fields;
if (_editInProgress)
{
_line1 = _line1Editing;
_line2 = _line2Editing;
_city = _cityEditing;
_state = _stateEditing;
_postalCode = _postalCodeEditing;
_editInProgress = false;
}
}
If there is an exception updating ***_state***, for example, then all 5 properties should reset. This atomic update issue probably isn't limited to EndEdit.
| 0 | [
2,
184,
107,
31,
233,
31,
69,
242,
579,
23793,
9,
10726,
242,
9692,
60,
800,
3726,
3726,
100,
31,
57,
40,
3218,
3095,
56,
8713,
18,
31,
69,
242,
579,
23793,
15,
31,
530,
57,
1272,
242,
6123,
101,
48,
45,
317,
11364,
1272,
242,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Hibernate try to delete when I try to update/insert? WTF?
===
HELP!
Here's the deal. in my app I have these Hibernate-mapped types (in general, I'm not gonna paste my entire code here):
class RoleRule {
private Role role;
private PermissionAwareEntity entity; // hibernate-mapped entity for which permission is granted
private PermissionType permissionType; // enum
@ManyToOne
@JoinColumn(name = "ROLE_ID")
public Role getRole() {
return role;
}
public void setRole(Role role) {
this.role = role;
}
}
class Role {
private Set<RoleRule> rules = new HashSet<RoleRule>(0);
@OneToMany(cascade=CascadeType.ALL)
@JoinColumn(name="ROLE_ID")
public Set<RoleRule> getRules() {
return rules;
}
public void setRules(Set<RoleRule> rules) {
this.rules = rules;
}
}
All classes have <code>equals() & hashCode()</code> overrides.
My application allows tweaking of roles (by sysadmins only, don't worry), and among other fields, allows creation of new role rules. When a new rule is created I try to create a new <code>RoleRule</code> object and insert it into the role's field <code>rules</code>. I call <code>session.update(role)</code> to apply the changes to the database.
Now comes the ugly part... Hibernate decides to do the following when closing the transaction and flushing:
1. Insert the new rule into the database. Excellent.
2. Update the other role fields (not collections). So far so good.
3. Update the existing rules, even if nothing has changed in them. I can live with this.
4. Update the existing rules *again*. Here's a paste from the log, including the automatic comment:<br>
<pre>/* delete one-to-many row Role.rules */
update ROLE_RULE set ROLE_ID=null where ROLE_ID=? and ROLE_RULE_ID=?</pre>
Of course, all fields are not-null, and this operation fails spectacularly.
Can anyone try to explain why Hibernate would do this??? And even more important, how the frak do I get around this???
Yuval =8-o | 0 | [
2,
483,
630,
4148,
2102,
8820,
1131,
20,
27448,
76,
31,
1131,
20,
11100,
118,
108,
18,
6767,
60,
619,
11720,
60,
800,
3726,
3726,
448,
187,
235,
22,
18,
14,
1183,
9,
19,
51,
4865,
31,
57,
158,
4148,
2102,
8820,
8,
79,
16664,
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... |
IE8 loses cookies when opening a new window after a redirect
===
I'm using Internet Explorer 8 beta 2.
1. Client performs POST on http://alpha/foo
1. Server responds with redirect to http://beta/bar
1. Client performs GET on http://beta/bar
1. Server responds with redirect to http://beta/baz and sets cookie
1. Client performs GET on http://beta/baz _including cookie_
1. Server provides response
1. User selects "Open in new window" on a link in the page
1. Client performs GET on http://beta/link, _without cookie!_
If in step 7 the user just clicks the link, the cookie _is_ passed correctly. If there is no redirect, the cookie is passed correctly even if the user selects "Open in new window".
Is there a way to convince IE8 to pass the cookie in step 8?
| 0 | [
2,
13,
660,
457,
14745,
19396,
76,
1214,
21,
78,
1463,
75,
21,
302,
14706,
800,
3726,
3726,
31,
22,
79,
568,
2620,
8520,
469,
8434,
172,
9,
137,
9,
6819,
11563,
678,
27,
7775,
6903,
22480,
118,
4120,
111,
137,
9,
8128,
4590,
18,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the optimum limit for URL length? 100, 200+
===
I have an ASP.Net 3.5 platform and windows 2003 server with all the updates. | 0 | [
2,
98,
25,
14,
29546,
4496,
26,
287,
6362,
1476,
60,
808,
15,
2327,
2430,
800,
3726,
3726,
31,
57,
40,
28,
306,
9,
2328,
203,
9,
264,
2452,
17,
1936,
973,
8128,
29,
65,
14,
16779,
9,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
What is the best way to change text contained in an XML file using Python?
===
Let's say I have an existing trivial XML file named 'MyData.xml' that contains the following:
<?xml version="1.0" encoding="utf-8" ?>
<myElement>foo</myElement>
I want to change the text value of 'foo' to 'bar' resulting in the following:
<?xml version="1.0" encoding="utf-8" ?>
<myElement>bar</myElement>
Once I am done, I want to save the changes.
What is the easiest and simplest way to accomplish all this? | 0 | [
2,
98,
25,
14,
246,
161,
20,
753,
1854,
3437,
19,
40,
23504,
3893,
568,
20059,
60,
800,
3726,
3726,
408,
22,
18,
395,
31,
57,
40,
3149,
13,
19712,
23504,
3893,
377,
13,
22,
915,
18768,
9,
396,
8184,
22,
30,
1588,
14,
249,
45,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
HTML Frameset alignment
===
Say I have 3 frames in a frameset arranged in 3 rows. Frames 1 and 3 are from my site and frame 2 (the central one) is from an external website. Is there a cunning way to force the browser to centre align the data in frame 2?
I've found a small work-around which uses a frameset within a frameset which has 2 blank columns either side of the data but that means the scrollbars from frames 2 and 3 are out of alignment.
Any ideas?
| 0 | [
2,
13,
15895,
3523,
3554,
12448,
800,
3726,
3726,
395,
31,
57,
203,
12809,
19,
21,
3523,
3554,
4300,
19,
203,
11295,
9,
12809,
137,
17,
203,
50,
37,
51,
689,
17,
3523,
172,
13,
5,
124,
521,
53,
6,
25,
37,
40,
4886,
2271,
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... |
Opening named pipes in non-blocking mode in bash
===
I'm looking to call a subprocess with a file descriptor opened to a given pipe <I>in non-blocking mode</I>; otherwise, the open() call hangs waiting for the other side of the pipe to receive a connection.
To demonstrate:
$ mkfifo /tmp/foobar.pipe
$ some_program --command-fd=5 5</tmp/foobar.pipe
In this example, I want to open `/tmp/foobar.pipe` non-blocking (with `O_NONBLOCK` set). If this is done, `some_program` should be immediately executed. (In blocking mode, calling `open()` on a named pipe will block until the other side is available, deferring the execution of `some_program` until the pipeline is set up).
Mechanisms to do this by exec'ing through an alternate scripting language (python, perl, etc) or a C wrapper are obvious; I'm looking for a pure-bash solution, should one be possible. | 0 | [
2,
1214,
377,
14104,
19,
538,
8,
12048,
68,
3740,
19,
13158,
800,
3726,
3726,
31,
22,
79,
699,
20,
645,
21,
972,
16835,
29,
21,
3893,
121,
8741,
248,
520,
20,
21,
504,
7642,
13,
1,
49,
1,
108,
538,
8,
12048,
68,
3740,
1,
118... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Should I Learn NHaml?
===
Should I learn NHaml?
What does it provide me over a classic ASP.NET MVC view? What are the pros and cons?
Are you using it via the [MVC Contrib][1] project?
I have been seeing more and more about it. For example... I saw a blog post by [Matthew Podwysocki][2] using ASP.NET MVC, NHaml, and F#!
[1]: http://www.codeplex.com/MVCContrib/Wiki/View.aspx?title=NHaml&referringTitle=Documentation
[2]: http://codebetter.com/blogs/matthew.podwysocki/archive/2008/10/06/asp-net-mvc-with-nhaml-f-edition.aspx | 0 | [
2,
378,
31,
2484,
13,
16278,
255,
60,
800,
3726,
3726,
378,
31,
2484,
13,
16278,
255,
60,
98,
630,
32,
1181,
55,
84,
21,
2732,
28,
306,
9,
2328,
307,
8990,
1418,
60,
98,
50,
14,
895,
18,
17,
11608,
60,
50,
42,
568,
32,
1197,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 indicate a validation requirement to users of my class?
===
I'm implementing a class that wraps around an xml document with a very strictly defined schema. I don't control the schema.
One of the properties in the class is for an element value that the schema indicates must match a certain regular expression. In the setter for the property, if a string doesn't match the expression I'm throwing an exception.
My question is, how can I better communicate to users of my class the requirements for this field? Is there an attribute I can use? Xml comments (so it shows up in intellisense)? Should I do something other than thrown an exception? What other options do I have? | 0 | [
2,
184,
107,
31,
4342,
21,
27999,
8981,
20,
3878,
16,
51,
718,
60,
800,
3726,
3726,
31,
22,
79,
17333,
21,
718,
30,
8118,
18,
140,
40,
23504,
4492,
29,
21,
253,
10369,
2811,
23874,
9,
31,
221,
22,
38,
569,
14,
23874,
9,
53,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 shell text editors work?
===
I'm fairly new at programming, but I've wondered how shell text editors such as vim, emacs, nano, etc are able to control the command-line window. I'm primarily a Windows programmer, so maybe it's different on *nix. As far as I know, it's only possible to print text to a console, and ask for input. How do text editors create a navigable, editable window in a command line environment? | 0 | [
2,
184,
107,
3593,
1854,
12149,
170,
60,
800,
3726,
3726,
31,
22,
79,
6647,
78,
35,
3143,
15,
47,
31,
22,
195,
3519,
184,
3593,
1854,
12149,
145,
28,
1790,
79,
15,
13,
62,
6893,
18,
15,
10371,
15,
2722,
50,
777,
20,
569,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is O/R Mapping worth it?
===
The expressiveness of the query languages (QL) provided with ORMs can be very powerful. Unfortunately, once you have a fleet of complex queries, and then some puzzling schema or data problem arises, it is very difficult to enlist the DBA help that you need? Here they are, part of the team that is evolving the database, yet they can't read the application QL, much less suggest modifications. I generally end up grabbing generated SQL out of the log for them. But when they do recommend changes to it, how does that relate to the original QL? The process is not round-trip.
So after a decade of promoting the value of the ORM, I am now wondering if I should be writing my SQL manually. And all that I really want to framework to do is automate the data marshaling as much as possible.
Have you found a way to deal with the round-trip issue in your organization? Is there a SQL-marshaling framework that scales well, and maintains easily?
(Yes, I know that pure SQL might bind me to the database vendor. But it *is* possible to write standards-compliant SQL.) | 0 | [
2,
25,
635,
118,
139,
13305,
2715,
32,
60,
800,
3726,
3726,
14,
25093,
720,
16,
14,
25597,
2556,
13,
5,
22402,
6,
1173,
29,
54,
79,
18,
92,
44,
253,
2177,
9,
6200,
15,
382,
42,
57,
21,
2241,
16,
1502,
9386,
2829,
15,
17,
94,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 language or RAD IDE do you recommend for building shareware?
===
I'm looking for an IDE for developing commercial desktop applications to be sold over the internet, as a mISV. Windows is a must, while Mac is a nice to have. An important factor is that the technology allows me to create beautiful native UI with ease.
.NET has a large VM dependency that I'm not crazy about. I was thinking about Delphi, but the world around it seem to be almost dead.
What do you recommend? | 0 | [
2,
98,
816,
54,
4944,
13,
3448,
107,
42,
12360,
26,
353,
1891,
5011,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
40,
13,
3448,
26,
3561,
1439,
17404,
3767,
20,
44,
945,
84,
14,
2620,
15,
28,
21,
2462,
710,
9,
1936,
25,
21,
491... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Actually Using F# in Production?
===
Is anyone actually using F# in a production environment?
If so, what are you using it for and why did you decided to use F#?
Do you recommend a die-hard C# developer to learn F# or do you think it's just a fad? | 0 | [
2,
1276,
1121,
568,
398,
5910,
19,
637,
60,
800,
3726,
3726,
25,
1276,
1121,
568,
398,
5910,
19,
21,
637,
2307,
60,
100,
86,
15,
98,
50,
42,
568,
32,
26,
17,
483,
144,
42,
868,
20,
275,
398,
5910,
60,
107,
42,
12360,
21,
132... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 embed a png in an Adobe Illustrator or Expression Design file to create XAML
===
I have an AI file. I paste it into Expression Blend and then export the XAML for use in my WPF project. Works for most of my files, but some export the XAML plus a seperate png file. What can I do so that the png is embedded into the paths of my image and not a seperate image? Can it be done? | 0 | [
2,
184,
20,
11911,
69,
21,
351,
2723,
19,
40,
20299,
13805,
54,
1803,
704,
3893,
20,
1600,
13,
6791,
8184,
800,
3726,
3726,
31,
57,
40,
21,
49,
3893,
9,
31,
640,
62,
32,
77,
1803,
11138,
17,
94,
7487,
14,
13,
6791,
8184,
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... |
Conflict between Google util.js and ASP.NET AJAX?
===
I'm trying to use [Google's jstemplate](http://code.google.com/apis/jstemplate/docs/howto.html) as a client-side templating engine on an ASP.NET page, and it seems to be conflicting with ASP.NET AJAX. The problem is not jstemplate.js but util.js, which it needs as a support file.
I've isolated the problem as follows::
<%@ Page Language="VB" %>
<body>
<form id="form1" runat="server">
<asp:scriptmanager id="ScriptManager" runat="server" enablepartialrendering="true">
<scripts>
<asp:scriptreference path="http://google-jstemplate.googlecode.com/svn/trunk/util.js" />
</scripts>
</asp:scriptmanager>
</form>
</body>
</html>
When I run this I get this error
Microsoft JScript runtime error: 'type' is null or not an object`
on this line of `MicrosoftAjax.js`:
Sys.UI.DomEvent = function Sys$UI$DomEvent(eventObject) {
...
var etype = this.type = e.type.toLowerCase();
Referencing the javascript in a normal `<script>` block (as opposed to inside the ScriptManager) has the same effect.
I haven't dug into it but I suspect there's just a namespace collision. Has anyone successfully used Google's util.js file alongside ASP.NET ajax? Or should I just look into alternative client-side templating engines?
| 0 | [
2,
2930,
128,
8144,
13,
14255,
9,
728,
18,
17,
28,
306,
9,
2328,
20624,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
275,
636,
16111,
4875,
22,
18,
487,
19432,
13095,
500,
5,
21127,
6903,
9375,
9,
16111,
4875,
9,
960,
118,
58,
89... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 fix precision of variable
===
In c#
double tmp = 3.0 * 0.05;
tmp = 0.15000000000000002
This has to do with money. The value is really $0.15, but the system wants to round it up to $0.16. 0.151 should probably be rounded up to 0.16, but not 0.15000000000000002
What are some ways I can get the correct numbers (ie 0.15, or 0.16 if the decimal is high enough).
| 0 | [
2,
184,
20,
6098,
13133,
16,
7612,
800,
3726,
3726,
19,
272,
5910,
1494,
13,
38,
2554,
800,
203,
9,
387,
1637,
713,
9,
4071,
73,
13,
38,
2554,
800,
713,
9,
9839,
21903,
21903,
21903,
3564,
48,
63,
20,
107,
29,
875,
9,
14,
1923... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 manage external dependencies which are constantly being modified
===
Our development uses lots of open-source code and I'm trying to figure out what the best way to manage these external dependencies.
Our current configuration:
- we are developing for both linux and windows
- We use svn for our own code
- external dependencies (boost, log4cpp, etc) are not stored in svn. Instead I put them under ./extern (or c:\extern on windows). I don't want to put them in our repository because I will not be able to update them that way. Some of these are constantly being updated.
My questions
- What to do if I need to modify external code?
Currently I have created a folder in my svn repository called extern_hacks and that is where I put the modified external code. I then link (or copy on windows) the files into the external directory structure. This solution is problematic since it is hard to keep track of copying the files, and very hard to update from svn when files are sitting in two repositories (mine for the modified files, and the original repository say sourceforge)
- How to manage versions of external dependencies?
I'm interested to hear how others deal with these issues. Thanks.
| 0 | [
2,
184,
20,
4705,
4886,
29411,
56,
50,
7545,
142,
5372,
800,
3726,
3726,
318,
522,
2027,
7503,
16,
368,
8,
12097,
1797,
17,
31,
22,
79,
749,
20,
1465,
70,
98,
14,
246,
161,
20,
4705,
158,
4886,
29411,
9,
318,
866,
8091,
45,
13... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Clearing all cookies with javascript
===
How do you delete all the cookies for the current domain using javascript? | 0 | [
2,
8130,
65,
19396,
29,
8247,
8741,
800,
3726,
3726,
184,
107,
42,
27448,
65,
14,
19396,
26,
14,
866,
4603,
568,
8247,
8741,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
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... |
How can I connect to an Oracle database as SYS using an ADO connection string?
===
I am trying this:
Provider=MSDASQL.1;Persist Security Info=False;User ID=sys;Password=pwd;Initial Catalog=DATABASE;Data Source=OdbcDataSource;DBA Privilege=SYSDBA
But I get the error:
[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
I'm using Delphi, but answers in any language are welcome. | 0 | [
2,
184,
92,
31,
6379,
20,
40,
15759,
6018,
28,
10315,
18,
568,
40,
21,
537,
2760,
3724,
60,
800,
3726,
3726,
31,
589,
749,
48,
45,
11747,
3726,
79,
18,
8016,
22402,
9,
165,
73,
7490,
702,
1221,
15404,
3726,
13192,
870,
73,
16704... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Bad Database Design - Is my table to large?
===
I have a poorly designed database. One of the most important tables has 11,000+ entries. We would like to expand our system, and i am wondering, if this table grew to 5x its size, would this be a problem? Its 15360 kB in size... if that matters. | 0 | [
2,
896,
6018,
704,
13,
8,
25,
51,
859,
20,
370,
60,
800,
3726,
3726,
31,
57,
21,
10614,
1006,
6018,
9,
53,
16,
14,
127,
681,
7484,
63,
25306,
2430,
11399,
9,
95,
83,
101,
20,
6073,
318,
329,
15,
17,
31,
589,
5712,
15,
100,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Who uses DocBook?
===
I was wondering what people use for Documentation and saw that this had already been asked [here](http://stackoverflow.com/questions/12537/what-tools-are-used-to-write-documentation)
There seemed to be a lot of votes for LaTeX, I'm an advocate of LaTeX over Word due to its WYGIWYW (What You Get is What You Want) approach. However, its not easy to convince others to use it.
I'm inertested to hear from anyone who has successfully convinced their team to use DocBook for documentation? | 0 | [
2,
72,
2027,
9765,
5199,
60,
800,
3726,
3726,
31,
23,
5712,
98,
148,
275,
26,
13945,
17,
441,
30,
48,
41,
614,
74,
411,
636,
6836,
500,
5,
21127,
6903,
25325,
2549,
9990,
9,
960,
118,
24652,
18,
11698,
23519,
9816,
608,
8,
20799... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Explain this mod_rewrite rule
===
Can anyone explain what this mod_rewrite rule is doing?
I'm trying to comment the file, but the code seems to state the opposite of what I think it's doing
# Enable rewriting of URLs
RewriteEngine on
# Allow specified file types to be accessed
# Thing to test = URL
# Condition = not starting with
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt)
# RewriteRule will only be performed if the preceeding RewriteCond is fulfilled
# Remove index.php from all URLs
# Pattern = anything (0 or more of any character)
# Substitution = index.php + the rest of the URL
RewriteRule ^(.*)$ /index.php/$1 [L] | 0 | [
2,
3271,
48,
7226,
1,
99,
23716,
1828,
800,
3726,
3726,
92,
1276,
3271,
98,
48,
7226,
1,
99,
23716,
1828,
25,
845,
60,
31,
22,
79,
749,
20,
6484,
14,
3893,
15,
47,
14,
1797,
2206,
20,
146,
14,
2794,
16,
98,
31,
277,
32,
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... |
Java2D: Is it always safe to cast Graphics into Graphics2D
===
Assuming we always use a Sun JVM (say, 1.5+), is it always safe to cast a Graphics reference to Graphics2D?
I haven't seen it cause any problems yet and, to my understanding, the Graphics class is legacy code but the Java designers didn't want to change the interfaces for Swing and AWT classes in order to preserver backwards compatibility. | 0 | [
2,
8247,
135,
43,
45,
25,
32,
550,
1834,
20,
1325,
8351,
77,
8351,
135,
43,
800,
3726,
3726,
11704,
95,
550,
275,
21,
939,
487,
20147,
13,
5,
6366,
15,
137,
9,
264,
2430,
6,
15,
25,
32,
550,
1834,
20,
1325,
21,
8351,
2801,
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 add to a textbox the red line (like bad spelling in Word)?
===
How can we produce the effect of the red line under a bad spelling word like the image below :
![alt text][1]
[1]: http://spellbound.sourceforge.net/images/options_285x395.png
| 0 | [
2,
184,
20,
3547,
20,
21,
1854,
5309,
14,
402,
293,
13,
5,
1403,
896,
11292,
19,
833,
6,
60,
800,
3726,
3726,
184,
92,
95,
2213,
14,
1590,
16,
14,
402,
293,
131,
21,
896,
11292,
833,
101,
14,
1961,
1021,
13,
45,
13,
187,
255... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
401 when POSTing using HttpWebRequest (yes I used Credentials)
===
I'm using HttpWebRequest to pull down XML, and POST data back to a 'WebService' and getting a 401 on the POST.
When creating the requests I've added Credentials and now tried a credentials cache and setting PreAutenticate to True, still getting the 401! :(
Watching the HTTP traffic on the router I set the get make an unauthenticated GET request.. it hits the 401 and then makes an authenticated GET and is allowed through. When I watch the POST I see it hit the 401... and it doesn't even **try** an authenticated POST.
This appears only on mobile phones (compact-framework 3.5 and 2.0 on WinMobile 6.1). The same .exe works perfectly on any desktop machines.
What am I missing? Please help! | 0 | [
2,
13,
20658,
76,
15669,
568,
7775,
458,
3692,
10351,
13,
5,
1714,
31,
147,
5059,
43,
10107,
18,
6,
800,
3726,
3726,
31,
22,
79,
568,
7775,
458,
3692,
10351,
20,
2201,
125,
23504,
15,
17,
678,
1054,
97,
20,
21,
13,
22,
14113,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 resolve a JAVA Rounding Double issue
===
Seems like the substraction is triggering somekind of issue and the resulting value is wrong.
double tempCommission = targetPremium.doubleValue() * rate.doubleValue() / 100d;
78.75 = 787.5 * 10.0/100d
double netToCompany = targetPremium.doubleValue() - tempCommission;
708.75 = 787.5 - 78.75
double dCommission = request.getPremium().doubleValue() - netToCompany;
877.8499999999999 = 1586.6 - 708.75
The resulting expected value would be 877.85
What should be done to insure the correct calculation? | 0 | [
2,
184,
20,
9854,
21,
8247,
560,
68,
1494,
1513,
800,
3726,
3726,
2206,
101,
14,
972,
9729,
8645,
25,
7286,
68,
109,
11008,
16,
1513,
17,
14,
2927,
1923,
25,
1389,
9,
1494,
13,
9577,
960,
12385,
800,
2935,
3515,
79,
2187,
9,
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... |
How do I make a tag cloud in ASP.NET?
===
I'm venturing into web programming for the first time and would like a nice way to display a frequency indicator of some data, in the form of a [tag cloud](http://en.wikipedia.org/wiki/Tag_cloud).
For example, pretend I have some simple data of three types of pets: Dog, Cat, Monkey.
There are **5 Dogs**, **27 Cats** and **101 Monkeys**.
Given this data, **what's the best way to make a tag cloud** to visually indicate that I have way too many monkeys, not as many cats, and that I definitely need obtain a few more dogs? | 0 | [
2,
184,
107,
31,
233,
21,
3383,
4005,
19,
28,
306,
9,
2328,
60,
800,
3726,
3726,
31,
22,
79,
9675,
10450,
77,
2741,
3143,
26,
14,
64,
85,
17,
83,
101,
21,
2210,
161,
20,
3042,
21,
5328,
13310,
16,
109,
1054,
15,
19,
14,
505,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 change an Eclipse default project to a java project?
===
I checked out a project from SVN and did not specify the project type, so it checked out as a "default" project. What is the easiest way to quickly convert this to a "Java" project?
I'm using Eclipse version: 3.3.2 | 0 | [
2,
184,
20,
753,
40,
11652,
12838,
669,
20,
21,
8247,
669,
60,
800,
3726,
3726,
31,
6505,
70,
21,
669,
37,
13,
18,
16578,
17,
144,
52,
19077,
14,
669,
1001,
15,
86,
32,
6505,
70,
28,
21,
13,
7,
13862,
9708,
7,
669,
9,
98,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
content encoding in perl
===
I'm modifying a mature CGI application written in Perl and the question of content encoding has come up. The browser reports that the content is iso-8859-1 encoded but I can't verify this by looking at the code. None of the various encoding techniques described in the perldoc tutorials ([Encode][1], [Encoding][2], [Open][3]) are used in the code so I'm a little confused as to how the document is actually being encoded.
As mentioned, the application quite mature and likely predates many of the current encoding methods. Does anyone know of any legacy or deprecated techniques I should be looking for? To what encoding does Perl assume/default to when no direction is provided by the developer?
Thanks
[1]: http://perldoc.perl.org/Encode.html
[2]: http://perldoc.perl.org/encoding.html
[3]: http://perldoc.perl.org/open.html | 0 | [
2,
2331,
19608,
19,
416,
255,
800,
3726,
3726,
31,
22,
79,
17579,
68,
21,
8615,
272,
2234,
3010,
642,
19,
416,
255,
17,
14,
1301,
16,
2331,
19608,
63,
340,
71,
9,
14,
16495,
2813,
30,
14,
2331,
25,
11899,
8,
3020,
3902,
8,
165... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Which online eBook reference library do you use?
===
I use Safari Books Online as a reference library and to evaluate book before I decide to buy a paper copy, but it doesn't include any Apress books. Is there a better alternative you would recommend? | 4 | [
2,
56,
2087,
26751,
2801,
1248,
107,
42,
275,
60,
800,
3726,
3726,
31,
275,
25055,
964,
2087,
28,
21,
2801,
1248,
17,
20,
13,
15599,
360,
115,
31,
4073,
20,
3034,
21,
1397,
4344,
15,
47,
32,
1437,
22,
38,
468,
186,
21,
5890,
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,
0,
0,
0,
0,
0,
0,
0... |
configure knotify to execute a custom command
===
on KDE, there's a possibility to execute a command when some event happen.
for example one can execute a script when kmail receives a mail or when a akregator fetches a new feed.
I want to execute the script on a way I can retrieve the mail/feed subject in my script.
is there a possibility to specify the program to execute to:
myprogram <SUBJECT> ? | 0 | [
2,
1065,
15951,
11092,
8612,
20,
15644,
21,
5816,
1202,
800,
3726,
3726,
27,
680,
546,
15,
80,
22,
18,
21,
4813,
20,
15644,
21,
1202,
76,
109,
807,
2384,
9,
26,
823,
53,
92,
15644,
21,
3884,
76,
680,
8079,
8359,
21,
4216,
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... |
How can I make use of .NET objects from within Excel VBA?
===
Can VBA code instantiate and use of .NET objects? The specific class I'm interested in is System.IO.Compression.GZipStream. | 0 | [
2,
184,
92,
31,
233,
275,
16,
13,
9,
2328,
3916,
37,
363,
20700,
566,
969,
60,
800,
3726,
3726,
92,
566,
969,
1797,
6322,
15882,
17,
275,
16,
13,
9,
2328,
3916,
60,
14,
1903,
718,
31,
22,
79,
3158,
19,
25,
329,
9,
1963,
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,
0,
0,
0,
0,
0,
0,
0... |
CodeRush - Export type to file missing?
===
I'm currently evaluating CodeRush and one thing that I liked most when reading the featurelist was the "Export type to new file" or similar functionality. Now that CodeRush runs within my IDE, I cannot find this functionality. Is there a plug-in required for it or am I just missing something? | 0 | [
2,
1797,
15770,
13,
8,
7487,
1001,
20,
3893,
2863,
60,
800,
3726,
3726,
31,
22,
79,
871,
26764,
1797,
15770,
17,
53,
584,
30,
31,
3345,
127,
76,
1876,
14,
1580,
5739,
23,
14,
13,
7,
1706,
1993,
1001,
20,
78,
3893,
7,
54,
835,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.