unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Regular expression to test whether a string consists of a valid real number in base 10.
===
Examples:
"1" yes
"-1" yes
"- 3" no
"1.2" yes
"1.2.3" no
"7e4" no | 0 | [
2,
1290,
1803,
20,
1289,
1472,
21,
3724,
2043,
16,
21,
7394,
683,
234,
19,
1000,
332,
9,
800,
3726,
3726,
3770,
45,
13,
7,
165,
7,
1643,
13,
7,
8,
165,
7,
1643,
13,
7,
8,
203,
7,
90,
13,
7,
165,
9,
135,
7,
1643,
13,
7,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Set Template Constraints for CuteEditor
===
We are using CuteEditor to allow clients to edit a template but we only want them to be able to add text in 4in x 8in Area is there anyway that we can set this so that it will only allow them to type within this area and no more
Thanks for the help | 0 | [
2,
309,
22894,
16747,
26,
10901,
13401,
800,
3726,
3726,
95,
50,
568,
10901,
13401,
20,
1655,
7421,
20,
9392,
21,
22894,
47,
95,
104,
259,
105,
20,
44,
777,
20,
3547,
1854,
19,
268,
108,
993,
469,
108,
217,
25,
80,
2774,
30,
95,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Visual Studio 2008 Properties Window SLOW
===
Even after all the hotfixes and updates that are supposed to fix this, my properties window in Visual Studio 2008 is still SLOW! What happens is a click on a table cell or something similar in the web editor, and regardless of the size of the page I'm working on, it takes a second or two for the properties window to show the properties for the selected item.
The most annoying thing about it is sometimes I'll click a cell, select a property and start typing, but it's still stuck on the wrong (unselected) item, so it ends up putting what I'm typing in the wrong place, and then it disappears once the proper item is selected.
Like I said, I'm running with all available hotfixes and service packs. Anyone run into this and had any luck fixing it? | 0 | [
2,
3458,
1120,
570,
3704,
1463,
2276,
800,
3726,
3726,
166,
75,
65,
14,
1047,
18594,
160,
17,
16779,
30,
50,
2293,
20,
6098,
48,
15,
51,
3704,
1463,
19,
3458,
1120,
570,
25,
174,
2276,
187,
98,
5531,
25,
21,
10840,
27,
21,
859,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
tail() a file with Python
===
I'm writing a log file viewer for a web application and for that I want to paginate through the lines of the log file. The items in the file are line based with the newest item on the bottom.
So I need a `tail()` method that can read `n` lines from the bottom and supports an offset. What I came up with looks like this:
def tail(f, n, offset=0):
"""Reads a n lines from f with an offset of offset lines."""
avg_line_length = 74
to_read = n + offset
while 1:
try:
f.seek(-(avg_line_length * to_read), 2)
except IOError:
# woops. apparently file is smaller than what we want
# to step back, go to the beginning instead
f.seek(0)
pos = f.tell()
lines = f.read().splitlines()
if len(lines) >= to_read or pos == 0:
return lines[-to_read:offset and -offset or None]
avg_line_length *= 1.3
Is this a reasonable approach? What is the recommended way to tail log files with offsets? | 0 | [
2,
3424,
5,
6,
21,
3893,
29,
20059,
800,
3726,
3726,
31,
22,
79,
1174,
21,
6738,
3893,
16812,
26,
21,
2741,
3010,
17,
26,
30,
31,
259,
20,
19006,
17939,
120,
14,
1560,
16,
14,
6738,
3893,
9,
14,
3755,
19,
14,
3893,
50,
293,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Fastest small datastore on Windows
===
My app keeps track of the state of about 1000 objects. Those objects are read from and written to a persistent store (serialized) in no particular order.
Right now the app uses the registry to store each object's state. This is nice because:
* It is simple
* It is very fast
* Individual object's state can be read/written without needing to read some larger entity (like pulling out a snippet from a large XML file)
* There is a decent editor (RegEdit) which allow easily manipulating individual items
Having said that, I'm wondering if there is a better way. SQLite seems like a possibility, but you don't have the same level of multiple-reader/multiple-writer that you get with the registry, and no simple way to edit existing entries.
Any better suggestions? A bunch of flat files? | 0 | [
2,
7518,
284,
1054,
16828,
27,
1936,
800,
3726,
3726,
51,
4865,
8968,
792,
16,
14,
146,
16,
88,
6150,
3916,
9,
273,
3916,
50,
1302,
37,
17,
642,
20,
21,
15348,
1718,
13,
5,
4104,
2815,
1333,
6,
19,
90,
1498,
389,
9,
193,
130,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
git diff - handling long lines?
===
I'm running git-diff on a file, but the change is at the end of a long line.
If I use cursor keys to move right it loses colour coding and worse the lines don't line up, making it harder to track the change.
Is there a way to prevent that problem, or to simply make the lines wrap instead?
<small style="font-size: 80%;">(running git 1.5.5 via mingw32)</small> | 0 | [
2,
13,
10404,
20811,
13,
8,
7988,
175,
1560,
60,
800,
3726,
3726,
31,
22,
79,
946,
13,
10404,
8,
43,
6021,
27,
21,
3893,
15,
47,
14,
753,
25,
35,
14,
241,
16,
21,
175,
293,
9,
100,
31,
275,
29588,
5534,
20,
780,
193,
32,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best approach to centralzing error messages in an application?
===
All throughout an application wherever error messages (or other user messages) are used I typically hard-code a string. Obviosly this can be really bad (especially when you may have to come back and localize an app). What is the best approach to centralize these strings? A static class? Constants? An XML File? Or a combination (like creating a static class with constants that are used to read from an xml file). | 0 | [
2,
98,
25,
14,
246,
2141,
20,
521,
9768,
7019,
7561,
19,
40,
3010,
60,
800,
3726,
3726,
65,
892,
40,
3010,
12680,
7019,
7561,
13,
5,
248,
89,
4155,
7561,
6,
50,
147,
31,
2442,
552,
8,
9375,
21,
3724,
9,
5122,
13327,
18,
102,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I make this "Use of uninitialized value" warning go away?
===
Let's say I want to write a regular expression to change all `<abc>`, `<def>`, and `<ghi>` tags into `<xyz>` tags.. and I also want to change their closing tags to `</xyz>`. This seems like a reasonable regex (ignore the backticks; StackOverflow has trouble with the less-than signs if I don't include them):
`s!<(/)?(abc|def|ghi)>!<${1}xyz>!g;`
And it works, too. The only problem is that for opening tags, the optional $1 variable gets assigned undef, and so I get a "Use of uninitialized value..." warning.
What's an elegant way to fix this? I'd rather not make this into two separate regexs, one for opening tags and another for closing tags, because then there are two copies of the taglist that need to be maintained, instead of just one. | 0 | [
2,
184,
107,
31,
233,
48,
13,
7,
3699,
16,
367,
27313,
1333,
1923,
7,
3590,
162,
229,
60,
800,
3726,
3726,
408,
22,
18,
395,
31,
259,
20,
2757,
21,
1290,
1803,
20,
753,
65,
13,
1,
21880,
1,
15,
13,
1,
13862,
1,
15,
17,
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... |
Trying to set/get a javascript variable in C# from the ActiveX WebControl (SHDocVw.IWebBrowser2)
===
For simplicity we've added a javascript variable to the top of the page so our html page being loaded into the ActiveX WebBrowser looks something like this:
<HTML>
<HEAD>
<TITLE>Test</TITLE>
<SCRIPT type="text/javascript">
var field = 'hello world';
</SCRIPT>
</HEAD>
<BODY>
<input type="button" value="See field" onclick="javascript:alert(field);"/>
</BODY>
</HTML>
We want to access the *field* variable and assign a value to it. In VB6 the code for this was pretty straightforward:
doc.Script.field = newValue
We've tried using code similar to this:
Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateSet(Script, null, "field",new object[] {newValue},null, null);
That works the first time, but it doesn't work on subsequent calls of the same page.
Has anyone had any experience doing this type of operation before?
| 0 | [
2,
749,
20,
309,
118,
3060,
21,
8247,
8741,
7612,
19,
272,
5910,
37,
14,
1348,
396,
2741,
12898,
13,
5,
1635,
537,
12732,
499,
9,
49,
14113,
25699,
4104,
135,
6,
800,
3726,
3726,
26,
20595,
95,
22,
195,
905,
21,
8247,
8741,
7612... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
map function in Perl
===
Not really getting the point of the map function. Can anyone explain with examples its use? | 0 | [
2,
2942,
1990,
19,
416,
255,
800,
3726,
3726,
52,
510,
1017,
14,
454,
16,
14,
2942,
1990,
9,
92,
1276,
3271,
29,
3770,
82,
275,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How can I write an SNMP agent or SNMP extension agent DLL in C#
===
I need to write an SNMP agent for my application.
I read the [CodeProject article](http://www.codeproject.com/KB/IP/SNMP_Agent_DLL__Part1_.aspx) on how to write an SNMP extension agent DLL using win32, but would like to know if it is possible to do it with managed code.
Also, is it possible to write my own SNMP agent in managed code and run it along windows SNMP service?
windows SNMP service is required to run on my server to provide the basic operating system management info.
What C# SNMP library would you recommend? I found a few C# SNMP protocol implementations, but could not find sample code on how to implement an SNMP agent - most samples are only about querying other agents or sending traps. | 0 | [
2,
184,
92,
31,
2757,
40,
8912,
2554,
2267,
54,
8912,
2554,
3896,
2267,
13,
43,
211,
19,
272,
5910,
800,
3726,
3726,
31,
376,
20,
2757,
40,
8912,
2554,
2267,
26,
51,
3010,
9,
31,
1302,
14,
636,
9375,
21011,
2002,
500,
5,
21127,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you manage your custom modules?
===
I write tons of python scripts, and I find myself reusing lots code that I've written for other projects. My solution has been to make sure the code is separated into logical modules/packages (this one's a given). I then make them setuptools-aware and publish them on PyPI. This allows my other scripts to always have the most up-to-date code, I get a warm fuzzy feeling because I'm not repeating myself, and my development, in general, is made less complicated. I also feel good that there MAY be someone out there that finds my code handy for something they're working on, but it's mainly for selfish reasons :)
To all the pythonistas, how do you handle this? Do you use PyPI or setuptools (easy_install)? or something else? | 0 | [
2,
184,
107,
42,
4705,
154,
5816,
17113,
60,
800,
3726,
3726,
31,
2757,
5278,
16,
20059,
17505,
15,
17,
31,
477,
992,
302,
12655,
7503,
1797,
30,
31,
22,
195,
642,
26,
89,
2314,
9,
51,
4295,
63,
74,
20,
233,
562,
14,
1797,
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... |
Silverlight secuirty - sensitive data
===
Silverlight works on client side so putting any sensitive data like connection strings, passwords etc. in the code seems not to be a good thing. I want to build whole web app in Silverlight doing lots of authorization and database quering things. How to make it safe? Any tips&tricks and what things should I avoid? | 0 | [
2,
1172,
3130,
13,
18,
17194,
1523,
1084,
13,
8,
7830,
1054,
800,
3726,
3726,
1172,
3130,
693,
27,
6819,
270,
86,
3873,
186,
7830,
1054,
101,
2760,
7887,
15,
20884,
18,
2722,
9,
19,
14,
1797,
2206,
52,
20,
44,
21,
254,
584,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to parse a raw email message that may be in html or various strange encodings and convert it to plain text, the way, say, pine might display it.
===
The reason I want to do this is to make it easy to parse out instructions that are emailed to a bot, the kind of thing majordomo might do to parse commands like subscribing and unsubscribing. It turns out there are a lot of crazy formats and things to deal with, like quoted text, distinguishing between header and body, etc.
A perl module to do this would be ideal but solutions in any language are welcome. | 0 | [
2,
184,
20,
2017,
870,
21,
4333,
8517,
2802,
30,
123,
44,
19,
13,
15895,
54,
617,
2578,
19608,
18,
17,
8406,
32,
20,
3748,
1854,
15,
14,
161,
15,
395,
15,
4624,
530,
3042,
32,
9,
800,
3726,
3726,
14,
1215,
31,
259,
20,
107,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Visual Studios Link.exe error: "extra operand"
===
Our build process uses Visual Studios 2003 link.exe for linking. On one machine we're seeing the following error:
_X86_Win32/Debug/Intermediate/OurApp.exe LINK: extra operand `/subsystem:windows' Try `LINK --help' for more information
It appears to be using the same version of visual studios as the other machines. Has anyone encountered this problem before? | 0 | [
2,
3458,
3504,
3508,
9,
1706,
62,
7019,
45,
13,
7,
23631,
1877,
706,
7,
800,
3726,
3726,
318,
1895,
953,
2027,
3458,
3504,
973,
3508,
9,
1706,
62,
26,
12585,
9,
27,
53,
1940,
95,
22,
99,
2078,
14,
249,
7019,
45,
13,
1,
396,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Trouble when adding a lot of Controls to a .NET Windows Form (C#)
===
I have a Windows Form app written in C#. Its job is to send messages to a list of users. While those messages are being sent, I'd like to display status of the operation for each user. What I am doing (for each user) is creating a Label control and adding it to Panel. This works without a problem for a small set of users. When I increase the size to 1000 or more, the Visual Studio Debugger displays the following message:
*A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in System.Windows.Forms.dll
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll*
And then the application hangs. Any thoughts on what I'm doing wrong and how I can fix this? | 0 | [
2,
2572,
76,
4721,
21,
865,
16,
8671,
20,
21,
13,
9,
2328,
1936,
505,
13,
5,
150,
5910,
6,
800,
3726,
3726,
31,
57,
21,
1936,
505,
4865,
642,
19,
272,
5910,
9,
82,
1205,
25,
20,
2660,
7561,
20,
21,
968,
16,
3878,
9,
133,
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... |
Why should you remove unnecessary C# using statements?
===
For example, i rarely need:
using System.Text;
but it's always there by default. I assume the application will use more memory if your code contains unnecessary using statements. But is there anything else i should be aware of?
Also, does it make any difference whatsoever if the same using statement is used in only one file vs. most/all files?
| 0 | [
2,
483,
378,
42,
4681,
16435,
272,
5910,
568,
9015,
60,
800,
3726,
3726,
26,
823,
15,
31,
5664,
376,
45,
568,
329,
9,
11969,
73,
47,
32,
22,
18,
550,
80,
34,
12838,
9,
31,
7158,
14,
3010,
129,
275,
91,
1912,
100,
154,
1797,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Ajax autocomplete extender populated from SQL
===
OK, First let me state that I have never used this control and this is also my first attempt at using a web service-- My delima is as follows. I need to querry a database to get back a certain column and use that for my autocomplete. Obviously I dont want the querry to run everytime a user types another word in the textbox, so my best guess is to run the querry once then use that dataset, array, list or whatever to then filter for the autocomplete extender... I am kinda lost any suggestions?? | 0 | [
2,
20624,
3108,
15990,
7206,
106,
11111,
37,
4444,
255,
800,
3726,
3726,
5854,
15,
64,
408,
55,
146,
30,
31,
57,
243,
147,
48,
569,
17,
48,
25,
67,
51,
64,
1735,
35,
568,
21,
2741,
365,
8,
8,
51,
121,
22861,
25,
28,
2415,
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... |
What's required for a clean uninstall of Visual Studio 2005
===
Due to continuing crash problems, I'm about to uninstall and reinstall my copy of Visual Studio 2005. I know that just running the uninstaller leaves a lot of resources and settings on my machine and would like to be able to reinstall from a pristine state.
Is there any way to completely uninstall VS2k5 from my machine so that it's as if it was never there? | 0 | [
2,
98,
22,
18,
1390,
26,
21,
2745,
367,
108,
21300,
16,
3458,
1120,
812,
800,
3726,
3726,
397,
20,
4489,
4597,
1716,
15,
31,
22,
79,
88,
20,
367,
108,
21300,
17,
7102,
21300,
51,
4344,
16,
3458,
1120,
812,
9,
31,
143,
30,
114,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Does a definitive list of design patterns exist?
===
Where did the idea of design patterns come from, who decided what is and isn't a pattern and gave them their names? Is there an official organisation that defines them, or do they exist through some community consensus? | 0 | [
2,
630,
21,
15676,
968,
16,
704,
6282,
3182,
60,
800,
3726,
3726,
113,
144,
14,
882,
16,
704,
6282,
340,
37,
15,
72,
868,
98,
25,
17,
2532,
22,
38,
21,
3732,
17,
492,
105,
66,
1817,
60,
25,
80,
40,
989,
4080,
30,
13110,
105,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Adding referenced eclipse projects to maven dependancies
===
Right now, I have two Eclipse projects - they both use Maven 2 for all their jar-dependency goodness.
Inside eclipse, I have project Foo included in project Bar's build path, so that I can use Foo's classes from project Bar. This works really well in eclipse land, but when I try:
mvn compile
inside Bar's directory, it fails because Maven doesn't know about the project-to-project relationship in Eclipse's build path.
If I were using ant, I would just use it to do something silly like copy foo.jar into project Bar's classpath, but as far as I can tell, things are done a lot less hackishly in Maven-land.
I'm wondering if there's a standard workaround for this type of problem - it seems like it would be fairly common, and I'm just missing something basic about how Maven works.
| 0 | [
2,
4721,
17571,
11652,
2314,
20,
1216,
3124,
12547,
210,
10807,
800,
3726,
3726,
193,
130,
15,
31,
57,
81,
11652,
2314,
13,
8,
59,
156,
275,
1216,
3124,
172,
26,
65,
66,
5112,
8,
19038,
8883,
18509,
9,
572,
11652,
15,
31,
57,
66... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I leverage an ORM for a database whose schema is unknown until runtime?
===
I am trying to leverage ORM given the following requirements:
1) Using .NET Framework (latest Framework is okay)
2) Must be able to use Sybase, Oracle, MSSQL interchangeably
3) The schema is mostly static, BUT there are dynamic parts.
I am somewhat familiar with SubSonic and NHibernate, but not deeply.
I get the nagging feeling that the ORM can do what I want, but I don't know how to leverage it at the moment.
SubSonic probably isn't optimal, since it doesn't currently support Sybase, and writing my own provider for it is beyond my resources and ability right now.
For #3 (above), there are a couple of metadata tables, which describe tables which the vendors can "staple on" to the existing database.
Let's call these *MetaTables*, and *MetaFields*.
There is a base static schema, which the ORM (NHibernate ATM) handles nicely.
**However**, a vendor can add a table to the database (physically) as long as they also add the data to the metadata tables to describe their structure.
What I'd really like is for me to be able to somehow "feed" the ORM with that metadata (in a way that it understands) and have it at that point allow me to manipulate the data.
My primary **goal** is to reduce the amount of generic SQL statement building I have to do on these dynamic tables.
I'd also like to avoid having to worry about the differences in SQL being sent to Sybase,Oracle, or MSSQL.
My primary **problem** is that I don't have a way to let ORM know about the dynamic tables until runtime, when I'll have access to the metadata | 0 | [
2,
184,
92,
31,
19414,
40,
54,
79,
26,
21,
6018,
1196,
23874,
25,
2562,
163,
485,
891,
60,
800,
3726,
3726,
31,
589,
749,
20,
19414,
54,
79,
504,
14,
249,
4786,
45,
137,
6,
568,
13,
9,
2328,
6596,
13,
5,
6554,
384,
6596,
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... |
Reversing an RSS feed
===
This could be weird, Have you ever come across a blog which you wanted to read in the chronological order? And that blog could be old, with several hundred posts. When i add this feed to my feed reader, say googlereader, the latest feed comes on top and as i scroll down further, the older posts appear. This could be frustrating if you want to read it from the beginning. Is there any reader that does this? Or, i would love to do this as a pet project, (preferably in c#), how exactly should i go about it? Also, are there any .NET libraries which i can use to work on RSS feeds? I have not done any RSS feed programming before. | 0 | [
2,
28829,
40,
13,
1224,
18,
4063,
800,
3726,
3726,
48,
110,
44,
5455,
15,
57,
42,
462,
340,
464,
21,
8146,
56,
42,
417,
20,
1302,
19,
14,
22075,
389,
60,
17,
30,
8146,
110,
44,
315,
15,
29,
238,
1874,
9868,
9,
76,
31,
3547,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Flex - Avoid click event on container when enclosed component is clicked
===
I have a Flex application where I'm using a Canvas to contain several other components. On that Canvas there is a Button which is used to invoke a particular flow through the system. Clicking anywhere else on the Canvas should cause cause a details pane to appear showing more information about the record represented by this control.
The problem I'm having is that because the button sits inside the Canvas any time the user clicks the Button the click event is fired on both the Button and the Canvas. Is there any way to avoid having the click event fired on the Canvas object if the user clicks on an area covered up by another component?
I've created a simple little test application to demonstrate the problem:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
private function onCanvasClick(event:Event):void {
text.text = text.text + "\n" + "Canvas Clicked";
}
private function onButtonClick(event:Event):void {
text.text = text.text + "\n" + "Button Clicked";
}
]]>
</mx:Script>
<mx:Canvas x="97" y="91" width="200" height="200" backgroundColor="red" click="onCanvasClick(event)">
<mx:Button x="67" y="88" label="Button" click="onButtonClick(event)"/>
</mx:Canvas>
<mx:Text id="text" x="97" y="330" text="Text" width="200" height="129"/>
</mx:Application>
As it stands when you click the button you will see two entries made in the text box, "Button Clicked" followed by "Canvas Clicked" even though the mouse was clicked only once.
I'd like to find a way that I could avoid having the second entry made such that when I click the Button only the "Button Clicked" entry is made, but if I were to click anywhere else in the Canvas the "Canvas Clicked" entry would still appear. | 0 | [
2,
14409,
13,
8,
2658,
10840,
807,
27,
12147,
76,
12188,
5912,
25,
15802,
800,
3726,
3726,
31,
57,
21,
14409,
3010,
113,
31,
22,
79,
568,
21,
9696,
20,
3717,
238,
89,
5090,
9,
27,
30,
9696,
80,
25,
21,
5167,
56,
25,
147,
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... |
Get integer value of the current year in Java
===
I need to determine the current year in Java as an integer. I would like to be able to use this value as a counter that I can, for example, use to run from now until a specified year in the past (i.e. my value starts at 2008, and I have a "firstYearOfData" value that is set to 1994. I can now run my process from 2008 back to 1994). I could just use java.util.Date(), but it is deprecated, and I don't want to have to set up a Calendar object if I don't have to. | 0 | [
2,
164,
13820,
1923,
16,
14,
866,
159,
19,
8247,
800,
3726,
3726,
31,
376,
20,
3746,
14,
866,
159,
19,
8247,
28,
40,
13820,
9,
31,
83,
101,
20,
44,
777,
20,
275,
48,
1923,
28,
21,
2105,
30,
31,
92,
15,
26,
823,
15,
275,
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... |
Don't wait for the proccess to exit
===
I have a PHP script that is called from a cron job every minute. This script takes some info from the database and then calls another PHP script using the System function (passing it some parameters).
That means that I can start up to 10 scripts from this "main" one. And what I would like to do is that I would call the script and continue the execution of the main script, that is, not wait for the System call to complete and then call the next one. How can this be done? | 0 | [
2,
221,
22,
38,
1760,
26,
14,
13,
15617,
5052,
18,
20,
4350,
800,
3726,
3726,
31,
57,
21,
13,
26120,
3884,
30,
25,
227,
37,
21,
13,
19587,
1205,
352,
2038,
9,
48,
3884,
1384,
109,
15404,
37,
14,
6018,
17,
94,
3029,
226,
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... |
Compressing HTTP request with LWP, Apache, and mod_deflate
===
I have a client/server system that performs communication using XML transferred using HTTP requests and responses with the client using Perl's LWP and the server running Perl's CGI.pm through Apache. In addition the stream is encrypted using SSL with certificates for both the server and all clients.
This system works well, except that periodically the client needs to send really large amounts of data. An obvious solution would be to compress the data on the client side, send it over, and decompress it on the server. Rather than implement this myself, I was hoping to use Apache's mod_deflate's "Input Decompression" as described [here][1].
The description warns:
> If you evaluate the request body yourself, don't trust the Content-Length header! The Content-Length header reflects the length of the incoming data from the client and not the byte count of the decompressed data stream.
So if I provide a Content-Length value which matches the compressed data size, the data is truncated. This is because mod_deflate decompresses the stream, but CGI.pm only reads to the Content-Length limit.
Alternatively, if I try to outsmart it and override the Content-Length header with the decompressed data size, LWP complains and resets the value to the compressed length, leaving me with the same problem.
Finally, I attempted to hack the part of LWP which does the correction. The original code is:
# Set (or override) Content-Length header
my $clen = $request_headers->header('Content-Length');
if (defined($$content_ref) && length($$content_ref)) {
$has_content = length($$content_ref);
if (!defined($clen) || $clen ne $has_content) {
if (defined $clen) {
warn "Content-Length header value was wrong, fixed";
hlist_remove(\@h, 'Content-Length');
}
push(@h, 'Content-Length' => $has_content);
}
}
elsif ($clen) {
warn "Content-Length set when there is no content, fixed";
hlist_remove(\@h, 'Content-Length');
}
And I changed the push line to:
push(@h, 'Content-Length' => $clen);
Unfortunately this causes some problem where content (truncated or not) doesn't even get to my CGI script.
Has anyone made this work? I found [this][2] which does compression on a file before uploading, but not compressing a generic request.
[1]: http://httpd.apache.org/docs/2.0/mod/mod_deflate.html
[2]: http://hype-free.blogspot.com/2007/07/compressed-http.html | 0 | [
2,
26060,
68,
7775,
3772,
29,
644,
13790,
15,
17140,
15,
17,
7226,
1,
13862,
6554,
800,
3726,
3726,
31,
57,
21,
6819,
118,
10321,
106,
329,
30,
11563,
3291,
568,
23504,
2288,
568,
7775,
12279,
17,
13231,
29,
14,
6819,
568,
416,
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... |
Any way to make a WPF textblock selectable?
===
I want to make the text displayed in the [Witty][1], an open source Twitter client, selectable. It is currently displayed using a custom textblock. I need to use a TextBlock because I'm working with the textblock's inlines to display and format the @username and links as hyperlinks. A frequent request is to be able to copy-paste the text. In order to do that I need to make the TextBlock selectable.
I tried to get it to work by displaying the text using a read-only TextBox styled to look like a textblock but this will not work in my class because a TextBox does not have inlines. In order words, I can't style or format the text within a TextBox individually like I can with a TextBlock.
Any ideas?
[1]: http://code.google.com/p/wittytwitter/ | 0 | [
2,
186,
161,
20,
233,
21,
619,
7721,
1854,
12048,
5407,
579,
60,
800,
3726,
3726,
31,
259,
20,
233,
14,
1854,
6115,
19,
14,
636,
13098,
93,
500,
2558,
165,
500,
15,
40,
368,
1267,
10623,
6819,
15,
5407,
579,
9,
32,
25,
871,
61... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 run a series of processes in C# and keep their environment settings?
===
I am developing an auto-builder that will run a series of steps in our build process and build our target application. We used to use a batch file which set up a bunch of environment variables or called tools that setup environment variables and ultimately runs a 'make'.
I've been using the 'Process' class which works great for running those commands but unfortunately every time one runs which makes changes to the environment (like adding something to the PATH) those variables are lost when the process is complete. How do you handle this situation? Is there a better way to run a series of batch-file like commands within C# and maintain their environment?
Thanks. | 0 | [
2,
184,
107,
31,
485,
21,
231,
16,
5102,
19,
272,
5910,
17,
643,
66,
2307,
12410,
60,
800,
3726,
3726,
31,
589,
3561,
40,
3108,
8,
20904,
30,
129,
485,
21,
231,
16,
2382,
19,
318,
1895,
953,
17,
1895,
318,
2935,
3010,
9,
95,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How often should you hit the Save button?
===
When writing code, I've noticed that different developers hit the Save button at different frequencies. This is in addition to whatever AutoSave setting has been set. Personally I have the AutoSave set to 10 minutes, and I hit the Save button whenever I type a reasonable amount of code (perhaps 10 to 30 lines). How about you guys? | 0 | [
2,
184,
478,
378,
42,
770,
14,
2079,
5167,
60,
800,
3726,
3726,
76,
1174,
1797,
15,
31,
22,
195,
2711,
30,
421,
10168,
770,
14,
2079,
5167,
35,
421,
14798,
9,
48,
25,
19,
848,
20,
2099,
3108,
19863,
2697,
63,
74,
309,
9,
7200,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 doesn't IE7 copy <pre><code> blocks to the clipboard correctly?
===
We've noticed that IE7 has an odd behavor with code blocks posted on Stack Overflow. For example, this little code block:
public PageSizer(string href, int index)
{
HRef = href;
PageIndex = index;
}
Copy and pasted from IE7, ends up like this:
<pre>
public PageSizer(string href, int index){ HRef = href; PageIndex = index; }
</pre>
Not exactly what we had in mind.. the underlying HTML source actually looks fine; if you View Source, you'll see this:
<pre><code>public PageSizer(string href, int index)
{
HRef = href;
PageIndex = index;
}
</code></pre>
So what are we doing wrong? Why can't IE7 copy and paste this HTML in a rational way? | 0 | [
2,
483,
1437,
22,
38,
13,
660,
465,
4344,
13,
1,
3515,
1,
9375,
1,
5198,
20,
14,
12229,
2806,
12044,
60,
800,
3726,
3726,
95,
22,
195,
2711,
30,
13,
660,
465,
63,
40,
4210,
44,
14462,
248,
29,
1797,
5198,
6054,
27,
7566,
20285... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 send an ARP packet from a program?
===
I'm working on an embedded linux system, I'm looking for the source code to the equivalet of SendARP in Windows. Any pointers? | 0 | [
2,
184,
107,
31,
2660,
40,
21,
6952,
12795,
37,
21,
625,
60,
800,
3726,
3726,
31,
22,
79,
638,
27,
40,
12138,
13024,
329,
15,
31,
22,
79,
699,
26,
14,
1267,
1797,
20,
14,
13,
9629,
13631,
38,
16,
2660,
512,
306,
19,
1936,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Probability problem - Duplicates when choosing from large basket.
===
I need to explain to the client why dupes are showing up between 2 supposedly different exams. It's been 20 years since Prob and Stats.
I have a generated Multiple choice exam.
There are 192 questions in the database,
100 are chosen at random (no dupes).
Obviously, there is a 100% chance of there being at least 8 dupes between any two exams so generated. (Pigeonhole principle)
How do I calculate the probability of there being
25 dupes?
50 dupes?
75 dupes? | 0 | [
2,
10177,
1448,
13,
8,
19429,
18,
76,
10883,
37,
370,
9136,
9,
800,
3726,
3726,
31,
376,
20,
3271,
20,
14,
6819,
483,
17938,
160,
50,
3187,
71,
128,
172,
11731,
421,
15954,
9,
32,
22,
18,
74,
434,
122,
179,
895,
220,
17,
12819... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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, with javascript, change the URL in the browser without loading the new page?
===
How would I have a javascript action that may have some effects on the current page but would also change the URL in the browser so if the user hits reload or bookmark the new url is used? It would also be nice if the back button would reload the original URL. | 0 | [
2,
184,
107,
31,
15,
29,
8247,
8741,
15,
753,
14,
287,
6362,
19,
14,
16495,
366,
12797,
14,
78,
2478,
60,
800,
3726,
3726,
184,
83,
31,
57,
21,
8247,
8741,
1028,
30,
123,
57,
109,
2292,
27,
14,
866,
2478,
47,
83,
67,
753,
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... |
DRY way of re-raising same set of exceptions in multiple places
===
short:
Is there a way in Ruby to DRY-ify this:
begin
do_somthing
rescue ExceptionOne, ExceptionTwo, ExceptionEtc => exc
raise exc.exception exc.message
end
longer:
I'm building an interpreter. This interpreter can be called using different entry points. If I feed this interpreter a faulty piece of text, I expect it to raise an error. However, it would be nice if I don't get spammed by the by the entire backtrace of every method called after the entry point, especially since the interpreter makes use of recursion.
As you can see in the above snippet, I already know a way to re raise an error in a transparent way. What I would like do is use the above snippet at different places with the exact same list of errors. The closest I have come thus far is this:
re_raise_known_exceptions {do_something}
def re_raise_known_exceptions
yield
rescue ExceptionOne, ExceptionTwo, ExceptionEtc => exc
raise exc.exception exc.message
end
But that still has re-raise-known-exceptions show up in the back trace. | 0 | [
2,
2273,
161,
16,
302,
8,
22226,
205,
309,
16,
13392,
19,
1886,
1489,
800,
3726,
3726,
502,
45,
25,
80,
21,
161,
19,
10811,
20,
2273,
8,
8612,
48,
45,
2348,
107,
1,
10723,
96,
68,
3655,
5391,
849,
15,
5391,
3734,
15,
5391,
119... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
best way to pick a random subset from a collection?
===
I have a set of objects in a Vector from which I'd like to select a random subset (e.g. 100 items coming back; pick 5 randomly). In my first (very hasty) pass I did an extremely simple and perhaps overly clever solution:
Vector itemsVector = getItems();
Collections.shuffle(itemsVector);
itemsVector.setSize(5);
While this has the advantage of being nice and simple, I suspect it's not going to scale very well, i.e. Collections.shuffle() must be O(n) at least. My less clever alternative is
Vector itemsVector = getItems();
Random rand = new Random(System.currentTimeMillis()); // would make this static to the class
List subsetList = new ArrayList(5);
for (int i = 0; i < 5; i++) {
// be sure to use Vector.remove() or you may get the same item twice
subsetList.add(itemsVector.remove(rand.nextInt(itemsVector.size())));
}
Any suggestions on better ways to draw out a random subset from a Collection? | 0 | [
2,
246,
161,
20,
2036,
21,
5477,
16622,
37,
21,
1206,
60,
800,
3726,
3726,
31,
57,
21,
309,
16,
3916,
19,
21,
7497,
37,
56,
31,
22,
43,
101,
20,
5407,
21,
5477,
16622,
13,
5,
62,
9,
263,
9,
808,
3755,
880,
97,
73,
2036,
33... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Something Good & Something Bad about SharePoint
===
I'm trying to wrap my head around SharePoint. Why is it good? Why is it bad?
At a glance it appears to offer some incredible collaboration tools. However, the cost looks astronomical and it seems to be rigid & difficult to customize.
To those who've worked with SharePoint; please describe something good and something bad about it. | 0 | [
2,
301,
254,
279,
301,
896,
88,
1891,
3132,
800,
3726,
3726,
31,
22,
79,
749,
20,
8118,
51,
157,
140,
1891,
3132,
9,
483,
25,
32,
254,
60,
483,
25,
32,
896,
60,
35,
21,
4828,
32,
1780,
20,
1994,
109,
10287,
4004,
4672,
9,
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... |
Copy&paste from Office 2007 into <textarea>
===
I want to copy and paste text from a Office 2007 document (docx) into a textarea. On Window, using Firefox 3, there is additional jiberish that gets put into the field:
...Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 Normal
0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 Normal 0 false
false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 <!--[if gte mso 9]>...
Seems to be the style information and conditional comments from the newer document structure. Any ideas on how to parse this out, or prevent this from happening? Possibilities are Javascript on the front side, or Java on the back side.
| 0 | [
2,
4344,
1569,
19802,
62,
37,
488,
624,
77,
13,
1,
11969,
17760,
1,
800,
3726,
3726,
31,
259,
20,
4344,
17,
640,
62,
1854,
37,
21,
488,
624,
4492,
13,
5,
13799,
396,
6,
77,
21,
1854,
17760,
9,
27,
1463,
15,
568,
535,
18219,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Does XSLT have a Split() function?
===
I have a string in a node and I'd like to split the string on '?' and return the last item in the array.
For example, in the block below:
<a>
<xsl:attribute name="href">
/newpage.aspx?<xsl:value-of select="someNode"/>
</xsl:attribute>
Link text
</a>
I'd like to split the `someNode` value.
| 0 | [
2,
630,
993,
18,
255,
38,
57,
21,
2132,
5,
6,
1990,
60,
800,
3726,
3726,
31,
57,
21,
3724,
19,
21,
15421,
17,
31,
22,
43,
101,
20,
2132,
14,
3724,
27,
13,
22,
5663,
17,
788,
14,
236,
9101,
19,
14,
7718,
9,
26,
823,
15,
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... |
Searching for UUIDs in text with regex
===
I'm searching for UUIDs in blocks of text using a regex. Currently I'm relying on the assuming that all UUIDs will follow a patttern of 8-4-4-4-12 hexadecimal digits.
Can anyone think of a use case where this assumption would be invalid and would cause me to miss some UUIDs? | 0 | [
2,
5792,
26,
13,
19612,
9178,
19,
1854,
29,
7953,
1706,
800,
3726,
3726,
31,
22,
79,
5792,
26,
13,
19612,
9178,
19,
5198,
16,
1854,
568,
21,
7953,
1706,
9,
871,
31,
22,
79,
21760,
27,
14,
11704,
30,
65,
13,
19612,
9178,
129,
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... |
Java VNC Applet
===
Does any one know of an opensource Java VNC server, that can be run from a web page, so requiring no installation on the server end, possibley applet based. | 0 | [
2,
8247,
566,
6897,
4037,
38,
800,
3726,
3726,
630,
186,
53,
143,
16,
40,
368,
12097,
8247,
566,
6897,
8128,
15,
30,
92,
44,
485,
37,
21,
2741,
2478,
15,
86,
9052,
90,
7758,
27,
14,
8128,
241,
15,
938,
93,
4037,
38,
432,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Using .Net's Reflection.Emit to generate interface
===
I need to generate a new interface at run-time with all the same members as an existing interface, except that I will be putting different attributes on some of the methods (some of the attribute parameters are not known until run-time). Can anyone assist? | 0 | [
2,
568,
13,
9,
2328,
22,
18,
9138,
9,
7411,
38,
20,
7920,
6573,
800,
3726,
3726,
31,
376,
20,
7920,
21,
78,
6573,
35,
485,
8,
891,
29,
65,
14,
205,
443,
28,
40,
3149,
6573,
15,
1613,
30,
31,
129,
44,
3873,
421,
13422,
27,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Possible to retrieve IDENTITY column value on insert using SqlCommandBuilder (without using Stored Proc)?
===
FYI: I am running on dotnet 3.5 SP1
I am trying to retrieve the value of an identity column into my dataset after performing an update (using a SqlDataAdapter and SqlCommandBuilder).
After performing SqlDataAdapter.Update(myDataset), I want to be able to read the auto-assigned value of myDataset.tables(0).Rows(0)("ID"), but it is System.DBNull (despite the fact that the row was inserted).
(Note: I do not want to explicitly write a new stored procedure to do this!)
One method often posted [http://forums.asp.net/t/951025.aspx][1] modifies the SqlDataAdapter.InsertCommand and UpdatedRowSource like so:
SqlDataAdapter.InsertCommand.CommandText += "; SELECT MyTableID = SCOPE_IDENTITY()"
InsertCommand.UpdatedRowSource = UpdateRowSource.FirstReturnedRecord
Apparently, this seemed to work for many people in the past, but does not work for me.
Another technique: [http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=619031&SiteID=1][2] doesn't work for me either, as after executing the SqlDataAdapter.Update, the SqlDataAdapter.InsertCommand.Parameters collection is reset to the original (losing the additional added parameter).
Does anyone know the answer to this???
[1]: http://forums.asp.net/t/951025.aspx
[2]: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=619031&SiteID=1 | 0 | [
2,
938,
20,
11917,
3270,
4698,
1923,
27,
14692,
568,
4444,
255,
16239,
20904,
13,
5,
14506,
568,
8214,
13,
15617,
6,
60,
800,
3726,
3726,
398,
6906,
45,
31,
589,
946,
27,
14123,
2328,
203,
9,
264,
3782,
165,
31,
589,
749,
20,
11... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Determining if a folder is shared, .NET
===
Is there a way through the .net framework to determine if a folder is shared or not?
Neither Diretory, DirectoryInfo or FileAttributes seem to have any corresponding field. | 0 | [
2,
13521,
100,
21,
19294,
25,
2592,
15,
13,
9,
2328,
800,
3726,
3726,
25,
80,
21,
161,
120,
14,
13,
9,
2328,
6596,
20,
3746,
100,
21,
19294,
25,
2592,
54,
52,
60,
3028,
18473,
14599,
15,
16755,
108,
4120,
54,
3893,
721,
14755,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How best to avoid scope creep as a developer when no project management
===
I'm a s/w developer in a small internal IT department within a financial firm and have worked on a number of small-medium sized projects that have had little or no project management throughout. This seems to always result in scope creep and therefore not meeting deadlines and having to sacrifice good design/code to satisfy users/managers in the short term.
What can I do as a developer to ensure user requirements are nailed down before any code is written and that any change requests are properly managed, considering the demands and expectations of users/managers.
Thanks. | 0 | [
2,
184,
246,
20,
2658,
9914,
14478,
28,
21,
10058,
76,
90,
669,
1097,
800,
3726,
3726,
31,
22,
79,
21,
13,
18,
118,
499,
10058,
19,
21,
284,
3117,
32,
604,
363,
21,
1553,
1904,
17,
57,
577,
27,
21,
234,
16,
284,
8,
28451,
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... |
Pro/Con: initializing a variable in a Conditional Statment (C++)
===
In C++ you can initialize a variable in an if statement, like so:
if (CThing* pThing = GetThing())
{
}
Why would one consider this bad or good style? What are the benefits and disadvantages?
Personally i like this style because it limits the scope of the pThing variable, so it can never be used accidentally when it is NULL. However, i don't like that you can't do this:
if (CThing* pThing = GetThing() && pThing->IsReallySomeThing())
{
}
If there's a way to make the above work, please post. But if that's just not possible, i'd still like to know why.
[Question borrowed from here, similar topic but PHP.][1]
[1]: http://stackoverflow.com/questions/136373/initializing-a-variable-in-a-conditional-statment
| 0 | [
2,
895,
118,
1126,
45,
2104,
3335,
21,
7612,
19,
21,
21206,
12819,
1130,
13,
5,
150,
20512,
6,
800,
3726,
3726,
19,
272,
20512,
42,
92,
2104,
2952,
21,
7612,
19,
40,
100,
3331,
15,
101,
86,
45,
100,
13,
5,
150,
96,
68,
2483,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
expect script: timeout doesn't work with -re flag
===
I'm trying to get an expect script to work, and when I use the -re flag (to invoke regular expression parsing), the 'timeout' keyword seems to no longer work. When the following script is run, I get the message 'timed out at step 1', then 'starting step 2' and then it times out but does NOT print the 'timed out at step 2' I just get a new prompt.
Ideas?
#!/usr/bin/expect --
spawn $env(SHELL)
match_max 100000
set timeout 2
send "echo This will print timed out\r"
expect {
timeout { puts "timed out at step 1" }
"foo " { puts "it said foo at step 1"}
}
puts "Starting test two\r"
send "echo This will not print timed out\r"
expect -re {
timeout { puts "timed out at step 2" ; exit }
"foo " { puts "it said foo at step 2"}
}
| 0 | [
2,
4186,
3884,
45,
85,
1320,
1437,
22,
38,
170,
29,
13,
8,
99,
3157,
800,
3726,
3726,
31,
22,
79,
749,
20,
164,
40,
4186,
3884,
20,
170,
15,
17,
76,
31,
275,
14,
13,
8,
99,
3157,
13,
5,
262,
28371,
1290,
1803,
2017,
18,
68... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 have a Label inherite a Composite's GC in SWT
===
I'm writing an app and our designer's want's to user gradient's as some the backgrounds on a few of our composite's.
I have the following code:
composite.addListener (SWT.Paint, new Listener () {
public void handleEvent (Event e) {
GC gc = e.gc;
Rectangle rect = composite.getClientArea ();
Color color1 = new Color (display, 0, 0, 0);
Color color2 = new Color (display, 255, 255, 255);
gc.setForeground(color1);
gc.setBackground(color2);
gc.fillGradientRectangle (rect.x, rect.y, rect.width, rect.height , true);
}
});
This draw's the gradient fine on the composite, but we have Label/CLabel's, Canvas's and Link's ontop of the composite.
In these area's the background is just the plain gray you get when drawing and empty canvas.
I've tried forcing the Label's to inherit the background like so:
label.setBackgroundMode(SWT.INHERIT_DEFAULT) //SWT.INHERIT_FORCE Doesn't work either
But this leaves me with the same default gray and no gradient behind the components on top of the Composite.
Any suggestion's for getting the gradient to be the background of each element?
I wouldn't be apposed to drawing the Gradient onto a gc with an imagine supplied and then setting the background to that Image. However that method just hasn't been working at all, composite or any of it's elements.
Also it's not possible for me to set the gradient individually to my knowledge.We want the whole composite to be one uniform flowing gradient.
Thanks,
Brian Gianforcaro | 0 | [
2,
184,
20,
57,
21,
1899,
17569,
62,
21,
12639,
22,
18,
13,
10362,
19,
8783,
38,
800,
3726,
3726,
31,
22,
79,
1174,
40,
4865,
17,
318,
4742,
22,
18,
259,
22,
18,
20,
4155,
17442,
22,
18,
28,
109,
14,
2395,
18,
27,
21,
310,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Disabling interstitial graphic when using cfdiv binding
===
Is there a way to keep the "Loading..." graphic from appearing when cfdiv refreshes? I'd like to prevent the flicker of loading the graphic then loading the new html. | 0 | [
2,
1460,
58,
8599,
1480,
384,
242,
2815,
8479,
76,
568,
10084,
12916,
8728,
800,
3726,
3726,
25,
80,
21,
161,
20,
643,
14,
13,
7,
16866,
9,
9,
9,
7,
8479,
37,
4870,
76,
10084,
12916,
24905,
160,
60,
31,
22,
43,
101,
20,
2501,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
What is the difference between Application and Cache in ASP.NET?
===
What the difference between `Application("some-object")` and `Cache("some-object")` in ASP.NET? | 0 | [
2,
98,
25,
14,
2841,
128,
3010,
17,
16522,
19,
28,
306,
9,
2328,
60,
800,
3726,
3726,
98,
14,
2841,
128,
13,
1,
2552,
20669,
5,
7,
3220,
8,
23793,
7,
6,
1,
17,
13,
1,
793,
2569,
5,
7,
3220,
8,
23793,
7,
6,
1,
19,
28,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Duplicate Data over One-to-Many self relation (Tsql)
===
Sorry if the title is poorly descriptive, but I can't do better right now =(
So, I have this master-detail scheme, with the detail being a tree structure (one to many self relation) with n levels (on SQLServer 2005)
I need to copy a detail structure from one master to the another using a stored procedure, by passing the source master id and the target master id as parameters (the target is new, so it doesn't has details).
I'm having troubles, and asking for your kind help in finding a way to keep track of parent id's and inserting the children without using cursors or nasty things like that...
| 0 | [
2,
19429,
1054,
84,
53,
8,
262,
8,
14842,
1119,
5827,
13,
5,
38,
18,
22402,
6,
800,
3726,
3726,
1875,
100,
14,
581,
25,
10614,
25508,
15,
47,
31,
92,
22,
38,
107,
574,
193,
130,
800,
5,
86,
15,
31,
57,
48,
1129,
8,
546,
86... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I programatically force an onchange event on an input?
===
How do I programatically force an onchange event on an input?
I've tried something like this:
var code = ele.getAttribute('onchange');
eval(code);
But my end goal is to fire any listener functions, and that doesn't seem to work. Neither does just updating the 'value' attribute. | 0 | [
2,
184,
107,
31,
625,
721,
8438,
558,
40,
27,
16229,
807,
27,
40,
6367,
60,
800,
3726,
3726,
184,
107,
31,
625,
721,
8438,
558,
40,
27,
16229,
807,
27,
40,
6367,
60,
31,
22,
195,
794,
301,
101,
48,
45,
4033,
1797,
800,
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... |
How do I get a selection model to work with a proxy model?
===
I have a model and two views set up like this:
Model ---> OSortFilterProxyModel ---> OListView
Model ------------------------------> OTableView
When the user selects something in one of the views, I want the other view to mirror that selection. So I thought I'd use a QSelectionModel to link them together. But this does not work. I have a feeling it is because the views think they have two different models, when in fact they have the same model. Is there a way to get this to work? | 0 | [
2,
184,
107,
31,
164,
21,
3155,
1061,
20,
170,
29,
21,
27188,
1061,
60,
800,
3726,
3726,
31,
57,
21,
1061,
17,
81,
4146,
309,
71,
101,
48,
45,
1061,
13,
8,
8,
8,
1,
635,
22843,
11924,
815,
4899,
9229,
13998,
13,
8,
8,
8,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What does AllowLocation="true" do in System.Web section of Web.Config?
===
We have a .NET 2.0 application which we normally run on IIS6, and used to run fine on IIS7, but recently after installing SP1 for Vista IIS7 seems to be choking on a line in the Web.Config file:
<system.web AllowLocation="true">
Is it safe to remove the AllowLocation attribute? What does this attribute do? | 0 | [
2,
98,
630,
1655,
19032,
3726,
7,
13398,
7,
107,
19,
329,
9,
14113,
1050,
16,
2741,
9,
14093,
2816,
60,
800,
3726,
3726,
95,
57,
21,
13,
9,
2328,
172,
9,
387,
3010,
56,
95,
4147,
485,
27,
595,
18,
379,
15,
17,
147,
20,
485,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 compare multiple .resx files?
===
How can I compare the content of two (or more) large .resx files? With hundreds of Name/Value pairs in each file, it'd be very helpful to view a combined version. I'm especially interested in Name/Value pairs which are present in the neutral culture but are not also specified in a culture-specific version. | 0 | [
2,
184,
92,
31,
11590,
1886,
13,
9,
99,
18,
396,
6488,
60,
800,
3726,
3726,
184,
92,
31,
11590,
14,
2331,
16,
81,
13,
5,
248,
91,
6,
370,
13,
9,
99,
18,
396,
6488,
60,
29,
4541,
16,
204,
118,
15165,
7473,
19,
206,
3893,
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... |
PHP regex to remove multiple ?-marks
===
I'm having trouble coming up with the correct regex string to remove a sequence of multiple ? characters. I want to replace more than one sequential ? with a single ?, but which characters to escape...is escaping me.
Example input:
> Is this thing on??? or what???
Desired output:
> Is this thing on? or what?
I'm using [preg_replace()][1] in PHP.
[1]: http://php.net/preg_replace | 0 | [
2,
13,
26120,
7953,
1706,
20,
4681,
1886,
13,
60,
8,
4527,
18,
800,
3726,
3726,
31,
22,
79,
452,
2572,
880,
71,
29,
14,
4456,
7953,
1706,
3724,
20,
4681,
21,
4030,
16,
1886,
13,
60,
1766,
9,
31,
259,
20,
3934,
91,
119,
53,
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... |
long compile times and lost productivity
===
How long can a compile time get before it start becoming a [distraction][1]
- <1 sec, I don't notice
- >1 min, I'm going for coffee
- >10 min, S.O. here I come
[1]: http://xkcd.com/303/
| 0 | [
2,
175,
26561,
436,
17,
529,
18211,
800,
3726,
3726,
184,
175,
92,
21,
26561,
85,
164,
115,
32,
799,
1535,
21,
636,
2906,
19915,
872,
500,
2558,
165,
500,
13,
8,
13,
1,
165,
9265,
15,
31,
221,
22,
38,
3551,
13,
8,
13,
1,
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... |
Programatically logging to the Sharepoint ULS
===
I'd like to log stuff in my Sharepoint Web Parts, but I want it to go into the ULS. Most examples that I've found log into the Event Log or some other file, but I did not really find one yet for logging into the ULS.
Annoyingly, Microsoft.SharePoint.Diagnostics Classes are all marked Internal. I did find [one example][1] of how to use them anyway through reflection, but that looks really risky and unstable, because Microsoft may change that class with any hotfix they want.
The Sharepoint Documentation wasn't really helpful either - lots of Administrator info about what ULS is and how to configure it, but i have yet to find an example of supported code to actually log my own events.
Any hints or tips?
[1]: http://www.codeplex.com/SharePointOfView/SourceControl/FileView.aspx?itemId=244213&changeSetId=13835 | 0 | [
2,
625,
721,
8438,
13,
13919,
20,
14,
1891,
3132,
13,
1287,
18,
800,
3726,
3726,
31,
22,
43,
101,
20,
6738,
3217,
19,
51,
1891,
3132,
2741,
1341,
15,
47,
31,
259,
32,
20,
162,
77,
14,
13,
1287,
18,
9,
127,
3770,
30,
31,
22,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why would you NOT run a business-critical C# console application via the debugger?
===
I'm looking for a few talking points I could use to convince coworkers that it's NOT OK to run a 24/7 production application by simply opening Visual Studio and running the app in debug mode.
What's different about running a compiled console application vs. running that same app in debug mode?
Are there ever times when you would use the debugger in a live setting? (live: meaning connected to customer facing databases)
Am I wrong in assuming that it's always a bad idea to run a live configuration via the debugger? | 0 | [
2,
483,
83,
42,
52,
485,
21,
508,
8,
21522,
272,
5910,
8650,
3010,
1197,
14,
121,
2345,
11356,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
310,
1582,
819,
31,
110,
275,
20,
6218,
326,
16355,
30,
32,
22,
18,
52,
5854,
20,
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... |
Can I use a Hashtable in a unified EL expression on a c:forEach tag using JSF 1.2 with JSP 2.1?
===
I have a Hashtable<Integer, Sport> called sportMap and a list of sportIds (List<Integer> sportIds) from my backing bean. The Sport object has a List<String> equipmentList. Can I do the following using the unified EL to get the list of equipment for each sport?
<h:dataTable value="#{bean.sportIds}" var="_sportId" >
<c:forEach items="#{bean.sportMap[_sportId].equipmentList}" var="_eqp">
<h:outputText value="#{_eqp}"></h:outputText>
<br/>
</c:forEach>
</h:dataTable>
I get the following exception when trying to run this JSP code.
<pre> 15:57:59,438 ERROR [ExceptionFilter] exception root cause
javax.servlet.ServletException: javax.servlet.jsp.JspTagException:
Don't know how to iterate over supplied "items" in &lt;forEach&gt;</pre>
Here's a print out of my environment
<pre>
Server: JBossWeb/2.0.1.GA
Servlet Specification: 2.5
JSP version: 2.1
JSTL version: 1.2
Java Version: 1.5.0_14
</pre>
Note: The following does work using a JSF tag. It prints out the list of equipment for each sport specified in the list of sportIds.
<h:dataTable value="#{bean.sportIds}" var="_sportId" >
<h:outputText value="#{bean.sportMap[_sportId].equipmentList}">
</h:outputText>
</h:dataTable>
I would like to use the c:forEach tag. Does anyone know if this is possible? If not, anyone have suggestions? In the end I want a stacked list instead of the comma seperated list provided by equipmentList.toString(); (Also, don't want to override toString()).
| 0 | [
2,
92,
31,
275,
21,
19170,
5924,
19,
21,
11496,
931,
1803,
27,
21,
272,
45,
1106,
14322,
3383,
568,
487,
18,
410,
137,
9,
135,
29,
487,
3401,
172,
9,
165,
60,
800,
3726,
3726,
31,
57,
21,
19170,
5924,
1569,
255,
38,
73,
6391,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a one-liner to read in a file to a string in C++?
===
I need a quick easy way to get a string from a file in standard C++. I can write my own, but just want to know if there is already a standard way, in C++.
Equivalent of this if you know Cocoa:
NSString *string = [NSString stringWithContentsOfFile:file];
| 0 | [
2,
25,
80,
21,
53,
8,
14813,
20,
1302,
19,
21,
3893,
20,
21,
3724,
19,
272,
20512,
60,
800,
3726,
3726,
31,
376,
21,
2231,
2010,
161,
20,
164,
21,
3724,
37,
21,
3893,
19,
1236,
272,
20512,
9,
31,
92,
2757,
51,
258,
15,
47,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What logging tool do you use?
===
I've recently been introduced to [log4net][1] for use with a .NET app; I've never used a third-party tool for logging before.
What other logging tools do you use for which language and why?
[1]: http://logging.apache.org/log4net/ | 0 | [
2,
98,
13,
13919,
5607,
107,
42,
275,
60,
800,
3726,
3726,
31,
22,
195,
1989,
74,
1277,
20,
636,
5567,
300,
2328,
500,
2558,
165,
500,
26,
275,
29,
21,
13,
9,
2328,
4865,
73,
31,
22,
195,
243,
147,
21,
422,
8,
9635,
5607,
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... |
SAP R/3 package code modification
===
I'm trying to determine how to modify SAP R/3 package code of an installed system. Can anyone suggest the module/tool for that? | 0 | [
2,
7508,
761,
16842,
6030,
1797,
16135,
800,
3726,
3726,
31,
22,
79,
749,
20,
3746,
184,
20,
17579,
7508,
761,
16842,
6030,
1797,
16,
40,
4066,
329,
9,
92,
1276,
5601,
14,
12613,
118,
20799,
26,
30,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Why doesn't a <table>'s margin collapse with an adjacent <p>?
===
From my understanding of the CSS spec, a table above or below a paragraph should collapse vertical margins with it. However, that's not happening here:
<table style="margin: 100px; border: solid red 2px">
<tr><td>
This is a one-celled table with 100px margin all around.
</td></tr>
</table>
<p style="margin:100px">This is a paragraph with 100px margin all around.</p>
I thought there would be 100px between the two elements, but there are 200px -- the margins aren't collapsing.
Why not? | 0 | [
2,
483,
1437,
22,
38,
21,
13,
1,
5924,
1,
22,
18,
5440,
6529,
29,
40,
4209,
13,
1,
306,
1,
60,
800,
3726,
3726,
37,
51,
3260,
16,
14,
272,
18,
18,
12737,
15,
21,
859,
784,
54,
1021,
21,
20599,
378,
6529,
7035,
5440,
18,
29... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Key Presses in Python
===
Is it possible to make it appear to a system that a key was pressed, for example I need to make a the 'A' key be pressed thousands of times, and it is much to time consuming to do it manually, I would like to write something to do it for me, and the only thing I know well enough is Python.
A better way to put it, I need to emulate a key press, I.E. not capture a key press. | 0 | [
2,
1246,
16527,
19,
20059,
800,
3726,
3726,
25,
32,
938,
20,
233,
32,
1893,
20,
21,
329,
30,
21,
1246,
23,
2931,
15,
26,
823,
31,
376,
20,
233,
21,
14,
13,
22,
58,
22,
1246,
44,
2931,
3805,
16,
436,
15,
17,
32,
25,
212,
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... |
Python language API
===
I'm starting with Python coming from java.
I was wondering if there exists something similar to JavaDoc API where I can find the class, its methods and and example of how to use it.
I've found very helpul to use *help( thing )* from the Python ( command line )
I have found this also:
http://docs.python.org/
http://docs.python.org/modindex.html
But it seems to help when you already the class name you are looking for. In JavaDoc API I have all the classes so if I need something I scroll down to a class that "sounds like" what I need. Or some times I just browse all the classes to see what they do, and when I need a feature my brain recalls me *We saw something similar in the javadoc remember!?*
But I don't seem to find the similar in Python ( yet ) and that why I'm posting this questin.
BTW I know that I would eventually will read this:
http://docs.python.org/lib/lib.html
But, well, I think it is not today.
I'm not trying to find the same feature java has ( is like trying to find in one woman, what the previous have :P ) But ... well.
| 0 | [
2,
20059,
816,
21,
2159,
800,
3726,
3726,
31,
22,
79,
1422,
29,
20059,
880,
37,
8247,
9,
31,
23,
5712,
100,
80,
5636,
301,
835,
20,
8247,
13799,
21,
2159,
113,
31,
92,
477,
14,
718,
15,
82,
3195,
17,
17,
823,
16,
184,
20,
27... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you make StackWalk64() work successfully on x64?
===
I have a C++ tool that walks the call stack at one point. In the code, it first gets a copy of the live CPU registers, then uses a few "`#ifdef ...`" blocks to save the CPU-specific register names into `stackframe.AddrPC.Offset`, ...`AddrStack`..., and ...`AddrFrame`... . (This was borrowed from some example code I came across a while back.)
With an x86 binary, this works great. With an x64 binary, though, StackWalk64() passes back bogus addresses. <i>(The first time the API is called, the only blatantly bogus address value appears in `AddrReturn` ( == `0xFFFFFFFF'FFFFFFFE` -- aka StackWalk64()'s 3rd arg, the pseudo-handle returned by GetCurrentThread()). If the API is called a second time, however, all `Addr`... variables receive bogus addresses.)</i> This happens regardless of how `AddrFrame` is set:
- using either of the recommended x64 "base/frame pointer" CPU registers: `rbp` (= `0xf`), or `rdi` (= `0x0`)
- using `rsp` <i>(didn't expect it to work, but tried it anyway)</i>
- setting `AddrPC` and `AddrStack` normally, but leaving `AddrFrame` zeroed out <i>(seen in other example code)</i>
- zeroing out all `Addr`... values, to let StackWalk64() fill them in from the passed-in CPU-register context <i>(seen in other example code)</i>
FWIW, the physical stack buffer's contents are also different on x64 vs. x86 (after accounting for different pointer widths & stack buffer locations, of course). Regardless of the reason, StackWalk64() should still be able to walk the call stack correctly -- heck, the debugger <u>is</u> still able to walk the call stack, and it appears to use StackWalk64() itself behind the scenes. The oddity there is that the (correct) call stack reported by the debugger contains base-address & return-address pointer values whose constituent bytes don't actually exist in the stack buffer (below or above the current stack pointer).
<i>(FWIW #2: Given the stack-buffer strangeness above, I did try disabling ASLR (`/dynamicbase:no`) to see if it made a difference, but the binary still exhibited the same behavior.)</i>
So. Any ideas why this would work fine on x86, but have problems on x64? Any suggestions on how to fix it? | 0 | [
2,
184,
107,
42,
233,
7566,
10915,
3470,
5,
6,
170,
3673,
27,
993,
3470,
60,
800,
3726,
3726,
31,
57,
21,
272,
20512,
5607,
30,
7423,
14,
645,
7566,
35,
53,
454,
9,
19,
14,
1797,
15,
32,
64,
3049,
21,
4344,
16,
14,
515,
1757... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Structured UAT approaches
===
As a developer I often release different versions of applications that I want tested by users to identify bugs and to confirm requirements are being met.
I give the users a rough idea of what I have changed or new features that need testing, but this seems a bit slap-dash and not very well strucutured.
I'd like to know what approaches or procedures others take when asking for UAT during iterative development.
Thanks. | 0 | [
2,
17784,
287,
721,
7501,
800,
3726,
3726,
28,
21,
10058,
31,
478,
830,
421,
3281,
16,
3767,
30,
31,
259,
7631,
34,
3878,
20,
5808,
13925,
17,
20,
10265,
4786,
50,
142,
798,
9,
31,
590,
14,
3878,
21,
4182,
882,
16,
98,
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... |
How to check for null values before doing .AddDays() in SSRS?
===
I have the following as the value for my textbox in SSRS report:
=iif(IsNothing(Fields!MyDate.Value), "", Format(Fields!MyDate.Value.AddDays(30), "MMMM dd, yyyy"))
It gives me an "#Error" every time MyDate is null.
How do i work around this?
p.s. you solution **has to be inline** | 0 | [
2,
184,
20,
2631,
26,
16203,
4070,
115,
845,
13,
9,
14854,
1185,
18,
5,
6,
19,
22118,
18,
60,
800,
3726,
3726,
31,
57,
14,
249,
28,
14,
1923,
26,
51,
1854,
5309,
19,
22118,
18,
1330,
45,
800,
49,
821,
5,
403,
8297,
5,
1109,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SQL Server Agent Job - Exists then Drop?
===
Is there a similar way in SQL to achieve the following, but with sql server agent jobs instead?
here's how I do it for stored procedures..
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[storedproc]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[storedproc]
GO
CREATE PROCEDURE [dbo].[storedproc] ...
| 0 | [
2,
4444,
255,
8128,
2267,
1205,
13,
8,
5636,
94,
2804,
60,
800,
3726,
3726,
25,
80,
21,
835,
161,
19,
4444,
255,
20,
4689,
14,
249,
15,
47,
29,
4444,
255,
8128,
2267,
4844,
700,
60,
235,
22,
18,
184,
31,
107,
32,
26,
8214,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why do madal dialogs that are opened through a menu item's click event process all window messages?
===
So for the past day or so I have been fixing a bug that is caused by a modal dialog. I work on an application which communicates with the server through the Windows message pump. When I use ShowDialog() to show a modal form, the message pump is blocked and none of my messages are processed, yet they do build up in the queue (expected behavior).
However, I recently noticed that if a modal form is opened through a menu item's click event, the messages are pumped to the main form and processed. Does anyone know why these messages are not blocked when a modal form is shown through a menu item's click event?
| 0 | [
2,
483,
107,
2073,
192,
28223,
18,
30,
50,
520,
120,
21,
11379,
9101,
22,
18,
10840,
807,
953,
65,
1463,
7561,
60,
800,
3726,
3726,
86,
26,
14,
640,
208,
54,
86,
31,
57,
74,
20047,
21,
6256,
30,
25,
1497,
34,
21,
13,
20756,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Format mysql datetime with php
===
Column in mysql database named CreateDate, need to format to mm/dd/yy H:M (AM/PM) with PHP syntax
| 0 | [
2,
2595,
51,
18,
22402,
1231,
891,
29,
13,
26120,
800,
3726,
3726,
4698,
19,
51,
18,
22402,
6018,
377,
679,
1373,
15,
376,
20,
2595,
20,
1620,
118,
8096,
118,
93,
93,
746,
45,
79,
13,
5,
765,
118,
5576,
6,
29,
13,
26120,
22649... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do you make Python / PostgreSQL faster?
===
Right now I have a log parser reading through 515mb of plain-text files (a file for each day over the past 4 years). My code currently stands as this: [http://gist.github.com/12978][1]. I've used psyco (as seen in the code) and I'm also compiling it and using the compiled version. It's doing about 100 lines every 0.3 seconds. The machine is a standard 15" MacBook Pro (2.4ghz C2D, 2GB RAM)
Is it possible for this to go faster or is that a limitation on the language/database?
[1]: http://gist.github.com/12978 | 0 | [
2,
184,
107,
42,
233,
20059,
13,
118,
678,
6879,
18,
22402,
4233,
60,
800,
3726,
3726,
193,
130,
31,
57,
21,
6738,
2017,
4104,
1876,
120,
13,
23554,
5024,
16,
3748,
8,
11969,
6488,
13,
5,
58,
3893,
26,
206,
208,
84,
14,
640,
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... |
Is there a "do ... while" loop in Ruby?
===
I'm using this code to let the user enter in names while the program stores them in an array until they enter an empty string (they must press enter after each name):
people = []
info = 'a' # must fill variable with something, otherwise loop won't execute
while not info.empty?
info = gets.chomp
people += [Person.new(info)] if not info.empty?
end
This code would look much nicer in a do ... while loop:
people = []
do
info = gets.chomp
people += [Person.new(info)] if not info.empty?
while not info.empty?
In this code I don't have to assign info to some random string.
Unfortunately this type of loop doesn't seem to exist in Ruby. Can anybody suggest a better way of doing this? | 0 | [
2,
25,
80,
21,
13,
7,
537,
13,
9,
9,
9,
133,
7,
5293,
19,
10811,
60,
800,
3726,
3726,
31,
22,
79,
568,
48,
1797,
20,
408,
14,
4155,
2830,
19,
1817,
133,
14,
625,
4134,
105,
19,
40,
7718,
163,
59,
2830,
40,
2424,
3724,
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... |
Is it ethical to monitor users?
===
My boss is asking me to put some tracking info on what users do with their application. It is not about collecting sensitive data but there might be some screenshots involved and I am not sure if this is a breach of privacy.
Would love to hear any thoughts on this or if you handled something similar. | 4 | [
2,
25,
32,
14317,
20,
7626,
3878,
60,
800,
3726,
3726,
51,
4054,
25,
3379,
55,
20,
442,
109,
10353,
15404,
27,
98,
3878,
107,
29,
66,
3010,
9,
32,
25,
52,
88,
10079,
7830,
1054,
47,
80,
530,
44,
109,
2324,
7868,
18,
1013,
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... |
What can cause mutated Flash display like this?
===
I'm having a weird cross-browser flash problem. Please see the screenshot below. I have seen this behaviour before, but I cannot recall what the cause was. Can someone please tell me why this happens, and possible actions I can take to fix it?
![flash problem in ie7 and firefox][1]
[1]: http://i34.tinypic.com/prn8g.png "problem" | 0 | [
2,
98,
92,
1679,
29891,
4433,
3042,
101,
48,
60,
800,
3726,
3726,
31,
22,
79,
452,
21,
5455,
919,
8,
25699,
4104,
4433,
1448,
9,
2247,
196,
14,
2324,
7868,
1021,
9,
31,
57,
541,
48,
7727,
115,
15,
47,
31,
1967,
7111,
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... |
Reference .NET Assembly from a SQL Server Stored procedure or function
===
Is it possible to reference a .NET Assembly from a SQL Server Stored procedure or function, or otherwise access the clr code from SQL Server? | 0 | [
2,
2801,
13,
9,
2328,
1475,
37,
21,
4444,
255,
8128,
8214,
7004,
54,
1990,
800,
3726,
3726,
25,
32,
938,
20,
2801,
21,
13,
9,
2328,
1475,
37,
21,
4444,
255,
8128,
8214,
7004,
54,
1990,
15,
54,
3190,
1381,
14,
10842,
139,
1797,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How to solve this error : The permissions granted to user 'COMPUTERNAME\\ASPNET' are insufficient for performing this operation. (rsAccessDenied)
===
I am trying to integrate the SSRS report to my web page:
The code is as follows:
ReportViewer1.ProcessingMode = rocessingMode.Remote;
ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://localhost/reportserver");
ReportViewer1.ServerReport.ReportPath = "/Report Project1/Reconciliation";
List<ReportParameter> paramList = new List<ReportParameter>();
paramList.Add(new ReportParameter("StartDate", startdate.ToString(), false));
paramList.Add(new ReportParameter("EndDate", enddate.ToString(), false));
this.ReportViewer1.ServerReport.SetParameters(paramList);
ReportViewer1.Visible = true;
I am getting this error when iam trying to run this report:
**The permissions granted to user 'COMPUTERNAME\\ASPNET' are insufficient for performing this operation. (rsAccessDenied)"}
System.Exception {Microsoft.Reporting.WebForms.ReportServerException}**
can anyone suggest what I am doing wrong. | 0 | [
2,
184,
20,
8402,
48,
7019,
13,
45,
14,
5572,
18,
2743,
20,
4155,
13,
22,
18448,
7259,
1,
472,
306,
2328,
22,
50,
14748,
26,
2955,
48,
1453,
9,
13,
5,
1224,
20604,
817,
49,
69,
6,
800,
3726,
3726,
31,
589,
749,
20,
18399,
14... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you check if a variable is used in a project programatically?
===
In VB.NET (or C#) how can I determine programmaticly if a public variable in class helper.vb is used anywhere within a project.
Thanks in advance | 0 | [
2,
184,
107,
42,
2631,
100,
21,
7612,
25,
147,
19,
21,
669,
625,
721,
8438,
60,
800,
3726,
3726,
19,
13,
20468,
9,
2328,
13,
5,
248,
272,
5910,
6,
184,
92,
31,
3746,
625,
6732,
102,
100,
21,
317,
7612,
19,
718,
448,
106,
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,
0,
0,
0,
0,
0... |
What is a cross platform way to select a random seed in Java?
===
After reading this answer:
<http://stackoverflow.com/questions/136474/best-way-to-pick-a-random-subset-from-a-collection#136513>
It got me wondering, how does one pick a random seed in Java?
That's a hard question, but let me make it harder. Let's say you need to generate a random seed without connecting to the internet, without using user input (IE, there's no gui), and it has to be cross platform (therefore no JNI to access hardware).
Is there some JVM variables we can monitor as a source of our randomness?
Can this be done? Or is it impossible? | 0 | [
2,
98,
25,
21,
919,
2452,
161,
20,
5407,
21,
5477,
5134,
19,
8247,
60,
800,
3726,
3726,
75,
1876,
48,
1623,
45,
13,
1,
21127,
6903,
25325,
2549,
9990,
9,
960,
118,
24652,
18,
118,
13690,
2918,
12918,
4936,
8,
1443,
8,
262,
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... |
C# Array initialization - with non-default value
===
What is the slickest way to initialize an array of dynamic size in C# that you know of?
This is the best I could come up with
private bool[] GetPageNumbersToLink(IPagedResult result)
{
if (result.TotalPages <= 9)
return new bool[result.TotalPages + 1].Select(b => true).ToArray();
...
Thanks!
Rob | 0 | [
2,
272,
5910,
7718,
2104,
1829,
13,
8,
29,
538,
8,
13862,
9708,
1923,
800,
3726,
3726,
98,
25,
14,
12544,
1430,
161,
20,
2104,
2952,
40,
7718,
16,
7782,
1072,
19,
272,
5910,
30,
42,
143,
16,
60,
48,
25,
14,
246,
31,
110,
340,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 sure a user is only logged in once?
===
A few years ago I developed a web app for which we wanted to make sure the users weren't sharing credentials.
One of the things we decided to to, was only allow the user to be logged in from one computer at a time. The way I did this, was to have a little iframe ping the server every N seconds; as long as the server had a heartbeat for a particular user (from a particular IP), that user was not allowed to log in from any other IP.
The solution, although approved by my manger, always seemed hacky to me. Also, it seems like it would be easy to circumvent.
Is there a good way to make sure a web app user only logs in once? To be honest, I never understood why management even wanted this feature. Does it make sense to enforce this on distributed apps? | 0 | [
2,
184,
107,
31,
233,
562,
21,
4155,
25,
104,
13,
19287,
19,
382,
60,
800,
3726,
3726,
21,
310,
122,
1464,
31,
885,
21,
2741,
4865,
26,
56,
95,
417,
20,
233,
562,
14,
3878,
4144,
22,
38,
6126,
5059,
43,
10107,
18,
9,
53,
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... |
Are you using BizTalk? If so, how are you using it?
===
At my last place of employment, I used BTS quite a bit. However, I've noticed that managers often want to use it for the wrong things, and developers are hesitant to adopt it.
So, I'm just wondering, how's BTS being used? Please post experiences, not theories.
Thanks! | 0 | [
2,
50,
42,
568,
1732,
380,
9718,
60,
100,
86,
15,
184,
50,
42,
568,
32,
60,
800,
3726,
3726,
35,
51,
236,
209,
16,
5029,
15,
31,
147,
334,
38,
18,
1450,
21,
1142,
9,
207,
15,
31,
22,
195,
2711,
30,
12657,
478,
259,
20,
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... |
Example Projects
===
I have been looking around for example projects to do. Not something big, but something that could help me learn a programming language more. Something to act as the next step after learning the basics and being able to make small nifty programs.
For example, i have been learning Python and C# and using [Project Euler][1] to teach myself, since i am pretty good at math and solving the problems in different languages helps you get the fundamentals in a practical way.
But i want to extend my scope of projects and haven't been able to find a site or a list of small projects you could do to challenge yourself for a few days.
Any of you know of such a list?
[1]: http://projecteuler.net/ | 0 | [
2,
823,
2314,
800,
3726,
3726,
31,
57,
74,
699,
140,
26,
823,
2314,
20,
107,
9,
52,
301,
580,
15,
47,
301,
30,
110,
448,
55,
2484,
21,
3143,
816,
91,
9,
301,
20,
601,
28,
14,
328,
1424,
75,
2477,
14,
2125,
18,
17,
142,
777... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Sell me on using consts
===
So why exactly is it that it's always recommended to use const as often as possible? It seems to me that using const can be more of a pain than a help in C++. But then again, I'm coming at this from the python perspective: if you don't want something to be changed, don't change it. So with that said, here are a few questions:
1. It seems like every time I mark something as const, I get an error and have to change some other function somewhere to be const too. Then this causes me to have to change *another* function somewhere else. Is this something that just gets easier with experience?
2. Are benefits of using const *really* enough to compensate for the trouble? If you don't intend on changing an object, why not just not write code that changes it?
I should note that at this point in time, I'm most focused on the benefits of using const for correctness and maintainability purposes, although it is also nice to have an idea of the performance implications. | 0 | [
2,
3344,
55,
27,
568,
1065,
10044,
800,
3726,
3726,
86,
483,
1890,
25,
32,
30,
32,
22,
18,
550,
5773,
20,
275,
11608,
38,
28,
478,
28,
938,
60,
32,
2206,
20,
55,
30,
568,
11608,
38,
92,
44,
91,
16,
21,
1257,
119,
21,
448,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 simultaneously (1) keep a <div> from taking up all available width and (2) make it collapse margins with its neighbors?
===
Is it possible to have a `<div>` simultaneously (1) not take up all available width and (2) collapse margins with its neighbors?
I learned recently that setting a div to display:table will stop it from expanding to take up the whole width of the parent container -- but now I realize that this introduces a new problem: it stops collapsing margins with its neighbors.
In the example below, the red div fails to collapse, and the blue div is too wide.
<p style="margin:100px">This is a paragraph with 100px margin all around.</p>
<div style="margin: 100px; border: solid red 2px; display: table;">
This is a div with 100px margin all around and display:table.
<br/>
The problem is that it doesn't collapse margins with its neighbors.
</div>
<p style="margin:100px">This is a paragraph with 100px margin all around.</p>
<div style="margin: 100px; border: solid blue 2px; display: block;">
This is a div with 100px margin all around and display:block.
<br/>
The problem is that it expands to take up all available width.
</div>
<p style="margin:100px">This is a paragraph with 100px margin all around.</p>
Is there a way to meet both criteria simultaneously? | 0 | [
2,
184,
107,
31,
6888,
13,
5,
165,
6,
643,
21,
13,
1,
12916,
1,
37,
741,
71,
65,
904,
9456,
17,
13,
5,
135,
6,
233,
32,
6529,
5440,
18,
29,
82,
11184,
60,
800,
3726,
3726,
25,
32,
938,
20,
57,
21,
13,
1,
12916,
1,
6888,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Do we create and maintain documentation?
===
I have worked for several companies, but none of them had documentation high on the priority list. So most software lacked documentation, or it was not complete, or it was outdated.
So i'm asking you, do you create and maintain documentation for each project, even if time is an issue. | 0 | [
2,
107,
95,
1600,
17,
4027,
13945,
60,
800,
3726,
3726,
31,
57,
577,
26,
238,
1532,
15,
47,
2369,
16,
105,
41,
13945,
183,
27,
14,
9857,
968,
9,
86,
127,
2306,
11444,
13945,
15,
54,
32,
23,
52,
1279,
15,
54,
32,
23,
70,
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... |
PHP - @ operator (supress error)
===
In your opinion, is it ever valid to use the @ operator to supress an error/warning in PHP whereas you may be handling the error?
If so, in what circumstances would you use this (code examples please) | 4 | [
2,
13,
26120,
13,
8,
13,
1,
6022,
13,
5,
1666,
5890,
7019,
6,
800,
3726,
3726,
19,
154,
4052,
15,
25,
32,
462,
7394,
20,
275,
14,
13,
1,
6022,
20,
2538,
5890,
40,
7019,
118,
1885,
2981,
19,
13,
26120,
5142,
42,
123,
44,
7988... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Besy way for dll to get configuration information?
===
We have developed a number of custom dll's which are called by third-party Windows applications. These dll's are loaded / unloaded as required.
Most of the dll's call web services and these need to have url's, timeouts etc. configured.
Because the dll is not permanently in memory, it has to read the configuration every time it is invoked which seems sub-optimal?
Is there a better way to handle this? | 0 | [
2,
44,
4980,
161,
26,
13,
43,
211,
20,
164,
8091,
676,
60,
800,
3726,
3726,
95,
57,
885,
21,
234,
16,
5816,
13,
43,
211,
22,
18,
56,
50,
227,
34,
422,
8,
9635,
1936,
3767,
9,
158,
13,
43,
211,
22,
18,
50,
8572,
13,
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... |
GUI Design: How do you do it?
===
Do you draw your windows before constructing them? What do you use?
I've tried the Pencil plugin for FF. I've tried MS Visio. I've tried paper & pencil. I've tried Designer Vista. etc. etc. etc.
I'm currently leaning toward paper & pencil, but what about you; what's your preference? | 0 | [
2,
9457,
704,
45,
184,
107,
42,
107,
32,
60,
800,
3726,
3726,
107,
42,
2003,
154,
1936,
115,
18660,
105,
60,
98,
107,
42,
275,
60,
31,
22,
195,
794,
14,
13092,
10922,
108,
26,
13,
2460,
9,
31,
22,
195,
794,
4235,
9060,
1963,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Dojo: With DojoX Layout, is it possible to replace the content of a layout?
===
I have a div in which a page is loaded with the DojoX Layout capability:
<div dojoType="dojox.layout.ContentPane"
adjustPaths="true"
renderStyles="true"
executeScripts="true"
href="my/page/containing/scripts/and/styles/in/a/sub/folder.html">
Initial content, will be replace by href.
paths in folder.html will be adjusted to match this page
</div>
Is there an API I can use to later replace the content of this div with some other content from another page (other URI)?
Alex | 0 | [
2,
107,
1636,
45,
29,
107,
1636,
396,
9106,
15,
25,
32,
938,
20,
3934,
14,
2331,
16,
21,
9106,
60,
800,
3726,
3726,
31,
57,
21,
13,
12916,
19,
56,
21,
2478,
25,
8572,
29,
14,
107,
1636,
396,
9106,
11480,
45,
13,
1,
12916,
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 there a way to catch the back button event in javascript?
===
Is there a way to respond to the back button being hit (or backspace being pressed) in javascript when only the location hash changes? That is to say when the browser is not communicating with the server or reloading the page. | 0 | [
2,
25,
80,
21,
161,
20,
2949,
14,
97,
5167,
807,
19,
8247,
8741,
60,
800,
3726,
3726,
25,
80,
21,
161,
20,
4590,
20,
14,
97,
5167,
142,
770,
13,
5,
248,
97,
5582,
142,
2931,
6,
19,
8247,
8741,
76,
104,
14,
1474,
19170,
1693,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Difference between Enum and Define Statements
===
What's the difference between using a define statement and an enum statement in C/C++?
Thanks | 0 | [
2,
2841,
128,
1957,
723,
17,
9267,
9015,
800,
3726,
3726,
98,
22,
18,
14,
2841,
128,
568,
21,
9267,
3331,
17,
40,
1957,
723,
3331,
19,
272,
118,
150,
20512,
60,
3669,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Launching a registered mime helper application
===
I used to be able to launch a locally installed helper application by registering a given mime-type in the Windows registry. This enabled me to allow users to be able to click once on a link to the current install of our internal browser application. This worked fine in Internet Explorer 5 (most of the time) and Firefox but now does not work in Internet Explorer 7.
The filename passed to my shell/open/command is not the full physical path to the downloaded install package. The path parameter I am handed by IE is
<code>"C:\Document and Settings\chq-tomc\Local Settings\Temporary Internet Files\EIPortal\_DEV\_2\_0\_5\_4[1].expd"</code>
This unfortuneately does not resolve to the physical file when call <code>FileExists()</code> or when attempting to create a <code>TFileStream</code> object.
The physical path is missing the Internet Explorer hidden caching sub-directory for Temporary Internet Files of <code>"Content.IE5\ALBKHO3Q"</code> which yields
<code>"C:\Document and Settings\chq-tomc\Local Settings\Temporary Internet Files\Content.IE5\ALBKHO3Q\EIPortal\_DEV\_2\_0\_5\_4[1].expd"</code>
I have spent a couple of days pulling my hair on this one, any help would be appreciated.
| 0 | [
2,
13762,
21,
3801,
26193,
448,
106,
3010,
800,
3726,
3726,
31,
147,
20,
44,
777,
20,
3394,
21,
6680,
4066,
448,
106,
3010,
34,
2243,
68,
21,
504,
26193,
8,
4474,
19,
14,
1936,
18269,
9,
48,
9338,
55,
20,
1655,
3878,
20,
44,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
In jQuery Form, 'success' is being called before 'beforeSubmit' is finished
===
I'm using the jQuery Form plugin to upload an image. I've assigned a fade animation to happen the `beforeSubmit` callback, but as I'm running locally, it doesn't have time to finish before the `success` function is called.
I am using a callback function in my `fade();` call to make sure that one fade completes, before the next one begins, but that does not seem to guarantee that the function that's calling it is finished.
Am I doing something wrong? Shouldn't `beforeSubmit` complete before the ajax call is submitted?
Here's are the two callbacks:
beforeSubmit:
function prepImageArea() {
if (userImage) {
userImage.fadeOut(1500, function() {
ajaxSpinner.fadeIn(1500);
});
}
}
success:
function imageUploaded(data) {
var data = evalJson(data);
userImage.attr('src', data.large_thumb);
ajaxSpinner.fadeOut(1500, function() {
userImage.fadeIn(1500);
});
}
| 0 | [
2,
19,
487,
8190,
93,
505,
15,
13,
22,
29245,
22,
25,
142,
227,
115,
13,
22,
12750,
7563,
5130,
22,
25,
842,
800,
3726,
3726,
31,
22,
79,
568,
14,
487,
8190,
93,
505,
10922,
108,
20,
71,
8294,
40,
1961,
9,
31,
22,
195,
2467,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 an event handler already been added?
===
Is there a way to tell if an event handler has been added to an object? I'm serializing a list of objects into/out of session state so we can use SQL based session state... When an object in the list has a property changed it needs to be flagged, which the event handler took care of properly before. However now when the objects are deserialized it isn't getting the event handler.
In an fit of mild annoyance, I just added the event handler to the Get property that accesses the object. It's getting called now which is great, except that it's getting called like 5 times so I think the handler just keeps getting added every time the object is accessed.
It's really safe enough to just ignore, but I'd rather make it that much cleaner by checking to see if the handler has already been added so I only do so once.
Is that possible? | 0 | [
2,
63,
40,
807,
24641,
614,
74,
905,
60,
800,
3726,
3726,
25,
80,
21,
161,
20,
494,
100,
40,
807,
24641,
63,
74,
905,
20,
40,
3095,
60,
31,
22,
79,
5956,
3335,
21,
968,
16,
3916,
77,
118,
1320,
16,
3723,
146,
86,
95,
92,
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... |
After C++ - Python or Java?
===
I'm fast approaching the point in my coding where I would like to quickly write object oriented code in languages other than C++ for a variety of reasons.
After a lot of research, my choices have pretty much narrowed down to Python and Java. I'm leaning towards Python because of its relationship to C, but with Java, from what I can see, I get a good introduction to using and creating test suites with Eclipse - there is also Processing which is pulling me towards Java.
I'm not the kind of guy to tackle two languages at once, so which one would you recommend and why? What I want at the end is to have an additional language I can use for rapid development. Ease of learning isn't important to me as I'm willing to put in the time regardless. Ability to use the new language widely is. | 0 | [
2,
75,
272,
20512,
13,
8,
20059,
54,
8247,
60,
800,
3726,
3726,
31,
22,
79,
1512,
8371,
14,
454,
19,
51,
13,
15458,
113,
31,
83,
101,
20,
976,
2757,
3095,
13,
6800,
1797,
19,
2556,
89,
119,
272,
20512,
26,
21,
1747,
16,
2932,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Bulk updating a table from rows from another table
===
2 tables:
Employees
- EmployeeID
- LeadCount
Leads
- leadID
- employeeID
I want to update the Employees.LeadCount column by counting the # of leads in the Leads table that have the same EmployeeID.
Note: There may be more than 1 lead with the same employeeID, so I have to do a Distinct(SUM(employeeID)).
| 0 | [
2,
7238,
71,
43,
1880,
21,
859,
37,
11295,
37,
226,
859,
800,
3726,
3726,
172,
7484,
45,
3716,
13,
8,
7362,
1340,
13,
8,
672,
16549,
4259,
13,
8,
672,
1340,
13,
8,
7362,
1340,
31,
259,
20,
11100,
14,
3716,
9,
11846,
16549,
469... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Auto-Hide taskbar not appearing when my application is maximized
===
My application draws all its own window borders and decorations. It works fine with Windows taskbars that are set to auto-hide, except when my application window is maximized. The taskbar won't "roll up". It will behave normally if I have the application not maximized, even when sized all the way to the bottom of the screen. It even works normally if I just resize the window to take up the entire display (as though it was maximized). | 0 | [
2,
3108,
8,
19522,
3005,
1850,
52,
4870,
76,
51,
3010,
25,
23952,
43,
800,
3726,
3726,
51,
3010,
10802,
65,
82,
258,
1463,
5878,
17,
16845,
9,
32,
693,
1123,
29,
1936,
3005,
1850,
18,
30,
50,
309,
20,
3108,
8,
19522,
15,
1613,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Php redefine Class Methods OR Class
===
Is there any way to redefine a class or some of it's methods without using typical inheritance ex:
class third_party_library {
function buggy_function() {
return 'bad result';
}
function other_functions(){
return 'blah';
}
}
what can I do to replace the buggy_function? Obviously this is what i would like to do
class third_party_library redefines third_party_library{
function buggy_function() {
return 'good result';
}
function other_functions(){
return 'blah';
}
}
This is my exact delima, i did an update to a third party library that breaks my code. I don't want to modify the library directly, as future updates could break the code again. I'm looking for a seamless way to replace the class method.
I've found this [library][1] that says it can do it, but I'm weary as it's 4 years old
[1]: http://pecl.php.net/package/classkit | 0 | [
2,
13,
26120,
402,
62,
7509,
718,
3195,
54,
718,
800,
3726,
3726,
25,
80,
186,
161,
20,
402,
62,
7509,
21,
718,
54,
109,
16,
32,
22,
18,
3195,
366,
568,
3874,
13852,
1396,
45,
718,
422,
1,
9635,
1,
1210,
2559,
622,
13,
1,
19... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.