unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
What is your favorite IPython feature?
===
I've been learning (and enjoying learning!) Python via the IPython interactive shell recently... What's your favorite feature in IPython? Are there any tips and tricks you've picked up that other people might not know about? | 4 | [
2,
98,
25,
154,
3839,
31,
6448,
11570,
1580,
60,
800,
3726,
3726,
31,
22,
195,
74,
2477,
13,
5,
290,
9227,
2477,
187,
6,
20059,
1197,
14,
31,
6448,
11570,
9194,
3593,
1989,
9,
9,
9,
98,
22,
18,
154,
3839,
1580,
19,
31,
6448,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 update mysql.
===
When updating MySQL, I first create a backup of the database. Then I will uninstall the current version installed, and delete all the files that were left by the installer. Then I install the latest GA version, and restore the created back-up, using the MySQL Administrator.
Is there a better way of doing an update of the MySQL. Because I have to create again all the users that are allowed to connect to the database.
The installation of the MySQL is used in a college enrollment system, a client server system I have developed using VB.Net and MySQL. I can only do the update at night because i know no one is connected to the database. | 0 | [
2,
184,
107,
31,
11100,
51,
18,
22402,
9,
800,
3726,
3726,
76,
71,
43,
1880,
51,
18,
22402,
15,
31,
64,
1600,
21,
10119,
16,
14,
6018,
9,
94,
31,
129,
367,
108,
21300,
14,
866,
615,
4066,
15,
17,
27448,
65,
14,
6488,
30,
46,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 difference between file and record in OS's view?
===
In terms of general operating system concepts , What is the difference between a file and a record? <p> How the OS will manage them? I know what a file is and what a record is but how it is distinguished in an
OS? | 0 | [
2,
98,
25,
14,
2841,
128,
3893,
17,
571,
19,
13,
759,
22,
18,
1418,
60,
800,
3726,
3726,
19,
1663,
16,
297,
2455,
329,
8700,
13,
15,
98,
25,
14,
2841,
128,
21,
3893,
17,
21,
571,
60,
13,
1,
306,
1,
184,
14,
13,
759,
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... |
How does Cauchy Reed-Solomon Algorithm work?
===
Does anybody have any reference material that details Cauchy-Reed algorithm? Googling for Cauchy-Reed Solomon results [cleversafe.org][1]. Although they have an open sourced product based on Cauchy Reed-Solomon code, they haven't provided any material explaining how the algorithm works.
[1]: http://cleversafe.org | 0 | [
2,
184,
630,
10513,
5864,
5749,
8,
18,
5335,
2111,
9083,
170,
60,
800,
3726,
3726,
630,
11181,
57,
186,
2801,
1492,
30,
3289,
10513,
5864,
8,
99,
69,
9083,
60,
162,
5598,
802,
26,
10513,
5864,
8,
99,
69,
8857,
1736,
636,
5615,
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... |
ASP.NET Formview Item Inserting Event
===
I'm using the FormView control in ASP.NET for a simple form to insert into a MS SQL DB. I have an event for onItemInserting to set some values behind (such as time stamp, etc) and was curious how to check some user entered values in the onItemInserting event and **cancel** the item from being inserted. The reason I want to do it in the code behind is to query the database and use the values to validate the user entered data.
Pseudo Code is as follows:
protected void Form_addRoom_ItemInserting(object sender, FormViewInsertEventArgs e)
{
... Query DB for some values ...
if(enteredMaxPeople > queryMaxPeople)
{
**Cancel** DB Insert
statusLabel.text = "Value entered not valid";
}
}
In the end the question comes down to how do I cancel a FormView from inserting in the code behind?
Thank you!
Sean | 0 | [
2,
28,
306,
9,
2328,
505,
4725,
9101,
14692,
68,
807,
800,
3726,
3726,
31,
22,
79,
568,
14,
505,
4725,
569,
19,
28,
306,
9,
2328,
26,
21,
1935,
505,
20,
14692,
77,
21,
4235,
4444,
255,
13,
9007,
9,
31,
57,
40,
807,
26,
27,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
.Net: FtpWebRequest "(503) Bad sequence of commands" error
===
On large files (~200+ MB), I get the 503 error when I read the stream.
ftp = (FtpWebRequest)WebRequest.Create(new Uri(address.AbsoluteUri + @"/" + file.Name));
ftp.Credentials = new NetworkCredential(username, password);
ftp.Method = WebRequestMethods.Ftp.DownloadFile;
response = (FtpWebResponse)ftp.GetResponse();
Any clues on what I'm doing wrong or a better practice for larger files?
| 0 | [
2,
13,
9,
2328,
45,
1187,
306,
458,
3692,
10351,
13,
7,
5,
2290,
240,
6,
896,
4030,
16,
14294,
7,
7019,
800,
3726,
3726,
27,
370,
6488,
13,
5,
1,
4621,
2430,
14023,
6,
15,
31,
164,
14,
1222,
240,
7019,
76,
31,
1302,
14,
3766... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Has web development overtaken desktop development?
===
Is there more happening on the web than on the desktop?
It seems like so much is happening on the web that maybe I should prioritize web development skills over desktop development skills. Does this seem like a good choice? | 4 | [
2,
63,
2741,
522,
29830,
17404,
522,
60,
800,
3726,
3726,
25,
80,
91,
4942,
27,
14,
2741,
119,
27,
14,
17404,
60,
32,
2206,
101,
86,
212,
25,
4942,
27,
14,
2741,
30,
913,
31,
378,
1313,
242,
2952,
2741,
522,
3207,
84,
17404,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... |
Standalone Webservice .NET
===
What is a good way to develop a standalone webservice in .net? | 0 | [
2,
26986,
2741,
11449,
13,
9,
2328,
800,
3726,
3726,
98,
25,
21,
254,
161,
20,
2803,
21,
26986,
2741,
11449,
19,
13,
9,
2328,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
"Mem Usage: higer than "VM Size" in WinXP Task Manager
===
In my Windows XP Task Manager, some processes display a higher value in the Mem Usage column than the VMSize. My Firefox instance, for example shows 111544 K as mem usage and 100576 K as VMSize.
According to help file of Task Manager Mem Usage is the working set of the process and VMSize is the committed memory in the Virtual address space.
My question is, if the number of committed pages for a process is A and the number of pages in physical memory for the same process is B, shouldn't it always be B ≤ A? Isn't the number of pages in physical memory per process a subset of the committed pages?
Or is this something to do with sharing of memory among process? Please explain. (Perhaps my definition of 'Working Set' is off the mark).
Thanks. | 0 | [
2,
13,
7,
790,
79,
7514,
45,
4148,
1674,
119,
13,
7,
20147,
1072,
7,
19,
628,
396,
306,
3005,
1382,
800,
3726,
3726,
19,
51,
1936,
23045,
3005,
1382,
15,
109,
5102,
3042,
21,
1184,
1923,
19,
14,
55,
79,
7514,
4698,
119,
14,
13... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Locking down valid characters in a Textbox
===
I need to be able to lock down the valid characters in a textbox, I presently have a regex which I can check each character against such as
> [A-Za-z]
would lock down to just Alpha characters.
protected override void OnKeyPress(KeyPressEventArgs e)
{
if (e.KeyChar == (char)Keys.Back)
{
base.OnKeyPress(e);
return;
}
if (String.IsNullOrEmpty(this._ValidCharExpression))
{
base.OnKeyPress(e);
}
else
{
bool isValidChar = Regex.Match(e.KeyChar.ToString(),this._ValidCharExpression).Success;
if (isValidChar)
{
base.OnKeyPress(e);
}
else
{
e.Handled = true;
}
}
}
I had placed the regex code in the OnKeyPress code, but I wat to allow all special keys, such as Ctrl-V, Ctrl-C and Backspace to be allowed.
As you can see I have the backspace key being handled. However, Ctrl-V, for example cannot see the V key because it runs once for the ctrl key but does not see any modifiers keys.
What is the best way to handle this situation? | 0 | [
2,
17538,
125,
7394,
1766,
19,
21,
1854,
5309,
800,
3726,
3726,
31,
376,
20,
44,
777,
20,
3991,
125,
14,
7394,
1766,
19,
21,
1854,
5309,
15,
31,
14431,
57,
21,
7953,
1706,
56,
31,
92,
2631,
206,
925,
149,
145,
28,
13,
1,
636,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Sun Access Manager
===
i'm looking to learn about SSO, and heard about Sun Access Manager and openSSO(?)
I want to build a small system that does SSO, like have Apache as a front end working with an SSO server.
Should I investigate Sun AM and is openSSO a product?
Do they offer these free for developers?
Thanks | 0 | [
2,
939,
1381,
1382,
800,
3726,
3726,
31,
22,
79,
699,
20,
2484,
88,
13,
18,
656,
15,
17,
752,
88,
939,
1381,
1382,
17,
8965,
656,
5,
60,
6,
31,
259,
20,
1895,
21,
284,
329,
30,
630,
13,
18,
656,
15,
101,
57,
17140,
28,
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... |
Getting around PHP safe mode to write to server. Is it possible?
===
I have got the following problem since the server has safe mode turned on, and directories are being created under different users:
1. I upload my script to the server, it shows as belonging to 'user1'. All it is doing is making a new directory when a new user is created so it can store files in it.
2. New directory is created, but it belongs to 'apache' user.
3. 'user1' and 'apache' are different users; and safe mode is turned on. So the php script cannot write to that newly created directory.
4. Now I have a problem!
One solution is to turn off safe mode. Also, a coworker suggested that there are settings that can be changed to ensure the directories are under the same user as the script. So I am looking to see if latter can be done.
But I have to ask. Is there a programatical solution for my problem?
I am leaning to a 'no', as safe mode was implemented to solve it at the php level. Also the actual problem may seem like the directory being created under a different user, so a programatic fix might just be a band-aid fix.
| 0 | [
2,
1017,
140,
13,
26120,
1834,
3740,
20,
2757,
20,
8128,
9,
25,
32,
938,
60,
800,
3726,
3726,
31,
57,
330,
14,
249,
1448,
179,
14,
8128,
63,
1834,
3740,
412,
27,
15,
17,
559,
1596,
50,
142,
679,
131,
421,
3878,
45,
137,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Need a simple RegEx to find a number in a single word
===
I've got the following url route and i'm wanting to make sure that a segment of the route will only accept numbers. as such, i can provide some regex which checks the word.
/page/{currentPage}
so.. can someone give me a regex which matches when the word is a number (any int) greater than 0 (ie. 1 <-> int.max).
cheers! | 0 | [
2,
376,
21,
1935,
7953,
1706,
20,
477,
21,
234,
19,
21,
345,
833,
800,
3726,
3726,
31,
22,
195,
330,
14,
249,
287,
6362,
858,
17,
31,
22,
79,
4638,
20,
233,
562,
30,
21,
5631,
16,
14,
858,
129,
104,
3440,
2116,
9,
28,
145,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 this union is deleting the 1st records in arrays in the c code?
===
<p>look at one of my header file which consists of a union template with 4 different structures.
<p><#define MAX 2
<b>union family</b>
<p>{
<p> <b>struct name </b> /*for taking the name and gender of original member*/
<p>{
<p>unsigned char *namess;
<p>unsigned int gender;
<p>union family *ptr_ancestor; /*this is a pointer to his ancestors details*/
<p>}names;
<p><b>struct male </b>/*for taking the above person's 3 male ancestors details if he is male*/
<p> {
<p> unsigned char husb_names[3][20];
<p>unsigned char wife_names[3][20];
<p>unsigned int wife_status[3];
<p>}male_ancestor;
<p><b>struct unmarry </b>/*for taking the above person's 3 female parental ancestors if she is female and unmarried*/
<p> {
<p>unsigned int mar;
<p>unsigned char parental_fem[3][20];
<p>unsigned int marit_status[3];
<p>}fem_un;
<p><b>struct marry </b>/*for taking 3 parental-in-laws details if she is female and married*/
<p> {
<p>unsigned int mar;
<p>unsigned char in_law_fem[3][20];
<p>unsigned int in_marit_status[3];
<p>}fem_marr;
<p>};
<p>extern union family original[MAX]; /*for original person*/
<p>extern union family ancestor_male[MAX]; /*used if he is male for storing his male ancestor details*/
<p>extern union family ancestor_female[MAX]; /*used if she is female*/
<p>extern int x;<p><b>here the program ends</b>
<p>My aim is to get a person name and gender and store the person's any 3 male/female ancestors according to the person's gender and marital status.and point the *ptr_ancestor to that corresponding ancestor array (ancestormale or ancestorfemale)
<p>here the memory is utilized by union. ok
<p>but still here we should be careful in assigning the pointer or else we may loose our older person records at run time.
<p><b>if possible please tell me how to get the details of 1st original ie. original[0] even after taking the original[1].here i am just getting the last given original[] ie. original[2 etc] is coming.but all other old records like original[0 ,,,, 1] are gone at run time. Iam not using any data structures or files and my environment is turbo c on windows.
<p>please if u get irritated by such a long question just ignore it.
if any body wants to see the total code i can copy paste it or i can email u also.
| 0 | [
2,
483,
48,
667,
25,
121,
1336,
68,
14,
137,
384,
742,
19,
7718,
18,
19,
14,
272,
1797,
60,
800,
3726,
3726,
13,
1,
306,
1,
5810,
35,
53,
16,
51,
157,
106,
3893,
56,
2043,
16,
21,
667,
22894,
29,
268,
421,
3815,
9,
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... |
Can ADO.NET Data Services use named pipes as a transport
===
I am well aware that the Rest based approach is targeting HTTP. I would love to use the REST APIs and other goodness between processes on the same computer. Since ADO.NET data services is built on top of WCF it would seem reasonable to assume that the transport in configurable to work with any of the WCF supported transports. Anyone know if there is a way to configure it to send traffic via namedpipes? | 0 | [
2,
92,
21,
537,
9,
2328,
1054,
687,
275,
377,
14104,
28,
21,
1739,
800,
3726,
3726,
31,
589,
134,
3854,
30,
14,
760,
432,
2141,
25,
15972,
7775,
9,
31,
83,
339,
20,
275,
14,
760,
21,
8954,
17,
89,
18509,
128,
5102,
27,
14,
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... |
Does reflection expose if the last argument for a method was marked with 'params'?
===
Using reflection on a method definition I would like to find out if the original method was defined with 'params' on the last parameter. So can I discover if the original definition was this...
public void MyMethod(int x, params object[] args);
...and not this...
public void MyMethod(int x, object[] args);
My code has a list of arguments and is using reflection to call an arbitrary method. If it is marked with 'params' then I want to package up the extra parameters into an object[] and call the method. If the argument is not marked with 'params' then I would indicate an error instead. So I want to provide the same semantics as C#.
But I cannot find any docs that indicate how to discover this using reflection.
| 0 | [
2,
630,
9138,
13833,
100,
14,
236,
5476,
26,
21,
2109,
23,
2739,
29,
13,
22,
6351,
79,
18,
22,
60,
800,
3726,
3726,
568,
9138,
27,
21,
2109,
5465,
31,
83,
101,
20,
477,
70,
100,
14,
501,
2109,
23,
2811,
29,
13,
22,
6351,
79,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can offline apps be a replacement for tablet desktop apps
===
Wanted to get some opinions or real world experiences of offline web application development for tablet pcs. I work on a sales desktop app that is run off a tablet and was wondering if this and other "traditional" tablet applications could be viable as a offline web application. | 0 | [
2,
92,
168,
1143,
4865,
18,
44,
21,
4610,
26,
16394,
17404,
4865,
18,
800,
3726,
3726,
417,
20,
164,
109,
11900,
54,
683,
126,
5513,
16,
168,
1143,
2741,
3010,
522,
26,
16394,
5168,
18,
9,
31,
170,
27,
21,
2598,
17404,
4865,
30,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Localization: How to map culture info to a script name or Unicode character range?
===
I need some information about localization. I am using .net 2.0 with C# 2.0 which takes care of most of the localization related issues. However, I need to manually draw the alphabets corresponding to the current culture on the screen in one particular screen.
This would be similar to the Contacts screen in Microsoft Outlook (Address Cards view or Detailed Address Cards View under Contacts), and so it needs a the column of buttons at the right end, one for each alphabet.
I am trying to emulate that, but I don't want to ask the user to choose the script. If the current culture is say, Chinese, I want to draw Chinese alphabets. When the user changes the culture info to English (and when he restarts the application) I want to draw English alphabets instead. Hope you understand where I am going with this query.
I can determine the culture of the current user (Application.CurrentCulture or System.Globalization.CultureInfo.CurrentCulture will give the culture related information). I also have all the scripts to render the alphabets. However, the problem is that I don't know how to map the culture info to the name of a script.
In other words, is there a way to determine the script name corresponding to a culture? Or is it possible to determine the range of Unicode character values corresponding to a culture? Either of them would allow me to render the alphabets on the button properly.
Any suggestions or guidance regarding this is truly appreciated. If there is something fundamentally wrong with my approach (or with what I am trying to achieve), please point out that as well. Thanks for your time.
PS: I know the easiest solution is to either configure the script name as part of user preferences or display a list of languages for the user to choose from (a la Contact in Outlook 2007). But I am just trying to see whether I can render the alphabets corresponding to the culture without the user having to do anything. | 0 | [
2,
375,
1829,
45,
184,
20,
2942,
1365,
15404,
20,
21,
3884,
204,
54,
28010,
925,
978,
60,
800,
3726,
3726,
31,
376,
109,
676,
88,
375,
1829,
9,
31,
589,
568,
13,
9,
2328,
172,
9,
387,
29,
272,
5910,
172,
9,
387,
56,
1384,
78... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
auto c/c++
===
Has anyone ever seen the storage class auto explicitly in use in c/c++? If so, in what situation? | 0 | [
2,
3108,
272,
118,
150,
20512,
800,
3726,
3726,
63,
1276,
462,
541,
14,
4326,
718,
3108,
13108,
19,
275,
19,
272,
118,
150,
20512,
60,
100,
86,
15,
19,
98,
1858,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Firefox add-on tools for checking JavaScript syntax?
===
Not sure if there is any Firefox add-on tool for checking JavaScript syntax, var declaration, or even pre-compiling available?
I find out is very difficult to debug JavaScript in a web html page. I have to add some script there. When the scripts get very big or long, it stops working. Basically, there must be some bugs. It is very frustrating even the load event stop working. I do need some good tools to find out the bugs.
I have tried FireBug. It is good but not enough. Maybe I don't know all its features. Anyway, I need any good suggestions. | 0 | [
2,
535,
18219,
3547,
8,
218,
4672,
26,
9886,
8247,
8741,
22649,
60,
800,
3726,
3726,
52,
562,
100,
80,
25,
186,
535,
18219,
3547,
8,
218,
5607,
26,
9886,
8247,
8741,
22649,
15,
4033,
7098,
15,
54,
166,
782,
8,
11103,
49,
802,
90... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 LINQ DOA?
===
Just when I make friends with LINQ, it appears as though MS is pulling the rug out from under it.
<http://blogs.msdn.com/adonet/archive/2008/10/29/update-on-linq-to-sql-and-linq-to-entities-roadmap.aspx>
From my little bit of research, EF is way overkill for simple work. But after this announcement is there a point in continuing to use LINQ?
Beyond the future for LINQ, doesn't this just generally send a bad signal? Given the speed with which MS is throwing bits against the wall, is it rational to use any of the new bits early? (and that's being kind, it's hardly early for LINQ!).
For my LINQ to SQL work, I think I'm headed to SubSonic! | 0 | [
2,
25,
6294,
1251,
107,
58,
60,
800,
3726,
3726,
114,
76,
31,
233,
954,
29,
6294,
1251,
15,
32,
1780,
28,
362,
4235,
25,
3303,
14,
12150,
70,
37,
131,
32,
9,
13,
1,
21127,
6903,
7091,
5447,
9,
79,
18,
43,
103,
9,
960,
118,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why does the DoubleBuffered property default to false on a DataGridView and why is it protected?
===
We had a performance issue with DataGridViews where the redraw was horridly slow and found the solution [Here][1] to create a derived type and enable double buffering on the control.
(Derived type is necessary since the DoubleBuffered property is protected)
It doesn't seem like there's any drawback to having the DoubleBuffered property set to true.
[1]: http://stackoverflow.com/questions/118528/horrible-redraw-performance-of-the-datagridview-on-one-of-my-two-screens | 0 | [
2,
483,
630,
14,
1494,
2345,
6866,
69,
1354,
12838,
20,
4997,
27,
21,
1054,
16375,
4725,
17,
483,
25,
32,
3803,
60,
800,
3726,
3726,
95,
41,
21,
956,
1513,
29,
1054,
16375,
4725,
18,
113,
14,
402,
12404,
23,
4523,
5175,
102,
227... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Wrapping variable width text in emacs lisp
===
I am hacking up a tagging application for emacs. I have got a tag cloud/weighted list successfully displaying on a buffer, but i am running into a snag. I need to be able to properly word-wrap the buffer, but I haven't a clue where to start.
The font I am using is a variable width font. On top of that, each tag is going to be in a different size, depending on how many times it shows up on the buffer. Finally, the window that displays the tagcloud could be in a window that is 200 pixels wide, or the full screen width.
I really have no idea where to start. I tried longlines mode on the tagcloud buffer, but that didn't work.
Source code is at: http://emacswiki.org/cgi-bin/emacs/tagging.el | 0 | [
2,
13437,
7612,
9456,
1854,
19,
13,
62,
6893,
18,
2093,
3401,
800,
3726,
3726,
31,
589,
25787,
71,
21,
3383,
2762,
3010,
26,
13,
62,
6893,
18,
9,
31,
57,
330,
21,
3383,
4005,
118,
8696,
69,
968,
3673,
17418,
27,
21,
17497,
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... |
Python - append vs. extend
===
What is the difference between the list methods `append` and `extend`? | 0 | [
2,
20059,
13,
8,
4865,
2451,
4611,
9,
7206,
800,
3726,
3726,
98,
25,
14,
2841,
128,
14,
968,
3195,
13,
1,
22358,
43,
1,
17,
13,
1,
1706,
1316,
43,
1,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How to produce Photoshop stroke effect?
===
I'm looking for a way to programmatically recreate the following effect:
Give an input image:
![input][1]
I want to iteratively apply the "stroke" effect.
The first step looks like this:
![step 1][2]
The second step like this:
![alt text][3]
And so on.
I assume this will involves some kind of edge detection and then tracing the edge somehow.
Is there a known algorithm to do this in an efficient and robust way?
[1]: http://www.shiny.co.il/shooshx/ConeCarv/q_input.png
[2]: http://www.shiny.co.il/shooshx/ConeCarv/q_step1.png
[3]: http://www.shiny.co.il/shooshx/ConeCarv/q_step2.png | 0 | [
2,
184,
20,
2213,
7064,
5347,
7080,
1590,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
161,
20,
625,
6732,
1326,
21119,
14,
249,
1590,
45,
590,
40,
6367,
1961,
45,
13,
187,
2558,
108,
4881,
500,
2558,
165,
500,
31,
259,
20,
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... |
ASP.NET MVC : Not sure how to make these routes.
===
i'm trying to make the following routes .. and currently i'm going about this in a _really_ long way.. ie. one route instance for EACH route.
this is what i'm after... (assuming i'm doing a 'stackoverflow website')
/ <-- root site
/page/{page} <-- root site, but to the page of questions.
/tag/{tag}/page/{page} <-- as above, but the questions are filtered by tag
/question/ask <-- this page :P
/question/{subject} <-- reading about a question
(and no.. i'm most definitely not doing a stackoverflow website :) )
cheers!
(gawd i find dis all so confusing at times). | 0 | [
2,
28,
306,
9,
2328,
307,
8990,
13,
45,
52,
562,
184,
20,
233,
158,
5050,
9,
800,
3726,
3726,
31,
22,
79,
749,
20,
233,
14,
249,
5050,
13,
9,
9,
17,
871,
31,
22,
79,
228,
88,
48,
19,
21,
13,
1,
15257,
1,
175,
161,
9,
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 get a list of commit comments from CVS since last tagged version?
===
I have made a bunch of changes to a number of files in a project. Every commit (usually at the file level) was accompanied by a comment of what was changed.
Is there a way to get a list from CVS of these comments on changes since the last tagged version?
Bonus if I can do this via the eclipse CVS plugin. | 0 | [
2,
184,
107,
31,
164,
21,
968,
16,
9686,
7534,
37,
13,
12732,
18,
179,
236,
27945,
615,
60,
800,
3726,
3726,
31,
57,
117,
21,
7653,
16,
1693,
20,
21,
234,
16,
6488,
19,
21,
669,
9,
352,
9686,
13,
5,
13075,
35,
14,
3893,
662,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 are some good tutorials on writing a custom LINQ Provider?
===
I would like to build a custom LINQ Provider. Mostly for learning purposes, but it may be usefull in the future. I've heard it's not a simple thing to do, but...
Where are some good tutorials on writing a custom LINQ Provider? | 0 | [
2,
113,
50,
109,
254,
29724,
18,
27,
1174,
21,
5816,
6294,
1251,
11747,
60,
800,
3726,
3726,
31,
83,
101,
20,
1895,
21,
5816,
6294,
1251,
11747,
9,
1555,
26,
2477,
4612,
15,
47,
32,
123,
44,
4811,
255,
19,
14,
1022,
9,
31,
22,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Add line numbers in vim
===
How can I add line numbers to a range of rows in vim? Not as in ":set nu" - this just displays numbers, but doesn't add them to the file. | 0 | [
2,
3547,
293,
2116,
19,
1790,
79,
800,
3726,
3726,
184,
92,
31,
3547,
293,
2116,
20,
21,
978,
16,
11295,
19,
1790,
79,
60,
52,
28,
19,
13,
7,
45,
3554,
3152,
7,
13,
8,
48,
114,
9412,
2116,
15,
47,
1437,
22,
38,
3547,
105,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Creating DomainKeys that needed by Yahoo! EMail
===
Can any one gave me requirements/step-by-step procedures on how am I suppose to create domainkeys for my mail server so that our email can pass through on Yahoo!'s Mail Server and go to Inbox Folder and not on Bulk/Spam Folder?
I think implementing domainkeys are one of the requirements of Yahoo! Mail so that emails that was sent to them will not be mark as spam.
our mail server is hmailserver.
Any suggestion/comment would be appreciated
Thanks!
| 0 | [
2,
2936,
4603,
4237,
18,
30,
851,
34,
23553,
187,
8517,
800,
3726,
3726,
92,
186,
53,
492,
55,
4786,
118,
8375,
8,
779,
8,
8375,
8876,
27,
184,
589,
31,
5787,
20,
1600,
4603,
4237,
18,
26,
51,
4216,
8128,
86,
30,
318,
8517,
92... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Advanced Java Generics question
===
I've got some generic class for my JPA model POJO that goes like this:
public interface Identifiable<PK extends Serializable> {
PK getUniqueId();
}
public interface Watchable<PK extends Serializable> extends Identifiable<PK> {
public Long getMessageSequence();
}
public interface WatchableDao<T extends Watchable<PK>> extends GenericDao<T, PK> {
public List<T> getNewMessages(Long lastValue);
public List<T> getNewMessages(Long from, Long to);
}
This code won't compile. For this to work, I need to specify
public interface WatchableDao<T extends Watchable<PK>, PK extends Serializable> as generic information for the
But that redundant information !! The fact that T extends Watchable imply that a PK will be specified for the Watchable and that this is the type to use for the DAO's PK.
How can I make this work without redundant information ?
Thanks, Fred | 0 | [
2,
2255,
8247,
12733,
18,
1301,
800,
3726,
3726,
31,
22,
195,
330,
109,
12733,
718,
26,
51,
487,
1060,
1061,
2353,
1636,
30,
1852,
101,
48,
45,
317,
6573,
28688,
1,
17244,
9073,
5956,
3186,
579,
1,
13,
1,
13,
17244,
164,
1020,
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... |
why should we typedef a struct so often in C?
===
i have seen many codes consisting of structures like the below one
typedef struct
{
int i;
char k;
}elem;
elem user;
I hav seen this type of typedefs many a times.why is it needed so often? any specific reason of applicable area?
| 0 | [
2,
483,
378,
95,
1001,
13862,
21,
13,
10346,
86,
478,
19,
272,
60,
800,
3726,
3726,
31,
57,
541,
151,
11358,
4160,
16,
3815,
101,
14,
1021,
53,
1001,
13862,
13,
10346,
13,
1,
19,
38,
31,
73,
4892,
680,
73,
13,
1,
5535,
79,
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... |
strdup() -what it does in c?
===
what is the purpose of strdup() function in c? | 0 | [
2,
354,
897,
576,
5,
6,
13,
8,
608,
32,
630,
19,
272,
60,
800,
3726,
3726,
98,
25,
14,
2131,
16,
354,
897,
576,
5,
6,
1990,
19,
272,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Timing a a line of code accurately in a threaded application, C#
===
What is the most accurate way of timing a thread or a line of code in C# assuming the application is multithreaded?
Kind regards, | 0 | [
2,
11812,
21,
21,
293,
16,
1797,
16353,
19,
21,
9322,
69,
3010,
15,
272,
5910,
800,
3726,
3726,
98,
25,
14,
127,
8137,
161,
16,
11812,
21,
9322,
54,
21,
293,
16,
1797,
19,
272,
5910,
11704,
14,
3010,
25,
1889,
96,
10647,
69,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Is it best practice to achieve recursion via a partial?
===
I have the need to display a nested set structure in HTML. I am doing it with the following partial:
<ul<%= ' id="tree"' if depth == 0 %>>
<% items.each do |item| %>
<li node="<%= item.id %>"><a><%= item.name %></a>
<% if item.has_children? %>
<%= render :partial => 'tree_level', :locals => {:items => item.children, :depth => depth + 1} %>
<% end %>
</li>
<% end %>
</ul>
Is this the best place to have the code? I "feel" like there should be a `to_html` method on the object which dumps the entire tree structure for me, though this works. | 0 | [
2,
25,
32,
246,
1345,
20,
4689,
26604,
5991,
1197,
21,
7284,
60,
800,
3726,
3726,
31,
57,
14,
376,
20,
3042,
21,
5618,
69,
309,
1411,
19,
13,
15895,
9,
31,
589,
845,
32,
29,
14,
249,
7284,
45,
13,
1,
1287,
1,
11881,
3726,
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... |
VB control crashes my app
===
I am using <a href="http://www.codeproject.com/KB/vb/TabPages.aspx">this</a> - otherwise excellent - vb tab control in one of my c# apps. When the app using it is installed on another machine, Windows tells the user in its usual friendly and descriptive manner that "The application encountered a problem and needs to close". I guess the control has some hidden vb-related dependency, but what can that be?
Any ideas guys? | 0 | [
2,
13,
20468,
569,
21563,
51,
4865,
800,
3726,
3726,
31,
589,
568,
13,
1,
58,
746,
14057,
3726,
7,
21127,
6903,
6483,
9,
9375,
21011,
9,
960,
118,
18167,
118,
20468,
118,
15783,
6486,
18,
9,
472,
306,
396,
7,
1,
1565,
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... |
VB.NET: What's the suffix for a "Byte" numeric constant?
===
Just out of curiosity:
I know I can tell the compiler if I want a value to be interpreted as a certain numeric type, e.g. as Integer (32 bit signed) this way appending an "I" to the constant value:
Private Function GetTheAnswerAsInteger() As Integer
Return 42I
End Function
There's also "S" for Short or "D" for Decimal etc.
But what is the **suffix for Byte**? Hint: it's not the obvious one "B"...
| 0 | [
2,
13,
20468,
9,
2328,
45,
98,
22,
18,
14,
15447,
26,
21,
13,
7,
23246,
7,
15764,
596,
3587,
60,
800,
3726,
3726,
114,
70,
16,
11581,
45,
31,
143,
31,
92,
494,
14,
21486,
100,
31,
259,
21,
1923,
20,
44,
10394,
28,
21,
1200,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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++ : how to link against libA.so and not libA-X.Y.Z.so
===
I have a library A, that I develop. When I deploy it on a machine, the corresponding *libA.so* and *libA-X.Y.Z.so* are put in /usr/lib (X.Y.Z being the version number).
Now I develop a library B, which uses A. When I link B, I use the flag -lA. Then "*ldd libB.so*" gives me :
(...)
libA-X.Y.Z.so => /usr/lib/libA-X.Y.Z.so
(...)
My problem is that when I release a new version of A (X.Y.ZZ), I also have to release a new version of B. Otherwise, someone installing the latest A won't be able to install B which will be looking for the version X.Y.Z which doesn't exist.
How do I solve this problem ? How can I tell B to look for libA.so and not libA-X.Y.Z.so ? Or is it wrong to do so ? even unsafe ?
| 0 | [
2,
272,
20512,
13,
45,
184,
20,
3508,
149,
2093,
969,
9,
656,
17,
52,
2093,
969,
8,
396,
9,
93,
9,
380,
9,
656,
800,
3726,
3726,
31,
57,
21,
1248,
21,
15,
30,
31,
2803,
9,
76,
31,
17617,
32,
27,
21,
1940,
15,
14,
7265,
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... |
Syntax colouring using Swing
===
Is it possible to have something like a JTextArea which will color some keywords based on some mappings I have ? | 0 | [
2,
22649,
4609,
68,
568,
5587,
800,
3726,
3726,
25,
32,
938,
20,
57,
301,
101,
21,
487,
11969,
17760,
56,
129,
1665,
109,
1246,
12827,
432,
27,
109,
13305,
18,
31,
57,
13,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
DLL Building Question
===
I have my sources split up in several directories , so , for each directory , I get back a DLL . Is it possible to create a DLL from several other DLL's ? | 0 | [
2,
13,
43,
211,
353,
1301,
800,
3726,
3726,
31,
57,
51,
2662,
2132,
71,
19,
238,
559,
1596,
13,
15,
86,
13,
15,
26,
206,
16755,
13,
15,
31,
164,
97,
21,
13,
43,
211,
13,
9,
25,
32,
938,
20,
1600,
21,
13,
43,
211,
37,
238... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Xcode iPhone Deploy
===
I tried this step:
> Select the menu options "Project > New Build Phase > New Run Script Build Phase", and enter the following script (don't forget to replace /Users/youruser/bin by the correct path to gen_entitlements.py) :
export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
if [ "${PLATFORM_NAME}" == "iphoneos" ]; then
/Users/youruser/bin/gen_entitlements.py "my.company.${PROJECT_NAME}" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent";
codesign -f -s "iPhone developer" --resource-rules "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/ResourceRules.plist" \
--entitlements "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/"
fi
From [link][1]
And now I want to remove this script from my project, I didn't find Xcode section for removing those scripts (Run Script Build Phase)
[1]: http://www.246tnt.com/iPhone/#xcode | 0 | [
2,
993,
9375,
21024,
17617,
800,
3726,
3726,
31,
794,
48,
1424,
45,
13,
1,
5407,
14,
11379,
6368,
13,
7,
21011,
13,
1,
78,
1895,
2702,
13,
1,
78,
485,
3884,
1895,
2702,
7,
15,
17,
2830,
14,
249,
3884,
13,
5,
804,
22,
38,
385... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Center Align on a Absolutely Positioned Div
===
div#thing
{
position: absolute;
top: 0px;
z-index: 2;
margin: 0 auto;
}
<div id="thing">
<p>text text text with no fixed size, variable font</p>
</div>
The div is at the top, but I can't center it with <center> or margin: 0 auto; | 0 | [
2,
459,
23389,
27,
21,
6916,
12125,
13,
12916,
800,
3726,
3726,
13,
12916,
5910,
96,
68,
13,
1,
649,
45,
7070,
73,
371,
45,
713,
306,
396,
73,
2052,
8,
25671,
45,
172,
73,
5440,
45,
713,
3108,
73,
13,
1,
13,
1,
12916,
4924,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
extending pythonce to access gsm/camera/gps easily from pythonce
===
as it seems there is no scripting language for windows mobile devices that gives access to phone (sms, mms, make a call, take photo) I wonder how complex would it be to make a python library that would enable that (write something in C, compile, and import in pythonce).
Question: where shall start to understand how to compile a pythonce module that will give additional functionality to python on windows mobile. Also, what is the required toolkit. Is it at all possible on mac (Leopard)?
| 0 | [
2,
8176,
20059,
1105,
20,
1381,
489,
18,
79,
118,
24636,
118,
13321,
18,
2351,
37,
20059,
1105,
800,
3726,
3726,
28,
32,
2206,
80,
25,
90,
3884,
68,
816,
26,
1936,
3241,
4690,
30,
2352,
1381,
20,
1132,
13,
5,
18,
79,
18,
15,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Access Web Service from a SQL Server 2005 Stored Procedure
===
Currently I have a stored procedure that makes some updates to a table, and after it makes them, I need to call a web service.
The procedure uses a transaction, and I need to call the web service at the end of the transaction. If the web service call should fail, the transaction would get rolled back.
I need to know how do I add a SOAP web service reference to SQL and how do I call the service from the stored procedure.
Distributed transactions / Enterprise services are excluded for architectural reasons.
| 0 | [
2,
1381,
2741,
365,
37,
21,
4444,
255,
8128,
812,
8214,
7004,
800,
3726,
3726,
871,
31,
57,
21,
8214,
7004,
30,
1364,
109,
16779,
20,
21,
859,
15,
17,
75,
32,
1364,
105,
15,
31,
376,
20,
645,
21,
2741,
365,
9,
14,
7004,
2027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
DB2 Query Output - Different Behavior
===
I've two tables TAB_A and TAB_B. TAB_A is master table and TAB_B is child / transaction table. TAB_A is having COL_A (Primary key) and TAB_B is having COL_B (Primary key) and also COL_A.
For some business reason, Foreign key is not defined between TAB_A and TAB_B on column COL_A.
I've four records in TAB_B with some values say 1, 2, 3 and 4 in COL_A which has got no corresponding matching values in COL_A of TAB_A. (They are orphan records, created by mistake)
When I issue the following SELECT query, I get four records
SELECT B.COL_B,
B.COL_A
FROM TAB_A A,
TAB_B B
WHERE A.COL_A = B.COL_A
AND B.COL_A IN (1, 2, 3, 4)
But if I start refering A.COL_A in SELECT query, no records are returned.
SELECT B.COL_B,
B.COL_A,
A.COL_A
FROM TAB_A A,
TAB_B B
WHERE A.COL_A = B.COL_A
AND B.COL_A IN (1, 2, 3, 4)
Can someone please explain this weird behavior?
DB2 Version 9.5 in AIX | 0 | [
2,
13,
9007,
135,
25597,
5196,
13,
8,
421,
3257,
800,
3726,
3726,
31,
22,
195,
81,
7484,
6523,
1,
58,
17,
6523,
1,
220,
9,
6523,
1,
58,
25,
1129,
859,
17,
6523,
1,
220,
25,
850,
13,
118,
12799,
859,
9,
6523,
1,
58,
25,
452... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
No indexes on small tables?
===
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." (Donal Knuth). My SQL tables are unlikely to contain more than a few thousand rows each (and those are the big ones!). SQL Server Database Engine Tuning Advisor dismisses the amount of data as irrelevant. So I shouldn't even think about putting indexes on these tables. Correct? | 0 | [
2,
90,
4348,
160,
27,
284,
7484,
60,
800,
3726,
3726,
13,
7,
458,
378,
3856,
88,
284,
13,
9039,
9198,
22851,
15,
395,
88,
561,
2653,
16,
14,
85,
45,
17769,
21597,
25,
14,
5900,
16,
65,
3215,
9,
7,
13,
5,
804,
192,
25938,
252... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Make UAC optional in Windows Installer on Vista
===
I'm have written an msi file that offers a choice of "per-user" or "for all" installation in the UI phase, and now find that the installer fails on Vista:
- if I just reuse the installer that works for XP, Vista will trigger a UAC prompt even for the "per-user" installation, making that installation pointless
- if I turn off UAC in bit 3 of PID_WORDCOUNT, Vista won't invoke UAC at all anymore, so even if the user would have permission to install into the machine registry (say), the privilege raising doesn't happen, so the installation fails.
So: how can I prevent installer from invoking UAC when it isn't really needed? Alternatively, how can I programmatically request UAC even if bit 3 is set? | 0 | [
2,
233,
287,
1738,
12832,
19,
1936,
16146,
106,
27,
13520,
800,
3726,
3726,
31,
22,
79,
57,
642,
40,
4235,
49,
3893,
30,
2486,
21,
1837,
16,
13,
7,
1432,
8,
16704,
7,
54,
13,
7,
1106,
65,
7,
7758,
19,
14,
13,
5661,
2702,
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... |
Get a list of members of a WinNT group (C#)
===
There are a couple of questions similar to this on stack overflow but not quite the same.
I want to open, or create, a local group on a win xp computer and add members to it, domain, local and well known accounts. I also want to check whether a user is already a member so that I don't add the same account twice, and presumably get an exception.
So far I started using the DirectoryEntry object with the WinNT:// provider. This is going ok but I'm stuck on how to get a list of members of a group?
Anyone know how to do this? Or provide a better solution than using DirectoryEntry?
| 0 | [
2,
164,
21,
968,
16,
443,
16,
21,
628,
2877,
214,
13,
5,
150,
5910,
6,
800,
3726,
3726,
80,
50,
21,
1335,
16,
2346,
835,
20,
48,
27,
7566,
20285,
47,
52,
1450,
14,
205,
9,
31,
259,
20,
368,
15,
54,
1600,
15,
21,
375,
214,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Only allow one entry per User in a List - ListReceiver "Feature" for a List?
===
I wonder if there is a way to create a Custom List in Sharepoint, but specify that each user may only create one item in the list.
I am thinking of two approaches:
* Develop a ListReceiver that checks if the user already created an item. Problem: I did not see a way to enable a Feature on a specific list (the idea is that non-developers can just create a custom list and "switch on" the Feature if they want
* Create a Custom List Type, so when people click the "Create" Button, they see "Custom Unique List" under "Custom Lists" as an additional type.
Before I do the second option, does anyone know if the first option is possible? Or even if it can already be done without custom development (and *without* a custom workflow in SPDesigner) | 0 | [
2,
104,
1655,
53,
2792,
416,
4155,
19,
21,
968,
13,
8,
968,
99,
1105,
19737,
13,
7,
26956,
7,
26,
21,
968,
60,
800,
3726,
3726,
31,
2666,
100,
80,
25,
21,
161,
20,
1600,
21,
5816,
968,
19,
1891,
3132,
15,
47,
19077,
30,
206,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
<noscipt> in <head>
===
Am I allowed to place `<noscript>` in the <head>? | 0 | [
2,
13,
1,
251,
18,
11526,
38,
1,
19,
13,
1,
1743,
1,
800,
3726,
3726,
589,
31,
1159,
20,
209,
13,
1,
251,
8741,
1,
19,
14,
13,
1,
1743,
1,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How do you change the CLASSPATH within Java?
===
How do you change the CLASSPATH of a Java process from within the Java process?
----------
Before you ask me "Why would you want to do that?" I'll explain it shortly.
> When you have a Clojure REPL running it is common to need more jars in your CLASSPATH to load a [Clojure][1] source file, and I'd like to do it without having to restart Clojure itself (which is not really an option when using it on Slime on Emacs).
That's the reason but I don't want this question tagged as some-weird-language some-weird-editor and be disregarded by the majority of Java developers that may have the answer.
[1]: http://clojure.org | 0 | [
2,
184,
107,
42,
753,
14,
718,
8353,
363,
8247,
60,
800,
3726,
3726,
184,
107,
42,
753,
14,
718,
8353,
16,
21,
8247,
953,
37,
363,
14,
8247,
953,
60,
13,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
115,
42,
1349,
55,
13,
7,
2256,
83... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using regini from a c# app without bothering the user?
===
I am developing an application that needs to use regini (because of legacy reasons) to insert something into the registry. I have been trying to do this in such a way the the user of the application is not aware of this. I have written the following code:
System.Diagnostics.ProcessStartInfo pi = new ProcessStartInfo();
pi.FileName = @"c:\windows\system32\regini.exe";
pi.Arguments = name;
pi.WorkingDirectory = Utils.AppSettings.WorkingDirectory.ToString();
pi.WindowStyle = ProcessWindowStyle.Hidden;
pi.RedirectStandardError = true;
pi.RedirectStandardOutput = true;
pi.UseShellExecute = false;
Process p = new Process();
p.StartInfo = pi;
p.EnableRaisingEvents = true;
p.Start();
Unfortunately, I still see the 'command' window pop-up every time this code is executed. I was under the impression that
pi.WindowStyle = ProcessWindowStyle.Hidden;
would prevent that. How can I regini from opening it's own command window?
| 0 | [
2,
568,
7953,
2651,
37,
21,
272,
5910,
4865,
366,
18968,
14,
4155,
60,
800,
3726,
3726,
31,
589,
3561,
40,
3010,
30,
2274,
20,
275,
7953,
2651,
13,
5,
4451,
16,
7780,
2932,
6,
20,
14692,
301,
77,
14,
18269,
9,
31,
57,
74,
749,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to get the list of open windows from xserver
===
Anyone got an idea how to get from an Xserver the list of all open windows? | 0 | [
2,
184,
20,
164,
14,
968,
16,
368,
1936,
37,
993,
10321,
106,
800,
3726,
3726,
1276,
330,
40,
882,
184,
20,
164,
37,
40,
993,
10321,
106,
14,
968,
16,
65,
368,
1936,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Why does my POST with cURL in PHP timeout?
===
I am doing an HTML form POST using curl in PHP. The receving PHP works well.
The form data is rather large, so my first problem was that the server sent a 100 / Continue header, to which curl doesn't respond correctly (see [here][1]), so I added
`curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));`
which solved that. But the POST stile timeouts without anyresponse from the server.
Curl's STDERR output:
* About to connect() to servername port 443 (#0)
* Trying 127.0.0.1... * connected
* Connected to bi (127.0.0.1) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
* subject: /CN=servername
* start date: 2008-10-17 20:56:35 GMT
* expire date: 2018-10-15 20:56:35 GMT
* issuer: /CN=servername
* SSL certificate verify result: self signed certificate (18), continuing anyway.
> POST /index.php HTTP/1.1
Host: servername
Accept: */*
Cookie: session=ca60e09739cd37ef8cc931b054ece76a
Content-Length: 3727
Content-Type: application/x-www-form-urlencoded
* Operation timed out after 300000 milliseconds with 0 bytes received
* Closing connection #0
And the code:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://servername/index.php');
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_FAILONERROR, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_COOKIE, str_replace('&', ';', http_build_query($_COOKIE)));
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
curl_setopt($ch, CURLOPT_VERBOSE, 1);
$fp = fopen('/var/www/curl.err', 'w');
curl_setopt($ch, CURLOPT_STDERR, $fp);
$content = curl_exec($ch);
[1]: http://www.gnegg.ch/2007/02/the-return-of-except-100-continue/ | 0 | [
2,
483,
630,
51,
678,
29,
14320,
19,
13,
26120,
85,
1320,
60,
800,
3726,
3726,
31,
589,
845,
40,
13,
15895,
505,
678,
568,
14320,
19,
13,
26120,
9,
14,
6042,
2443,
68,
13,
26120,
693,
134,
9,
14,
505,
1054,
25,
864,
370,
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 send array throught HTTPservice in Adobe Flex 3
===
How to send array in Httpservice in Adobe Flex3 | 0 | [
2,
184,
20,
2660,
7718,
120,
38,
7775,
11449,
19,
20299,
14409,
203,
800,
3726,
3726,
184,
20,
2660,
7718,
19,
7775,
11449,
19,
20299,
14409,
240,
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... | [
1,
1,
1,
1,
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... |
Fastest way to iterate over a stack in c#
===
I feel that using GetEnumerator() and casting IEnumerator.Current is expensive. Any better suggestions?<br/><br/>
I'm open to using a different data structure if it offers similiar capabilities with better performance.
__After thought:__<br/>
Would a generic stack be a better idea so that the cast isn't neccessary? | 0 | [
2,
7518,
161,
20,
32,
106,
1373,
84,
21,
7566,
19,
272,
5910,
800,
3726,
3726,
31,
583,
30,
568,
164,
219,
723,
106,
3457,
5,
6,
17,
9087,
13,
660,
6336,
106,
3457,
9,
17657,
25,
5381,
9,
186,
574,
18389,
60,
1,
5145,
118,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Help with Magento Custom Module. Redirect to another module and return to checkout
===
Magento shopping cart is built on the Zend Framework in PHP. This is the first time I've dealt with the Zend framework and I'm having the following difficulty...
I'm creating a custom module that will allow users to upload images whenever they purchase products.
I can overload the addAction() method whenever a user attempts to add a product to their cart. I can also create a custom module which presents the form to the user and accepts the file(s). However I'm not sure how to insert the code to run my module into my overloaded method:
<?php
require_once 'Mage/Checkout/controllers/CartController.php';
class Company_SpecialCheckout_Checkout_CartController extends Mage_Checkout_CartController
{
# Overloaded addAction
public function addAction()
{
# when user tries to add to cart, request images from them
# *********
# *** what do i do in here to display a custom block ???? ###
# *** and allow addAction to continue only if successfully validated form input ###
# *********
parent::addAction();
}
}
I suspect my difficulties come from my lack of knowledge of the Zend MVC way of doing things. I've studied all the Magento documentation/wikis/forum threads from top to bottom.
| 0 | [
2,
448,
29,
4723,
17050,
5816,
12613,
9,
302,
14706,
20,
226,
12613,
17,
788,
20,
2631,
1320,
800,
3726,
3726,
4723,
17050,
4884,
6420,
25,
392,
27,
14,
10526,
43,
6596,
19,
13,
26120,
9,
48,
25,
14,
64,
85,
31,
22,
195,
9706,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Javascript - how to replace a sub-string?
===
This is a simple one. I want to replace a sub-string with another sub-string on client-side using Javascript.
Original string is `'original READ ONLY'`
I want to replace the `'READ ONLY'` with `'READ WRITE'`
Any quick answer please? Possibly with a javascript code snippet... | 0 | [
2,
8247,
8741,
13,
8,
184,
20,
3934,
21,
972,
8,
11130,
60,
800,
3726,
3726,
48,
25,
21,
1935,
53,
9,
31,
259,
20,
3934,
21,
972,
8,
11130,
29,
226,
972,
8,
11130,
27,
6819,
8,
1416,
568,
8247,
8741,
9,
501,
3724,
25,
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... |
Eclipse 3.4 TextViewer
===
I am creating a plugin for Eclipse 3.4. I created a plug-in development project using the application with a view. Now I am trying to create a `TextViewer` the documentation says that it is located in `org.eclipse.jface.text.TextViewer`. But, this whole package is missing and eclipse cannot locate `TextViewer` class to import. I want to know why is this package/class missing? Also if it is really gone what took `TextViewer`'s place? | 0 | [
2,
11652,
203,
9,
300,
1854,
4725,
106,
800,
3726,
3726,
31,
589,
2936,
21,
10922,
108,
26,
11652,
203,
9,
300,
9,
31,
679,
21,
10922,
8,
108,
522,
669,
568,
14,
3010,
29,
21,
1418,
9,
130,
31,
589,
749,
20,
1600,
21,
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... |
Finding invocations of a certain function in a c++ file using python
===
I need to find all occurrences of a function call in a c++ file using python, and extract the arguments for each call.
I'm playing with the [pygccxml](http://www.language-binding.net/pygccxml/pygccxml.html) package, and extracting the arguments given a string with the function call is extremely easy:
from pygccxml.declarations import call_invocation
def test_is_call_invocation(call):
if call_invocation.is_call_invocation(call):
print call_invocation.name(call)
for arg in call_invocation.args(call):
print " ",arg
else:
print "not a function invocation"
What I couldn't find is a way of getting the calls parsing a file:
from pygccxml import parser
from pygccxml import declarations
decls = parser.parse( ['main.cpp'] )
# ...
Is there a way to find the calls to a certain function using the pygccxml package?
Or maybe that package is an overkill for what I'm trying to do :) and there's a much simpler way? Finding the function calls with a regular expression is, I'm afraid, much trickier than it might look at a first sight...
| 0 | [
2,
3007,
19,
2625,
16893,
18,
16,
21,
1200,
1990,
19,
21,
272,
20512,
3893,
568,
20059,
800,
3726,
3726,
31,
376,
20,
477,
65,
12933,
18,
16,
21,
1990,
645,
19,
21,
272,
20512,
3893,
568,
20059,
15,
17,
10962,
14,
10553,
26,
206... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 call a Sharepoint Webservice from a c# client using Kerberos authentication ?
===
We have developed a webservice that sits and runs in the context of a sharepoint site. This works fine using normal windows authentication.
We now have a client who wants to install this on a Kerberos enabled sharepoint site. What changes would we need to make to either the webserivce, the calling client (a windows service) or both to enable this...?
Thanks
Matt
| 0 | [
2,
184,
107,
31,
645,
21,
1891,
3132,
2741,
11449,
37,
21,
272,
5910,
6819,
568,
7002,
2102,
759,
27963,
13,
60,
800,
3726,
3726,
95,
57,
885,
21,
2741,
11449,
30,
7550,
17,
1461,
19,
14,
4141,
16,
21,
1891,
3132,
689,
9,
48,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Read 64 bit integer string from file
===
We have a file that has a 64 bit integer as a string in it. How do we scanf() or otherwise parse this numeric string into an unsigned 64 bit integer type in C++ ?
We are aware of things like %lld etc., but a lot of ways to do this parse seem to break compiles under different compilers and stdlibs. The code should compile under gcc and the Microsoft C++ compiler (of course full compliance with standards would be a plus)
| 0 | [
2,
1302,
4384,
1142,
13820,
3724,
37,
3893,
800,
3726,
3726,
95,
57,
21,
3893,
30,
63,
21,
4384,
1142,
13820,
28,
21,
3724,
19,
32,
9,
184,
107,
95,
8313,
410,
5,
6,
54,
3190,
2017,
870,
48,
15764,
596,
3724,
77,
40,
28839,
43... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why is there a difference between the encoding of the Windows Command Prompt vs. a batch file?
===
For example, suppose I have a batch file called 'test.cmd' and it simply contains:
echo %1
I can call this directly from the command prompt with 'test.cmd some¬arg' and the result is that the string 'some¬arg' is printed.
However if I place that same call in a second batch file, called 'tester.cmd' for the sake of argument, and I call this from the command prompt the result is that the string 'some%arg' is printed.
What is it that messes up the encoding and how do I get around it? I am sure I've fixed this before, but I can't remember how...
Thanks! | 0 | [
2,
483,
25,
80,
21,
2841,
128,
14,
19608,
16,
14,
1936,
1202,
11443,
4417,
4611,
9,
21,
13064,
3893,
60,
800,
3726,
3726,
26,
823,
15,
5787,
31,
57,
21,
13064,
3893,
227,
13,
22,
10543,
9,
9095,
43,
22,
17,
32,
1659,
1588,
45,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Dynamic pathcing of databases
===
Please forgive my long question. I have an idea for a design that I could use some comments on. Is it a good idea to do this? And what are the pit falls I should be aware of? Are there other similar implementations that are better?
**My situation is as follows:**
I am working on a rewrite of a windows forms application that connects to a SQL 2008 (earlier it was SQL 2005) server. The application is an "expert-system" for an engineering company where we store structured data about constructions. We have control of all installations of the client software, we have no external customers or users, they are all internal to the company, and they are all be trusted not to do anything malicious to the software or database.
The current design doesn't have too many tables (about 10 - 20) but some of them have millions of records that belong to several hundred constructions. The systems performance has been ok so far, but it is starting to degrade as we are pushing the limits of the design.
As part of the rewrite I am considering splitting the database into one master database and several "child" databases where each describes one construction. Each child database should be of identical design. This should eliminate the performance problems we are seeing today since the data stored in each database would be less than one percent of the total data amount.
My concern is that instead of maintaining one database we will now get hundreds of databases that must be kept up to date. The system is constantly evolving as the companys requirements change (you know how it is), and while we try to look forward to reduce the number of changes the changes will come. So we will need a system where we keep track of all database changes done to the system so they can be applied to the child databases. Updating the client application won't be a problem, we have good control of that aspect.
I am thinking of a change tracing system where we store database scripts for all changes in a table in the master database. We can then give each change a version number and we can store a current version number in each child database. When the client program connects to a child database we can then check the version number of the database against the current version number of the master database and if there are patches with version numbers greater than the version number of the child database we run these and update the child database to the latest version.
As I see it this should work well. Any changes to the system will first be tested and validated before committed as a new version of the database. The change will then be applied to the database the first time a user opens it. I suppose we would open the database in exclusive mode while applying the changes, but as long as the changes aren't too frequent this should not be a problem.
So what do you think? Will this work? Have any of you done something similar? Should we scrap the solution and go for the monolithic system instead? | 0 | [
2,
7782,
2013,
6302,
16,
6018,
18,
800,
3726,
3726,
2247,
8591,
51,
175,
1301,
9,
31,
57,
40,
882,
26,
21,
704,
30,
31,
110,
275,
109,
7534,
27,
9,
25,
32,
21,
254,
882,
20,
107,
48,
60,
17,
98,
50,
14,
4175,
2564,
31,
378... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Use Silverlight Isolated Storage To Keep Authentication Token?
===
I would like to hear some opinions about using the isolated storage in Silverlight for storing sensitive data. For example, is it OK to store an authentication token (some GUID that identifies a server-side session) in this storage, or is it better to use cookies?
The isolated storage gives an advantage over cookies in that it is shared across browsers, but it might be more difficult to handle expiry, and there might be some other issues (security?) that I am not aware of.
So... what are your opinions? Or do you know any great articles about the topic?
Thanks, Jacob | 0 | [
2,
275,
1172,
3130,
6331,
4326,
20,
643,
27963,
20,
2853,
60,
800,
3726,
3726,
31,
83,
101,
20,
990,
109,
11900,
88,
568,
14,
6331,
4326,
19,
1172,
3130,
26,
25615,
7830,
1054,
9,
26,
823,
15,
25,
32,
5854,
20,
1718,
40,
27963,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 print out code?
===
What's the best way to print out code (e.g. for a code review)? Eclipse's print option only does portrait (afaict), wich is unreadable for longer lines of code. Opening and printing all files in an editor like `gedit` is a pain.
Is there some batch code print program available? Or is there some magic command line chain that does it for me?
Of course, I need both line numbers and syntax highlighting. | 2 | [
2,
184,
20,
4793,
70,
1797,
60,
800,
3726,
3726,
98,
22,
18,
14,
246,
161,
20,
4793,
70,
1797,
13,
5,
62,
9,
263,
9,
26,
21,
1797,
1487,
6,
60,
11652,
22,
18,
4793,
4255,
104,
630,
5548,
13,
5,
58,
1473,
596,
38,
6,
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... |
Full outer join in django
===
How can I create a query for a full outer join across a M2M relationchip using the django QuerySet API?
It that is not supported, some hint about creating my own manager to do this would be welcome. | 0 | [
2,
503,
4896,
1865,
19,
3857,
14541,
800,
3726,
3726,
184,
92,
31,
1600,
21,
25597,
26,
21,
503,
4896,
1865,
464,
21,
307,
135,
79,
5827,
19682,
568,
14,
3857,
14541,
25597,
3554,
21,
2159,
60,
32,
30,
25,
52,
1827,
15,
109,
638... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Using a Custom Image in a JQuery Mobile Page Header
===
I am trying so hard to use a custom image for a button in the header of my JQuery Mobile page. I am basically having the same problems as the person in this post: http://stackoverflow.com/questions/9185862/custom-header-buttons-in-jquery-mobile. None of the answers there helped me though.
What I am trying to do is simply show one of the following two images:
![version 1][1]
![version 2][2]
Ideally, I would like the image to scale appropriately. Regardless, whenever I attempt to include the image in my header, it looks all distorted. I can't figure out why. Here is what my code looks like:
<style type="text/css">
.navbar .ui-btn .ui-btn-inner { padding-top: 40px !important; }
.navbar .ui-btn .ui-icon { width: 30px!important; height: 30px!important; margin-left: -15px !important; box-shadow: none!important; -moz-box-shadow: none!important; -webkit-box-shadow: none!important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
#play .ui-icon-play { background: url(/images/play.png) 50% 50% no-repeat; background-size: 24px 22px; }
</style>
<div id="myPage" data-role="page">
<div data-role="header">
<a href="previous.html" data-icon="arrow-l" data-iconpos="notext" class="ui-btn-left jqm-home">Back</a>
<h1>My App</h1>
<a id="play" href="play.html" data-icon="play" data-iconpos="notext" class="ui-btn-right jqm-forward">Play</a>
</div>
<div data-role="content">
<!-- My Content Goes Here -->
</div>
</div>
How do I make the image show in the header properly? Are there size restrictions I need to know about? Is there a way to scale the image? Any help is much appreciated!
[1]: http://i.stack.imgur.com/xiiL6.png
[2]: http://i.stack.imgur.com/G2B3c.png | 0 | [
2,
568,
21,
5816,
1961,
19,
21,
487,
8190,
93,
3241,
2478,
157,
106,
800,
3726,
3726,
31,
589,
749,
86,
552,
20,
275,
21,
5816,
1961,
26,
21,
5167,
19,
14,
157,
106,
16,
51,
487,
8190,
93,
3241,
2478,
9,
31,
589,
11374,
452,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Intalling IIS 7.x on Windows 7 taking very long
===
I had installed ISS 7.x earlier on my Windows 7 64bit home premium notebook. to install SharePoint 2010 I was trying to enable additional features but failed to enable, then I uninstalled IIS successfully and tried to install it again but it is taking very long(More than half an hour) with the following message,
"Please wait while Windows make changes to features. This might takes several minutes."
Any idea? | 0 | [
2,
19,
3663,
802,
595,
18,
453,
9,
396,
27,
1936,
453,
741,
253,
175,
800,
3726,
3726,
31,
41,
4066,
25,
18,
453,
9,
396,
1201,
27,
51,
1936,
453,
4384,
3326,
213,
12934,
14630,
9,
20,
16146,
1891,
3132,
498,
31,
23,
749,
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... |
Multiple MySQL SELECTS in one statement
===
I am building a web app that uses a system similar to twitter (Follow someone and that users ID is added to your profile and when you view your timeline you see all of your follows). I am trying to select multiple fields of data in one statement with different conditions. i.e. `SELECT * FROM TableName WHERE id='I want to have multiple IDs for the query to select.'`. Each user is different so I am wondering do I just separate them by commas or something? I have no idea. Thanks in Advance. | 0 | [
2,
1886,
51,
18,
22402,
5407,
18,
19,
53,
3331,
800,
3726,
3726,
31,
589,
353,
21,
2741,
4865,
30,
2027,
21,
329,
835,
20,
10623,
13,
5,
19184,
737,
17,
30,
3878,
4924,
25,
905,
20,
154,
5296,
17,
76,
42,
1418,
154,
18398,
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... |
Svn: added files but deleted few before committing: not able to commit now
===
I added few files to svn repository. But before I do commit, I deleted some of the pdf files. Now when I do a svn commit it syas ".pdf' is scheduled for addition, but is missing
". Please let me know is there a way to come out of this problem? | 0 | [
2,
13,
18,
16578,
45,
905,
6488,
47,
19584,
310,
115,
19524,
45,
52,
777,
20,
9686,
130,
800,
3726,
3726,
31,
905,
310,
6488,
20,
13,
18,
16578,
24869,
9,
47,
115,
31,
107,
9686,
15,
31,
19584,
109,
16,
14,
13,
11124,
6488,
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... |
Mobile jQuery and jSon request
===
The idea behind my code is quite simple: The script grabs a first link to image from a json if first link is not an image then it goes to another one until it finds an image. However the code is not working.
<script>
$("#main").live('pageinit', function() {
var url_first = "http://urltomyjson.com";
$.getJSON(url_first).done(function(json) {
var x = 0;
var url = json.data.children.data[x].url;
var length = url.length;
var checkIfImageUrl =
if (url[length - 1] === "g") { //check if Jpg extension
$("slodziaki").append('<img src="' + url + '"/>');
} else {
x += 1;
checkIfImageUrl();
};
checkIfImageUrl();
})
});
</script> | 0 | [
2,
3241,
487,
8190,
93,
17,
487,
528,
3772,
800,
3726,
3726,
14,
882,
439,
51,
1797,
25,
1450,
1935,
45,
14,
3884,
15555,
21,
64,
3508,
20,
1961,
37,
21,
487,
528,
100,
64,
3508,
25,
52,
40,
1961,
94,
32,
1852,
20,
226,
53,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 align div to bottom of the page, not bottom of the screen
===
I want to align a div to the bottom of the PAGE, not to the bottom of the screen. When I do this:
#contact-block{
position: absolute;
bottom: 0; left: 0;
}
, the div is placed in the bottom area of the screen. When my page is long, I have to scroll down and the div which should have been at the bottom, floats somewhere in the middle.
There might be a simple solution to this, but I'm just not seeing it. | 0 | [
2,
184,
20,
23389,
13,
12916,
20,
2129,
16,
14,
2478,
15,
52,
2129,
16,
14,
2324,
800,
3726,
3726,
31,
259,
20,
23389,
21,
13,
12916,
20,
14,
2129,
16,
14,
2478,
15,
52,
20,
14,
2129,
16,
14,
2324,
9,
76,
31,
107,
48,
45,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
styling listview of Jquery mobile
===
I am working with Jquery Mobile Listview.by styling listview with some div, default right indent of list disappearing. then i am manually adding data-icon="arrow-r". how can i get back that default JQM right arrow in listview?
| 0 | [
2,
23020,
968,
4725,
16,
487,
8190,
93,
3241,
800,
3726,
3726,
31,
589,
638,
29,
487,
8190,
93,
3241,
968,
4725,
9,
779,
23020,
968,
4725,
29,
109,
13,
12916,
15,
12838,
193,
19,
817,
38,
16,
968,
16797,
9,
94,
31,
589,
23671,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 statement using a for loop php
===
I have a mysql query which is being to find the stock items in a certain location belonging to a certain group. Hence this is going through 4 levels of `while loops`. No i have given the user the ability to select the locations they want to view the stocks from. This is being achieved using checkboxes which are sent using ajax in an array. The array `exploded in PHP` using `$offices = explode(",", $locations);`. However now i want to use the locations selected in my mysql query.
$sql = mysql_query("select Board_ID, Title from Board where Company_ID = '$company_id' order by Title");
while($row = mysql_fetch_array($sql)) {
$curr_ID = $row[0];
$curr_category = $row[1];
echo "<tr><td colspan='".$count."'>".$curr_category."</td></tr>";
$sql1 = mysql_query("select Sub_Category_ID, Title from Sub_Category where Category_ID = '$curr_ID' order by Title");
while($row1 = mysql_fetch_array($sql1)) {
$curr_sub_cat_id = $row1[0];
$curr_sub_cate = $row1[1];
echo "<tr><td colspan='".$count."'><b>".$curr_sub_cate."</b></td></tr>";
$sql2 = mysql_query("select Book_ID, title from Book where sub_category_id = '$curr_sub_cat_id' Order by title");
while($row2 = mysql_fetch_array($sql2)) {
$curr_book = $row2[0];
echo "<tr><td>".$row2[1]."</td>";
//selecting all locations using the statement below, however i want to select the locations that where selected by user.
$sql4 = mysql_query("select OfficeID, OfficeTitle from Office");
while($row3 = mysql_fetch_array($sql4)) {
$curr_location = $row3[0];
$sql3 = mysql_query("select Quantity from Stock_Management where Book_ID = '$curr_book' and Location_ID = '$curr_location'");
while($row3 = mysql_fetch_array($sql3)) {
echo "<td>".$row3[0]."</td>";
}
}
echo "</tr>";
}
}
}
I want to select the locations based on the selected locations by user, now this can be achievable using a for loop by i don't know how to include that in my sql query! | 0 | [
2,
51,
18,
22402,
3331,
568,
21,
26,
5293,
13,
26120,
800,
3726,
3726,
31,
57,
21,
51,
18,
22402,
25597,
56,
25,
142,
20,
477,
14,
2070,
3755,
19,
21,
1200,
1474,
5979,
20,
21,
1200,
214,
9,
5796,
48,
25,
228,
120,
268,
2216,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 android limit vm memory size to an arbitrary 24 or 32 MB?
===
I created a top down game in which your character move around a level. The level is essentially a 1600x2400 png. I cannot load that png into memory so I have to use BitmapRegionDecoder to load it in chunks as the player moves around the level. Of course this sucks and possibly leads to stuttering. I thought of loading the next chunk in a background thread but that meant that I had two chunks in memory: the current one and the next one, which would lead to an OutOfMemoryException.
Now all devices have at least 512 MB or RAM so why do we still have that stupid limit on vm ram?? It is despotic of Google to tell us how much ram we should use! Let us decide! Now I have to eat a lot more cpu cycles just because I can't load the whole thing into RAM, not to mention the worse performance that I get with this BitmapRegionDecoder!
Any ideas why Google does this and when will it end? What is the logical argument behind that decision? | 4 | [
2,
483,
630,
13005,
4496,
13,
20147,
1912,
1072,
20,
40,
17237,
937,
54,
2512,
14023,
60,
800,
3726,
3726,
31,
679,
21,
371,
125,
250,
19,
56,
154,
925,
780,
140,
21,
662,
9,
14,
662,
25,
7398,
21,
17704,
396,
135,
7114,
351,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
registering versions of dll's that have different names
===
I'm naming my dll's by version number. When one version of my product is uninstalled and a new one installed running `regasm /codebase dllname.dll` says it completes but the new dll doesn't appear to be registered. Looking through regdllview.exe the old one is still registered and highlighted (because the file is no longer there). Does anyone know how to get around this?
Thanks | 0 | [
2,
2243,
68,
3281,
16,
13,
43,
211,
22,
18,
30,
57,
421,
1817,
800,
3726,
3726,
31,
22,
79,
10929,
51,
13,
43,
211,
22,
18,
34,
615,
234,
9,
76,
53,
615,
16,
51,
2374,
25,
367,
108,
21300,
69,
17,
21,
78,
53,
4066,
946,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Testing a flatiron cli app with Mocha: app.log is undifined?
===
I'm having problems testing a [flatiron](https://github.com/flatiron/flatiron) [cli app](http://blog.nodejitsu.com/writing-cli-apps-with-flatiron) with [Mocha](http://visionmedia.github.com/mocha/).
The command-line command I'd like to test creates a directory and logs success with app.log.info.
This is the code to be tested (./lib/commands/create.js):
<!-- language: lang-js -->
var flatiron = require('flatiron'),
app = flatiron.app,
fs = require('fs'),
path = require('path');
module.exports = function create(name, callback) {
"use strict";
fs.mkdir('./' + name);
app.log.info('Directory created!');
}
This is the test (./test/create.js):
<!-- language: lang-js -->
var create = require('../lib/commands/create');
describe('Flatiron command', function () {
"use strict";
describe('#create()', function () {
it('should create a directory ', function () {
create('someDirectory');
// check if the directory was created,
// then remove the directory
});
});
});
`mocha test/log -R spec` gives me
Flatiron command
#log()
1) should log something
✖ 1 of 1 tests failed:
1) Flatiron command #create() should create a directory :
TypeError: Cannot call method 'info' of undefined
Why is `app.log`not available to Mocha?
Is this because of how `funtion log`is exported?
Or has this something to do with how flatiron sets up the application? I tried requiring flatiron.app and starting it from the test like this
<!-- language: lang-js -->
var create = require('../lib/commands/create'),
flatiron = require('flatiron'),
app = flatiron.app;
describe('Flatiron command', function () {
"use strict";
describe('#create()', function () {
it('should create a directory ', function () {
app.start();
create('someDirectory');
});
});
});
- but with no success, just a different error:
Flatiron command
#create()
1) should create a directory
✖ 1 of 1 tests failed:
1) Flatiron command #create() should create a directory :
TypeError: Object [object Object] has no method 'start'
Or is this a case where you would use spies/stubs/mocks with something like [sinon.js](http://sinonjs.org/) to simulate the behavior of app.log somehow? Because I'm not really interested if the logging works, but if the directory is created. | 0 | [
2,
4431,
21,
1844,
11803,
19391,
4865,
29,
1873,
1651,
45,
4865,
9,
5567,
25,
13,
22539,
7509,
43,
60,
800,
3726,
3726,
31,
22,
79,
452,
1716,
4431,
21,
636,
13830,
11803,
500,
5,
21127,
18,
6903,
10404,
20926,
9,
960,
118,
13830,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 long running php process got stucked while piling up server's CPU load
===
It's already several weeks since occasionaly all my 8 CPU cores at server machine get almost to 100% load by Apache processes (just the apache, there are no other high-load processes except mysql).
Restarting Apache always works but usually just for couple hours but once it was even a week. There's no visible pattern. Overall load gets to value around or over 10 but the machine is still respondinng very quickly (usually it's floating from 1 to 4 or 6 top, depends on daytime). But there is no connection between these neverending spikes and actual server stress caused by visits or cron jobs. It seems pretty random, so my best guess is faulty php script cycling over and over doing god knows what.
If nothing else, such a useless load is heating up the CPU, shortening his lifetime and who know how many resources are spend by this PHP process I can't identify.
All the php processes are wrapped by Apache processes, so I can't actually see which php scripts are currently running in process list. Is there any other way around to point to specific script? Other than implement some kind of tracking code inside every php script? I'm not running webhosting but there is more than one site and I don't see how could I implement a tracking code in such an extensive code spread across the webserver.
Therefore I'm looking for pure unix solution (Debian). In worse case it would point me to php script which includes dozens of php classes and contollers. In the best case it would be some simple script. Either way, it's a start. I think. | 0 | [
2,
56,
175,
946,
13,
26120,
953,
330,
4549,
69,
133,
8483,
68,
71,
8128,
22,
18,
17578,
6305,
800,
3726,
3726,
32,
22,
18,
614,
238,
1342,
179,
7713,
93,
65,
51,
469,
17578,
2884,
18,
35,
8128,
1940,
164,
557,
20,
12849,
6305,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Resource on computing time complexity of algorithms
===
Is there any good resource (book, reference, web site, application...) which explains how to compute time complexity of an algorithm?
Because, it is hard to make the things concrete in my mind. Sometimes it is talking about an iteration has time complexity of lg n; and then according to the another loop it becomes n.lg n; and sometimes they use big omega notation to express it, sometimes big-o and etc...
These things are quite abstract to me. So, I need a resource which has good explanation and a lot of examples to make me see what's goin on.
Hopefully, I explained my problem clearly. I am quite sure that everyone who just started to study algorithms has also the same problem with me. So, maybe those experienced guys can also share their experience with us. Thanks... | 0 | [
2,
6577,
27,
10626,
85,
12745,
16,
15935,
800,
3726,
3726,
25,
80,
186,
254,
6577,
13,
5,
5199,
15,
2801,
15,
2741,
689,
15,
3010,
9,
9,
9,
6,
56,
7346,
184,
20,
23909,
85,
12745,
16,
40,
9083,
60,
185,
15,
32,
25,
552,
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... |
Is there an auto-update framework for C++/Win32/MFC (like Sparkle)?
===
I've decided to add auto-update functionality to one of my applications and was looking for any existing solutions that compare the current running version with the latest version that is then downloaded from the web.
I know [Sparkle][1] on Mac OSX which is very nice and powerful, but was wondering whether there is something similar for Win32/MFC?
[1]: http://sparkle.andymatuschak.org/ | 0 | [
2,
25,
80,
40,
3108,
8,
576,
8209,
6596,
26,
272,
20512,
118,
4181,
3125,
118,
79,
7061,
13,
5,
1403,
17679,
6,
60,
800,
3726,
3726,
31,
22,
195,
868,
20,
3547,
3108,
8,
576,
8209,
18548,
20,
53,
16,
51,
3767,
17,
23,
699,
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... |
Defining Up in the Direct3D View Matrix when Camera Is Constantly Moving
===
In my Direct3D application, the camera can be moved using the mouse or arrow keys. But if I hard code (0,1,0) as the up direction vector in `LookAtLH`, the frame goes blank at some orientations of the camera.
I just learned the hard way that when looking along the Y-axis, (0,1,0) no longer works as the Up direction (seems obvious?). I am thinking of switching my up direction to something else for each of these special cases. Is there a more graceful way to handle this? | 0 | [
2,
14684,
71,
19,
14,
1744,
240,
43,
1418,
8187,
76,
3336,
25,
7545,
1219,
800,
3726,
3726,
19,
51,
1744,
240,
43,
3010,
15,
14,
3336,
92,
44,
385,
568,
14,
7567,
54,
7409,
5534,
9,
47,
100,
31,
552,
1797,
13,
5,
387,
15,
73... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best online reading to understand .NET Code Access Security ?
===
I'm thinking about learning CAS, but I need to quickly grasp basic architecture, performance implications and if it at all suites my needs. what should I read? | 0 | [
2,
246,
2087,
1876,
20,
1369,
13,
9,
2328,
1797,
1381,
1221,
13,
60,
800,
3726,
3726,
31,
22,
79,
1440,
88,
2477,
7167,
15,
47,
31,
376,
20,
976,
10677,
2125,
2607,
15,
956,
14747,
17,
100,
32,
35,
65,
6160,
18,
51,
2274,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do I mock objects without inheritance (in C)?
===
We use a simple object model for our low level networking code at work where struct pointers are passed around to functions which are pretending to be methods. I've inherited most of this code which was written by consultants with passable C/C++ experience at best and I've spent many late nights trying to refactor code into something that would resemble a reasonable structure.
Now I would like to bring the code under unit testing but considering the object model we have chosen I have no idea how to mock objects. See the example below:
Sample header (foo.h):
#ifndef FOO_H_
#define FOO_H_
typedef struct Foo_s* Foo;
Foo foo_create(TcpSocket tcp_socket);
void foo_destroy(Foo foo);
int foo_transmit_command(Foo foo, enum Command command);
#endif /* FOO_H_ */
Sample source (foo.c):
struct Foo_s {
TcpSocket tcp_socket;
};
Foo foo_create(TcpSocket tcp_socket)
{
Foo foo = NULL;
assert(tcp_socket != NULL);
foo = malloc(sizeof(struct Foo_s));
if (foo == NULL) {
goto fail;
}
memset(foo, 0UL, sizeof(struct Foo_s));
foo->tcp_socket = tcp_socket;
return foo;
fail:
foo_destroy(foo);
return NULL;
}
void foo_destroy(Foo foo)
{
if (foo != NULL) {
memset(foo, 0UL, sizeof(struct Foo_s));
free(foo);
}
}
int foo_transmit_command(Foo foo, enum Command command)
{
size_t len = 0;
struct FooCommandPacket foo_command_packet = {0};
assert(foo != NULL);
assert((Command_MIN <= command) && (command <= Command_MAX));
/* Serialize command into foo_command_packet struct */
...
len = tcp_socket_send(foo->tcp_socket, &foo_command_packet, sizeof(foo_command_packet));
if (len < sizeof(foo_command_packet)) {
return -1;
}
return 0;
}
In the example above I would like to mock the *TcpSocket* object so that I can bring *"foo_transmit_command"* under unit testing but I'm not sure how to go about this without inheritance. I don't really want to redesign the code to use vtables unless I really have to. Maybe there is a better approach to this than mocking?
My testing experience comes mainly from C++ and I'm a bit afraid that I might have painted myself into a corner here. I would highly appreciate any recommendations from more experienced testers. | 0 | [
2,
184,
107,
31,
10506,
3916,
366,
13852,
13,
5,
108,
272,
6,
60,
800,
3726,
3726,
95,
275,
21,
1935,
3095,
1061,
26,
318,
708,
662,
16230,
1797,
35,
170,
113,
13,
10346,
454,
445,
50,
1100,
140,
20,
3719,
56,
50,
13406,
20,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to configure the import path in Visual Studio IronPython projects
===
I have built the IronPythonIntegration solution that comes with the Visual Studio 2005 SDK (as explained at <http://www.izume.com/2007/10/13/integrating-ironpython-with-visual-studio-2005>), and I can now use IronPython projects inside Visual Studio 2005. However, to let a Python file import from the standard library I need to include these two lines first:
import sys
sys.path.append('c:\Python24\lib')
and similarly for any other folders I want to be able to import from.
Does anyone know a way to set up import paths so that all IronPython projects automatically pick them up?
| 0 | [
2,
184,
20,
1065,
15951,
14,
9010,
2013,
19,
3458,
1120,
1751,
6448,
11570,
2314,
800,
3726,
3726,
31,
57,
392,
14,
1751,
6448,
11570,
12370,
857,
4295,
30,
1624,
29,
14,
3458,
1120,
812,
13,
18,
43,
197,
13,
5,
472,
2897,
35,
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... |
CListBox's Item size changed when changing the size of the list box even if I specify the size in MeasureItem() method?
===
I used a class which derives from CListBox, and create it with following style:WS_CHILD|WS_VISIBLE |LBS_OWNERDRAWFIXED | WS_VSCROLL | WS_HSCROLL
I expect the ListBox's item to be have a fixed size, not affected by the size of the list box. So I override the MeasureItem() method, in which I specify the item's size like below:
void CMyListBox::MeasureItem(LPMEASUREITEMSTRUCT lpMIS)
{
lpMIS->itemHeight = ALBUM_ITEM_HEIGHT;
lpMIS->itemWidth = ALBUM_ITEM_WIDTH;
}
But the item's size changes according to the List box's size changing. is there anything wrong with my approach? Thank you! | 0 | [
2,
272,
5739,
5309,
22,
18,
9101,
1072,
1015,
76,
4226,
14,
1072,
16,
14,
968,
1649,
166,
100,
31,
19077,
14,
1072,
19,
4058,
2119,
79,
5,
6,
2109,
60,
800,
3726,
3726,
31,
147,
21,
718,
56,
13049,
37,
272,
5739,
5309,
15,
17,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the correct way to escape text in json responces?
===
I am generating the json from PHP. | 0 | [
2,
98,
25,
14,
4456,
161,
20,
2220,
1854,
19,
487,
528,
10719,
8782,
5052,
60,
800,
3726,
3726,
31,
589,
13500,
14,
487,
528,
37,
13,
26120,
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... | [
1,
1,
1,
1,
1,
1,
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... |
Motion sensor programming for Windows Mobile
===
I just got hold of a PDA with an embedded motion sensor (accelerometer) and would like to code something that would exploit this feature. Any pointers? | 0 | [
2,
2422,
14865,
3143,
26,
1936,
3241,
800,
3726,
3726,
31,
114,
330,
1027,
16,
21,
351,
593,
29,
40,
12138,
2422,
14865,
13,
5,
1738,
1105,
1252,
17325,
6,
17,
83,
101,
20,
1797,
301,
30,
83,
10880,
48,
1580,
9,
186,
454,
445,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
A better way of forcing data bound WPF ListBox to update?
===
I have WPF ListBox which is bound to a ObservableCollection,
when the collection changes, all items update their position.
The new position is stored in the collection but the UI does not update.
So I added the following:
void scenarioItems_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
ToolboxListItem.UpdatePositions();
lstScenario.ItemsSource = null;
lstScenario.ItemsSource = ToolboxListItem.ScenarioItems;
this.lstScenario.SelectedIndex = e.NewStartingIndex;
}
By setting the ItemsSource to null and then binding it again, the UI is updated,
but this is probably very bad coding :p
Suggestions?
| 0 | [
2,
21,
574,
161,
16,
6135,
1054,
4138,
619,
7721,
968,
5309,
20,
11100,
60,
800,
3726,
3726,
31,
57,
619,
7721,
968,
5309,
56,
25,
4138,
20,
21,
5122,
10321,
579,
15015,
872,
15,
76,
14,
1206,
1693,
15,
65,
3755,
11100,
66,
649,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Windows Forms, getting a property from parent form
===
I'm having a bit of a problem. I have a datatable in the parent form. I open a dialogbox form that gets the datatable property and creates a checkboxlist. This will be used to export those columns. But when I run the application the parentform property is null. I've tried setting it in the parent and dialogbox form (I assumed this would have been done automagically if ShowDialog() was called).
Can someone take a look and see where I'm going wrong?
From the dialogbox:
frmParent MyParentForm = (frmParent)this.ParentForm;
for (int i=0; i<MyParentForm.DataGridTable.Count; i++)
{
chkListExportItems.Add(MyParentForm.DataGrid.Columns[i].Name,true);
}
From the parent form:
frmExports MyForm = new frmExports();
MyForm.MdiParent = this;
if (MyForm.ShowDialog == DialogResult.OK)
{
MyForm.SelectedItems // Do something
} | 0 | [
2,
1936,
1997,
15,
1017,
21,
1354,
37,
4766,
505,
800,
3726,
3726,
31,
22,
79,
452,
21,
1142,
16,
21,
1448,
9,
31,
57,
21,
1054,
5924,
19,
14,
4766,
505,
9,
31,
368,
21,
28223,
5309,
505,
30,
3049,
14,
1054,
5924,
1354,
17,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it true that "the best best practice is success"?
===
Sometimes I come across this sentence "the best best practice is success" in several blog posts or podcast. Last I've heard this on some podcast; subject was Design related/architectural/security decisions.
I don't want to believe this but it sounds right.
What do you think about this?
| 2 | [
2,
25,
32,
1151,
30,
13,
7,
124,
246,
246,
1345,
25,
1280,
7,
60,
800,
3726,
3726,
1030,
31,
340,
464,
48,
5123,
13,
7,
124,
246,
246,
1345,
25,
1280,
7,
19,
238,
8146,
9868,
54,
15124,
9,
236,
31,
22,
195,
752,
48,
27,
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... |
What's the difference between #import and @class, and when should I use one over the other?
===
I've been teaching myself Objective-C over the past month or so (I'm a Java head) and I've got my brain wrapped around most of it now. One thing that's confusing me at the moment: What's the difference between importing a class via @class vs doing a #import?
Is one better than another one, or do I need to use one instead of the other in certain cases? I've been using just #import so far. | 0 | [
2,
98,
22,
18,
14,
2841,
128,
6926,
1660,
1993,
17,
13,
1,
1898,
15,
17,
76,
378,
31,
275,
53,
84,
14,
89,
60,
800,
3726,
3726,
31,
22,
195,
74,
2540,
992,
7038,
8,
150,
84,
14,
640,
1617,
54,
86,
13,
5,
49,
22,
79,
21,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I push amended commit to the remote git repo?
===
When I've worked a bit with my source code, I do my usual thing commit and then I push to a remote repo. But then I noticed I forgot to organize my imports in the source code. So I do the amend command to replace the previous commit:
> git commit --amend
Unfortunately the commit can't be pushed back to the repository. It is rejected like this:
> git push origin
To //my.remote.repo.com/stuff.git/
! [rejected] master -> master (non-fast forward)
error: failed to push some refs to '//my.remote.repo.com/stuff.git/'
What should I do? (I can access the remote repo) | 0 | [
2,
184,
107,
31,
3250,
15057,
9686,
20,
14,
5388,
13,
10404,
302,
1638,
60,
800,
3726,
3726,
76,
31,
22,
195,
577,
21,
1142,
29,
51,
1267,
1797,
15,
31,
107,
51,
3820,
584,
9686,
17,
94,
31,
3250,
20,
21,
5388,
302,
1638,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why One C# Class Can Inherits From One Interface Both Implicitly and Explicitly?
===
Today I happens to find that one C# class can inherit one interface both in implicit and explicit way. This surprises me. If C# works in this way, then one instance can behave differently when referenced in different way.
interface IFoo
{
void DoSomething();
}
class Foo : IFoo
{
#region IFoo Members
public void DoSomething()
{
Console.WriteLine("do something implicitly");
}
#endregion
#region IFoo Members
void IFoo.DoSomething()
{
Console.WriteLine("do something explicitly");
}
#endregion
}
Foo f = new Foo();
f.DoSomething();
((IFoo)f).DoSomething();
Above code runs and output
do something implicitly
do something explicitly
I believe that this design of C# make inconsistency of behavior. Perhaps it is mandatory that one C# class can inherit from one interface in implicit or expliict way, but not both.
Is there any reason that why C# is designed in such a way?
| 0 | [
2,
483,
53,
272,
5910,
718,
92,
17569,
18,
37,
53,
6573,
156,
20290,
102,
17,
13108,
60,
800,
3726,
3726,
786,
31,
5531,
20,
477,
30,
53,
272,
5910,
718,
92,
17569,
53,
6573,
156,
19,
20290,
17,
14990,
161,
9,
48,
2624,
18,
55... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Disable, but not uninstall Resharper 4.1
===
Any ideas on how to disable, but not uninstall Resharper 4.1? | 0 | [
2,
1460,
579,
15,
47,
52,
367,
108,
21300,
302,
23646,
106,
268,
9,
165,
800,
3726,
3726,
186,
3478,
27,
184,
20,
1460,
579,
15,
47,
52,
367,
108,
21300,
302,
23646,
106,
268,
9,
165,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
.NET Spell Check control?
===
Are there any libraries out there (preferably a self contained Text Edit Control) for .NET that have Spell Check capabilities. I would like to add the typical red underline to miss-spelled words in the edit area of my application. | 0 | [
2,
13,
9,
2328,
4762,
2631,
569,
60,
800,
3726,
3726,
50,
80,
186,
8649,
70,
80,
13,
5,
3515,
2407,
4801,
21,
1119,
3437,
1854,
9392,
569,
6,
26,
13,
9,
2328,
30,
57,
4762,
2631,
10209,
9,
31,
83,
101,
20,
3547,
14,
3874,
40... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Debugging getResource*
===
How do you debug [getResource][1]-style methods that are failing, returning null?
I am sure the file it's looking for is there, but it's returning NULL. How do I know what it is looking for to try to spot any mismatch?
[1]: http://java.sun.com/javase/6/docs/api/java/lang/ClassLoader.html#getResource(java.lang.String) | 0 | [
2,
121,
16254,
2762,
164,
99,
12097,
2483,
800,
3726,
3726,
184,
107,
42,
121,
16254,
636,
3060,
99,
12097,
500,
2558,
165,
500,
8,
4381,
3195,
30,
50,
7250,
15,
2485,
16203,
60,
31,
589,
562,
14,
3893,
32,
22,
18,
699,
26,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to find files with ^M from linux
===
Is there a script/command to list all the files in source source tree which have line endings that show up as "^M" in emacs (under linux).
Thanks!
Mike | 0 | [
2,
184,
20,
477,
6488,
29,
13,
1,
79,
37,
13024,
800,
3726,
3726,
25,
80,
21,
3884,
118,
16239,
20,
968,
65,
14,
6488,
19,
1267,
1267,
1541,
56,
57,
293,
3119,
18,
30,
298,
71,
28,
13,
7,
1,
79,
7,
19,
13,
62,
6893,
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,
0,
0,
0,
0,
0,
0... |
How do I print the elements of a C++ vector in GDB?
===
I want to examine the contents of a std::vector in GDB, how do I do it? Let's say it's a std::vector<int> for the sake of simplicity.
| 0 | [
2,
184,
107,
31,
4793,
14,
2065,
16,
21,
272,
20512,
7497,
19,
489,
9007,
60,
800,
3726,
3726,
31,
259,
20,
9691,
14,
8478,
16,
21,
354,
43,
45,
45,
28033,
19,
489,
9007,
15,
184,
107,
31,
107,
32,
60,
408,
22,
18,
395,
32,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
NUnit and Visual Web Developer 2008SP1 - Integration problems
===
I've decided to integrate NUnit with VWD2008.
I did the following-
1) Installed NUnit - Ran a Sample project that was included with the installation all the tests were fine.
2) Installed TestDriven.Net 2.0 - Personal distribution.
3) I have written on an MVC Project a test and when I try to right click the context and run the Test it fails.
In addition I had to add reference the NUnit.framework dll in order to write the tests.
What have I done wrong?
| 0 | [
2,
10210,
242,
17,
3458,
2741,
10058,
570,
3401,
165,
13,
8,
8078,
1716,
800,
3726,
3726,
31,
22,
195,
868,
20,
18399,
10210,
242,
29,
566,
14733,
2753,
9,
31,
144,
14,
249,
8,
137,
6,
4066,
10210,
242,
13,
8,
717,
21,
5717,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.