unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids sequence | token_type_ids sequence | attention_mask sequence |
|---|---|---|---|---|
Decimal vs Double?
===
I'm new to C#, and I want to use a trackbar for the forms opacity
This is my code
decimal trans = trackBar1.Value / 5000
this.Opacity = trans
When I try to build it, I get this error
**Cannot implicitly convert type 'decimal' to 'double**
I tried making trans a double, but then the control doesn't work. This code worked fine for me in VB.NET. Any suggestions? | 0 | [
2,
26380,
4611,
1494,
60,
800,
3726,
3726,
31,
22,
79,
78,
20,
272,
5910,
15,
17,
31,
259,
20,
275,
21,
792,
1850,
26,
14,
1997,
13,
11490,
5788,
48,
25,
51,
1797,
26380,
2982,
800,
792,
1850,
165,
9,
15165,
13,
118,
16024,
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... |
Percentage width child in absolutely positioned parent doesn't work in IE7
===
I've got an absolutely positioned div containing several children, one of which is a relatively positioned div. When I use a percentage-based width on the child div, it collapses to zero width on IE7, but not on Firefox or Safari. If I use pixel width, it works. If the parent is relatively positioned, the percentage width on the child works. Is there something I'm missing here? Is there an easy fix besides the pixel-based width on the child? Is there an area of the CSS spec that covers this? | 0 | [
2,
5780,
9456,
850,
19,
6916,
12125,
4766,
1437,
22,
38,
170,
19,
13,
660,
465,
800,
3726,
3726,
31,
22,
195,
330,
40,
6916,
12125,
13,
12916,
3503,
238,
391,
15,
53,
16,
56,
25,
21,
3109,
12125,
13,
12916,
9,
76,
31,
275,
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... |
Tools for porting J# code to C#
===
Are there any conversion tools for porting Visual J# code to C#? | 0 | [
2,
4672,
26,
1295,
68,
487,
5910,
1797,
20,
272,
5910,
800,
3726,
3726,
50,
80,
186,
6263,
4672,
26,
1295,
68,
3458,
487,
5910,
1797,
20,
272,
5910,
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... | [
1,
1,
1,
1,
1,
1,
1,
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... |
How do I calculate someone's age in c#?
===
Given a DateTime representing their birthday, how do I calculate someone's age? | 0 | [
2,
184,
107,
31,
18469,
737,
22,
18,
348,
19,
272,
5910,
60,
800,
3726,
3726,
504,
21,
1231,
891,
3793,
66,
4455,
15,
184,
107,
31,
18469,
737,
22,
18,
348,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
retrieve data from NSUserDefaults to TableView
===
I save values of two labels through NSUserDefaults :
- (IBAction) saveData
{
// Store the data
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:autore.text forKey:@"Author"];
[defaults setObject:testo.text forKey:@"Text"];
[defaults synchronize];
}
Then i try tot retrieve those values in a tableView :
// NSArray
@synthesize dataArray;
- (void)viewDidLoad {
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
self.dataArray = [NSArray arrayWithObjects:[prefs objectForKey:@"Author"], [prefs objectForKey:@"Text"],nil];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
// There is only one section.
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
// Return the number of time zone names.
return [dataArray count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
..............
..............
NSString *string = [dataArray objectAtIndex:indexPath.row];
// Authors
cell.textLabel.text = string;
// Text
cell.detailTextLabel.text = string;
return cell;
}
I would obtain result as like picture:
![figure][1]
[1]: http://i.stack.imgur.com/UK9bE.png | 0 | [
2,
11917,
1054,
37,
13,
2172,
16704,
13862,
9708,
18,
20,
859,
4725,
800,
3726,
3726,
31,
2079,
4070,
16,
81,
13173,
120,
13,
2172,
16704,
13862,
9708,
18,
13,
45,
13,
8,
13,
5,
4598,
8645,
6,
4377,
4375,
13,
1,
12894,
1718,
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... |
Reliable Timer in a Console Application
===
I am aware in dot net there are three timer types (see [http://msdn.microsoft.com/en-us/magazine/cc164015.aspx][1]). I have chosen a the threaded timer as the other types can drift if the main thread is busy and I need this to be reliable.
The way this timer works in the control of the timer is put on another thread so it can always tick along with the work begin completed on the parent thread when it is not busy.
The issue I have is that with this timer in a console application is that while the timer is ticking along on another thread the main thread is not doing anything so the app closes.
I tried adding a while true loop but then the main thread is too busy when the timer does go off.
Any ideas welcome.
[1]: http://msdn.microsoft.com/en-us/magazine/cc164015.aspx | 0 | [
2,
11398,
85,
139,
19,
21,
8650,
3010,
800,
3726,
3726,
31,
589,
3854,
19,
14123,
4275,
80,
50,
132,
85,
139,
2551,
13,
5,
1798,
636,
21127,
6903,
79,
18,
43,
103,
9,
22019,
12980,
9,
960,
118,
219,
8,
267,
118,
27605,
118,
33... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Fastest way to get value of pi
===
Solutions welcome in any language. :-) I'm looking for the fastest way to obtain the value of pi, as a personal challenge. More specifically I'm using ways that don't involve using #defined constants like M_PI, or hardcoding the number in.
The program below tests the various ways I know of. The inline assembly version is, in theory, the fastest option, though clearly not portable; I've included it as a baseline to compare the other versions against. In my tests, with builtins, the `4 * atan(1)` version is fastest on GCC 4.2, because it auto-folds the `atan(1)` into a constant. With `-fno-builtin` specified, the `atan2(0, -1)` version is fastest.
Here's the main testing program (`pitimes.c`):
#include <math.h>
#include <stdio.h>
#include <time.h>
#define ITERS 10000000
#define TESTWITH(x) { \
diff = 0.0; \
time1 = clock(); \
for (i = 0; i < ITERS; ++i) \
diff += (x) - M_PI; \
time2 = clock(); \
printf("%s\t=> %e, time => %f\n", #x, diff, diffclock(time2, time1)); \
}
static inline double
diffclock(clock_t time1, clock_t time0)
{
return (double) (time1 - time0) / CLOCKS_PER_SEC;
}
int
main()
{
int i;
clock_t time1, time2;
double diff;
/* Warmup. The atan2 case catches GCC's atan folding (which would
* optimise the ``4 * atan(1) - M_PI'' to a no-op), if -fno-builtin
* is not used. */
TESTWITH(4 * atan(1))
TESTWITH(4 * atan2(1, 1))
#if defined(__GNUC__) && (defined(__i386__) || defined(__amd64__))
extern double fldpi();
TESTWITH(fldpi())
#endif
/* Actual tests start here. */
TESTWITH(atan2(0, -1))
TESTWITH(acos(-1))
TESTWITH(2 * asin(1))
TESTWITH(4 * atan2(1, 1))
TESTWITH(4 * atan(1))
return 0;
}
And the inline assembly stuff (`fldpi.c`), noting that it will only work for x86 and x64 systems:
double
fldpi()
{
double pi;
asm("fldpi" : "=t" (pi));
return pi;
}
And a build script that builds all the configurations I'm testing (`build.sh`):
#!/bin/sh
gcc -O3 -Wall -c -m32 -o fldpi-32.o fldpi.c
gcc -O3 -Wall -c -m64 -o fldpi-64.o fldpi.c
gcc -O3 -Wall -ffast-math -m32 -o pitimes1-32 pitimes.c fldpi-32.o
gcc -O3 -Wall -m32 -o pitimes2-32 pitimes.c fldpi-32.o -lm
gcc -O3 -Wall -fno-builtin -m32 -o pitimes3-32 pitimes.c fldpi-32.o -lm
gcc -O3 -Wall -ffast-math -m64 -o pitimes1-64 pitimes.c fldpi-64.o -lm
gcc -O3 -Wall -m64 -o pitimes2-64 pitimes.c fldpi-64.o -lm
gcc -O3 -Wall -fno-builtin -m64 -o pitimes3-64 pitimes.c fldpi-64.o -lm
Apart from testing between various compiler flags (I've compared 32-bit against 64-bit too, because the optimisations are different), I've also tried switching the order of the tests around. `The atan2(0, -1)` version still comes out top every time, though.
I'm keen to hear what results you have, as well as improvements to the testing process. :-) | 0 | [
2,
7518,
161,
20,
164,
1923,
16,
4194,
800,
3726,
3726,
6776,
5575,
19,
186,
816,
9,
13,
45,
8,
6,
31,
22,
79,
699,
26,
14,
7518,
161,
20,
5545,
14,
1923,
16,
4194,
15,
28,
21,
1319,
2404,
9,
91,
3524,
31,
22,
79,
568,
284... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Latest information on PHP upcoming releases
===
I'm trying to track the progress of PHP 5.3 and PHP 6 and I occassionally see blogs posting information but there doesn't seem to ba an authoritative source. Does anybody know where there is an official summary of possible new features? | 4 | [
2,
5736,
676,
27,
13,
26120,
9078,
7073,
800,
3726,
3726,
31,
22,
79,
749,
20,
792,
14,
3455,
16,
13,
26120,
331,
9,
240,
17,
13,
26120,
400,
17,
31,
13,
2499,
5949,
5991,
1326,
196,
8146,
18,
15669,
676,
47,
80,
1437,
22,
38,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Throw Error In MySQL Trigger
===
If I have a trigger BEFORE UPDATE on a table. How can I throw an error that prevents the update on that table? | 0 | [
2,
3814,
7019,
19,
51,
18,
22402,
7286,
800,
3726,
3726,
100,
31,
57,
21,
7286,
115,
11100,
27,
21,
859,
9,
184,
92,
31,
3814,
40,
7019,
30,
2501,
18,
14,
11100,
27,
30,
859,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How to use the C socket API in C++
===
I've been having issues getting the C sockets API to work properly in C++. Specifically, although I am including sys/socket.h, I still get compile time errors telling me that AF_INET is not defined. Am I missing something obvious, or could this be related to the fact that I'm doing this coding on z/OS and my problems are much more complicated? ;) | 0 | [
2,
184,
20,
275,
14,
272,
18482,
21,
2159,
19,
272,
20512,
800,
3726,
3726,
31,
22,
195,
74,
452,
1549,
1017,
14,
272,
18482,
18,
21,
2159,
20,
170,
7428,
19,
272,
20512,
9,
3524,
15,
419,
31,
589,
215,
10315,
18,
118,
18,
566... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 calculate relative time?
===
Given a specific DateTime value, how do I display relative time, like
- 2 hours ago
- 3 days ago
- a month ago
etcetera? | 0 | [
2,
184,
107,
31,
18469,
4543,
85,
60,
800,
3726,
3726,
504,
21,
1903,
1231,
891,
1923,
15,
184,
107,
31,
3042,
4543,
85,
15,
101,
13,
8,
172,
974,
1464,
13,
8,
203,
509,
1464,
13,
8,
21,
1617,
1464,
2722,
12382,
58,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Determining web user's time zone
===
Is there a standard way for a web server to determine what time zone offset a user is in? From an HTTP header or part of the user-agent description, perhaps? | 0 | [
2,
13521,
2741,
4155,
22,
18,
85,
2464,
800,
3726,
3726,
25,
80,
21,
1236,
161,
26,
21,
2741,
8128,
20,
3746,
98,
85,
2464,
17493,
21,
4155,
25,
19,
60,
37,
40,
7775,
157,
106,
54,
141,
16,
14,
4155,
8,
58,
7685,
5318,
15,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
What's the difference between Math.Floor() and Math.Truncate()?
===
What is the difference between Math.Floor() and Math.Truncate()? | 0 | [
2,
98,
22,
18,
14,
2841,
128,
5057,
9,
15767,
5,
6,
17,
5057,
9,
38,
3169,
9530,
5,
6,
60,
800,
3726,
3726,
98,
25,
14,
2841,
128,
5057,
9,
15767,
5,
6,
17,
5057,
9,
38,
3169,
9530,
5,
6,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How do I fill a DataSet or a DataTable from a LINQ query resultset ?
===
How do you expose a LINQ query as an ASMX web service? Usually, from the business tier, I can return a typed DataSet or DataTable which can be serialized for transport over ASMX.
How can I do the same for a LINQ query? Is there a way to populate a typed DataSet or DataTable via a LINQ query?:
public static MyDataTable CallMySproc()
{
string conn = ...;
MyDatabaseDataContext db = new MyDatabaseDataContext(conn);
MyDataTable dt = new MyDataTable();
// execute a sproc via LINQ
var query =
from dr in db.MySproc().AsEnumerable
select dr;
// copy LINQ query resultset into a DataTable -this does not work !
dt = query.CopyToDataTable();
return dt;
}
How can I get the resultset of a LINQ query into a DataSet or DataTable? Alternatively, is the LINQ query serializeable so that I can expose it as an ASMX web service? | 0 | [
2,
184,
107,
31,
3509,
21,
1054,
3554,
54,
21,
1054,
5924,
37,
21,
6294,
1251,
25597,
1736,
1198,
13,
60,
800,
3726,
3726,
184,
107,
42,
13833,
21,
6294,
1251,
25597,
28,
40,
28,
79,
396,
2741,
365,
60,
951,
15,
37,
14,
508,
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... |
Binary Data in MYSQL
===
How do I store binary data in mysql? | 0 | [
2,
14171,
1054,
19,
51,
18,
22402,
800,
3726,
3726,
184,
107,
31,
1718,
14171,
1054,
19,
51,
18,
22402,
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,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Best way to allow plugins for a PHP application
===
I am starting a new web application in PHP and I this time around I want to create something that people can extend by using a plug-in interface. I am a very confident PHP developer however I have never done this before so I'm not really sure where to start. How does one go about writing 'hooks' into their code so that plug-ins can attach to specific events?
Thanks,
Wally | 0 | [
2,
246,
161,
20,
1655,
10922,
108,
18,
26,
21,
13,
26120,
3010,
800,
3726,
3726,
31,
589,
1422,
21,
78,
2741,
3010,
19,
13,
26120,
17,
31,
48,
85,
140,
31,
259,
20,
1600,
301,
30,
148,
92,
7206,
34,
568,
21,
10922,
8,
108,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Multiple submit buttons on a form
===
Let's say you create a Wizard in an HTML form. One button goes back and one goes forward. Since the "back" button appears first in the markup, when you press Enter it will use that button to submit the form.
Ex:
<form>
<input type="text" name="field1" /> <!-- put your cursor in this field and press Enter -->
<input type="submit" name="prev" value="Previous Page" /> <!-- This is the button that will submit -->
<input type="submit" name="next" value="Next Page" /> <!-- But this is the button that I WANT to submit -->
</form>
What I would LIKE to do, is get to decide which button is used to submit the form when a user presses Enter. That way, when you press Enter the Wizard will move to the next page, not the previous. Do you have to use tabindex to do this? | 0 | [
2,
1886,
12298,
12861,
27,
21,
505,
800,
3726,
3726,
408,
22,
18,
395,
42,
1600,
21,
10276,
19,
40,
13,
15895,
505,
9,
53,
5167,
1852,
97,
17,
53,
1852,
917,
9,
179,
14,
13,
7,
1958,
7,
5167,
1780,
64,
19,
14,
943,
576,
15,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I get a distinct, ordered list of names from a DataTable using Linq
===
Lets say I have a DataTable with a Name column. I want to have a collection of the unique names ordered alphabetically. The following query ignores the order by clause.
var names = (from DataRow dr in dataTable.Rows
orderby (string)dr["Name"]
select (string)dr["Name"]).Distinct();
Why does the orderby not get enforced? | 0 | [
2,
184,
107,
31,
164,
21,
4421,
15,
1905,
968,
16,
1817,
37,
21,
1054,
5924,
568,
6294,
1251,
800,
3726,
3726,
6884,
395,
31,
57,
21,
1054,
5924,
29,
21,
204,
4698,
9,
31,
259,
20,
57,
21,
1206,
16,
14,
2619,
1817,
1905,
27169... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 page a collection with LINQ?
===
How do you page through a collection in LINQ given that you have a startIndex and a count? | 0 | [
2,
184,
107,
42,
2478,
21,
1206,
29,
6294,
1251,
60,
800,
3726,
3726,
184,
107,
42,
2478,
120,
21,
1206,
19,
6294,
1251,
504,
30,
42,
57,
21,
799,
25671,
17,
21,
2468,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How do I add existing comments to RDoc in Ruby?
===
I've got all these comments that I want to make into 'RDoc comments' so they can be formatted appropriately and viewed using 'Ri.' Can anyone get me started on understanding how to use RDoc? | 0 | [
2,
184,
107,
31,
3547,
3149,
7534,
20,
761,
13799,
19,
10811,
60,
800,
3726,
3726,
31,
22,
195,
330,
65,
158,
7534,
30,
31,
259,
20,
233,
77,
13,
22,
897,
2499,
7534,
22,
86,
59,
92,
44,
13,
29850,
4593,
102,
17,
6084,
568,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can you get Subclipse in Aptana to work with the newest release of Subversion?
===
The version of Subclipse (1.2.4) currently available through Aptana's automagic Plugins Manager does not work with the newest version of Subversion.
I see on the Subclipse website however that they have 1.4.2 out for Eclipse. So I added a new remote update site:
http://subclipse.tigris.org/update_1.4.x
to my Update manager. When I tried to install it, it told me I needed Mylyn 3.0.0. So I after much searching I found Mylyn 3.0.0 and added another new remote update site:
http://download.eclipse.org/tools/mylyn/update/e3.3
to my update manager. Then when I tried to install that, it told me I needed org.eclipse.ui 3.3.0 or equivalent.
Looking at the configuration details for Aptana, it looks like it is built against eclipse 3.2.2.
Does anyone know if there is a way to upgrade the version of Eclipse Aptana is built against to 3.3.0? Or if there is some other way to get Subclipse to work with the very newest version of Subversion?
I know this isn't necessarily a "programming" question, but I hope it's ok since it's highly relevant to the programming experience... | 0 | [
2,
184,
92,
42,
164,
972,
150,
6013,
870,
19,
8442,
9068,
20,
170,
29,
14,
17175,
830,
16,
972,
10898,
60,
800,
3726,
3726,
14,
615,
16,
972,
150,
6013,
870,
13,
5,
165,
9,
135,
9,
300,
6,
871,
904,
120,
8442,
9068,
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... |
Adobe air - SQLStatement.execute() - Multiple queries in one statement
===
I've written a database generation script in sql, and want to execute it in my Adobe air application:
Create Table tRole (
roleID integer Primary Key
,roleName varchar(40)
);
Create Table tFile (
fileID integer Primary Key
,fileName varchar(50)
,fileDescription varchar(500)
,thumbnailID integer
,fileFormatID integer
,categoryID integer
,isFavorite boolean
,dateAdded date
,globalAccessCount integer
,lastAccessTime date
,downloadComplete boolean
,isNew boolean
,isSpotlight boolean
,duration varchar(30)
);
Create Table tCategory (
categoryID integer Primary Key
,categoryName varchar(50)
,parent_categoryID integer
);
...
I execute this in Air using the following method:
public static function RunSqlFromFile(fileName:String):void {
var file:File = File.applicationDirectory.resolvePath(fileName);
var stream:FileStream = new FileStream();
stream.open(file, FileMode.READ)
var strSql:String = stream.readUTFBytes(stream.bytesAvailable);
NonQuery(strSql);
}
No errors are generated, however only tRole exists. It seems that it only looks at the first query (up to the semicolon- if I remove it, the query fails). Is there anyway to call multiple queries in one statement? | 0 | [
2,
20299,
282,
13,
8,
4444,
255,
3859,
1130,
9,
1706,
17194,
591,
5,
6,
13,
8,
1886,
9386,
2829,
19,
53,
3331,
800,
3726,
3726,
31,
22,
195,
642,
21,
6018,
2782,
3884,
19,
4444,
255,
15,
17,
259,
20,
15644,
32,
19,
51,
20299,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Flat File Databases in PHP
===
What are your best practices around creating flat file database structures in PHP? A lot of the more mature PHP flat file frameworks I see out there attempt to implement SQL-like query syntax, which is over the top for my purposes in most cases (I would just use a database at that point).
Are there any elegant tricks out there to get good performance and features with the small code overhead one would want by taking on this problem in the first place? | 0 | [
2,
1844,
3893,
6018,
18,
19,
13,
26120,
800,
3726,
3726,
98,
50,
154,
246,
5242,
140,
2936,
1844,
3893,
6018,
3815,
19,
13,
26120,
60,
21,
865,
16,
14,
91,
8615,
13,
26120,
1844,
3893,
6596,
18,
31,
196,
70,
80,
1735,
20,
8713,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 gettimeofday() guaranteed to be of microsecond resolution?
===
So I find myself porting a game that was originally written for the Win32 API to Linux (well, porting the OS X port of the Win32 port to Linux), and have implemented QueryPerformanceCounter by giving the uSeconds since the process start up:
BOOL QueryPerformanceCounter(LARGE_INTEGER* performanceCount)
{
gettimeofday(¤tTimeVal, NULL);
performanceCount->QuadPart = (currentTimeVal.tv_sec - startTimeVal.tv_sec);
performanceCount->QuadPart *= (1000 * 1000);
performanceCount->QuadPart += (currentTimeVal.tv_usec - startTimeVal.tv_usec);
return true;
}
This, coupled with QueryPerformanceFrequency() giving a constant 1000000 as the frequency works well **on my machine**, giving me a 64 bit variable that contains uSeconds since the program's start up. So _is this portable?_ I don't want to discover it works differently if the kernel was compiled in a certain way or anything like that. I am fine with it being non-portable to something other than Linux, however. | 0 | [
2,
25,
164,
891,
1041,
1185,
5,
6,
13572,
20,
44,
16,
2899,
5007,
4302,
60,
800,
3726,
3726,
86,
31,
477,
992,
1295,
68,
21,
250,
30,
23,
912,
642,
26,
14,
628,
3125,
21,
2159,
20,
13024,
13,
5,
854,
15,
1295,
68,
14,
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... |
Good branch/merge tutorials for Tortoise SVN?
===
Anyone know of any really good tutorials explaining branching and merging with Subversion? All the better if it's specific to Tortoise SVN... | 0 | [
2,
254,
1686,
118,
1263,
834,
29724,
18,
26,
25691,
13,
18,
16578,
60,
800,
3726,
3726,
1276,
143,
16,
186,
510,
254,
29724,
18,
10225,
1686,
68,
17,
18842,
29,
972,
10898,
60,
65,
14,
574,
100,
32,
22,
18,
1903,
20,
25691,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Anatomy of a "Memory Leak"
===
In .NET perspective:
- What is a [Memory Leak][1]?
- How to understand whether your application leaks? What are the effects?
- How to prevent?
- If your application has memory leak, does it go away when the process exits or killed? Or do memory leaks in your application affects other processes on the system even after process completion?
- And what about unmanaged code accessed via COM Interop and/or P/Invoke?
These are the questions that I have some answers myself but not complete. What do you think?
[1]: http://en.wikipedia.org/wiki/Memory_leak | 0 | [
2,
14994,
16,
21,
13,
7,
790,
5171,
93,
11724,
7,
800,
3726,
3726,
19,
13,
9,
2328,
6531,
45,
13,
8,
98,
25,
21,
636,
790,
5171,
93,
11724,
500,
2558,
165,
500,
60,
13,
8,
184,
20,
1369,
1472,
154,
3010,
11724,
18,
60,
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... |
Best Subversion clients for Windows Vista (64bit)
===
I've been using [TortoiseSVN ][1] in a Windows environment for quite some time. It seems very feature-complete and nicely integrated into the Windows shell, and more importantly, it's fairly painless to teach to colleagues with little or no experience with source control. **However**, since we have moved to Windows Vista 64bit, Tortoise has been very buggy and has seemed to cause lots of explorer.exe abnormalities and crashes. This has happened both with older versions of the software and the latest version (1.5.1 build 13563).
I was curious if anyone has suggestions for other Subversion clients that will run on Windows (specifically Vista 64bit). Developers here use a variety of text editors so using Visual Studio or Dreamweaver for SVN is not ideal.
I have heard great things about [Cornerstone][2], and would love something similar for Windows if it exists.
[1]: http://tortoisesvn.tigris.org/
[2]: http://www.zennaware.com/cornerstone/ | 0 | [
2,
246,
972,
10898,
7421,
26,
1936,
13520,
13,
5,
3470,
3326,
6,
800,
3726,
3726,
31,
22,
195,
74,
568,
636,
2153,
38,
16238,
18,
16578,
13,
500,
2558,
165,
500,
19,
21,
1936,
2307,
26,
1450,
109,
85,
9,
32,
2206,
253,
1580,
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... |
Decoding T-SQL CAST in C#/VB.net
===
Greetings all,
Recently our site has been deluged with the resurgence of the ASPRox bot SQL Injection attack. Without going into details, the attack attempts to execute SQL code by encoding the T-SQL commands in an ASCII encoded BINARY string. It looks something like this:
> DECLARE%20@S%20NVARCHAR(4000);SET%20@S=CAST(0x44004500...06F007200%20AS%20NVARCHAR(4000));EXEC(@S);--
I was able to decode this in SQL, but I was a little wary of doing this since I didn't know exactly what was happening at the time.
I tried to write a simple decode tool so I could decode this type of text without even touching SQL server. The main part I need decoded is:
> CAST(0x44004500...06F007200 AS
> NVARCHAR(4000))
I've tried all of the following commands with no luck:
txtDecodedText.Text = System.Web.HttpUtility.UrlDecode(txtURLText.Text);
txtDecodedText.Text = Encoding.ASCII.GetString(Encoding.ASCII.GetBytes(txtURLText.Text));
txtDecodedText.Text = Encoding.Unicode.GetString(Encoding.Unicode.GetBytes(txtURLText.Text));
txtDecodedText.Text = Encoding.ASCII.GetString(Encoding.Unicode.GetBytes(txtURLText.Text));
txtDecodedText.Text = Encoding.Unicode.GetString(Convert.FromBase64String(txtURLText.Text));
Can anybody suggest the proper way to translate this encoding without using SQL Server. Is is possible? I'll take VB.net code since I'm familiar with that too. | 0 | [
2,
121,
15458,
13,
38,
8,
18,
22402,
1325,
19,
272,
5910,
118,
20468,
9,
2328,
800,
3726,
3726,
13769,
18,
65,
15,
1989,
318,
689,
63,
74,
1506,
5127,
69,
29,
14,
27058,
16,
14,
28,
2740,
396,
11012,
4444,
255,
13646,
991,
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... |
ASP.NET Site Maps
===
Has anyone got experience creating SQL-based ASP.NET site-map providers?
I've got the default XML web.sitemap file working properly with my Menu and SiteMapPath controls. But I'll need a way for the users of my site to create and modify pages dynamically. I'll need to tie page viewing permissions into the standard ASP.NET membership system as well.
I'd like some advice on articles to read or video clips to watch. Thanks. | 0 | [
2,
28,
306,
9,
2328,
689,
6867,
800,
3726,
3726,
63,
1276,
330,
1496,
2936,
4444,
255,
8,
1281,
28,
306,
9,
2328,
689,
8,
15022,
13488,
60,
31,
22,
195,
330,
14,
12838,
23504,
2741,
9,
9097,
15022,
3893,
638,
7428,
29,
51,
11379... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CSV File to XML
===
Is there an existing application or library in Java which will allow me to take CSV data and create an XML file? The XML tags would be provided through maybe the first row containing column headings. | 0 | [
2,
272,
18,
710,
3893,
20,
23504,
800,
3726,
3726,
25,
80,
40,
3149,
3010,
54,
1248,
19,
8247,
56,
129,
1655,
55,
20,
247,
272,
18,
710,
1054,
17,
1600,
40,
23504,
3893,
60,
14,
23504,
3383,
18,
83,
44,
1173,
120,
913,
14,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How would you access Object properties from within an object method?
===
What is the "purist" or "correct" way to access an object's properties from within an object method that is not a getter/setter method?
I know that from outside of the object you should use a getter/setter, but from within would you just do:
Java:
String property = this.property;
PHP:
$property = $this->property;
or would you do:
Java:
String property = this.getProperty();
PHP:
$property = $this->getProperty();
Forgive me if my Java is a little off, it's been a year since I programmed in Java... | 4 | [
2,
184,
83,
42,
1381,
3095,
3704,
37,
363,
40,
3095,
2109,
60,
800,
3726,
3726,
98,
25,
14,
13,
7,
2051,
702,
7,
54,
13,
7,
25345,
7,
161,
20,
1381,
40,
3095,
22,
18,
3704,
37,
363,
40,
3095,
2109,
30,
25,
52,
21,
164,
815... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 export data from SQL Server to MySQL
===
I've been banging my head against SQL Server 2005 trying to get a lot of data out. I've been given a database with newarly 300 tables in it and I need to turn this into a MySQL database. My first call was to use bcp but unfortunately it doesn't produce valid CSV - strings aren't encapsulated so you can't deal with any row that has a string with a comma in it (or whatever you use as a delimiter) and I would still have to hand write all of the create table statements as obviously CSV doesn't tell you anything about the data types.
What would be better is if there was some tool that could connect to both SQL Server and MySQL and then do a copy. You lose views, stored procedures, trigger, etc. but it isn't hard to copy a table that only uses base types from one DB to another... is it?
Does anybody know of such a tool? I don't mind how many assumptions it makes or what simplifications occur, as long as it supports integer, float, datetime and string. I have to do a lot of pruning, normalising, etc. anyway so I don't care about keeping keys, relationships or anything like that but I need the initial set of data in fast! | 2 | [
2,
184,
20,
7487,
1054,
37,
4444,
255,
8128,
20,
51,
18,
22402,
800,
3726,
3726,
31,
22,
195,
74,
24472,
51,
157,
149,
4444,
255,
8128,
812,
749,
20,
164,
21,
865,
16,
1054,
70,
9,
31,
22,
195,
74,
504,
21,
6018,
29,
78,
512... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
XSD DataSets and ignoring foreign keys
===
I have and pretty standard table setup in a current application using the .net XSD DataSet and TableAdapter features. My contracts table consists of some standard contract information, with a column for the primary department. This column is a foreign key to my Departments table, where I store the basic department name, id, notes. This is all setup and functioning in my SQL Server.
When I use the XSD tool, I can drag both tables in at once and it auto detects/creates the foreign key I have between these two tables. This works great when I'm on my main page and am viewing contract data.
However, when I go to my administrative page to modify the department data. I typically do something like this:
Dim dtDepartment As New DepartmentDataTable()
Dim taDepartment As New DepartmentTableAdapter()
taDepartment.Fill(dtDepartment)
However, at this point an exception is thrown saying to the effect that there is a foreign key reference broken here, I'm guessing since I don't have the Contract DataTable filled.
Has anybody encountered this before? I know I can simply remove the foreign key from the XSD to make things work fine, but having the additional integrity check there and having the XSD schema match the SQL schema in the database is nice. | 0 | [
2,
993,
18,
43,
1054,
3554,
18,
17,
9321,
1228,
5534,
800,
3726,
3726,
31,
57,
17,
1772,
1236,
859,
18161,
19,
21,
866,
3010,
568,
14,
13,
9,
2328,
993,
18,
43,
1054,
3554,
17,
859,
27576,
106,
967,
9,
51,
8712,
859,
2043,
16,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Compressing / Decompressing Folders & Files in C#?
===
Anyone know of a good way to do this in C# quickly? Handling large files might be necessary. Thanks in advance? :) | 0 | [
2,
26060,
68,
13,
118,
121,
960,
5890,
68,
19294,
18,
279,
6488,
19,
272,
5910,
60,
800,
3726,
3726,
1276,
143,
16,
21,
254,
161,
20,
107,
48,
19,
272,
5910,
976,
60,
7988,
370,
6488,
530,
44,
2378,
9,
3669,
19,
3612,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do I track file downloads with apache/PHP
===
I have a website that plays mp3's in a flash player. If a user clicks 'play' the flash player automatically downloads an mp3 and starts playing it.
Is there an easy way to track how many times a particular song clip (or any binary file) is downloaded? | 0 | [
2,
184,
107,
31,
792,
3893,
7121,
18,
29,
17140,
118,
26120,
800,
3726,
3726,
31,
57,
21,
2271,
30,
1533,
4628,
240,
22,
18,
19,
21,
4433,
517,
9,
100,
21,
4155,
10840,
18,
13,
22,
5438,
22,
14,
4433,
517,
7499,
7121,
18,
40,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 sync the SVN revision number with my ASP.NET web site?
===
stackoverflow.com has a version number at the bottom: "svn revision: 679"
I want to use such automatic versioning with my .NET web, win forms, wpf projects/solutions. | 0 | [
2,
184,
107,
31,
6063,
150,
14,
13,
18,
16578,
11323,
234,
29,
51,
28,
306,
9,
2328,
2741,
689,
60,
800,
3726,
3726,
7566,
2549,
9990,
9,
960,
63,
21,
615,
234,
35,
14,
2129,
45,
13,
7,
18,
16578,
11323,
45,
400,
3399,
7,
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... |
Embedding Windows Media Player for all Browsers
===
we are using WMV Videos on an internal sites, and we are embedding them into web sites. Now, this works quite good on Internet Explorer, but not on Firefox. I've found ways to make it work in Firefox, but then it stops working in Internet Explorer.
We do not want to use Silverlight just yet, especially we can be sure that all clients will be Windows XP with installed Windows Media Player. I just wonder: Is there some sort of Universal Code that embeds WMP into both IE and Firefox, or do we need to implement some user-agent-detection and deliver different HTML for different Browsers? | 0 | [
2,
11911,
69,
3258,
1936,
941,
517,
26,
65,
16495,
18,
800,
3726,
3726,
95,
50,
568,
19312,
710,
6610,
27,
40,
3117,
3259,
15,
17,
95,
50,
11911,
69,
3258,
105,
77,
2741,
3259,
9,
130,
15,
48,
693,
1450,
254,
27,
2620,
8520,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I version my MS SQL database in SVN?
===
I've been wanting to get my databases under version control. Does anyone have any advice or recommended articles to get me started? | 4 | [
2,
184,
107,
31,
615,
51,
4235,
4444,
255,
6018,
19,
13,
18,
16578,
60,
800,
3726,
3726,
31,
22,
195,
74,
4638,
20,
164,
51,
6018,
18,
131,
615,
569,
9,
630,
1276,
57,
186,
4978,
54,
5773,
3376,
20,
164,
55,
373,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Printing HTML
===
I want to print HTML from a C# web service. The Web Browser control is overkill, and does not function well in a service-environment, nor does it function well on a system with very tight security constraints. Is there any sort of free .NET library that will support the printing of a basic HTMl page? Here is the code I have so far, that is not running properly.
public void PrintThing(string document)
{
if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA)
{
Thread thread = new Thread((ThreadStart) delegate { PrintDocument(document); });
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
}
else
{
PrintDocument(document);
}
}
protected void PrintDocument(string document)
{
WebBrowser browser = new WebBrowser();
browser.DocumentText = document;
while (browser.ReadyState != WebBrowserReadyState.Complete)
{
Application.DoEvents();
}
browser.Print();
}
This works fine when called from UI-type threads, but nothing happens when called from a service-type thread. Changing Print() to ShowPrintPreviewDialog() yields the following IE script error:
Error: 'dialogArguments.___IE_PrintType' is null or not an object
URL: res://ieframe.dll/preview.dlg
And a small empty print preview dialog appears. | 0 | [
2,
7312,
13,
15895,
800,
3726,
3726,
31,
259,
20,
4793,
13,
15895,
37,
21,
272,
5910,
2741,
365,
9,
14,
2741,
16495,
569,
25,
84,
7577,
15,
17,
630,
52,
1990,
134,
19,
21,
365,
8,
28976,
15,
2127,
630,
32,
1990,
134,
27,
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... |
Annotating YouTube videos programatically
===
I want to be able to display a normal youtube video with overlaid annotations. This consists of colored rectangles for each frame. The only requirement is that this be done programatically. Youtube has annotations now, but require you use their front end to create them by hand. I want to be able to generate them. What's the best way of doing this?
Some ideas:
1. Build your own flash player (ew?)
2. Somehow draw over the youtube flash player. Will this work?
3. Reverse engineer & hijack youtube's annotation system. Either messing with the local files or redirecting it's attempt to download the annotations. (using greasemonkey? Firefox plugin?)
Ideas that don't count: download the video, edit it, re-encode it, and upload it :P | 0 | [
2,
40,
1270,
1880,
7330,
6610,
625,
721,
8438,
800,
3726,
3726,
31,
259,
20,
44,
777,
20,
3042,
21,
1826,
7330,
763,
29,
84,
20134,
40,
1270,
7504,
9,
48,
2043,
16,
10133,
27181,
18,
26,
206,
3523,
9,
14,
104,
8981,
25,
30,
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... |
Apache/PHP: error_log per Virtual Host?
===
On one Linux Server running Apache and PHP 5, we got multiple Virtual Hosts with separate logfiles and everything. The only thing we cannot seem to separate between virtual hosts is the php error_log. Overriding this setting in the <Location> of the httpd.conf does not seem to do anything.
Did I overlook something? Is there a way to have separate php error_logs for each Virtual Host? | 0 | [
2,
17140,
118,
26120,
45,
7019,
1,
5567,
416,
6599,
2015,
60,
800,
3726,
3726,
27,
53,
13024,
8128,
946,
17140,
17,
13,
26120,
331,
15,
95,
330,
1886,
6599,
5397,
29,
1725,
6738,
16877,
18,
17,
796,
9,
14,
104,
584,
95,
1967,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I programmatically create a PDF in my .NET application?
===
Please recommend a good library for programmatically creating PDF documents in .NET applications. Thanks. | 4 | [
2,
184,
107,
31,
625,
6732,
1326,
1600,
21,
13,
11124,
19,
51,
13,
9,
2328,
3010,
60,
800,
3726,
3726,
2247,
12360,
21,
254,
1248,
26,
625,
6732,
1326,
2936,
13,
11124,
4374,
19,
13,
9,
2328,
3767,
9,
3669,
9,
3,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Function for creating color wheels
===
This is something I've pseudo-solved many times and never quite found a solution that's stuck with me. The problem is to come up with a way to generate N colors that are as distinguishable as possible where N is a parameter. | 0 | [
2,
1990,
26,
2936,
1665,
7384,
800,
3726,
3726,
48,
25,
301,
31,
22,
195,
8452,
8,
5594,
4763,
151,
436,
17,
243,
1450,
216,
21,
4295,
30,
22,
18,
4549,
29,
55,
9,
14,
1448,
25,
20,
340,
71,
29,
21,
161,
20,
7920,
13,
103,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Floating Point Number parsing: Is there a Catch All algorithm?
===
One of the fun parts of multi-cultural programming are numbers formats.
Americans use 10,000.50, Germans use 10.000,50, French use 10 000,50 etc.
My first approach would be: Take the string, parse it backwards, until I encounter a separator and use this as my decimal separator. The obvious flaw with that: 10.000 would be interpreted as 10.
Another approach: if the string contains 2 different non-numeric characters, use the last one as the decimal separator and discard the others. If I only have one, check if it occurs more than once and discard it if it does. It it only appears once, check if it has 3 digits after it. If yes, discard it, otherwise use it as decimal separator.
The obvious "best solution" would be to detect the User's culture or Browser, but that does not work if you have a Frenchman an an en-US Windows/Browser.
I just wonder: does the .net Framework contain some mythical black magic floating point parser that is better than Double.(Try)Parse() in trying to auto-detect the number format? | 0 | [
2,
8319,
454,
234,
2017,
18,
68,
45,
25,
80,
21,
2949,
65,
9083,
60,
800,
3726,
3726,
53,
16,
14,
2414,
1341,
16,
1889,
8,
12687,
3143,
50,
2116,
13767,
9,
4878,
275,
6693,
9,
2290,
15,
7688,
275,
332,
9,
3993,
15,
2290,
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... |
Upgrading SQL Server 6.5
===
Yes, I know. The existence of a running copy of SQL Server 6.5 in 2008 is absurd.
That stipulated, what is the best way to migrate from 6.5 to 2005? Is there any direct path? Most of the documentation I've found deals with upgrading 6.5 to 7.
Should I forget about the native SQL Server upgrade utilities, script out all of the objects and data, and try to recreate from scratch?
I'm going to attempt the upgrade this weekend. Any advice would be welcomed. | 0 | [
2,
26939,
4444,
255,
8128,
400,
9,
264,
800,
3726,
3726,
1643,
15,
31,
143,
9,
14,
3012,
16,
21,
946,
4344,
16,
4444,
255,
8128,
400,
9,
264,
19,
570,
25,
15982,
9,
30,
26779,
15,
98,
25,
14,
246,
161,
20,
22985,
37,
400,
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 way to generat a tag cloud from an array? using h1 through h6 for sizing
===
Lets say i have an array like such
$artist = array("the roots","michael jackson","billy idol","more","and more","and_YET_MORE");
$count = array(5,3,9,1,1,3);
and i want to generate a tag clound that will have artist with a higher number in count be a H6 tag and the lowest being H1?
any ideas? | 0 | [
2,
246,
161,
20,
11011,
38,
21,
3383,
4005,
37,
40,
7718,
60,
568,
746,
165,
120,
746,
379,
26,
13,
18,
3335,
800,
3726,
3726,
6884,
395,
31,
57,
40,
7718,
101,
145,
5579,
22175,
800,
7718,
5,
7,
124,
5163,
7,
15,
7,
16590,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Register Windows program with the mailto protocol programmatically
===
How do I make it so mailto: links will be registered with my program?
And then how would I handle that event in my program?
I'm using Delphi 7 (Win32 program), but you can assume I'm using C/C++ if it makes it easier to answer. Just a non-.NET answer.
Most of the solutions I found from a quick Google search are how to do this manually, but I need to do this automatically for users of my program if they click a button such as "set as default email client". | 0 | [
2,
2243,
1936,
625,
29,
14,
4216,
262,
8494,
625,
6732,
1326,
800,
3726,
3726,
184,
107,
31,
233,
32,
86,
4216,
262,
45,
6271,
129,
44,
3801,
29,
51,
625,
60,
17,
94,
184,
83,
31,
3053,
30,
807,
19,
51,
625,
60,
31,
22,
79,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
End of preview. Expand in Data Studio
- Downloads last month
- 8