unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Is there a SQL server performance counter for average execution time?
===
This seems like an obvious performance counter, but for the last half hour I've been searching Google and the counter list in perfmon, and I have not been able to find a performance counter for SQL server to give me the average execution time for all queries hitting a server.
Does one exist that I'm missing? Is there another effective way of monitoring the average query times for a server? | 0 | [
2,
25,
80,
21,
4444,
255,
8128,
956,
2105,
26,
862,
5769,
85,
60,
800,
3726,
3726,
48,
2206,
101,
40,
4674,
956,
2105,
15,
47,
26,
14,
236,
519,
1671,
31,
22,
195,
74,
5792,
8144,
17,
14,
2105,
968,
19,
416,
410,
2111,
15,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Flex graphic assets: SWF or SWC?
===
Which is a better format to store graphic assets for a Flex application, SWF or SWC?
Are there any real differences, and if so what are they? | 0 | [
2,
14409,
8479,
6223,
45,
13,
18,
15263,
54,
13,
18,
12354,
60,
800,
3726,
3726,
56,
25,
21,
574,
2595,
20,
1718,
8479,
6223,
26,
21,
14409,
3010,
15,
13,
18,
15263,
54,
13,
18,
12354,
60,
50,
80,
186,
683,
4921,
15,
17,
100,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Choosing a pivot for Quicksort?
===
When implmenting Quicksort one of the thing you have to do is choose a pivot. But when I look at pseudocode like the one below. It is not clear how is should choose the pivot. First element of list? Something else?
function quicksort(array)
var list less, greater
if length(array) ≤ 1
return array
select and remove a pivot value pivot from array
for each x in array
if x ≤ pivot then append x to less
else append x to greater
return concatenate(quicksort(less), pivot, quicksort(greater))
Can someone help me grasp the concept of choosing a pivot and whether or not different senarios call for different strategies.
Thanks | 0 | [
2,
10883,
21,
20670,
26,
2231,
22843,
60,
800,
3726,
3726,
76,
5420,
255,
1130,
68,
2231,
22843,
53,
16,
14,
584,
42,
57,
20,
107,
25,
3538,
21,
20670,
9,
47,
76,
31,
361,
35,
8452,
9375,
101,
14,
53,
1021,
9,
32,
25,
52,
12... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Very poor (non-completing) performance of UNION in SQL Server 2005
===
Warning: this is the actual code generated from my system:
;WITH RESULTS AS (
SELECT 1174 AS BatchRunID, 'STATINV' AS Program, m.APPL_CD, m.ALBASE, 'CountFocusRecords' AS Measure, COUNT(*) AS Value
FROM [MISWork].[SX_FOCUS_NATIVE_200806] AS m WITH(NOLOCK)
INNER JOIN MISProcess.SXProcessCatalog AS cat WITH(NOLOCK)
ON cat.APPL_CD = m.APPL_CD
AND cat.ALBASE = m.ALBASE
AND COALESCE(cat.ProcessName, 'STATINV') = 'STATINV'
GROUP BY m.APPL_CD, m.ALBASE
UNION
SELECT 1174 AS BatchRunID, 'STATINV' AS Program, c.APPL_CD, c.ALBASE, 'CountBiminiRecords' AS Measure, COUNT(*) AS Value
FROM [MISWork].[SX_STATINV] AS c WITH(NOLOCK)
INNER JOIN MISProcess.SXProcessCatalog AS cat WITH(NOLOCK)
ON cat.APPL_CD = c.APPL_CD
AND cat.ALBASE = c.ALBASE
AND COALESCE(cat.ProcessName, 'STATINV') = 'STATINV'
GROUP BY c.APPL_CD, c.ALBASE
UNION
SELECT 1174 AS BatchRunID, 'STATINV' AS Program, m.APPL_CD, m.ALBASE, 'RecordsInFocusMissingInBimini' AS Measure, COUNT(*) AS Value
FROM [MISWork].[SX_FOCUS_NATIVE_200806] AS m WITH(NOLOCK)
LEFT JOIN [MISWork].[SX_STATINV] AS c WITH(NOLOCK)
ON m.[YEAR] = c.[YEAR]
AND m.[MONTH] = c.[MONTH]
AND m.[BANK_NO] = c.[BANK_NO]
AND m.[COST_CENTER] = c.[COST_CENTER]
AND m.[GLACCOUNT_NO] = c.[GLACCOUNT_NO]
AND m.[CUSTACCOUNT] = c.[CUSTACCOUNT]
AND m.[APPL_CD] = c.[APPL_CD]
AND m.[ALBASE] = c.[ALBASE]
INNER JOIN MISProcess.SXProcessCatalog AS cat WITH(NOLOCK)
ON cat.APPL_CD = m.APPL_CD
AND cat.ALBASE = m.ALBASE
AND COALESCE(cat.ProcessName, 'STATINV') = 'STATINV'
WHERE c.[YEAR] IS NULL
GROUP BY m.APPL_CD, m.ALBASE
UNION
SELECT 1174 AS BatchRunID, 'STATINV' AS Program, c.APPL_CD, c.ALBASE, 'RecordsInBiminiMissingInFocus' AS Measure, COUNT(*) AS Value
FROM [MISWork].[SX_FOCUS_NATIVE_200806] AS m WITH(NOLOCK)
RIGHT JOIN [MISWork].[SX_STATINV] AS c WITH(NOLOCK)
ON m.[YEAR] = c.[YEAR]
AND m.[MONTH] = c.[MONTH]
AND m.[BANK_NO] = c.[BANK_NO]
AND m.[COST_CENTER] = c.[COST_CENTER]
AND m.[GLACCOUNT_NO] = c.[GLACCOUNT_NO]
AND m.[CUSTACCOUNT] = c.[CUSTACCOUNT]
AND m.[APPL_CD] = c.[APPL_CD]
AND m.[ALBASE] = c.[ALBASE]
INNER JOIN MISProcess.SXProcessCatalog AS cat WITH(NOLOCK)
ON cat.APPL_CD = c.APPL_CD
AND cat.ALBASE = c.ALBASE
AND COALESCE(cat.ProcessName, 'STATINV') = 'STATINV'
WHERE m.[YEAR] IS NULL
GROUP BY c.APPL_CD, c.ALBASE
) SELECT * FROM RESULTS ORDER BY Program, APPL_CD, ALBASE, Measure
The code just sits there, no locking or blocking.
The individual components of the UNION return in a few seconds each. The code works in general for checking the output results of all the other programs in the STAT group, but just halts for this one.
Remove the CTE, no effect, sits there for 30 minutes/an hour, however long you care to wait before cancelling.
Remove the UNION, and the 4 result sets return in 11 seconds, total of 19 records accross all 4 result sets.
Run just the first two together - works fine, run just the last 2 together, also fine. First 3 together, fine, too.
I've already modified the code to output these to a #temp table, for other requirements, so I'm just going to change it to output each to the #temp table in sequence, but I have never seen SQL just stop like that with no evidence of blocking or anything. | 0 | [
2,
253,
1696,
13,
5,
3951,
8,
11103,
1336,
68,
6,
956,
16,
667,
19,
4444,
255,
8128,
812,
800,
3726,
3726,
3590,
45,
48,
25,
14,
3463,
1797,
6756,
37,
51,
329,
45,
13,
73,
1410,
1736,
28,
13,
5,
5407,
547,
3828,
28,
13064,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you construct a std::string with an embedded null?
===
If I want to construct a std::string with a line like:
std::string my_string("a\0b");
Where i want to have three characters in the resulting string (a, null, b), I only get one. What is the proper syntax? | 0 | [
2,
184,
107,
42,
6960,
21,
354,
43,
45,
45,
11130,
29,
40,
12138,
16203,
60,
800,
3726,
3726,
100,
31,
259,
20,
6960,
21,
354,
43,
45,
45,
11130,
29,
21,
293,
101,
45,
354,
43,
45,
45,
11130,
51,
1,
11130,
5,
7,
58,
1,
387... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 QA test from a strictly black-box perspective?
===
Assuming that unit tests are handled by development, is there any reason for QA to have knowledge of the details of how a product works? By which I mean, do they need to know what's going on in the background and should they test segments of a product without using the normal UI? For example, would it make sense for a tester to go into a database and manually change values to see what will happen? | 0 | [
2,
378,
7234,
1289,
37,
21,
10369,
319,
8,
5309,
6531,
60,
800,
3726,
3726,
11704,
30,
1237,
4894,
50,
9006,
34,
522,
15,
25,
80,
186,
1215,
26,
7234,
20,
57,
1918,
16,
14,
3289,
16,
184,
21,
2374,
693,
60,
34,
56,
31,
884,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Informix SQL Syntax - Nest Count, Sum, Round
===
Let me apologize in advance for the simplicity of this question (I heard Jeff's podcast and his concern that the quality of the questions will be "dumbed down"), but I'm stuck. I'm using AquaData to hit my Informix DB. There are quirky little nuances between MS SQL and Informix SQL. Anyway, I'm trying to do a simple nested expression and it hates me.
select
score,
count(*) students,
count(finished) finished,
count(finished) / count(*)students
-- round((count(finished) / count(*)students),2)
from now_calc
group by score
order by score
The line with the simple division expression returns the percentage of people who finished, which exactly what I want...I just need the result rounded to 2 places. The commented line (--) does not work. I've tried every variation I can possibly think of.
*I'm NOT trying to use lines 5 & 6 at the same time | 0 | [
2,
10361,
4028,
4444,
255,
22649,
13,
8,
5618,
2468,
15,
3907,
15,
560,
800,
3726,
3726,
408,
55,
12059,
19,
3612,
26,
14,
20595,
16,
48,
1301,
13,
5,
49,
752,
3292,
22,
18,
15124,
17,
33,
3630,
30,
14,
2190,
16,
14,
2346,
129... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Opinions regarding 'Case Complete' or competitors
===
Have you had any good/bad experiences with [Case Complete][1]? Are there other products like it that you would recommend?
Thank you
[1]: http://www.casecomplete.com/ | 0 | [
2,
11900,
3467,
13,
22,
10325,
1279,
22,
54,
10558,
800,
3726,
3726,
57,
42,
41,
186,
254,
118,
5989,
5513,
29,
636,
10325,
1279,
500,
2558,
165,
500,
60,
50,
80,
89,
1985,
101,
32,
30,
42,
83,
12360,
60,
3531,
42,
636,
165,
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,
0,
0,
0,
0,
0,
0,
0... |
What is considered a good response time for a dynamic, personalized web application?
===
For a complex web application that includes dynamic content and personalization, what is a good response time from the server (so excluding network latency and browser rendering time)? I'm thinking about sites like Facebook, Amazon, MyYahoo, etc. A related question is what is a good response time for a backend service? | 0 | [
2,
98,
25,
724,
21,
254,
1627,
85,
26,
21,
7782,
15,
1319,
1333,
2741,
3010,
60,
800,
3726,
3726,
26,
21,
1502,
2741,
3010,
30,
1103,
7782,
2331,
17,
1319,
1829,
15,
98,
25,
21,
254,
1627,
85,
37,
14,
8128,
13,
5,
656,
13,
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... |
javascript: how to fetch a remote image to display in a canvas?
===
How can I fetch images from a server?
I've got this bit of code which allows me to draw some images on a canvas.
<html>
<head>
<script type="text/javascript">
function draw(){
var canvas = document.getElementById('canv');
var ctx = canvas.getContext('2d');
for (i=0;i<document.images.length;i++){
ctx.drawImage(document.images[i],i*150,i*130);
}
}
</script>
</head>
<body onload="draw();">
<canvas id="canv" width="1024" height="1024"></canvas>
<img src="http://www.google.com/intl/en_ALL/images/logo.gif">
<img src="http://l.yimg.com/a/i/ww/beta/y3.gif">
<img src="http://static.ak.fbcdn.net/images/welcome/welcome_page_map.png">
</body>
</html>
Instead of looping over document.images, i would like to continually fetch images from a server.
for (;;) {
/* how to fetch myimage??? */
myimage = fetch???('http://myserver/nextimage.cgi');
ctx.drawImage(myimage, x, y);
} | 0 | [
2,
8247,
8741,
45,
184,
20,
18312,
21,
5388,
1961,
20,
3042,
19,
21,
9696,
60,
800,
3726,
3726,
184,
92,
31,
18312,
3502,
37,
21,
8128,
60,
31,
22,
195,
330,
48,
1142,
16,
1797,
56,
2965,
55,
20,
2003,
109,
3502,
27,
21,
9696,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 tools/diagrams do you use for modelling multithreaded systems?
===
I'm sitting there every time I model my systems, thinking, there must be a better way to model concurrency than using UML activity diagrams.
Please share your thoughts. What's your favourite tool or format for modelling and getting a clear understanding of how to build a concurrent system?
/Robert | 0 | [
2,
98,
4672,
118,
4286,
6295,
18,
107,
42,
275,
26,
23089,
1889,
96,
10647,
69,
1242,
60,
800,
3726,
3726,
31,
22,
79,
1805,
80,
352,
85,
31,
1061,
51,
1242,
15,
1440,
15,
80,
491,
44,
21,
574,
161,
20,
1061,
25547,
119,
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 to get Single XElement object using Linq to Xml ?
===
I would like to use Linq to Xml to get a single XElement from a .xml file by attribute name, similar to how you retrieve single objects in Linq to Sql by Id below:
var singleDog = context.Dogs.Single(p => p.Id == int.Parse(Id));
Is this possible? | 0 | [
2,
184,
20,
164,
345,
993,
27567,
3095,
568,
6294,
1251,
20,
23504,
13,
60,
800,
3726,
3726,
31,
83,
101,
20,
275,
6294,
1251,
20,
23504,
20,
164,
21,
345,
993,
27567,
37,
21,
13,
9,
396,
8184,
3893,
34,
35,
14755,
204,
15,
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... |
Why does simple C code receive segmentation fault?
===
The following code receives seg fault on line 2:
char *str = "string";
str[0] = 'z';
printf("%s", str);
While this works perfectly well:
char str[] = "string";
str[0] = 'z';
printf("%s", str);
Tested with MSVC and GCC. | 0 | [
2,
483,
630,
1935,
272,
1797,
2588,
5631,
857,
4173,
60,
800,
3726,
3726,
14,
249,
1797,
8359,
13,
18,
5431,
4173,
27,
293,
4274,
4892,
1637,
9729,
800,
13,
7,
11130,
7,
73,
13,
9729,
2558,
387,
500,
800,
13,
22,
380,
22,
73,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Labels from ASP.Net Page
===
I am working on an ASP.Net web application that must print dynamically created labels on standard Avery-style label sheets (one particular size, so only one overall layout). The labels have a variable number of lines (3-6) and may contain either lines of text or a graphic barcode image.
Our first cut, that I inherited, used monospaced fonts to reduce the formatting issues, but that did not allow enough text to the fit on the labels and the customer was dissatisfied. Basically it was formatted text.
My next version used TABLESs, DIVs, CSS, and a bit of JavaScript calculations to format the labels using proportional fonts. It still required a bit of tweaking (the user had to set their print margins correctly and turn off the print headers and footers), but it seemed to work.
However, it seems that there are some variations on how different printers render the text (WYS ain't WYG), so even though we tested on different browsers using at least two different printers (an inkjet and a laser printer), some user's labels don't line up. Slight margin variations can be adjusted by adjusting the margins on the page setup dialog, but the harder problem is that the inter-label spacing can be off by a tiny fraction of an inch, so that if the first label is pretty well centered, by the end of the page the label text and images have crawled off the top or bottom of the labels.
We are about to the point of switching to generating Word, Excel, or PDF output which is going to take quite a bit of development time and possible add extra steps in the printing process.
So, does anyone have any suggestions on how to do an HTML/CSS layout that will precisely render on different types of printers? I don't really care if the line/word breaks are a bit different, but I need to be able to predictably position the upper left corners of each label area.
Right now the labels flow down the page in a table and we have been tweaking the box model of the cells and internal DIVs to make them a uniform height. I suspect that using absolute positioning of each element may be the best answer, but that is going to be tricky as well due to the ASP.Net generation of the label elements. If I knew for sure that would work, I would rather try it than throw away everything we have to go to a different generation method. | 0 | [
2,
7312,
13173,
37,
28,
306,
9,
2328,
2478,
800,
3726,
3726,
31,
589,
638,
27,
40,
28,
306,
9,
2328,
2741,
3010,
30,
491,
4793,
7782,
1326,
679,
13173,
27,
1236,
13587,
8,
4381,
1899,
8801,
13,
5,
849,
1498,
1072,
15,
86,
104,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 add a EULA to a VS2008 setup project?
===
This is a very simple question with a simple answer, but it is not quite so simple to find the answer on the internet.
I have a simple Setup (deployment) project in Visual Studio 2008, and I have the EULA text. What do I need to do in the project to get the EULA into the install wizard? | 0 | [
2,
184,
107,
31,
3547,
21,
2898,
531,
20,
21,
4611,
2753,
18161,
669,
60,
800,
3726,
3726,
48,
25,
21,
253,
1935,
1301,
29,
21,
1935,
1623,
15,
47,
32,
25,
52,
1450,
86,
1935,
20,
477,
14,
1623,
27,
14,
2620,
9,
31,
57,
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... |
Protecting Section in App.config file Console Application
===
I am trying to encrypt the appSettings and connectionStrings section in App.config file of the console application. For some reason section.SectionInformation.IsProtected is always returning true.
static void Main(string[] args)
{
EncryptSection("connectionStrings", "DataProtectionConfigurationProvider");
}
private static void EncryptSection(string sectionName, string providerName)
{
string assemblyPath = Assembly.GetExecutingAssembly().Location;
Configuration config = ConfigurationManager.OpenExeConfiguration(assemblyPath);
ConfigurationSection section = config.GetSection(sectionName);
if (section != null && !section.SectionInformation.IsProtected)
{
section.SectionInformation.ProtectSection(providerName);
config.Save();
}
}
Not sure why it is always returning true. | 0 | [
2,
8718,
1050,
19,
4865,
9,
14093,
2816,
3893,
8650,
3010,
800,
3726,
3726,
31,
589,
749,
20,
1957,
11435,
14,
4865,
19831,
18,
17,
2760,
11130,
18,
1050,
19,
4865,
9,
14093,
2816,
3893,
16,
14,
8650,
3010,
9,
26,
109,
1215,
1050,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Writing a Scheduled Windows Service in .NET
===
I want to write a windows service which the user can schedule. i.e, the user can choose to run the service from 9:00 AM to 6 PM daily, or he could run it every night, starting from night 12 o clock at night to next day morning 6, etc. Is there any out of the box .NET API that will help me do this? I know I can do this using the Scheduled tasks, but is there any way to do this programmatically? | 0 | [
2,
1174,
21,
3758,
1936,
365,
19,
13,
9,
2328,
800,
3726,
3726,
31,
259,
20,
2757,
21,
1936,
365,
56,
14,
4155,
92,
4345,
9,
31,
9,
62,
15,
14,
4155,
92,
3538,
20,
485,
14,
365,
37,
27854,
589,
20,
400,
6736,
1954,
15,
54,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I avoid page breaks inside tables and groups in BIRT ?
===
When creating reports using BIRT 2.3.1, I don't want page breaks inside tables or groups; if the table doesn't fit in the space available at the page, I want to put the entire element in the next page.
Using previous versions of BIRT it was possible to set pageBreakInside to "avoid", but it didn't work. In BIRT 2.3.1 this (useless) option was removed, since it wasn't implemented correctly. | 0 | [
2,
184,
107,
31,
2658,
2478,
7947,
572,
7484,
17,
1170,
19,
8719,
38,
13,
60,
800,
3726,
3726,
76,
2936,
2813,
568,
8719,
38,
172,
9,
240,
9,
165,
15,
31,
221,
22,
38,
259,
2478,
7947,
572,
7484,
54,
1170,
73,
100,
14,
859,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you specify a message label when using WCF and NetMsmqBinding?
===
I would like to set the MSMQ message label using the NetMsmqBinding. I understand [it’s easy when using the MsmqIntegrationBinding][1], but I would like to continue to use the NetMsmqBinding, if possible...
[1]: http://blogs.msdn.com/skaufman/archive/2007/12/17/msmq-label-property-and-wcf.aspx | 0 | [
2,
184,
107,
42,
19077,
21,
2802,
1899,
76,
568,
11801,
410,
17,
4275,
79,
18,
79,
1251,
22260,
60,
800,
3726,
3726,
31,
83,
101,
20,
309,
14,
4235,
79,
1251,
2802,
1899,
568,
14,
4275,
79,
18,
79,
1251,
22260,
9,
31,
1369,
63... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 upgrade PowerBuilder code?
===
I have code from PowerBuilder 5 that can't be built. The compiler just stops before it is done without any error codes.
I would like to upgrade the code to the recent version of PowerBuilder but there are some intermediate versions of PowerBuilder that have binary dependencies to an old Microsoft java dll that Microsoft no longer can distribute due to some court case.
So, is there a way to get my code running in a newer environment?
/johan/ | 0 | [
2,
184,
20,
9483,
414,
20904,
1797,
60,
800,
3726,
3726,
31,
57,
1797,
37,
414,
20904,
331,
30,
92,
22,
38,
44,
392,
9,
14,
21486,
114,
6604,
115,
32,
25,
677,
366,
186,
7019,
11358,
9,
31,
83,
101,
20,
9483,
14,
1797,
20,
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... |
Windows hangs during headless build
===
We are trying to automate a build of one of our products which includes a step where it packages some things with WISE. At one point WISE pops up a window with a progress bar on it to show how it is doing. If one is connected to the machine with remote desktop the build works fine but if one is not connected the build stalls until you reconnect at which point the window opens and the build progresses. Does anybody know of a work around for this? Some way of tricking windows into believing that there is a desktop session connected? | 0 | [
2,
1936,
4546,
18,
112,
157,
923,
1895,
800,
3726,
3726,
95,
50,
749,
20,
3108,
5281,
21,
1895,
16,
53,
16,
318,
1985,
56,
1103,
21,
1424,
113,
32,
16875,
109,
564,
29,
6714,
9,
35,
53,
454,
6714,
1675,
18,
71,
21,
1463,
29,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C++ types using CodeSynthesis XSD Tree Mapping
===
I'm using CodeSynthesis XSD C++/Tree Mapping utility to convert an existing xsd into c++ code we can populate the values in. This was we always make sure we follow the schema.
After doing the conversion, I'm trying to get it to work so I can test it. Problem is, I'm not used to doing this in c++ and it's my first time with this tool.
I start with a class called ABSTRACTNETWORKMODEL with types `versno_type` and `fromtime_type`
typedef'd inside. Here is the constructor I am trying to use as well as the typedefs
ABSTRACTNETWORKMODEL(const versno_type&, const fromtime_type&);
typedef ::xml_schema::double_ versno_type;
typedef ::xml_schema::time fromtime_type;
all these are in the ABSTRACTNETWORKMODEL class and the definitions for double_ and time are:
typedef ::xsd::cxx::tree::time<char, simple_type> time;
typedef double double_;
where the definition for time is a class with multiple constructors:
template<typename C, typename B>
class time: public B, public time_zone
{
public:
time(unsigned short hours, unsigned short minutes, double seconds);
...
}
I know I'm not correctly creating a new ABSTRACTNETWORKMODEL but I don't know what I need to do this. Here is all I'm trying to do at this point:
::xml_schema::time t();
ABSTRACTNETWORKMODEL anm(1234, t);
This, of course, throws an error about converting the second parameter, but can somebody tell me what it is that is incorrect? Or at least point me down the right path, as one of the things I'm trying to do right now is learn more c++.
| 0 | [
2,
272,
20512,
2551,
568,
1797,
9507,
124,
4557,
993,
18,
43,
1541,
13305,
800,
3726,
3726,
31,
22,
79,
568,
1797,
9507,
124,
4557,
993,
18,
43,
272,
20512,
118,
8101,
13305,
10082,
20,
8406,
40,
3149,
993,
18,
43,
77,
272,
20512,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Installing RMagick on Mac OS X with MacPorts
===
With the MacPorts version of ImageMagick 6.4.4 installed, I'm getting an error installing the RMagick gem.
/opt/local/bin/ruby extconf.rb update rmagick
checking for Ruby version >= 1.8.2... yes
checking for /usr/bin/gcc-4.0... yes
checking for Magick-config... no
Can't install RMagick 2.7.0. Can't find Magick-config in
/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands:
/Users/jason/.bin:/opt/local/bin:/usr/local/bin:/usr/local/mysql/bin:
/usr/local/ec2-api-tools/bin:/opt/local/bin:/usr/bin:
/usr/local/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
I've installed older versions of rmagick successfully. I've seen references to a dev package of ImageMagick, but it doesn't seem to be available from MacPorts.
How can I install RMagick 2.7 on Mac OS X with ImageMagick 6.4.4 from MacPorts? | 0 | [
2,
25429,
761,
21200,
197,
27,
1572,
13,
759,
993,
29,
1572,
1993,
18,
800,
3726,
3726,
29,
14,
1572,
1993,
18,
615,
16,
1961,
21200,
197,
400,
9,
300,
9,
300,
4066,
15,
31,
22,
79,
1017,
40,
7019,
25429,
14,
761,
21200,
197,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 an Adobe AIR app that's running in the system tray pop up a window?
===
For example, if I were to write a calendar app on top of AIR, say with Flex, could this app pop up reminder windows for approaching appointments, just like Microsoft Outlook can? | 0 | [
2,
92,
40,
20299,
282,
4865,
30,
22,
18,
946,
19,
14,
329,
10121,
1675,
71,
21,
1463,
60,
800,
3726,
3726,
26,
823,
15,
100,
31,
46,
20,
2757,
21,
7036,
4865,
27,
371,
16,
282,
15,
395,
29,
14409,
15,
110,
48,
4865,
1675,
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,
0,
0,
0,
0... |
Is there any difference between Group By and Distinct
===
I learned something simple about SQL the other day:
SELECT c FROM myTbl GROUP BY C
Has the same result as:
SELECT DISTINCT C FROM myTble
What I am curious of, is there anything different in the way an SQL engine processes the command, or are they truly the same thing?
I personally prefer the distinct syntax, but I am sure it's more out of habit than anything else. | 0 | [
2,
25,
80,
186,
2841,
128,
214,
34,
17,
4421,
800,
3726,
3726,
31,
2691,
301,
1935,
88,
4444,
255,
14,
89,
208,
45,
5407,
272,
37,
51,
38,
6287,
214,
34,
272,
63,
14,
205,
829,
28,
45,
5407,
4421,
272,
37,
51,
38,
2854,
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... |
SSRS 2005 help - need to get file size from within TSQL (path specified in column). Anyone?
===
I need to get the Folder size and display the info on a report (SSRS). I need to do this for a number of Databases (loop!). These DB's are websites' backends. Has anyone done this before? Can you please point me to some samples or right direction? Does xp_filesize and the like the right solution? Help! | 0 | [
2,
22118,
18,
812,
448,
13,
8,
376,
20,
164,
3893,
1072,
37,
363,
13,
38,
18,
22402,
13,
5,
8353,
9931,
19,
4698,
6,
9,
1276,
60,
800,
3726,
3726,
31,
376,
20,
164,
14,
19294,
1072,
17,
3042,
14,
15404,
27,
21,
1330,
13,
5,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to get the position() of an XElement?
===
Any XPath like /NodeName/position() would give you the position of the Node w.r.t it's parent node.
There is no method on the XElement (Linq to XML) object that can get the position of the Element. Is there? | 0 | [
2,
184,
20,
164,
14,
649,
5,
6,
16,
40,
993,
27567,
60,
800,
3726,
3726,
186,
993,
8353,
101,
13,
118,
251,
546,
7259,
118,
9339,
5,
6,
83,
590,
42,
14,
649,
16,
14,
15421,
619,
9,
139,
9,
38,
32,
22,
18,
4766,
15421,
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... |
Should repositories implement IQueryable<T>?
===
I'm considering one of two IRepository interfaces, one that is a descendant of IQueryable<T> and one that contains IQueryable<T>.
Like this:
public interface IRepository<T> : IQueryable<T>
{
T Save(T entity);
void Delete(T entity);
}
Or this:
public interface IRepository<T>
{
T Save(T entity);
void Delete(T entity);
IQueryable<T> Query();
}
LINQ usage would be:
from dos
in ServiceLocator.Current.GetInstance<IRepository<DomainObject>>()
where dos.Id == id
select dos
Or...
from dos
in ServiceLocator.Current.GetInstance<IRepository<DomainObject>>().Query
where dos.Id == id
select dos
I kinda like the first one, but it's problematic to mock. How have other people implemented LINQable, mockable repositories? | 0 | [
2,
378,
302,
14882,
262,
2829,
8713,
13,
5312,
622,
579,
1,
38,
1,
60,
800,
3726,
3726,
31,
22,
79,
5154,
53,
16,
81,
31,
99,
14882,
14599,
6573,
18,
15,
53,
30,
25,
21,
13783,
16,
13,
5312,
622,
579,
1,
38,
1,
17,
53,
30,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Create a BCEL JavaClass object from arbitrary .class file
===
I'm playing around with BCEL. I'm not using it to generate bytecode, but instead I'm trying to inspect the structure of existing compiled classes.
I need to be able to point to an arbitrary .class file anywhere on my hard drive and load a [JavaClass](http://jakarta.apache.org/bcel/apidocs/org/apache/bcel/classfile/JavaClass.html) object based on that. Ideally I'd like to avoid having to add the given class to my classpath. | 0 | [
2,
1600,
21,
2726,
532,
8247,
1898,
3095,
37,
17237,
13,
9,
1898,
3893,
800,
3726,
3726,
31,
22,
79,
791,
140,
29,
2726,
532,
9,
31,
22,
79,
52,
568,
32,
20,
7920,
34,
591,
9375,
15,
47,
700,
31,
22,
79,
749,
20,
19,
7350,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Research on TDD
===
I know there is done some research on TDD at the North Carolina State University. They have published a paper called '[An Initial Investigation of Test Driven Development in Industry][1]'. Other publications by NCSU can be found [here][2].
Can anybody point me to other good publications on this topic?
[1]: http://collaboration.csc.ncsu.edu/laurie/Papers/TDDpaperv8.pdf
[2]: http://collaboration.csc.ncsu.edu/laurie/publications.html | 0 | [
2,
527,
27,
15596,
43,
800,
3726,
3726,
31,
143,
80,
25,
677,
109,
527,
27,
15596,
43,
35,
14,
200,
2016,
146,
155,
9,
59,
57,
467,
21,
1397,
227,
13,
22,
2558,
210,
2104,
3193,
16,
1289,
5355,
522,
19,
1230,
500,
2558,
165,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can I use the STL if I cannot afford the slow performance when exceptions are thrown?
===
For example, I'm writing a multi-threaded time-critical application that processes and streams audio in real-time. Interruptions in the audio are totally unacceptable. Does this mean I cannot use the STL because of the potential slow down when an exception is thrown? | 0 | [
2,
92,
31,
275,
14,
354,
255,
100,
31,
1967,
7829,
14,
2276,
956,
76,
13392,
50,
6027,
60,
800,
3726,
3726,
26,
823,
15,
31,
22,
79,
1174,
21,
1889,
8,
96,
10647,
69,
85,
8,
21522,
3010,
30,
5102,
17,
9464,
4023,
19,
683,
8,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I create an email-sending service?
===
I've been kicking around this idea for a while and would like to read your thoughts.
I'd like to create a .NET service to send and track email messages.
My rough ideas:
0. Within various applications, serialize instances of .NET email (System.Net.Mail.MailMessage) objects and put them into a database or file system queue
0. The mail service/process polls the queue and sends the emails
0. Enforce subscribe/unsubscribe lists/rules
0. Track opens, bounces, out-of-office auto-replies, etc.
0. Report statuses back to the original applications
Does anyone have advice for how I should get started or what issues I may have? Is there off-the-shelf software/service I should look at? | 0 | [
2,
184,
107,
31,
1600,
40,
8517,
8,
18,
7601,
365,
60,
800,
3726,
3726,
31,
22,
195,
74,
11228,
140,
48,
882,
26,
21,
133,
17,
83,
101,
20,
1302,
154,
3064,
9,
31,
22,
43,
101,
20,
1600,
21,
13,
9,
2328,
365,
20,
2660,
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... |
Moq'ing an interface
===
While I'm googling/reading for this answer I thought I would also ask here.
I have a class that is a wrapper for a SDK. The class accepts an ILoader object and uses the ILoader object to create an ISBAObject which is cast into an ISmallBusinessInstance object. I am simply trying to mock this behavior using Moq.
[TestMethod]
public void Test_Customer_GetByID()
{
var mock = new Mock<ILoader>();
var sbainst = new Mock<ISbaObjects>();
mock.Expect(x => x.GetSbaObjects("")).Returns(sbainst);
}
The compiler error reads: Error 1 The best overloaded method match for 'Moq.Language.IReturns<Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.ISbaObjects>.Returns(Microsoft.BusinessSolutions.SmallBusinessAccounting.Loader.ISbaObjects)' has some invalid arguments
What is going on here? I expected the Mock of ISbaObjects to be able to be returned without a problem. | 0 | [
2,
1873,
1251,
22,
68,
40,
6573,
800,
3726,
3726,
133,
31,
22,
79,
162,
5598,
802,
118,
22883,
26,
48,
1623,
31,
289,
31,
83,
67,
1349,
235,
9,
31,
57,
21,
718,
30,
25,
21,
28051,
26,
21,
13,
18,
43,
197,
9,
14,
718,
16548... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 good way around the problems of structured exception handling (__try __except) with a multi-threaded server?
===
[This article][1] gives a good overview on why structured exception handling is bad. Is there a way to get the robustness of stopping your server from crashing, while getting past the problems mentioned in the article?
I have a server software that runs about 400 connected users concurrently. But if there is a crash all 400 users are effected. We added structured exception handling and enjoyed the results for a while, but eventually had to remove it because of some crashes causing the whole server to hang (which is worse than just having it crash and restart itself).
So we have this:
- With SEH: only 1 user of the 400 get a problem for most crashes
- Without SEH: If any user gets a crash, all 400 are effected.
- But sometimes with SEH: Server hangs, all 400 are effected and future users that try to connect.
[1]: http://blogs.msdn.com/larryosterman/archive/2004/09/10/228068.aspx | 0 | [
2,
25,
80,
21,
254,
161,
140,
14,
1716,
16,
17784,
5391,
7988,
13,
5,
1,
5840,
13,
1,
10066,
6,
29,
21,
1889,
8,
96,
10647,
69,
8128,
60,
800,
3726,
3726,
636,
1565,
2002,
500,
2558,
165,
500,
2352,
21,
254,
21598,
27,
483,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Library for programatically inspecting Java class files
===
I'm working on a project where we're doing a lot of remote object transfer between a Java service and clients written in other various languages. Given our current constraints I've decided to see what it would take to generate code based on an existing Java class. Basically I need to take a .class file (or a collection of them) parse the bytecode to determine all of the data members and perhaps getters/setters and then write something that can output code in a different language to create a class with the same structure.
I'm not looking for standard decompilers such as JAD. I need something that can take a .class file and create an object model of it's data members and methods. | 0 | [
2,
246,
1248,
26,
625,
721,
8438,
19,
7350,
68,
8247,
718,
6488,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
669,
113,
95,
22,
99,
845,
21,
865,
16,
5388,
3095,
2617,
128,
21,
8247,
365,
17,
7421,
642,
19,
89,
617,
2556,
9,
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... |
Flash Banners Conflicting with Pop-Up Blockers?
===
We've been creating banners using the getURL linking method (in a blank window). For many people, it works just fine. You click the banner and are taken to our site. For others (me included), clicking the flash object triggers a pop-up warning in FireFox (both 2 and 3, default settings). The weird thing is that it doesn't happen for everyone. It happens on my main machine (vista 64, FF3) but not on my secondary machine (XP 64, FF3). I have other people running Vista/FF3 just like me, and it's working fine for them...but not me.
We're pretty stumped and have no idea why this is happening. Any feedback would be greatly appreicated. | 0 | [
2,
4433,
7492,
18,
22297,
29,
1675,
8,
576,
1921,
445,
60,
800,
3726,
3726,
95,
22,
195,
74,
2936,
7492,
18,
568,
14,
164,
911,
255,
12585,
2109,
13,
5,
108,
21,
6463,
1463,
6,
9,
26,
151,
148,
15,
32,
693,
114,
1123,
9,
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... |
Searching For String Literals
===
In the quest for localization I need to find all the string literals littered amongst our source code. I was looking for a way to script this into a post-modification source repository check. (I.E. after some one checks something in have a box setup to check this stat) I'll probably use NAnt and CruiseControl or something to handle the management of the CVS (Well StarTeam in my case :( ) But do you know of any scriptable (or command line) utility to accurately cycle through source code looking for string literals? I realize I could do simple string look up based on regular expressions but want a little more bang for my buck. (Maybe analyze the string or put it into categories) Because a lot of times the string may not necessarily require translation. Any ideas?
| 0 | [
2,
5792,
26,
3724,
20665,
18,
800,
3726,
3726,
19,
14,
7769,
26,
375,
1829,
31,
376,
20,
477,
65,
14,
3724,
20665,
18,
26851,
4667,
318,
1267,
1797,
9,
31,
23,
699,
26,
21,
161,
20,
3884,
48,
77,
21,
678,
8,
13670,
4634,
1267,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 add data members dynamically in PHP?
===
I'm wondering if its possible to add new class data members at run-time in PHP? | 0 | [
2,
25,
32,
938,
20,
3547,
1054,
443,
7782,
1326,
19,
13,
26120,
60,
800,
3726,
3726,
31,
22,
79,
5712,
100,
82,
938,
20,
3547,
78,
718,
1054,
443,
35,
485,
8,
891,
19,
13,
26120,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
javascript: print a message to the error console?
===
How can I print a message to the error console, preferrably including a variable? e.g., something like
print('x=%d', x); | 0 | [
2,
8247,
8741,
45,
4793,
21,
2802,
20,
14,
7019,
8650,
60,
800,
3726,
3726,
184,
92,
31,
4793,
21,
2802,
20,
14,
7019,
8650,
15,
6369,
139,
4801,
215,
21,
7612,
60,
13,
62,
9,
263,
9,
15,
301,
101,
4793,
5,
22,
396,
3726,
11... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Sql 2005 Express edition slow connections
===
I'm running SqlServer 2005 express edition on my laptop for development purposes. It seems that when I open a connection to the database, the setup time is REALLY slow. It can take up to 10 seconds to get a connection. I usually have multiple connections open at the same time (Profiler, Development environment, Query Analyser, etc.) I have a hunch that the slow times are related to the fact that I have multiple connections open.
Is there a governor in Express edition that throttles connection times when multiple connections are made to an instance? | 0 | [
2,
4444,
255,
812,
2999,
1322,
2276,
6760,
800,
3726,
3726,
31,
22,
79,
946,
4444,
255,
10321,
106,
812,
2999,
1322,
27,
51,
12294,
26,
522,
4612,
9,
32,
2206,
30,
76,
31,
368,
21,
2760,
20,
14,
6018,
15,
14,
18161,
85,
25,
51... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What javascript frameworks conflict with eachother?
===
There are times when I want to use mootools for certain things and Prototype & script.aculo.us for others but within the same site. I've even considered adding others, but was concerned about conflicts. Anyone have experience, or am I just trying to make things too complicated for myself? | 0 | [
2,
98,
8247,
8741,
6596,
18,
2930,
29,
206,
9539,
60,
800,
3726,
3726,
80,
50,
436,
76,
31,
259,
20,
275,
13,
8765,
20799,
18,
26,
1200,
564,
17,
7063,
279,
3884,
9,
1738,
12415,
9,
267,
26,
654,
47,
363,
14,
205,
689,
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... |
How to "inverse match" with regex?
===
I'm using RegexBuddy but I'm in trouble anyway with this thing :\
I'm processing line by line a file. I built a "line model" to match what I want.
Now i'd like to do an inverse match... i.e. I want to match lines where there is a string of 6 letters, but only if these six letters are **not** *Andrea*, how should I do that? | 0 | [
2,
184,
20,
13,
7,
108,
9453,
730,
7,
29,
7953,
1706,
60,
800,
3726,
3726,
31,
22,
79,
568,
7953,
1706,
220,
28085,
47,
31,
22,
79,
19,
2572,
2774,
29,
48,
584,
13,
45,
1,
31,
22,
79,
5511,
293,
34,
293,
21,
3893,
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... |
Determining if enum value is in list (C#)
===
I am building a fun little app to determine if I should bike to work.
I would like to test to see if it is either Raining or Thunderstorm(ing).
public enum WeatherType : byte
{ Sunny = 0, Cloudy = 1, Thunderstorm = 2, Raining = 4, Snowing = 8, MostlyCloudy = 16 }
I was thinking I could do something like:
WeatherType _badWeatherTypes = WeatherType.Thunderstorm | WeatherType.Raining;
if(currentWeather.Type == _badWeatherTypes)
{
return false;//don't bike
}
but this doesn't work because _badWeatherTypes is a combination of both types. I would like to keep them separated out because this is supposed to be a learning experience and having it separate may be useful in other situations (IE, Invoice not paid reason's etc...).
I would also rather not do: (this would remove the ability to be configured for multiple people)
if(WeatherType.Thunderstorm)
{
return false; //don't bike
}
etc... | 0 | [
2,
13521,
100,
1957,
723,
1923,
25,
19,
968,
13,
5,
150,
5910,
6,
800,
3726,
3726,
31,
589,
353,
21,
2414,
265,
4865,
20,
3746,
100,
31,
378,
5984,
20,
170,
9,
31,
83,
101,
20,
1289,
20,
196,
100,
32,
25,
694,
1938,
68,
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... |
Change Django Templates Based on User-Agent
===
I've made a Django site, but I've drank the Koolaid and I want to make an _IPhone_ version. After putting much thought into I've come up with two options:
1. Make a whole other site, like i.xxxx.com. Tie it into the same database using Django's sites framework.
2. Find some time of middleware that reads the user-agent, and changes the template directories dynamically.
I'd really prefer option #2, however; I have some reservations, mainly because the Django documentation [discourages changing settings on the fly](http://docs.djangoproject.com/en/dev/topics/settings/). I found a [snippet](http://www.djangosnippets.org/snippets/1098/) that would do the what I'd like. My main issue is having it as seamless as possible, I'd like it to be automagic and transparent to the user.
Has anyone else come across the same issue? Would anyone care to share about how they've tackled making IPhone versions of Django sites? | 0 | [
2,
753,
3857,
14541,
22894,
18,
432,
27,
4155,
8,
58,
7685,
800,
3726,
3726,
31,
22,
195,
117,
21,
3857,
14541,
689,
15,
47,
31,
22,
195,
11878,
14,
15720,
20134,
17,
31,
259,
20,
233,
40,
13,
1,
49,
7709,
1,
615,
9,
75,
387... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 is it that UTF-8 encoding is used when interacting with a UNIX/Linux environment?
===
I know it is customary, but why? Are there real technical reasons why any other way would be a really bad idea or is it just based on the history of encoding and backwards compatibility? In addition, what are the dangers of not using UTF-8, but some other encoding (most notably, UTF-16)? | 0 | [
2,
483,
25,
32,
30,
287,
11720,
8,
457,
19608,
25,
147,
76,
24747,
29,
21,
22540,
118,
1226,
7147,
2307,
60,
800,
3726,
3726,
31,
143,
32,
25,
19049,
15,
47,
483,
60,
50,
80,
683,
2447,
2932,
483,
186,
89,
161,
83,
44,
21,
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... |
C# Debugging problem when exception occurs
===
When I debug a C# program and I get an exception throwed (either thrown by code OR thrown by the framework), the IDE stops and get me to the corresponding line in my code.
Everything is fine for now.
I then press "F5" to continue. From this moment, it seams like I'm in an infinite loop. The IDE alway's get me back the the exception line. I have to Shift-F5 to get out of this.
I talked with some co-workers here and they told me that this happens sometime to them too.
Do you have an idea of what's happenning?
Thanks
vIceBerg | 0 | [
2,
272,
5910,
121,
16254,
2762,
1448,
76,
5391,
3690,
800,
3726,
3726,
76,
31,
121,
16254,
21,
272,
5910,
625,
17,
31,
164,
40,
5391,
3814,
69,
13,
5,
18840,
6027,
34,
1797,
54,
6027,
34,
14,
6596,
6,
15,
14,
13,
3448,
6604,
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... |
Programmatically launching standalone Adobe flashplayer on Linux/X11
===
The standalone flashplayer takes no arguments other than a .swf file when you launch it from the command line. I need the player to go full screen, no window borders and such. This can be accomplished by hitting ctrl+f once the program has started. I want to do this programmatically as I need it to launch into full screen without any human interaction.
My guess is that I need to some how get a handle to the window and then send it an event that looks like the "ctrl+f" keystroke.
If it makes any difference, it looks like flashplayer is a gtk application and I have python with pygtk installed. | 0 | [
2,
625,
6732,
1326,
13762,
26986,
20299,
4433,
14049,
27,
13024,
118,
396,
1306,
800,
3726,
3726,
14,
26986,
4433,
14049,
1384,
90,
10553,
89,
119,
21,
13,
9,
18,
15263,
3893,
76,
42,
3394,
32,
37,
14,
1202,
293,
9,
31,
376,
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... |
Does This Consultant Know What He's Doing?
===
The IT department of a subsidiary of ours had a consulting company write them an ASP.NET application. Now it's having intermittent problems with mixing up who the current user is and has been known to show Joe some of Bob's data by mistake.
The consultants were brought back to troubleshoot and we were invited to listen in on their explanation. 2 things stuck out.
First, the consultant lead provided this pseudo-code:
void MyFunction()
{
Session["UserID"] = SomeProprietarySessionManagementLookup();
Response.Redirect("SomeOtherPage.aspx");
}
He went on to say that the assignment of the session variable is asynchronous, which seemed untrue. Granted the call into the lookup function could do something asynchronously, but this seems unwise.
Given that alleged asynchronousness, his theory was that the session variable was not being assigned before the redirect's inevitable ThreadAbort exception was raised. This faulure then prevented SomeOtherPage from displaying the correct user's data.
Second, he gave an example of a coding best practice he recommends. Rather than writing:
int MyFunction(int x, int x)
{
try
{
return x / y;
}
catch(Exception ex)
{
// log it
throw;
}
}
the technique he recommended was:
int MyFunction(int x, int y, out bool isSuccessful)
{
isSuccessful = false;
if (y == 0)
return 0;
return x / y;
}
This will certainly work and could be better from a performance perspective in some situations.
However, from these and other discussion points it just seemed to us that this team was not well-versed technically.
Opinions? | 0 | [
2,
630,
48,
7381,
143,
98,
24,
22,
18,
845,
60,
800,
3726,
3726,
14,
32,
604,
16,
21,
6870,
16,
318,
18,
41,
21,
11146,
237,
2757,
105,
40,
28,
306,
9,
2328,
3010,
9,
130,
32,
22,
18,
452,
19667,
1716,
29,
5826,
71,
72,
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... |
What is the best reporting tool for C#?
===
I need a tool that handle both on-screen and printed reports, via my C# application. I'm looking for simple, standard and powerful. Crystal is not an option because it is not dynamic enough... I'm thinking of using HTML with the WebBrowser control in my app, but I will have very little control over printing and print preview.
What would you use? | 0 | [
2,
98,
25,
14,
246,
6670,
5607,
26,
272,
5910,
60,
800,
3726,
3726,
31,
376,
21,
5607,
30,
3053,
156,
27,
8,
7187,
17,
5317,
2813,
15,
1197,
51,
272,
5910,
3010,
9,
31,
22,
79,
699,
26,
1935,
15,
1236,
17,
2177,
9,
4282,
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... |
Is there no way to create a thread-safe singleton pattern on windows?
===
I've been reading about thread-safe singleton patterns here:
http://en.wikipedia.org/wiki/Singleton_pattern#C.2B.2B_.28using_pthreads.29
And it says at the bottom that the only safe way is to use pthread_once - which isn't available on Windows.
Is that the **only** way of guaranteeing thread safe initialisation?
I've read this thread on SO:
http://stackoverflow.com/questions/6915/thread-safe-lazy-contruction-of-a-singleton-in-c
And seems to hint at an atomic OS level swap and compare function, which I assume on Windows is:
http://msdn.microsoft.com/en-us/library/ms683568.aspx
Can this do what I want? | 0 | [
2,
25,
80,
90,
161,
20,
1600,
21,
9322,
8,
18166,
345,
444,
3732,
27,
1936,
60,
800,
3726,
3726,
31,
22,
195,
74,
1876,
88,
9322,
8,
18166,
345,
444,
6282,
235,
45,
7775,
6903,
219,
9,
17375,
26132,
9,
5583,
118,
17375,
118,
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... |
Using CURRENT_TIMESTAMP, arithmetic operator and parameter with Firebird
===
Why doesn't this work (when parameter is set to 1):
SELECT * FROM TABLE WHERE TIMESTAMPFIELD > (CURRENT_TIMESTAMP - ?)
But this works:
SELECT * FROM TABLE WHERE TIMESTAMPFIELD > (CURRENT_TIMESTAMP - 1)
I get error message: "conversion error from string "39723.991882951" "
I'm using Firebird 2.1 | 0 | [
2,
568,
866,
1,
891,
384,
10158,
15,
21211,
6022,
17,
18906,
29,
535,
8490,
800,
3726,
3726,
483,
1437,
22,
38,
48,
170,
13,
5,
3185,
18906,
25,
309,
20,
137,
6,
45,
5407,
1637,
37,
859,
113,
436,
38,
10158,
1109,
13,
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... |
To Nest or Not to Nest?
===
**Premise:**
Usually during preparation of a new Ruby on Rails App, I draw out models and relations regarding user navigations. Usually I hit a place where I need to ask myself, whether or not I should go beyond the usual "rule of thumb" of nesting no more 1 level deep. Sometimes I feel the need to nest, rather than creating another namespace route and duplicating work.
<br/>Here's an example:<br/>
**Models:** User, Company, Location <br/>
User has and belongs to many Companies (many to many) <br/>
User has and belongs to many Locations (many to many) <br/>
Company has and belongs to many Locations (many to many) <br/>
**Routes:**<br/>
***1 level nesting*** <br/>
users/:user_id/companies/ - list all companies related to a user<br/>
users/:user_id/locations/ - list all locations related to a user<br/>
***more than 1 level nesting***<br/>
users/:user_id/companies/:company_id/locations/ - list all company-locations of a user
**So, my question is whether or not it is appropriate to nest more than 1 level deep in RoR? Yes or no? And why?** | 0 | [
2,
20,
5618,
54,
52,
20,
5618,
60,
800,
3726,
3726,
13,
1409,
3515,
79,
2628,
45,
1409,
951,
112,
6675,
16,
21,
78,
10811,
27,
2240,
18,
4865,
15,
31,
2003,
70,
2761,
17,
2649,
3467,
4155,
8368,
18,
9,
951,
31,
770,
21,
209,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 simulating and developing hardware and protocols
===
I want to dabble in the design of hardware and protocols, specifically for wireless mesh networking. Is there a software-based alternative to getting an FPGA setup and writing code for it? Are there any tools well-suited for coding/designing the protocol(s) for such a device? | 0 | [
2,
4672,
26,
4861,
10038,
17,
3561,
7610,
17,
19957,
800,
3726,
3726,
31,
259,
20,
1331,
13784,
19,
14,
704,
16,
7610,
17,
19957,
15,
3524,
26,
10149,
55,
1635,
16230,
9,
25,
80,
21,
2306,
8,
1281,
2676,
20,
1017,
40,
13,
12087,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 xhtml-css editor with emmbeded browser (under GPL) in your opinion?
===
what is the best xhtml-css editor with emmbeded browser (under GPL) in your opinion? | 0 | [
2,
98,
25,
14,
246,
993,
15895,
8,
6824,
18,
1835,
29,
22909,
4283,
69,
16495,
13,
5,
4579,
489,
5727,
6,
19,
154,
4052,
60,
800,
3726,
3726,
98,
25,
14,
246,
993,
15895,
8,
6824,
18,
1835,
29,
22909,
4283,
69,
16495,
13,
5,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
fmt:parseDate - a parse index locale can not be established
===
Does anyone know the root cause of this error? I am feeding known good data to the fmt:parseDate tag (its db driven data controlled by us), and yet this error randomly pops up. I can't seem to find a way to replicate what causes this exception. | 0 | [
2,
4585,
38,
45,
3574,
18,
69,
1373,
13,
8,
21,
2017,
870,
4348,
375,
62,
92,
52,
44,
613,
800,
3726,
3726,
630,
1276,
143,
14,
5900,
1679,
16,
48,
7019,
60,
31,
589,
8524,
167,
254,
1054,
20,
14,
4585,
38,
45,
3574,
18,
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... |
How do you map enums to and from the database using NHibernate?
===
Just like the title says. | 0 | [
2,
184,
107,
42,
2942,
1957,
723,
18,
20,
17,
37,
14,
6018,
568,
12109,
15191,
8820,
60,
800,
3726,
3726,
114,
101,
14,
581,
898,
9,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
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... |
Keypoints morphing
===
Is there a library/software which can accept a number of keypoints and matches of them between images and produce a morph? Or any ideas/algorithms on how to do it? | 0 | [
2,
1246,
3132,
18,
12676,
68,
800,
3726,
3726,
25,
80,
21,
1248,
118,
12980,
5011,
56,
92,
3440,
21,
234,
16,
1246,
3132,
18,
17,
1717,
16,
105,
128,
3502,
17,
2213,
21,
12676,
60,
54,
186,
3478,
118,
192,
6979,
242,
7015,
18,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
msxml from C++ - pretty print / indent newly created documents
===
I'm writing out XML files using the MSXML parser, with a wrapper I downloaded from here: http://www.codeproject.com/KB/XML/JW_CXml.aspx. Works great except that when I create a new document from code (so not load from file and modify), the result is all in one big line. I'd like elements to be indented nicely so that I can read it easily in a text editor.
Googling shows many people with the same question - asked around 2001 or so. Replies usually say 'apply an XSL transformation' or 'add your own whitespace nodes'. Especially the last one makes me go %( so I'm hoping that in 2008 there's an easier way to pretty MSXML output. So my question; is there, and how do I use it? | 0 | [
2,
4235,
396,
8184,
37,
272,
20512,
13,
8,
1772,
4793,
13,
118,
19,
817,
38,
2771,
679,
4374,
800,
3726,
3726,
31,
22,
79,
1174,
70,
23504,
6488,
568,
14,
4235,
396,
8184,
2017,
4104,
15,
29,
21,
28051,
31,
23887,
37,
235,
45,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Omitting XML processing instruction when serializing an object
===
I'm serializing an object in a C# VS2003 / .Net 1.1 application. I need it serialized without the processing instruction, however. The XmlSerializer class puts out something like this:
<?xml version="1.0" encoding="utf-16" ?>
<MyObject>
<Property1>Data</Property1>
<Property2>More Data</Property2>
</MyObject>
Is there any way to get something like the following, without processing the resulting text to remove the tag?
<MyObject>
<Property1>Data</Property1>
<Property2>More Data</Property2>
</MyObject>
For those that are curious, my code looks like this...
XmlSerializer serializer = new XmlSerializer(typeof(MyObject));
StringBuilder builder = new StringBuilder();
using ( TextWriter stringWriter = new StringWriter(builder) )
{
serializer.Serialize(stringWriter, comments);
return builder.ToString();
}
| 0 | [
2,
13,
8560,
38,
1203,
23504,
5511,
7304,
76,
5956,
3335,
40,
3095,
800,
3726,
3726,
31,
22,
79,
5956,
3335,
40,
3095,
19,
21,
272,
5910,
4611,
3325,
13,
118,
13,
9,
2328,
137,
9,
165,
3010,
9,
31,
376,
32,
27877,
366,
14,
551... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 install "SQL Server" ODBC Driver?
===
I Have "SQL Native Client", but not "SQL Server" ODBC driver. I believe that while getting SQL 2005 installed on my machine, I inadvertently uninstalled it and I cannot find any good information on Google or MSDN to help.
Tried to fix by installing SQL Server client tools.
Any ideas would be appreciated.
I'm running Windows XP Pro. | 0 | [
2,
184,
107,
31,
16146,
13,
7,
18,
22402,
8128,
7,
12340,
7229,
2425,
60,
800,
3726,
3726,
31,
57,
13,
7,
18,
22402,
1275,
6819,
7,
15,
47,
52,
13,
7,
18,
22402,
8128,
7,
12340,
7229,
2425,
9,
31,
985,
30,
133,
1017,
4444,
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... |
Calling stored procedures
===
I have a c# application that interfaces with the database only through stored procedures. I have tried various techniques for calling stored procedures. At the root is the SqlCommand class, however I would like to achieve several things:
- make the interface between c# and sql smoother, so that procedure calls look more like c# function calls
- have an easy way to determine whether a given stored procedure is called anywhere in code.
- make the creation of a procedure call quick and easy.
I have explored various avenues. In one, I had a project that with its namespace structure mirrored the name structure of stored procedures, that way I could generate the name of the stored procedure from the name of the class, and I could tell whether a given stored procedure was in use by fining it in the namespace tree. What are some other experiences? | 0 | [
2,
2555,
8214,
8876,
800,
3726,
3726,
31,
57,
21,
272,
5910,
3010,
30,
6573,
18,
29,
14,
6018,
104,
120,
8214,
8876,
9,
31,
57,
794,
617,
4212,
26,
2555,
8214,
8876,
9,
35,
14,
5900,
25,
14,
4444,
255,
16239,
718,
15,
207,
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... |
How can I setup the permissions in Linux so that two users can update the same SVN working copy on the server?
===
My server has both Subversion and Apache installed, and the Apache web directory is also a Subversion working copy. The reason for this is that the simple command "svn update /server/staging" will deploy the latest source to the staging server.
Apache public web directory: /server/staging *— (This is an SVN working copy.)*
I have two users on my server, 'richard' and 'austin'. They both are members of the 'developers' group. I recursively set permissions on the /server directory to richard:developers, using "sudo chown -R richard:developers /server".
I then set the permissions to read, write and execute for both 'richard' and the 'developers' group.
So surely, 'austin' should now be able to use the "svn update /server/staging" command? However, when he tries, he gets the error:
> `svn: Can't open file '/server/staging/.svn/lock': Permission denied`
If I recursively change the owner of /server to austin:developers, he can run the command just fine, but then 'richard' can't.
How do I fix the problem? I want to create a post-commit hook with to automatically deploy the staging site when files are committed, but I can't see a way for that to work for both users. The hook would be:
> `/usr/bin/svn update /server/staging`
Using the same user account for both of them wouldn't really be an acceptable solution, and I'm not aware of any way to run the command inside the hook as 'root'.
Any help is appreciated! | 0 | [
2,
184,
92,
31,
18161,
14,
5572,
18,
19,
13024,
86,
30,
81,
3878,
92,
11100,
14,
205,
13,
18,
16578,
638,
4344,
27,
14,
8128,
60,
800,
3726,
3726,
51,
8128,
63,
156,
972,
10898,
17,
17140,
4066,
15,
17,
14,
17140,
2741,
16755,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Visual Stuidio: How can I see my applications threads while debugging?
===
I would like to see the threads currently active in my application while debugging it, can I do this using visual studio? Thanks. | 0 | [
2,
3458,
12519,
20347,
45,
184,
92,
31,
196,
51,
3767,
20396,
133,
121,
16254,
2762,
60,
800,
3726,
3726,
31,
83,
101,
20,
196,
14,
20396,
871,
1348,
19,
51,
3010,
133,
121,
16254,
2762,
32,
15,
92,
31,
107,
48,
568,
3458,
1120,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Why are try blocks expensive?
===
I've heard the advice that you should avoid try catch blocks if possible since they're expensive.
My question is specifically about the .NET platform: Why are try blocks expensive? | 0 | [
2,
483,
50,
1131,
5198,
5381,
60,
800,
3726,
3726,
31,
22,
195,
752,
14,
4978,
30,
42,
378,
2658,
1131,
2949,
5198,
100,
938,
179,
59,
22,
99,
5381,
9,
51,
1301,
25,
3524,
88,
14,
13,
9,
2328,
2452,
45,
483,
50,
1131,
5198,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Assuming 32bit ints
===
In my C# source code I may have declared integers as:
int i = 5;
or
Int32 i = 5;
In the currently prevalent 32bit world they are equivalent. However, as we move into a 64bit world am I correct in saying that the following will become the same?
int i = 5;
Int64 = 5;
| 0 | [
2,
11704,
2512,
3326,
19,
38,
18,
800,
3726,
3726,
19,
51,
272,
5910,
1267,
1797,
31,
123,
57,
2482,
13820,
18,
28,
45,
19,
38,
31,
800,
331,
73,
54,
19,
38,
3125,
31,
800,
331,
73,
19,
14,
871,
17584,
2512,
3326,
126,
59,
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... |
Formatting Literal parameters of a C# code snippet
===
Is there any way that I can change how a Literal of a code snippet renders when it is used in the code that the snippet generates?
Specifically I'd like to know if I can have a literal called say, $PropertyName$ and then get the snippet engine to render "_$PropertyName$ where the first character is made lowercase.
I can't afford R#. Please help :) | 0 | [
2,
2595,
1203,
20665,
12905,
16,
21,
272,
5910,
1797,
13,
29061,
800,
3726,
3726,
25,
80,
186,
161,
30,
31,
92,
753,
184,
21,
20665,
16,
21,
1797,
13,
29061,
16535,
18,
76,
32,
25,
147,
19,
14,
1797,
30,
14,
13,
29061,
7920,
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... |
Where can I find a good collection of public domain owl ontologies for various domains?
===
I am building an ontology-processing tool and need lots of examples of various owl ontologies, as people are building and using them in the real world. I'm not talking about foundational ontologies such as Cyc, I'm talking about smaller, domain-specific ones. | 0 | [
2,
113,
92,
31,
477,
21,
254,
1206,
16,
317,
4603,
11170,
27,
38,
13331,
18,
26,
617,
15544,
60,
800,
3726,
3726,
31,
589,
353,
40,
27,
17810,
8,
16835,
68,
5607,
17,
376,
7503,
16,
3770,
16,
617,
11170,
27,
38,
13331,
18,
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... |
Best Practices for Entity Framwork and ASP.NET
===
I've been driving myself crazy trying to get the Entity Framework to work as expected (or at least as I expect) in an ASP.NET environment, specifically dealing with objects belonging to different contexts when attempting to save to the database.
What are the best practices when dealing with the Entity Framework and ASP.NET? | 0 | [
2,
246,
5242,
26,
9252,
8345,
79,
3783,
17,
28,
306,
9,
2328,
800,
3726,
3726,
31,
22,
195,
74,
2891,
992,
3328,
749,
20,
164,
14,
9252,
6596,
20,
170,
28,
1727,
13,
5,
248,
35,
639,
28,
31,
4186,
6,
19,
40,
28,
306,
9,
23... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Office 2003 PIA Prerequisite in the .Net framework and Office 2007
===
What happens when the Office 2003 PIA prerequisite and launch condition in a Windows installer are run against an Office 2007 system? | 0 | [
2,
488,
973,
13009,
782,
99,
3003,
9097,
19,
14,
13,
9,
2328,
6596,
17,
488,
624,
800,
3726,
3726,
98,
5531,
76,
14,
488,
973,
13009,
782,
99,
3003,
9097,
17,
3394,
2874,
19,
21,
1936,
16146,
106,
50,
485,
149,
40,
488,
624,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
what's the best stable (editor & compiler) for c plus plus with gui & work under linux?
===
what's the best stable (editor & compiler) for c plus plus with gui & work under linux? | 0 | [
2,
98,
22,
18,
14,
246,
4521,
13,
5,
13401,
279,
21486,
6,
26,
272,
3123,
3123,
29,
9457,
279,
170,
131,
13024,
60,
800,
3726,
3726,
98,
22,
18,
14,
246,
4521,
13,
5,
13401,
279,
21486,
6,
26,
272,
3123,
3123,
29,
9457,
279,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
.NET DBNull vs Nothing across all variable types?
===
I am a little confused about null values and variables in .NET. (VB preferred)
Is there any way to check the "nullness" of ANY given variable regardless of whether it was an object or a value type? Or does my null check have to always anticipate whether it's checking a value type (e.g. System.Integer) or an object?
I guess what I'm looking for is a function that checks all possible kind of null-ness. That is, any type of variables that
a) were never assigned a value since declared
b) were assigned a null value from a data object (that came from a database)
c) were set equals to another variable value which was null
d) were set to an ASP.NET session/application variable that was never set or expired.
Is there a general best-practice when it comes to handling null scenarios in .NET?
Thanks in advance for any feedback! | 0 | [
2,
13,
9,
2328,
13,
9007,
4215,
211,
4611,
626,
464,
65,
7612,
2551,
60,
800,
3726,
3726,
31,
589,
21,
265,
4230,
88,
16203,
4070,
17,
12157,
19,
13,
9,
2328,
9,
13,
5,
20468,
5981,
6,
25,
80,
186,
161,
20,
2631,
14,
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... |
What do you do when changing languages
===
This is a problem I constantly face. I know how to execute a certain task in one enviroment / framework / language but I am a complete stranger in another.
What's more, sometimes the gap between languages / enviroments is really too big to be simply adapted (like porting a prolog application to C#)
So, I guess the question is: how to cope with solving a problem you know is easy to solve in one language but, due to an "environment" restriction you have to program in another?
| 0 | [
2,
98,
107,
42,
107,
76,
4226,
2556,
800,
3726,
3726,
48,
25,
21,
1448,
31,
7545,
276,
9,
31,
143,
184,
20,
15644,
21,
1200,
3005,
19,
53,
21314,
661,
1130,
13,
118,
6596,
13,
118,
816,
47,
31,
589,
21,
1279,
7704,
19,
226,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I use C# style enumerations in Ruby?
===
I just want to know the best way to emulate a C# style enumeration in Ruby. | 0 | [
2,
184,
92,
31,
275,
272,
5910,
1034,
26940,
5757,
19,
10811,
60,
800,
3726,
3726,
31,
114,
259,
20,
143,
14,
246,
161,
20,
23804,
21,
272,
5910,
1034,
26940,
872,
19,
10811,
9,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
API for creating installers on Windows
===
There are lots of tools for creating installers on Windows (InstallShield, InnoSetup, NSIS, just to name a few). All tools I've seen fall in one or both of these categories
* Point-and-click. Nice GUI for creating the installer, but the installer definition/project file can not be manually edited.
* Textfile: No (official) GUI. The installer is compiled from a definition in a text-file which is manually edited.
The installers I'm building are all defined using a DSL (represented as YAML files), so using a GUI is out of the question, and creating is textfile is cumbersome although doable.
What I really would want is a tool which exposes a (complete) API, through which I can control the creation of the installer. Are there any such tools out there? | 0 | [
2,
21,
2159,
26,
2936,
16146,
445,
27,
1936,
800,
3726,
3726,
80,
50,
7503,
16,
4672,
26,
2936,
16146,
445,
27,
1936,
13,
5,
108,
21300,
29026,
15,
19,
251,
3554,
576,
15,
13,
103,
4557,
15,
114,
20,
204,
21,
310,
6,
9,
65,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Return custom structure from Popup window in Powerbuilder 9.0
===
How do you return values or structures from a Popup window in Powerbuilder 9.0? The CloseWithReturn is only valid for Response windows and thus is not available. When I set a value to the Message.PowerObjectParm, the value becomes null when the Popup window closes. I need to use a Popup window so the user can click back to the caller window and scroll through rows.
Program flow:
1) Window A OpenWithParm
2) Window B is now open
3) User interacts with both windows
3) User closes Window B
4) Window B needs to pass a structure back to window A | 0 | [
2,
788,
5816,
1411,
37,
1675,
576,
1463,
19,
414,
20904,
561,
9,
387,
800,
3726,
3726,
184,
107,
42,
788,
4070,
54,
3815,
37,
21,
1675,
576,
1463,
19,
414,
20904,
561,
9,
387,
60,
14,
543,
1410,
24632,
25,
104,
7394,
26,
1627,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Redirect Standard Output Efficiently in .NET
===
I am trying to call php-cgi.exe from a .NET program. I use RedirectStandardOutput to get the output back as a stream but the whole thing is very slow.
Do you have any idea on how I can make that faster? Any other technique?
Dim oCGI As ProcessStartInfo = New ProcessStartInfo()
oCGI.WorkingDirectory = "C:\Program Files\LogiTermWeb\php"
oCGI.FileName = "php-cgi.exe"
oCGI.RedirectStandardOutput = True
oCGI.RedirectStandardInput = True
oCGI.UseShellExecute = False
oCGI.CreateNoWindow = True
Dim oProcess As Process = New Process()
oProcess.StartInfo = oCGI
oProcess.Start()
oProcess.StandardOutput.ReadToEnd()
| 0 | [
2,
302,
14706,
1236,
5196,
20519,
19,
13,
9,
2328,
800,
3726,
3726,
31,
589,
749,
20,
645,
13,
26120,
8,
150,
2234,
9,
1706,
62,
37,
21,
13,
9,
2328,
625,
9,
31,
275,
302,
14706,
15566,
1320,
4881,
20,
164,
14,
5196,
97,
28,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 create a "magnifying glass" on a 2D scene?
===
I'm working on a game where I need to let the player look at a plane (e.g., a wall) through a lens (e.g., a magnifying glass). The game is to run on the iPhone, so my choices are Core Animation or OpenGL ES.
My first idea (that I have not yet tried) is to do this using Core Animation.
1. Create the wall and objects on it using CALayers.
2. Use CALayer's `renderInContext:` method to create an image of the wall as a background layer.
3. Crop the image to the lens shape, scale it up, then draw it over the background.
4. Draw the lens frame and "shiny glass" layer on top of all that.
Notes:
* I am a lot more familiar with Core Animation than OpenGL, so maybe there is a much better way to do this with OpenGL. (Please tell me!)
* If I am using CALayers that are not attached to a view, do I have to manage all animations myself? Or is there a straightforward way to run them manually?
* 3D perspective is not important; I'm just magnifying a flat wall.
* I'm concerned that doing all of the above will be too slow for smooth animation.
Before I commit a lot of code to writing this, my question is **do you see any pitfalls in the plan above or can you recommend an easier way to do this?** | 0 | [
2,
98,
22,
18,
14,
246,
161,
20,
1600,
21,
13,
7,
9473,
103,
10874,
1350,
7,
27,
21,
172,
43,
1691,
60,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
250,
113,
31,
376,
20,
408,
14,
517,
361,
35,
21,
3627,
13,
5,
62,
9,
263,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to avoid flicker while handling WM_ERASEBKGND in Windows dialog
===
I have a dialog that resizes. It also has a custom background which I paint in response to a WM_ERASEBKGND call (currently a simple call to FillSolidRect).
When the dialog is resized, there is tremendous flickering going on. To try and reduce the flickering I enumerate all child windows and add them to the clipping region. That seems to help a little -- now the flickering is mostly evident in all of the child controls as they repaint.
How can I make the dialog flicker-free while resizing? I suspect double-buffering must play a part, but I'm not sure how to do that with a dialog with child controls (without making all child controls owner-draw or something like that).
| 0 | [
2,
184,
20,
2658,
18709,
133,
7988,
19312,
1,
2615,
18,
7665,
16901,
706,
19,
1936,
28223,
800,
3726,
3726,
31,
57,
21,
28223,
30,
10719,
13569,
9,
32,
67,
63,
21,
5816,
2395,
56,
31,
5107,
19,
1627,
20,
21,
19312,
1,
2615,
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... |
Best Practices - Should meta data and functional defining data be intermixed?
===
Consider the case of a simple news article web application that has a DB table column of "Status" that is accessible by a radio button set of:
Status - [x] Publish [ ] Draft [ ] Archive
...where "Publish" shows an article publicly and "Draft" and "Archive" do not. Functionally "Draft" and "Archive" do the same thing but carry additional meta data meanings. The two functional states of "show" and "hide" along with the meta data of "publish", "draft" and "archive" are intermixed in the same column of "status".
Is this a good practice? While this is a very simple case, larger cases might reveal flaws with such a practice (or not...). | 0 | [
2,
246,
5242,
13,
8,
378,
7618,
1054,
17,
7652,
14684,
1054,
44,
1480,
21049,
60,
800,
3726,
3726,
3563,
14,
610,
16,
21,
1935,
996,
2002,
2741,
3010,
30,
63,
21,
13,
9007,
859,
4698,
16,
13,
7,
10631,
267,
7,
30,
25,
7342,
34... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 forward the TCP/IP traffic of a process in Windows XP?
===
Having a process called "foo.exe", is there a way to forward everything it communicates over TCP/IP to a forwarding proxy located elsewhere? This forwarding should not reflect outside this process.
Another question: if there are multiple network adapters, is it possible to force a process to use one specific adapter.
I don't have access to foo.exe's source code.
Some free software for this would be perfect, alternatively a source code hack idea (native or .net). Thank you very much. | 0 | [
2,
184,
20,
917,
14,
13,
38,
7439,
118,
4307,
2227,
16,
21,
953,
19,
1936,
23045,
60,
800,
3726,
3726,
452,
21,
953,
227,
13,
7,
4120,
111,
9,
1706,
62,
7,
15,
25,
80,
21,
161,
20,
917,
796,
32,
8709,
18,
84,
13,
38,
7439,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Overcoming Windows User Object Handle Limit
===
I'm looking for advanced strategies for dealing with User Object Handle limits when building heavy-weight windows interfaces. Please explain how you overcame or bypassed this issue using SWT or direct Windows GUI APIs. The only thing I am not interested in is strategies to optimize widget usage as I have done this extensively and it does not solve the problem, only makes it less likely.
My Situation:
I have an SWT based GUI that allows for multiple sessions within the same parent shell and within each session their are 3 separate places where a list of user generated comments are displayed. As a user opens multiple sessions and pulls data that populates those lists, the number of user object handles can increase dramatically depending on the number of comments.
My current solutions:
1. I page the comments by default thereby limiting the number of comment rows in each session, but due to management demands, i also have what is effectively a "View All" button which bypasses this completely.
2. I custom draw all non-editable information in each row. This means each row utilizes only 2 object handles.
3. I created JNI calls which query the OS for the current usage and the Max usage. With this i can give indications to users that a crash is imminent. Needless to say, they ignore this warning.
| 0 | [
2,
84,
9076,
1936,
4155,
3095,
3053,
4496,
800,
3726,
3726,
31,
22,
79,
699,
26,
2255,
10272,
26,
5746,
29,
4155,
3095,
3053,
5887,
76,
353,
1278,
8,
8696,
1936,
6573,
18,
9,
2247,
3271,
184,
42,
28325,
54,
8900,
69,
48,
1513,
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... |
WinForms: How can I have my UI run independently of my BLL layer?
===
I am trying to do a Windows Forms application in an MVP style and - not having done much with threading before - am getting all confused.
My UI is a set of very simple forms. Each of the forms implements an interface and contains a reference to a mediator class which lives in the Business Logic Layer and vice versa.
So as simplified diagram looks like this:
CheckInForm : ICheckIn <-------> CheckInMediator : ICheckInMediator
----------------------------------------------------------------------------------------
CheckInForm.Show() <--------
--------> AttemptCheckIn(CheckInInfo)
CheckInForm.DisplayCheckInInfo(DisplayInfo) <--------
--------> CompleteCheckIn(AdditionalCheckInInfo)
PleaseWaitDialog.Show() <--------
PleaseWaitDialog.Close() <--------
CheckInForm.Close() <--------
As you can see, the mediator classes control the UI, telling it when to display data, start up, close, etc. They even signify when a modal dialog should appear and when it should close (ie the PleaseWaitDialog above) The only thing the UI does is show data on the screen and relay input back to the mediator.
This architecture is nice and decoupled and has been super-easy to test and prototype. Now that I'm putting it all together however I'm starting to run into threading issues. For example, if I want my PleaseWaitDialog to appear as a modal form (using ShowDialog()) over the CheckInForm until a timer controlled by the mediator counts out 5 seconds (remember, this is a simplification) I will get a cross-threading error if I call PleaseWaitDialog.Close() from the timer's callback.
What I think I would like to do is to run the mediators and business logic on the main thread and the UI on a completely separate thread and my first question is does this make sense to do?
My second question is, how do I do something like have a class run in a separate thread? And how do I have the two communicate? I am making my way through the reading on .NET threading but I have a deadline and some examples could really help. | 0 | [
2,
628,
4190,
18,
45,
184,
92,
31,
57,
51,
13,
5661,
485,
9029,
16,
51,
334,
211,
5385,
60,
800,
3726,
3726,
31,
589,
749,
20,
107,
21,
1936,
1997,
3010,
19,
40,
13552,
1034,
17,
13,
8,
52,
452,
677,
212,
29,
9322,
68,
115,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 open an Access DB via ADO so that I can write, but others can only read?
===
From the documentation, I would expect adModeShareDenyWrite to be the way, but it's not working right.
I'm using an Access database via ADO. My connection string says Mode=8, which is adModeShareDenyWrite. But when I try to delete a row from a table, I get:
Unspecified error, Description:Could not delete from specified tables., Source:Microsoft JET Database Engine
If I change the mode to 2, adModeWrite, I can write. | 0 | [
2,
184,
92,
31,
368,
40,
1381,
13,
9007,
1197,
21,
537,
86,
30,
31,
92,
2757,
15,
47,
654,
92,
104,
1302,
60,
800,
3726,
3726,
37,
14,
13945,
15,
31,
83,
4186,
21,
43,
15570,
16608,
817,
93,
23716,
20,
44,
14,
161,
15,
47,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CLOS like object model for PHP
===
I have returned to php development from [Moose][1] and I really miss CLOS like object model for php. Is there some kind of syntaxtic sugar which would allow me to write less code in php when dealing with objects?
I would love to have at least roles, and some kind of built-in introspection without re-inventing the weel.
p.s. For JavaScript there is [Joose][2], so similar API would be very useful.
[1]: http://www.iinteractive.com/moose/
[2]: http://code.google.com/p/joose-js/ | 0 | [
2,
7383,
18,
101,
3095,
1061,
26,
13,
26120,
800,
3726,
3726,
31,
57,
587,
20,
13,
26120,
522,
37,
636,
8765,
870,
500,
2558,
165,
500,
17,
31,
510,
1501,
7383,
18,
101,
3095,
1061,
26,
13,
26120,
9,
25,
80,
109,
825,
16,
2264... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 access a public property of a User Control from codebehind?
===
I have a user control in a repeater that I need to pass data to during the databound event, so I've created two public properties in the control. How do I access these properties from the page's codebehind class? | 0 | [
2,
184,
107,
31,
1381,
21,
317,
1354,
16,
21,
4155,
569,
37,
1797,
24878,
60,
800,
3726,
3726,
31,
57,
21,
4155,
569,
19,
21,
6830,
106,
30,
31,
376,
20,
1477,
1054,
20,
112,
14,
1054,
7410,
807,
15,
86,
31,
22,
195,
679,
81... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
NetBIOS vs. FQDN
===
I've got an issue when accessing a web site, I can access it by using the NetBIOS name, but when accessing with the FQDN i get an error.
Any ideas on how to troubleshoot this? | 0 | [
2,
4275,
10990,
18,
4611,
9,
398,
1251,
43,
103,
800,
3726,
3726,
31,
22,
195,
330,
40,
1513,
76,
1381,
68,
21,
2741,
689,
15,
31,
92,
1381,
32,
34,
568,
14,
4275,
10990,
18,
204,
15,
47,
76,
1381,
68,
29,
14,
398,
1251,
43,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... |
How to rank a million images with a crowdsourced sort
===
I'd like to rank a collection of landscape images by making a game whereby site visitors can rate them, in order to find out which images people find the most appealing.
What would be a good method of doing that?
- **Hot-or-Not style**? i.e. show a single image, ask the user to rank it from 1-10. As I see it, this allows me to average the scores, and I would just need to ensure that I get an even distribution of votes across all the images. Fairly simple to implement.
- **Pick A-or-B**? i.e. show two images, ask user to pick the better one. This is appealing as their no numerical ranking, it's just a comparison. But how would I implement it? My first thought was to do it as a quicksort, with the comparison operations being provided by humans, and once completed, simply repeat the sort ad-infinitum.
How would *you* do it?
*If you need numbers, I'm talking about one million images, on a site with 20,000 daily visits. I'd imagine a small proportion might play the game, for the sake of argument, lets say I can generate 2,000 human sort operations a day! It's a non-profit website, and the terminally curious will find it through my profile :)*
| 0 | [
2,
184,
20,
2839,
21,
507,
3502,
29,
21,
2476,
12097,
43,
2058,
800,
3726,
3726,
31,
22,
43,
101,
20,
2839,
21,
1206,
16,
4453,
3502,
34,
544,
21,
250,
15630,
689,
4531,
92,
1684,
105,
15,
19,
389,
20,
477,
70,
56,
3502,
148,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Creating Project Fails in Visual Studio 2005 and VS2008
===
Every time I try to create a new project or solution in visual studio (2005 and 2008), I get an error saying, "Project Creation failed." I even tried running vs in administrative mode, but I still get the same answer. Anyone have any suggestions, in short of uninstalling all of VS and reinstalling it? | 0 | [
2,
2936,
669,
13614,
19,
3458,
1120,
812,
17,
4611,
2753,
800,
3726,
3726,
352,
85,
31,
1131,
20,
1600,
21,
78,
669,
54,
4295,
19,
3458,
1120,
13,
5,
2835,
17,
570,
6,
15,
31,
164,
40,
7019,
1148,
15,
13,
7,
21011,
2502,
1702,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 in your .vimrc?
===
VI an VIm allow for really awesome customization, typically stored inside a `.vimrc` file. Typical features for a programmer would be syntax highlighting, smart indenting and so on.
**What other tricks for productive programming have you got, hidden in your .vimrc?**
I am mostly interested in refactorings, auto classes and similar productivity macros, especially for C#. | 4 | [
2,
98,
25,
19,
154,
13,
9,
1755,
79,
5453,
60,
800,
3726,
3726,
1790,
40,
1790,
79,
1655,
26,
510,
13706,
5816,
1829,
15,
2442,
8214,
572,
21,
13,
1,
9,
1755,
79,
5453,
1,
3893,
9,
3874,
967,
26,
21,
17968,
83,
44,
22649,
23... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 compare a Fuzzy Query to a LuceneDictionary solution?
===
According to this post on [how to do query auto-completionsuggestions in lucene](http://stackoverflow.com/questions/120180/how-to-do-query-auto-completionsuggestions-in-lucene) getting "Did You Mean" functionality best involves using a LuceneDictionary. But I probably would have used a fuzzy query for this before reading this post. Now I'm wondering which is faster, which is easier to implement? | 0 | [
2,
92,
737,
11590,
21,
20631,
25597,
20,
21,
18515,
556,
22595,
1857,
4295,
60,
800,
3726,
3726,
496,
20,
48,
678,
27,
636,
1544,
20,
107,
25597,
3108,
8,
11103,
1336,
5757,
21606,
1430,
5757,
19,
18515,
556,
500,
5,
21127,
6903,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 set the focus inside the Yahoo Rich Text Editor
===
I have a an HTML form which contains the YAHOO rich text editor on it.
When I display the form I want the YAHOO editor to have focus so that the cursor is ready to accept input without the user having to click on it or tab into it | 0 | [
2,
184,
92,
31,
309,
14,
1776,
572,
14,
23553,
2042,
1854,
1835,
800,
3726,
3726,
31,
57,
21,
40,
13,
15895,
505,
56,
1588,
14,
23553,
2042,
1854,
1835,
27,
32,
9,
76,
31,
3042,
14,
505,
31,
259,
14,
23553,
1835,
20,
57,
1776,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the vxWorks shared memory anchor?
===
In the vxWorks memory map, there is an area (bellow the load address of vxWorks) which is described as the "shared memory anchor".
What is it used for? | 0 | [
2,
98,
25,
14,
566,
396,
7684,
2592,
1912,
6265,
60,
800,
3726,
3726,
19,
14,
566,
396,
7684,
1912,
2942,
15,
80,
25,
40,
217,
13,
5,
3512,
4121,
14,
6305,
3218,
16,
566,
396,
7684,
6,
56,
25,
745,
28,
14,
13,
7,
16608,
43,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... |
Does the assign then evaluate of each parameter "pattern" have a name?
===
The following snippet of C# code:
int i = 1;
string result = String.Format("{0},{1},{2}", i++, i++, i++);
Console.WriteLine(result);
writes out: 1,2,3
Before I tried this in the compiler I was expecting the assignments to take place and then the evaluations, so my expected output was: 1,1,1
So my question is: Does this "pattern" (is it called a pattern?) of assign and then evaluate each parameter have a name?
EDIT: I'm referring to the pattern of evaluating and assigning the parameters to the String.Format() function. Not the incrementing of i.
(I may be incorrectly using the word evaluate in the question above because if the parameter was say (i + j) then we know that it would be evaluated before it was assigned. When using the word evaluate in that context I'm referring to the incrementing of i.)
| 0 | [
2,
630,
14,
13952,
94,
13,
15599,
16,
206,
18906,
13,
7,
5972,
8766,
7,
57,
21,
204,
60,
800,
3726,
3726,
14,
249,
13,
29061,
16,
272,
5910,
1797,
45,
19,
38,
31,
800,
137,
73,
3724,
829,
800,
3724,
9,
23588,
5,
7,
1,
387,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 grep input with Perl
===
Here at work we are working on a newsletter system that our clients can use. As an intern one of my jobs is to help with the smaller pieces of the puzzle. In this case what i need to do is scan the logs of the email server for bounced messages and add the emails and the reason the email bounced to a "bad email database".
The bad emails table has two columns: 'email' and 'reason'
I use the following statement to get the information from the logs and send it to the perl script
grep " 550 " /var/log/exim/main.log | awk '{print $5 "|" $23 " " $24 " " $25 " " $26 " " $27 " " $28 " " $29 " " $30 " " $31 " " $32 " " $33}' | perl /devl/bademails/getbademails.pl
If you have sugestions on a more efficient awk script, then I would be glad to hear those too but my main focus is the perl script. the awk pipes "foo@bar.com|reason for bounce" to the perl script. i want to take in these strings, split them at the | and put the two different parts into their respective columns in the database. Heres what I have:
#!usr/bin/perl
use strict;
use warnings;
use DBI;
my $dbpath = "dbi:mysql:database=system;host=localhost:3306";
my $dbh = DBI->connect($dbpath, "root", "******")
or die "Can't open database: $DBI::errstr";
while(<STDIN>) {
my $line = $_;
my @list = # ? this is where i am confused
for (my($i) = 0; $i < 1; $i++)
{
if (defined($list[$i]))
{
my @val = split('|', $list[$i]);
print "Email: $val[0]\n";
print "Reason: $val[1]";
my $sth = $dbh->prepare(qq{INSERT INTO bademails VALUES('$val[0]', '$val[1]')});
$sth->execute();
$sth->finish();
}
}
}
exit 0;
| 0 | [
2,
2017,
18,
68,
5604,
306,
6367,
29,
416,
255,
800,
3726,
3726,
235,
35,
170,
95,
50,
638,
27,
21,
17782,
329,
30,
318,
7421,
92,
275,
9,
28,
40,
19297,
53,
16,
51,
4844,
25,
20,
448,
29,
14,
2012,
2491,
16,
14,
9164,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to write from java to the windows event log?
===
Can you recommend what I should be using to do that? | 0 | [
2,
184,
20,
2757,
37,
8247,
20,
14,
1936,
807,
6738,
60,
800,
3726,
3726,
92,
42,
12360,
98,
31,
378,
44,
568,
20,
107,
30,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
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... |
If I grab a paramenter out of the query string, is it URL decoded?
===
In .NET if I do something like:
string temp = Request.QueryString["myKey"];
is the value in temp already URL decoded?
| 0 | [
2,
100,
31,
4931,
21,
2258,
1130,
106,
70,
16,
14,
25597,
3724,
15,
25,
32,
287,
6362,
121,
22254,
60,
800,
3726,
3726,
19,
13,
9,
2328,
100,
31,
107,
301,
101,
45,
3724,
13,
9577,
800,
3772,
9,
8190,
93,
11130,
2558,
7,
915,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Limitations in running Ruby/Rails on windows
===
In the installation documentation to RoR it mentions that there are many limitations to running Ruby on Rails on Windows, and in some cases, whole libraries do not work.
How bad are these limitations, should I always default to Linux to code / run RoR, and is Iron Ruby expected to fix these limitations or are they core to the OS itself? | 0 | [
2,
14070,
19,
946,
10811,
118,
7301,
18,
27,
1936,
800,
3726,
3726,
19,
14,
7758,
13945,
20,
761,
248,
32,
10292,
30,
80,
50,
151,
14070,
20,
946,
10811,
27,
2240,
18,
27,
1936,
15,
17,
19,
109,
1871,
15,
979,
8649,
107,
52,
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 would i package and sell a Django app?
===
Currently I am hosted a Django app I developed myself for my clients, but i am now starting to look at selling it to people for them to host themselves.
My question is this: How can i package up and sell a Django app, but also protect my code from pirating or theft. Distributing a bunch of .py files doesn't sound like a good idea as the people i sell it too could just make copies of them and pass them on.
I think for the purpose of this problem it would be safe to assume that everyone who buys this would be running the same (LAMP) setup. | 0 | [
2,
184,
83,
31,
6030,
17,
3344,
21,
3857,
14541,
4865,
60,
800,
3726,
3726,
871,
31,
589,
2812,
21,
3857,
14541,
4865,
31,
885,
992,
26,
51,
7421,
15,
47,
31,
589,
130,
1422,
20,
361,
35,
4355,
32,
20,
148,
26,
105,
20,
2015,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 a good hosted project management solution?
===
I'm looking for a hosted project management solution that meets the following criteria:
- No more than $15/mo
- Can allow public access to all projects of a company (or at least list the public projects)
- Public users can report issues, preferably put into a moderation queue
- Easy interface for reordering tasks, moving them between milestones, etc (This is less important)
Does anyone know of a service that will fit my needs? I've tried the following: Assembla, Zoho Projects, Comindwork, TeamworkPM, Basecamp. | 2 | [
2,
98,
22,
18,
21,
254,
2812,
669,
1097,
4295,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
2812,
669,
1097,
4295,
30,
5224,
14,
249,
9157,
45,
13,
8,
90,
91,
119,
19463,
118,
1293,
13,
8,
92,
1655,
317,
1381,
20,
65,
2314,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Windows Forms - Enter keypress actives submit button?
===
How can I capture enter keypress anywhere on my form and force it to fire the submit button event?
| 0 | [
2,
1936,
1997,
13,
8,
2830,
1246,
5890,
1348,
18,
12298,
5167,
60,
800,
3726,
3726,
184,
92,
31,
3683,
2830,
1246,
5890,
4922,
27,
51,
505,
17,
558,
32,
20,
535,
14,
12298,
5167,
807,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.