unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Can you recommend some good references on code generation in a compiler (intermediate representations, SSA, instruction selection, register allocation, etc.)?
===
I have the dragon book and *Modern Compiler Implementation in ML*. I'm looking for other good resources on code generation in a compiler. Can you recommend any? | 0 | [
2,
92,
42,
12360,
109,
254,
7231,
27,
1797,
2782,
19,
21,
21486,
13,
5,
6280,
8260,
591,
18667,
15,
13,
8234,
15,
7304,
3155,
15,
2243,
16840,
15,
2722,
9,
6,
60,
800,
3726,
3726,
31,
57,
14,
3339,
360,
17,
1637,
11959,
21486,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Class for URL Querystring Manipulation?
===
I am looking for a well tested class for manipulating URLs in .NET. Specifically I want to be able to add/update querystring values given a url.
I have found various classes on the web that do this but none seem really robust and well tested. I also cannot find anything in the .NET framework; the Uri class doesn't let me manipulate the parameters in the querystring. There is code to do this in the framework but its all marked internal.
Is there a nice robust class around for working with Urls and QueryStrings? | 0 | [
2,
718,
26,
287,
6362,
25597,
11130,
17561,
60,
800,
3726,
3726,
31,
589,
699,
26,
21,
134,
7631,
718,
26,
27799,
13,
911,
7532,
19,
13,
9,
2328,
9,
3524,
31,
259,
20,
44,
777,
20,
3547,
118,
576,
8209,
25597,
11130,
4070,
504,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 prepend <%= request.getContextPath() %> to all relative URLs inside a jsp page?
===
The subject says it all, almost. How do I automatically fix jsp pages so that relative URLs are mapped to the context path instead of the server root? That is, given for example
<link rel="stylesheet" type="text/css" href="/css/style.css" />
how do I set-up things in a way that maps the css to `my-server/my-context/css/style.css` instead of `my-server/css/style.css`? Is there an automatic way of doing that, other than changing all lines like the above to
<link rel="stylesheet" type="text/css"
href="<%= request.getContextPath() %>/css/style.css" />
| 0 | [
2,
184,
107,
31,
15884,
2451,
13,
1,
11881,
3726,
3772,
9,
3060,
1126,
11969,
8353,
5,
6,
13,
11881,
1,
20,
65,
4543,
13,
911,
7532,
572,
21,
487,
3401,
2478,
60,
800,
3726,
3726,
14,
1550,
898,
32,
65,
15,
557,
9,
184,
107,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
In a .net Exception how to get a stacktrace with argument values
===
I am trying to add an unhandled exception handler in .net (c#) that should be as helpfull for the 'user' as possible. The end users are mostly programers so they just need a hint of what object are they manipulating wrong.
I'm developing a windows similar to the windows XP error report when an application crashes but that gives as much imediate information as possible imediatly about the exception thrown.
While the stack trace enables me (since I have the source code) to pinpoint the source of the problem, the users dont have it and so they are lost without further information. Needless to say I have to spend lots of time supporting the tool.
There are a few system exceptions like KeyNotFoundException thrown by the Dictionary collection that really bug me since they dont include in the message the key that wasnt found. I can fill my code with tons of try catch blocks but its rather agressive and is lots more code to maintain, not to mention a ton more of strings that have to end up being localized.
Finally the question: Is there any way to obtain (at runtime) the values of the arguments of each function in the call stack trace?
That alone could resolve 90% of the support calls.
| 0 | [
2,
19,
21,
13,
9,
2328,
5391,
184,
20,
164,
21,
7566,
38,
7367,
29,
5476,
4070,
800,
3726,
3726,
31,
589,
749,
20,
3547,
40,
367,
3203,
1294,
5391,
24641,
19,
13,
9,
2328,
13,
5,
150,
5910,
6,
30,
378,
44,
28,
15600,
255,
26... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Creating File Just for the Sake on Unit Test
===
This might be n interesting question. I need to test that if I can successfully upload and fetch the PDF file. This works for the text based files but I just wanted to check for PDF. For this unit test to run I need a PDF file. There are couple of options. I can create a dummy PDF file and store it some folder and read that file and save the file to the system. But now, my unit test is dependent on the PDF file. So, anyone who runs the unit test must have the PDF file which is kinda bad.
Another way for me is to create a PDF file. This is not a big deal as I can simply create a dummy file with the .pdf extension OR I can even use some PDF third party tool to create PDF file.
Another way also is to embed the PDF document as an embedded resource and then extract that from the assembly.
What do you think is the best way to handle this issue?
| 0 | [
2,
2936,
3893,
114,
26,
14,
8132,
27,
1237,
1289,
800,
3726,
3726,
48,
530,
44,
13,
103,
4883,
1301,
9,
31,
376,
20,
1289,
30,
100,
31,
92,
3673,
71,
8294,
17,
18312,
14,
13,
11124,
3893,
9,
48,
693,
26,
14,
1854,
432,
6488,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Customizing PowerShell Prompt - Equivalent to CMD's $M$P$_$+$G?
===
I've started to "play around" with PowerShell and am trying to get it to "behave".
One of the things I'd like to do is to customize the PROMPT to be "similar" to what "$M$P$_$+$G" do on MS-Dos:
A quick rundown of what these do:
<b>Character</b><b>| Description</b><br>
<b>$m </b> The remote name associated with the current drive letter or the empty string if current drive is not a network drive. <br>
<b>$p </b> Current drive and path <br>
<b>$_ </b> ENTER-LINEFEED <br>
<b>$+ </b> Zero or more plus sign (+) characters depending upon the depth of the <b>pushd</b> directory stack, one character for each level pushed <br>
<b>$g </b> > (greater-than sign) <br>
So the final output is something like:
\\spma1fp1\JARAVJ$ H:\temp
++>
I've been able to add the `$M` and `$_` functionality (and a nifty History feature) to my prompt as follows:
function prompt
{
## Get the history. Since the history may be either empty,
## a single item or an array, the @() syntax ensures
## that PowerShell treats it as an array
$history = @(get-history)
## If there are any items in the history, find out the
## Id of the final one.
## PowerShell defaults the $lastId variable to '0' if this
## code doesn't execute.
if($history.Count -gt 0)
{
$lastItem = $history[$history.Count - 1]
$lastId = $lastItem.Id
}
## The command that we're currently entering on the prompt
## will be next in the history. Because of that, we'll
## take the last history Id and add one to it.
$nextCommand = $lastId + 1
## Get the current location
$currentDirectory = get-location
## Set the Windows Title to the current location
$host.ui.RawUI.WindowTitle = "PS: " + $currentDirectory
## And create a prompt that shows the command number,
## and current location
"PS:$nextCommand $currentDirectory
>"
}
But the rest is not yet something I've managed to duplicate....
Thanks a lot for the tips that will surely come!
| 0 | [
2,
5816,
3335,
414,
15984,
11443,
4417,
13,
8,
4602,
20,
2390,
43,
22,
18,
5579,
79,
4403,
306,
4403,
1,
4403,
2430,
4403,
263,
60,
800,
3726,
3726,
31,
22,
195,
373,
20,
13,
7,
5438,
140,
7,
29,
414,
15984,
17,
589,
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... |
Does LINQ's ExecuteCommand provide protection from SQL injection attacks?
===
I've got a situation where I need to use LINQ's ExecuteCommand method to run an insert.
Something like (simplified for purposes of this question):
object[] oParams = { Guid.NewGuid(), rec.WebMethodName };
TransLogDataContext.ExecuteCommand (
"INSERT INTO dbo.Transaction_Log (ID, WebMethodID) VALUES ({0}, {1})",
oParams);
The question is if this is SQL injection proof in the same way parameterized queries are? | 0 | [
2,
630,
6294,
1251,
22,
18,
15644,
16239,
1181,
2057,
37,
4444,
255,
13646,
3080,
60,
800,
3726,
3726,
31,
22,
195,
330,
21,
1858,
113,
31,
376,
20,
275,
6294,
1251,
22,
18,
15644,
16239,
2109,
20,
485,
40,
14692,
9,
301,
101,
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... |
What's the best way of implementing a thread-safe Dictionary in .NET?
===
I was able to implement a thread-safe Dictionary in C# by deriving from IDictionary and defining a private SyncRoot object:
public class SafeDictionary<TKey, TValue>: IDictionary<TKey, TValue>
{
private readonly object syncRoot = new object();
private Dictionary<TKey, TValue> d = new Dictionary<TKey, TValue>();
public object SyncRoot
{
get { return syncRoot; }
}
public void Add(TKey key, TValue value)
{
lock (syncRoot)
{
d.Add(key, value);
}
}
// more IDictionary members...
}
I then lock on this SyncRoot object throughout my consumers (multiple threads):
Example:
lock (m_MySharedDictionary.SyncRoot)
{
m_MySharedDictionary.Add(...);
}
I was able to make it work, but this resulted in some ugly code. My question is, is there a better, more elegant way of implementing a thread-safe Dictionary?
Thanks,
George | 0 | [
2,
98,
22,
18,
14,
246,
161,
16,
17333,
21,
9322,
8,
18166,
9186,
19,
13,
9,
2328,
60,
800,
3726,
3726,
31,
23,
777,
20,
8713,
21,
9322,
8,
18166,
9186,
19,
272,
5910,
34,
121,
9655,
68,
37,
31,
22595,
1857,
17,
14684,
21,
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... |
Hiding a password in a (python) script
===
I have got a python script which is creating an ODBC connection. The ODBC connection is generated with a connection string. In this connection string I have to include the username and password for this connection.
Is there an easy way to obscure this password in the file (just that nobody can read the password when I'm editing the file) ? | 0 | [
2,
5314,
21,
20884,
19,
21,
13,
5,
6448,
11570,
6,
3884,
800,
3726,
3726,
31,
57,
330,
21,
20059,
3884,
56,
25,
2936,
40,
12340,
7229,
2760,
9,
14,
12340,
7229,
2760,
25,
6756,
29,
21,
2760,
3724,
9,
19,
48,
2760,
3724,
31,
57... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to create ArrayList (ArrayList[T] from array (T[]) in Java
===
I have an array that is initialised like:
Element[] array = {new Element(1),new Element(2),new Element(3)};
I would like to convert this array into an object of the ArrayList class.
ArrayList<Element> arraylist = ???;
I am sure I have done this before, but the solution is sitting just at the edge of my memory. | 0 | [
2,
184,
20,
1600,
7718,
5739,
13,
5,
8576,
93,
5739,
2558,
38,
500,
37,
7718,
13,
5,
38,
2558,
500,
6,
19,
8247,
800,
3726,
3726,
31,
57,
40,
7718,
30,
25,
2104,
2541,
101,
45,
4520,
2558,
500,
7718,
800,
13,
1,
2681,
4520,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 latency in an AMD PowerNow state change operation?
===
In low latency trading applications we are very conscious of latency issues. There is some concern that our application may experience increased latency if the server on which it is running changes PowerNow state.
Any kernel developers familiar with calling PowerNow changes and how much processor time is used for the operation and what the latency/delay characteristics are like?
The same information for Intel SpeedStep would be useful but PowerNow is what we actually use.
Thanks! | 0 | [
2,
98,
25,
14,
456,
14386,
19,
40,
589,
43,
414,
1387,
146,
753,
1453,
60,
800,
3726,
3726,
19,
708,
456,
14386,
5205,
3767,
95,
50,
253,
10806,
16,
456,
14386,
1549,
9,
80,
25,
109,
3630,
30,
318,
3010,
123,
1496,
1644,
456,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I make the apple terminal window auto change colour scheme when I ssh to a specific server
===
When I ssh into a remote production server I would like the colour scheme of my terminal window to change to something brigh and scary, preferably red, to warn me that I am touching a live scary server.
How can I make it automatically detect that I have ssh'ed somewhere, and if that somewhere is on a specific list, change the colour scheme? | 0 | [
2,
184,
107,
31,
233,
14,
4037,
3855,
1463,
3108,
753,
4609,
4276,
76,
31,
13,
18,
1635,
20,
21,
1903,
8128,
800,
3726,
3726,
76,
31,
13,
18,
1635,
77,
21,
5388,
637,
8128,
31,
83,
101,
14,
4609,
4276,
16,
51,
3855,
1463,
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... |
Aqua Data Studio - Shortcuts for Autocomplete
===
When the autocomplete listbox/dropdown is displayed in Aqua Data Studio, you have to hit enter in order for the current hightlighted item to complete the identifier. Is there a way that I can hit the tab key to autocomplete instead? This is the default behavior for Visual Studio and I cannot find the keyboard shortcuts editor in Aqua Data Studio.
It would also be nice if while the autocomplete listbox is visible if the Home and End keys would go to the beginning or the end of the line instead of the top or the bottom options of the autocomplete listbox. | 0 | [
2,
14299,
1054,
1120,
13,
8,
502,
4118,
18,
26,
3108,
15990,
800,
3726,
3726,
76,
14,
3108,
15990,
968,
5309,
118,
12361,
2968,
25,
6115,
19,
14299,
1054,
1120,
15,
42,
57,
20,
770,
2830,
19,
389,
26,
14,
866,
183,
38,
3130,
69,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What's the difference between SHA and MD5 (in PHP)?
===
When you're hashing a password (or anything else) in PHP, does it make any difference if you use SHA or MD5? | 1 | [
2,
98,
22,
18,
14,
2841,
128,
4116,
17,
8138,
264,
13,
5,
108,
13,
26120,
6,
60,
800,
3726,
3726,
76,
42,
22,
99,
19170,
68,
21,
20884,
13,
5,
248,
602,
962,
6,
19,
13,
26120,
15,
630,
32,
233,
186,
2841,
100,
42,
275,
411... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
What is the concensus on "Voice-family" Hacks?
===
I just started working for a pretty large company and my group manges all of their public facing websites. I opened the style sheet for the first time today and have seen over 20 instances of the designers using the voice-family hack to fix an IE bug. (I don't know why they allow graphic designers to write any kind of markup at all)
What is the general public opinion of the voice-family hack. Is it worth the time to recommend using IE conditional comments to include custom styles heets? | 0 | [
2,
98,
25,
14,
23998,
2172,
267,
27,
13,
7,
13379,
8,
13819,
7,
11835,
18,
60,
800,
3726,
3726,
31,
114,
373,
638,
26,
21,
1772,
370,
237,
17,
51,
214,
169,
5133,
65,
16,
66,
317,
4325,
13931,
9,
31,
520,
14,
1034,
6125,
26,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I specify IP Ranges for SkipHosts in AWStats config files?
===
I'm updating some old AWStats config files to filter out some specific IP ranges. Here's the pertinent section of the config file:
# Do not include access from clients that match following criteria.
# If your log file contains IP addresses in host field, you must enter here
# matching IP addresses criteria.
# If DNS lookup is already done in your log file, you must enter here hostname
# criteria, else enter ip address criteria.
# The opposite parameter of "SkipHosts" is "OnlyHosts".
# Note: Use space between each value. This parameter is not case sensitive.
# Note: You can use regular expression values writing value with REGEX[value].
# Change : Effective for new updates only
# Example: "127.0.0.1 REGEX[^192\.168\.] REGEX[^10\.]"
# Example: "localhost REGEX[^.*\.localdomain$]"
# Default: ""
#
SkipHosts=""
I want to, for example, filter out X.Y.Z.[97-110]
I tried this format (Note: Not these IP values, using private range as example):
REGEX[^192\.168\.1\.[97-110]]
But it causes the following error:
> **CGI Error**<br/>The specified CGI
> application misbehaved by not
> returning a complete set of HTTP
> headers.
I hate how everything uses a different RegEx syntax. Does anyone have any idea how this one works, and how I can specify a range here? | 0 | [
2,
184,
107,
31,
19077,
15735,
9230,
26,
12532,
11694,
18,
19,
13,
3885,
10631,
18,
13,
14093,
2816,
6488,
60,
800,
3726,
3726,
31,
22,
79,
71,
43,
1880,
109,
315,
13,
3885,
10631,
18,
13,
14093,
2816,
6488,
20,
11945,
70,
109,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 use 'find' to search for files created on a specific date?
===
How do I use the UNIX tool 'find' to search for files created on a specific date? | 0 | [
2,
184,
20,
275,
13,
22,
19811,
22,
20,
2122,
26,
6488,
679,
27,
21,
1903,
1231,
60,
800,
3726,
3726,
184,
107,
31,
275,
14,
22540,
5607,
13,
22,
19811,
22,
20,
2122,
26,
6488,
679,
27,
21,
1903,
1231,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Why can't I use Template Toolkit?
===
I am trying to use TemplateToolkit instead of good ole' variable interpolation and my server is giving me a lot of grief. Here are the errors I am getting:
*** 'D:\Inetpub\gic\source\extjs_source.plx' error message at: 2008/09/30 15:27:37 failed to create context: failed to create context: failed to load Template/Stash/XS.pm: Couldn't load Template::Stash::XS 2.20:
Can't load 'D:/Perl/site/lib/auto/Template/Stash/XS/XS.dll' for module Template::Stash::XS: load_file:The specified procedure could not be found at D:/Perl/lib/DynaLoader.pm line 230. at D:/Perl/site/lib/Template/Stash/XS.pm line 31
BEGIN failed--compilation aborted at D:/Perl/site/lib/Template/Stash/XS.pm line 31. Compilation failed in require at D:/Perl/site/lib/Template/Config.pm line 82.
The Platform is Windows Server 2003 and we are using ActiveState perl and PPM for the packages with IIS.
| 0 | [
2,
483,
92,
22,
38,
31,
275,
22894,
5607,
13703,
60,
800,
3726,
3726,
31,
589,
749,
20,
275,
22894,
20799,
13703,
700,
16,
254,
12116,
22,
7612,
23336,
857,
17,
51,
8128,
25,
1438,
55,
21,
865,
16,
10101,
9,
235,
50,
14,
11908,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
jQuery: How to position one element relative to another?
===
I have a hidden DIV which contains a toolbar-like menu.
I have a number of DIVs which are enabled to show the menu DIV when the mouse hovers over them.
Is there a built-in function which will move the menu DIV to the top right of the active (mouse hover) DIV? I'm looking for something like `$(menu).position("topright", targetEl);` | 0 | [
2,
487,
8190,
93,
45,
184,
20,
649,
53,
4520,
4543,
20,
226,
60,
800,
3726,
3726,
31,
57,
21,
3689,
13,
12916,
56,
1588,
21,
5607,
1850,
8,
1403,
11379,
9,
31,
57,
21,
234,
16,
13,
12916,
18,
56,
50,
9338,
20,
298,
14,
11379... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
DotNetNuke "keepalive"
===
I've got a couple DNN portals I manage and I need a solution to keep them "alive" during slack traffic times. After a given time of inactivity IIS will unload the DNN application from memory which will effect load time for the first client request. DNN has the "KeepAlive.aspx" file that I hit with a wget command from a CRON job every 5 minutes. I'm dubious of the effectiveness of the this method. Does anyone have any others ideas? | 0 | [
2,
14123,
2328,
4215,
1048,
13,
7,
12211,
192,
1284,
7,
800,
3726,
3726,
31,
22,
195,
330,
21,
1335,
13,
43,
9377,
8281,
18,
31,
4705,
17,
31,
376,
21,
4295,
20,
643,
105,
13,
7,
192,
1284,
7,
112,
13672,
2227,
436,
9,
75,
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... |
Echo A Link, Get A Trailing Slash?
===
I've discovered that any time I do the following:
echo '<a href="http://" title="bla">huzzah</a>';
I end up with the following being rendered to the browser:
<a href="http:///" title="bla">huzzah</a>
This is particularly annoying when I link to a file with an extension, as it breaks the link.
Any ideas why this is happening and how I can fix it?
Thanks | 0 | [
2,
8117,
21,
3508,
15,
164,
21,
14323,
14098,
60,
800,
3726,
3726,
31,
22,
195,
1848,
30,
186,
85,
31,
107,
14,
249,
45,
8117,
13,
22,
1,
58,
746,
14057,
3726,
7,
21127,
6903,
7,
581,
3726,
7,
10754,
7,
1,
2242,
5092,
1307,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Math.IEEERemainder returns negative results. Why?
===
The .net framework includes Math.IEEERemainder(x, y) in addition to the standard mod operator. What is this function really doing? I dont understand the negative numbers that this produces.
Example:
Math.IEEERemainder(0, 2) = 0
Math.IEEERemainder(1, 2) = 1
Math.IEEERemainder(2, 2) = 0
Math.IEEERemainder(3, 2) = -1
| 0 | [
2,
5057,
9,
660,
7911,
5996,
19720,
4815,
3682,
1736,
9,
483,
60,
800,
3726,
3726,
14,
13,
9,
2328,
6596,
1103,
5057,
9,
660,
7911,
5996,
19720,
5,
396,
15,
13,
93,
6,
19,
848,
20,
14,
1236,
7226,
6022,
9,
98,
25,
48,
1990,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why do SocketChannel writes always complete for the full amount even on non-blocking sockets?
===
Using the Sun Java VM 1.5 or 1.6 on Windows, I connect a non-blocking socket. I then fill a <code>ByteBuffer</code> with a message to output, and attempt to <code>write()</code> to the SocketChannel.
I expect the write to complete only partially if the amount to be written is greater than the amount of space in the socket's TCP output buffer (this is what I expect intuitively, it's also pretty much my understanding of the <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/nio/channels/SocketChannel.html#write(java.nio.ByteBuffer)">docs</a>), but that's not what happens. The <code>write()</code> *always* seems to return reporting the full amount written, even if it's several megabytes (the socket's SO_SNDBUF is 8KB, much, much less than my multi-megabyte output message).
A problem here is that I can't test the code that handles the case where the output is partially written (registering an interest set of <code>WRITE</code> to a selector and doing a <code>select()</code> to wait until the remainder can be written), as that case never seems to happen. What am I not understanding? | 0 | [
2,
483,
107,
18482,
10928,
6215,
550,
1279,
26,
14,
503,
2006,
166,
27,
538,
8,
12048,
68,
18482,
18,
60,
800,
3726,
3726,
568,
14,
939,
8247,
13,
20147,
137,
9,
264,
54,
137,
9,
379,
27,
1936,
15,
31,
6379,
21,
538,
8,
12048,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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: A modal form that gets opened/closed by the application rather than the user?
===
I have what I believe to be a fairly well structured .NET 3.5 forms application (Unit Tests, Dependency Injection, SoC, the forms simply relay input and display output and don't do any logic, yadda yadda) I am just missing the winforms knowledge for how to get this bit to work.
When a connection to the database is lost - a frequent occurrence - I am detecting and handling it and would like a modal form to pop up, blocking use of the application until the connection is re-established. I am not 100% sure how to do that since I am not waiting for user input, rather I am polling the database using a timer.
My attempt was to design a form with a label on it and to do this:
partial class MySustainedDialog : Form {
public MySustainedDialog(string msg) {
InitializeComponent();
lbMessage.Text = msg;
}
public new void Show() {
base.ShowDialog();
}
public new void Hide() {
this.Close();
}
}
public class MyNoConnectionDialog : INoConnectionDialog {
private FakeSustainedDialog _dialog;
public void Show() {
var w = new BackgroundWorker();
w.DoWork += delegate {
_dialog = new MySustainedDialog("Connection Lost");
_dialog.Show();
};
w.RunWorkerAsync();
}
public void Hide() {
_dialog.Close();
}
}
This doesn't work since _dialog.Close() is a cross-thread call. I've been able to find information on how to resolve this issue within a windows form but not in a situation like this one where you need to create the form itself.
Can someone give me some advice how to achieve what I am trying to do? | 0 | [
2,
1936,
1997,
45,
21,
13,
20756,
505,
30,
3049,
520,
118,
20372,
34,
14,
3010,
864,
119,
14,
4155,
60,
800,
3726,
3726,
31,
57,
98,
31,
985,
20,
44,
21,
6647,
134,
17784,
13,
9,
2328,
203,
9,
264,
1997,
3010,
13,
5,
15464,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best way to count file downloads on a website
===
It's surprising how difficult it is to find a simple, concise answer to this question:
1. I have a file, foo.zip, on my website
2. What can I do to find out how many people have accessed this file?
3. I could use Tomcat calls if necessary | 0 | [
2,
246,
161,
20,
2468,
3893,
7121,
18,
27,
21,
2271,
800,
3726,
3726,
32,
22,
18,
12891,
184,
1956,
32,
25,
20,
477,
21,
1935,
15,
29455,
1623,
20,
48,
1301,
45,
137,
9,
31,
57,
21,
3893,
15,
4310,
111,
9,
2553,
306,
15,
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... |
Best open-source, cross-platform, compiled, GUI alternative to Visual Basic?
===
I'm about to write a little GUI app that will sit in the system tray, doing a little FTP and ODBC.
I'd like to develop in Linux, if possible.
What would you recommend?
Thanks a bunch! | 0 | [
2,
246,
368,
8,
12097,
15,
919,
8,
27035,
15,
9316,
15,
9457,
2676,
20,
3458,
2125,
60,
800,
3726,
3726,
31,
22,
79,
88,
20,
2757,
21,
265,
9457,
4865,
30,
129,
2066,
19,
14,
329,
10121,
15,
845,
21,
265,
1187,
306,
17,
12340,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 client calling a java webservice -- known gotchas?
===
Currently we have a java webservice that we are trying to connect to via a .NET client. This is all done over SSL. Are there any well known gotchas as this seems to be a problem that has come up again and again. What are the most well known gotchas I should be looking for? | 0 | [
2,
13,
9,
2328,
6819,
2555,
21,
8247,
2741,
11449,
13,
8,
8,
167,
330,
1651,
18,
60,
800,
3726,
3726,
871,
95,
57,
21,
8247,
2741,
11449,
30,
95,
50,
749,
20,
6379,
20,
1197,
21,
13,
9,
2328,
6819,
9,
48,
25,
65,
677,
84,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you restrict the size of a file being uploaded with JavaScript (or Java) without transferring the entire file?
===
Is there a way to validate on the client side browser whether the size of a file being uploaded from a JSP page is over a set size limit without forcing the user to upload the entire file only to find out it was too large?
I would like to stay away from any proprietary controls or techniques like Flash or ActiveX if possible.
Thanks! | 0 | [
2,
184,
107,
42,
15436,
14,
1072,
16,
21,
3893,
142,
23782,
29,
8247,
8741,
13,
5,
248,
8247,
6,
366,
15798,
14,
1078,
3893,
60,
800,
3726,
3726,
25,
80,
21,
161,
20,
7394,
1373,
27,
14,
6819,
270,
16495,
1472,
14,
1072,
16,
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... |
Upgrading SVN 1.4 to 1.5.3 and CC.Net from 1.3 to 1.4
===
I think this is a multi-part question, so bare with me.
Currently all of our developers use the version of Tortise built for SVN 1.4 and our SVN server is running 1.4. Our build server is running CC.Net and is using SVN 1.4.
We want to upgrade.
I've established that upgrading our clients to 1.5, then our server to 1.5 will work for us. However, the question comes in with CC.Net. Can we just upgrade the install of SVN on our build server to SVN 1.5? Or do we have to upgrade the install of CC.Net too? We'd like to also take this time to upgrade CC.Net, however, we'd like to make sure the SVN upgrade is done first, then come back and do CC.Net.
Also adding to this mix is that in some of our projects we maintain a 'tools' folder that may or may not contain the binaries for SVN due to the nAnt scripts we use in those projects. I assume that if we upgrade the CC.Net server install of SVN to 1.5, we'll also need to update all of those projects as the CI server uses the same working directory as the nAnt scripts that get executed.
clear as mud? | 0 | [
2,
26939,
13,
18,
16578,
137,
9,
300,
20,
137,
9,
264,
9,
240,
17,
8093,
9,
2328,
37,
137,
9,
240,
20,
137,
9,
300,
800,
3726,
3726,
31,
277,
48,
25,
21,
1889,
8,
3091,
1301,
15,
86,
4856,
29,
55,
9,
871,
65,
16,
318,
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... |
Windows: Save screenshot directly to a file?
===
In Windows, one can press <code>Alt-PrintScreen</code> to copy an image of the active window, or <code>Ctrl-PrintScreen</code> to copy an image of the full desktop.
This can then be pasted into applications that accept images: Photoshop, Microsoft Word, etc.
I'm wondering: <b>Is there a way to save the screenshot directly to a file?</b> Do I <i>really</i> have to open Photoshop simply to paste an image, then save it? | 0 | [
2,
1936,
45,
2079,
2324,
7868,
1703,
20,
21,
3893,
60,
800,
3726,
3726,
19,
1936,
15,
53,
92,
901,
13,
1,
9375,
1,
192,
38,
8,
10299,
7187,
1,
118,
9375,
1,
20,
4344,
40,
1961,
16,
14,
1348,
1463,
15,
54,
13,
1,
9375,
1,
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... |
Design of high volume TCP Client
===
I have a .NET TCP Client that sends high volumes of messages to a (.NET async) TCP server.
I need to keep sending messages to the server but I run out of ports on the client due to TIME_WAIT.
How can a program continually and reliably send messages without using all of the available ports?
Is there a method to keep reusing the same socket. I have looked at Disconnect() and the REUSEADDRESS socket flag but cannot find any good examples of their use. In fact most sources say not to use Disconnect as it is for lower level use (i.e. it only recycles the socket handle).
I'm thinking that I need to switch to UDP or perhaps there is a method using C++ and IOCP? | 0 | [
2,
704,
16,
183,
2310,
13,
38,
7439,
6819,
800,
3726,
3726,
31,
57,
21,
13,
9,
2328,
13,
38,
7439,
6819,
30,
11350,
183,
6127,
16,
7561,
20,
21,
13,
5,
9,
2328,
21,
9507,
150,
6,
13,
38,
7439,
8128,
9,
31,
376,
20,
643,
49... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What are the potential pitfalls of using HTML Frames for templating?
===
We could also include IFrames as well. | 0 | [
2,
98,
50,
14,
2222,
4175,
5660,
18,
16,
568,
13,
15895,
12809,
26,
13,
9577,
255,
1880,
60,
800,
3726,
3726,
95,
110,
67,
468,
31,
8361,
18,
28,
134,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Formatting numbers with significant figures in C#
===
I have some decimal data that I am pushing into a SharePoint list where it is to be viewed. I'd like to restrict the number of significant figures displayed in the result data based on my knowledge of the specific calculation. Sometimes it'll be 3, so 12345 will become 12300 and 0.012345 will become 0.0123. Occasionally it will be 4 or 5. Is there any convenient way to handle this?
| 0 | [
2,
2595,
1203,
2116,
29,
1505,
2957,
19,
272,
5910,
800,
3726,
3726,
31,
57,
109,
26380,
1054,
30,
31,
589,
5076,
77,
21,
1891,
3132,
968,
113,
32,
25,
20,
44,
6084,
9,
31,
22,
43,
101,
20,
15436,
14,
234,
16,
1505,
2957,
6115... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 would you ever implement finalize()?
===
I've been reading through a lot of the rookie Java questions on finalize() and find it kind of bewildering that no one has really made it plain that finalize() is an unreliable way to clean up resources. I saw someone comment that they use it to clean up Connections, which is really scary since the only way to come as close to a guarantee that a Connection is closed is to implement try (catch) finally.
I was not schooled in CS, but I have been programming in Java professionally for close to a decade now and I have never seen anyone implement finalize() in a production system ever. This still doesn't mean that it doesn't have its uses, or that people I've worked with have been doing it right.
So my question is, what use cases are there for implementing finalize() that cannot be handled more reliably via another process or syntax within the language?
Please provided specific scenarios or your experience, simply repeating a Java text book, or finalize's intended use is not enough, and is not the intent of this question. | 0 | [
2,
483,
83,
42,
462,
8713,
426,
2952,
5,
6,
60,
800,
3726,
3726,
31,
22,
195,
74,
1876,
120,
21,
865,
16,
14,
7959,
8247,
2346,
27,
426,
2952,
5,
6,
17,
477,
32,
825,
16,
44,
14324,
7882,
30,
90,
53,
63,
510,
117,
32,
3748... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you do relative positioning in WPF?
===
How can you relatively position elements in WPF?
The standard model is to use layout managers for everything, but what if you want to position elements (on a Canvas, for example) simply based on the position of other elements?
For example, you may want one element (say a button) to be attached the side of another (perhaps a panel) independent of the position or layout of that panel.
Anyone that's worked with engineering tools (SolidWorks, AutoCad, etc.) is familiar with this sort of relative positioning.
Forcing everything into layout managers (the different WPF Panels) does not make much sense for certain scenarios, where you don't care that elements are maintained by some parent container and you do not want the other children to be affected by a change in the layout/appearance of each other. Does WPF support this relative positioning model in any way? | 0 | [
2,
184,
107,
42,
107,
4543,
649,
68,
19,
619,
7721,
60,
800,
3726,
3726,
184,
92,
42,
3109,
649,
2065,
19,
619,
7721,
60,
14,
1236,
1061,
25,
20,
275,
9106,
12657,
26,
796,
15,
47,
98,
100,
42,
259,
20,
649,
2065,
13,
5,
218... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 trunc a date to seconds in Oracle
===
This page ([http://www.techonthenet.com/oracle/functions/trunc_date.php][1]) mentions how to trunc a date to minutes/hours/etc. in Oracle.
How would you trunc a date to seconds in the same manner?
[1]: http://www.techonthenet.com/oracle/functions/trunc_date.php | 0 | [
2,
184,
20,
8600,
6897,
21,
1231,
20,
2582,
19,
15759,
800,
3726,
3726,
48,
2478,
13,
5,
2558,
21127,
6903,
6483,
9,
6524,
218,
124,
2328,
9,
960,
118,
6055,
5615,
118,
22359,
18,
118,
8989,
6897,
1,
8209,
9,
26120,
500,
2558,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I set up a mock queue using mockrunner to test an xml filter?
===
I'm using the mockrunner package from [http://mockrunner.sourceforge.net/][1] to set up a mock queue for JUnit testing an XML filter which operates like this:
1. sets recognized properties for an ftp server to put and get xml input and a jms queue server that keeps track of jobs. Remotely there waits a server that actually parses the xml once a queue message is received.
2. creates a remote directory using ftp and starts a queue connection using mqconnectionfactory to the given address of the queue server.
3. once the new queue entry is made in 2), the filter waits for a new queue message to appear signifying the job has been completed by the remote server. The filter then grabs the modified xml file from the ftp and passes it along to the next filter.
The JUnit test I am working on simply needs to emulate this environment by starting a local ftp and mock queue server for the filter to connect to, then waiting for the filter to connect to the queue and put the new xml input file on a local directory via a local ftp server, wait for the queue message and then modify the xml input slightly, put the modified xml in a new directory and post another message to the queue signifying the job has completed.
All of the tutorials I have found on the net have used EJB and JNDI to lookup the queue server once it has been made. If possible, I'd like to sidestep that route by just creating a mock queue on my local machine and connecting to it in the simplest manner possible, not using EJB and JNDI.
Thanks in advance!
[1]: http://mockrunner.sourceforge.net/ | 0 | [
2,
184,
107,
31,
309,
71,
21,
10506,
22521,
568,
10506,
12993,
20,
1289,
40,
23504,
11945,
60,
800,
3726,
3726,
31,
22,
79,
568,
14,
10506,
12993,
6030,
37,
636,
21127,
6903,
79,
5668,
12993,
9,
12097,
1106,
834,
9,
2328,
118,
500... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Bit Twiddle to perform this conversion
===
curious if anyone might have some insight in how I would do the following to a binary number:
convert
01+0 -> 10+1
01 -> 10
10 -> 01
so,
10101000010100011100
01010100101010100010
I was thinking regex, but I'm working with binary numbers and want to stay that way. The [bit twiddling hacks][1] page hasn't given me any insight either. This clearly has some essence of cellular automata. So, anyone have a few bit operations that can take care of this? (no code is necessary, I know how to do that).
[1]: http://graphics.stanford.edu/~seander/bithacks.html | 0 | [
2,
1142,
22810,
12312,
20,
2985,
48,
6263,
800,
3726,
3726,
7686,
100,
1276,
530,
57,
109,
9239,
19,
184,
31,
83,
107,
14,
249,
20,
21,
14171,
234,
45,
8406,
13,
3026,
2430,
387,
13,
8,
1,
332,
16628,
13,
3026,
13,
8,
1,
332,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Project dependencies across multiple Visual Studio versions
===
I have 3 .net projects.
Project1.dll is generated by a VS2008 project.
Project2.dll is generated by a VS2005 project that references Project1.dll.
Project3.dll is generated by a VS2008 project that references both Project1.dll and Project2.dll.
Right now, I build Project1.dll, and manually copy it to the place where Project 2 can pick it up.
Then I build Project2.dll and manually copy it and Project1.dll to the place where Project 3 can pick them up.
Obviously I'm doing something wrong (manual). What is the correct way to keep my projects' references up to date?
----------
Updating Project2 to VS2008 and then creating one solution containing all 3 projects is not an option at this time. We have a 3rd party visualstudio plugin that does not yet work in VS2008. Project2 must stay in VS2005
De-updating Project1 and Project3 to VS2005 and then creating one solution is not an option either. We're relying on C# 3.0 and .net 3.5 features in those projects. | 0 | [
2,
669,
29411,
464,
1886,
3458,
1120,
3281,
800,
3726,
3726,
31,
57,
203,
13,
9,
2328,
2314,
9,
669,
165,
9,
43,
211,
25,
6756,
34,
21,
4611,
2753,
669,
9,
669,
135,
9,
43,
211,
25,
6756,
34,
21,
4611,
2835,
669,
30,
7231,
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... |
What would cause the current directory of an executing app to change?
===
I have a C# application that includes the following code:
string file = "relativePath.txt";
//Time elapses...
string contents = File.ReadAllText(file);
This works fine, most of the time. The file is read relative to the directory that the app was started from. However, in testing, it has been found that if left alone for about 5 hours, the app will throw a <code>FileNotFoundException</code> saying that "C:\Documents and Settings\Adminstrator\relativePath.txt" could not be found.
What gives? And, what is the best fix? Resolving the file against <code>Assembly.GetEntryAssembly().Location</code>? | 0 | [
2,
98,
83,
1679,
14,
866,
16755,
16,
40,
25836,
4865,
20,
753,
60,
800,
3726,
3726,
31,
57,
21,
272,
5910,
3010,
30,
1103,
14,
249,
1797,
45,
3724,
3893,
800,
13,
7,
7256,
3366,
8353,
9,
38,
396,
38,
7,
73,
12894,
891,
13,
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... |
How do you compile OpenSSL for x64?
===
After following the instructions in INSTALL.W64 I have two problems:
- The code is still written to the "out32" folder. I need to be able to link to both 32-bit and 64-bit versions of the library on my workstation, so I don't want the 64-bit versions to clobber the 32-bit libs.
- The output is still 32-bit! This means that I get "unresolved external symbol" errors when trying to link to the libraries from an x64 app. | 0 | [
2,
184,
107,
42,
26561,
8965,
18,
255,
26,
993,
3470,
60,
800,
3726,
3726,
75,
249,
14,
7650,
19,
16146,
9,
499,
3470,
31,
57,
81,
1716,
45,
13,
8,
14,
1797,
25,
174,
642,
20,
14,
13,
7,
1320,
3125,
7,
19294,
9,
31,
376,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PHP: strtr in an UTF-8 environment?
===
Is there an UTF-8 compatible aequivalent for [strtr][1] or do I have to write my own?
Actually what I want to do is to remove all accents and umlauts from a string, turning "lärm" into "larm" or "andré" into "andre". What I tried to do was to utf8_decode the string and then use strtr on it, but since my source file is saved as UTF-8 file, I can't enter the ISO-8859-15 characters for all umlauts - the editor inserts the UTF-8 characters.
Obviously a solution for this would be to have an include that's an ISO-8859-15 file, but there must be a better way than to have another required include?
echo strtr(utf8_decode($input),
'ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ',
'SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy');
[1]: http://de2.php.net/manual/en/function.strtr.php | 0 | [
2,
13,
26120,
45,
13,
9729,
6384,
19,
40,
287,
11720,
8,
457,
2307,
60,
800,
3726,
3726,
25,
80,
40,
287,
11720,
8,
457,
14961,
21,
20922,
26,
636,
9729,
6384,
500,
2558,
165,
500,
54,
107,
31,
57,
20,
2757,
51,
258,
60,
1121,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best free, Ajax.NET (System.Web.Extensions 3.5) compatible Rich Text Box control?
===
I'm looking for a good ASP.NET RichTextBox component that integrates fairly easily with .NET Framework 3.5 Ajax, specifically one that can easily provide its values from inside an UpdatePanel.
I got burned by RicherComponents RichTextBox which still does not reference the Framework 3.5.
thanks! | 0 | [
2,
98,
25,
14,
246,
551,
15,
20624,
9,
2328,
13,
5,
10724,
9,
14113,
9,
1706,
25573,
18,
203,
9,
264,
6,
14961,
2042,
1854,
1649,
569,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
254,
28,
306,
9,
2328,
2042,
11969,
5309,
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... |
WebRequest from localhost to localhost : why is it being denied?
===
My app uses a WebRequest at certain points to get pages from itself.
This shouldn't be a problem. It actually works fine on the server, which is a "shared" hosting package with Medium trust. Locally, I use a custom security policy based on Medium trust, which includes the following:
<pre>
<IPermission
class="WebPermission"
version="1">
<ConnectAccess>
<URI uri="$OriginHost$"/>
</ConnectAccess>
</IPermission>
</pre>
The offending line is in a custom XmlRelativeUrlResolver:
public override object GetEntity( System.Uri puriAbsolute, string psRole, System.Type pReturnType )
{
return _baseResolver.GetEntity( puriAbsolute, psRole, pReturnType );
}
The url being requested is on localhost, in the same application as the requester. Here's the top of the stack trace.
<pre>
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint)
at System.Net.HttpRequestCreator.Create(Uri Uri)
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at System.Net.WebRequest.Create(Uri requestUri)
at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at flow.controls.XmlRelativeUrlResolver.GetEntity(Uri puriAbsolute, String psRole, Type pReturnType) in c:\flow\source\controls\DataTransform.cs:line 105
at System.Xml.Xsl.Xslt.XsltLoader.CreateReader(Uri uri, XmlResolver xmlResolver)</pre>
Anyone see the problem here?
| 0 | [
2,
2741,
99,
10351,
37,
375,
11694,
20,
375,
11694,
13,
45,
483,
25,
32,
142,
5265,
60,
800,
3726,
3726,
51,
4865,
2027,
21,
2741,
99,
10351,
35,
1200,
819,
20,
164,
4434,
37,
1145,
9,
48,
5714,
22,
38,
44,
21,
1448,
9,
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... |
Python module dependency problem
===
Ok I have two modules, each containing a class, the problem is there classes refrence each other.
Lets say for example I had a room module and a person module containing CRoom and CPerson.
The CRoom class contains infomation about the room, and a CPerson list of every one in the room.
The CPerson class however sometimes needs to use the CRoom class for the room its in, for example to find the door, or too see who else is in the room.
The problem is with the two modules importing each other I just get an import error on which ever is being imported second :(
In c++ I could solve this by only including the headers, and since in both cases the classes just have pointers to the other class, a forward declaration would surfice for the header eg:
class CPerson;//forward declare
class CRoom
{
std::set<CPerson*> People;
...
Is there anyway to do this in python, other than placing both classes in the same module or something like that? | 0 | [
2,
20059,
12613,
26835,
1448,
800,
3726,
3726,
5854,
31,
57,
81,
17113,
15,
206,
3503,
21,
718,
15,
14,
1448,
25,
80,
2684,
302,
6177,
2940,
206,
89,
9,
6884,
395,
26,
823,
31,
41,
21,
337,
12613,
17,
21,
840,
12613,
3503,
272,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
[Reporting Services] Can't see subreport in the Report Manager
===
I've been following [this tutorial][1] (lesson 6) in order to build and deploy a sample report with an embedded subreport which reads its parameters' values from the parent report. This subreport is embedded in one of the group rows of the report's table. Additionally, detail rows appear collapsed until the user presses the (+) button for each group of data in the table.
The report works great when I preview it at the Business Intelligence Development Studio (by the way, SQL 2005 Express edition) but **when I deploy it and try to see in the Report Manager, the subreport is not shown**. And, if I press the (+) button, the following message appears:
> *Some parameters or credentials have not been specified*
Does anybody has the slightest idea of what I am doing wrong? Why does it works perfectly in the Report Viewer embedded in Visual Studio but not in the Report Manager web app?
Thanks in advance.
[1]: http://msdn.microsoft.com/en-us/library/aa337460(SQL.90).aspx | 0 | [
2,
636,
17437,
68,
687,
500,
92,
22,
38,
196,
972,
17437,
19,
14,
1330,
1382,
800,
3726,
3726,
31,
22,
195,
74,
249,
636,
1565,
29724,
500,
2558,
165,
500,
13,
5,
923,
218,
400,
6,
19,
389,
20,
1895,
17,
17617,
21,
5717,
1330,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Working with Silverlight B2 and RC0
===
I've been reading about the new developer-only RC0 for Silverlight, and the fact that it is supposed to be used only by developers to solve any breaking changes when upgrading from beta 2, so that when the actual S2 is released, migration is smoother.
My question is, since you are supposed to uninstall B2 tools and install RC0 in VS2008, is there any way to keep providing support and bugfixing for an existent B2 app, while maintaining a RC0 branch at the same time?
Or the only possible course of action is having a VM with VS2008 and B2 used for working with the B2 app until the RC is actually released? | 0 | [
2,
638,
29,
1172,
3130,
334,
135,
17,
16462,
387,
800,
3726,
3726,
31,
22,
195,
74,
1876,
88,
14,
78,
10058,
8,
4965,
16462,
387,
26,
1172,
3130,
15,
17,
14,
837,
30,
32,
25,
2293,
20,
44,
147,
104,
34,
10168,
20,
8402,
186,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I install MySQL modules within PHP?
===
I've updated **php.ini** and moved **php_mysql.dll** as explained in [steps 6 and 8 here.][1]
I get this error…
<pre>Fatal error: Call to undefined function mysql_connect() in C:\inetpub...</pre>
MySQL doesn't show up in my **phpinfo;** report.
[1]: http://stackoverflow.com/questions/11919/how-do-i-get-php-and-mysql-working-on-iis-70#94341 | 0 | [
2,
184,
107,
31,
16146,
51,
18,
22402,
17113,
363,
13,
26120,
60,
800,
3726,
3726,
31,
22,
195,
6372,
13,
1409,
26120,
9,
2651,
1409,
17,
385,
13,
1409,
26120,
1,
915,
18,
22402,
9,
43,
211,
1409,
28,
2897,
19,
636,
8375,
18,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is DirectSound the best audio abstraction layer for Windows?
===
Is DirectSound the best audio abstraction layer for Windows?
Switching my app from a very bad sound implementation, built to a specific chipset, to an abstration layer.
App is native Winform, .net 3.5. DirectX/DirectSound is the likely choice, but a little concerned about the overhead. Any other options? Or is it silly to even THINK about anything else? | 0 | [
2,
25,
1744,
8489,
14,
246,
4023,
23907,
5385,
26,
1936,
60,
800,
3726,
3726,
25,
1744,
8489,
14,
246,
4023,
23907,
5385,
26,
1936,
60,
13027,
51,
4865,
37,
21,
253,
896,
646,
6123,
15,
392,
20,
21,
1903,
12602,
1198,
15,
20,
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... |
IE7 detected as IE6 on Vista...Why?
===
I have two vista Business machines. I have IE 7 installed on both. On my first machine (Computer1) if I go to this site ([http://www.quirksmode.org/js/detect.html][1]), it says I am using "Explorer 6 on Windows". If I use Computer2 with Vista Business and IE7, it says I am using "Explorer 7 on Windows". Here is a screen [capture][2]. The same version of IE is on both machines. Anyone have a solution?
[1]: http://www.quirksmode.org/js/detect.html
[2]: http://www.rickdoes.net/blog/images/ie6.png | 0 | [
2,
13,
660,
465,
11968,
28,
13,
660,
379,
27,
13520,
9,
9,
9,
2256,
60,
800,
3726,
3726,
31,
57,
81,
13520,
508,
6035,
9,
31,
57,
13,
660,
453,
4066,
27,
156,
9,
27,
51,
64,
1940,
13,
5,
18448,
165,
6,
100,
31,
162,
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... |
Tool for translation of Oracle PL/SQL into Postgresql PL/pgSQL
===
It there a tool (preferably free) which will translate Oracle's PL/SQL stored procedure language into Postgresql's PL/pgSQL stored procedure language? | 0 | [
2,
5607,
26,
4064,
16,
15759,
12443,
118,
18,
22402,
77,
678,
6879,
18,
22402,
12443,
118,
9623,
18,
22402,
800,
3726,
3726,
32,
80,
21,
5607,
13,
5,
3515,
2407,
4801,
551,
6,
56,
129,
20628,
15759,
22,
18,
12443,
118,
18,
22402,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Cross-browser onload event and the Back button
===
For all major browsers (except IE), the JavaScript onload event doesn't fire when the page loads as a result of a Back button operation - it only fires when the page is first loaded.
Can someone point me at some sample cross-browser code (Firefox, Opera, Safari, IE ...) that solves this problem? I'm familiar with Firefox's pageshow event but unfortunately neither Opera or Safari implement this.
Thanks! | 0 | [
2,
919,
8,
25699,
4104,
27,
8294,
807,
17,
14,
97,
5167,
800,
3726,
3726,
26,
65,
394,
16495,
18,
13,
5,
10066,
13,
660,
6,
15,
14,
8247,
8741,
27,
8294,
807,
1437,
22,
38,
535,
76,
14,
2478,
19069,
28,
21,
829,
16,
21,
97,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
RoR: Creating/Updating: Showing validation errors while preserving previous values
===
I have a basic model in which i have specified some of the fields to validate the presence of. in the create action in the controller i do the standard:
@obj = SomeObject.new(params[:some_obj])
if @obj.save
flash[:notice] = "ok"
redirect...
else
flash[:error] = @obj.errors.full_messages.collect { |msg| msg + "<br/>" }
redirect to new form
end
however when i redirect to the new form, the errors show, but the fields are empty. is there a way to repopulate the fields with the entered values so the errors can be corrected easily? | 0 | [
2,
761,
248,
45,
2936,
118,
576,
43,
1880,
45,
3187,
27999,
11908,
133,
17936,
1158,
4070,
800,
3726,
3726,
31,
57,
21,
2125,
1061,
19,
56,
31,
57,
9931,
109,
16,
14,
2861,
20,
7394,
1373,
14,
1970,
16,
9,
19,
14,
1600,
1028,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How would I go about creating a mod_rewrite that redirects to launch.php?i=/the/url/that/they/want?
===
So if the user types:
> `mydomain.com/dashboard`
The document the server actually sends them is:
> `/launch.php?i=/dashboard`
The one caveat is that I would like to leave requests for
- /flags
- /people
- /posters
- /css
- /icons
- /images
- /libraries
- /patterns
alone, and they should request the actual folder.
How would I create such a mod_rewrite?
| 0 | [
2,
184,
83,
31,
162,
88,
2936,
21,
7226,
1,
99,
23716,
30,
302,
14706,
18,
20,
3394,
9,
26120,
60,
49,
3726,
118,
124,
118,
911,
255,
118,
887,
118,
2077,
118,
14876,
60,
800,
3726,
3726,
86,
100,
14,
4155,
2551,
45,
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... |
http/AJAX (GWT) vs Eclipse gui for thin client deployment
===
I am starting a project for which we will have a thin client, sending requests and getting responses from a server.
We are still in the planning stages, so we have a choice to settle on either an Eclipse based GUI (Eclipse plugin) or using GWT as a fromtend for the application.
I am not very familiar with Eclipse as a GUI (Nor with GWT) but do know 'normal' Java.
What would be the main benefits and drawbacks of either approach? | 0 | [
2,
7775,
118,
6881,
7522,
13,
5,
263,
499,
38,
6,
4611,
11652,
9457,
26,
2951,
6819,
10475,
800,
3726,
3726,
31,
589,
1422,
21,
669,
26,
56,
95,
129,
57,
21,
2951,
6819,
15,
4907,
12279,
17,
1017,
13231,
37,
21,
8128,
9,
95,
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... |
tomcat + spring question
===
I have to remove temp files on tomcat startup, the pass to a folder which contains temp files is in applicationContext.xml
Is there a way to run a method/class only on tomcat sturtup ?
| 0 | [
2,
2067,
5782,
2754,
1573,
1301,
800,
3726,
3726,
31,
57,
20,
4681,
13,
9577,
6488,
27,
2067,
5782,
20205,
15,
14,
1477,
20,
21,
19294,
56,
1588,
13,
9577,
6488,
25,
19,
3010,
1126,
11969,
9,
396,
8184,
25,
80,
21,
161,
20,
485,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Is there a way to make SQL Management Studio never generate USE [database-name] in scripts?
===
Is there a way to turn this 'feature' off? | 0 | [
2,
25,
80,
21,
161,
20,
233,
4444,
255,
1097,
1120,
243,
7920,
275,
636,
18768,
8436,
8,
7259,
500,
19,
17505,
60,
800,
3726,
3726,
25,
80,
21,
161,
20,
805,
48,
13,
22,
26956,
22,
168,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Remote clients Can't open XLS file using ASP.NET/ADO
===
I'm trying to do the following:
1. User goes to web page, uploads XLS file
2. use ADO .NET to open XLS file using JET engine connection to locally uploaded file on web server
This all works fine locally (my machine as the client and the web server) - and in fact is working on the customer's web server with remote clients but is not working when trying to test internally using a remote client.
The error I get is:
TIME: [10/1/2008 11:15:28 AM]
SEVERITY: EXCEPTION
PROGRAM: Microsoft JET Database Engine
EXCEPTION: Unspecified error
STACK TRACE: at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
The code generating the error is:
OleDbConnection l_DbConnection;
OleDbDataAdapter l_DbCommand;
DataSet l_dataSet = new DataSet();
l_DbConnection = new OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0; data source=\"" + l_importFileName + "\";Extended Properties=Excel 8.0;");
l_DbCommand = new OleDbDataAdapter("select * from [Sheet1$]", l_DbConnection);
//try using provider to read file
try { l_DbConnection.Open(); }
The call to "Open" is raising the exception above.
The site is using impersonation and all calls are made as the user logged in on the client. What I've done so far to try and get this working:
Followed the steps here [http://support.microsoft.com/kb/251254/][1] and assigned permissions to the TMP/TEMP environment variable directory to the user I am using to test (also assigned permissions to ASPNET and then to "Everyone" as a blanket "is this permissions related?" test).
Ensured that the file is being uploaded and the XLS file itself has inherited the directory permissions that allow the user full access to the file. I also gave this dir permissions to "Everyone" just in case - that also didn't help.
I haven't had to change any environment variables and have, therefore, not restarted after making these changes - but I shouldn't have to for Windows folder/file permissions to take effect.
At this point I'm at a total loss
[1]: http://support.microsoft.com/kb/251254/ | 0 | [
2,
5388,
7421,
92,
22,
38,
368,
993,
7532,
3893,
568,
28,
306,
9,
2328,
118,
5672,
800,
3726,
3726,
31,
22,
79,
749,
20,
107,
14,
249,
45,
137,
9,
4155,
1852,
20,
2741,
2478,
15,
71,
8294,
18,
993,
7532,
3893,
172,
9,
275,
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... |
Powershell "is the current drive a network drive" how to?
===
I need to know, from within Powershell, if the current drive is a mapped drive or not.
Unfortunately, Get-PSDrive is not working "as expected":
PS:24 H:\temp
>get-psdrive h
Name Provider Root CurrentLocation
---- -------- ---- ---------------
H FileSystem H:\ temp
but in MS-Dos "net use" shows that H: is really a mapped network drive:
New connections will be remembered.
Status Local Remote Network
-------------------------------------------------------------------------------
OK H: \\spma1fp1\JARAVJ$ Microsoft Windows Network
The command completed successfully.
What I want to do is to get the root of the drive and show it in the prompt (see: <http://stackoverflow.com/questions/157923/customizing-powershell-prompt-equivalent-to-cmds-mpg>)
| 0 | [
2,
414,
15984,
13,
7,
403,
14,
866,
1493,
21,
982,
1493,
7,
184,
20,
60,
800,
3726,
3726,
31,
376,
20,
143,
15,
37,
363,
414,
15984,
15,
100,
14,
866,
1493,
25,
21,
20877,
1493,
54,
52,
9,
6200,
15,
164,
8,
1919,
14573,
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... |
Possible to detect the *type of mobile device* via javascript or HTTP Headers?
===
I've got a request from a customer to automatically detect the type of mobile device (not the browser, the type. ex: Moto Q, Blackjack II, etc.) and automatically select the device from a drop down with a list of supported devices.
So far I've found that the HTTP Headers (submitted by mobile IE) contain information such as
- Resolution
- UA-CPU (i've seen ARM from WM 2003 and x86 from WM5)
- User Agent (which basically just says Windows CE)
The only thing I can think of right now is possibly using a combination of the resolution/cpu and making a "best guess"
Any thoughts? | 0 | [
2,
938,
20,
9092,
14,
1637,
4474,
16,
3241,
3646,
2483,
1197,
8247,
8741,
54,
7775,
157,
445,
60,
800,
3726,
3726,
31,
22,
195,
330,
21,
3772,
37,
21,
7705,
20,
7499,
9092,
14,
1001,
16,
3241,
3646,
13,
5,
1270,
14,
16495,
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... |
Error 1053: the service did not respond to the start or control request in a timely fashion
===
i know this is very much a "how long is a piece of string" type of question, however i have recently inherited a couple of applications that run as windows services, and i am having problems providing a gui (accessible from a context menu in system tray) with both of them.
before you ask, the reason why we need a gui for a windows service is in order to be able to re-configure the behaviour of the windows service(s) without resorting to stopping/re-starting.
my code works fine in debug mode, and i get the context menu come up, and everything behaves correctly etc.
when i install the service via "installutil" using a named account (i.e., not Local System Account), the service runs fine, but doesn't display the icon in the system tray (i know this is normal behaviour because i don't have the "interact with desktop" option).
here is the problem though - when i choose the "LocalSystemAccount" option, and check the "interact with desktop" option, the service takes AGES to start up for no obvious reason, and i just keep getting "Could not start the ... service on Local Computer. Error 1053: the service did not respond to the start or control request in a timely fashion".
incidentally, i increased the windows service timeout from the default 30 seconds to 2 minutes via a registry hack (see http://support.microsoft.com/kb/824344, search for TimeoutPeriod in section 3), however the service start up still times out.
my first question is - why might the "Local System Account" login takes SOOOOO MUCH LONGER than when the service logs in with the non-LocalSystemAccount, causing the windows service time-out? what's could the difference be between these two to cause such different behaviour at start up?
secondly - taking a step back, all i'm trying to achieve, is simply a windows service that provides a gui for configuration - I'd be quite happy to run using the non-Local System Account (with named user/pwd), if I could get the service to interact with the desktop (that is, have a context menu available from the system tray). is this possible, and if so how?
any pointers to the above questions would be very much appreciated!
thanks in advance for your help.
| 0 | [
2,
7019,
332,
4022,
45,
14,
365,
144,
52,
4590,
20,
14,
799,
54,
569,
3772,
19,
21,
85,
102,
3161,
800,
3726,
3726,
31,
143,
48,
25,
253,
212,
21,
13,
7,
1544,
175,
25,
21,
1855,
16,
3724,
7,
1001,
16,
1301,
15,
207,
31,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I build a WPF application where I can drag and drop a user control between windows?
===
I'm building a simple Todo List application where I want to be able to have multiple lists floating around my desktop that I can label and manage tasks in.
The relevant UIElements in my app are:
Window1 (Window)
TodoList (User Control)
TodoStackCard (User Control)
Window1 looks like this:
<Window x:Class="TaskHole.App.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:t="clr-namespace:TaskHole.App.Controls"
xmlns:tcc="clr-namespace:TaskHole.CustomControls"
Title="Window1" Width="500" Height="500" Background="Transparent" WindowStyle="None" AllowsTransparency="True" >
<Canvas Name="maincanvas" Width="500" Height="500" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<ResizeGrip SizeChanged="ResizeGrip_SizeChanged" />
<t:TodoList Canvas.Top="0" Canvas.Left="0" MinWidth="30" Width="50" Height="500" x:Name="todoList" TaskHover="todoList_TaskHover" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
</Canvas>
</Window>
TodoList looks like this:
<UserControl x:Class="TaskHole.App.Controls.TodoList"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:t="clr-namespace:TaskHole.App.Controls"
xmlns:tcc="clr-namespace:TaskHole.CustomControls"
Background="Transparent">
<StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Stretch" MinWidth="1" Grid.Row="2" Height="Auto" AllowDrop="True">
<ItemsControl Name="todolist" ItemsSource="{Binding}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel Name="stackPanel" VerticalAlignment="Bottom">
</VirtualizingStackPanel>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<t:TodoStackCard x:Name="card" TaskHover="card_TaskHover" Orientation="Vertical" VerticalContentAlignment="Top" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</UserControl>
I have multiple instances of these windows, and I want to be able to drag any of the controls between the windows. I have tried using a Thumb control and, while this works, it only allows me to drag a control around the containing canvas.
How do I mimic the behaviour of, say, Windows Explorer, where I can drag a file outside of the application and onto another application, all the while seeing a ghosted representation of the file under the cursor.
Can I accomplish this purely in C# and WPF? If so/if not, how?
| 0 | [
2,
184,
107,
31,
1895,
21,
619,
7721,
3010,
113,
31,
92,
5501,
17,
2804,
21,
4155,
569,
128,
1936,
60,
800,
3726,
3726,
31,
22,
79,
353,
21,
1935,
20,
537,
968,
3010,
113,
31,
259,
20,
44,
777,
20,
57,
1886,
7227,
8319,
140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I clear the console in firebug from Javascript?
===
e.g., does this exist: console.clear()? | 0 | [
2,
184,
92,
31,
1207,
14,
8650,
19,
535,
16254,
37,
8247,
8741,
60,
800,
3726,
3726,
13,
62,
9,
263,
9,
15,
630,
48,
3182,
45,
8650,
9,
18600,
5,
6,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Performance Testing MSMQ Server
===
Has anyone done any sort of performance tests against MSMQ?
We have a solution in prod environment where errors are added to a MSMQ for distribution to databases or event monitors.
We need to test the capacity of this system but not sure how to start.
Anyone know any tools or have any tips? | 0 | [
2,
956,
4431,
4235,
79,
1251,
8128,
800,
3726,
3726,
63,
1276,
677,
186,
2058,
16,
956,
4894,
149,
4235,
79,
1251,
60,
95,
57,
21,
4295,
19,
895,
43,
2307,
113,
11908,
50,
905,
20,
21,
4235,
79,
1251,
26,
2523,
20,
6018,
18,
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... |
Open an ANSI file and Save a a Unicode file using Delphi
===
For some reason, lately the *.UDL files on many of my client systems are no longer compatible as they were once saved as ANSI files, which is no longer compatible with the expected UNICODE file format. The end result is an error dialog which states "the file is not a valid compound file".
What is the easiest way to programatically open these files and save as a unicode file? I know I can do this by opening each one in notepad and then saving as the same file but with the "unicode" selected in the encoding section of the save as dialog, but I need to do this in the program to cut down on support calls.
This problem is very easy to duplicate, just create a *.txt file in a directory, rename it to *.UDL, then edit it using the microsoft editor. Then open it in notepad and save as the file as an ANSI encoded file. Try to open the udl from the udl editor and it will tell you its corrupt. then save it (using notepad) as a Unicode encoded file and it will open again properly. | 0 | [
2,
368,
40,
40,
18,
49,
3893,
17,
2079,
21,
21,
28010,
3893,
568,
23030,
800,
3726,
3726,
26,
109,
1215,
15,
10434,
14,
1637,
9,
3192,
255,
6488,
27,
151,
16,
51,
6819,
1242,
50,
90,
1045,
14961,
28,
59,
46,
382,
4377,
28,
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... |
What happens first? .htaccess or php code?
===
If I use mod_rewrite to control all my 301 redirects, does this happen before my page is served? so if I also have a bunch of redirect rules in a php script that runs on my page, will the .htaccess kick in first? | 0 | [
2,
98,
5531,
64,
60,
13,
9,
9020,
20604,
54,
13,
26120,
1797,
60,
800,
3726,
3726,
100,
31,
275,
7226,
1,
99,
23716,
20,
569,
65,
51,
13,
18979,
302,
14706,
18,
15,
630,
48,
2384,
115,
51,
2478,
25,
423,
60,
86,
100,
31,
67,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Citrix - how to keep smartclient apps from re-downloading every time they are launched
===
Our company uses Citrix to remote into a terminal server for remote users to launch smart client apps within a virtual window on their machine.
The problem is that smartclient apps are being downloaded each time the user launches them eventhough the version on the remote citrix server has not change. This is due to the user's profile being purged each time they close their Citrix session.
Is there any way to avoid this and still continue to purge the user's profile? Not purging the profile leads to wasted space on the citrix servers and corrupt profile issues. | 0 | [
2,
5486,
17224,
13,
8,
184,
20,
643,
3978,
150,
18513,
38,
4865,
18,
37,
302,
8,
2968,
16866,
352,
85,
59,
50,
1601,
800,
3726,
3726,
318,
237,
2027,
5486,
17224,
20,
5388,
77,
21,
3855,
8128,
26,
5388,
3878,
20,
3394,
3978,
681... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I make a program start up automatically in OSX?
===
I have a little program that I want to make open automatically when my mac is started up.
Because this program accepts command line arguments, its not as simple as just going to System Prefs/Accounts/Login items and adding it there...
From google, I read that I can create a .profile file in my user's home folder, and that will execute whatever I put in it... So I have a .profile page in ~ like this:
-rw-r--r--@ 1 matt staff 27 27 Sep 13:36 .profile
That contains this...
/Applications/mousefix 3.5
But it doesn't execute on startup! If I enter "/Applications/mousefix 3.5" manually into the terminal, it does work.
Any ideas?
| 0 | [
2,
184,
92,
31,
233,
21,
625,
799,
71,
7499,
19,
13,
759,
396,
60,
800,
3726,
3726,
31,
57,
21,
265,
625,
30,
31,
259,
20,
233,
368,
7499,
76,
51,
1572,
25,
373,
71,
9,
185,
48,
625,
16548,
1202,
293,
10553,
15,
82,
52,
28... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Primary Key versus Unique Constraint
===
I'm currently designing a brand new database. In school, we alway's learned to put a primary key in each table.
I read a lot of articles/discussions/newsgroups posts saying that it's better to use unique constraint (aka unique index for some db) instead of PK.
What your point of view? | 0 | [
2,
1256,
1246,
5706,
2619,
28804,
800,
3726,
3726,
31,
22,
79,
871,
15026,
21,
2209,
78,
6018,
9,
19,
116,
15,
95,
493,
1443,
22,
18,
2691,
20,
442,
21,
1256,
1246,
19,
206,
859,
9,
31,
1302,
21,
865,
16,
3376,
118,
43,
20563,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best way to separate UI (designer/editor) logic from the Package framework (like Visual Studio Package)
===
I want to separate concerns here. Create and embed all the UI logic for the Custom XML designer, object model, validations etc in to a separate assembly. Then the Package framework should only register the designer information and ask for a UI Service and everything works magically.
This way I don't need to play with the Package framework (Visual Studio Package) assembly, when I need to modify the UI designer.
This question also applies to anything where you have to separate the UI logic from the Skeleton framework that loads it up, like a plugin.
I have several choices a ServiceProvider model, a plugin model or may be other.
Any samples, suggestions for patterns, links are welcome. | 0 | [
2,
98,
25,
14,
246,
161,
20,
1725,
13,
5661,
13,
5,
19862,
106,
118,
13401,
6,
7085,
37,
14,
6030,
6596,
13,
5,
1403,
3458,
1120,
6030,
6,
800,
3726,
3726,
31,
259,
20,
1725,
4823,
235,
9,
1600,
17,
11911,
69,
65,
14,
13,
56... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Selecting Office 2003/2007 COM Object (Correct One) in Winforms Application
===
We are creating a Windows Form application (C# or VB.NET) that needs to reference an Office 2003 or Office 2007 COM object, depending on the version of office installed. What is the best way to handle this scenario and reference the correct COM object at runtime? | 0 | [
2,
20764,
488,
973,
118,
2727,
13,
960,
3095,
13,
5,
25345,
53,
6,
19,
628,
4190,
18,
3010,
800,
3726,
3726,
95,
50,
2936,
21,
1936,
505,
3010,
13,
5,
150,
5910,
54,
13,
20468,
9,
2328,
6,
30,
2274,
20,
2801,
40,
488,
973,
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... |
SQL Server Reporting Services - Is There a Way to Configure Subscription So That It Attaches Excel Sheet Only If It Is Not Empty?
===
I was wondering if it is possible to not attach Excel sheet if it is empty, and maybe write a different comment in the email if empty.
When I go to report delivery options, there's no such configuration. | 0 | [
2,
4444,
255,
8128,
6670,
687,
13,
8,
25,
80,
21,
161,
20,
1065,
15951,
14213,
86,
30,
32,
23453,
18,
20700,
6125,
104,
100,
32,
25,
52,
2424,
60,
800,
3726,
3726,
31,
23,
5712,
100,
32,
25,
938,
20,
52,
19514,
20700,
6125,
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... |
IE7 form not prompted for remember password when submitted through javascript
===
I have a website where we use Javascript to submit the login form. On Firefox it prompts the user to remember their password, when they login, but on IE7 it doesn't.
After doing some research it looks like the user is only prompted in IE7 when the form is submitted via a Submit control. I've created some sample html to prove this is the case.
<html>
<head>
<title>test autocomplete</title>
<script type="text/javascript">
function submitForm()
{
return document.forms[0].submit();
}
</script>
</head>
<body>
<form method="GET" action="test_autocomplete.html">
<input type="text" id="username" name="username">
<br>
<input type="password" id="password" name="password"/>
<br>
<a href="javascript:submitForm();">Submit</a>
<br>
<input type="submit"/>
</form>
</body>
</html>
The href link doesn't get the prompt but the submit button will in IE7. Both work in Firefox.
I can't get the style of my site to look the same with a submit button, Does anyone know how to get the remember password prompt to show up when submitting via Javascript? | 0 | [
2,
13,
660,
465,
505,
52,
9491,
26,
1518,
20884,
76,
7368,
120,
8247,
8741,
800,
3726,
3726,
31,
57,
21,
2271,
113,
95,
275,
8247,
8741,
20,
12298,
14,
6738,
108,
505,
9,
27,
535,
18219,
32,
11443,
13531,
14,
4155,
20,
1518,
66,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Logging in Linux
===
So I have a daemon running on a linux system, and I want to have a record of it's activities: a log. The question is, what is the "best" way to accomplish this?
My first idea is to simply open a file and write to it.
FILE* log = fopen("logfile.log", "w");
/* daemon works...needs to write to log */
fprintf(log, "foo%s\n", (char*)bar);
/* ...all done, close the file */
fclose(log);
Is there anything inherently wrong with logging this way? Is there a better way such as some framework built into linux? | 0 | [
2,
13,
13919,
19,
13024,
800,
3726,
3726,
86,
31,
57,
21,
13127,
946,
27,
21,
13024,
329,
15,
17,
31,
259,
20,
57,
21,
571,
16,
32,
22,
18,
1648,
45,
21,
6738,
9,
14,
1301,
25,
15,
98,
25,
14,
13,
7,
4936,
7,
161,
20,
14... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Search file in using complex pattern
===
I am looking for a C# library for getting files or directory from a directory using a complex pattern like the one used in Ant:
- `dir1/dir2/**/SVN/*` --> Matches all files in SVN directories that are located anywhere in the directory tree under dir1/dir2
- `**/test/**` --> Matches all files that have a test element in their path, including test as a filename.
- ...
Do I need to code it myself? extract what I want from NAnt? Or this library exists and my google skill sucks.
`Directory.GetFiles(String path, String searchPattern)` doesn't handle directory pattern and [NDepend.Helpers.FileDirectoryPath][1] neither (it's a great library for path manipulation by the way)
[1]: http://www.codeplex.com/FileDirectoryPath | 0 | [
2,
2122,
3893,
19,
568,
1502,
3732,
800,
3726,
3726,
31,
589,
699,
26,
21,
272,
5910,
1248,
26,
1017,
6488,
54,
16755,
37,
21,
16755,
568,
21,
1502,
3732,
101,
14,
53,
147,
19,
40,
38,
45,
13,
8,
13,
1,
9035,
8197,
9035,
9298,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 obtain longitude and latitude for a street address programmatically (and legally)
===
Supposedly, it is possible to get this from Google Maps or some such service. (US addresses only is not good enough.) | 0 | [
2,
184,
20,
5545,
22291,
17,
16337,
26,
21,
446,
3218,
625,
6732,
1326,
13,
5,
290,
10524,
6,
800,
3726,
3726,
11731,
15,
32,
25,
938,
20,
164,
48,
37,
8144,
6867,
54,
109,
145,
365,
9,
13,
5,
267,
12636,
104,
25,
52,
254,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Training path to become an expert in Adobe Flash and ActionScript
===
I would like to become skilled developing applications in Flash. What is more, I would like to grasp a better understanding (doing instead of only reading) of the Flash ecosystem and their real potential to apply that knowledge in my own projects.
Which resources (books, tutorials, exercises, etc) do you recommend to learn in depth Flash and ActionScript?
Thank you.
| 0 | [
2,
838,
2013,
20,
533,
40,
5390,
19,
20299,
4433,
17,
1028,
8741,
800,
3726,
3726,
31,
83,
101,
20,
533,
11315,
3561,
3767,
19,
4433,
9,
98,
25,
91,
15,
31,
83,
101,
20,
10677,
21,
574,
3260,
13,
5,
537,
68,
700,
16,
104,
18... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Programatically Parse a PDF File
===
I have a PDF file, which contains data that we need to import into a database. The files seem to be pdf scans of printed alphanumeric text. Looks like 10 pt. Times New Roman.
Are there any tools or components that can will allow me to parse this text? Any advise is appreciated. Thanks. | 0 | [
2,
625,
721,
8438,
2017,
870,
21,
13,
11124,
3893,
800,
3726,
3726,
31,
57,
21,
13,
11124,
3893,
15,
56,
1588,
1054,
30,
95,
376,
20,
9010,
77,
21,
6018,
9,
14,
6488,
2260,
20,
44,
13,
11124,
8313,
18,
16,
5317,
5705,
6336,
14... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Inject data members to an object
===
This question is based on [another question of mine](http://stackoverflow.com/questions/150514/custom-method-in-model-to-return-an-object)(thankfully answered).
So if in a model I have this:
def self.find_extended
person = Person.find(:first)
complete_name = person.firstname + ', ' + person.lastname
return person
end
How can I inject complete name in the person object so in my controller/view I can access it by person.complete_name?
Thank you for your time,
Silviu
| 0 | [
2,
20316,
1054,
443,
20,
40,
3095,
800,
3726,
3726,
48,
1301,
25,
432,
27,
636,
14945,
1301,
16,
1114,
500,
5,
21127,
6903,
25325,
2549,
9990,
9,
960,
118,
24652,
18,
118,
9839,
4246,
12918,
4636,
6015,
8,
5909,
1807,
43,
8,
108,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
c# network login
===
How do I perform a network login, to access a shared driver for instance, programmatically in c#? The same can be achieved by either attempting to open a share through the explorer, or by the net use shell command. | 0 | [
2,
272,
5910,
982,
6738,
108,
800,
3726,
3726,
184,
107,
31,
2985,
21,
982,
6738,
108,
15,
20,
1381,
21,
2592,
2425,
26,
4851,
15,
625,
6732,
1326,
19,
272,
5910,
60,
14,
205,
92,
44,
3153,
34,
694,
6314,
20,
368,
21,
1891,
12... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... |
How to use JQuery UI datepicker with dbiFrame on IE 6
===
I am trying to use the JQuery UI datepicker (latest stable version 1.5.2) on an IE6 website. But I am having the usual problems with combo boxes (selects) on IE6 where they float above other controls. I have tried adding the bgIframe plugin after declaring the datepicker with no luck.
My guess is that the .ui-datepicker-div to which I am attaching the bgIframe doesn't exist until the calendar is shown.
I am wondering if I can put the .bgIframe() command directly into the datepicker .js file and if so, where? (the similar control by kelvin Luck uses this approach)
Current code
$(".DateItem").datepicker({
showOn:"button",
... etc ...
});
$(".ui-datepicker-div").bgIframe();
| 0 | [
2,
184,
20,
275,
487,
8190,
93,
13,
5661,
1231,
16855,
106,
29,
13,
43,
2161,
8361,
27,
13,
660,
400,
800,
3726,
3726,
31,
589,
749,
20,
275,
14,
487,
8190,
93,
13,
5661,
1231,
16855,
106,
13,
5,
6554,
384,
4521,
615,
137,
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... |
ReportViewer Division by zero
===
I have some formulas in my reports, and to prevent divsion by zero I do like this in the expression field:
=IIF(Fields!F1.Value <> 0, Fields!F2.Value/Fields!F1.Value, 0)
This normally works fine, but when both F1 and F2 are zero, I get "#Error" in the report, and I get this warning: "The Value expression for the textbox ‘textbox196’ contains an error: Attempted to divide by zero."
Why is that? | 0 | [
2,
1330,
4725,
106,
460,
34,
4606,
800,
3726,
3726,
31,
57,
109,
3729,
18,
19,
51,
2813,
15,
17,
20,
2501,
13,
12916,
5991,
34,
4606,
31,
107,
101,
48,
19,
14,
1803,
575,
45,
800,
49,
821,
5,
1109,
18,
187,
410,
165,
9,
1516... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
JBoss alternatives
===
As a .NET developer I'm asking whether JBoss alternatives exist to be "more suitable for .NET development" as an enterprise application platform.
Please do not make any suggestions, such as "make JBoss to expose WebServices"...
Thanks. | 0 | [
2,
487,
10349,
18,
2676,
18,
800,
3726,
3726,
28,
21,
13,
9,
2328,
10058,
31,
22,
79,
3379,
1472,
487,
10349,
18,
2676,
18,
3182,
20,
44,
13,
7,
1995,
6445,
26,
13,
9,
2328,
522,
7,
28,
40,
6002,
3010,
2452,
9,
2247,
107,
52... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Book to Study Integration Patterns
===
I recently finished a book and discussion group about Software Design Patterns.
We have now started to study Integration Patterns.
I am currently reading the free [Microsoft Integration Patterns PDF][1].
It is pretty good thus far, but it is old and I figured that there might be a better option available.
Any recommendations for books, blogs, websites?
[1]: http://msdn.microsoft.com/en-us/library/ms978729.aspx | 0 | [
2,
246,
360,
20,
949,
8078,
6282,
800,
3726,
3726,
31,
1989,
842,
21,
360,
17,
5460,
214,
88,
2306,
704,
6282,
9,
95,
57,
130,
373,
20,
949,
8078,
6282,
9,
31,
589,
871,
1876,
14,
551,
636,
22019,
12980,
8078,
6282,
13,
11124,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 books/websites would you recommend to get startet with game development?
===
What books would you recommend to dive into the world of game-development?<br>
at best no programming-language specific stuff...more about the basics(KI, Basic Code Design).
Thanks for your answers! | 4 | [
2,
98,
964,
118,
14113,
18,
6359,
83,
42,
12360,
20,
164,
799,
1198,
29,
250,
522,
60,
800,
3726,
3726,
98,
964,
83,
42,
12360,
20,
8523,
77,
14,
126,
16,
250,
8,
26119,
60,
1,
5145,
1,
35,
246,
90,
3143,
8,
7020,
1903,
3217... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it possible to make git svn dcommit result in a single svn commit?
===
According to [the manual](http://www.kernel.org/pub/software/scm/git/docs/git-svn.html), dcommit “will create a revision in SVN for each commit in git.” But is there a way to avoid multiple commits? | 0 | [
2,
25,
32,
938,
20,
233,
13,
10404,
13,
18,
16578,
13,
43,
960,
5130,
829,
19,
21,
345,
13,
18,
16578,
9686,
60,
800,
3726,
3726,
496,
20,
636,
124,
5132,
500,
5,
21127,
6903,
6483,
9,
2429,
7440,
9,
5583,
118,
17848,
118,
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... |
In PowerShell, how can I determine the root of a drive (supposing it's a networked drive)
===
In PowerShell, even if it's possible to know if a drive is a network drive: see <http://stackoverflow.com/questions/158359/in-powershell-how-can-i-determine-if-the-current-drive-is-a-networked-drive-or>
When I try to get the "root" of the drive, I get back the drive letter.
The setup:
MS-Dos "net use" shows that H: is really a mapped network drive:
New connections will be remembered.
Status Local Remote Network
-------------------------------------------------------------------------------
OK H: \\spma1fp1\JARAVJ$ Microsoft Windows Network
The command completed successfully.
Get-PSDrive tells us that the Root is H:
PS:24 H:\temp
>get-psdrive h
Name Provider Root CurrentLocation
---- -------- ---- ---------------
H FileSystem H:\ temp
and using system.io.driveinfo does not give us a complete answer:
PS:13 H:\
>$x = new-object system.io.driveinfo("h:\")
PS:14 H:\
>$x.DriveType
Network
PS:15 H:\
>$x.RootDirectory
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 29/09/2008 16:45 h:\
Any idea of how to get that info?
Thanks | 0 | [
2,
19,
414,
15984,
15,
184,
92,
31,
3746,
14,
5900,
16,
21,
1493,
13,
5,
18,
576,
14717,
32,
22,
18,
21,
982,
69,
1493,
6,
800,
3726,
3726,
19,
414,
15984,
15,
166,
100,
32,
22,
18,
938,
20,
143,
100,
21,
1493,
25,
21,
982... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 easy way to implement LINQ to object with a DataContext?
===
I have a working LINQ to SQL model. I want to be able to use the same model but with a connection to a DataSet object, instead of SQL Server.
I need to be able to query the model, modify fields, as well as do insert and delete operations. Is there an easy way to accomplish this?
I noticed [another question][1] mentions a similar scenario, but I'm not sure if this applies to my question.
[1]: http://stackoverflow.com/questions/142762/is-there-a-datacontext-in-linq-to-entities-not-linq-to-sql | 0 | [
2,
25,
80,
40,
2010,
161,
20,
8713,
6294,
1251,
20,
3095,
29,
21,
1054,
1126,
11969,
60,
800,
3726,
3726,
31,
57,
21,
638,
6294,
1251,
20,
4444,
255,
1061,
9,
31,
259,
20,
44,
777,
20,
275,
14,
205,
1061,
47,
29,
21,
2760,
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... |
Setting Focus on a Control within a ControlTemplate in WPF
===
In an application I'm working on, we have a bunch of custom controls with their ControlTemplates defined in Generic.xaml.
For instance, our custom textbox would look similar to this:
<Style TargetType="{x:Type controls:FieldTextBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:FieldTextBox}">
<Border BorderThickness="0" Margin="5">
<StackPanel ToolTip="{Binding Path=Field.HintText, RelativeSource={RelativeSource TemplatedParent}}">
<TextBlock Text="{Binding Path=Field.FieldLabel, RelativeSource={RelativeSource TemplatedParent}}"
HorizontalAlignment="Left"
/>
<TextBox Width="{Binding Path=Field.DisplayWidth, RelativeSource={RelativeSource TemplatedParent}}"
HorizontalAlignment="Left"
Text="{Binding Path=Field.Data.CurrentValue, RelativeSource={RelativeSource TemplatedParent}}"
IsEnabled="{Binding Path=Field.IsEnabled, RelativeSource={RelativeSource TemplatedParent}}"
ContextMenu="{Binding Source={StaticResource FieldContextMenu}}" >
<TextBox.Background>
<SolidColorBrush Color="{Binding Path=Field.CurrentBackgroundColor, RelativeSource={RelativeSource TemplatedParent}}"/>
</TextBox.Background>
</TextBox>
</StackPanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Focusable" Value="True" />
<Setter Property="IsTabStop" Value="False" />
</Style>
In our application, we need to be able to programatically set the focus on a particular control within the ControlTemplate.
Within our C# code, we can get to the particular "FieldTextBox" based on our data. Once we have the correct FieldTextBox, we need to be able to set the focus on the actual TextBox contained within the ControlTemplate.
The best solution I've come up with is to set a name on the primary control in each control template (in this case it's the TextBox), such as "FocusableControl."
My code (contained in the code-behind for the FieldTextBox) to then set focus on the control would be:
Control control = (Control)this.Template.FindName("FocusableControl", this);
if (control != null)
{
control.Focus();
}
This solution works. However, does anyone else know of a solution that would be more efficient than this? | 0 | [
2,
2697,
1776,
27,
21,
569,
363,
21,
569,
9577,
6554,
19,
619,
7721,
800,
3726,
3726,
19,
40,
3010,
31,
22,
79,
638,
27,
15,
95,
57,
21,
7653,
16,
5816,
8671,
29,
66,
569,
9577,
6554,
18,
2811,
19,
12733,
9,
6791,
8184,
9,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
</br> not working in firefox and chrome
===
break line tag is not working in firefox, neither in chrome. When i see the source of my page i get:
<p>Zugang zu Testaccount:</br></br>peter petrelli </br></br>sein Standardpwd.</br></br>peter.heroes.com</p>
However when i do view selected source, i get:
<p>Zugang zu Testaccount: peter petrelli sein Standardpwd. peter.heroes.com</p>
It seems firefox is filtering break line tags out.
It works in IE7 fine.
| 0 | [
2,
13,
1,
118,
5145,
1,
52,
638,
19,
535,
18219,
17,
13,
12985,
800,
3726,
3726,
1442,
293,
3383,
25,
52,
638,
19,
535,
18219,
15,
3028,
19,
13,
12985,
9,
76,
31,
196,
14,
1267,
16,
51,
2478,
31,
164,
45,
13,
1,
306,
1,
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... |
Check parent and childs
===
Can you do a better code? I need to check/uncheck all childs according to parent and when an child is checked, check parent, when all childs are unchecked uncheck parent.
$(".parent").children("input").click(function() {
$(this).parent().siblings("input").attr("checked", this.checked);
});
$(".parent").siblings("input").click(function() {
if (this.checked) {
$(this).siblings("div").children("input").attr("checked", true);
return;
}
var childs = $(this).siblings("div").siblings("input");
for (i = 0; i < childs.length; i++) {
if ($(childs.get(i)).attr("checked"))
return;
}
$(this).parent().children("div").children("input").attr("checked", false);
});
| 0 | [
2,
2631,
4766,
17,
850,
18,
800,
3726,
3726,
92,
42,
107,
21,
574,
1797,
60,
31,
376,
20,
2631,
118,
1020,
12542,
65,
850,
18,
496,
20,
4766,
17,
76,
40,
850,
25,
6505,
15,
2631,
4766,
15,
76,
65,
850,
18,
50,
367,
12542,
69... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best way to store and use a large text-file in python
===
I'm creating a networked server for a boggle-clone I wrote in python, which accepts users, solves the boards, and scores the player input. The dictionary file I'm using is 1.8MB (the ENABLE2K dictionary), and I need it to be available to several game solver classes. Right now, I have it so that each class iterates through the file line-by-line and generates a hash table(associative array), but the more solver classes I instantiate, the more memory it takes up.
What I would like to do is import the dictionary file once and pass it to each solver instance as they need it. But what is the best way to do this? Should I import the dictionary in the global space, then access it in the solver class as globals()['dictionary']? Or should I import the dictionary then pass it as an argument to the class constructor? Is one of these better than the other? Is there a third option? | 0 | [
2,
246,
161,
20,
1718,
17,
275,
21,
370,
1854,
8,
16877,
19,
20059,
800,
3726,
3726,
31,
22,
79,
2936,
21,
982,
69,
8128,
26,
21,
6509,
4875,
8,
150,
16285,
31,
738,
19,
20059,
15,
56,
16548,
3878,
15,
8402,
18,
14,
8755,
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 street address at lat/long pair
===
I've seen that it's possible to get the latitude and longitude (geocoding, like in [Google Maps API](http://code.google.com/apis/maps/documentation/services.html#Geocoding)) from a street address, but is it possible to do the reverse and get the street address when you know what the lat/long already is?
The application would be an iPhone app (and why the app already knows lat/long), so anything from a web service to an iPhone API would work. | 0 | [
2,
164,
446,
3218,
35,
14303,
118,
2701,
2146,
800,
3726,
3726,
31,
22,
195,
541,
30,
32,
22,
18,
938,
20,
164,
14,
16337,
17,
22291,
13,
5,
834,
111,
15458,
15,
101,
19,
636,
16111,
4875,
6867,
21,
2159,
500,
5,
21127,
6903,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Tomcat 6: how to delete temporary files after a web method call has ended?
===
I have a temporary file with data that's returned as part of a SOAP response via a MTOM binary attachment. I would like to trash it as soon as the method call "ends" (i.e., finishes transferring). What's the best way for me to do this? The best way I can figure out how to do this is to delete them when the session is destroyed, but I'm not sure if there's a more 'immediate' way to do this.
FYI, I'm NOT using Axis, I'm using jax-ws.
| 0 | [
2,
2067,
5782,
9523,
184,
20,
27448,
4700,
6488,
75,
21,
2741,
2109,
645,
63,
1272,
60,
800,
3726,
3726,
31,
57,
21,
4700,
3893,
29,
1054,
30,
22,
18,
587,
28,
141,
16,
21,
6447,
1627,
1197,
21,
307,
6015,
14171,
14575,
9,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best practices: .NET: How to return PK against an oracle database?
===
With SQLServer, it seems to be generally accepted that adding a SELECT SCOPE_IDENTITY() to the end of your insert is the accepted best way to return the PK of the newly-inserted record, assuming you're using an auto-increment field for the pk.
However, I can't seem to find the equivalent for Oracle.
Best practice seems to be to use a sequence to generate the PK, but there are different options for how to implement even that - do you leave it up to the developer to insert sequence.nexval, or use a trigger?
In either case, getting the new ID back seems to be a common problem.
Suggestions and solutions I've run across include:
- creating a stored proc that returns the PK
- running a select id from seq.nextval, then passing that to the insert
- select max(id) after insert (Note: Don't do this!)
- add a RETURNING clause to the insert
What should the "best practice" solution be for this situation?
| 0 | [
2,
246,
5242,
45,
13,
9,
2328,
45,
184,
20,
788,
13,
17244,
149,
40,
15759,
6018,
60,
800,
3726,
3726,
29,
4444,
255,
10321,
106,
15,
32,
2206,
20,
44,
1469,
2217,
30,
4721,
21,
5407,
9914,
1,
13384,
856,
5,
6,
20,
14,
241,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Programmitically align a toolbar on top of the iPhone keyboard
===
In several cases I want to add a toolbar to the top of the iPhone keyboard (as in iPhone Safari when you're navigating form elements, for example).
Currently I am specifying the toolbar's rectangle with constants but because other elements of the interface are in flux - toolbars and nav bars at the top of the screen - every time we make a minor interface change, the toolbar goes out of alignment.
Is there a way to programmatically determine the position of the keyboard in relation to the current view? | 0 | [
2,
625,
5130,
8438,
23389,
21,
5607,
1850,
27,
371,
16,
14,
21024,
8896,
800,
3726,
3726,
19,
238,
1871,
31,
259,
20,
3547,
21,
5607,
1850,
20,
14,
371,
16,
14,
21024,
8896,
13,
5,
472,
19,
21024,
25055,
76,
42,
22,
99,
1775,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 rig Firebug 1.2 to behave the way previous versions did?
===
After waffling for months I've installed Firefox 3 on my development machine and am regretting it, because the new Firebug is sucking my will to live. Flakiness aside--it's not catching basic syntax errors--there's a whole new layer of UI all over everything, and it's making me THINK.
Please, can somebody tell me the series of choices I need to make to get Firebug to behave exactly the way it did--just show everything all the time, please, and quit bugging me to re-POST to get results in my Net tab--before I upgraded? | 0 | [
2,
184,
107,
31,
10960,
535,
16254,
137,
9,
135,
20,
14149,
14,
161,
1158,
3281,
144,
60,
800,
3726,
3726,
75,
619,
6752,
802,
26,
818,
31,
22,
195,
4066,
535,
18219,
203,
27,
51,
522,
1940,
17,
589,
6563,
1203,
32,
15,
185,
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... |
Synchronize DataSet
===
What is the best approach to synchronizing a DataSet with data in a database? Here are the parameters:
* We can't simply reload the data because it's bound to a UI control which a user may have configured (it's a tree grid that they may expand/collapse)
* We can't use a changeflag (like a UpdatedTimeStamp) in the database because changes don't always flow through the application (e.g. a DBA could update a field with a SQL statement)
* We cannot use an update trigger in the database because it's a multi-user system
* We are using ADO.NET DataSets
* Multiple fields can change of a given row
I've looked at the DataSet's Merge capability, but this doesn't seem to keep the notion of an "ID" column. I've looked at DiffGram capability but the issue here is those seem to be generated from changes within the same DataSet rather than changes that occured on some external data source.
I've been running from this solution for a while but the approach I know would work (with a lot of ineffeciency) is to build a separate DataSet and then iterate all rows applying changes, field by field, to the DataSet on which it is bound.
Has anyone had a similar scenario? What did you do to solve the problem? Even if you haven't run into a similar problem, any recommendation for a solution is appreciated.
Thanks | 0 | [
2,
13,
16023,
2952,
1054,
3554,
800,
3726,
3726,
98,
25,
14,
246,
2141,
20,
13,
16023,
3335,
21,
1054,
3554,
29,
1054,
19,
21,
6018,
60,
235,
50,
14,
12905,
45,
1637,
95,
92,
22,
38,
1659,
27339,
14,
1054,
185,
32,
22,
18,
413... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MainSoft Grasshopper, .Net to Java
===
I just stumbled upon MainSoft's [Grasshopper][1], which claims to cross-compile .Net ILM to Java bytecode. It seems to use the Mono implementation of the .Net libraries. All of the samples refer to web apps, but my requirement would be to cross-compile a .Net API (class library) to a Java API so that Java clients can use the API. Does anyone have any experience of using Grasshopper, and can you you see any problems with my plan?
[1]: http://dev.mainsoft.com/Default.aspx?tabid=130 | 0 | [
2,
407,
12980,
26024,
15,
13,
9,
2328,
20,
8247,
800,
3726,
3726,
31,
114,
10282,
685,
407,
12980,
22,
18,
636,
14992,
16700,
500,
2558,
165,
500,
15,
56,
2810,
20,
919,
8,
11103,
3599,
13,
9,
2328,
31,
10363,
20,
8247,
34,
591,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Marshal C++ "string" class in C# P/Invoke
===
I have a function in a native DLL defined as follows:
#include <string>
void SetPath(string path);
I tried to put this in Microsoft's P/Invoke Interop Assistant, but it chokes on the "string" class (which I think is from MFC?).
I have tried marshaling it as a variety of different types (C# String, char[], byte[]) but every time I either get a NotSupportedException or a Native Assembly Exception (depending on what marshaling I tried).
As anyone ever done Native/Managed Interop where the native string class is used? Is there any way to Marshal this? Am I going to have to write my own Marshaler?
| 0 | [
2,
7583,
272,
20512,
13,
7,
11130,
7,
718,
19,
272,
5910,
351,
118,
108,
2625,
1048,
800,
3726,
3726,
31,
57,
21,
1990,
19,
21,
1275,
13,
43,
211,
2811,
28,
2415,
45,
6926,
22640,
13,
1,
11130,
1,
11364,
309,
8353,
5,
11130,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.