unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Select exclusively a field from a table
===
I have to add a coupon table to my db. There are 3 types of coupons : percentage, amount or 2 for 1.
So far I've come up with a coupon table that contains these 3 fields. If there's a percentage value not set to null then it's this kind of coupon.
I feel it's not the proper way to do it. Should I create a CouponType table and how would you see it? Where would you store these values?
Any help or cue appreciated!
Thanks,
Teebot
| 0 | [
2,
5407,
7008,
21,
575,
37,
21,
859,
800,
3726,
3726,
31,
57,
20,
3547,
21,
7336,
218,
859,
20,
51,
13,
9007,
9,
80,
50,
203,
2551,
16,
7336,
4710,
13,
45,
5780,
15,
2006,
54,
172,
26,
137,
9,
86,
463,
31,
22,
195,
340,
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,
1... |
Protecting user passwords in desktop applications (Rev 2)
===
I'm making a twitter client, and I'm evaluating the various ways of protecting the user's login information.
IMPORTANT: I need to protect the user's data from other other applications. For example imagine what happens if a bot starts going around stealing Twhirl passwords or Hotmail/GMail/Yahoo/Paypal from applications that run on the user's desktop.
Clarification: I asked this before without the 'important' portion but stackoverflow's UI doesn't help with adding details later inside the Q/A conversation.
- Hashing apparently doesn't do it
- Obfuscating in a reversable way is like trying to hide behind my finger
- Plain text sounds and propably is promiscuous Requiring the user to type in his password every time would make the application tiresome
Any ideas ?
| 0 | [
2,
8718,
4155,
20884,
18,
19,
17404,
3767,
13,
5,
14587,
172,
6,
800,
3726,
3726,
31,
22,
79,
544,
21,
10623,
6819,
15,
17,
31,
22,
79,
26764,
14,
617,
2847,
16,
8718,
14,
4155,
22,
18,
6738,
108,
676,
9,
681,
45,
31,
376,
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 have a sliding menu div that doesn't move unless the page is scrolled down past a certain point.
===
I have a menu div that I want to slide down so it's always visible, but I want it to be positioned under my title div. I don't want it to move until the top of the menu hits the top of the screen and then stay in place. Basically I want a sliding menu with a maximum height it can slide to. | 0 | [
2,
184,
92,
31,
57,
21,
7609,
11379,
13,
12916,
30,
1437,
22,
38,
780,
4003,
14,
2478,
25,
12159,
69,
125,
640,
21,
1200,
454,
9,
800,
3726,
3726,
31,
57,
21,
11379,
13,
12916,
30,
31,
259,
20,
6464,
125,
86,
32,
22,
18,
550... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 configure modprobe to find my module?
===
I'm trying to get a kernel module to load at boot.
If I run `insmod /path/to/module.ko`, it works fine. But this has to be repeated every time I reboot.
If I run `modprobe /path/to/module.ko`, it can't find the module.
I know modprobe uses a configuration file, but I can't get it to load the module even after adding /path/to/module.ko to /etc/modules.
What is the proper configuration?
| 0 | [
2,
184,
107,
31,
1065,
15951,
7226,
2740,
863,
20,
477,
51,
12613,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
164,
21,
17007,
12613,
20,
6305,
35,
6801,
9,
100,
31,
485,
13,
1,
108,
18,
13670,
13,
118,
8353,
118,
262,
118,
1967... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 correctly inherit from a usercontrol defined in XAML
===
If I have a usercontrol that I've written, that uses XAML to define it's appearance, how can I make a customised version of it?
i.e. I have MyControl.xaml & MyControl.xaml.cs
What do I need to do if I want a "SpecialisedControl" child class? I assume I just make a new code file, then inherit from MyControl. But what if I want to change the appearance of the base class - then what do I do?
| 0 | [
2,
184,
20,
12044,
17569,
37,
21,
4155,
12898,
2811,
19,
13,
6791,
8184,
800,
3726,
3726,
100,
31,
57,
21,
4155,
12898,
30,
31,
22,
195,
642,
15,
30,
2027,
13,
6791,
8184,
20,
9267,
32,
22,
18,
1468,
15,
184,
92,
31,
233,
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 the Postgres foreign key 'on update' and 'on delete' options work?
===
Can anyone provide a clear explanation / example of what these functions do, and when it's appropriate to use them? | 0 | [
2,
184,
107,
14,
678,
6879,
18,
1228,
1246,
13,
22,
218,
11100,
22,
17,
13,
22,
218,
27448,
22,
6368,
170,
60,
800,
3726,
3726,
92,
1276,
1181,
21,
1207,
5764,
13,
118,
823,
16,
98,
158,
3719,
107,
15,
17,
76,
32,
22,
18,
45... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Visual Assist low performance
===
I am using Visual Assist X for C/C++ code in Visual Studio 2005 but I see that, sometime, when visual studio take focus, the processor is working too much and I cannot type code. If I am waiting somes seconds, it return the focus.
| 0 | [
2,
3458,
5404,
708,
956,
800,
3726,
3726,
31,
589,
568,
3458,
5404,
993,
26,
272,
118,
150,
20512,
1797,
19,
3458,
1120,
812,
47,
31,
196,
30,
15,
8530,
15,
76,
3458,
1120,
247,
1776,
15,
14,
14762,
25,
638,
266,
212,
17,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... |
FoxPro 9 compatibility with Windows Vista
===
What compatibility issues have you found when developing with Visual FoxPro 9 on Windows Vista? | 0 | [
2,
2385,
2740,
561,
13,
21618,
29,
1936,
13520,
800,
3726,
3726,
98,
13,
21618,
1549,
57,
42,
216,
76,
3561,
29,
3458,
2385,
2740,
561,
27,
1936,
13520,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Singleton in Java - I didn't do it
===
I'm trying to track down an issue in our system and the following code worries me. The following occurs in our doPost() method in the primary servlet (names have been changed to protect the guilty):
...
if(Single.getInstance().firstTime()){
doPreperations();
}
normalResponse();
...
The singleton 'Single' looks like this:
private static Single theInstance = new Single();
private Single() {
...load properties...
}
public static Single getInstance() {
return theInstance;
}
With the way this is set to use a static initializer instead of checking for a null theInstance in the getInstance() method, could this get rebuilt over and over again? | 0 | [
2,
345,
444,
19,
8247,
13,
8,
31,
223,
22,
38,
107,
32,
800,
3726,
3726,
31,
22,
79,
749,
20,
792,
125,
40,
1513,
19,
318,
329,
17,
14,
249,
1797,
17904,
55,
9,
14,
249,
3690,
19,
318,
107,
6962,
5,
6,
2109,
19,
14,
1256,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 exact problem with multiple inheritances?
===
I can see people asking all the time whether multiple inheritance should be included into the next version of C# or Java and C++ folks, who are fortunate enough to have this ability, say that this is like giving someone a rope to eventually hang themselves.
What’s the matter with the multiple inheritance? Are there any concrete samples?
| 0 | [
2,
98,
25,
14,
5340,
1448,
29,
1886,
13852,
18,
60,
800,
3726,
3726,
31,
92,
196,
148,
3379,
65,
14,
85,
1472,
1886,
13852,
378,
44,
506,
77,
14,
328,
615,
16,
272,
5910,
54,
8247,
17,
272,
20512,
14563,
15,
72,
50,
22446,
511... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
foreach vs someList.Foreach(){}
===
There are apparently many ways to iterate over a collection. Curious if there are any differences, or why you'd use one way over the other.
First type:
List<string> someList = <some way to init>
foreach(string s in someList) {
<process the string>
}
Other Way:
List<string> someList = <some way to init>
someList.ForEach(delegate(string s) {
<process the string>
}
I suppose off the top of my head, that instead of the anonymous delegate I use above, you'd have a reusable delegate you could specify... | 0 | [
2,
26,
14322,
4611,
109,
5739,
9,
1106,
14322,
5,
6,
1,
800,
3726,
3726,
80,
50,
3083,
151,
2847,
20,
32,
106,
1373,
84,
21,
1206,
9,
7686,
100,
80,
50,
186,
4921,
15,
54,
483,
42,
22,
43,
275,
53,
161,
84,
14,
89,
9,
64,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SQL 2005 data file inconsistency (maybe 8 data files, maybe 5, who knows)
===
I have a SQL 2005 sp2 box where tempdb has either 8 data files or 5 data files dependingo n where you look. DBCC showfilestates and sys.database_files (both queried in tempdb) show 8 data files (tempdev - tempdev8), however when I query sys.master_files (in master db, which is also what the GUI uses), I only see 5 (tempdev, tempdev5 - tempdev8). I cannot add a tempdev2 - tempdev4 as I get an error that it already exists and I can't restart the SQL Server anytime soon to recreate tempdb.
Anyone know:
1.) how this can happen?
2.) more importantly, how I can correct it?
Thanks, | 0 | [
2,
4444,
255,
812,
1054,
3893,
19,
12124,
702,
8883,
13,
5,
5138,
469,
1054,
6488,
15,
913,
331,
15,
72,
3620,
6,
800,
3726,
3726,
31,
57,
21,
4444,
255,
812,
3782,
135,
1649,
113,
13,
9577,
9007,
63,
694,
469,
1054,
6488,
54,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C# Color constant R,G,B values
===
Where can I find a list of all the C# Color constants and the associated R,G,B (Red, Green, Blue) values?
e.g.
Color.White == (255,255,255)
Color.Black == (0,0,0)
etc... | 0 | [
2,
272,
5910,
1665,
3587,
761,
15,
263,
15,
220,
4070,
800,
3726,
3726,
113,
92,
31,
477,
21,
968,
16,
65,
14,
272,
5910,
1665,
3587,
18,
17,
14,
1598,
761,
15,
263,
15,
220,
13,
5,
2095,
15,
647,
15,
705,
6,
4070,
60,
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... |
How do I align spans or divs horizontally?
===
My only problem is making them line up three-across and have equal spacing. Apparently, spans can not have width and divs (and spans with display:block) don't appear horizontally next to each other. Suggestions?
`<span style='width:30%; text-align:center; display:block'>` Is what I have now. | 0 | [
2,
184,
107,
31,
23389,
16967,
54,
13,
12916,
18,
25658,
60,
800,
3726,
3726,
51,
104,
1448,
25,
544,
105,
293,
71,
132,
8,
58,
7703,
17,
57,
2747,
29177,
9,
3083,
15,
16967,
92,
52,
57,
9456,
17,
13,
12916,
18,
13,
5,
290,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 host a control in a DataGridViewCell for displaying as well as editing?
===
I've seen <a href="http://msdn.microsoft.com/en-us/library/7tas5c80.aspx">How to: Host Controls in Windows Forms DataGridView Cells</a> which explains how to host a control for editing a cell in a DataGridView. But how can I host a control for displaying a cell?
I need to display a file name and a button in the same cell. Our UI designer is a graphic designer not a programmer, so I have to match the code to what he's drawn, whether it's possible - or wise - or not. We're using VS2008 and writing in C# for .NET 3.5, if that makes a difference. | 0 | [
2,
184,
107,
31,
2015,
21,
569,
19,
21,
1054,
16375,
4725,
9725,
26,
17418,
28,
134,
28,
9510,
60,
800,
3726,
3726,
31,
22,
195,
541,
13,
1,
58,
746,
14057,
3726,
7,
21127,
6903,
79,
18,
43,
103,
9,
22019,
12980,
9,
960,
118,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Reusing the partials multiple times on one page in Ruby on Rails
===
I have a partial that renders a select box using the following method:
<%= collection_select 'type', 'id', @types, "id", "name",
{:prompt => true},
{:onchange =>
remote_function(
:loading => "Form.Element.disable('go_button')",
:url => '/sfc/criteria/services',
:with => "'type_id=' + encodeURIComponent(value) + '&use_wizard=#{use_wizard}'"),
:class => "hosp_select_buttons"
} %>
This partial gets used 2 times on every page, but at one point I need to get the value of the first select box. Using:
$('type_id')
returns the second select box. Is there a way to find the first one easily? Should I fix this using javascript or by redoing my partial?
| 0 | [
2,
302,
12655,
14,
7284,
18,
1886,
436,
27,
53,
2478,
19,
10811,
27,
2240,
18,
800,
3726,
3726,
31,
57,
21,
7284,
30,
16535,
18,
21,
5407,
1649,
568,
14,
249,
2109,
45,
13,
1,
11881,
3726,
1206,
1,
18,
16964,
13,
22,
4474,
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... |
Should key values in a database table be hashed?
===
Suppose a database table has a column "Name" which is defined as key for the table.
Usual name values will be "Bill", "Elizabeth", "Bob", "Alice". Lookups on the table will be done by the name key as well.
Does hashing the values optimize the operations in any way? i.e. entering each name as some hashed value of the name (suppose MD5 - 32 bits).
If so - shouldn't this be a feature of the database and not something the client handles? | 0 | [
2,
378,
1246,
4070,
19,
21,
6018,
859,
44,
19170,
69,
60,
800,
3726,
3726,
5787,
21,
6018,
859,
63,
21,
4698,
13,
7,
7259,
7,
56,
25,
2811,
28,
1246,
26,
14,
859,
9,
3820,
204,
4070,
129,
44,
13,
7,
9580,
7,
15,
13,
7,
532... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Someone Explain MySQL's License and What it Means to Closed Source Development?
===
Is it necessary to have a commercial license for MySQL in order to use it legally in a project which is not open source? Does it matter if the application is hosted and the binaries are never distributed? The more I learn about open source licenses the more confused I become.
| 0 | [
2,
92,
737,
3271,
51,
18,
22402,
22,
18,
3962,
17,
98,
32,
1108,
20,
827,
1267,
522,
60,
800,
3726,
3726,
25,
32,
2378,
20,
57,
21,
1439,
3962,
26,
51,
18,
22402,
19,
389,
20,
275,
32,
10524,
19,
21,
669,
56,
25,
52,
368,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Importing new database table
===
Where I'm at there is a main system that runs on a big AIX mainframe. To facility reporting and operations there is nightly dump from the mainframe into SQL Server, such that each of our 50-ish clients is in their own database with identical schemas. This dump takes about 7 hours to finish each night, and there's not really anything we can do about it: we're stuck with what the application vendor has provided.
After the dump into sql server we use that to run a number of other daily procedures. One of those procedures is to import data into a kind of management reporting sandbox table, which combines records from a particularly important table from across the different databases into one table that managers who don't know sql so can use to run ad-hoc reports without hosing up the rest of the system. This, again, is a business thing: the managers want it, and they have the power to see that we implement it.
The import process for this table takes a couple hours on it's own. It filters down about 40 million records spread across 50 databases into about 4 million records, and then indexes them on certain columns for searching. Even at a coupld hours it's still less than a third as long as the initial load, but we're running out of time for overnight processing, we don't control the mainframe dump, and we do control this. So I've been tasked with looking for ways to improve one the existing procedure.
Currently, the philosophy is that it's faster to load all the data from each client database and then index it afterwards in one step. Also, in the interest of avoiding bogging down other important systems in case it runs long, a couple of the larger clients are set to always run first (the main index on the table is by a clientid field).
So my question is, what would be the most efficient way to load this table? Are we right in thinking that indexing later is better? Or should we create the indexes before importing data? Should we be loading the table in index order, to avoid massive re-ordering of pages, rather than the big clients first? Any other ideas? | 0 | [
2,
9010,
68,
78,
6018,
859,
800,
3726,
3726,
113,
31,
22,
79,
35,
80,
25,
21,
407,
329,
30,
1461,
27,
21,
580,
21,
4028,
407,
8361,
9,
20,
2646,
6670,
17,
1311,
80,
25,
343,
102,
11424,
37,
14,
407,
8361,
77,
4444,
255,
8128... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
X = X++; vs X++;
===
Have you ever tried this befor
static void Main(string[] args)
{
int x = 10;
x = x++;
Console.WriteLine(x);
}
Output: 10.
and for
static void Main(string[] args)
{
int x = 10;
x++;
Console.WriteLine(x);
}
Output: 11.
Could anyone explain why this? | 0 | [
2,
993,
800,
993,
20512,
73,
4611,
993,
20512,
73,
800,
3726,
3726,
57,
42,
462,
794,
48,
44,
1106,
12038,
11364,
407,
5,
11130,
2558,
500,
13,
10663,
18,
6,
13,
1,
19,
38,
993,
800,
332,
73,
993,
800,
993,
20512,
73,
8650,
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... |
Why use labview?
===
I am learning to use lab view as part of my honours project, and was wondering what benefits the graphical programming language has over a textual one? | 0 | [
2,
483,
275,
4343,
4725,
60,
800,
3726,
3726,
31,
589,
2477,
20,
275,
4343,
1418,
28,
141,
16,
51,
8967,
669,
15,
17,
23,
5712,
98,
5800,
14,
21755,
3143,
816,
63,
84,
21,
1854,
6948,
53,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do I query if a database schema exists
===
As part of our build process we run a database update script as we deploy code to 4 different environments (due to crazy business rules, but that's another post). Further, since the same query will get added to until we drop a release into production (yet a few more domains to add to... frustrating); it HAS to be able to run multiple times on a given database. Like this:<br>
IF NOT EXISTS (SELECT * FROM sys.tables WHERE object_id = OBJECT_ID(N'table'))<br>
BEGIN<br>
CREATE TABLE [table](<br>
...)<br>
END
Currently, I have a create schema statement in the deployment/build script. Where do I query for the existence of a schema?
| 0 | [
2,
184,
107,
31,
25597,
100,
21,
6018,
23874,
5636,
800,
3726,
3726,
28,
141,
16,
318,
1895,
953,
95,
485,
21,
6018,
11100,
3884,
28,
95,
17617,
1797,
20,
268,
421,
11246,
13,
5,
12633,
20,
3328,
508,
1761,
15,
47,
30,
22,
18,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I specify values in a properties file so they can be retrieved using ResourceBundle#getStringArray?
===
I am trying to use `ResourceBundle#getStringArray` to retrieve a `String[]` from a properties file. The description of this method in the documentation reads:
>Gets a string array for the given key from this resource bundle or one of its parents.
However, I have attempted to store the values in the properties file as multiple individual key/value pairs:
key=value1
key=value2
key=value3
and as a comma-delimited list:
key=value1,value2,value3
but neither of these is retrievable using `ResourceBundle#getStringArray`.
How do you represent a set of key/value pairs in a properties file such that they can be retrieved using `ResourceBundle#getStringArray`? | 0 | [
2,
184,
107,
31,
19077,
4070,
19,
21,
3704,
3893,
86,
59,
92,
44,
3685,
568,
6577,
9930,
413,
5910,
3060,
11130,
8576,
93,
60,
800,
3726,
3726,
31,
589,
749,
20,
275,
13,
1,
99,
12097,
9930,
413,
5910,
3060,
11130,
8576,
93,
1,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can I reliably create Excel documents from a PHP application on a Linux server?
===
What is the state generating Excel documents from a PHP application on a Linux server?
I am interesting in creating Office 97 (xls) Excel files. My limited research on the subject has turned up this [Pear package][1]. It appears to be in beta status since 2006.
Can you share your success or failures in generating Excel files from PHP? Is there a reliable and mature tool available?
Update: For this application I do need to generate an Excel file, not just a CSV file.
[1]: http://pear.php.net/package/Spreadsheet_Excel_Writer | 0 | [
2,
92,
31,
13,
19003,
4801,
1600,
20700,
4374,
37,
21,
13,
26120,
3010,
27,
21,
13024,
8128,
60,
800,
3726,
3726,
98,
25,
14,
146,
13500,
20700,
4374,
37,
21,
13,
26120,
3010,
27,
21,
13024,
8128,
60,
31,
589,
4883,
19,
2936,
48... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
True color CImageList
===
How do I load a true color image into a CImageList?
Right now I have
mImageList.Create(IDB_IMGLIST_BGTASK, 16, 1, RGB(255,0,255));
Where `IDB_IMGLIST_BGTASK` is a 64x16 True color image. The ClistCtrl I am using it in shows 16 bpp color. I don't see a Create overload that allows me to specify both the bpp and the resource to load from. | 0 | [
2,
1151,
1665,
272,
22039,
5739,
800,
3726,
3726,
184,
107,
31,
6305,
21,
1151,
1665,
1961,
77,
21,
272,
22039,
5739,
60,
193,
130,
31,
57,
307,
22039,
5739,
9,
6037,
1373,
5,
1340,
220,
1,
1660,
263,
5739,
1,
19924,
38,
20310,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to create And / Or relations in a database?
===
I have a Coupon table. A Coupon can be applicable to certain items only or to a whole category of items.
For example: a 5$ coupon for a Pizza 12" **AND** (1L Pepsi **OR** French fries)
The best I could come up with is to make a CouponMenuItems table containing a coupon_id and bit fields such as IsOr and IsAnd. It doesn't work because I have 2 groups of items in this example. The second one being a OR relation between 2 items.
Any idea of how I could do it so the logic to implement is as simple as possible?
Any help or cue appreciated!
Thanks,
Teebot | 0 | [
2,
184,
20,
1600,
17,
13,
118,
54,
2649,
19,
21,
6018,
60,
800,
3726,
3726,
31,
57,
21,
7336,
218,
859,
9,
21,
7336,
218,
92,
44,
14535,
20,
1200,
3755,
104,
54,
20,
21,
979,
3230,
16,
3755,
9,
26,
823,
45,
21,
331,
4403,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Replace SRC attribute with TITLE in LI Tag
===
I have a html given below:
<ul id="thumbsPhotos">
<li src="/images/1alvaston-hall-relaxing-lg.jpg" onclick="updatePhoto(this.title)"><img src="/images/1alvaston-hall-relaxing-sl.jpg" width="56" height="56"></li>
<li onclick="updatePhoto(this.title)" src=""><img src="" width="56" height="56"></li>
<li onclick="updatePhoto(this.title)" src=""><img src="" width="56" height="56"></li>
</ul>
Now, I want to replace all the "src" in <li> tags not in <img> tags using InnerHTML. I mean my output will be
<ul id="thumbsPhotos">
<li **title**="/images/1alvaston-hall-relaxing-lg.jpg" onclick="updatePhoto(this.title)"><img src="/images/1alvaston-hall-relaxing-sl.jpg" width="56" height="56"></li>
<li onclick="updatePhoto(this.title)" **title**=""><img src="" width="56" height="56"></li>
<li onclick="updatePhoto(this.title)" **title**=""><img src="" width="56" height="56"></li>
</ul> | 0 | [
2,
3934,
13,
18,
5453,
35,
14755,
29,
581,
19,
2093,
3383,
800,
3726,
3726,
31,
57,
21,
13,
15895,
504,
1021,
45,
13,
1,
1287,
4924,
3726,
7,
96,
723,
4562,
25445,
18,
7,
1,
13,
1,
1210,
13,
18,
5453,
3726,
7,
118,
22039,
18... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
online book library for embedded
===
Does a good library for embedded programming/design/testing and so exist? Something like Safari from O'Reilly? | 0 | [
2,
2087,
360,
1248,
26,
12138,
800,
3726,
3726,
630,
21,
254,
1248,
26,
12138,
3143,
118,
19862,
118,
10543,
68,
17,
86,
3182,
60,
301,
101,
25055,
37,
635,
22,
15382,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Javascript function to 'get element by parent class' and assign
===
Greetings Gentleman. All your base are belong to us.
My predicament is fairly simple: this function gets the id of 'this' < li > element based on parent id of < ul >. It used to work fine but not anymore, I will either need to have < ul > use classes instead of id while still being able to assign id of 'current' to the current element, or change my css
function myFunction(element){
liArray=document.getElementById("leftlist").childNodes;
i=0;
while(liArray[i]){
liArray[i].id="";
i++;
}
element.id="current"; // or element.className ?
}
/**** csss *********/
ul#leftlist {background-color: rgb(205,205,205);}
ul#leftlist li#current a{color: rgb(96,176,255); background-color:218,218,218);}
ul#leftlist li a{ color: rgb(86,86,86);}
#leftlist a:link{color: rgb(86,86,86);background-color: #ddd;}
#leftlist a:active{color: rgb(96,176,255); background-color: rgb(218,218,218); }
/****** html *********/
<ul id="leftlist">
<li onClick='myFunction(this);'><a href="123" bla bla </a></li>
<li onClick='myFunction(this);'> .... etc.
Perhaps i need to change my css, this worked before but now the current id is not being effective as ul#leftlist li a takes priority even when i assign id="current" via javascript. | 0 | [
2,
8247,
8741,
1990,
20,
13,
22,
3060,
4520,
34,
4766,
718,
22,
17,
13952,
800,
3726,
3726,
13769,
18,
10240,
9,
65,
154,
1000,
50,
6219,
20,
182,
9,
51,
28204,
25,
6647,
1935,
45,
48,
1990,
3049,
14,
4924,
16,
13,
22,
1565,
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... |
"Stack Overflow in Line 0" on Internet Explorer
===
I realise this is not the ideal place to ask about this in terms of searchability, but I've got a page whose JavaScript throws "Stack overflow in line 0" errors when I look at it in Internet Explorer.
The problem is quite clearly not in Line 0, but somewhere in the list of stuff that I'm writing to the document, but I cannot work out for the life of me where the problem is. Everything works fine in Firefox, so I don't have the delights of Firebug and friends to assist in troubleshooting.
Are there any standard causes for this? I'm guessing this is probably an IE7 bug or something quite obscure, and my google-fu is bringing me little joy currently. I can find lots of people who have run into this before but I can't seem to find how they solved it. | 0 | [
2,
13,
7,
25325,
20285,
19,
293,
713,
7,
27,
2620,
8520,
800,
3726,
3726,
31,
16794,
48,
25,
52,
14,
5628,
209,
20,
1349,
88,
48,
19,
1663,
16,
2122,
4091,
15,
47,
31,
22,
195,
330,
21,
2478,
1196,
8247,
8741,
13566,
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... |
Reading a single XML document from a stream using dom4j
===
I'm trying to read a single XML document from stream at a time using dom4j, process it, then proceed to the next document on the stream. Unfortunately, dom4j's SAXReader (using JAXP under the covers) keeps reading and chokes on the following document element.
Is there a way to get the SAXReader to stop reading the stream once it finds the end of the document element? Is there a better way to accomplish this? | 0 | [
2,
1876,
21,
345,
23504,
4492,
37,
21,
3766,
568,
11859,
300,
728,
800,
3726,
3726,
31,
22,
79,
749,
20,
1302,
21,
345,
23504,
4492,
37,
3766,
35,
21,
85,
568,
11859,
300,
728,
15,
953,
32,
15,
94,
11158,
20,
14,
328,
4492,
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... |
What is a "web service" in plain english?
===
I've been reading about "web services" here on SO, on Wikipedia, Google, etc and I don't quite understand what they are. What is the plain english definition/description?
If I make a simple website using PHP that just, say, prints a random integer to the page... is this a "web service"? If not, why not?
Cheers! | 0 | [
2,
98,
25,
21,
13,
7,
14113,
365,
7,
19,
3748,
486,
60,
800,
3726,
3726,
31,
22,
195,
74,
1876,
88,
13,
7,
14113,
687,
7,
235,
27,
86,
15,
27,
20169,
15,
8144,
15,
2722,
17,
31,
221,
22,
38,
1450,
1369,
98,
59,
50,
9,
98... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Multiple/single instance of Linq to SQL DataContext
===
I have a project with a number of different classes querying and modifying data in a common set of tables. I've set up a .dbml file which provides us with a DataContext class. My question is whether a single instance of the DataContext should be used by all objects, or whether multiple instances are safe to use. I'm also wondering about thread safety in the case of a single DataContext, and whether access to it's methods should be synchronized. | 0 | [
2,
1886,
118,
14031,
4851,
16,
6294,
1251,
20,
4444,
255,
1054,
1126,
11969,
800,
3726,
3726,
31,
57,
21,
669,
29,
21,
234,
16,
421,
2684,
25597,
68,
17,
17579,
68,
1054,
19,
21,
757,
309,
16,
7484,
9,
31,
22,
195,
309,
71,
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 to disable phone number linking in Mobile Safari?
===
Safari on iPhone automatically creates links for strings of digits that appear to the telephone numbers. I am writing a web page containing an IP address, and Safari is turning that into a phone number link. Is it possible to disable this behavior for a whole page or an element on a page? | 0 | [
2,
184,
20,
1460,
579,
1132,
234,
12585,
19,
3241,
25055,
60,
800,
3726,
3726,
25055,
27,
21024,
7499,
9695,
6271,
26,
7887,
16,
19076,
30,
1893,
20,
14,
5600,
2116,
9,
31,
589,
1174,
21,
2741,
2478,
3503,
40,
15735,
3218,
15,
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... |
Wiki or CMS
===
What are the differences between a wiki and a CMS? Is there any? | 0 | [
2,
13,
17375,
54,
2390,
18,
800,
3726,
3726,
98,
50,
14,
4921,
128,
21,
13,
17375,
17,
21,
2390,
18,
60,
25,
80,
186,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Scripting library for Delphi
===
I'm looking to add scripting capabilities to one of my program.
Do you know a good scripting library for Delphi? | 0 | [
2,
3884,
68,
1248,
26,
23030,
800,
3726,
3726,
31,
22,
79,
699,
20,
3547,
3884,
68,
10209,
20,
53,
16,
51,
625,
9,
107,
42,
143,
21,
254,
3884,
68,
1248,
26,
23030,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Puzzle: Overload a C++ function according to the return value
===
We all know that you can overload a function according to the parameters:
int mul(int i, int j) { return i*j; }
std::string mul(char c, int n) { return std::string(n, c); }
Can you overload a function according to the return value? Define a function that returns different things according to how the return value is used:
int n = mul(6, 3); // n = 18
std::string s = mul(6, 3); // s = "666"
You can assume the first parameter is between 0-9, no need to verify the input or have any error handling.
----------
Take
a
few
minutes
to
think
about
it
before
looking
at
other
people's
answers
| 0 | [
2,
9164,
45,
84,
8294,
21,
272,
20512,
1990,
496,
20,
14,
788,
1923,
800,
3726,
3726,
95,
65,
143,
30,
42,
92,
84,
8294,
21,
1990,
496,
20,
14,
12905,
45,
19,
38,
6633,
5,
6391,
31,
15,
19,
38,
487,
6,
13,
1,
788,
31,
2483... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Parsing a Certificate Signing Request with Perl
===
I want to use perl to extract information from a [Certificate Signing Request][1], preferably without launching an external openssl process. Since a CSR is stored in a base64-encoded ASN.1 format, I tried the [Convert::PEM][2] module. But it requires an ASN.1 description of the content, which I haven't been able to put together, ASN.1 being the beast it is.
Does anybody have the right ASN.1 description for a CSR or a module that parses such a request ?
[1]: http://en.wikipedia.org/wiki/Certificate_signing_request
[2]: http://search.cpan.org/~btrott/Convert-PEM-0.07/lib/Convert/PEM.pm | 0 | [
2,
2017,
18,
68,
21,
6259,
5479,
3772,
29,
416,
255,
800,
3726,
3726,
31,
259,
20,
275,
416,
255,
20,
10962,
676,
37,
21,
636,
17580,
24831,
591,
5479,
3772,
500,
2558,
165,
500,
15,
6369,
4801,
366,
13762,
40,
4886,
8965,
18,
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... |
Best Practices: Persisting data throughout multiple web method calls.
===
I have a web service that has 8 web methods. These methods are called synchronously, the first call authenticates the user, and the rest of the methods perform a unit of work, these methods are called upon until the work is done.
I need to store the state of the work (e.g. what actions to perform next, and what work has been done and is currently being performed.) I currently have a state object that contains this information.
My question is what is the best way to persist this object between each web service call? Note that there may be multiple users calling this web service, each with it's own unique state.
Here are some scenarios that I am thinking:
**Idea #1**
Store the object in a session.
**Idea #2**
Create an instance variable that is a HashMap of a userId and their respective data. something like:
<pre>
<code>
[WebService(Namespace = "http://developer.intuit.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class QBWCService : QBWebConnectorSvc {
// instance variable to hold current session data...
private Dictionary<Guid,Session> Sessions;
public QBWCService () {
Sessions = new Dictionary<Guid,Session>();
}
[WebMethod]
public override string[] authenticate(string strUserName, string strPassword)
{
...
Sessions.Add(UserId, new SessoionObject());
}
[WebMethod]
public override string[] authenticate(Guid UserId)
{
SessionObject o = Sessions[UserId];
}
}
</code>
</pre>
I am thinking that Idea 2 is going to be the cleanest "natural way", however I do not know any of the implication of implementing this sort of scheme...which way or what else would you recommend?
| 0 | [
2,
246,
5242,
45,
22084,
68,
1054,
892,
1886,
2741,
2109,
3029,
9,
800,
3726,
3726,
31,
57,
21,
2741,
365,
30,
63,
469,
2741,
3195,
9,
158,
3195,
50,
227,
13,
16023,
13985,
15,
14,
64,
645,
14351,
7759,
14,
4155,
15,
17,
14,
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... |
How do I repair an InnoDB table?
===
We (apparently) had poorly executed of our Solaris MySQL database engine last night. At least some of the InnoDB tables are corrupted, with timestamp out of order errors in the transaction log, and a specific error about the index being corrupted.
We know about the tools available for MyISAM table repairs, but cannot find anything for InnoDB.
Side note: attempting a table optimize (in my attempt to rebuild the corrupted index) causes the database server to crash. | 0 | [
2,
184,
107,
31,
5612,
40,
19,
251,
9007,
859,
60,
800,
3726,
3726,
95,
13,
5,
27844,
6,
41,
10614,
5557,
16,
318,
4535,
403,
51,
18,
22402,
6018,
1406,
236,
343,
9,
35,
639,
109,
16,
14,
19,
251,
9007,
7484,
50,
11305,
69,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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: Wrong Code Displayed in Crash Dump
===
So a webapp I've been working on broke, and I made some fixes... it still crashes, but in the YSOD it shows me the old code. I'm running this from the VS 2005 IDE. It won't hit any breakpoints, and it crashes on line 249, which is clearly commented out. I've cleared out my debug/release folders and rebuilt it; restarted IIS (just in case); what would cause this?
Could not find file 'c:\Program Files\Microsoft Visual Studio 8\Common7\IDE\map.xml'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not find file 'c:\Program Files\Microsoft Visual Studio 8\Common7\IDE\map.xml'.
Source Error:
Line 248: //XmlDocument xMap = new XmlDocument();
Line 249: //xMap.Load(MapPath("map.xml"));
| 0 | [
2,
28,
306,
9,
2328,
45,
1389,
1797,
6115,
19,
4597,
11424,
800,
3726,
3726,
86,
21,
2741,
7753,
31,
22,
195,
74,
638,
27,
1842,
15,
17,
31,
117,
109,
6098,
160,
9,
9,
9,
32,
174,
21563,
15,
47,
19,
14,
13,
93,
656,
43,
32... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Alternating Item Style
===
I would actually love to have an AlternatingItemTemplate on a GridView, but all it offers is an AlternatingItemStyle. In my grid, each two column row (in a table layout), has an image in the first column, and a description in the second column. I would like to have the positioning of the image and description alternate on alternate rows.
How can I do this? | 0 | [
2,
17572,
9101,
1034,
800,
3726,
3726,
31,
83,
1121,
339,
20,
57,
40,
17572,
2119,
79,
9577,
6554,
27,
21,
7354,
4725,
15,
47,
65,
32,
2486,
25,
40,
17572,
2119,
79,
4381,
9,
19,
51,
7354,
15,
206,
81,
4698,
3131,
13,
5,
108,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Oracle database manager/editor?
===
We have an Oracle 8i database that our developers run against and we currently use the 9i enterprise manager to view tables/values and do some minor manual data editing.
I was wondering if there is a more modern tool to use than OEM 9. One major annoyance with OEM is the lack of mousewheel support.
To keep this question objective, I basically need an Oracle Database editor that
1) has mousewheel support
2) can let a developer easily view tables and edit data
I looked at the latest Oracle 11 client but there doesn't seem to be a database manager in it! | 4 | [
2,
246,
15759,
6018,
1382,
118,
13401,
60,
800,
3726,
3726,
95,
57,
40,
15759,
469,
49,
6018,
30,
318,
10168,
485,
149,
17,
95,
871,
275,
14,
561,
49,
6002,
1382,
20,
1418,
7484,
118,
15165,
18,
17,
107,
109,
1689,
5132,
1054,
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... |
Raiseerror and Concat for the Message
===
I'd like to do something like this
> raiserror(concat('Error in case @isFishy =', @isFishy, ' @isSmarmy=', @isSmarmy, ' @isTasty = ', @isTasty), 10, 1)
> --or
> raiserror('Error in case @isFishy =' + @isFishy + ' @isSmarmy=' + @isSmarmy + ' @isTasty = ' + @isTasty, 10, 1)
But it just isn't working. How do I accomplish this? I'm in SQL Server 2005. | 0 | [
2,
3972,
29992,
17,
1065,
5782,
26,
14,
2802,
800,
3726,
3726,
31,
22,
43,
101,
20,
107,
301,
101,
48,
13,
1,
6623,
18,
29992,
5,
1126,
5782,
5,
22,
29992,
19,
610,
13,
1,
403,
4934,
93,
800,
22,
15,
13,
1,
403,
4934,
93,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Whats the best way to profile a sqlserver database for performance?
===
What techinques do you use? How do you find out which jobs take the longest to run? Is there a way to find out the offending applications? | 0 | [
2,
98,
18,
14,
246,
161,
20,
5296,
21,
4444,
255,
10321,
106,
6018,
26,
956,
60,
800,
3726,
3726,
98,
6145,
108,
13655,
107,
42,
275,
60,
184,
107,
42,
477,
70,
56,
4844,
247,
14,
5646,
20,
485,
60,
25,
80,
21,
161,
20,
477,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Developing a distributed system as a grid
===
Has anyone had experience with developing a distributed system as a grid?
By grid, I mean, a distributed system where all nodes are identical and there is no central management, database etc.
How can the grid achieve even distribution of: CPU, Memory, Disk, Bandwidth etc.?
| 0 | [
2,
3561,
21,
4387,
329,
28,
21,
7354,
800,
3726,
3726,
63,
1276,
41,
1496,
29,
3561,
21,
4387,
329,
28,
21,
7354,
60,
34,
7354,
15,
31,
884,
15,
21,
4387,
329,
113,
65,
16272,
50,
6323,
17,
80,
25,
90,
521,
1097,
15,
6018,
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... |
Remove folder from tab label in visual studio?
===
Inside a visual studio project I have the following folders (for example)
- foo/
- bar/
- LongFolderName/
When I open up a file in LongFolderName/ the tab gets labeled with `LongFolderName/L...me.ascx` when I'd prefer `LongFileName.ascx` (omitting the name of the folder). Any way to set Visual Studio to ignore the folder name when labeling the tab? | 0 | [
2,
4681,
19294,
37,
6523,
1899,
19,
3458,
1120,
60,
800,
3726,
3726,
572,
21,
3458,
1120,
669,
31,
57,
14,
249,
19294,
18,
13,
5,
1106,
823,
6,
13,
8,
4310,
111,
118,
13,
8,
748,
118,
13,
8,
175,
8814,
106,
7259,
118,
76,
31... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What are good references for .Net development with Office Communications Server?
===
Is is possible to intergrate VOIP capabilities, particularly phone dialing, with Office Communications Server 2007 and .Net? If so, are there any good references for this? I would be especially interested if this could be hosted within an ASP.Net or Silverlight application. | 0 | [
2,
98,
50,
254,
7231,
26,
13,
9,
2328,
522,
29,
488,
3380,
8128,
60,
800,
3726,
3726,
25,
25,
938,
20,
1480,
15125,
62,
18742,
306,
10209,
15,
1653,
1132,
11601,
68,
15,
29,
488,
3380,
8128,
624,
17,
13,
9,
2328,
60,
100,
86,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Grabbing Domain Name With Include In PHP
===
I know how to find out the current domain name in PHP already, the problem is when I put this code into a file and then include it from another server it shows the domain name of where the file is located. Is there any way for it to find out the domain or the site containing the include() code? | 0 | [
2,
9910,
4603,
204,
29,
468,
19,
13,
26120,
800,
3726,
3726,
31,
143,
184,
20,
477,
70,
14,
866,
4603,
204,
19,
13,
26120,
614,
15,
14,
1448,
25,
76,
31,
442,
48,
1797,
77,
21,
3893,
17,
94,
468,
32,
37,
226,
8128,
32,
1285,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Applet - 'java.lang.NullPointerException: null pData' when browser closed
===
I have one user who gets an error message when he closes his browser. This only happens when he has visited a page which contains my applet. It seems to have been registered as a bug at Sun but that was many years ago. He is using Java 1.6 and IE7.
Has anyone seen this before and know a solution or work-around?
java.lang.NullPointerException: null pData
at sun.awt.windows.WComponentPeer.hide(Native Method)
at java.awt.Component.removeNotify(Unknown Source)
at java.awt.Container.removeNotify(Unknown Source)
at java.awt.Container.removeNotify(Unknown Source)
at java.awt.Container.removeAll(Unknown Source)
at sun.plugin.viewer.frame.IExplorerEmbeddedFrame.windowClosed(Unknown Source)
at java.awt.Window.processWindowEvent(Unknown Source)
at java.awt.Window.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
| 0 | [
2,
4037,
38,
13,
8,
13,
22,
1004,
1385,
9,
9949,
9,
4215,
211,
3132,
106,
10066,
872,
45,
16203,
351,
18768,
22,
76,
16495,
827,
800,
3726,
3726,
31,
57,
53,
4155,
72,
3049,
40,
7019,
2802,
76,
24,
543,
18,
33,
16495,
9,
48,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Decoding a WBXML SyncML message from an S60 device
===
I'm trying to decode a WBXML encoded SyncML message from a Nokia N95.
My first attempt was to use the python pywbxml module which wraps calls to libwbxml. Decoding the message with this gave a lot of <unknown> tags and a big chunk of binary within a <Collection> tag. I tried running the contents of the <Collection> through by itself but it failed. Is there something I'm missing?
Also, does anyone know of a pure python implementation of a wbxml parser? Failing that a command line or online tool to decode these messages would be useful -- it would make it a lot easier for me to write my own... | 0 | [
2,
121,
15458,
21,
12285,
396,
8184,
6063,
150,
8184,
2802,
37,
40,
13,
18,
3374,
3646,
800,
3726,
3726,
31,
22,
79,
749,
20,
121,
9375,
21,
12285,
396,
8184,
13665,
6063,
150,
8184,
2802,
37,
21,
24294,
13,
103,
3836,
9,
51,
64... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Eclipse class version bug
===
In eclipse 3.4 I'm trying to do some performance tests on a large product, one of the included libraries is the vecmath.jar (javax.vecmath package) from the Java3D project. Everything was working fine and then when trying to run it yesterday I get this exception/error not long after starting it up:
java.lang.UnsupportedClassVersionError: javax/vecmath/Point2f (Unsupported major.minor version 49.0)
Which I believe means that I'm trying to load a java 1.5 class file into a 1.4 jvm which is unsupported. However when I went to the class file to check this I saw this in the eclipse class file viewer:
Compiled from Point2f.java (version 1.2 : 46.0, super bit)
So the class loader says it is version 49.0 but the class file says its 46.0. I've tried cleaning and fully rebuilding the project, I've confirmed that the compiler version for the project is 1.4, the JRE is 1.4 and for the run configuration the 1.4 jvm is selected. I'm totally stuck on this, does anyone have any idea what might be causing this?
Thanks | 0 | [
2,
11652,
718,
615,
6256,
800,
3726,
3726,
19,
11652,
203,
9,
300,
31,
22,
79,
749,
20,
107,
109,
956,
4894,
27,
21,
370,
2374,
15,
53,
16,
14,
506,
8649,
25,
14,
13,
195,
150,
14825,
9,
6300,
13,
5,
1004,
1385,
396,
9,
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 are the most hardcore optimisations you've seen?
===
I'm not talking about algorithmic stuff (eg use quicksort instead of bubblesort), and I'm not talking about simple things like loop unrolling.
I'm talking about the _hardcore_ stuff. Like [Tiny Teensy ELF][1], [The Story of Mel][2]; practically everything in the demoscene, and so on.
[1]: http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html
[2]: http://catb.org/jargon/html/story-of-mel.html | 0 | [
2,
98,
50,
14,
127,
16626,
19259,
4330,
18,
42,
22,
195,
541,
60,
800,
3726,
3726,
31,
22,
79,
52,
1582,
88,
9083,
596,
3217,
13,
5,
5431,
275,
2231,
22843,
700,
16,
10937,
22843,
6,
15,
17,
31,
22,
79,
52,
1582,
88,
1935,
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... |
Team Build Error: The Path ... is already mapped to workspace ...
===
When creating a new build in Team Foundation Server, I get the following error when attempting to run the new build:
> The path
> C:\Build\ProductReleases\FullBuildv5.4.2x\Sources
> is already mapped to workspace
> BuildServer_23.
I am unable to see a workspace by that name in the workspaces dialog. | 0 | [
2,
173,
1895,
7019,
45,
14,
2013,
13,
9,
9,
9,
25,
614,
20877,
20,
170,
5582,
13,
9,
9,
9,
800,
3726,
3726,
76,
2936,
21,
78,
1895,
19,
173,
1304,
8128,
15,
31,
164,
14,
249,
7019,
76,
6314,
20,
485,
14,
78,
1895,
45,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to eliminate the security warning at the startup of a ms-access project
===
While opening any MS Access database, a security warning appears saying that the file can be harmful to the computer. However, is there a way to remove this message. Or should it remain a necessary evil | 0 | [
2,
184,
20,
10628,
14,
1221,
3590,
35,
14,
20205,
16,
21,
4235,
8,
20604,
669,
800,
3726,
3726,
133,
1214,
186,
4235,
1381,
6018,
15,
21,
1221,
3590,
1780,
1148,
30,
14,
3893,
92,
44,
20297,
20,
14,
1428,
9,
207,
15,
25,
80,
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,
0,
0,
0,
0... |
Cleanest way to find an objects matching certain criteria in a java.util.List?
===
I could write myself a helper class that does this when given a functor, but I was wondering if there's a better approach, or if there's something already in the standard library (seems like there should be).
Answers I've found on StackOverflow are all for C# which doesn't help me.
Thanks | 0 | [
2,
2745,
1430,
161,
20,
477,
40,
3916,
10120,
1200,
9157,
19,
21,
8247,
9,
14255,
9,
5739,
60,
800,
3726,
3726,
31,
110,
2757,
992,
21,
448,
106,
718,
30,
630,
48,
76,
504,
21,
2414,
150,
2153,
15,
47,
31,
23,
5712,
100,
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... |
Printing in VB.Net/C# Forms Application -- Layout Designer?
===
I maintain a vb.net forms application that prints various labels to label printers. (Label printers are just like any printer, just smaller print area/lower resolution)
The system uses a legacy printing method that's supported in the printer hardware, but has been out of general use for over a decade. I'm adding logic to print from the PrintDocument class. I like the flexibility of the class, but layout is a bit tedious. (Defining the sizes/locations of each DrawString command, etc.)
Are there any software products or open source UI designers for generating print document layout? The designer output must be something I can integrate into my code (dll is OK, just not a separate executable) and can not have a per user license. (Lots of users on my system) | 0 | [
2,
7312,
19,
13,
20468,
9,
2328,
118,
150,
5910,
1997,
3010,
13,
8,
8,
9106,
4742,
60,
800,
3726,
3726,
31,
4027,
21,
13,
20468,
9,
2328,
1997,
3010,
30,
12202,
617,
13173,
20,
1899,
12925,
18,
9,
13,
5,
21018,
12925,
18,
50,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a way to make Crystal Reports include a constant in a join condition, without using a SQL command object?
===
What I want to do is an outer join to a table, where I exclude records from the joined table based on matching a constant, however keep records from the main table. For example:
SELECT a.id, b.baz
FROM a
LEFT OUTER JOIN b
ON a.id = b.id
AND b.bar = 'foo'
I can't get the same results by putting it in the filter condition. If I use the following:
SELECT a.id, a.baz
FROM a
LEFT OUTER JOIN b
ON a.id = b.id
WHERE (b.bar IS NULL OR b.bar = 'foo')
then it will exclude records of A that happen to match a record of B where bar = 'foobar'. I don't want that, I want A to be present, but B to be nulls in that case.
Table B will have multiple records that need excluding, so I don't think I can filter this on the Crystal side without doing a lot of messing around to avoid problems from duplicate records from table A.
I cannot use a SQL command object, as the third party application that we are running the reports from seems to choke on SQL command objects.
I am working with Crystal Reports XI, specifically version 11.0.0.895. In case it makes a difference, I am running against a Progress 9.1E04 database using the SQL-92 ODBC driver. | 0 | [
2,
25,
80,
21,
161,
20,
233,
4282,
2813,
468,
21,
3587,
19,
21,
1865,
2874,
15,
366,
568,
21,
4444,
255,
1202,
3095,
60,
800,
3726,
3726,
98,
31,
259,
20,
107,
25,
40,
4896,
1865,
20,
21,
859,
15,
113,
31,
21077,
742,
37,
14... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Where can I look up the definition of size_type for vectors in the C++ STL?
===
It seems safe to cast the result of my vector's size() function to an unsigned int. How can I tell for sure, though? My documentation isn't clear about how size_type is defined. | 0 | [
2,
113,
92,
31,
361,
71,
14,
5465,
16,
1072,
1,
4474,
26,
7497,
18,
19,
14,
272,
20512,
354,
255,
60,
800,
3726,
3726,
32,
2206,
1834,
20,
1325,
14,
829,
16,
51,
7497,
22,
18,
1072,
5,
6,
1990,
20,
40,
28839,
19,
38,
9,
18... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PostgreSQL size differences
===
I've got two PostgreSQL databases that have been created using the same sql file. One of them is 2GB larger. Can someone help me figure out why? I'm sure the databases have the same row counts, tables, indexes, etc.. The databases are on different servers, there are small differences in the postgresql.conf and the PostgreSQL version. Would something there change size on disk? | 0 | [
2,
678,
6879,
18,
22402,
1072,
4921,
800,
3726,
3726,
31,
22,
195,
330,
81,
678,
6879,
18,
22402,
6018,
18,
30,
57,
74,
679,
568,
14,
205,
4444,
255,
3893,
9,
53,
16,
105,
25,
172,
11400,
1662,
9,
92,
737,
448,
55,
1465,
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... |
Fixing the Radial Axis on MATLAB Polar Plots
===
I'm using polar plots (POLAR(THETA,RHO)) in MATLAB.
Is there an easy way to fix the range for the radial axis to say, 1.5?
I'm looking for something analogous to the xlim, ylim commands for cartesian axes. Haven't found anything in the docs yet.
Thanks in advance. | 0 | [
2,
20047,
14,
16306,
8577,
27,
4277,
9086,
8166,
18205,
800,
3726,
3726,
31,
22,
79,
568,
8166,
18205,
13,
5,
21856,
5,
124,
536,
15,
139,
1807,
6,
6,
19,
4277,
9086,
9,
25,
80,
40,
2010,
161,
20,
6098,
14,
978,
26,
14,
16306,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 much effort does it take to spoof an Ip Address in a call to a webservice?
===
I don't want to know how... Just how complicated....
I'm thinking of securing a webservice or 2 based on the incoming client ipaddress of the caller. Is this in any way secure?
Surely if the IPaddress was being spoofed then the result would have to be sent back to the address that was being spoofed and therefore not reach the spoofer? | 0 | [
2,
184,
212,
2150,
630,
32,
247,
20,
26960,
40,
15735,
3218,
19,
21,
645,
20,
21,
2741,
11449,
60,
800,
3726,
3726,
31,
221,
22,
38,
259,
20,
143,
184,
9,
9,
9,
114,
184,
8343,
9,
9,
9,
9,
31,
22,
79,
1440,
16,
13498,
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... |
What TFS tool would you recommend?
===
I am mostly use to using Subversion for my source control. However, my current position has me using TFS. The UI of the TFS explorer and its integration with Visual Studio has me a little disoriented. I miss having tools like SmartSVN where I could see at a glance what I've modified and is pending checkin.
What tool sets do you recommend for use with TFS in general, and what tools do you know of that enable such visualizations? I know that the TFS explorer will show you pending checkins, but I miss having a separate tool that monitors file system changes and auto refreshes the list of files. | 0 | [
2,
98,
13,
11720,
18,
5607,
83,
42,
12360,
60,
800,
3726,
3726,
31,
589,
1555,
275,
20,
568,
972,
10898,
26,
51,
1267,
569,
9,
207,
15,
51,
866,
649,
63,
55,
568,
13,
11720,
18,
9,
14,
13,
5661,
16,
14,
13,
11720,
18,
8520,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Automated testing of GUI
===
**This question isn't about unit-testing.**
This is about testing of the gui and testing that the right stuff is input in the right text box at the right time.
A company I used to work at used WinRunner (different department so I don't know much more that that), but that has now been shutdown by HP but they don't seem that bothered whether you stay with HP or go elsewhere. You can't read about the product until you've signed up which is annoying.
The tool has to work with MFC (non-negotiable) and the ideal tool will also...
- be automated.
- be scriptable.
- work with different screen resolutions automatically.
- be able to 'spy' on individual static text boxes, etc.
- intuitive enough so non-programmers can create the scripts.
- have reporting tools, including email of individual users.
What do other SO users do for automated GUI testing?
| 0 | [
2,
14904,
4431,
16,
9457,
800,
3726,
3726,
13,
1409,
1565,
1301,
2532,
22,
38,
88,
1237,
8,
10543,
68,
9,
1409,
48,
25,
88,
4431,
16,
14,
9457,
17,
4431,
30,
14,
193,
3217,
25,
6367,
19,
14,
193,
1854,
1649,
35,
14,
193,
85,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 website payment processor?
===
This question has been asked before ([link][1]) but I have slightly different requirements. First, I'm in Canada so that rules out Google Checkout and probably a few others. I just need a basic service that provides "Buy Now" functionality, no shopping carts or anything like that. The site isn't super high volume, so I'd like to avoid any site with crazy monthly fees. I also need the ability to setup "discount codes" (or whatever you want to call them) for special promotions. The site must also have some sort of payment notification service (IPN). I am currently using PayPal, but their lack of discount codes is really starting to restrict what I can do.
What have you used, or what would you recommend I investigate further?
[1]: http://stackoverflow.com/questions/2556/whats-the-best-online-payment-processing-solution | 0 | [
2,
246,
2271,
7582,
14762,
60,
800,
3726,
3726,
48,
1301,
63,
74,
411,
115,
13,
5,
2558,
6258,
500,
2558,
165,
500,
6,
47,
31,
57,
1847,
421,
4786,
9,
64,
15,
31,
22,
79,
19,
836,
86,
30,
1761,
70,
8144,
2631,
1320,
17,
910,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 move a CALayer instantly (w/o animation)
===
I'm trying to drag a CALayer in an iPhone app.
As soon as I change its position property it tries to animate to the new position and flickers all over the place:
`layer.position = CGPointMake(x, y)`
How can I move CALayers instantly? I can't seem to get my head around the Core Animaition API on the iPhone.
Thanks a lot.. | 0 | [
2,
184,
107,
42,
780,
21,
1658,
15187,
6064,
13,
5,
499,
118,
111,
6236,
6,
800,
3726,
3726,
31,
22,
79,
749,
20,
5501,
21,
1658,
15187,
19,
40,
21024,
4865,
9,
28,
651,
28,
31,
753,
82,
649,
1354,
32,
3919,
20,
14487,
591,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Anyone worked with Time Zones in WPF/C#? Daylight Savings Time Specifically
===
I am having trouble understanding how the System Registry can help me convert a DateTime object into the a corresponding TimeZone. I have an example that I've been trying to reverse engineer but I just can't follow the one critical step in which the UTCtime is offset depending on Daylight Savings Time.
I am using .NET 3.5 (thank god) but It's still baffling me.
Thanks | 0 | [
2,
1276,
577,
29,
85,
11225,
19,
619,
7721,
118,
150,
5910,
60,
12344,
12135,
85,
3524,
800,
3726,
3726,
31,
589,
452,
2572,
3260,
184,
14,
329,
18269,
92,
448,
55,
8406,
21,
1231,
891,
3095,
77,
14,
21,
7265,
85,
11661,
9,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it possible to remove the "cancel" button in UIImagePickerController?
===
I have a UIImagePickerController as one view in a TabBar setup. Is it possible to tell the UIImagePickerController to not show the Cancel button in the top navigation bar when browsing photos libraries? | 0 | [
2,
25,
32,
938,
20,
4681,
14,
13,
7,
1245,
11040,
7,
5167,
19,
13,
5661,
22039,
16855,
106,
12898,
1252,
60,
800,
3726,
3726,
31,
57,
21,
13,
5661,
22039,
16855,
106,
12898,
1252,
28,
53,
1418,
19,
21,
6523,
1850,
18161,
9,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
LINQ to SQL concurrency conflict - Looks like a clean attach with proper row versioning
===
I am trying to get LINQ to SQL to persist changes to an attached object wherein the backing table has a DateTime column that I *think* should function for row versioning, as described [here][1].
The table looks like this:
CREATE TABLE [dbo].[client](
[client_id] [int] IDENTITY(1,1) NOT NULL,
[client_address1] varchar(100) NULL,
/* snip */
[modified_date] datetime NOT NULL,
CONSTRAINT [PK_CLIENT] PRIMARY KEY CLUSTERED ([client_id] ASC) )
<br />
The relevant attributes on the modified_date property are set as so in the DBML designer:
<pre>
Auto Generated Value: True
Auto-Sync: Always
Nullable: False
Primary Key: False
Read Only: False
Server Data Type: DateTime
Source: modified_date
Time Stamp: True
Update Check: Never
</pre>
<br />
And the resulting attributes on the declaration of the modified_date property look right as far as I can tell:
[Column(Storage="_modified_date", AutoSync=AutoSync.Always,
DbType="DateTime", IsDbGenerated=true, IsVersion=true,
UpdateCheck=UpdateCheck.Never)]
<br />
The process of attempting to save changes to a client goes something like this:
var c = new client { client_id = idOfClientToSave };
c.client_address1 = uxAddress1.Text;
// The DataContext is initialized in the constructor
// of ClientDataAccess
using (var ClientData = new ClientDataAccess())
{
ClientData.SaveClient(c);
}
<br />
And lastly, the method that attempts to submit the changes looks like this:
public int SaveClient(client c)
{
c.modified_date = DateTime.Now.ToUniversalTime();
if (c.client_id == 0)
{
_db.GetTable<client>().InsertOnSubmit(c);
}
else
{
_db.GetTable<client>().Attach(c, true);
}
try
{
_db.SubmitChanges(ConflictMode.ContinueOnConflict);
}
catch (ChangeConflictException)
{
foreach (var con in _db.ChangeConflicts)
{
con.Resolve(RefreshMode.OverwriteCurrentValues);
}
throw;
}
}
<br />
But _db.SubmitChanges(ConflictMode.ContinueOnConflict) still throws a ChangeConflict exception (as does _db.SubmitChanges()). I can't see how the attached object might could be originating from the current DataContext, as it's instanciated on its own and not retrieved from the DataContext before attaching.
Any help would be greatly appreciated.
[1]: http://geekswithblogs.net/michelotti/archive/2007/12/18/117823.aspx | 0 | [
2,
6294,
1251,
20,
4444,
255,
25547,
2930,
13,
8,
1879,
101,
21,
2745,
19514,
29,
4119,
3131,
615,
68,
800,
3726,
3726,
31,
589,
749,
20,
164,
6294,
1251,
20,
4444,
255,
20,
22084,
1693,
20,
40,
3638,
3095,
113,
108,
14,
3931,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Operating System compile time
===
This is just a general question - I was sitting and waiting for a bit of software to compile (we use Incredibuild here but can still take 10/15 mins) and it got me wondering, does anyone know how long it took to compile Windows XP or Vista?
I did some googling but didn't really find any useful information | 0 | [
2,
2455,
329,
26561,
85,
800,
3726,
3726,
48,
25,
114,
21,
297,
1301,
13,
8,
31,
23,
1805,
17,
1672,
26,
21,
1142,
16,
2306,
20,
26561,
13,
5,
458,
275,
19,
6037,
1115,
29361,
235,
47,
92,
174,
247,
332,
118,
1193,
4232,
18,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I get the minimum required password length value from Active Directory in .NET
===
I'm implementing a plugin architecture to implement authentication an external authentication mechanism for a web site. One of the plugins I plan to provide is an ActiveDirectory plugin. I'd like to implement some of the features of a MembershipProvider, including MinRequiredPasswordLength, but don't want to fully implement or configure an ActiveDirectoryMembershipProvider.
Does anyone know how to query AD and get the minimum required password length? I know that this can be set by GPO and vary by user/computer depending on policies, but I'd like to provide a default based on the domain default instead of an arbitrary number. | 0 | [
2,
184,
92,
31,
164,
14,
5187,
1390,
20884,
1476,
1923,
37,
1348,
16755,
19,
13,
9,
2328,
800,
3726,
3726,
31,
22,
79,
17333,
21,
10922,
108,
2607,
20,
8713,
27963,
40,
4886,
27963,
6534,
26,
21,
2741,
689,
9,
53,
16,
14,
10922,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 PHP stream contexts do in relation to file operations?
===
In the PHP manual, the file operations reference an optional context (e.g. for [copy][1]). How do these contexts affect basic file operations?
[1]: http://us3.php.net/copy | 0 | [
2,
98,
107,
13,
26120,
3766,
4141,
18,
107,
19,
5827,
20,
3893,
1311,
60,
800,
3726,
3726,
19,
14,
13,
26120,
5132,
15,
14,
3893,
1311,
2801,
40,
12832,
4141,
13,
5,
62,
9,
263,
9,
26,
636,
19625,
500,
2558,
165,
500,
6,
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 should I modify a SQL query for PostGRE?
===
I have SQL query, which is working nice on Oracle and MSSQL. Now I'm trying this on PostGre and it gives a strange exception: `org.postgresql.util.PSQLException: ERROR: missing FROM-clause entry for table "main"`
Here is the query:
SELECT *
FROM "main" main
INNER JOIN "something_link" something_link ON main."id" = something_link."mainid"
INNER JOIN "something" somehting ON something_link."somethingid" = something."id"
INNER JOIN "type" type ON something."typeid" = type."id"
This is quite simple query and I can't see why it is not working on PostGre? | 0 | [
2,
184,
378,
31,
17579,
21,
4444,
255,
25597,
26,
678,
6879,
60,
800,
3726,
3726,
31,
57,
4444,
255,
25597,
15,
56,
25,
638,
2210,
27,
15759,
17,
4235,
18,
22402,
9,
130,
31,
22,
79,
749,
48,
27,
678,
6879,
17,
32,
2352,
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... |
ASP.Net Providers from web server in DMZ
===
We have an intranet asp.net web application which uses the OOTB ASP.net membership and role providers.
Now we are planning to expose the application to internet, by moving the web server to the DMZ as represented in the following (crappy) text diagram
<pre>
External Internal
internet --- Firewall --- Web server --- Firewall --- App Server --- Database
DMZ Intranet
</pre>
Now the problem is that the asp.net membership and role providers on the web server cant connect to the sql server because of the internal firewall.
Has you ever faced such a scenario before? will you recommending opening up ports in the internal firewall so that the webserver can directly connect to the SQL server? What other alternatives do i have (other than wring a custom provider myself)?
| 0 | [
2,
28,
306,
9,
2328,
13488,
37,
2741,
8128,
19,
15728,
380,
800,
3726,
3726,
95,
57,
40,
14369,
2328,
28,
306,
9,
2328,
2741,
3010,
56,
2027,
14,
13,
4328,
11872,
28,
306,
9,
2328,
4363,
17,
597,
13488,
9,
130,
95,
50,
2334,
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... |
Make Eclipse treat .h file as C++?
===
I am beginning to use Eclipse Ganymede with CDT at work. Unfortunately, all of our C++ headers use a .h extension. Eclipse thinks these are C headers and flags them with lots of syntax errors on things like classes and namespaces. I've tried to change the file type association, but it's "locked".
Interestingly, "*.h" is associated with both C and C++ headers, but it seems to be using C. How can I get Eclipse to treat .h files as C++?
| 0 | [
2,
233,
11652,
5752,
13,
9,
252,
3893,
28,
272,
20512,
60,
800,
3726,
3726,
31,
589,
997,
20,
275,
11652,
7890,
93,
4688,
62,
29,
1745,
38,
35,
170,
9,
6200,
15,
65,
16,
318,
272,
20512,
157,
445,
275,
21,
13,
9,
252,
3896,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Find position of a node using xpath
===
Anyone know how to get the position of a node using xpath?
Say I have the following xml:
<a>
<b>zyx</b>
<b>wvu</b>
<b>tsr</b>
<b>qpo</b>
</a>
I can use the following xpath query to select the third <b> node (<b>tsr</b>):
a/b[.='tsr']
Which is all well and good but I want to **return** the ordinal position of that node, something like:
a/b[.='tsr']/position()
(but a bit more working!)
Is it even possible?
| 0 | [
2,
477,
649,
16,
21,
15421,
568,
993,
8353,
800,
3726,
3726,
1276,
143,
184,
20,
164,
14,
649,
16,
21,
15421,
568,
993,
8353,
60,
395,
31,
57,
14,
249,
23504,
45,
13,
1,
58,
1,
13,
1,
220,
1,
3327,
396,
1,
118,
220,
1,
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... |
mysql replication - table locking?
===
I am currently working for a company that has a website running mysql/php (all tables are also using the MYISAM table type).
We would like to implement replication, but I have read in the mysql docs and elsewhere on the internet that this will lock the tables when doing the writes to the binary log (which the slave dbs will eventually read from).
Will these locks cause a problem on a live site that is fairly write-heavy? Also, is there a way to enable replication without having to lock the tables? | 0 | [
2,
51,
18,
22402,
23841,
13,
8,
859,
17538,
60,
800,
3726,
3726,
31,
589,
871,
638,
26,
21,
237,
30,
63,
21,
2271,
946,
51,
18,
22402,
118,
26120,
13,
5,
1233,
7484,
50,
67,
568,
14,
51,
49,
6101,
859,
1001,
6,
9,
95,
83,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Looking for an OSX application that can do image processing using a webcam.
===
I'm looking for an OSX (or Linux?) application that can recieve data from a webcam/video-input and let you do some image processing on the pixels in something similar to c or python or perl, not that bothered about the processing language.
I was considering throwing one together but figured I'd try and find one that exists already first before I start re-inventing the wheel.
Wanting to do some experiments with object detection and reading of dials and numbers. | 0 | [
2,
699,
26,
40,
13,
759,
396,
3010,
30,
92,
107,
1961,
5511,
568,
21,
2741,
8760,
9,
800,
3726,
3726,
31,
22,
79,
699,
26,
40,
13,
759,
396,
13,
5,
248,
13024,
60,
6,
3010,
30,
92,
302,
10486,
195,
1054,
37,
21,
2741,
8760,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Selecting a non-standard image area in a web application
===
This question is for a web application.
And maybe it's a stupid question but I was wondering if there is a way to
generate a polygon with 4 points, so that the user can himself drag
each point to create it's own (As an example, let's say that we want to remove a window from an image that it is not at a normal angle) .Is it possible?. I can't seem to
find anything after a few hours of search. | 0 | [
2,
20764,
21,
538,
8,
15566,
1961,
217,
19,
21,
2741,
3010,
800,
3726,
3726,
48,
1301,
25,
26,
21,
2741,
3010,
9,
17,
913,
32,
22,
18,
21,
3553,
1301,
47,
31,
23,
5712,
100,
80,
25,
21,
161,
20,
7920,
21,
21309,
29,
268,
819... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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# Attribute to trigger an event on invoking a method
===
Is there a way in C# or .NET in general to create an attribute on a method which triggers an event when a method is invoked? Ideally, I would be able to run custom actions before and after the invocation of the method.
I mean something like this:
[TriggersMyCustomAction()]
public void DoSomeStuff()
{
}
I am totally clueless how to do it or if it possible at all, but [System.Diagnostic.ConditionalAttribute][1] might do a similar thing in the background. I am not sure though.
[1]: http://msdn.microsoft.com/en-us/library/system.diagnostics.conditionalattribute.aspx | 0 | [
2,
272,
5910,
35,
14755,
20,
7286,
40,
807,
27,
19,
2625,
1581,
21,
2109,
800,
3726,
3726,
25,
80,
21,
161,
19,
272,
5910,
54,
13,
9,
2328,
19,
297,
20,
1600,
40,
35,
14755,
27,
21,
2109,
56,
7286,
18,
40,
807,
76,
21,
2109,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I get IE to open a file with its associated application?
===
MSTest produces an XML file with a .trx extension containing test results.
If I have a .trx file on a machine without Visual Studio installed, I get prompted to "Use the Web Service..." or "Select from a list...", which is expected.
If I have a .trx file on my development machine and I open it, it opens in Visual Studio, which is expected.
If I click a link on a web page or in an email which gets a .trx file from my build server, it ALWAYS opens the XML in IE.
How do I configure IE (or IIS on the build server) to open the remote .trx file in Visual Studio, if it's installed, or prompt if it's not?
| 0 | [
2,
184,
107,
31,
164,
13,
660,
20,
368,
21,
3893,
29,
82,
1598,
3010,
60,
800,
3726,
3726,
4235,
10543,
6700,
40,
23504,
3893,
29,
21,
13,
9,
38,
21141,
3896,
3503,
1289,
1736,
9,
100,
31,
57,
21,
13,
9,
38,
21141,
3893,
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... |
Is donation-supported free software a viable business model?
===
I'm working on a software product, and to mitigate piracy problems I was thinking about offering the uncrippled software for free, but requesting donations and offering various things (like website access and program enhancement files) in return (*a la* PBS and NPR). If the program is popular enough (and I'm assuming that a free product would get more use than one that costs money, which might not be true), it would also drive traffic to the website, and I could sell ads and ancilary products.
I've sold shareware for years, and my operating assumption has always been that people who steal my cracked software wouldn't pay for it no matter what I did, so I've never put more than the minimal amount of copy protection into my products anyway. What I do use (PayPal, unlock code via email) is enough of a pain for both me and the clients that I suspect it chases off a high percentage of people who might otherwise use the product regularly and eventually get around to giving me a small donation.
Does giving the software away and then begging for money sound like a good plan? | 0 | [
2,
25,
15390,
8,
24909,
551,
2306,
21,
17347,
508,
1061,
60,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
2306,
2374,
15,
17,
20,
26476,
28181,
1716,
31,
23,
1440,
88,
4090,
14,
367,
28215,
5106,
43,
2306,
26,
551,
15,
47,
20033,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
set initial sort order in Silverlight DataGrid?
===
When I first load data into a Silverlight DataGrid control, how can I make the screen look exactly as if the user had just clicked the header of the first column? In other words, the data should be sorted in ascending order according to that column's values, AND the little sort arrow should be displayed in the first column's header.
Assuming that's possible, can I also make it look as if the user had clicked the first column and then shift-clicked the second? In other words, can I programatically apply a two-part sort and have the screen look as if the user had done it?
| 0 | [
2,
309,
2104,
2058,
389,
19,
1172,
3130,
1054,
16375,
60,
800,
3726,
3726,
76,
31,
64,
6305,
1054,
77,
21,
1172,
3130,
1054,
16375,
569,
15,
184,
92,
31,
233,
14,
2324,
361,
1890,
28,
100,
14,
4155,
41,
114,
15802,
14,
157,
106,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 custom control rendering before <%= %> code executes to populate property
===
I have a custom control that exposes a property. When I set it using a fixed value, everything works correctly. But if I try to set its value using the <%= %> tags, it goes a little whacky:
<cc:CustomControl ID="CustomControl" runat="server" Property1='<%= MyProperty %>' />
<%= MyProperty %>
When this gets rendered, the <%= MyProperty %> tag underneat the custom control is rendered as I expect (with the value of MyProperty). However, when I step into the Render function of the CustomControl, the value for Property1 is literally the string "<%= MyProperty %>" instead of the actual underlying value of MyProperty.
| 0 | [
2,
28,
306,
9,
2328,
5816,
569,
15307,
115,
13,
1,
11881,
3726,
13,
11881,
1,
1797,
15644,
18,
20,
1675,
12383,
1354,
800,
3726,
3726,
31,
57,
21,
5816,
569,
30,
13833,
18,
21,
1354,
9,
76,
31,
309,
32,
568,
21,
3535,
1923,
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... |
What's the best way to manage php sessions in an LAMP cluster?
===
I've been reading up on this subject for a while. Suddenly the day has come where this solution is a necessity, not just a dream.
Through my reading, I've seen the popular differences being (file based, memcached, shared memory (mm), sql table, and custom).
The idea we originally thought of was using a ZFS or AFS mounted on each of the application servers (LAMP boxen), and pointing the session.save_path php.ini variable to a directory from that mounted path.
I'd like to hear of success stories.
Thanks in advance | 0 | [
2,
98,
22,
18,
14,
246,
161,
20,
4705,
13,
26120,
5763,
19,
40,
6792,
7460,
60,
800,
3726,
3726,
31,
22,
195,
74,
1876,
71,
27,
48,
1550,
26,
21,
133,
9,
1605,
14,
208,
63,
340,
113,
48,
4295,
25,
21,
14981,
15,
52,
114,
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... |
Neko and haxe.Timer.delayed()
===
As every haXe developer knows, you could use haxe.Timer.delayed() to delay function call for some time. But this function doesn't exist for neko at all. Is there a way to achieve the same results? | 0 | [
2,
2836,
921,
17,
1458,
13012,
9,
891,
139,
9,
546,
4414,
69,
5,
6,
800,
3726,
3726,
28,
352,
1458,
13012,
10058,
3620,
15,
42,
110,
275,
1458,
13012,
9,
891,
139,
9,
546,
4414,
69,
5,
6,
20,
7255,
1990,
645,
26,
109,
85,
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... |
Best practices for version information?
===
I am currently working on automating/improving the release process for packaging my shop's entire product. Currently the product is a combination of:
* Java server-side codebase
* XML configuration and application files
* Shell and batch scripts for administrators
* Statically served HTML pages
* and some other stuff, but that's most of it
All or most of which have various versioning information contained in them, used for varying purposes. Part of the release packaging process involves doing a lot of finding, grep'ing and sed'ing (in scripts) to update the information. This glue that packages the product seems to have been cobbled together in an organic, just-in-time manner, and is pretty horrible to maintain. For example, some Java methods create Date objects for the time of release, the arguments for which are updated by a textual replacement, without compiler validation... just, urgh.
I'm trying avoid giving examples of actual software used (i.e. CVS, SVN, ant, etc.) because I'd like to avoid the "use xyz's feature to do this" and concentrate more on general practices. I'd like to blame shoddy design for the problem, but if I had to start again, still using varying technologies, I'd be unsure how best to go about handling this, beyond laying down conventions.
My questions is, are there any best practices or hints and tips for maintaining and updating versioning information across different technologies, filetypes, platforms and version control systems?
| 0 | [
2,
246,
5242,
26,
615,
676,
60,
800,
3726,
3726,
31,
589,
871,
638,
27,
3108,
79,
1880,
118,
19963,
68,
14,
830,
953,
26,
16850,
51,
2546,
22,
18,
1078,
2374,
9,
871,
14,
2374,
25,
21,
3733,
16,
45,
1637,
8247,
8128,
8,
1416,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 anyone explain thread monitors and wait?
===
Someone at work just asked for the reasoning behind having to wrap a wait inside a synchronized.
Honestly I can't see the reasoning. I understand what the javadocs say--that the thread needs to be the owner of the object's monitor, but why? What problems does it prevent? (And if it's actually necessary, why can't the wait method get the monitor itself?)
I'm looking for a fairly in-depth why or maybe a reference to an article. I couldn't find one in a quick google.
Oh, also, how does thread.sleep compare? | 0 | [
2,
92,
1276,
3271,
9322,
18521,
17,
1760,
60,
800,
3726,
3726,
737,
35,
170,
114,
411,
26,
14,
15543,
439,
452,
20,
8118,
21,
1760,
572,
21,
27202,
9,
10971,
31,
92,
22,
38,
196,
14,
15543,
9,
31,
1369,
98,
14,
8247,
13799,
18... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Semi-Tricky SQL Query
===
I am trying to write a query for SQL Server 2005 but I can't figure out how to do it. I have a table with the following fields:
**MessageID int<br/>
CategoryID int<br/>
Priority tinyint<br/>
MessageText NVARCHAR(MAX)<br/>**
I need a query that will return * for each row that has the highest priority within a Category. For example, if I had the following data:
**MessageID, CategoryID, Priority, MessageText**<br/>
1, 100, 1, Error #1234 occurred<br/>
2, 100, 2, Error #243 occurred<br/>
3, 100, 3, Error #976 occurred<br/>
4, 200, 4, Error #194 occurred<br/>
5, 200, 1, Error #736 occurred<br/>
6, 300, 3, Error #54 occurred<br/>
7, 300, 2, Error #888 occurred<br/>
then the result would be:
**MessageID, CategoryID, Priority, MessageText**<br/>
3, 100, 3, Error #976 occurred<br/>
4, 200, 4, Error #194 occurred<br/>
6, 300, 3, Error #54 occurred<br/>
Notice that it returns one row per category, and that it is the row which had the highest priority for that Category.
Can anyone tell me how I can write this query? | 0 | [
2,
1922,
8,
15294,
93,
4444,
255,
25597,
800,
3726,
3726,
31,
589,
749,
20,
2757,
21,
25597,
26,
4444,
255,
8128,
812,
47,
31,
92,
22,
38,
1465,
70,
184,
20,
107,
32,
9,
31,
57,
21,
859,
29,
14,
249,
2861,
45,
13,
1409,
3845... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Soft hyphen in HTML (<wbr> vs. )
===
How do you solve the problem with soft hyphens on your web pages? In a text there can be long words which you might want to line break with a hyphen. But you do not want the hyphen to show if the whole word is on the same line.
According to comments on [this page][1] `<wbr>` is a non standard "tag soup invented by Netscape". It seems like `­` [has its problems with standard compliance as well][2]. There seems to be [no way to get a working solution for all browsers][3].
Which is your way for handling soft hyphens and why did you choose it? Is there i preferred solution or best practice?
[1]: http://www.thefutureoftheweb.com/blog/breaking-long-urls
[2]: http://www.cs.tut.fi/~jkorpela/shy.html
[3]: http://www.quirksmode.org/oddsandends/wbr.html | 0 | [
2,
1856,
4085,
16012,
19,
13,
15895,
13,
5,
1,
499,
5145,
1,
4611,
9,
13,
1,
6,
800,
3726,
3726,
184,
107,
42,
8402,
14,
1448,
29,
1856,
4085,
16012,
18,
27,
154,
2741,
4434,
60,
19,
21,
1854,
80,
92,
44,
175,
715,
56,
42,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Should I use multiplication or division?
===
Let's say we have to perform a simple operation where we need half of the value of a variable. There are *typically* two ways of doing this:
y = x / 2.0;
// or...
y = x * 0.5;
Assuming we're using the standard operators provided with the language, which one has better performance?
I'm guessing multiplication is typically better so I try to stick to that when I code, but I would like to confirm this. Although personally I'm interested in the answer for **Python** 2.4-2.5, feel free to also post an answer for other languages! And if you'd like feel free to post other fancier ways (like using bitwise shift operators) as well. | 0 | [
2,
378,
31,
275,
25432,
54,
460,
60,
800,
3726,
3726,
408,
22,
18,
395,
95,
57,
20,
2985,
21,
1935,
1453,
113,
95,
376,
519,
16,
14,
1923,
16,
21,
7612,
9,
80,
50,
1637,
26139,
2483,
81,
2847,
16,
845,
48,
45,
13,
93,
800,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the cleverest code you've ever seen?
===
My favorite is Tom "Duff's Device". It took me literally months after I first found this before I felt like I fully understood it. That said, I have seen others (there is an amazingly short implementation of a regular expression engine by Brian Kernighan in the book Beautiful Code).
<pre>
dsend(to, from, count)
char *to, *from;
int count;
{
int n = (count + 7) / 8;
switch (count % 8) {
case 0: do { *to = *from++;
case 7: *to = *from++;
case 6: *to = *from++;
case 5: *to = *from++;
case 4: *to = *from++;
case 3: *to = *from++;
case 2: *to = *from++;
case 1: *to = *from++;
} while (--n > 0);
}
}
</pre>
What is the cleverest code you've ever seen? | 4 | [
2,
98,
25,
14,
11994,
1430,
1797,
42,
22,
195,
462,
541,
60,
800,
3726,
3726,
51,
3839,
25,
2067,
13,
7,
43,
5386,
22,
18,
3646,
7,
9,
32,
199,
55,
6949,
818,
75,
31,
64,
216,
48,
115,
31,
427,
101,
31,
2337,
4014,
32,
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... |
Shoulda testing workflow from trenches
===
Everyone is talking about TDD (BDD) in Rails (and not just Rails) development world today. It's easy to find plenty of good geneneral information about it, there are quite a few tools you can use for this purpose and there are many (good) examples of how to use them.
Now, I'm already on the train. I like the idea (never did TDD before) and I decided to go for Shoulda (because it seems to me quite easy to understand). I read plenty of examples and have done some first tests. My problem is this: I'm just not sure if I'm doing it right. As I said, there are many tiny examples all over the net, but I haven't found any comprehensive guide covering overall workflow of TDD with Shoulda.
Here are my questions:
- What is your way of practising TDD with Shoulda? (What is your usual workflow throughout one iteration?)
- What other tools do you use (except of Shoulda itself)?
- Any other tips? | 0 | [
2,
378,
58,
4431,
170,
9990,
37,
22279,
800,
3726,
3726,
1266,
25,
1582,
88,
15596,
43,
13,
5,
220,
8096,
6,
19,
2240,
18,
13,
5,
290,
52,
114,
2240,
18,
6,
522,
126,
786,
9,
32,
22,
18,
2010,
20,
477,
7062,
16,
254,
3194,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best "turnkey" stemming algorithm?
===
I need a good stemming algorithm for a project I'm working on. It was suggested that I look at the Porter Stemmer. When I checked out the page on the Porter stemmer I found that it is deprecated now in favor of the "Snowball" stemmer.
I need a good stemmer, but I can't really spend significant time implementing (or optimizing) my own. What is the best "off the shelf", freely available stemmer? Are there any non-free stemmers available for a reasonable price? Or, is the Snowball stemmer my best bet? | 4 | [
2,
98,
25,
14,
246,
13,
7,
8169,
4237,
7,
29105,
9083,
60,
800,
3726,
3726,
31,
376,
21,
254,
29105,
9083,
26,
21,
669,
31,
22,
79,
638,
27,
9,
32,
23,
2347,
30,
31,
361,
35,
14,
8158,
6940,
1263,
9,
76,
31,
6505,
70,
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... |
Using Apache commons FileUpload
===
This just won't work. The problem is that I do not know enough to even know what is supposed to happen. I can't debug this code. I'd like to store upload to temporary folder "temp" and then to move them to "applets". Please help? The servlet is obviously being accessed, but I can't find the uploaded files... Thanks in advance.
Form (which is created using a scriptlet - I put this here if that could cause problems):
<%
out.write("<p>Upload a new game:</p>");
out.write("<form name=\"uploadForm\" action=\"game.jsp\" "
+ "method=\"POST\" enctype=\"multipart/form-data\">"
+ "<input type=\"file\" name=\"uploadSelect\" value=\"\" width=\"20\" />"
+ "<br><input type=\"submit\" value=\"Submit\" name=\"uploadSubmitButton\" "
+ "onclick = \"submitToServlet2('UploadGameServlet');\">"
+ "</form>");
%>
Which calls this javascript:
function submitToServlet2(newAction)
{
document.uploadForm.action = newAction;
}
Which in turn goes to the servlet (code included in full, since there may be some important element hiding)
package org.project;
import java.io.*;
import java.util.Iterator;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
// import servlet stuff
import org.apache.commons.fileupload.*;
public class UploadGameServlet extends HttpServlet {
/**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
* @param request servlet request
* @param response servlet response
*/
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
if (ServletFileUpload.isMultipartContent(request))
{
try
{
// Create a factory for disk-based file items
FileItemFactory factory = new DiskFileItemFactory();
// Create a new file upload handler
ServletFileUpload upload = new ServletFileUpload(factory);
// Parse the request
List items = upload.parseRequest(request); /* FileItem */
File repositoryPath = new File("\\temp");
DiskFileItemFactory diskFileItemFactory = new DiskFileItemFactory();
diskFileItemFactory.setRepository(repositoryPath);
Iterator iter = items.iterator();
while (iter.hasNext())
{
FileItem item = (FileItem) iter.next();
File uploadedFile = new File("\\applets");
item.write(uploadedFile);
}
}
catch (FileUploadException ex)
{
Logger.getLogger(UploadGameServlet.class.getName()).log(Level.SEVERE, null, ex);
}
catch (Exception ex)
{
Logger.getLogger(UploadGameServlet.class.getName()).log(Level.SEVERE, null, ex);
}
}
PrintWriter out = response.getWriter();
try {
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet UploadGameServlet</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Servlet UploadGameServlet at " + request.getContextPath () + "</h1>");
out.println("</body>");
out.println("</html>");
} finally {
out.close();
}
}
} | 0 | [
2,
568,
17140,
8322,
3893,
576,
8294,
800,
3726,
3726,
48,
114,
230,
22,
38,
170,
9,
14,
1448,
25,
30,
31,
107,
52,
143,
511,
20,
166,
143,
98,
25,
2293,
20,
2384,
9,
31,
92,
22,
38,
121,
16254,
48,
1797,
9,
31,
22,
43,
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... |
Question about URL Validation with Regex
===
I have the following regex that does a great job matching urls:
`((https?|ftp|gopher|telnet|file|notes|ms-help):((//)|(\\\\))+[\w\d:#@%/;$()~_?\+-=\\\.&]*)`
However, it does not handle urls without a prefix, ie. **stackoverflow.com** or **www.google.com** do not match. Anyone know how I can modify this regex to not care if there is a prefix or not? | 2 | [
2,
1301,
88,
287,
6362,
27999,
29,
7953,
1706,
800,
3726,
3726,
31,
57,
14,
249,
7953,
1706,
30,
630,
21,
374,
1205,
10120,
13,
911,
7532,
45,
13,
1,
5,
5,
21127,
18,
60,
1,
3072,
306,
1,
839,
15256,
1,
3454,
2328,
1,
16877,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Django Forms - How to Use Prefix Parameter
===
Say I have a form like:
class GeneralForm(forms.Form):
field1 = forms.IntegerField(required=False)
field2 = forms. IntegerField(required=False)
And I want to show it twice on a page within one form tag each time with a different prefix e.g.,:
rest of page ...
<form ..>
GeneralForm(data,prefix="form1").as_table()
GeneralForm(data,prefix="form2").as_table()
<input type="submit" />
</form>
rest of page ...
When the user submits this, how do I get the submitted form back into two separate forms to do validation, and redisplay it?
[This was the only documentation][1] I could find and it's peckish.
[1]: http://docs.djangoproject.com/en/dev/ref/forms/api/#prefixes-for-forms | 0 | [
2,
3857,
14541,
1997,
13,
8,
184,
20,
275,
14315,
18906,
800,
3726,
3726,
395,
31,
57,
21,
505,
101,
45,
718,
297,
4190,
5,
4190,
18,
9,
4190,
6,
45,
575,
165,
800,
1997,
9,
6391,
13699,
1109,
5,
99,
3003,
2095,
3726,
13192,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
declare JSP taglib directives in web.xml
===
I seem to remember reading that it's possible to declare taglib directives such as:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
in web.xml. This eliminates the need to duplicate this directive in every JSP file where the taglib is used. Could someone tell me *how* these directives can be added to web.xml?
Cheers,
Don
| 2 | [
2,
10123,
487,
3401,
3383,
8326,
15626,
18,
19,
2741,
9,
396,
8184,
800,
3726,
3726,
31,
2260,
20,
1518,
1876,
30,
32,
22,
18,
938,
20,
10123,
3383,
8326,
15626,
18,
145,
28,
45,
13,
1,
11881,
1,
3383,
8326,
14315,
3726,
7,
150,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Microsoft.VisualBasic "true .NET" code?
===
My dev team is getting ready to start a new project. The shop has been a "VB shop" since the days of VB3, but the prevailing opinion now is that we're a ".NET shop" and since C# was created specifically for .NET, whereas VB.NET was a retrofit, we've decided to move forward writing C# only. The controversy revolves around the question of whether the Microsoft.VisualBasic namespace has a legitimate place in new development or if it is only for backward compatibility for VB6 (and older) code. A further, and more interesting question is whether the code "under" the Microsoft.VisualBasic namespace is even .NET code of if it is really the old VB runtime carefully packaged in a .NET wrapper, making it in fact a COM interop control (similar to how WinForms wraps the non-.NET Win32 windowing API but exposes only .NET APIs for consumption).
To make this even more confusing, our dev team has a Microsoft Consulting Services consultant telling us Microsoft no longer supports Visual Basic, including the VB runtime underlying the Microsoft.VisualBasic namespace.
What I'm looking for are links -- preferably to unimpeachable Microsoft sources -- to documentation that definitively answers this question one way or the other. I've already tried several search permutations on Google and not gotten any closer to getting to the bottom of this question. | 0 | [
2,
25,
7099,
9,
20893,
26467,
13,
7,
13398,
13,
9,
2328,
7,
1797,
60,
800,
3726,
3726,
51,
9664,
173,
25,
1017,
1451,
20,
799,
21,
78,
669,
9,
14,
2546,
63,
74,
21,
13,
7,
20468,
2546,
7,
179,
14,
509,
16,
13,
20468,
240,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
System.Data.OleDb.OleDbException: Invalid internet address. How do you connect to excel files located on a webserver using OleDb
===
I'm trying to create an OleDb connection to an Excel file that is located on a SharePoint server. The example code I'm playing with at the moment throws an OleDb exception "Invalid internet address":
public static void ConnectToRemoteExcelFile()
{
string connectionString = String.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=\"Excel 8.0;HDR=Yes;\";", "http://horde.servername.co.uk/Docs/Documents/Sales.xlsx");
using (OleDbConnection connection = new OleDbConnection(connectionString))
{
connection.Open();
}
}
Anyone know how to connect to an excel spread sheet on a web server?
| 0 | [
2,
329,
9,
18768,
9,
6069,
9007,
9,
6069,
9007,
10066,
872,
45,
16671,
2620,
3218,
9,
184,
107,
42,
6379,
20,
20700,
6488,
335,
27,
21,
2741,
10321,
106,
568,
12116,
9007,
800,
3726,
3726,
31,
22,
79,
749,
20,
1600,
40,
12116,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.