unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Create destinations for all bookmarks in a PDF file with iText API
===
I'd like to write some Java code that takes a PDF document, and creates named destinations from all of the bookmarks. I'm thinking that the iText API is the easiest way of doing this, but I have never used the API before.
How would you go about writing this sort of code with the iText API?
Open, find bookmarks, create destinations, save, close.
Or is there a different API that would be better? | 0 | [
2,
1600,
16821,
26,
65,
360,
4527,
18,
19,
21,
13,
11124,
3893,
29,
31,
11969,
21,
2159,
800,
3726,
3726,
31,
22,
43,
101,
20,
2757,
109,
8247,
1797,
30,
1384,
21,
13,
11124,
4492,
15,
17,
9695,
377,
16821,
37,
65,
16,
14,
360... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Code syntax formatter for posting code on webpages
===
Is there a utility that will generate html or css for blocks of code (.net c#) when you post it on a website?
I have seen several websites with very nicely formatted code and I dont believe they do this manually.
Thanks,
Alex
| 0 | [
2,
1797,
22649,
26,
24700,
26,
15669,
1797,
27,
2741,
6486,
18,
800,
3726,
3726,
25,
80,
21,
10082,
30,
129,
7920,
13,
15895,
54,
272,
18,
18,
26,
5198,
16,
1797,
13,
5,
9,
2328,
272,
5910,
6,
76,
42,
678,
32,
27,
21,
2271,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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# open source NMEA parser
===
Am looking for C# open source NMEA parser. | 0 | [
2,
272,
5910,
368,
1267,
25467,
58,
2017,
4104,
800,
3726,
3726,
589,
699,
26,
272,
5910,
368,
1267,
25467,
58,
2017,
4104,
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,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Taking the first line of a CSV file and creating a MySQL Table with the data
===
I am trying to take a rather large CSV file and insert it into a MySQL database for referencing in a project. I would like to use the first line of the file to create the table using proper data types and not varchar for each column. The ultimate goal is to automate this process as I have several similar files but the each has different data and a different amount of "columns" in CSV files. The problem that I am having is gettype() is returning 'string' for each column instead of int, float and string as I would like it to.
here is my code so far:
<?php
// GENERATE TABLE FROM FIRST LINE OF CSV FILE
$inputFile = 'file.csv';
$tableName = 'file_csv';
$fh = fopen($inputFile, 'r');
$contents = fread($fh, 5120); // 5KB
fclose($fh);
$fileLines = explode("\n", $contents); // explode to make sure we are only using the first line.
$fieldList = explode(',', $fileLines[0]); // separate columns, put into array
echo 'CREATE TABLE IF NOT EXISTS `'.$tableName.'` ('."<br/>\n";
for($i = 0; $i <= count($fieldList); $i++)
{
switch(gettype($fieldList[$i])) {
case 'integer':
$typeInfo = 'int(11)';
break;
case 'float':
$typeInfo = 'float';
break;
case 'string':
$typeInfo = 'varchar(80)';
break;
default:
$typeInfo = 'varchar(80)';
break;
}
if(gettype($fieldList[$i]) != NULL) echo "\t".'`'.$i.'` '.$typeInfo.' NOT NULL, --'.gettype($fieldList[$i]).' '.$fieldList[$i]."<br/>\n";
}
echo ' PRIMARY KEY (`0`)'."<br/>\n";
echo ') ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;';
Example First line:
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,50,'Word of Recall (OLD)',0.00000,1.00001 | 0 | [
2,
741,
14,
64,
293,
16,
21,
272,
18,
710,
3893,
17,
2936,
21,
51,
18,
22402,
859,
29,
14,
1054,
800,
3726,
3726,
31,
589,
749,
20,
247,
21,
864,
370,
272,
18,
710,
3893,
17,
14692,
32,
77,
21,
51,
18,
22402,
6018,
26,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to generate pdf files _with_ utf-8 multibyte characters using Zend Framework
===
I've got a "little" problem with Zend Framework Zend_Pdf class. Multibyte characters are stripped from generated pdf files. E.g. when I write aąbcčdeę it becomes abcd with lithuanian letters stripped.
I'm not sure if it's particularly Zend_Pdf problem or php in general.
Source text is encoded in pdf, as well as the php source file which does the job.
Thank you in advance for your help ;) | 0 | [
2,
184,
20,
7920,
13,
11124,
6488,
13,
1,
1410,
1,
287,
11720,
8,
457,
1889,
23246,
1766,
568,
10526,
43,
6596,
800,
3726,
3726,
31,
22,
195,
330,
21,
13,
7,
9113,
7,
1448,
29,
10526,
43,
6596,
10526,
43,
1,
11124,
718,
9,
188... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why use Glassfish instead of Apache? What's it strengths and weaknesses?
===
Sorry for my ignorance here, but when I hear the word webserver, I immediately imagine Apache, although I know people use Microsoft's IIS too. However since I've been hanging out here at Stackoverflow I've noticed lots of people use Glassfish.
Which made me wonder, why would I want to use Glassfish (in the sense that I'm interested, but I don't really understand why it might make my life easier). From what I read it's Sun's open-source derivate of Apache's Tomcat, thus I imagine it's a good (or great) quality product. But since I don't know its strengths and weaknesses, I don't know when it would be wise to choose Glassfish over another server. Could anyone elaborate ? | 0 | [
2,
483,
275,
1350,
4934,
700,
16,
17140,
60,
98,
22,
18,
32,
2169,
18,
17,
23732,
60,
800,
3726,
3726,
1875,
26,
51,
20949,
235,
15,
47,
76,
31,
990,
14,
833,
2741,
10321,
106,
15,
31,
1375,
4382,
17140,
15,
419,
31,
143,
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... |
Where does vb.net get it's edit window size, and how do you modify it?
===
My VB.Net Winforms app is a tool to allow heirarchical data to be edited in a tree, then stored in a database. I am using a treeview control.
Content is drag-dropped from other documents onto the treenodes, or the nodes can be edited directly.
if I edit the database field directly, and enter a bit of content (a thousand characters long or more!), the treeview will happily display it.. but, when I drag drop, the data is being truncated at 259 characters. If I edit directly, the maximum edit 'window' is also 259 characters.
259 seems like a really strange number to stop at, so I am wondering - where does this size come from, and can I change it programmatically?
| 0 | [
2,
113,
630,
13,
20468,
9,
2328,
164,
32,
22,
18,
9392,
1463,
1072,
15,
17,
184,
107,
42,
17579,
32,
60,
800,
3726,
3726,
51,
13,
20468,
9,
2328,
628,
4190,
18,
4865,
25,
21,
5607,
20,
1655,
7678,
8027,
4272,
1054,
20,
44,
480... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 a new rrd database based on an existing one
===
I have some old rrdtool databases, for which the exact creation recipe has long been since lost. I need to create a new database with the same characteristics as the current ones. I've dumped a couple of old databases and pored over the contents but I'm not sure how to interpret the metadata. I think it appears in the following stanzas
<cf> AVERAGE </cf>
<pdp_per_row> 360 </pdp_per_row> <!-- 1800 seconds -->
<xff> 5.0000000000e-01 </xff>
There are four such stanzas, which correspond to the way I recall the round-robin cascading was set up. Has anyone already done this, or can give me pointers as to how to clone a new empty rrd database from an existing one? Or show me where I missed this in the documentation.
| 0 | [
2,
2936,
21,
78,
761,
897,
6018,
432,
27,
40,
3149,
53,
800,
3726,
3726,
31,
57,
109,
315,
761,
897,
20799,
6018,
18,
15,
26,
56,
14,
5340,
2502,
20510,
63,
175,
74,
179,
529,
9,
31,
376,
20,
1600,
21,
78,
6018,
29,
14,
205,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 disk write cache
===
When the policy for a disk in Windows XP and Vista is set to enable write caching on the hard disk, is there a way to flush a file that has just been written, and ensure that it has been committed to disk? | 0 | [
2,
4433,
8582,
2757,
16522,
800,
3726,
3726,
76,
14,
1486,
26,
21,
8582,
19,
1936,
23045,
17,
13520,
25,
309,
20,
9240,
2757,
1658,
7192,
27,
14,
552,
8582,
15,
25,
80,
21,
161,
20,
15017,
21,
3893,
30,
63,
114,
74,
642,
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,
0,
0,
0,
0,
0,
0,
0,
0... |
Open port 8080 (APACHE) in ISA Server 2006
===
Im using APACHE as my web server and using port 8080. Ive create a site called
(e.g. http://test.domain.com:8080). I have a Firewall (ISA Server 2006).
How am I suppose to establish "http://test.domain.com:8080"in ISA Server?
Will I just add "http://test.domain.com" as its public name or with this "http://test.domain.com:8080"?
any suggestion will be appreciated.
Thanks. :D | 0 | [
2,
368,
1295,
2972,
2887,
13,
5,
7738,
2569,
6,
19,
25,
58,
8128,
592,
800,
3726,
3726,
797,
568,
17140,
28,
51,
2741,
8128,
17,
568,
1295,
2972,
2887,
9,
5568,
1600,
21,
689,
227,
13,
5,
62,
9,
263,
9,
7775,
6903,
10543,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it possible to use the LoginView control in combitation with the server session in ASP.NET?
===
Is it possible to use the LoginView control in combitation with the server session in ASP.NAT? | 0 | [
2,
25,
32,
938,
20,
275,
14,
6738,
108,
4725,
569,
19,
12994,
242,
857,
29,
14,
8128,
3723,
19,
28,
306,
9,
2328,
60,
800,
3726,
3726,
25,
32,
938,
20,
275,
14,
6738,
108,
4725,
569,
19,
12994,
242,
857,
29,
14,
8128,
3723,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How to pass mouse events to applications behind mine in C#/Vista?
===
I am writing a very specialized app in C# that floats as a mostly transparent window over the entire desktop. I want to be able to generate and pass mouse events to applications behind mine, and have them appear to operate "normally", responding to those events. It would also be preferable if the window manager could respond.
I am not a Windows guru, and am unsure of how to best accomplish this.
From this page:
http://bytes.com/forum/thread270002.html
it would appear that mouse_event would be good, except that since my app is floating over everything else, I'm guessing my generated events would never make it to the other apps underneath.
It seems the alternative is SendMessage, but that requires a fair amount of manual manipulation of windows, and the mouse events generated aren't "authentic."
Any thoughts on the best way to approach this? | 0 | [
2,
184,
20,
1477,
7567,
963,
20,
3767,
439,
1114,
19,
272,
5910,
118,
22034,
60,
800,
3726,
3726,
31,
589,
1174,
21,
253,
7119,
4865,
19,
272,
5910,
30,
11510,
18,
28,
21,
1555,
14862,
1463,
84,
14,
1078,
17404,
9,
31,
259,
20,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I restore a windows size and position in a wxRuby app?
===
Does anyone know of any sample code for restoring a window's position and size in wxRuby?
| 0 | [
2,
184,
107,
31,
8454,
21,
1936,
1072,
17,
649,
19,
21,
619,
396,
1820,
779,
4865,
60,
800,
3726,
3726,
630,
1276,
143,
16,
186,
5717,
1797,
26,
19144,
21,
1463,
22,
18,
649,
17,
1072,
19,
619,
396,
1820,
779,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
TFS: comparing shelveset files with local version
===
When viewing files in a shelveset, I would like the option of comparing the files to my current local version. Unfortunately, the only options available are "With Unmodified", "With Workspace" (I guess this one would be the answer, if it wasn't disabled) and "With Latest".
Any ideas? | 0 | [
2,
13,
11720,
18,
45,
15047,
18117,
1198,
6488,
29,
375,
615,
800,
3726,
3726,
76,
11244,
6488,
19,
21,
18117,
1198,
15,
31,
83,
101,
14,
4255,
16,
15047,
14,
6488,
20,
51,
866,
375,
615,
9,
6200,
15,
14,
104,
6368,
904,
50,
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 to map caller memory in a Windows CE device driver past the end of a call to XXX_IOControl?
===
I'm implementing a ioctl in a Windows CE device driver that takes a pointer to a large chunk of application memory to perform asynchronous I/O initiated through an application call to DeviceIoControl.
When using MapCallerPtr(), the pointer gets unmapped when the XXX_IOControl function returns; when the pointer is used in the IST it is no longer mapped leading to a crash.
What is the best way to map the pointer beyond the end of the call to XXX_IOControl? The application guarantees that the memory will remain valid until it has received an indication from the driver that the driver has finished with it.
This is on Windows CE 5.0. | 0 | [
2,
184,
20,
2942,
21326,
1912,
19,
21,
1936,
4000,
3646,
2425,
640,
14,
241,
16,
21,
645,
20,
13,
13290,
1,
1963,
12898,
60,
800,
3726,
3726,
31,
22,
79,
17333,
21,
31,
2499,
7786,
19,
21,
1936,
4000,
3646,
2425,
30,
1384,
21,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you structure your NUnit tests on a large project?
===
I am interested in seeing if I can improve the way we use NUnit in a Visual Studio solution containing 30+ projects.
First, would you have one assembly of tests for every assembly in the solution, or would you try to keep the number of test assemblies down? I started off creating many test assemblies, but I think this is costing us a lot in terms of build time.
Second, what strategy do you use for managing those tests that are long-running, or require special environment configuration? I would like to write an MSBuild script that automates the running of our unit tests, but it needs to skip over the tests that would take too long or would not work on the build machine. | 0 | [
2,
184,
107,
42,
1411,
154,
10210,
242,
4894,
27,
21,
370,
669,
60,
800,
3726,
3726,
31,
589,
3158,
19,
2078,
100,
31,
92,
3545,
14,
161,
95,
275,
10210,
242,
19,
21,
3458,
1120,
4295,
3503,
712,
2430,
2314,
9,
64,
15,
83,
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... |
Calling JS from Applet: MalformedURLException: unknown protocol: javascript
===
I read that you could call JavaScript code from a Java Applet by calling
JApplet.getAppletContext().showDocument( "javascript:alert('Hello World');" );
However, when I do this i get the following error:
java.net.MalformedURLException: unknown protocol: javascript
How do I work around this? | 0 | [
2,
2555,
487,
18,
37,
4037,
38,
45,
2814,
12609,
911,
255,
10066,
872,
45,
2562,
8494,
45,
8247,
8741,
800,
3726,
3726,
31,
1302,
30,
42,
110,
645,
8247,
8741,
1797,
37,
21,
8247,
4037,
38,
34,
2555,
487,
24212,
38,
9,
3060,
242... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 portable equivalent to __debugbreak()?
===
In MSVC the __debugbreak() intrinsic causes a debugger to break. On x86 it is equivalent to writing "_asm int 3", on x64 it is something different. When compiling with gcc (or any other standard compiler) I want to do a break into debugger, too. Is there a platform independent function or intrinsic? I saw the [XCode question][1] about that, but it doesn't seem portable enough.
Sidenote: I mainly want to implement ASSERT with that, and I understand I can use assert() for that, but I also want to write DEBUG_BREAK or somthing into the code.
[1]: http://stackoverflow.com/questions/37299/xcode-equivalent-of-asm-int-3-debugbreak-halt | 0 | [
2,
25,
80,
21,
13469,
4602,
20,
13,
1,
546,
16254,
12008,
5,
6,
60,
800,
3726,
3726,
19,
4235,
8990,
14,
13,
1,
546,
16254,
12008,
5,
6,
22892,
4047,
21,
121,
2345,
11356,
20,
1442,
9,
27,
993,
3274,
32,
25,
4602,
20,
1174,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 make git svn "relocate" branch files on checkout?
===
Our svn repository has lots of branches that are branches off of sub-trees. This works OK with svn because I can check out that sub-tree in the correct spot in my working copy. However, if I check out the same branch using git, I get a working copy with only the branch sub-tree. Is it possible to make git relocate the branch so that my working copy structure is identical whether I am on trunk or a branch? | 0 | [
2,
25,
32,
938,
20,
233,
13,
10404,
13,
18,
16578,
13,
7,
99,
1415,
9530,
7,
1686,
6488,
27,
2631,
1320,
60,
800,
3726,
3726,
318,
13,
18,
16578,
24869,
63,
7503,
16,
4395,
30,
50,
4395,
168,
16,
972,
8,
8101,
18,
9,
48,
693... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 sample uses of LWJGL?
===
I have seen the official demos on lwjgl.org but I would like to see some more tutorial level examples. | 0 | [
2,
113,
92,
31,
477,
5717,
2027,
16,
13,
23281,
728,
8430,
60,
800,
3726,
3726,
31,
57,
541,
14,
989,
19494,
27,
13,
23281,
728,
8430,
9,
5583,
47,
31,
83,
101,
20,
196,
109,
91,
29724,
662,
3770,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How do I see Debug.WriteLine statements when using TestDriven.Net?
===
I'm trying to use TestDriven.Net not only to test my code, but to call a function on my code whose purpose is to print out the internal state of the code to the Debug window.
Here's a very simplified example of what I'm trying to do..
<TestFixture()> _
Public Class UnitTest
<Test()> _
Public Sub TestDebug()
Dim oClass1 As New Class1
Assert.AreEqual(True, oClass1.IsTrue)
Debug.WriteLine("About to call .PrintDebug()")
oClass1.PrintToDebug()
End Sub
End Class
Public Class Class1
Private _IsTrue As Boolean = True
Public ReadOnly Property IsTrue() As Boolean
Get
Return _IsTrue
End Get
End Property
Public Sub PrintToDebug()
Debug.WriteLine("Internal state of Class1: " & _IsTrue)
End Sub
End Class
I'm trying to test the Public interface of Class1, and somehow view the output from the `Class1.PrintToDebug()` function.
I've looked through the [TestDriven.Net quickstart][1], which shows examples of using the `Debug.WriteLine` in a unit test, but strangely this doesn't work for me either - i.e. the only Output in my 'Test' window is:
------ Test started: Assembly: ClassLibrary1.dll ------
1 passed, 0 failed, 0 skipped, took 1.19 seconds.
I've tried looking in the other windows (Debug and Build), the Debug window has the 'Program Output' and 'Exception Messages' options enabled.
I've looked for options or preferences and can't find any!
Thanks for your help!
[1]: http://www.testdriven.net/quickstart.aspx | 0 | [
2,
184,
107,
31,
196,
121,
16254,
9,
23716,
1143,
9015,
76,
568,
1289,
14489,
9,
2328,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
275,
1289,
14489,
9,
2328,
52,
104,
20,
1289,
51,
1797,
15,
47,
20,
645,
21,
1990,
27,
51,
1797,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I get a list of files that have been added to the SVN since a certain date?
===
I only want a list of files that have been added (not ones that have been modified) since a certain date. Is there an easy way to do this? | 0 | [
2,
184,
107,
31,
164,
21,
968,
16,
6488,
30,
57,
74,
905,
20,
14,
13,
18,
16578,
179,
21,
1200,
1231,
60,
800,
3726,
3726,
31,
104,
259,
21,
968,
16,
6488,
30,
57,
74,
905,
13,
5,
1270,
53,
18,
30,
57,
74,
5372,
6,
179,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Version control for video editing work
===
I am looking into improving the backup process a group of animators use. Currently they back up their work into external hard drives or DVDs manually, taking full copies of everything. The data consists of thousands of high resolution images, project files of various video editing software and sound files. Basically everything is binary data and nothing should ever be merged on checkin.
Should I investigate version control systems that I would use as a software developer (Subversion, GIT etc.), or is there a class of version control systems intended for non-SW data that would suit these needs better? | 0 | [
2,
615,
569,
26,
763,
9510,
170,
800,
3726,
3726,
31,
589,
699,
77,
9273,
14,
10119,
953,
21,
214,
16,
14487,
10778,
275,
9,
871,
59,
97,
71,
66,
170,
77,
4886,
552,
10396,
54,
3527,
18,
23671,
15,
741,
503,
3298,
16,
796,
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... |
Can I Define Exceptions to Eclipse cleanup rules?
===
Most often the cleanup rules (Preferences > Java > Code Style > Clean Up) in Eclipse work perfectly and create nice-looking code.
But sometimes, especially with comments and concatenated string snippets (like inline SQL queries), the cleanup just messes things up, and destroys my formatting.
Is there a way to say to Eclipse _"Don't touch this block of text! I have formatted it just the way I like, and you would make it just less readable"_? | 0 | [
2,
92,
31,
9267,
13392,
20,
11652,
26862,
1761,
60,
800,
3726,
3726,
127,
478,
14,
26862,
1761,
13,
5,
306,
28018,
18,
13,
1,
8247,
13,
1,
1797,
1034,
13,
1,
2745,
71,
6,
19,
11652,
170,
5759,
17,
1600,
2210,
8,
7940,
1797,
9,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I make modal dialog for a Page in my WPF-application?
===
I have a WPF Window which has a among other controls hosts a Frame. In that frame I display different pages. Is there way to make a dialog modal to only a page? When I'm showing the dialog it should not be possible to click on any control on the page but it should be possible to click on a control on the same window that is not on the page. | 0 | [
2,
184,
107,
31,
233,
13,
20756,
28223,
26,
21,
2478,
19,
51,
619,
7721,
8,
2552,
20669,
60,
800,
3726,
3726,
31,
57,
21,
619,
7721,
1463,
56,
63,
21,
497,
89,
8671,
5397,
21,
3523,
9,
19,
30,
3523,
31,
3042,
421,
4434,
9,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why is there no RAII in .NET?
===
Being primarily a C++ developer the absence of [RAII (Resource Acquisition Is Initialization)](http://en.wikipedia.org/wiki/Resource_acquisition_is_initialization) in Java and .NET has always bothered me. The fact that the onus of cleaning up is moved from the class writer to its consumer (by means of `try finally` or .NET's [`using` construct](http://blogs.msdn.com/cyrusn/archive/2005/05/10/415956.aspx)) seems to be markedly inferior.
I see why in Java there is no support for RAII since all objects are located on the heap and the garbage collector inherently doesn't support deterministic destruction, but in .NET with the introduction of value-types (`struct`) we have the (seemingly) perfect candidate for RAII. A value type that's created on the stack has a well defined scope and C++ destructor semantics can be used. However the CLR does not permit a value-type to have a destructor.
My random searches found one argument that if a value-type is [boxed](http://www.csharphelp.com/archives/archive100.html) it falls under the jurisdiction of the garbage collector and therefore its destruction becomes non-deterministic.
I feel that this argument isn't strong enough, the benefits of RAII are big enough to say that a value-type with a destructor cannot be boxed (or used as a class member).
**To cut a long story short my question is**: are there any other reasons value types can not be used in order to introduce RAII to .NET? (or do you think my argument about RAII's obvious advantages are flawed?)
---
I can't help but end with a apropos quotation which I once saw but can't currently find its origin.
> You can take my deterministic destruction when my cold dead hand goes out of scope. --*Anon*
| 0 | [
2,
483,
25,
80,
90,
6623,
49,
19,
13,
9,
2328,
60,
800,
3726,
3726,
142,
2257,
21,
272,
20512,
10058,
14,
5315,
16,
636,
9618,
49,
13,
5,
99,
12097,
5860,
25,
2104,
1829,
6,
500,
5,
21127,
6903,
219,
9,
17375,
26132,
9,
5583,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
String literals inside functions: automatic variables or allocated in heap?
===
Are the string literals we use inside functions automatic variables? Or are they allocated in heap which we have to free manually?
I've a situation like the code shown below wherein I'm assigning a string literal to a private field of the class (marked as ONE in the code) and retrieving it much later in my program and using it (marked as TWO). Am I assigning a variable in the stack to a field in ONE? Can the code be referencing to a dangling pointer which in this case worked because the program was small enough?
I've compiled and ran it, it worked fine but I'm having a strange crash in my actual program where I'm assigning string literals to fields of the class like this and I suspect the case I mentioned above.
#include <iostream>
using namespace std;
class MemoryLeak
{
private:
char *s;
public:
MemoryLeak() {}
void store()
{
s = "Storing a string"; // ONE
}
char *retrieve()
{
return s;
}
};
int main()
{
MemoryLeak *obj = new MemoryLeak();
obj->store();
cout << obj->retrieve() << endl; // TWO
delete obj;
return 0;
}
Should I be declaring the variable "s" as a char array instead of a pointer? I'm planning to use std::string, but I'm just curious about this.
Any pointers or help is, as always, much appreciated :) Thanks. | 0 | [
2,
3724,
20665,
18,
572,
3719,
45,
6715,
12157,
54,
11685,
19,
15414,
60,
800,
3726,
3726,
50,
14,
3724,
20665,
18,
95,
275,
572,
3719,
6715,
12157,
60,
54,
50,
59,
11685,
19,
15414,
56,
95,
57,
20,
551,
23671,
60,
31,
22,
195,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it possible to pass arguments into event bindings?
===
I haven't found an answer elsewhere and this doesn't appear to have been asked yet on SO.
When creating an event binding in wxPython, is it possible to pass additional arguments to the event? For example, this is the normal way:
b = wx.Button(self, 10, "Default Button", (20, 20))
self.Bind(wx.EVT_BUTTON, self.OnClick, b)
def OnClick(self, event):
self.log.write("Click! (%d)\n" % event.GetId())
But is it possible to have another argument passed to the method? Such that the method can tell if more than one widget is calling it but still return the same value?
It would greatly reduce copy & pasting the same code but with different callers. | 0 | [
2,
25,
32,
938,
20,
1477,
10553,
77,
807,
8728,
18,
60,
800,
3726,
3726,
31,
2933,
22,
38,
216,
40,
1623,
6040,
17,
48,
1437,
22,
38,
1893,
20,
57,
74,
411,
768,
27,
86,
9,
76,
2936,
40,
807,
8728,
19,
619,
396,
6448,
11570,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 develop for both Portriat and Landscape display formats?
===
I'm currently developing for a handheld device running Windows XP Professional (not Tablet PC edition). The device allows users to switch from the standard widescreen landscape display format to a portrait one. I would like to know if there are any VB.NET code snippets to help me along with this task. | 0 | [
2,
184,
107,
31,
2803,
26,
156,
1295,
2548,
38,
17,
4453,
3042,
13767,
60,
800,
3726,
3726,
31,
22,
79,
871,
3561,
26,
21,
27406,
3646,
946,
1936,
23045,
736,
13,
5,
1270,
16394,
5168,
1322,
6,
9,
14,
3646,
2965,
3878,
20,
5521,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Which SSO Framework to use?
===
I've used [OpenSSO][1] (which is very powerful but complicated) and [JOSSO][2] (very simple but lacking many features).
I've also looked at the [CAS][3] framework.
My question is: What is your recommendation & insights regarding the different SSO frameworks (preferably Java oriented)?
[1]: https://opensso.dev.java.net/
[2]: http://www.josso.org/confluence/display/JOSSO1/JOSSO+-+Java+Open+Single+Sign-On+Project+Home
[3]: http://www.ja-sig.org/products/cas/ | 0 | [
2,
56,
13,
18,
656,
6596,
20,
275,
60,
800,
3726,
3726,
31,
22,
195,
147,
636,
10157,
18,
656,
500,
2558,
165,
500,
13,
5,
2140,
25,
253,
2177,
47,
8343,
6,
17,
636,
1636,
18,
656,
500,
2558,
135,
500,
13,
5,
7864,
1935,
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... |
How can I delete a specific node within a XML file by using vbscript
===
I am having the problem that I cannot select a specific XML node which needs to be deleted. I have already tried to select the node by using the XPath which works fine for some XML files but I cannot figure out the correct XPath for a node in a more complex file.
Does anybody know a freeware tool which can load a XML file so that the user can select a specific node and receives the accurate XPath without having an enumeration in the path?
"/root/anything[2]" <-- unfortunatly I cannot use such a statement because the number of the element might change. I need an expression that is based on an attribute.
In case that there is no freeware tool for this operation, does anybody know another way how I can select the needed node?
Thanks in advance! | 0 | [
2,
184,
92,
31,
27448,
21,
1903,
15421,
363,
21,
23504,
3893,
34,
568,
13,
20468,
8741,
800,
3726,
3726,
31,
589,
452,
14,
1448,
30,
31,
1967,
5407,
21,
1903,
23504,
15421,
56,
2274,
20,
44,
19584,
9,
31,
57,
614,
794,
20,
5407,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Inline editing in a winforms textbox at design time...
===
I'm using a custom winforms 2.0 designer (i.e. my apps hosting the designer) which is being used for a small internal project.
So far all the controls have their properties edited via the property grid - but I'd like to make it a little more user-friendly by allowing in-line editing - does anyone know of an example of how to implement in-line editing within the windows forms designer (just for typing plain text at this stage). | 0 | [
2,
19,
1143,
9510,
19,
21,
628,
4190,
18,
1854,
5309,
35,
704,
85,
9,
9,
9,
800,
3726,
3726,
31,
22,
79,
568,
21,
5816,
628,
4190,
18,
172,
9,
387,
4742,
13,
5,
49,
9,
62,
9,
51,
4865,
18,
10637,
14,
4742,
6,
56,
25,
142... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SQL Server: Copying column within table
===
what is the easiest way to copy the all the values from a column in a table to another column in the same table? | 0 | [
2,
4444,
255,
8128,
45,
4344,
68,
4698,
363,
859,
800,
3726,
3726,
98,
25,
14,
27237,
161,
20,
4344,
14,
65,
14,
4070,
37,
21,
4698,
19,
21,
859,
20,
226,
4698,
19,
14,
205,
859,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Why are database joins expensive?
===
I'm doing some research into databases and I'm looking at some limitations of relational DBs.
I'm getting that joins of large tables is very expensive, but I'm not completely sure why. What does the DBMS need to do to execute a join operation, where is the bottleneck?
How can denormalization help to overcome this expense? Can other optimization techniques (indexing, for example) help?
Personal experiences are welcome! If you're going to post links to resources, please avoid Wikipedia. I know where to find that already.
Thanks! | 0 | [
2,
483,
50,
6018,
10612,
5381,
60,
800,
3726,
3726,
31,
22,
79,
845,
109,
527,
77,
6018,
18,
17,
31,
22,
79,
699,
35,
109,
14070,
16,
5827,
192,
13,
9007,
18,
9,
31,
22,
79,
1017,
30,
10612,
16,
370,
7484,
25,
253,
5381,
15,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to save encrypted data in cookie (using php)?
===
I would like to save data in cookies (user name, email address, etc...) but I don't the user to easily read it or modify it. I need to be able able to read the data back. How can I do that with php 5.2+? | 0 | [
2,
184,
20,
2079,
29403,
1054,
19,
19980,
13,
5,
12655,
13,
26120,
6,
60,
800,
3726,
3726,
31,
83,
101,
20,
2079,
1054,
19,
19396,
13,
5,
16704,
204,
15,
8517,
3218,
15,
2722,
9,
9,
9,
6,
47,
31,
221,
22,
38,
14,
4155,
20,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
To Which Open Source Projects Do You Contribute?
===
Are you regularly contributing to any open source projects?
Which ones?
How many contributions have you made?
What attracted you to them? | 2 | [
2,
20,
56,
368,
1267,
2314,
107,
42,
8606,
60,
800,
3726,
3726,
50,
42,
4217,
7548,
20,
186,
368,
1267,
2314,
60,
56,
53,
18,
60,
184,
151,
4816,
57,
42,
117,
60,
98,
5201,
42,
20,
105,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do you plan your web app?
===
I am wondering how everybody plans their web apps. Do you write out a list of functions and tick them off when done? Do you have stacks of paper with Use Cases all over them?
What is the sweet spot between not planning at all and doing so much planning that your deadline has passed before you have even started? | 4 | [
2,
184,
107,
42,
944,
154,
2741,
4865,
60,
800,
3726,
3726,
31,
589,
5712,
184,
8903,
1753,
66,
2741,
4865,
18,
9,
107,
42,
2757,
70,
21,
968,
16,
3719,
17,
8809,
105,
168,
76,
677,
60,
107,
42,
57,
7566,
18,
16,
1397,
29,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why does Installshield 2008 not roll back XML Changes?
===
I am using Installshield 2008 Premier to edit some XML files which are already on the targetsystem. This process does work fine with the "XML file changes" function.
My problem is, that Installshield does not remove these changes on uninstall. I have set the "Remove element on uninstall" checkbox within the added element but InstallShield seems to consequently ignore this.
Has anybody an idea how to solve this problem? | 0 | [
2,
483,
630,
16146,
29026,
570,
52,
3001,
97,
23504,
1693,
60,
800,
3726,
3726,
31,
589,
568,
16146,
29026,
570,
2474,
20,
9392,
109,
23504,
6488,
56,
50,
614,
27,
14,
2935,
10724,
9,
48,
953,
630,
170,
1123,
29,
14,
13,
7,
396,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best / easiest way to talk to SQLite from .NET?
===
Question says it all, really.
My application is a time tracker. It's currently written as a spreadsheet, but there's just too much data and I would like to impose a bit more structure on it.
SQLLite seems like a neat way to go.
I would be open to other suggestions, too. | 0 | [
2,
98,
25,
14,
246,
13,
118,
27237,
161,
20,
930,
20,
4444,
10601,
37,
13,
9,
2328,
60,
800,
3726,
3726,
1301,
898,
32,
65,
15,
510,
9,
51,
3010,
25,
21,
85,
792,
106,
9,
32,
22,
18,
871,
642,
28,
21,
1789,
17627,
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... |
Apache uses excessive CPU
===
We run a medium-size site that gets a few hundred thousand pageviews a day. Up until last weekend we ran with a load usually below 0.2 on a virtual machine. The OS is Ubuntu.
When deploying the latest version of our application, we also did an apt-get dist-upgrade before deploying. After we had deployed we noticed that the load on the CPU had spiked dramatically (sometimes reaching 10 and stopping to respond to page requests).
We tried dumping a full minute of Xdebug profiling data from PHP, but looking through it revealed only a few somewhat slow parts, but nothing to explain the huge jump.
We are now pretty sure that nothing in the new version of our website is triggering the problem, but we have no way to be sure. We have rolled back a lot of the changes, but the problem still persists.
When look at processes, we see that single Apache processes use quite a bit of CPU over a longer period of time than strictly necessary. However, when using strace on the affected process, we never see anything but
accept(3,
and it hangs for a while before receiving a new connection, so we can't actually see what is causing the problem.
The stack is PHP 5, Apache 2, MySQL 5.1. Most things run through Memcached. We've tried APC and eAccelerator.
So, what should be our next step? Are there any profiling methods we overlooked/don't know about? | 0 | [
2,
17140,
2027,
11513,
17578,
800,
3726,
3726,
95,
485,
21,
4152,
8,
10454,
689,
30,
3049,
21,
310,
1874,
2996,
2478,
4725,
18,
21,
208,
9,
71,
163,
236,
4010,
95,
717,
29,
21,
6305,
951,
1021,
713,
9,
135,
27,
21,
6599,
1940,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Coverity for Java static analysis
===
I'd like to get comments from people who have used or evaluated Coverity for statically analysing Java-code. I know it's popular in C/C++ world, but is it worth spending the money for Java analysis or am I better of with PMD, Findbugs and other FOSS tools?
| 0 | [
2,
1227,
856,
26,
8247,
12038,
2495,
800,
3726,
3726,
31,
22,
43,
101,
20,
164,
7534,
37,
148,
72,
57,
147,
54,
19018,
1227,
856,
26,
12038,
1326,
40,
24222,
68,
8247,
8,
9375,
9,
31,
143,
32,
22,
18,
844,
19,
272,
118,
150,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is .NET memory allocation is faster in managed code than in native code?
===
I would have thought that it would be clear cut whether memory allocation is faster in managed code than in native code - [but there seems to be some controversy][1]. Perhaps memory management under a Virtual Machine be faster because of no context-swapping calls to the OS, but then I see that the VM would itself need to make periodic calls to the OS for more memory, and it has the management overheads the memory itself rather than the OS.
Rather than making unsubstantiated assertions like I have, please provide links to references that support your position.
[1]: http://stackoverflow.com/questions/173591/what-myths-have-you-heard-about-regarding-the-net-framework | 0 | [
2,
25,
13,
9,
2328,
1912,
16840,
25,
4233,
19,
1471,
1797,
119,
19,
1275,
1797,
60,
800,
3726,
3726,
31,
83,
57,
289,
30,
32,
83,
44,
1207,
1077,
1472,
1912,
16840,
25,
4233,
19,
1471,
1797,
119,
19,
1275,
1797,
13,
8,
636,
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... |
What is the best way of drawing trees using Java and OpenGL?
===
'Trees' as in a forest :)
Are there free tree-drawing libraries available in Java?
Are there non-Java (probably C/C++) libraries that could be integrated with a Java OpenGL program?
| 0 | [
2,
98,
25,
14,
246,
161,
16,
3533,
1913,
568,
8247,
17,
368,
8430,
60,
800,
3726,
3726,
13,
22,
8101,
18,
22,
28,
19,
21,
1334,
13,
45,
6,
50,
80,
551,
1541,
8,
3030,
3546,
8649,
904,
19,
8247,
60,
50,
80,
538,
8,
1004,
13... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is SVN 1.5 Merge-tracking ready for prime-time?
===
I'm already using SVN 1.5, both sever(VisualSVN 1.5.1) and client-side(TortoiseSVN 1.5.1) but we are using a fairly lengthy SVN Branch-Merge dance.
How ready is the Merge-Tracking facility of SVN 1.5.x and is it yet possible to use it from TortoiseSVN? | 0 | [
2,
25,
13,
18,
16578,
137,
9,
264,
12666,
8,
4792,
68,
1451,
26,
1621,
8,
891,
60,
800,
3726,
3726,
31,
22,
79,
614,
568,
13,
18,
16578,
137,
9,
264,
15,
156,
15114,
5,
20893,
18,
16578,
137,
9,
264,
9,
165,
6,
17,
6819,
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 can I iterate recursivly though a sharepoint list using webservices?
===
in sharepoint webservices, I can use getListItems() to obtain the child elements of a list.
In a document library, sometimes the element is a folder.
"ows_FSObjType = 1"
Is there any way to ask SP for the child elements of this folder?
Querying with getListItems() using the folder ID gives me a SOAP Exception.
Thanks. | 0 | [
2,
184,
92,
31,
32,
106,
1373,
26604,
18,
3757,
102,
362,
21,
1891,
3132,
968,
568,
2741,
11449,
18,
60,
800,
3726,
3726,
19,
1891,
3132,
2741,
11449,
18,
15,
31,
92,
275,
164,
5739,
2119,
79,
18,
5,
6,
20,
5545,
14,
850,
2065... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 stop a UIScrollView from bouncing horizontally?
===
I have a UIScrollView that shows vertical data, but where the horizontal component is no wider than the screen of the iPhone. The problem is that the user is still able to drag horizontally, and basically expose blank sections of the UI. I have tried setting:
scrollView.alwaysBounceHorizontal = NO;
scrollView.directionalLockEnabled = YES;
Which helps a little, but still doesn't stop the user from being able to drag horizontally. Surely there is a way to fix this easily? | 0 | [
2,
184,
107,
31,
747,
21,
13,
5661,
3862,
8694,
4725,
37,
19741,
25658,
60,
800,
3726,
3726,
31,
57,
21,
13,
5661,
3862,
8694,
4725,
30,
1285,
7035,
1054,
15,
47,
113,
14,
10095,
5912,
25,
90,
6350,
119,
14,
2324,
16,
14,
21024,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Java: Serializing unknown Arraysize
===
If I safe an Array and reload it, is there a possibility to get the size if its unknown?
Thanks | 0 | [
2,
8247,
45,
5956,
3335,
2562,
7718,
10454,
800,
3726,
3726,
100,
31,
1834,
40,
7718,
17,
27339,
32,
15,
25,
80,
21,
4813,
20,
164,
14,
1072,
100,
82,
2562,
60,
3669,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
AutoPostback with TextBox loses focus
===
A textbox is set to AutoPostback as changing the value should cause a number of (display-only) fields to be recalculated and displayed. That works fine. However, when the field is tabbed out of, the focus briefly moves on to the next field, then disappears when the page is redrawn so there is no focus anywhere. Is there a way to work out which field had the focus and force it to have it again when the page is redrawn? | 0 | [
2,
3108,
6962,
1958,
29,
1854,
5309,
14745,
1776,
800,
3726,
3726,
21,
1854,
5309,
25,
309,
20,
3108,
6962,
1958,
28,
4226,
14,
1923,
378,
1679,
21,
234,
16,
13,
5,
2906,
5438,
8,
4965,
6,
2861,
20,
44,
302,
16304,
13045,
17,
61... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Should exceptions be in a different project
===
When structuring a visual studio solution I tend to structure it so that various components are in different project (As I would assume most people do) I tend to have a bunch of User defined exceptions.
The Question is should these exceptions be in a separate project to the (for example) Model classes?
I tend to put them in a sub-namespace of the model, and organise them in a directory within the Model project. but should they be in a separate project all together? | 0 | [
2,
378,
13392,
44,
19,
21,
421,
669,
800,
3726,
3726,
76,
13,
10346,
10450,
21,
3458,
1120,
4295,
31,
5480,
20,
1411,
32,
86,
30,
617,
5090,
50,
19,
421,
669,
13,
5,
472,
31,
83,
7158,
127,
148,
107,
6,
31,
5480,
20,
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... |
MySQL Alter syntax to drop a column if it exists
===
What is the syntax to drop a column in a MySQL table, if that column exists on version 4.0.18?
| 0 | [
2,
51,
18,
22402,
7835,
22649,
20,
2804,
21,
4698,
100,
32,
5636,
800,
3726,
3726,
98,
25,
14,
22649,
20,
2804,
21,
4698,
19,
21,
51,
18,
22402,
859,
15,
100,
30,
4698,
5636,
27,
615,
268,
9,
387,
9,
1087,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How to I get the function name while in a function for debug strings?
===
I want to output the function name each time it is called, I can easily copy and paste the function name, however I wondered if there was a shortcut that would do the job for me?
At the moment I am doing:
SlideInfoHeader* lynxThreeFile::readSlideInfoHeader(QDataStream & in)
{
qDebug("lynxThreeFile::readSlideInfoHeader");
}
but what I want is something generic:
SlideInfoHeader* lynxThreeFile::readSlideInfoHeader(QDataStream & in)
{
qDebug(this.className() + "::" + this.functionName());
} | 0 | [
2,
184,
20,
31,
164,
14,
1990,
204,
133,
19,
21,
1990,
26,
121,
16254,
7887,
60,
800,
3726,
3726,
31,
259,
20,
5196,
14,
1990,
204,
206,
85,
32,
25,
227,
15,
31,
92,
2351,
4344,
17,
640,
62,
14,
1990,
204,
15,
207,
31,
3519,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Showing a loader while Spry XMLDataset loads teh data
===
i am using Spry (SpryData.js,xpath.js)
var ds1 = new Spry.Data.XMLDataSet("_db/db.xml", "bildiriler/bildiri",{useCache:false});
// load the xml tree
....
<!-- use it in a loop -
Sometimes the page use "ds1.loadData();" to refresh the data -->
<div spry:region="ds1" spry:repeatchildren="ds1">
<a href="#">{author}</a></div>
So how can i show a loader animation or "Loading text" while xml data is loading (it takes long time -about 2 sec from a slow CD-. My xml file is big 100KB )
| 0 | [
2,
3187,
21,
6305,
106,
133,
3782,
622,
23504,
18768,
3554,
19069,
13,
22314,
1054,
800,
3726,
3726,
31,
589,
568,
3782,
622,
13,
5,
3401,
622,
18768,
9,
728,
18,
15,
396,
8353,
9,
728,
18,
6,
4033,
13,
43,
18,
165,
800,
78,
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... |
What is your demand for a working software development environment?
===
I am currently setting up a new software development department with my employer. I'm a former programmer, project manager and director of development, so I have an idea of how the environment should be. I would like your opinions on the matter as you are the guys I am actually preparing this for :)
My fundamentals:
- Office space; I am not fund of open space arrangements. I prefer single offices or offices where a max of three people shares the space. There should be sufficient spacing to house a big desk, visiting chair, bookshelves, etc. A minimum of 8-10 square meters pr person. Desks can be adjusted electronically in height; chairs are "executive" models. Every office has at least 1 big window that can be opened.
- Tools; the computer is latest model from a big supplier - sufficient with HD, ram and power. 2 screens are a minimum, 22 inches. Every office will have at least one whiteboard.
- Meeting rooms; enough rooms with big whiteboards and projectors will be available.
- Coffee machine; state of the art serving different kinds of brew
- Fresh fruit delivered several times a week
- Soft drinks and fresh water available
- Software testing lab available
- Own rooms for communication (video conf, phone conf, etc)
Btw; there will be no public speaker system for messages :)
Other parts of the working conditions like buying the things you need when you need it, being sent to the courses you would like to go to, getting the possibility to travel to customers if needed (and wanted by both parties) and have as little interruptions as possible from customer support and the like are also included.
I guess I could write more, ex. in regards to only working with the tasks you want to work with or projects that are interesting, no code-monkey work, etc. But I'll leave some of it to you :)
(And no - I will not at the end of the thread say something like "Hi - come work for me". I am based in Norway - so I guess this would only be applicable for a very small percentage of you :))
| 4 | [
2,
98,
25,
154,
3888,
26,
21,
638,
2306,
522,
2307,
60,
800,
3726,
3726,
31,
589,
871,
2697,
71,
21,
78,
2306,
522,
604,
29,
51,
11726,
9,
31,
22,
79,
21,
336,
17968,
15,
669,
1382,
17,
559,
16,
522,
15,
86,
31,
57,
40,
88... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Twin Slider control .net
===
Has anyone seen a good twin slider control for .Net (Win forms or WPF).
I'm looking for something that will allow me to select a range from within a set so the first slider would be the start of the range and the second would be the end.
I remember seeing a Swing double slider but it was 6 years ago and I can't for the life of me remember who made it. It was open source though. | 0 | [
2,
3636,
3295,
106,
569,
13,
9,
2328,
800,
3726,
3726,
63,
1276,
541,
21,
254,
3636,
3295,
106,
569,
26,
13,
9,
2328,
13,
5,
4181,
1997,
54,
619,
7721,
6,
9,
31,
22,
79,
699,
26,
301,
30,
129,
1655,
55,
20,
5407,
21,
978,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Struts2 - How to do dynamic URL redirects?
===
I'm trying to have my struts2 app redirect to a generated url. In this case, I want the url to use the current date, or a date I looked up in a database. So `/section/document` becomes `/section/document/2008-10-06`
What's the best way to do this? | 0 | [
2,
18316,
18,
135,
13,
8,
184,
20,
107,
7782,
287,
6362,
302,
14706,
18,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
57,
51,
18316,
18,
135,
4865,
302,
14706,
20,
21,
6756,
287,
6362,
9,
19,
48,
610,
15,
31,
259,
14,
287,
6362... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 canonical way to determine commandline vs. http execution of a PHP script?
===
I have a PHP script that needs to determine if it's been executed via the command-line or via HTTP, primarily for output-formatting purposes. What's the canonical way of doing this? I had thought it was to inspect <code>SERVER['argc']</code>, but it turns out this is populated, even when using the 'Apache 2.0 Handler' server API. | 0 | [
2,
98,
25,
14,
5742,
4272,
161,
20,
3746,
1202,
1143,
4611,
9,
7775,
5769,
16,
21,
13,
26120,
3884,
60,
800,
3726,
3726,
31,
57,
21,
13,
26120,
3884,
30,
2274,
20,
3746,
100,
32,
22,
18,
74,
5557,
1197,
14,
1202,
8,
1143,
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... |
jQuery: Problem with windowed controls in IE6
===
I have a web page which contains a select box. When I open a jQuery Dialog it is displayed partly behind the select box.
How should I approach this problem? Should I hide the select box or does jQuery offer some kind of 'shim' solution. (I have Googled but didn't find anything) | 0 | [
2,
487,
8190,
93,
45,
1448,
29,
1463,
69,
8671,
19,
13,
660,
379,
800,
3726,
3726,
31,
57,
21,
2741,
2478,
56,
1588,
21,
5407,
1649,
9,
76,
31,
368,
21,
487,
8190,
93,
28223,
32,
25,
6115,
5794,
439,
14,
5407,
1649,
9,
184,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 extract a file extension in PHP ?
===
This is a question you can read everywhere on the web with various answers :
$ext = end(explode('.', $filename));
$ext = substr(strrchr($filename, '.'), 1);
$ext = substr($filename, strrpos($filename, '.') + 1);
$ext = preg_replace('/^.*\.([^.]+)$/D', '$1', $filename);
$exts = split("[/\\.]", $filename);
$n = count($exts)-1;
$ext = $exts[$n];
etc.
However, there is always "the best way" and it should be on stackoverflow. | 0 | [
2,
184,
20,
10962,
21,
3893,
3896,
19,
13,
26120,
13,
60,
800,
3726,
3726,
48,
25,
21,
1301,
42,
92,
1302,
6417,
27,
14,
2741,
29,
617,
6709,
13,
45,
5579,
1706,
38,
800,
241,
5,
6899,
19471,
5,
22,
9,
22,
15,
5579,
16877,
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... |
Why can't c++ ifstreams read from devices?
===
I knew I should never have started using c++ io, the whole
"type safety" argument is a big fat lie. Anyhow, I did,
and discovered a strange difference between ifstreams
and FILE*s and plain old file descriptors: ifstreams cannot
read from a device. Can anyone think of a reason why?
const char* path = "/dev/disk3";
char b;
// this works
FILE* f= fopen(path, "rb");
int i = fread(&b, 1, 1, f); // returns 1, success!
// this does not work
ifstream cf(path, ios::binary);
cf.read(&b, 1);
bool good = cf.good(); // returns false, failure.
| 0 | [
2,
483,
92,
22,
38,
272,
20512,
100,
11260,
18,
1302,
37,
4690,
60,
800,
3726,
3726,
31,
404,
31,
378,
243,
57,
373,
568,
272,
20512,
13,
1963,
15,
14,
979,
13,
7,
4474,
2108,
7,
5476,
25,
21,
580,
4211,
2850,
9,
186,
1544,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 protect code from leaking outside?
===
Besides open-sourcing your project and legislation, are there ways to prevent, or at least minimize the damages of code leaking outside your company/group?
We obviously can't block Internet access (to prevent emailing the code) because programmer's need their references. We also can't block prephiral devices (USB, Firewire, etc.)
As far as I see it, preventing leakage relies almost entirely on human process. What do you think? What precautions and measures are you taking? And has code leakage affected you before? | 0 | [
2,
184,
107,
42,
2196,
1797,
37,
26334,
719,
60,
800,
3726,
3726,
3410,
368,
8,
27028,
154,
669,
17,
5064,
15,
50,
80,
2847,
20,
2501,
15,
54,
35,
639,
16713,
14,
15184,
16,
1797,
26334,
719,
154,
237,
118,
8024,
60,
95,
4409,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Multiple instances of a java web application sharing a resource
===
I have a web service, that takes an input xml message, transforms it, and then forwards it to another web service.
The application is deployed to two web logic app servers for performance, and resilience reasons.
I would like a single website monitoring page that allows two things
- ability to stop/ start forwarding of messages
- ability to monitor throughput of number of messages in the last hour etc. Number of different senders into the webservice etc.
I was wondering what the best way to implement this was.
My current idea is to have an in memory database (eg Debry or HSQL) replicating data to share the information between the two (or more) instances of my application that are running in different instances of the app server. I imagine I would have to setup some sort of master/ slave configuration.
I would love a link to an article that discusses how to solve this problem.
(Note, this is a simple spring application using spring MVC)
thanks,
David. | 0 | [
2,
1886,
13946,
16,
21,
8247,
2741,
3010,
6126,
21,
6577,
800,
3726,
3726,
31,
57,
21,
2741,
365,
15,
30,
1384,
40,
6367,
23504,
2802,
15,
8007,
18,
32,
15,
17,
94,
917,
18,
32,
20,
226,
2741,
365,
9,
14,
3010,
25,
6698,
20,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Overriding serialization for a particular .NET type
===
Consider this example class:
[Serializable]
public class SomeClass
{
private DateTime _SomeDateTime;
public DateTime SomeDateTime
{
get { return _SomeDateTime; }
set { _SomeDateTime = value; }
}
}
I will add and change the fields and properties in this class. However I would like the serialization of any DateTime declared in the class to always be an empty string when its value is null (by default this is DateTime.MinValue). I don't want to maintain a custom serializer for every change to the class and would like this behaviour to be inherited by subclasses. Thanks for any help. | 0 | [
2,
84,
5175,
68,
5956,
1829,
26,
21,
1498,
13,
9,
2328,
1001,
800,
3726,
3726,
3563,
48,
823,
718,
45,
636,
4104,
2815,
3186,
579,
500,
317,
718,
109,
1898,
13,
1,
932,
1231,
891,
13,
1,
3220,
8209,
891,
73,
317,
1231,
891,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Performance issue with "new ReportDocument()"
===
I have a C# application where I create a Crystal Reports ReportDocument, with the line
`CrystalDecisions.CrystalReports.Engine.ReportDocument document =
new CrystalDecisions.CrystalReports.Engine.ReportDocument();`
This line takes 3-4 seconds to execute. This seems very slow, especially since the
`document.Load(file)`
line following it (which actually does the major part of the work of reading in a report file and creating the report's object model) executes extremely quickly.
What are things I should keep in mind that might improve performance here? | 0 | [
2,
956,
1513,
29,
13,
7,
2681,
1330,
28132,
5,
6,
7,
800,
3726,
3726,
31,
57,
21,
272,
5910,
3010,
113,
31,
1600,
21,
4282,
2813,
1330,
28132,
15,
29,
14,
293,
13,
1,
25905,
29450,
18,
9,
25905,
17437,
18,
9,
16847,
9,
17437,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Checkstyle's PackageHtml-rule ignores package-info.java
===
I use checkstyle to analyze my code. A useful rule is PackageHtml, that checks, if a package contains a Javadoc-description. But with newer java-version it's recommended to use package-info.java instead of package.html. Problem is, checkstyle ignores the package-info.java and reports a rule violation. How can checkstyle be configured to check for package-documentation, but accepts package.html '''and''' package-info.java? | 0 | [
2,
2631,
4381,
22,
18,
6030,
15895,
8,
16154,
7174,
18,
6030,
8,
108,
4120,
9,
1004,
1385,
800,
3726,
3726,
31,
275,
2631,
4381,
20,
16051,
51,
1797,
9,
21,
4811,
1828,
25,
6030,
15895,
15,
30,
16602,
15,
100,
21,
6030,
1588,
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... |
Is anyone running a production ASP.NET site on top of Mono?
===
I'm trying to do an informal feasibility study for work on if Mono/Apache/Linux is realistically 'ready' and in any way comparable to a more traditional .NET/IIS/Windows stack.
Any comparison of performance would be helpful too. | 0 | [
2,
25,
1276,
946,
21,
637,
28,
306,
9,
2328,
689,
27,
371,
16,
4129,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
107,
40,
13140,
26022,
949,
26,
170,
27,
100,
4129,
118,
7738,
2569,
118,
1226,
7147,
25,
12786,
1326,
13,
22,
1519... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
git merge -s ours, what about "their"
===
When merging topic branch "B" using `git merge`, I get some conflicts. I know all the conflicts can be solved using the version in "B".
I am aware of `git merge -s ours`. But what I want is something like `git merge -s their`.
Why it does not exist? How can I achieve the same result after the conflicting merge with hot `git` commands? (git checkout every unmerged file from B)
thanks | 0 | [
2,
13,
10404,
12666,
13,
8,
18,
318,
18,
15,
98,
88,
13,
7,
18073,
7,
800,
3726,
3726,
76,
18842,
8303,
1686,
13,
7,
220,
7,
568,
13,
1,
10404,
12666,
1,
15,
31,
164,
109,
10344,
9,
31,
143,
65,
14,
10344,
92,
44,
15091,
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... |
Incorporating shareware restrictions in C++ software.
===
I wish to implement my software on a shareware basis, so that the user is
given a maximum trial period of (say) 30 days with which to try out the software. On purchase I intend the user to be given a randomly-generated key, which when entered
enables the software again.
I've never been down this route before, so any advice or feedback or pointers to 'standard' ways of how this is done would be much appreciated.
I do not anticipate users cheating by changing the system date or anything like that, though this is probably worth considering. Apologies if this topic has appeared before. | 0 | [
2,
15239,
1891,
5011,
9245,
19,
272,
20512,
2306,
9,
800,
3726,
3726,
31,
2536,
20,
8713,
51,
2306,
27,
21,
1891,
5011,
2239,
15,
86,
30,
14,
4155,
25,
504,
21,
2979,
2178,
620,
16,
13,
5,
6366,
6,
712,
509,
29,
56,
20,
1131,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
JRE Upgrade
===
Is there anyway to upgrade the installed JRE in the system? We are having 1.5.0_08 installed in out HP Unix system.We have to upgrade this to 1.5.0_15.Is there a way to patch up the existing JRE and upgrade to a newer version.Or can this only be achieved by installing the newer JRE and set this in the system PATH.
Thanks for your time.
Regards,
Vivek | 0 | [
2,
487,
99,
9483,
800,
3726,
3726,
25,
80,
2774,
20,
9483,
14,
4066,
487,
99,
19,
14,
329,
60,
95,
50,
452,
137,
9,
264,
9,
387,
1,
3099,
4066,
19,
70,
5301,
22540,
329,
9,
458,
57,
20,
9483,
48,
20,
137,
9,
264,
9,
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... |
How do I use the new SVN merge-tracking?
===
In my existing (Pre-SVN 1.5) merge strategy....
We create a copy of the Trunk(called BasePoint) at the moment of branch-creation for referencing later during the merge.
When we need to merge a branch back into the trunk, we perform 2 operations.
1.> Merge from BasePoint to LatestTrunk(Trunk has likely moved on since the original branch) into Working copy of Branch.... and then commit.
At this point we typically check that the merge into the branch has not damaged anything
2.> Merge from LatestTrunk to LatestBranch back into Working copy of trunk and then commit.
Documentation suggests that I use the new reintegrate merge on the Trunk and Merge from the Branch.....
Do I need to merge from the trunk into the dev branch first or is this included in the new reintegrate option?
To put it another way... Does the new "merge --reintegrate" functionality represent 'each of my previous merges' or 'the whole operation' ?
(FWIW I am using TortoiseSVN 1.5.1) | 0 | [
2,
184,
107,
31,
275,
14,
78,
13,
18,
16578,
12666,
8,
4792,
68,
60,
800,
3726,
3726,
19,
51,
3149,
13,
5,
3515,
8,
18,
16578,
137,
9,
264,
6,
12666,
4427,
9,
9,
9,
9,
95,
1600,
21,
4344,
16,
14,
6436,
5,
4580,
1000,
3132,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 abstracting data type (sometimes) a good idea?
===
There are numerous times you have an interface that accepts similar type arguments that have a separate domain logic meaning:
public static class Database
{
public static bool HasAccess(string userId, string documentId) { return true; }
}
Now it's quite easy to have someone key documentId instead of userId and vice versa. One could prevent that by abstracting the data type of the arguments:
public class UserId
{
public string Value { get; internal set; }
public static implicit operator string(UserId id) { return id.Value; }
public static implicit operator UserId(string id) { return new UserId() { Value = id }; }
}
public class DocumentId
{
public string Value { get; internal set; }
public static implicit operator string(DocumentId id) { return id.Value; }
public static implicit operator DocumentId(string id) { return new DocumentId() { Value = id }; }
}
public static class Database
{
public static bool HasAccess(UserId userId, DocumentId documentId) { return true; }
}
This way you get a nice compiler warning if you type in arguments out of order:
UserId e = "a";
DocumentId d = "b";
Database.HasAccess(d, e);
You also get the ability to change abstracted type in without affecting the rest of the system but that's not very likely. Would abstracting type be a good idea to get more type safety?
| 0 | [
2,
25,
8502,
68,
1054,
1001,
13,
5,
9310,
6,
21,
254,
882,
60,
800,
3726,
3726,
80,
50,
1548,
436,
42,
57,
40,
6573,
30,
16548,
835,
1001,
10553,
30,
57,
21,
1725,
4603,
7085,
1813,
45,
317,
12038,
718,
6018,
13,
1,
317,
12038... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the most efficient way to (re)initialise a vector to a certain length with initial values
===
As a function argument I get a <code>vector<double>& vec</code> (an output vector, hence non-const) with unknown length and values. I want to initialise this vector to a specific length n with all zeroes.
This will work
vec.clear();
vec.resize( n, 0.0 );
And this will work as well:
vec.resize( n );
vec.assign( n, 0.0 );
Is the second more efficient (because no memory deallocation/allocation is involved)? Is there a more efficient way to do this? | 0 | [
2,
98,
25,
14,
127,
8243,
161,
20,
13,
5,
99,
6,
27313,
2628,
21,
7497,
20,
21,
1200,
1476,
29,
2104,
4070,
800,
3726,
3726,
28,
21,
1990,
5476,
31,
164,
21,
13,
1,
9375,
1,
28033,
1,
14368,
1,
1569,
13,
195,
150,
1,
118,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it worth coverting my functional JavaScript code to an object-oriented design?
===
I'm currently building a small web application that includes a fair amount of JavaScript. When I was prototyping the initial idea, I just hacked together a few functions to demonstrate how the application would eventually behave intending to go forward re-writing the JavaScript in an object-oriented nature.
Now that I'm getting into the implementation phase, I'm finding that creating object-oriented JavaScript for the sake of being object-oriented seems overkill - the project isn't likely to require any major modifications in the future that would warrant and object-oriented design. Instead, I'm finding that a set of concise, cohesive functions are working well.
So, with that said and with attempting to adhere to the KISS principle, when a set of functions are providing a suitable solution to a problem, are there any other reasons worth considering to convert my code into an object-oriented design? | 0 | [
2,
25,
32,
2715,
1227,
1203,
51,
7652,
8247,
8741,
1797,
20,
40,
3095,
8,
6800,
704,
60,
800,
3726,
3726,
31,
22,
79,
871,
353,
21,
284,
2741,
3010,
30,
1103,
21,
1768,
2006,
16,
8247,
8741,
9,
76,
31,
23,
9347,
1084,
3181,
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... |
linker out of memory LNK1102
===
My colleagues and I have tried to build a project containing several thousand classes , but we're getting a LNK1102 error ( Linker out of memory ) . I've seen several tips on the internet , such as increasing the virtual memory . We tried but this didn't help . We've also seen some as enabling different warning levels when compiling the code . A guy suggested enabling level 4 for warnings .
How could that be done ? Are there other suggestions ? | 0 | [
2,
3508,
106,
70,
16,
1912,
644,
5719,
11472,
135,
800,
3726,
3726,
51,
8493,
17,
31,
57,
794,
20,
1895,
21,
669,
3503,
238,
2996,
2684,
13,
15,
47,
95,
22,
99,
1017,
21,
644,
5719,
11472,
135,
7019,
13,
5,
3508,
106,
70,
16,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Object arrays in method signatures
===
Consider the following method signatures:
public fooMethod (Foo[] foos) { /*...*/ }
and
public fooMethod (Foo... foos) { /*...*/ }
_Explanation: The former takes an array of Foo-objects as an argument - `fooMethod(new Foo[]{..})` - while the latter takes an arbitrary amount of arguments of type Foo, and presents them as an array of Foo:s within the method - `fooMethod(fooObject1, fooObject2, etc...`)._
Java throws a fit if both are defined, claiming that they are duplicate methods. I did some detective work, and found out that the first declaration really requires an explicit array of Foo objects, and that's the only way to call that method. The second way actually accepts both an arbitrary amount of Foo arguments AND also accepts an array of Foo objects.
So, the question is, since the latter method seems more flexible, are there any reasons to use the first example, or have I missed anything vital? | 0 | [
2,
3095,
7718,
18,
19,
2109,
19506,
800,
3726,
3726,
3563,
14,
249,
2109,
19506,
45,
317,
4310,
6651,
11927,
43,
13,
5,
4120,
111,
2558,
500,
4310,
759,
6,
13,
1,
13,
118,
2483,
9,
9,
9,
2483,
118,
13,
1,
17,
317,
4310,
6651,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 trigger javascript functions from flash?
===
How do you trigger a javascript function using actionscript in flash?
The goal is to trigger jQuery functionality from a flash movie | 0 | [
2,
184,
107,
42,
7286,
8247,
8741,
3719,
37,
4433,
60,
800,
3726,
3726,
184,
107,
42,
7286,
21,
8247,
8741,
1990,
568,
1028,
8741,
19,
4433,
60,
14,
1195,
25,
20,
7286,
487,
8190,
93,
18548,
37,
21,
4433,
1308,
3,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Are there any hardware books or articles that can help with programming?
===
Since programming is essentially hardware interpretation. Are there any books or articles on CPU's or other hardware components that can help in understanding low level programming languages?
Or even hardware books or articles that target programmers? | 4 | [
2,
50,
80,
186,
7610,
964,
54,
3376,
30,
92,
448,
29,
3143,
60,
800,
3726,
3726,
179,
3143,
25,
7398,
7610,
6973,
9,
50,
80,
186,
964,
54,
3376,
27,
17578,
22,
18,
54,
89,
7610,
5090,
30,
92,
448,
19,
3260,
708,
662,
3143,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... |
Which database would you recommend to use with C# (.NET) application?
===
I'm developing a little project plan and I came to a point when I need to decide what local databse system to use.
The input data is going to be stored on webserver (hosting - MySQL DB). The idea is to build a process to download all necessary data (for example at midnight) and process them. However, there are going to be many inputs and stages of processing, so I need to use some kind of local database to store the semi-product of the application
What local database system would you recommend to work with C# (.NET) application?
edit: The final product (information) should be easily being exported back to Hosting MySQL DB. | 0 | [
2,
56,
6018,
83,
42,
12360,
20,
275,
29,
272,
5910,
13,
5,
9,
2328,
6,
3010,
60,
800,
3726,
3726,
31,
22,
79,
3561,
21,
265,
669,
944,
17,
31,
281,
20,
21,
454,
76,
31,
376,
20,
4073,
98,
375,
1054,
220,
870,
329,
20,
275,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Adding a new application group in linux
===
How can I add a new program group in the applications menu in both KDE and Gnome? I am testing with Ubuntu and Kubuntu 8. Putting a simple .menu file in ~/.config/menus/applications-merged worked in Kubuntu, but the same procedure does nothing in Ubuntu. | 0 | [
2,
4721,
21,
78,
3010,
214,
19,
13024,
800,
3726,
3726,
184,
92,
31,
3547,
21,
78,
625,
214,
19,
14,
3767,
11379,
19,
156,
680,
546,
17,
24117,
60,
31,
589,
4431,
29,
287,
12968,
2473,
17,
16032,
1020,
2473,
469,
9,
3873,
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... |
.toArray(new MyClass[0]) or .toArray(new MyClass[myList.size()]) ?
===
Assuming I have an ArrayList
ArrayList<MyClass> myList;
And I want to call toArray, is there a performance reason to use
MyClass[] arr = myList.toArray(new MyClass[myList.size()]);
over
MyClass[] arr = myList.toArray(new MyClass[0]);
?
I prefer the second style, since it's less verbose, and I assumed that the compiler will make sure the empty array doesn't really get created, but I've been wondering if that's true.
Of course, in 99% of the cases it doesn't make a difference one way or the other, but I'd like to keep a consistent style between my normal code and my optimized inner loops... | 0 | [
2,
13,
9,
262,
8576,
93,
5,
2681,
51,
1898,
2558,
387,
500,
6,
54,
13,
9,
262,
8576,
93,
5,
2681,
51,
1898,
2558,
915,
5739,
9,
10454,
5,
6,
500,
6,
13,
60,
800,
3726,
3726,
11704,
31,
57,
40,
7718,
5739,
7718,
5739,
1,
91... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Scaling an application
===
I have an application (an IP conferencing service) that I need to scale. It has quite a few independent components/applications, written in different languages (mainly C++ and PHP, some Perl). Currently a single installation runs on 5 machines, with 1-2 components sharing a single box. The configuration of each box therefore is different, so it's a pain to scale the whole thing, not to mention maintenance.
The individual components vary from media proxies to message proxies and databases, so load is everything but even.
I was thinking about putting all components on a single machine and add more boxes as I go along with some sort of a load balancer in front. Others advised me to scale the other way - add specialized boxes where the app load gets high - but this leads back to the maintenance nightmare.
Do you know resources where I should start? Ideally I'd need some benchmarks which approach is better in terms of performance? (thinking aloud, when I have X amount of load and Y amount of memory and processing power where does it matter how I allocate it?) | 0 | [
2,
26829,
40,
3010,
800,
3726,
3726,
31,
57,
40,
3010,
13,
5,
210,
15735,
21748,
219,
6302,
365,
6,
30,
31,
376,
20,
3464,
9,
32,
63,
1450,
21,
310,
1124,
5090,
118,
2552,
20669,
18,
15,
642,
19,
421,
2556,
13,
5,
6232,
102,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Book Recommendation: Source Control / Build Process
===
I'm looking for a good book that describes how small to medium sized development teams utilize version control, and best practices in terms of development and build processes.
If the book relates specifically to .NET, that's a plus, but it can be language agnostic.
Any recommendations? | 4 | [
2,
360,
14066,
45,
1267,
569,
13,
118,
1895,
953,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
254,
360,
30,
4359,
184,
284,
20,
4152,
13,
6560,
522,
952,
13151,
615,
569,
15,
17,
246,
5242,
19,
1663,
16,
522,
17,
1895,
5102,
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... |
SQL Server Management Studio, getting title bar to show more detail.
===
I use SQL Server Management Studio 2005(SSMS) for most of my T-SQL and general SQL DB maintenance, but one thing that I would love to change is the level of detail the title bar gives you about each instance of SSMS you have open.
I would love to be able to see the connected server from the active tab at the very least.
e.g.
<img src="http://www.webdevireland.com/img/SSMSTitle.png" alt="SSMS title bars"/>
Any ideas? | 0 | [
2,
4444,
255,
8128,
1097,
1120,
15,
1017,
581,
748,
20,
298,
91,
6110,
9,
800,
3726,
3726,
31,
275,
4444,
255,
8128,
1097,
1120,
812,
5,
18,
18,
79,
18,
6,
26,
127,
16,
51,
13,
38,
8,
18,
22402,
17,
297,
4444,
255,
13,
9007,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why do shell script comparisons often use x$VAR = xyes?
===
I see this often in the build scripts of projects that use autotools (autoconf, automake). When somebody wants to check the value of a shell variable, they frequently use this idiom:
if test "x$SHELL_VAR" = "xyes"; then
...
What is the advantage to this over simply checking the value like this:
if test $SHELL_VAR = "yes"; then
...
I figure there must be some reason that I see this so often, but I can't figure out what it is. | 0 | [
2,
483,
107,
3593,
3884,
6050,
18,
478,
275,
993,
4403,
3311,
800,
993,
1714,
60,
800,
3726,
3726,
31,
196,
48,
478,
19,
14,
1895,
17505,
16,
2314,
30,
275,
3108,
20799,
18,
13,
5,
18042,
14093,
15,
3108,
11115,
6,
9,
76,
8861,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 use MS Word to write a 60 page technical document
===
I'm revising an existing 60 page PDF document for a new product. I have to use MS-Word. Is there a good reference on the best practices for using Word? For instance, I've heard that it's best to keep everything in "sections". I'll be doing a TOC, lots of illustrations, multiple columns, etc. It's just going to be me revising it, so version control is not a major issue. Thanks! | 0 | [
2,
98,
22,
18,
14,
246,
161,
20,
275,
4235,
833,
20,
2757,
21,
2083,
2478,
2447,
4492,
800,
3726,
3726,
31,
22,
79,
3867,
7552,
40,
3149,
2083,
2478,
13,
11124,
4492,
26,
21,
78,
2374,
9,
31,
57,
20,
275,
4235,
8,
9587,
9,
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... |
JKS protection
===
Are JKS (Java Key Store) files encrypted? Do they provide full protection for encryption keys, or do I need to rely solely on access control?
Is there a way to ensure that the keys are protected? | 0 | [
2,
13,
16455,
18,
2057,
800,
3726,
3726,
50,
13,
16455,
18,
13,
5,
1004,
1385,
1246,
1718,
6,
6488,
29403,
60,
107,
59,
1181,
503,
2057,
26,
24420,
5534,
15,
54,
107,
31,
376,
20,
12139,
9748,
27,
1381,
569,
60,
25,
80,
21,
16... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do you combat denial? While focused on doing task X you encounter a crash, or performance problem, or something else really bad...
===
... that you've never seen before. But at the moment, you are are focused on task X, and you really don't want to believe what you've just seen, so you let yourself believe that the crash/problem was just some random fluke. And then you forget all about it. Weeks or months later as your app gets wider usage and that fluky thing you say gets reported. You are forced to admit to yourself that you knew, you really knew, about the problem long ago, that you had seen it with your own eyes. But wishful thinking and denial made you [mentally] sweep it under the rug.
Or is this just me?
So, how do you combat denial? | 4 | [
2,
184,
107,
42,
2535,
16324,
60,
133,
2604,
27,
845,
3005,
993,
42,
7007,
21,
4597,
15,
54,
956,
1448,
15,
54,
301,
962,
510,
896,
9,
9,
9,
800,
3726,
3726,
13,
9,
9,
9,
30,
42,
22,
195,
243,
541,
115,
9,
47,
35,
14,
68... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Counting the number of deleted rows in a SQL Server stored procedure
===
In SQL Server 2005, is there a way of deleting rows and being told how many were **actually** deleted?
I could do a select count(*) with the same conditions, but I need this to be utterly trustworthy.
My first guess was to use the @@ROWCOUNT variables - but that isn't set, e.g.
delete
from mytable
where datefield = '5-Oct-2008'
select @@ROWCOUNT
always returns a 0.
MSDN suggests the [OUTPUT][1] construction, e.g.
delete from mytable
where datefield = '5-Oct-2008'
output datefield into #doomed
select count(*)
from #doomed
this actually fails with a syntax error.
Any ideas?
[1]: http://msdn.microsoft.com/en-us/library/ms189835.aspx
| 0 | [
2,
11195,
14,
234,
16,
19584,
11295,
19,
21,
4444,
255,
8128,
8214,
7004,
800,
3726,
3726,
19,
4444,
255,
8128,
812,
15,
25,
80,
21,
161,
16,
121,
1336,
68,
11295,
17,
142,
470,
184,
151,
46,
13,
1409,
15661,
1409,
19584,
60,
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... |
Storing X509 certificates in DB - Yea or Nay?
===
I find myself needing to store public key certificates, and a single private key certificate for an in-house application.
A member of our team suggested storing the X509 certificates in the database, instead of storing it in the windows certificate store, as we have been doing up until now. I don't like re-inventing the wheel, but I have to at least consider the idea. it would mean keeping our data more centralized, which is good, I suppose.
The initial barriers that I can see are:
- The private key still needs to be stored somewhere, and I don't know if shoehorning it into a 'public key' table is a good idea. I don't like the idea of setting up a table for a single element, either. Perhaps just keep the private key as a local file? (.pfx file, for instance).
- Revocation Lists. We would probably have to set up a process to deal with revoked public keys.
I don't have a lot of experience with X509 certificates, so, my question is: Are there any other problems we are likely to encounter storing public key certificates in a database, instead of going with the windows certificate store?
It's worth bearing in mind that this application is going to be rolled out onto several business clients servers, so keeping all the data in a single place will make for easier backups. Oh, and the in-house app in question is being developed with C#..
Thanks! | 0 | [
2,
25615,
993,
264,
2545,
6259,
18,
19,
13,
9007,
13,
8,
3617,
58,
54,
13,
10118,
60,
800,
3726,
3726,
31,
477,
992,
12210,
20,
1718,
317,
1246,
6259,
18,
15,
17,
21,
345,
932,
1246,
6259,
26,
40,
19,
8,
1682,
3010,
9,
21,
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... |
Pre and post increment/decrement operators in C#
===
In C#, does anybody know why the following will compile:
int i = 1;
++i;
i++;
but this will not compile?
int i = 1;
++i++;
(Compiler error: The operand of an increment or decrement operator must be a variable, property or indexer.) | 0 | [
2,
782,
17,
678,
13,
28461,
118,
9522,
99,
1130,
9475,
19,
272,
5910,
800,
3726,
3726,
19,
272,
5910,
15,
630,
11181,
143,
483,
14,
249,
129,
26561,
45,
19,
38,
31,
800,
137,
73,
13,
20512,
49,
73,
31,
20512,
73,
47,
48,
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... |
Switch statement fallthrough in C#?
===
Switch statement fallthrough is one of my personal major reasons for loving `switch` vs. `if/else if` constructs. An example is in order here:
static string NumberToWords(int number)
{
string[] numbers = new string[]
{ "", "one", "two", "three", "four", "five",
"six", "seven", "eight", "nine" };
string[] tens = new string[]
{ "", "", "twenty", "thirty", "forty", "fifty",
"sixty", "seventy", "eighty", "ninety" };
string[] teens = new string[]
{ "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen",
"sixteen", "seventeen", "eighteen", "nineteen" };
string ans = "";
switch (number.ToString().Length)
{
case 3:
ans += string.Format("{0} hundred and ", numbers[number / 100]);
case 2:
int t = (number / 10) % 10;
if (t == 1)
{
ans += teens[number % 10];
break;
}
else if (t > 1)
ans += string.Format("{0}-", tens[t]);
case 1:
int o = number % 10;
ans += numbers[o];
break;
default:
throw new ArgumentException("number");
}
return ans;
}
The smart people are cringing because the `string[]`s should be declared outside the function: well, they are, this is just an example.
The compiler fails with the following error:
<pre>
Control cannot fall through from one case label ('case 3:') to another
Control cannot fall through from one case label ('case 2:') to another
</pre>
Why? And is there any way to get this sort of behaviour without having three `if`s? | 0 | [
2,
5521,
3331,
1080,
11639,
19,
272,
5910,
60,
800,
3726,
3726,
5521,
3331,
1080,
11639,
25,
53,
16,
51,
1319,
394,
2932,
26,
8085,
13,
1,
18,
15915,
1,
4611,
9,
13,
1,
821,
118,
6798,
62,
100,
1,
6960,
18,
9,
40,
823,
25,
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... |
Python - Py2exe can't build .exe using the 'email' module
===
py2exe does not work with the standard email module
Hello. I am trying to use py2exe for converting a script into an exe. The build process shows this:
-----
The following modules appear to be missing
['email.Encoders', 'email.Generator', 'email.Iterators', 'email.MIMEBase', 'email.MIMEMultipart', 'email.MIMEText', 'email.Utils', 'email.base64MIME']
-----
The executable does not work. The referenced modules are not included. I researched this on the Internet and I found out that py2exe has a problem with the Lazy import used in the standard lib email module. Unfortunately I have not succeeded in finding a workaround for this problem. Can anyone help?
Thank you,
P.S.
Imports in the script look like this:
Code: Select all
import string,time,sys,os,smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.MIMEText import MIMEText
from email import Encoders | 0 | [
2,
20059,
13,
8,
7103,
135,
1706,
62,
92,
22,
38,
1895,
13,
9,
1706,
62,
568,
14,
13,
22,
62,
8079,
22,
12613,
800,
3726,
3726,
7103,
135,
1706,
62,
630,
52,
170,
29,
14,
1236,
8517,
12613,
10975,
9,
31,
589,
749,
20,
275,
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... |
Including non-Java sources in a Maven project
===
I'm starting on a project that I expect will include a substantial amount of non-Java code (mostly shell and SQL scripts).
I would still like to manage this project with Maven. What are the best practices wrt non-Java source code and Maven? Where should the source go? What happens to them during the different lifecycle phases? Any pointers or links to more information would be greatly appreciated. | 0 | [
2,
215,
538,
8,
1004,
1385,
2662,
19,
21,
1216,
3124,
669,
800,
3726,
3726,
31,
22,
79,
1422,
27,
21,
669,
30,
31,
4186,
129,
468,
21,
6185,
2006,
16,
538,
8,
1004,
1385,
1797,
13,
5,
18397,
3593,
17,
4444,
255,
17505,
6,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Oracle APEX access
===
Is Oracle Application Express suitable for Intranet client/server application?
If so, what should I do to enable client access to application? | 0 | [
2,
15759,
15452,
1381,
800,
3726,
3726,
25,
15759,
3010,
2999,
6445,
26,
14369,
2328,
6819,
118,
10321,
106,
3010,
60,
100,
86,
15,
98,
378,
31,
107,
20,
9240,
6819,
1381,
20,
3010,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
In which layer are you putting your REST api?
===
Our application is structured something like:
UI <--> REST API <--> Workflow <--> Business Logic <--> DAL <--> DB
However, I am seeing a few examples where it looks like people are doing
UI <--> Workflow <--> REST API <--> Business Logic <--> DAL <--> DB
Is this my imagination? Or is the second option considered a viable alternative? | 0 | [
2,
19,
56,
5385,
50,
42,
3873,
154,
760,
21,
2159,
60,
800,
3726,
3726,
318,
3010,
25,
17784,
301,
101,
45,
13,
5661,
13,
1,
8,
8,
1,
760,
21,
2159,
13,
1,
8,
8,
1,
170,
9990,
13,
1,
8,
8,
1,
508,
7085,
13,
1,
8,
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... |
Recursive Rails Nested Resources
===
I have a Rails application for project management where there are Project and Task models. A project can have many tasks, but a task can also have many tasks, ad infinitum.
Using nested resources, we can have /projects/1/tasks, /projects/1/tasks/new, /projects/1/tasks/3/edit etc.
However, how do you represent the recursive nature of tasks RESTfully? I don't want go another level deep, so perhaps the following would do:
map.resources :tasks do |t|
t.resources :tasks
end
That would give me the following urls:
/tasks/3/tasks/new
/tasks/3/tasks/45/edit
Or perhaps when it comes to an individual task I can just use /tasks/45/edit
Is this a reasonable design?
Cam | 0 | [
2,
302,
24244,
2240,
18,
5618,
69,
2566,
800,
3726,
3726,
31,
57,
21,
2240,
18,
3010,
26,
669,
1097,
113,
80,
50,
669,
17,
3005,
2761,
9,
21,
669,
92,
57,
151,
8674,
15,
47,
21,
3005,
92,
67,
57,
151,
8674,
15,
21,
43,
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... |
Visual Studio: Is there a "move class to different namespace" refactoring?
===
I'm doing some architectural cleanup that involves moving a bunch of classes into different projects and/or namespaces. Currently I'm moving the files by hand, building, and then manually adding *using Foo* statements as needed to resolve compilation errors. Anyone know of a smarter way of doing this? (We're a CodeRush and Refactor! shop, but I'd be interested to hear if Resharper has support for this) | 0 | [
2,
3458,
1120,
45,
25,
80,
21,
13,
7,
16598,
718,
20,
421,
204,
5582,
7,
302,
17455,
68,
60,
800,
3726,
3726,
31,
22,
79,
845,
109,
5350,
26862,
30,
6569,
1219,
21,
7653,
16,
2684,
77,
421,
2314,
17,
118,
248,
204,
5582,
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... |
C#3.5 Automatic properties, why not access the field directly?
===
With the new approach of having the get/set within the attribut of the class like that :
public string FirstName {
get; set;
}
why simply not simply put the attribute FirstName public without accessor? | 0 | [
2,
272,
5910,
240,
9,
264,
6715,
3704,
15,
483,
52,
1381,
14,
575,
1703,
60,
800,
3726,
3726,
29,
14,
78,
2141,
16,
452,
14,
164,
118,
3554,
363,
14,
35,
13202,
38,
16,
14,
718,
101,
30,
13,
45,
317,
3724,
64,
7259,
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... |
How many concurrent projects can a senior handle?
===
I am trying to find sensible resource-allocation models for developers. The department will have many different projects for different external customers, so I need to make some guidelines in order to avoid people getting angry due to lack of focus, not working on things they want to, etc.
Currently I have suggestion for a model:
- Junior developers – will only work on one project at a time (reason: mainly that they are unable to control their own time use)
- Intermediate developers – will mostly work one project at a time for 50 % or more, but might be 50-50 on two projects
- Senior developers – will work at the most on 3 projects at a time; percentage can be e.g. 50 %, 30 % and 20 %.
It’s the seniors that I am worried about. As the customers might want to buy a junior-group only, I need to provide them with a mentor (senior) to make sure they have the knowledgeprogress and the aid that they need (someone with experience and knowledge about their project). A group of 5 juniors will get a senior at 50 % of the time.
The question is – can a senior handle 3 projects at a time (he will be hired with this in mind – I will not trick someone to believe that they will write code 100 % of the time and end up with 20 %), or is this too much?
I have a feeling that 2 projects is way better that 3? Or? What if the senior is needed 50 % on the “junior-project” and 30 % on analysis and design on another project. Can he handle one more project with the last 20 %?
(And no – time for training, coffee, etc. will not be part of the 100 %. I have already reduced the “real” amount of working hours with that in mind).
| 4 | [
2,
184,
151,
19513,
2314,
92,
21,
1101,
3053,
60,
800,
3726,
3726,
31,
589,
749,
20,
477,
24599,
6577,
8,
192,
19032,
2761,
26,
10168,
9,
14,
604,
129,
57,
151,
421,
2314,
26,
421,
4886,
5279,
15,
86,
31,
376,
20,
233,
109,
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... |
Unlock Windows workstation
===
I would like to write a small application that unlocks the workstation. To put the specs of what I need very simple: Have an exe that runs and at a defined time (let's say midnight) unlocks the workstation.
Of course the application knows the user and password of the logged on account.
I know of the LogonUser API and have tried using it but failed.
Does anyone have a solution, code excerpt that actually works for this issue?
I am targeting NT5 OSes. | 0 | [
2,
16497,
1936,
170,
10839,
800,
3726,
3726,
31,
83,
101,
20,
2757,
21,
284,
3010,
30,
16497,
18,
14,
170,
10839,
9,
20,
442,
14,
12737,
18,
16,
98,
31,
376,
253,
1935,
45,
57,
40,
1396,
62,
30,
1461,
17,
35,
21,
2811,
85,
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 to open a new email, and assign subject, using .NET Compact Framework
===
Basically I'm trying to accomplish the same thing that "mailto:bgates@microsoft.com" does in Internet Explorer Mobile.
But I want to be able to do it from a managed Windows Mobile application. I don't want to send an email pro grammatically in the background.
I want to be able to create the email in Pocket Outlook and then let the user do the rest.
Hopefully that helps you hopefully help me! | 0 | [
2,
184,
20,
368,
21,
78,
8517,
15,
17,
13952,
1550,
15,
568,
13,
9,
2328,
8285,
6596,
800,
3726,
3726,
11374,
31,
22,
79,
749,
20,
14570,
14,
205,
584,
30,
13,
7,
8079,
262,
45,
220,
3322,
18,
1,
22019,
12980,
9,
960,
7,
630... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.