unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
How can I draw a bezier curve using Python's PIL?
===
I'm using Python's Imaging Library and I would like to draw some bezier curves.
I guess I could calculate pixel by pixel but I'm hoping there is something simpler. | 0 | [
2,
184,
92,
31,
2003,
21,
44,
15029,
7101,
568,
20059,
22,
18,
8483,
60,
800,
3726,
3726,
31,
22,
79,
568,
20059,
22,
18,
13090,
1248,
17,
31,
83,
101,
20,
2003,
109,
44,
15029,
11548,
9,
31,
2321,
31,
110,
18469,
18146,
34,
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,
0,
0,
0,
0,
0,
0,
0... |
good generic practices for defending your desktop application from user abuse
===
such as deleting the output file during run, directing two instances of the sw to the same IO etc ? | 0 | [
2,
254,
12733,
5242,
26,
6119,
154,
17404,
3010,
37,
4155,
5129,
800,
3726,
3726,
145,
28,
121,
1336,
68,
14,
5196,
3893,
112,
485,
15,
10329,
81,
13946,
16,
14,
8783,
20,
14,
205,
13,
1963,
2722,
13,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Apache/Tomcat error - wrong pages being delivered
===
This error has been driving me nuts. We have a server running Apache and Tomcat, serving multiple different sites. Normally the server runs fine, but sometimes an error happens where people are served the wrong page - **the page that *somebody else* requested!**
Clues:
- The pages being delivered are those that another user requested recently, and are otherwise delivered correctly. It's been known for two simultaneous requests to be swapped. As far as I can tell, none of the pages being incorrectly delivered are older than a few minutes.
- It only affects the files that are being served by Tomcat. Static files like images are unaffected.
- It doesn't happen all the time. When it does happen, it happens for everybody.
- It seems to happen at times of peak demand. However, the demand is not yet very high - it's certainly well within the bounds of what Apache can cope with.
- Restarting Tomcat fixed it, but only for a few minutes. Restarting Apache fixed it, but only for a few minutes.
- The server is running Apache 2 and Tomcat 6, using a Java 6 VM on Gentoo. The connection is with AJP13, and `JkMount` directives within `<VirtualHost>` blocks are correct.
- There's nothing of use in any of the log files. | 0 | [
2,
17140,
118,
6015,
5782,
7019,
13,
8,
1389,
4434,
142,
4002,
800,
3726,
3726,
48,
7019,
63,
74,
2891,
55,
13771,
9,
95,
57,
21,
8128,
946,
17140,
17,
2067,
5782,
15,
1799,
1886,
421,
3259,
9,
4147,
14,
8128,
1461,
1123,
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... |
Good techniques for understanding someone else's code
===
What techniques can anyone suggest for understanding a new piece of code?
Here are some of the things I find sort-of work:
1) Print the code out, on a colour printer, with syntax highlighting, single sided. Spread it out on a desk. Then go through it:
a) Highlighting start of functions and 'blocking off' large statements.
b) Highlighting significant calls throughout e.g. calls out to other code or functions that interact with the real world (e.g. move camera lens).
c) Flagging bits that really don't make sense.
d) Adding handwritten comments in the margin explaining in general terms what a block of code does.
2) Simultaneously, have an editor open with the code available and a good grep tool to hand. When something needs explaining in the hardcopy, search for it here.
3) Simultaneously have the code running in a debugger (if you are lucky enough to have complied and working code) and make use of the call stack to see what's going on.
Problems with my approach:
1) I get distracted going through the code from start to finish and spend too long looking at trivia rather than finding the core functions.
2) I spend too long writing down long function names on pieces of paper and end up with a scrawled mess. For any badly structured piece of code the paper is a bit useless.
3) I feel like an idiot with my desk covered in highlighted pieces of paper.
Any tips or useful tools for analysing the code structure? I quite like paper since you don't spend so long mucking about with 'making the boxes line up pretty' but I wonder if I couldn't do better.
I strike this problem on average twice a year when I get handed a new piece of code to modify or maintain. It must be pretty common out there - after all, how often do we get the luxury of writing code from scratch? | 0 | [
2,
254,
4212,
26,
3260,
737,
962,
22,
18,
1797,
800,
3726,
3726,
98,
4212,
92,
1276,
5601,
26,
3260,
21,
78,
1855,
16,
1797,
60,
235,
50,
109,
16,
14,
564,
31,
477,
2058,
8,
1041,
170,
45,
137,
6,
4793,
14,
1797,
70,
15,
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 does Base 64 handle binary data with zeroes at the end
===
As I understand the spec, a Base64 encoder
a) takes the source binary, and pads it out with zeroes to be a multiple of 24 bytes long.
b) it then transcodes it, six bits at a time, to the target set of 64 characters (A..Z, a..z, 0..9, +, -). If it finds the last two bytes (16 bits) have been zero-padded, the last two characters are transcoded as '=='. If it finds that the last one byte (8 bits) have been zero-padded, the last character is transcoded as '='.
My question is, in step (b), how does it know that the last bytes are zeroes because they have been padded vs. they are zeroes because thay are part of the valid binary source data?
Is it that the subsystem that is responsible for part (b) has to know what took place during part (a) | 0 | [
2,
184,
630,
1000,
4384,
3053,
14171,
1054,
29,
4606,
160,
35,
14,
241,
800,
3726,
3726,
28,
31,
1369,
14,
12737,
15,
21,
1000,
3470,
20523,
139,
21,
6,
1384,
14,
1267,
14171,
15,
17,
4432,
18,
32,
70,
29,
4606,
160,
20,
44,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can i copy files (without folders) of a specific pattern recursively on windows.
===
I need to copy a set of dll & pdb files from a set of folders recursively into another folder. i dont want it to recreate the folder hierarchy in the target folder.
i want to use built in windows tools, i.e. dos etc.
thanks in advance. | 0 | [
2,
184,
92,
31,
4344,
6488,
13,
5,
14506,
19294,
18,
6,
16,
21,
1903,
3732,
302,
24244,
102,
27,
1936,
9,
800,
3726,
3726,
31,
376,
20,
4344,
21,
309,
16,
13,
43,
211,
279,
351,
9007,
6488,
37,
21,
309,
16,
19294,
18,
302,
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... |
What is the lifetime of a static variable in a C++ function?
===
If a variable is declared as `static` in a function's scope it is only initialized once and retains its value between function calls, we all know that but what exactly is its lifetime? When do its constructor and destructor get called?
void foo()
{
static string plonk = "When will I die?";
}
| 0 | [
2,
98,
25,
14,
5277,
16,
21,
12038,
7612,
19,
21,
272,
20512,
1990,
60,
800,
3726,
3726,
100,
21,
7612,
25,
2482,
28,
13,
1,
18077,
1,
19,
21,
1990,
22,
18,
9914,
32,
25,
104,
2104,
1333,
382,
17,
16793,
82,
1923,
128,
1990,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
where to look for infomation(easy to understand) about unicode?
===
Apart from joel article But a deeper understanding of unicode. | 0 | [
2,
113,
20,
361,
26,
15404,
79,
857,
5,
18385,
20,
1369,
6,
88,
28010,
60,
800,
3726,
3726,
2629,
37,
8873,
2002,
47,
21,
5891,
3260,
16,
28010,
9,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Can I serve RSS in JSON?
===
I am writing an RSS feed (for fun) and was looking at the spec [here][1].
> RSS is a dialect of XML. All RSS files must conform to the XML 1.0 specification, as published on the World Wide Web Consortium (W3C) website.
Obviously this means that I am not serving 'pure' RSS if I choose the JSON option. That said, if I conform to the rest of the spec, is it likely that (customised) readers will be able to parse it?
To put it another way, if I conform to the spec, but using JSON instead of XML is it a usable RSS feed?
[1]: http://cyber.law.harvard.edu/rss/rss.html | 0 | [
2,
92,
31,
1884,
13,
1224,
18,
19,
487,
528,
60,
800,
3726,
3726,
31,
589,
1174,
40,
13,
1224,
18,
4063,
13,
5,
1106,
2414,
6,
17,
23,
699,
35,
14,
12737,
636,
6836,
500,
2558,
165,
500,
9,
13,
1,
13,
1224,
18,
25,
21,
806... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Resharper, has it changed your "progamming" life?
===
We're thinking of getting [Resharper][1] and i would really be interested to hear from people who've used it and whether you get much out of it? Does it really speed up production and if you moved to anther job without it, would you miss it and why?
Thanks
Crafty
[1]: http://www.jetbrains.com/resharper/ | 0 | [
2,
302,
23646,
106,
15,
63,
32,
1015,
154,
13,
7,
2740,
7253,
3863,
7,
201,
60,
800,
3726,
3726,
95,
22,
99,
1440,
16,
1017,
636,
99,
23646,
106,
500,
2558,
165,
500,
17,
31,
83,
510,
44,
3158,
20,
990,
37,
148,
72,
22,
195,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 wrong with JUDE?
===
I need to do some UML work and I'm sick of Visio, so I thought I'd look around the marketplace. [JUDE][1] looks good, so I thought I'd come here and see if there's any opinions of it on stackoverflow. Surprisingly (to me, at least) it doesn't even rate a mention in the [What’s the best UML diagramming tool?][2] question.
What's wrong with JUDE? Do you folks use it?
[1]: https://jude.change-vision.com/jude-web/product/professional.html
[2]: http://stackoverflow.com/questions/15376/whats-the-best-uml-diagramming-tool | 0 | [
2,
98,
22,
18,
1389,
29,
10750,
60,
800,
3726,
3726,
31,
376,
20,
107,
109,
13,
723,
255,
170,
17,
31,
22,
79,
3352,
16,
9060,
1963,
15,
86,
31,
289,
31,
22,
43,
361,
140,
14,
19408,
9,
636,
2142,
546,
500,
2558,
165,
500,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the most important thing to do for a new technical manager or lead?
===
Managing a software team is a different proposition than managing software. Most of those who become manager or lead of a software team are typically bright software developers who have done a great job over the years writing and managing code.
However, transitioning into management or lead position proves to be difficult to them because they tend to manage people the same way they used to manage code. That is one reason why they dont transition into good project managers.
In your opinion, what would be the most important thing that a new software manager or lead should do as he makes the transition? | 2 | [
2,
98,
25,
14,
127,
681,
584,
20,
107,
26,
21,
78,
2447,
1382,
54,
672,
60,
800,
3726,
3726,
5616,
21,
2306,
173,
25,
21,
421,
12566,
119,
5616,
2306,
9,
127,
16,
273,
72,
533,
1382,
54,
672,
16,
21,
2306,
173,
50,
2442,
267... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Application Pools not starting after iisreset
===
*Before I start, I know using iisreset is considered bad practice, but this shouldn't happen anyway..*
**What we have:**
- Several machines with IIS6 on Windows Server 2003 R2 (both 64 and 32 bits)
- Several WCF webservices (.NET runtime 2.0) deployed in several applications, each with it's own application pool, each application pool running under an other windows account.
**What happens:**
- All appPools are started, all services operational
- IISReset is executed (or the machine is rebooted)
- IIS comes back up, but not all application pools start properly. Sometimes they all come back up, sometimes one or more pools won't start. They can be started manually however.
Is this "normal" iis behavior and should I just avoid using iisreset, or are we doing something wrong in our .NET code?
| 0 | [
2,
3010,
15230,
52,
1422,
75,
595,
18,
99,
3554,
800,
3726,
3726,
1637,
12750,
31,
799,
15,
31,
143,
568,
595,
18,
99,
3554,
25,
724,
896,
1345,
15,
47,
48,
5714,
22,
38,
2384,
2774,
9,
9,
2483,
13,
1409,
608,
95,
57,
45,
14... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to gracefully check whether Gravatar is working or not?
===
I just posted the question [how-to-determine-why-the-browser-keeps-trying-to-load-a-page][1] and discovered that my problem is with Gravatar.
I also noticed that StackOverflow is suffering from the same outage.
Does anyone know of a **graceful** way to determine if Gravatar, or any third party website for that matter, is up or not, **before** trying to retrieve avatar icons from them?
This would eliminate the long page load and the never ending busy cursor ... I shouldn't say never ending ... it just takes **a long time** to go away and is very confusing to the user as they sit there and wait ... for nothing.
[1]: http://stackoverflow.com/questions/246575/how-to-determine-why-the-browser-keeps-trying-to-load-a-page | 0 | [
2,
184,
20,
28138,
2631,
1472,
5120,
8112,
512,
25,
638,
54,
52,
60,
800,
3726,
3726,
31,
114,
6054,
14,
1301,
636,
1544,
8,
262,
8,
546,
3964,
1149,
8,
2256,
8,
124,
8,
25699,
4104,
8,
12211,
18,
8,
5840,
68,
8,
262,
8,
829... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 move over
===
Uphill about 5 years ago my career was going fairly well, but separation, family deaths and a bit of illness caused me to make a couple of BAD career decisions, and I ended up in a dead end job doing mainly vb 6, though it was the end as mid to late 30, but was recently handed a break, working with a forward thinking vb.bet company and I took the chance with both hands, been there 5 months now
Thinks are going ok, spending a lot of time in places like this, and reading books, but coming from a C / Machine Code / VB 5 &6 background, I'm finding the little intracity of .NET lost on me, if I write code I wouldn't think to use delegates for example, has anybody got any advice on making the 'brain' VB.NET jump, or training I should be looking at (bear in mind that I'm not rich)
Thanks for your time | 0 | [
2,
184,
20,
780,
84,
800,
3726,
3726,
71,
3843,
88,
331,
122,
1464,
51,
545,
23,
228,
6647,
134,
15,
47,
8312,
15,
190,
7251,
17,
21,
1142,
16,
6761,
1497,
55,
20,
233,
21,
1335,
16,
896,
545,
6003,
15,
17,
31,
1272,
71,
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... |
What features do you need the most in Adobe Air ?
===
I recently started to develop using Flex 3 and Adobe Air and I wanted to know what features you want to be in futures releases of Adobe Air ?<br />
The ones that I miss are:<br />
<ul>
<li>Cross-systems way of launching a local file (shellExec) right from an Air application (although you can do this using workaround at least under Windows)</li>
<li>Ability to setup dynamic paths for Embed statement (e.g. <i>Embed[(variable+"/path/to/file")]</i> ). I didn't find any way to do this properly.</li>
<li>Some way of setting Flex object's positions with absolute values from CSS (that sounds more Flex related by the way)</li>
</ul>
Don't hesitate to add your workarounds to theses limitations if you know somes. | 0 | [
2,
98,
967,
107,
42,
376,
14,
127,
19,
20299,
282,
13,
60,
800,
3726,
3726,
31,
1989,
373,
20,
2803,
568,
14409,
203,
17,
20299,
282,
17,
31,
417,
20,
143,
98,
967,
42,
259,
20,
44,
19,
1022,
18,
7073,
16,
20299,
282,
13,
60... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 find if a string is in a list (without generics)
===
I want do something like this:
Result = 'MyString' in [string1, string2, string3, string4];
This can't be used with strings and I don't want to do something like this:
Result = (('MyString' = string1) or ('MyString' = string2));
Also I think that creating a StringList to do just this is too complex.
Is there some other way to achieve this?
Thanks.
| 0 | [
2,
246,
161,
20,
477,
100,
21,
3724,
25,
19,
21,
968,
13,
5,
14506,
12733,
18,
6,
800,
3726,
3726,
31,
259,
107,
301,
101,
48,
45,
829,
800,
13,
22,
915,
11130,
22,
19,
636,
11130,
165,
15,
3724,
135,
15,
3724,
240,
15,
3724... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
WCF - changing endpoint address results in securityexception
===
My WCF Service uses wsHttpBinding and works fine from the client when the service is gerenated by the client using the default options as follows:
RServiceClient R = new RServiceClient();
However, at some point I'll need to be able to specify the location of the service, presumably by changing the endpoint address as follows:
RServiceClient R = new RServiceClient();
R.Endpoint.Address = new EndpointAddress(new Uri "http://xxx.xxxx.xxx:80/RServer/RService.svc"));
However, when I do specify the exact endpoint, I get a SecurityNegotiationException:
System.ServiceModel.Security.SecurityNegotiationException was unhandled
Message="The caller was not authenticated by the service."
Source="mscorlib"....
The WCF service runs on IIS and has anonymous access enabled under IIS admin. Also, this error occurs when the client is run from the same machine as the service under an admin account - I havn't got to the scary part of running it over the net yet!
Any Ideas?
| 0 | [
2,
11801,
410,
13,
8,
4226,
241,
3132,
3218,
1736,
19,
1221,
10066,
872,
800,
3726,
3726,
51,
11801,
410,
365,
2027,
619,
18,
21127,
22260,
17,
693,
1123,
37,
14,
6819,
76,
14,
365,
25,
5389,
219,
1669,
34,
14,
6819,
568,
14,
12... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best approach for WCF client.
===
I have client application that uses WCF service to insert some data to backend database. Client application is going to call service on per event basis (it can be every hour or every second).
I'm wondering what's the best way of calling that service.
Should I create communication channel and keep it open all the time, or should I close channel after each call and create it again? | 0 | [
2,
246,
2141,
26,
11801,
410,
6819,
9,
800,
3726,
3726,
31,
57,
6819,
3010,
30,
2027,
11801,
410,
365,
20,
14692,
109,
1054,
20,
97,
2451,
6018,
9,
6819,
3010,
25,
228,
20,
645,
365,
27,
416,
807,
2239,
13,
5,
242,
92,
44,
352... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
NHibernate: How can I combine fields from two classes?
===
Here is a simplified version of my database model. I have two tables: "Image", and "HostingProvider" which look like this:
**[Image]**
- id
- filename
- hostingprovider_id
**[HostingProvider]**
- id
- base_url
Image HostingproviderId is a many-to-one foreign key relationship to the HostingProvider table. (Each image has one hosting provider).
Essentially I want to be able to have my Image class look like this:
**[Image]**
- Id
- base_url
- filename
In NHibernate, how can I create a mapping file that will combine the base_url from the HostingProvider table, into the Image class?
| 0 | [
2,
12109,
15191,
8820,
45,
184,
92,
31,
12287,
2861,
37,
81,
2684,
60,
800,
3726,
3726,
235,
25,
21,
13,
11268,
615,
16,
51,
6018,
1061,
9,
31,
57,
81,
7484,
45,
13,
7,
22039,
7,
15,
17,
13,
7,
11694,
68,
26735,
139,
7,
56,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to filter out JIRA project that only certain users can see and access?
===
Currently we have mutiple projects sharing a JIRA instances. We want to make it such that the users only view the projects that they are doing testing.
But however we are currently groupging these users to the standard grouping jira-users.
What is the best way to filter out JIRA project that only certain users can see and access | 0 | [
2,
184,
20,
11945,
70,
487,
3517,
669,
30,
104,
1200,
3878,
92,
196,
17,
1381,
60,
800,
3726,
3726,
871,
95,
57,
22072,
5106,
2314,
6126,
21,
487,
3517,
13946,
9,
95,
259,
20,
233,
32,
145,
30,
14,
3878,
104,
1418,
14,
2314,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Persisting a computed datetime column in SQL Server 2005
===
I have an XML column in a table; I want to "promote" a certain value in that XML as a computed column and index it for faster searching. I have a function that takes in the XML information and outputs the element of interest, like this:
CREATE FUNCTION [dbo].[fComputeValue] (@data XML)
RETURNS datetime
WITH SCHEMABINDING
AS
BEGIN
RETURN @data.value('(/Metadata/Value[@Key="StartDate"])[1]', 'datetime')
END
However when I try to create the computed column:
ALTER TABLE dbo.CustomMetadataTable ADD [StartDate] AS ([dbo].[fComputeValue]([CustomMetadataColumn])) PERSISTED
I get the following error:
> Msg 4936, Level 16, State 1, Line 2
> Computed column
> 'StartDate'
> in table 'CustomMetadataTable' cannot be
> persisted because the column is
> non-deterministic.
It works if I:
- work with varchar, int, double (i.e. other than datetime) values
- remove the PERSISTED keyword (but then I can't create an index on the column)
Any ideas? Thanks. | 0 | [
2,
22084,
68,
21,
26331,
1231,
891,
4698,
19,
4444,
255,
8128,
812,
800,
3726,
3726,
31,
57,
40,
23504,
4698,
19,
21,
859,
73,
31,
259,
20,
13,
7,
2740,
20209,
7,
21,
1200,
1923,
19,
30,
23504,
28,
21,
26331,
4698,
17,
4348,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
mysql import script
===
Is it possible to import csv data into mysql and automatically create the column names?
Is it possible to check for duplicate entries upon importing?
How would you import a jpeg file on a website into a field? | 0 | [
2,
51,
18,
22402,
9010,
3884,
800,
3726,
3726,
25,
32,
938,
20,
9010,
272,
18,
710,
1054,
77,
51,
18,
22402,
17,
7499,
1600,
14,
4698,
1817,
60,
25,
32,
938,
20,
2631,
26,
19429,
11399,
685,
9010,
68,
60,
184,
83,
42,
9010,
21... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... |
CFile Error On Windows Ce
===
I am using Windows CE 4.2 and MS Embedded VC++ 4.0. The following code gives me the error `Access to [file name] was denied.`, and it creates the file but does not write anything to it.
CString tmp;
tmp.Format(_T("%s%d"), mFileName, ++ctr);
TRY
{
mFile.Open(tmp, CFile::modeCreate);
mFile.Write(&data[ctr%2], 1);
mFile.Close();
}
CATCH (CException, e)
{
TCHAR szCause[255];
CString strFormatted;
e->GetErrorMessage(szCause, 255);
strFormatted += szCause;
AfxMessageBox(strFormatted);
}
END_CATCH
Interestingly, using `CreateFile` works fine:
CString tmp;
tmp.Format(_T("%s%d"), mFileName, ++ctr);
hFile = CreateFile(tmp, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL /*| FILE_FLAG_WRITE_THROUGH*/, 0);
WriteFile(hFile, &(data[ctr%2]), 1, &bytesWritten, NULL);
CloseHandle(hFile);
Why could this be? Can I even use CFile on WinCE? I'm just starting out with embedded development. | 0 | [
2,
272,
16877,
7019,
27,
1936,
4000,
800,
3726,
3726,
31,
589,
568,
1936,
4000,
268,
9,
135,
17,
4235,
12138,
13,
8990,
20512,
268,
9,
387,
9,
14,
249,
1797,
2352,
55,
14,
7019,
13,
1,
20604,
20,
636,
16877,
204,
500,
23,
5265,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PostSharp aspect for property setters, calling generic method
===
We have a base object we use for some MVC-like system, where each property in a descendant is written like this:
public String FirstName
{
get { return GetProperty<String>("FirstName", ref _FirstName); }
set { SetProperty<String>("FirstName", ref _FirstName, value); }
}
This is done both for debugging purposes and for notification and validation purposes. We use the getter to alert us of cases where code that has explicitly flagged what it is going to read (in order for the base class to be able to call it only when those properties change) and gets it wrong, and we use the setter for property change notifications, dirty-flag handling, validation, etc.
For simplicity, let's assume the implementation of these methods looks like this:
protected T GetProperty<T>(String propertyName,
ref T backingField)
{
return backingField;
}
protected Boolean SetProperty<T>(String propertyName,
ref T backingField,
T newValue)
{
backingField = newValue;
return true;
}
There's more code in both of these of course, but this code is not relevant to my question, or at least I hope so. If it is, I'll modify the question.
Anyway, I'd like to write a PostSharp aspect that automatically implements the calls for me, on automatic properties, like this:
public String FirstName { get; set; }
Is there anyone out there that has some idea how I would go about doing this?
I have made OnMethodBoundaryAspect classes myself, but the art of calling the generic implementation with a ref parameter eludes me.
Here's the two classes, I'd like to augment the TestObject class to automatically call the correct method on property get and set.
public class BaseObject
{
protected T GetProperty<T>(String propertyName,
ref T backingField)
{
return backingField;
}
protected Boolean SetProperty<T>(String propertyName,
ref T backingField,
T newValue)
{
backingField = newValue;
}
}
public class TestObject : BaseObject
{
public String FirstName
{
get;
set;
}
public String LastName
{
get;
set;
}
}
| 0 | [
2,
678,
23646,
7289,
26,
1354,
309,
6052,
15,
2555,
12733,
2109,
800,
3726,
3726,
95,
57,
21,
1000,
3095,
95,
275,
26,
109,
307,
8990,
8,
1403,
329,
15,
113,
206,
1354,
19,
21,
13783,
25,
642,
101,
48,
45,
317,
3724,
64,
7259,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Dynamically adding Content blocks to Masterpage fails after Master.FindControl
===
I've encountered an odd problem that doesn't make any sense to me. I am trying to dynamically set up MasterPage Content controls on a page. I have it working nicely with the following code:
protected override void OnPreInit(EventArgs e)
{
base.OnPreInit(e);
MasterPageFile = "~/MasterPages/Default.master";
string existantContentPlaceHolderID = "ContentPlaceHolder1";
string nonExistantContentPlaceHolderID = "foo";
//Control c = Master.FindControl(existantContentPlaceHolderID);
//Control c1 = Master.FindControl(nonExistantContentPlaceHolderID);
TextBox t = new TextBox
{
Text = "Text"
};
ITemplate iTemplate = new GenericITemplate(container => container.Controls.Add(t));
AddContentTemplate(existantContentPlaceHolderID, iTemplate);
}
public delegate void InstantiateTemplateDelegate(Control container);
public class GenericITemplate : ITemplate
{
private readonly InstantiateTemplateDelegate m_instantiateTemplate;
public void InstantiateIn(Control container)
{
m_instantiateTemplate(container);
}
public GenericITemplate(InstantiateTemplateDelegate instantiateTemplate)
{
m_instantiateTemplate = instantiateTemplate;
}
}
This works great, except I want to be able to double-check that the contentPlaceHolderIDs exist on the MasterPage before calling AddContentTemplate as the Page will throw an error if you add a Content control that points to a non-existing ContentPlaceHolder.
The problem I am having is that in the above example when I call one of the commented Master.FindControl lines, the TextBox no longer renders.
Does anyone have any ideas why this might be... I cannot makes heads or tails of what is going on.
Thanks,
Max | 0 | [
2,
7782,
1326,
4721,
2331,
5198,
20,
1129,
6486,
13614,
75,
1129,
9,
19811,
12898,
800,
3726,
3726,
31,
22,
195,
8208,
40,
4210,
1448,
30,
1437,
22,
38,
233,
186,
1259,
20,
55,
9,
31,
589,
749,
20,
7782,
1326,
309,
71,
1129,
648... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 play a wav-File in Delphi?
===
Which functions are available within Delphi to play a sound-file? | 0 | [
2,
184,
20,
418,
21,
3142,
710,
8,
16877,
19,
23030,
60,
800,
3726,
3726,
56,
3719,
50,
904,
363,
23030,
20,
418,
21,
646,
8,
16877,
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... | [
1,
1,
1,
1,
1,
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... |
Python shell - InteractiveConsole.
===
When starting a django application using *python manage.py shell*, I get an InteractiveConsole shell - I can use tab completion, etc.
Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
When just starting a python interpreter using *python*, I get
Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Can someone tell me what django is doing to give me an interactive console, or what I need to do to start an interactive console without a django app? | 0 | [
2,
20059,
3593,
13,
8,
9194,
12124,
6069,
9,
800,
3726,
3726,
76,
1422,
21,
3857,
14541,
3010,
568,
1637,
6448,
11570,
4705,
9,
6448,
3593,
2483,
15,
31,
164,
40,
9194,
12124,
6069,
3593,
13,
8,
31,
92,
275,
6523,
5392,
15,
2722,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 SSRS, can you set a rectangle to grow with its contents?
===
I'm working on a report in SSRS (SQL Server Reporting Services) right now, and I'm having a problem getting a rectanlge I draw on the page in the report designer to grow. Basically, I've got a rectangle drawn, and then I put a text field inside of it. The contents of this text field can be either very short or very long, so I want it to grow to accomodate its contents.
But when I enter the long text, the textbox grows and then sticks outside of the lines of the rectangle. From the SSRS documentation I read, it says rectangles should grow to contain the items within them, and that those items are "peers".
What gives? | 0 | [
2,
19,
22118,
18,
15,
92,
42,
309,
21,
27181,
20,
3213,
29,
82,
8478,
60,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
1330,
19,
22118,
18,
13,
5,
18,
22402,
8128,
6670,
687,
6,
193,
130,
15,
17,
31,
22,
79,
452,
21,
1448,
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... |
C#/.Net Changelog
===
I started programming C# applications when the 1.0 framework was first released. I worked professionally with it for about three years right up until just before the 2.0 framework release.
As I look now I see that 3.5 came out last year and that each new version of the framework has added large sets of features that are interconnected.
Is there a good reference (either printed or web) that would catch someone up to the present day situation, given that they already have a firm grounding in .NET? | 0 | [
2,
272,
5910,
118,
9,
2328,
753,
5567,
800,
3726,
3726,
31,
373,
3143,
272,
5910,
3767,
76,
14,
137,
9,
387,
6596,
23,
64,
261,
9,
31,
577,
13550,
29,
32,
26,
88,
132,
122,
193,
71,
163,
114,
115,
14,
172,
9,
387,
6596,
830,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Display chinese characters in AJAX and also in excel
===
I am currently developing a Java Struts application and i been wondering how is it possible to display chinese characters in AJAX and also when generating excel file by servlet response.
Anyone can share any pointers?
| 0 | [
2,
3042,
1116,
1766,
19,
20624,
17,
67,
19,
20700,
800,
3726,
3726,
31,
589,
871,
3561,
21,
8247,
18316,
18,
3010,
17,
31,
74,
5712,
184,
25,
32,
938,
20,
3042,
1116,
1766,
19,
20624,
17,
67,
76,
13500,
20700,
3893,
34,
13,
1032... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Java File Cursor
===
Is there some library for using some sort of cursor over a file? I have to read big files, but can't afford to read them all at once into memory.
A little backgrond: I have a tool written in GWT that analyzes submitted xml documents and then pretty prints the xml, among other things. Currently I'm writing the pretty printed xml to a temp file (my lib would throw me an OOMException if I use plain Strings), but the temp file's size are approaching 18 megs, I can't afford to respond a GWT RPC with 18 megs :)
So I can have a widget to show only a portion of the xml (check this [example][1]), but I need to read the corresponding portion of the file.
[1]: http://zwitserloot.com/tipit-gwtlib/example/ | 0 | [
2,
8247,
3893,
29588,
800,
3726,
3726,
25,
80,
109,
1248,
26,
568,
109,
2058,
16,
29588,
84,
21,
3893,
60,
31,
57,
20,
1302,
580,
6488,
15,
47,
92,
22,
38,
7829,
20,
1302,
105,
65,
35,
382,
77,
1912,
9,
21,
265,
97,
7944,
70... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Adding HTTP Headers in a Spring Interceptor postHandle method
===
I have a Spring Interceptor which attempts to add an HTTP header in the postHandle() method.
public void postHandle(HttpServletRequest req, HttpServletResponse resp,
Object obj1, ModelAndView mv)
throws Exception {
response.setHeader("SomeHeaderSet", "set");
response.addHeader("SomeHeaderAdd", "added");
}
}
However, neither header is added with either setHeader() or addHeader().
Is this even valid to do in the interceptor? I figured it WOULD be, but it ain't workin.
Regards,
Dustin | 0 | [
2,
4721,
7775,
157,
445,
19,
21,
1573,
13,
24171,
678,
3203,
413,
2109,
800,
3726,
3726,
31,
57,
21,
1573,
13,
24171,
56,
3265,
20,
3547,
40,
7775,
157,
106,
19,
14,
678,
3203,
413,
5,
6,
2109,
9,
317,
11364,
678,
3203,
413,
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... |
NHibernate/ActiveRecord - Any way to map to a foreign key column only?
===
I'm using Castle ActiveRecord, but this question applies to NHibernate, too, since a solution that works with NHibernate should work for ActiveRecord. Anyway, what I have is an underlying table structure like this:
TableA -hasMany-> TableB
I have corresponding objects EntityA and EntityB. EntityA has an IList of EntityB objects. This part works fine. Now, I want EntityB to have some kind of reference back to EntityA. I know I can use the BelongsTo attribute on EntityB to give it an actual reference back to the full EntityA type, like:
[BelongsTo("tableAid")]
public EntityA Parent { get; set; }
But what I'd really like to do is:
[BelongsTo("tableAid")]
public int ParentId { get; set; }
So, EntityB would store only the ID of the parent object, not a reference to the actual object. This is a trivial example, but I have good reasons for wanting to go with this approach. In the application I'm working on, we have pages that display specific EntityB-like objects, and we'd like for those pages to include links (as in hyperlinks) to the corresponding parent pages. We can do that by using the first approach above, but that requires that the entire EntityA object be loaded when all I really need is the ID. It's not a huge deal, but it just seems wasteful. I know I can use lazy-loading, but again, that seems more like a hack to me... | 0 | [
2,
12109,
15191,
8820,
118,
7889,
14953,
13,
8,
186,
161,
20,
2942,
20,
21,
1228,
1246,
4698,
104,
60,
800,
3726,
3726,
31,
22,
79,
568,
1339,
1348,
14953,
15,
47,
48,
1301,
13169,
20,
12109,
15191,
8820,
15,
266,
15,
179,
21,
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... |
Where to store the complete url in a cms?
===
I'm creating a cms and have not yet settled on the matter of where to store the complete url for a given page in the structure.
Every page have a slug (url friendly name of the page) and every page has a nullable (for top-level pages) parent and children.
Where do I store the complete url (/first-page/sub-page) for a given page? Should this go in the database along with the other properties of the page or in some cache?
Thanks
Anders | 0 | [
2,
113,
20,
1718,
14,
1279,
287,
6362,
19,
21,
2390,
18,
60,
800,
3726,
3726,
31,
22,
79,
2936,
21,
2390,
18,
17,
57,
52,
768,
2200,
27,
14,
1161,
16,
113,
20,
1718,
14,
1279,
287,
6362,
26,
21,
504,
2478,
19,
14,
1411,
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 do you access the DisplayMemberPath from a ListBox when trying to bind it to the content of the ListBoxItem?
===
I have overridden the windows ListBox in order to display an image and a piece of text in each ListBoxItem, but I need to filter the contents of the text displayed I was hoping to do this by accessing the DisplayMemberPath of the actual ListBox however I can't get it working.
<Setter Property="ItemContainerStyle">
<Setter.Value>
<!-- Simple ListBoxItem - This is used for each Item in a ListBox. The item's content is placed in the ContentPresenter -->
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="SnapsToDevicePixels" Value="true"/>
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Grid SnapsToDevicePixels="true">
<Border x:Name="Border">
<Grid Height="40">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Image
Source="{Binding Path=ThumbnailImage}"
Height="30"
Width="30"
Grid.Column="0"/>
<Label
x:Name="Text"
Content="{TemplateBinding DisplayMemberPath}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
VerticalContentAlignment="Center"
HorizontalAlignment="Stretch"
Grid.Column="1"
Height="40"/>
</Grid>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="true">
<Setter Property="FontWeight" Value="Bold" TargetName="Text"/>
<Setter Property="Foreground" Value="White" TargetName="Text"/>
<Setter Property="Background" Value="Blue" TargetName="Border"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
This is the code I am using for my style and this was the line I can't get working:
Content="{TemplateBinding DisplayMemberPath}"
It complains with:
Cannot find the static member 'DisplayMemberPathProperty' on the type 'ListBoxItem'
Can anyone point me in the right direction?
| 0 | [
2,
184,
107,
42,
1381,
14,
3042,
6990,
8353,
37,
21,
968,
5309,
76,
749,
20,
10193,
32,
20,
14,
2331,
16,
14,
968,
5309,
2119,
79,
60,
800,
3726,
3726,
31,
57,
84,
15267,
14,
1936,
968,
5309,
19,
389,
20,
3042,
40,
1961,
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... |
Data timeline performance in Sql Server
===
I have a table with three columns:
**user varchar, status varchar , rep int**
status and rep get updated often and one of the requirements is:
**Given a datetime value view status and rep values, for each user, at the given date.**
I can add an updated_at datetime column to the table and insert new rows whith the same user instead of update existing ones, but the table gets large and I need to join the query results to similar results from other tables, thus I need a fast query.
What is the best performing solution to this problem in SQL Server?
| 0 | [
2,
1054,
18398,
956,
19,
4444,
255,
8128,
800,
3726,
3726,
31,
57,
21,
859,
29,
132,
7498,
45,
13,
1409,
16704,
4033,
5433,
15,
1782,
4033,
5433,
13,
15,
9411,
19,
38,
1409,
1782,
17,
9411,
164,
6372,
478,
17,
53,
16,
14,
4786,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ASP.NET Menu Parent Menu Item Highlighting on Hover when Flyouts are enabled.
===
I have a ASP.Net Menu Control with three levels and flyouts enabled.
I want to highlight the parent items (right upto the top level parent) whenever a user hovers over the menu items.
I do not want to use a client side solution as described here:
http://www.codeproject.com/KB/webforms/AspMenuParentHighlighting.aspx
Is there an elegant server side solution?
Kind regards.
| 0 | [
2,
28,
306,
9,
2328,
11379,
4766,
11379,
9101,
23102,
27,
21350,
76,
2855,
12638,
50,
9338,
9,
800,
3726,
3726,
31,
57,
21,
28,
306,
9,
2328,
11379,
569,
29,
132,
2216,
17,
2855,
12638,
9338,
9,
31,
259,
20,
14373,
14,
4766,
375... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 you encode to Base64 using Javascript?
===
I have a PHP script that can encode a PNG image to a Base64 string (which is pretty easy since there's a PHP library that provides Base64 conversion)
I'd like to do the same thing using Javascript (in the XUL Javascript environment). I know how to open files, but I'm not sure how to do the encoding? I'm not used to working with binary data. | 0 | [
2,
184,
92,
42,
20523,
20,
1000,
3470,
568,
8247,
8741,
60,
800,
3726,
3726,
31,
57,
21,
13,
26120,
3884,
30,
92,
20523,
21,
351,
2723,
1961,
20,
21,
1000,
3470,
3724,
13,
5,
2140,
25,
1772,
2010,
179,
80,
22,
18,
21,
13,
2612... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What's the best way to detect that Adobe Acrobat is installed from a browser?
===
What's the best way to detect that Adobe Acrobat is installed from a web browser? I'm assuming it would have to be done on the client-side (I don't think Adobe adds any user-agent strings). Preferably in JavaScript and in Internet Explorer, although it would be nice if it could also be done in FireFox, Safari, etc... | 0 | [
2,
98,
22,
18,
14,
246,
161,
20,
9092,
30,
20299,
21,
7638,
4900,
25,
4066,
37,
21,
16495,
60,
800,
3726,
3726,
98,
22,
18,
14,
246,
161,
20,
9092,
30,
20299,
21,
7638,
4900,
25,
4066,
37,
21,
2741,
16495,
60,
31,
22,
79,
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... |
I want to convert ::stl::string into a const wchar_t *
===
Is there any method?
My computer is AMD64,
<p>
::std::string str;
<p>
BOOL loadU(const wchar_t* lpszPathName, int flag = 0);
<p>
when I used: <p>loadU(&str);
the vs2005 says:
Error 7 error C2664:: cannot convert parameter 1 from 'std::string *__w64 ' to 'const wchar_t *'
How can I do it ? | 0 | [
2,
31,
259,
20,
8406,
13,
45,
45,
18,
7786,
45,
45,
11130,
77,
21,
11608,
38,
619,
5433,
1,
38,
1637,
800,
3726,
3726,
25,
80,
186,
2109,
60,
51,
1428,
25,
589,
43,
3470,
15,
13,
1,
306,
1,
13,
45,
45,
384,
43,
45,
45,
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... |
When Object Oriented is not good enough
===
I've encountered lately some opinions saying that Object Oriented should not always be used.
<BR/>
Do you know some use-cases that will not profit and should not use Object Oriented design?
<BR/>
<BR/>
For example: there are some problems (concerns) that will benefit from AOP. | 0 | [
2,
76,
3095,
13,
6800,
25,
52,
254,
511,
800,
3726,
3726,
31,
22,
195,
8208,
10434,
109,
11900,
1148,
30,
3095,
13,
6800,
378,
52,
550,
44,
147,
9,
13,
1,
5145,
118,
1,
107,
42,
143,
109,
275,
8,
10325,
18,
30,
129,
52,
8583... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best Practice: function return value or byref output parameters?
===
I have a function called FindSpecificRowValue that takes in a datatable and returns the row number that contains a particular value. If that value isn't found, I want to indicate so to the calling function.
Is the best approach to:
1. Write a function that returns false if not found, true if found, and the found row number as a byref/output parameter, or
2. Write a function that returns an int and pass back -999 if the row value isn't found, the row number if it is?
| 0 | [
2,
246,
1345,
45,
1990,
788,
1923,
54,
34,
14057,
5196,
12905,
60,
800,
3726,
3726,
31,
57,
21,
1990,
227,
477,
9219,
5417,
15165,
30,
1384,
19,
21,
1054,
5924,
17,
4815,
14,
3131,
234,
30,
1588,
21,
1498,
1923,
9,
100,
30,
1923... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What to use for XML parsing in PHP5?
===
It's a beginner question, but I would like to know which do you think is the best library for parsing XHTML documents in PHP5?
I have generated the XHTML from HTML files (which where created using Word :S) with Tidy, and know I need to replace some elements from them (like the <link> and <title> element, replace some atributes in <p> tags).
I haven't used XML very much, there seems to be many options for parsing in PHP (Simple XML, DOM, etc.) and I don't know if all of them can do what I need, an which is the easiest one to use.
Sorry for my english, I'm form Argentina. Thanks! | 0 | [
2,
98,
20,
275,
26,
23504,
2017,
18,
68,
19,
13,
26120,
264,
60,
800,
3726,
3726,
32,
22,
18,
21,
26931,
1301,
15,
47,
31,
83,
101,
20,
143,
56,
107,
42,
277,
25,
14,
246,
1248,
26,
2017,
18,
68,
993,
15895,
4374,
19,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ProtectedData.Protect intermittent failure
===
I'm writing a password encryption routine. I've written the below app to illustrate my problem. About 20% of the time, this code works as expected. The rest of the time, the decryption throws a cryptographic exception - "The data is invalid".
I believe the problem is in the encryption portion, because the decryption portion works the same every time. That is, if the encryption routine yields a value that the decryption routine can decrypt, it can always decrypt it. But if the encryption routine yields a value that chokes the decryption routine, it always chokes. So the decrypt routine is consistent; the encrypt routine is not.
I suspect my use of Unicode encoding is incorrect, but I've tried others with the same result.
What am I doing wrong?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Security.Cryptography;
namespace DataProtectionTest
{
public partial class Form1 : Form
{
private static readonly byte[] entropy = { 1, 2, 3, 4, 1, 2, 3, 4 };
private string password;
public Form1()
{
InitializeComponent();
}
private void btnEncryptIt_Click(object sender, EventArgs e)
{
Byte[] pw = Encoding.Unicode.GetBytes(textBox1.Text);
Byte[] encryptedPw = ProtectedData.Protect(pw, entropy, DataProtectionScope.LocalMachine);
password = Encoding.Unicode.GetString(encryptedPw);
}
private void btnDecryptIt_Click(object sender, EventArgs e)
{
Byte[] pwBytes = Encoding.Unicode.GetBytes(password);
try
{
Byte[] decryptedPw = ProtectedData.Unprotect(pwBytes, entropy, DataProtectionScope.LocalMachine);
string pw = Encoding.Unicode.GetString(decryptedPw);
textBox2.Text = pw;
}
catch (CryptographicException ce)
{
textBox2.Text = ce.Message;
}
}
}
}
| 0 | [
2,
3803,
18768,
9,
16265,
19667,
2990,
800,
3726,
3726,
31,
22,
79,
1174,
21,
20884,
24420,
8275,
9,
31,
22,
195,
642,
14,
1021,
4865,
20,
15620,
51,
1448,
9,
88,
14140,
16,
14,
85,
15,
48,
1797,
693,
28,
1727,
9,
14,
760,
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... |
VS2008 Express: How to save as UTF-8 all files by default?
===
Is there any way to make Visual Studio 2008 Express store all the files as UTF-8 by default?
Thanks for your time.
Best regards. | 0 | [
2,
4611,
2753,
2999,
45,
184,
20,
2079,
28,
287,
11720,
8,
457,
65,
6488,
34,
12838,
60,
800,
3726,
3726,
25,
80,
186,
161,
20,
233,
3458,
1120,
570,
2999,
1718,
65,
14,
6488,
28,
287,
11720,
8,
457,
34,
12838,
60,
3669,
26,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
iPhone Image process
===
I have taken the image from UIImagePickerController, but the file looks too big to be transfered through internet, I'd like to resize the images. I couldn't find any method related to the image process. Any recommendation?
Thanks. | 0 | [
2,
21024,
1961,
953,
800,
3726,
3726,
31,
57,
658,
14,
1961,
37,
13,
5661,
22039,
16855,
106,
12898,
1252,
15,
47,
14,
3893,
1879,
266,
580,
20,
44,
2617,
69,
120,
2620,
15,
31,
22,
43,
101,
20,
302,
10454,
14,
3502,
9,
31,
71... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Best practices for storing UI settings?
===
we're currently planning a larger WPF LoB application and i wonder what others think being the best practice for storing lots of UI settings e.g.
- Expander States
- Menu orders
- Sizing Properties
- etc...
i don't like the idea of having dozens of stored values using the delivered SettingsProvider (i.e. App.config file) although it can be used to store it in an embedded database using a custom SettingsProvider.
being able to use some kind of databinding is also a concern.
Has anyone had the same problems?
What did you do to store lots of ui user settings?
| 0 | [
2,
246,
5242,
26,
25615,
13,
5661,
12410,
60,
800,
3726,
3726,
95,
22,
99,
871,
2334,
21,
1662,
619,
7721,
13,
10904,
3010,
17,
31,
2666,
98,
654,
277,
142,
14,
246,
1345,
26,
25615,
7503,
16,
13,
5661,
12410,
13,
62,
9,
263,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
HTTP 1.0 vs 1.1
===
Could somebody give me a brief overview of the differences between HTTP 1.0 and HTTP 1.1? I've spent some time with both of the RFCs, but haven't been able to pull out a lot of difference between them. Wikipedia says this:
> **HTTP/1.1 (1997-1999)**
> Current version; persistent connections enabled by default and works well with proxies. Also supports request pipelining, allowing multiple requests to be sent at the same time, allowing the server to prepare for the workload and potentially transfer the requested resources more quickly to the client.
But that doesn't mean a lot to me. I realize this is a somewhat complicated subject, so I'm not expecting a full answer, but can someone give me a brief overview of the differences at a bit lower level? By this I mean that I'm looking for the info I would need to know to implement either an HTTP server or application.
I realize that this can be a somewhat complicated subject (based on what I know about HTTP as of right now), so I'm not necessarily looking for a full answer. I'm really more looking for a nudge in the right direction so that I can figure it out on my own. | 0 | [
2,
7775,
137,
9,
387,
4611,
137,
9,
165,
800,
3726,
3726,
110,
8861,
590,
55,
21,
2698,
21598,
16,
14,
4921,
128,
7775,
137,
9,
387,
17,
7775,
137,
9,
165,
60,
31,
22,
195,
1111,
109,
85,
29,
156,
16,
14,
17492,
18,
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... |
Best Java Messaging Service Books
===
I'm looking to get up to speed on JMS for my job. Is there a JMS book that is a must have, or are some better than others? Or will any do? | 4 | [
2,
246,
8247,
26437,
365,
964,
800,
3726,
3726,
31,
22,
79,
699,
20,
164,
71,
20,
1362,
27,
487,
79,
18,
26,
51,
1205,
9,
25,
80,
21,
487,
79,
18,
360,
30,
25,
21,
491,
57,
15,
54,
50,
109,
574,
119,
654,
60,
54,
129,
18... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
"Simple" SQL Query
===
Each of my clients can have many todo items and every todo item has a due date.
What would be the query for discovering the next undone todo item by due date for each file? In the event that a client has more than one todo, the one with the lowest id is the correct one.
Assuming the following minimal schema:
clients (id, name)
todos (id, client_id, description, timestamp_due, timestamp_completed)
Thank you. | 0 | [
2,
13,
7,
24629,
7,
4444,
255,
25597,
800,
3726,
3726,
206,
16,
51,
7421,
92,
57,
151,
20,
537,
3755,
17,
352,
20,
537,
9101,
63,
21,
397,
1231,
9,
98,
83,
44,
14,
25597,
26,
15799,
14,
328,
27482,
20,
537,
9101,
34,
397,
12... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 HOME method?
===
A client asked me if I knew anything about the HOME development method. I, together with wikipedia and acronymfinder, drew a complete blank.
Has anyone here heard about a development method called HOME? | 0 | [
2,
98,
25,
14,
213,
2109,
60,
800,
3726,
3726,
21,
6819,
411,
55,
100,
31,
404,
602,
88,
14,
213,
522,
2109,
9,
31,
15,
429,
29,
20169,
17,
22488,
18639,
15,
2115,
21,
1279,
6463,
9,
63,
1276,
235,
752,
88,
21,
522,
2109,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
PHP mangles my dates
===
$doba = explode("/", $dob);
$date = date("Y-m-d", mktime(0,0,0, $doba[0], $doba[1], $doba[2]));
The above code turns any date i pass through into 1999-11-30 and i know it was working yesterday. Date is correct when I echo $doba. Anyone have any ideas?
Cheers | 0 | [
2,
13,
26120,
17200,
1355,
51,
4076,
800,
3726,
3726,
5579,
43,
10595,
800,
13383,
5,
7,
118,
7,
15,
5579,
537,
220,
6,
73,
5579,
8209,
800,
1231,
5,
7,
93,
8,
79,
8,
43,
7,
15,
10804,
891,
5,
387,
15,
387,
15,
387,
15,
55... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Update a program setup
===
I haven´t experience in making setup, but i all ready make mine but now i need help because when i made a new version i want that the user double click the short cut and it do teh update if there are any.
The application is in c#.
Could you help??
Thanks in advance
Maria João | 0 | [
2,
11100,
21,
625,
18161,
800,
3726,
3726,
31,
2933,
13,
38,
1496,
19,
544,
18161,
15,
47,
31,
65,
1451,
233,
1114,
47,
130,
31,
376,
448,
185,
76,
31,
117,
21,
78,
615,
31,
259,
30,
14,
4155,
1494,
10840,
14,
502,
1077,
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... |
Bookmarked page redirect
===
I recently converted a site from asp to CF. Unfortunately, alot of the old users had the "homepage" bookmarked. www.thedomain.com/homepage.asp
Is there a sort of catch all way I could redirect any traffic from that page to the current index.cfm?
I would normally just delete those files, but the owner(s) wanted to keep it around for their own comparison reasons.
Any ideas?
Thanks | 0 | [
2,
360,
22048,
2478,
302,
14706,
800,
3726,
3726,
31,
1989,
3494,
21,
689,
37,
28,
306,
20,
10084,
9,
6200,
15,
21,
5639,
16,
14,
315,
3878,
41,
14,
13,
7,
8167,
6486,
7,
360,
22048,
9,
13,
6483,
9,
124,
537,
6232,
9,
960,
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... |
.Net Equivalent of set_unexpected()
===
Is there a .net equivalent to the C++ unexpected()/set_unexpected() functionality? | 0 | [
2,
13,
9,
2328,
4602,
16,
309,
1,
1020,
6899,
11557,
69,
5,
6,
800,
3726,
3726,
25,
80,
21,
13,
9,
2328,
4602,
20,
14,
272,
20512,
9380,
5,
6,
118,
3554,
1,
1020,
6899,
11557,
69,
5,
6,
18548,
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,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How to peer-review my project?
===
I just finished a 2d platformer in C++/Allegro. Its still in an incomplete stage while it has got me a second prize in game programming contest held at iit-m.
I wonder how to go about a peer-review from people who are into game development.
I would like to review my project on grounds of
1. game play
2. Collision detection
3. use of OOP
4. programming of sounds, effects etc
5. any further ideas
6. ways in which i could have done better
7. ways to optimize
current code looks like a garbage at some places... so could you also suggest some simplification techniques?
you can view my project (if you wish) at - [nincompoop][1]
As of now I am switching to C# and XNA, finding it very easy and fast to learn all because I'm impressed from -
http://catalog.xna.com/GameDetails.aspx?releaseId=341
> I do no intend to sell any product or popularise anything here... my intent is to get tips to be better from people who are better. As for the page where I have uploaded my project, its not supported by ads of any kind. so please feel safe.
[1]: http://ideamonk.blogspot.com/2008/09/nincompoop-all-ready-for-shaastra-2008.html | 0 | [
2,
184,
20,
7617,
8,
99,
4725,
51,
669,
60,
800,
3726,
3726,
31,
114,
842,
21,
172,
43,
2452,
106,
19,
272,
20512,
118,
1233,
62,
7944,
9,
82,
174,
19,
40,
14011,
876,
133,
32,
63,
330,
55,
21,
153,
1507,
19,
250,
3143,
3013... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
2 instances of the same table inside jsp
===
Currently there are 2 pages in a jsp file: one of them displays the data and the second one is used for pagination. The task is to include exactly the same paginator table above the data table. Sorry, couldn't resist to draw it :)
|-----------------------------------------|
| Page 2 of 200 < > |
|-----------------------------------------|
|-----------------------------------------|
| Some weird business data comes here |
|-----------------------------------------|
|-----------------------------------------|
| Page 2 of 200 < > |
|-----------------------------------------|
The question is: how do I do it w/o shameless copypasting? | 0 | [
2,
172,
13946,
16,
14,
205,
859,
572,
487,
3401,
800,
3726,
3726,
871,
80,
50,
172,
4434,
19,
21,
487,
3401,
3893,
45,
53,
16,
105,
9412,
14,
1054,
17,
14,
153,
53,
25,
147,
26,
19006,
108,
857,
9,
14,
3005,
25,
20,
468,
189... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to store master page in a common library
===
We would like to have several internal web applications which use the same master page. Is there a way to store a master page in a common library referenced by all projects? | 0 | [
2,
184,
20,
1718,
1129,
2478,
19,
21,
757,
1248,
800,
3726,
3726,
95,
83,
101,
20,
57,
238,
3117,
2741,
3767,
56,
275,
14,
205,
1129,
2478,
9,
25,
80,
21,
161,
20,
1718,
21,
1129,
2478,
19,
21,
757,
1248,
17571,
34,
65,
2314,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Page View Counter like on StackOverFlow
===
What is the best way to implement the page view counter like the ones they have here on the site where each question has a "Views" counter?
Factoring in Performance and Scalability issues. | 0 | [
2,
2478,
1418,
2105,
101,
27,
7566,
2549,
9990,
800,
3726,
3726,
98,
25,
14,
246,
161,
20,
8713,
14,
2478,
1418,
2105,
101,
14,
53,
18,
59,
57,
235,
27,
14,
689,
113,
206,
1301,
63,
21,
13,
7,
4725,
18,
7,
2105,
60,
3932,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Use AJAX instead of TagLib?
===
I was thinking about the idea of using Ajax instead of TagLib. The most elegant way would be: Using Java Annotation.
The idea is, designers or anybody can make the HTML without any taglib ,just using the "standard" HTML tags with id or name, and call the Javascript. That way any WYSIWYG can be used, developer don't have to care about HTML format or the way it's designed.
In many (at leat open-source) WYSIWYG don't show the taglibs in that final result (or have a template of it), so it's hard to "preview". Other reason is, developer should know Java and HTML/TagLibs should not be a must-have, since we got CSS and AJAX.
It should work just like that:
**MyClass.java**:
<code>
import ...
// Use the ResourceBundle resource[.{Locale}].properties
@Jay2JI18n(resourceBundle="org.format.resource",name="MyClassForm")
public class MyClass {
private Integer age;
private String name
private Date dob;
private salary;
@Jay2JLabel(resource="label.name")
@Jay2JMaxLength(value=50,required=true,)
@Jay2JException(resource="exception.message")
public String getName() {
...
}
public void setName(String name) {
if ( name.trim().equal("") ) {
throw new Exception("Name is required");
}
}
/* Getter and setter for age */
...
@Jay2JLabel(message="Sallary")
@Jay2JFormat(format="##,###.00",language="en")
@Jay2JFormat(format="##.###,00",language="pt_BR")
// or you could use that to acess a property of the ResourceBundle
//@Jay2I18nResource(resource="money.format")
public Date getSalary() {
...
}
/* Setter for salary and getter/setter for the rest */
...
}
</code>
**Page.html**:
<code>
<html>
<head>
<SCRIPT>
</SCRIPT>
</head>
<body>
<form onload="Jay2J.formalize(this)">
</form>
</body>
</html>
</code>
of it can be a HTML with the fields filled;
**PageWithFields.html**:
<code>
<html>
<head>
<SCRIPT>
</SCRIPT>
</head>
<body>
<form action="myfavoritewaytopostthis" onsubmit="return Jay2J.validate(this)" onload="Jay2J.formalizeExistField(this)">
<label>Name</label><input type="text" name="name" id="name" />
<label>DOB</label><input type="text" name="dateOfBirth" id="dob" />
<label>Salary</label><input type="text" name="salary" id="salary" />
<input type="submit" />
</form>
</body>
</html>
</code>
That way the Annotation (no XML, it's like HTML in the way that it's only another file modify and XML is not Java) will define how the HTML will be treated. That way developer can stop developing in HTML and use just JAVA (or JavaScript), do you think thats a valid idea? | 0 | [
2,
275,
20624,
700,
16,
3383,
8326,
60,
800,
3726,
3726,
31,
23,
1440,
88,
14,
882,
16,
568,
20624,
700,
16,
3383,
8326,
9,
14,
127,
11614,
161,
83,
44,
45,
568,
8247,
40,
1270,
857,
9,
14,
882,
25,
15,
12760,
54,
11181,
92,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there any difference between a GUID and a UUID?
===
I see these 2 acronyms thrown around, and I was wondering if there are any differences between a GUID and a UUID? | 0 | [
2,
25,
80,
186,
2841,
128,
21,
9457,
43,
17,
21,
13,
19612,
1340,
60,
800,
3726,
3726,
31,
196,
158,
172,
22488,
18,
6027,
140,
15,
17,
31,
23,
5712,
100,
80,
50,
186,
4921,
128,
21,
9457,
43,
17,
21,
13,
19612,
1340,
60,
3,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do I specify the "commentable_type" field with polymorphic associations?
===
I have two models, Article and Post that both inherit from a base model called ContentBase.
You can leave comments on both Articles and Posts, so I am using a Polymorphic Association between Comments and Article or Post.
However, since both Article and Post inherit from ContentBase, the commentable_type field ends up being "ContentBase" for both and screws everything up.
Is there a way to specify the commentable_type field in the has_many relationship in Article and Post? | 0 | [
2,
184,
107,
31,
19077,
14,
13,
7,
960,
1130,
579,
1,
4474,
7,
575,
29,
3446,
12498,
596,
10642,
60,
800,
3726,
3726,
31,
57,
81,
2761,
15,
2002,
17,
678,
30,
156,
17569,
37,
21,
1000,
1061,
227,
2331,
8436,
9,
42,
92,
767,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Basic MS SQL Server 2008 questions
===
Can you import (or migrate) SQL Server 2005 databases to SQL Server 2008?
Is it possible to have the same 2005 and 2008 running on the same machine without complications? | 0 | [
2,
2125,
4235,
4444,
255,
8128,
570,
2346,
800,
3726,
3726,
92,
42,
9010,
13,
5,
248,
22985,
6,
4444,
255,
8128,
812,
6018,
18,
20,
4444,
255,
8128,
570,
60,
25,
32,
938,
20,
57,
14,
205,
812,
17,
570,
946,
27,
14,
205,
1940,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Bug in intellisense - how to report to Microsoft?
===
I found a bug in the method stub generation of Visual Studio intellisense.
class A { }
class B : A
{
A a;
void f() { a.NewMethod(); }
}
Generating a stub for `NewMethod` will create a protected method, when in fact a public method is necessary.
Is there any way to report this to Microsoft?
[This post][1] says it's a Mission Impossible to get through.
[1]: http://weblog.timaltman.com/archive/2006/03/22/reporting-bugs-microsoft | 0 | [
2,
6256,
19,
14635,
3159,
6498,
13,
8,
184,
20,
1330,
20,
7099,
60,
800,
3726,
3726,
31,
216,
21,
6256,
19,
14,
2109,
21354,
2782,
16,
3458,
1120,
14635,
3159,
6498,
9,
718,
21,
13,
1,
13,
1,
718,
334,
13,
45,
21,
13,
1,
21,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Algorithm to find similar text
===
I have many articles in a database (with title,text), I'm looking for an algorithm to find the X most similar articles, something like Stack Overflow's "Related Questions" when you ask a question.
I tried googling for this but only found pages about other "similar text" issues, something like comparing every article with all the others and storing a similarity somewhere. SO does this in "real time" on text that I just typed.
How? | 0 | [
2,
9083,
20,
477,
835,
1854,
800,
3726,
3726,
31,
57,
151,
3376,
19,
21,
6018,
13,
5,
1410,
581,
15,
11969,
6,
15,
31,
22,
79,
699,
26,
40,
9083,
20,
477,
14,
993,
127,
835,
3376,
15,
301,
101,
7566,
20285,
22,
18,
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... |
Practical Singleton & Dependency Injection question
===
Say I have a class called PermissionManager which should only exist once for my system and basically fulfills the function of managing various permissions for various actions in my application. Now I have some class in my application which needs to be able to check a certain permission in one of its methods. This class's constructor is currently public, i.e. used by API users.
Until a couple of weeks ago, I would have simply had my class call the following pseudo-code somewhere:
PermissionManager.getInstance().isReadPermissionEnabled(this)
But since I have noticed everyone here hating singletons + this kind of coupling, I was wondering what the better solution would be, since the arguments I have read against singletons seem to make sense (not testable, high coupling, etc.).
So should I actually require API users to pass in a PermissionManager instance in the constructor of the class? Even though I only want a single PermissionManager instance to exist for my application?
Or am I going about this all wrong and should have a non-public constructor and a factory somewhere which passes in the instance of PermissionManager for me? | 0 | [
2,
5713,
345,
444,
279,
26835,
13646,
1301,
800,
3726,
3726,
395,
31,
57,
21,
718,
227,
5572,
22256,
56,
378,
104,
3182,
382,
26,
51,
329,
17,
11374,
14313,
18,
14,
1990,
16,
5616,
617,
5572,
18,
26,
617,
3078,
19,
51,
3010,
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... |
Is it possible do Declare a constant array that includes another constant array?
===
I want to do something like this:
const
MyFirstConstArray: array[0..1] = ('Hi', 'Foo');
MySecondConstArrayWhichIncludesTheFirstOne: array[0..2] = MyFirstConstArray + ('Bar');
Basically I want the following result:
MyFirstConstArray = ('Hi', 'Foo');
MySecondConstArrayWhichIncludesTheFirstOne = ('Hi', 'Foo', 'Bar');
Is it possible somehow? | 0 | [
2,
25,
32,
938,
107,
10123,
21,
3587,
7718,
30,
1103,
226,
3587,
7718,
60,
800,
3726,
3726,
31,
259,
20,
107,
301,
101,
48,
45,
11608,
38,
51,
3552,
1126,
2265,
2787,
45,
7718,
2558,
387,
9,
9,
165,
500,
800,
13,
5,
22,
1822,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Writing to a FileStream behaves strangely, as observed by process monitor
===
I'm using FileStream to write to a file, and watching the underlying system calls using [Process Monitor][1]. I'm having trouble with some file locking issues in a production deployment, so I'm looking at the details closely.
This sample code:
using (FileStream fs = new FileStream("c:\\temp\\test.txt", FileMode.Create, FileAccess.Write, FileShare.Read))
{
fs.Write(new byte[] { 1, 2, 3, 4, 5 }, 0, 5);
fs.Close();
}
Causes the following systems calls:
9:27:09.4561092 AM ConsoleApplication1.vshost.exe 2320 CreateFile C:\temp\test.txt SUCCESS Desired Access: Generic Read/Write, Disposition: OverwriteIf, Options: Synchronous IO Non-Alert, Non-Directory File, Open No Recall, Attributes: n/a, ShareMode: Read, AllocationSize: 0, OpenResult: Overwritten
9:27:12.2217409 AM ConsoleApplication1.vshost.exe 2320 WriteFile C:\temp\test.txt SUCCESS Offset: 0, Length: 5
9:27:12.2219901 AM ConsoleApplication1.vshost.exe 2320 CloseFile C:\temp\test.txt SUCCESS
9:27:12.2234484 AM ConsoleApplication1.vshost.exe 2320 CreateFile C:\temp\test.txt SUCCESS Desired Access: Generic Read, Write Attributes, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Complete If Oplocked, Random Access, Attributes: N, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
9:27:12.2248664 AM ConsoleApplication1.vshost.exe 2320 QueryBasicInformationFile C:\temp\test.txt SUCCESS CreationTime: 10/29/2008 9:04:14 AM, LastAccessTime: 10/29/2008 9:27:12 AM, LastWriteTime: 10/29/2008 9:27:12 AM, ChangeTime: 10/29/2008 9:27:12 AM, FileAttributes: A
9:27:12.2250075 AM ConsoleApplication1.vshost.exe 2320 SetBasicInformationFile C:\temp\test.txt SUCCESS CreationTime: -1, LastAccessTime: -1, LastWriteTime: -1, ChangeTime: -1, FileAttributes: n/a
9:27:12.2255889 AM ConsoleApplication1.vshost.exe 2320 QueryStandardInformationFile C:\temp\test.txt SUCCESS AllocationSize: 8, EndOfFile: 5, NumberOfLinks: 1, DeletePending: False, Directory: False
9:27:12.2257571 AM ConsoleApplication1.vshost.exe 2320 ReadFile C:\temp\test.txt SUCCESS Offset: 0, Length: 5
9:27:12.2259825 AM ConsoleApplication1.vshost.exe 2320 ReadFile C:\temp\test.txt SUCCESS Offset: 0, Length: 5
9:27:12.2261588 AM ConsoleApplication1.vshost.exe 2320 ReadFile C:\temp\test.txt SUCCESS Offset: 0, Length: 5
9:27:12.2265161 AM ConsoleApplication1.vshost.exe 2320 ReadFile C:\temp\test.txt SUCCESS Offset: 0, Length: 2
9:27:12.2268237 AM ConsoleApplication1.vshost.exe 2320 ReadFile C:\temp\test.txt SUCCESS Offset: 0, Length: 5
9:27:12.2271332 AM ConsoleApplication1.vshost.exe 2320 ReadFile C:\temp\test.txt SUCCESS Offset: 0, Length: 5
9:27:12.2272841 AM ConsoleApplication1.vshost.exe 2320 ReadFile C:\temp\test.txt SUCCESS Offset: 0, Length: 5
9:27:12.2274779 AM ConsoleApplication1.vshost.exe 2320 ReadFile C:\temp\test.txt SUCCESS Offset: 0, Length: 5
9:27:12.2276249 AM ConsoleApplication1.vshost.exe 2320 ReadFile C:\temp\test.txt SUCCESS Offset: 0, Length: 5
9:27:12.2278766 AM ConsoleApplication1.vshost.exe 2320 ReadFile C:\temp\test.txt SUCCESS Offset: 0, Length: 5
9:27:12.2282577 AM ConsoleApplication1.vshost.exe 2320 ReadFile C:\temp\test.txt SUCCESS Offset: 0, Length: 5
9:27:12.2284476 AM ConsoleApplication1.vshost.exe 2320 QueryFileInternalInformationFile C:\temp\test.txt SUCCESS IndexNumber: 0x2d000000016b88
9:27:12.2286183 AM ConsoleApplication1.vshost.exe 2320 CloseFile C:\temp\test.txt SUCCESS
9:27:12.2288759 AM ConsoleApplication1.vshost.exe 2320 CreateFile C:\temp\test.txt SUCCESS Desired Access: Read Attributes, Write Attributes, Disposition: Open, Options: , Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
9:27:12.2305722 AM ConsoleApplication1.vshost.exe 2320 QueryBasicInformationFile C:\temp\test.txt SUCCESS CreationTime: 10/29/2008 9:04:14 AM, LastAccessTime: 10/29/2008 9:27:12 AM, LastWriteTime: 10/29/2008 9:27:12 AM, ChangeTime: 10/29/2008 9:27:12 AM, FileAttributes: A
9:27:12.2307379 AM ConsoleApplication1.vshost.exe 2320 CloseFile C:\temp\test.txt SUCCESS
The first three IO calls are expected (create, write, close), but the the process goes on to read the file a dozen more times and repeatedly open and close it.
I've now observed this behavior on Win XP SP2, and Win 2003 x64. However, my Windows Vista machine at home behaves as expected (just the first three lines).
Any clues on why this is happening on non-Vista runtimes?
[1]: http://live.sysinternals.com/procmon.exe | 0 | [
2,
1174,
20,
21,
3893,
11260,
14149,
18,
16432,
15,
28,
3634,
34,
953,
7626,
800,
3726,
3726,
31,
22,
79,
568,
3893,
11260,
20,
2757,
20,
21,
3893,
15,
17,
1953,
14,
10974,
329,
3029,
568,
636,
16835,
7626,
500,
2558,
165,
500,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Whatis wrong with this create table statement
===
Does anyone have any idea what is wrong with this create statement for mysql?
CREATE TABLE auctions (article_no VARCHAR(20), article_name VARCHAR(100), subtitle VARCHAR(20), current_bid VARCHAR(20), start_price VARCHAR(20),
bid_count VARCHAR(20), quant_total VARCHAR(20), quant_sold VARCHAR(20), start DATETIME, ends DATETIME, origin_end DATETIME, seller_id VARCHAR(20),
best_bidder_id VARCHAR(20), finished VARCHAR(20), watch VARCHAR(20), VARCHAR(20), auction_type VARCHAR(20), insert_date DATETIME, update_date DATETIME, cat_1_id VARCHAR(20), cat_2_id VARCHAR(20));
I just get there is an error near Line 3 in my syntax, but I can not see anything | 0 | [
2,
98,
403,
1389,
29,
48,
1600,
859,
3331,
800,
3726,
3726,
630,
1276,
57,
186,
882,
98,
25,
1389,
29,
48,
1600,
3331,
26,
51,
18,
22402,
60,
1600,
859,
8057,
18,
13,
5,
20360,
1,
251,
4033,
5433,
5,
1323,
6,
15,
2002,
1,
72... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Informix: how to get an id of the last inserted record
===
What's the most efficient way of getting the value of the SERIAL column after the INSERT statement? I.e. I am looking for a way to replicate `@@IDENTITY` or `SCOPE_IDENTITY` functionality of MS SQL | 0 | [
2,
10361,
4028,
45,
184,
20,
164,
40,
4924,
16,
14,
236,
14215,
571,
800,
3726,
3726,
98,
22,
18,
14,
127,
8243,
161,
16,
1017,
14,
1923,
16,
14,
5956,
4698,
75,
14,
14692,
3331,
60,
31,
9,
62,
9,
31,
589,
699,
26,
21,
161,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 needs to go in order to fully remove a MAMP install from OSX?
===
For reasons that we won't discuss, I have determined that MAMP is a pile of crap that haunts my system, and unless I remove it fully, I will live in shame.
I've done the obvious thing and removed the MAMP directory from my Applications folder, however, I don't like wandering files, and I have an itching feeling that MAMP put some .sock files somewhere, or otherwise made a mess in my file system.
*What files does MAMP add to a system when it's installed, and where are they?*
_If you have proof that MAMP doesn't actually put files anywhere (besides the /MAMP dir), then that's as good an answer as any!_ | 0 | [
2,
98,
2274,
20,
162,
19,
389,
20,
2337,
4681,
21,
1216,
2554,
16146,
37,
13,
759,
396,
60,
800,
3726,
3726,
26,
2932,
30,
95,
230,
22,
38,
5990,
15,
31,
57,
2734,
30,
1216,
2554,
25,
21,
6551,
16,
9192,
30,
22366,
18,
51,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I use Linq in a T4 template?
===
I am using T4 to generate some screens and middle-tier code for a project, and would like to use Linq to simplify some of my template code. However, when I try to use Linq, the template reports a syntax error.
| 0 | [
2,
184,
92,
31,
275,
6294,
1251,
19,
21,
13,
38,
300,
22894,
60,
800,
3726,
3726,
31,
589,
568,
13,
38,
300,
20,
7920,
109,
14236,
17,
772,
8,
5259,
1797,
26,
21,
669,
15,
17,
83,
101,
20,
275,
6294,
1251,
20,
28257,
109,
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... |
Using the main method of classes for debugging?
===
It is good practice to use the main method to test a java/.net class?
I've seen it reccommended in some text books, but to me it seems like using a unit testing framework would make more sense...
The main method can gives you one point of entry to the class and you can either test one aspect of the classes functionalit. You could I guess test many but it doesn't seem to make sense as much as using Junit or Nunit. | 0 | [
2,
568,
14,
407,
2109,
16,
2684,
26,
121,
16254,
2762,
60,
800,
3726,
3726,
32,
25,
254,
1345,
20,
275,
14,
407,
2109,
20,
1289,
21,
8247,
118,
9,
2328,
718,
60,
31,
22,
195,
541,
32,
6042,
960,
79,
10726,
19,
109,
1854,
964,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 set up GRUB in a cloned hard disk
===
My PC has a hard disk at /dev/hda and boots from its MBR using the GRUB bootloader.
I connected a second hard disk at /dev/hdc, formatted it and copied to it all files from my original hard disk.
Now I want to make the second hard disk bootable, when it is connected as the primary hard disk (i.e. as /dev/hda).
(The second hard disk has different partitioning, so dd if=/dev/hda of=/dev/hdc won't cut it.)
Note that in both disks, the first partition (/dev/hda0 and /dev/hdc0) is the /boot partition, which includes the Linux kernels and ./grub subdirectory.
My naive attempt to use the commands:
grub> root (hd1,0)
grub> setup (hd1)
while the cloned hard disk was /dev/hdc (known as hd1 to grub)
caused garbage to be displayed when booting from the cloned hard disk (when connected as /dev/hda).
What is the correct way to configure grub on a cloned hard disk, if one does not want to boot the PC from a diskette or CD-ROM due to any reason? | 0 | [
2,
184,
20,
309,
71,
8961,
220,
19,
21,
13871,
43,
552,
8582,
800,
3726,
3726,
51,
5168,
63,
21,
552,
8582,
35,
13,
118,
14438,
118,
252,
593,
17,
5894,
37,
82,
13,
18262,
568,
14,
8961,
220,
6801,
8294,
106,
9,
31,
2587,
21,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I get 'footer' content on a master page to push down when main content requires it?
===
Been a while since I've dealt with ASP.NET and this is the first time I've had to deal with master pages. Been following tutorials everything is fine except a problem I'm having with the footer.
The master page has divs for topContent, mainContent and footerContent. In mainContent I have a ContentPlaceHolder.
The default content page (just getting some proof-of-concept going here) has a few labels and text boxes in it with one multi-line text box in the Content area. "Content1" properly links back to ContentPlaceHolder1 back on the master page.
When I run the site, the content appears but the footer section isn't "pushed down" by the now-filled ContentPlaceHolder - it almost acts like a background image.
What attribute am I missing here? I tried using CSS to force the footerContent to the bottom, but that just put the fotter content at the bottom of the browser and when I expanded the multi-line text box to greater than the browser's window height, the same thing happened (content overlaying the footer)
I know this has to be something simple that I'm missing.
The basics of the master page are as follows:
<form id="form1" runat="server">
<div id="topContent">
<table style="width: 832px">
</table>
</div>
<div id="mainContent">
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
<div id="footerContent">
<br/><br/>
<center style="font-size: small; font-style: italic; font-family: Arial">
<a target="_new" href="/Disclaimer.html">Security and Privacy Notice</a><br/>
...
</center>
</div>
</form>
Help! | 0 | [
2,
184,
107,
31,
164,
13,
22,
3670,
106,
22,
2331,
27,
21,
1129,
2478,
20,
3250,
125,
76,
407,
2331,
4781,
32,
60,
800,
3726,
3726,
74,
21,
133,
179,
31,
22,
195,
9706,
29,
28,
306,
9,
2328,
17,
48,
25,
14,
64,
85,
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... |
How can I send output to an external/second display in Java?
===
I would like to be able to emulate the functionality of the "Presenter Tools" in MS Office. This requires the program to be able to detect and use an external/secondary monitor/projector.
Could somebody please point me in the right direction for achieving this.
I would like to use Java 1.5
Thankyou. | 0 | [
2,
184,
92,
31,
2660,
5196,
20,
40,
4886,
118,
5007,
3042,
19,
8247,
60,
800,
3726,
3726,
31,
83,
101,
20,
44,
777,
20,
23804,
14,
18548,
16,
14,
13,
7,
3914,
106,
4672,
7,
19,
4235,
488,
9,
48,
4781,
14,
625,
20,
44,
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... |
Get javascript version from browser !=IE in asp.net
===
In my current logging class I log the browser, browser version and javascript version.
The Javascript version I get through
HttpContext.Request.Browser.JScriptVersion
This works fine for IE, but not for any other browser.
Is there another way (not javascript based) to detect the installed javascript version? | 0 | [
2,
164,
8247,
8741,
615,
37,
16495,
13,
187,
3726,
660,
19,
28,
306,
9,
2328,
800,
3726,
3726,
19,
51,
866,
13,
13919,
718,
31,
6738,
14,
16495,
15,
16495,
615,
17,
8247,
8741,
615,
9,
14,
8247,
8741,
615,
31,
164,
120,
7775,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Enabling floating point interrupts on Mac OS X Intel
===
On Linux, feenableexcept and fedisableexcept can be used to control the generation of SIGFPE interrupts on floating point exceptions. How can I do this on Mac OS X Intel?
Inline assembly for enabling floating point interrupts is provided in http://developer.apple.com/documentation/Performance/Conceptual/Mac_OSX_Numerics/Mac_OSX_Numerics.pdf, pp. 7-15, but only for PowerPC assembly. | 0 | [
2,
13168,
8319,
454,
15811,
18,
27,
1572,
13,
759,
993,
14635,
800,
3726,
3726,
27,
13024,
15,
6067,
103,
579,
10066,
17,
6068,
403,
579,
10066,
92,
44,
147,
20,
569,
14,
2782,
16,
8858,
410,
1664,
15811,
18,
27,
8319,
454,
13392,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Newline constant defined in Java like Environment.Newline in C#?
===
In C# there is the static property [Environment.Newline][1] that changed depending on the running platform.
Is there anything similar in Java?
[1]: http://msdn.microsoft.com/en-us/library/system.environment.newline.aspx | 0 | [
2,
25,
80,
21,
78,
1143,
3587,
2811,
19,
8247,
101,
2307,
9,
2681,
1143,
19,
272,
5910,
60,
800,
3726,
3726,
19,
272,
5910,
80,
25,
14,
12038,
1354,
636,
28976,
9,
2681,
1143,
500,
2558,
165,
500,
30,
1015,
4758,
27,
14,
946,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What do you need to do Unit testing in Java with Eclipse?
===
I've recently been lifted out of the .Net world into the Java world and I miss My unit tests.
Using Visual Studio I used NUnit and TestDriven.net to ru my unit tests.
What is a comparible system for Java Using Eclipse.
I'm looking specifically for the plugins that will get me going, or a guide on how to do it.
I'm aware that JUnit is what NUnit was initially based on, but I want to know the best way to integrate it into Eclipse as there seem to be a few plugins that do this and I don't have the time to play around with them all. | 0 | [
2,
98,
107,
42,
376,
20,
107,
1237,
4431,
19,
8247,
29,
11652,
60,
800,
3726,
3726,
31,
22,
195,
1989,
74,
2493,
70,
16,
14,
13,
9,
2328,
126,
77,
14,
8247,
126,
17,
31,
1501,
51,
1237,
4894,
9,
568,
3458,
1120,
31,
147,
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... |
Can I change the Dojo namespace to something other than dojo?
===
I know you can do it for jQuery using jQuery.noConflict. Is there a way to do something similar with Dojo? | 0 | [
2,
92,
31,
753,
14,
107,
1636,
204,
5582,
20,
301,
89,
119,
107,
1636,
60,
800,
3726,
3726,
31,
143,
42,
92,
107,
32,
26,
487,
8190,
93,
568,
487,
8190,
93,
9,
251,
14093,
4663,
38,
9,
25,
80,
21,
161,
20,
107,
301,
835,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Do you actually write your unit tests before your code?
===
I know that one of the defining principles of Test driven development is that you write your Unit tests first and then write code to pass those unit tests, but how many of you actually do this?
I've found that I often don't know what I am testing untill I've written it, mainly because the past couple of projects I've worked on have more evolved from a proof of concept rather than been designed.
I've tried to write my unit tests before and it can be useful, but it doesn't seem natural to me. | 0 | [
2,
107,
42,
1121,
2757,
154,
1237,
4894,
115,
154,
1797,
60,
800,
3726,
3726,
31,
143,
30,
53,
16,
14,
14684,
5624,
16,
1289,
5355,
522,
25,
30,
42,
2757,
154,
1237,
4894,
64,
17,
94,
2757,
1797,
20,
1477,
273,
1237,
4894,
15,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to debug ORA-01775: looping chain of synonyms?
===
I'm familiar with the issue behind ORA-01775: looping chain of synonyms, but is there any trick to debugging it, or do I just have to "create or replace" my way out of it?
Is there a way to query the schema or whatever to find out what the current definition of a public synonym is?
Even more awesome would be a graphical tool, but at this point, anything would be helpful. | 0 | [
2,
184,
20,
121,
16254,
54,
58,
8,
387,
1053,
3283,
45,
5293,
68,
2858,
16,
9344,
18,
60,
800,
3726,
3726,
31,
22,
79,
3694,
29,
14,
1513,
439,
54,
58,
8,
387,
1053,
3283,
45,
5293,
68,
2858,
16,
9344,
18,
15,
47,
25,
80,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Edit Registry Values
===
I want to change the registry values on the pocketPC. I ran the following code:
if(enabled)
{
dwData = 120;
}
if(RegSetValueEx(HKEY_LOCAL_MACHINE, _T("System\\CurrentControlSet\\Control\\Power\\Timeouts\\BattSuspendTimeout"), 0, REG_DWORD, (LPBYTE)&dwData, sizeof(DWORD)))
{
return FALSE;
}
but it doesn't shange the registry entry. Does anyone know how to set registry key values with c++?
Thanks! | 0 | [
2,
9392,
18269,
4070,
800,
3726,
3726,
31,
259,
20,
753,
14,
18269,
4070,
27,
14,
3397,
5779,
9,
31,
717,
14,
249,
1797,
45,
100,
5,
219,
579,
43,
6,
13,
1,
15952,
18768,
800,
6029,
73,
13,
1,
100,
5,
12463,
3554,
15165,
1706,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
x64 .NET compilation / Process Explorer oddity
===
Apologies if any of what I'm about to say makes no sense or overlooks something obvious - my knowledge of CLR internals is spotty.
If I understand correctly, then if I just build a solution for 'AnyCPU' in VS2K5 (or point MSBuild at that .sln file with those settings) then the binaries only compile as far as MSIL. They then get JITted to 32-bit if executed on a 32-bit platform or 64-bit code if executed on x64...right?
The DLLs are used for a web app and hosted in the W3WP.exe process. Process Explorer tells me W3WP is a 64-bit process.
But when I use Process Explorer to check the properties on one of these DLLs in DLL view, it says: 'Image: 32-bit'. What gives?
If I run corflags against the dll in question it tells me: ILONLY 1 , 32BIT 0 but PE PE32 . My understanding is that this means yes it is compiled only as far as IL, no it's not limited to either 32 bit or 64 bit, but I'm not entirely clear. Is the PE32 flag anything to do with it showing up as 32-bit as per above?
| 0 | [
2,
993,
3470,
13,
9,
2328,
4868,
13,
118,
953,
8520,
4210,
856,
800,
3726,
3726,
27101,
100,
186,
16,
98,
31,
22,
79,
88,
20,
395,
1364,
90,
1259,
54,
20930,
18,
301,
4674,
13,
8,
51,
1918,
16,
10842,
139,
3117,
18,
25,
1999,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
NHibernate HQL Union
===
Is it possible to do a union in NHibernates HQL query language? | 0 | [
2,
12109,
15191,
8820,
746,
22402,
667,
800,
3726,
3726,
25,
32,
938,
20,
107,
21,
667,
19,
12109,
15191,
8820,
18,
746,
22402,
25597,
816,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Looking for suggestions for building a secure REST API within Ruby on Rails
===
I'm getting started on building a REST API for a project I'm working on, and it led me to do a little research as to the best way to build an API using RoR. I find out pretty quickly that by default, models are open to the world and can be called via URL by simply putting a ".xml" at the end of the URL and passing appropriate parameters.
So then the next question came. How do I secure my app to prevent unauthorized changes? In doing some research I found a couple articles talking about `attr_accessible` and `attr_protected` and how they can be used. The particular URL I found talking about these was posted back in May of '07 ([here][1]).
As with all things ruby, I'm sure that things have evolved since then. So my question is, is this still the best way to secure a REST API within RoR?
If not what do you suggest in either a "new project" or an "existing project"scenario?
[1]: http://railscasts.com/episodes/26-hackers-love-mass-assignment | 0 | [
2,
699,
26,
18389,
26,
353,
21,
4315,
760,
21,
2159,
363,
10811,
27,
2240,
18,
800,
3726,
3726,
31,
22,
79,
1017,
373,
27,
353,
21,
760,
21,
2159,
26,
21,
669,
31,
22,
79,
638,
27,
15,
17,
32,
481,
55,
20,
107,
21,
265,
52... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Should I build my next web app in ASP.NET MVC?
===
My team is considering building our next web app using the ASP.NET MVC framework. I am slightly hesitant, as are some others, because it is still only in beta. I really want to dive in because it seems to be a great way of providing clear separation of concerns and improving testability.
Should I take the plunge now, while MVC is still in beta, or hold off for a release candidate?
| 0 | [
2,
378,
31,
1895,
51,
328,
2741,
4865,
19,
28,
306,
9,
2328,
307,
8990,
60,
800,
3726,
3726,
51,
173,
25,
5154,
353,
318,
328,
2741,
4865,
568,
14,
28,
306,
9,
2328,
307,
8990,
6596,
9,
31,
589,
1847,
22821,
15,
28,
50,
109,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can Biztalk run a console application?
===
I am writing a C# console application that takes a binary file, rips it apart, analyzes it, and stores the data into a database.
We want to use BizTalk to orchestrate watching when a new binary file is placed in a directory and calling my application with the file name/names to be parsed.
Can BizTalk run a command line program?
Can it pass command line parameters to the program?
How would I report back to BizTalk that the last run was a success or a failure?
Thank you,
Keith | 0 | [
2,
92,
1732,
380,
9718,
485,
21,
8650,
3010,
60,
800,
3726,
3726,
31,
589,
1174,
21,
272,
5910,
8650,
3010,
30,
1384,
21,
14171,
3893,
15,
6310,
18,
32,
2629,
15,
16051,
18,
32,
15,
17,
4134,
14,
1054,
77,
21,
6018,
9,
95,
259... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Sharepoint Web Services Tutorial
===
I'm trying to upload documents to SharePoint using web services attaching custom metadata to the files. I've searched but have not found a good tutorial covering all these topics. Can anybody point me in the right direction?
Here's why I think I need to use web services:
I'm developing on XP and the Sharepoint object model is not remotable. This means any code which has "using Microsoft.Sharepoint" is out :-(
I'm looked into the CopyIntoItems web service but am having trouble implementing it myself. I was hoping for a clear tutorial. I've tried using the sample code from http://msdn.microsoft.com/en-us/library/copy.copy.copyintoitems.aspx , but I'm not sure what my sourceURL should be. Also, since I can't use "Microsoft.Sharepoint" references, I'm wondering what my Fields will look like? (Is this my metadata?) Also, I'm curious as to why only Website projects allow me to add a web service.
Once the file is "in" Sharepoint using that web service, I'll have to use another one to update custom columns, or metadata. Some of these are freeform text, but other must match entries in lists or lookups. I haven't found any information on this yet.
Thank you for your help! | 0 | [
2,
1891,
3132,
2741,
687,
29724,
800,
3726,
3726,
31,
22,
79,
749,
20,
71,
8294,
4374,
20,
1891,
3132,
568,
2741,
687,
19514,
68,
5816,
28057,
20,
14,
6488,
9,
31,
22,
195,
9036,
47,
57,
52,
216,
21,
254,
29724,
3846,
65,
158,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 auto-size an iFrame?
===
I'm loading an iFrame and want the parent to automatically change the height based upon the height of the iFrame's content.
To simply things, all pages belong to the same domain, so I shouldn't run into cross-site scripting issues. | 0 | [
2,
184,
20,
3108,
8,
10454,
40,
31,
8361,
60,
800,
3726,
3726,
31,
22,
79,
12797,
40,
31,
8361,
17,
259,
14,
4766,
20,
7499,
753,
14,
2947,
432,
685,
14,
2947,
16,
14,
31,
8361,
22,
18,
2331,
9,
20,
1659,
564,
15,
65,
4434,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using XPATH to search text containing
===
I use [XPather Browser][1] to check my XPATH expressions on an HTML page.
I got an HTML file with a content similar to this:
...
<tr>
<td>abc</td>
<td> </td> --stack overflow doesn't show the entity nbsp;
</tr>
...
I want to select a node with a text containing the string "` `".
With a normal string like "abc" there is no problem. I use an XPATH similar to `//td[text()="abc"]`.
When I try with an an XPATH like `//td[text()=" "]` it returns nothing. Is there a special rule concerning texts with "`&`" ?
[1]: http://xpath.alephzarro.com/ | 0 | [
2,
568,
993,
8353,
20,
2122,
1854,
3503,
800,
3726,
3726,
31,
275,
636,
396,
8353,
106,
16495,
500,
2558,
165,
500,
20,
2631,
51,
993,
8353,
13832,
27,
40,
13,
15895,
2478,
9,
31,
330,
40,
13,
15895,
3893,
29,
21,
2331,
835,
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... |
Matching FORTRAN rounding in C#
===
FORTRAN provides several functions to convert a double precision number to an integral value. The method used for truncation/rounding differs. I am converting complex scientific algorithms which use these.
According to FORTRAN documentation:<br>
<b>aint(x)</b> returns the integral value between x and 0, nearest x.<br>
<b>anint(x)</b> returns the nearest integral value to x, except halfway cases are
rounded to the integral value larger in magnitude.<br>
<b>nint(x)</b> converts x into int format rounding to the nearest int value, except
halfway cases are rounded to the int value larger in magnitude.
<b>Does anyone have an implementation of these in C#?</b>
It might be tricky getting it right.
(int)x appears to match aint()<br>
Convert.ToInt32(x) does not match any of the above.<br>
Trunc(x) does not match any of the above.<br>
Round(x) might match anint or nint. <br>
The difference between anint and nint seems to be the return type, where anint returns a double precision value but nint returns an integer. Both are used (acutal sample):<br>
DOUBLE PRECISION A, B, C, D, E, F, G<br>
... values set here ...<br>
F = ANINT(A-B) + ANINT(C-D) + ANINT(B+D-E)<br>
G = NINT(F) + 1D0;<br>
Perhaps a FORTRAN expert could help clarify why the author chose to use both (I am assuming it was intentional).
| 0 | [
2,
10120,
26,
17685,
560,
68,
19,
272,
5910,
800,
3726,
3726,
26,
17685,
1927,
238,
3719,
20,
8406,
21,
1494,
13133,
234,
20,
40,
9315,
1923,
9,
14,
2109,
147,
26,
22328,
872,
118,
5000,
68,
14761,
9,
31,
589,
19583,
1502,
2272,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Calling COM objects from a Firefox addon
===
I'm about to take on a project that requires a Firefox addon to issue call to COM dll's installed on the client Windows machine and I'm having a hard time estimating the complexity of this undertaking.
I have quite a bit of experience with COM, so I'm not frightened by it. I have less experience with Firefox addons, but I don't think that's where my problems are going to be.
Has anybody done anything like that?
Does Firefox allow its addons to communicate freely with the outside world?
Is there a plugin or sample code somewhere that does something like this (Google turned up little useful results)? | 0 | [
2,
2555,
13,
960,
3916,
37,
21,
535,
18219,
3547,
218,
800,
3726,
3726,
31,
22,
79,
88,
20,
247,
27,
21,
669,
30,
4781,
21,
535,
18219,
3547,
218,
20,
1513,
645,
20,
13,
960,
13,
43,
211,
22,
18,
4066,
27,
14,
6819,
1936,
19... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I check if ini_set() is enabled either in the global PHP.INI or in my PHP script?
===
I have an app that is failing on the install. The vendor says I probably have ini_set() disabled. How can I check this? | 0 | [
2,
184,
107,
31,
2631,
100,
19,
49,
1,
3554,
5,
6,
25,
9338,
694,
19,
14,
2062,
13,
26120,
9,
2651,
54,
19,
51,
13,
26120,
3884,
60,
800,
3726,
3726,
31,
57,
40,
4865,
30,
25,
7250,
27,
14,
16146,
9,
14,
23510,
898,
31,
91... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Merging a custom ContextMenuStrip with the system edit context menu in a DataGridView
===
I have a DataGridView in a VB.NET app that I have limited to cell selection only. The control has two columns, the first is not editable, the second is editable. I have a ContextMenuStrip that provides some additional functionality and I am able to make it appear when an editable cell receives a right click and is not in edit mode. Based on an example in a [Microsoft forum][1], I am able to now show the context menu when an editable cell receives a right click while also in edit mode. That code is as follows:
Private Sub DataGridView1_EditingControlShowing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewEditingControlShowingEventArgs) Handles DataGridView1.EditingControlShowing
If TypeOf e.Control Is TextBox Then
With DirectCast(e.Control, TextBox)
.ContextMenuStrip = ContextMenuStrip1
End With
End If
End Sub
This, however, completely overwrites the system context menu of the editing control. How can I merge my Context Menu Strip (`ContextMenuStrip1`) with the system context menu?
For further information, I am using VS2008, but targeting the .NET 2.0 platform.
[1]: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3745757&SiteID=1 | 0 | [
2,
18842,
21,
5816,
4141,
755,
267,
17851,
29,
14,
329,
9392,
4141,
11379,
19,
21,
1054,
16375,
4725,
800,
3726,
3726,
31,
57,
21,
1054,
16375,
4725,
19,
21,
13,
20468,
9,
2328,
4865,
30,
31,
57,
1317,
20,
1667,
3155,
104,
9,
14... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Which of these two GetLargestValue C# implementations is better, and why?
===
I'm having a disagreement with someone over how best to implement a simple method that takes an array of integers, and returns the highest integer (using C# 2.0).
Below are the two implementations - I have my own opinion of which is better, and why, but I'd appreciate any impartial opinions.
**Option A**
public int GetLargestValue(int[] values)
{
try {
Array.Sort(values);
return values[values.Length - 1];
}
catch (Exception){ return -1;}
}
**Option B**
public int GetLargestValue(int[] values)
{
if(values == null)
return -1;
if(values.Length < 1)
return -1;
int highestValue = values[0];
foreach(int value in values)
if(value > highestValue)
highestValue = value;
return highestValue;
}
| 0 | [
2,
56,
16,
158,
81,
164,
17116,
15165,
272,
5910,
6123,
18,
25,
574,
15,
17,
483,
60,
800,
3726,
3726,
31,
22,
79,
452,
21,
14730,
29,
737,
84,
184,
246,
20,
8713,
21,
1935,
2109,
30,
1384,
40,
7718,
16,
13820,
18,
15,
17,
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... |
How do I turn a String into a Stream in java?
===
I need to transform a string into (finally) an InputStreamReader. Any ideas? | 0 | [
2,
184,
107,
31,
805,
21,
3724,
77,
21,
3766,
19,
8247,
60,
800,
3726,
3726,
31,
376,
20,
8007,
21,
3724,
77,
13,
5,
4932,
102,
6,
40,
6367,
11260,
10647,
106,
9,
186,
3478,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Exclusive Or in Regular Expression
===
Looking for a bit of regex help.
Id like to design an expression that matches a string with "foo" OR "bar" but not both "foo" AND "bar"
If I do something like...
/((foo)|(bar))/
Itll match "foobar". Not what Im looking for. So, how can I make regex match only when one term or the other is present?
Thanks! | 0 | [
2,
6753,
54,
19,
1290,
1803,
800,
3726,
3726,
699,
26,
21,
1142,
16,
7953,
1706,
448,
9,
4924,
101,
20,
704,
40,
1803,
30,
1717,
21,
3724,
29,
13,
7,
4120,
111,
7,
54,
13,
7,
1850,
7,
47,
52,
156,
13,
7,
4120,
111,
7,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.