unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
How to express this Bash command in pure Python
===
I have this line in a useful Bash script that I haven't managed to translate into Python, where 'a' is a user-input number of days' worth of files to archive:
find ~/podcasts/current -mindepth 2 -mtime '+`a`+' -exec mv {} ~/podcasts/old \;
I am familiar with the os.name and getpass.getuser for the most general cross-platform elements. I also have this function to generate a list of the full names of all the files in the equivalent of ~/podcasts/current:
def AllFiles(filepath, depth=1, flist=[]):
fpath=os.walk(filepath)
fpath=[item for item in fpath]
while depth < len(fpath):
for item in fpath[depth][-1]:
flist.append(fpath[depth][0]+os.sep+item)
depth+=1
return flist
First off, there must be a better way to do that, any suggestion welcome. Either way, for example, "AllFiles('/users/me/music/itunes/itunes music/podcasts')" gives the relevant list, on Windows. Presumably I should be able to go over this list and call os.stat(list\_member).st\_mtime and move all the stuff older than a certain number in days to the archive; I am a little stuck on that bit.
Of course, anything with the concision of the bash command would also be illuminating.
| 0 | [
2,
184,
20,
2999,
48,
13158,
1202,
19,
4267,
20059,
800,
3726,
3726,
31,
57,
48,
293,
19,
21,
4811,
13158,
3884,
30,
31,
2933,
22,
38,
1471,
20,
20628,
77,
20059,
15,
113,
13,
22,
58,
22,
25,
21,
4155,
8,
108,
4881,
234,
16,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
AJAX webservices - extensions of web or biz layer?
===
My question is possibly a subtle one:
Web services - are they extensions of the presentation/web layer? ..or are they extensions of the biz/data layer?
That may seem like a dumb question. *Web* services are an extension of the *web* tier. I'm not so sure though. I'm building a pretty standard webform with some AJAX-y features, and it seems to me I could build the web services in one of two ways:
1. they could retrieve data for me (biz/data layer extension).<br />
example: <code>GetUserData(userEmail)</code><br />
where the web form has javascript on it that knows how to consume the user data and make changes to markup
2. they could return completely rendered user controls (html; extension of web layer)<br />
example: <code>RenderUserProfileControl(userEmail)</code><br />
where the web form has simple/dumb js that only copies and pastes the web service html in to the form
I could see it working in either scenario, but I'm interested in different points of view... Thoughts? | 0 | [
2,
20624,
2741,
11449,
18,
13,
8,
17529,
16,
2741,
54,
1732,
380,
5385,
60,
800,
3726,
3726,
51,
1301,
25,
2879,
21,
11065,
53,
45,
2741,
687,
13,
8,
50,
59,
17529,
16,
14,
6364,
118,
14113,
5385,
60,
13,
9,
9,
248,
50,
59,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Encryption output always different even with same key
===
I'm trying to store a password in a file that I'd like to retrieve for later. Hashing is not an option as I need the password for connecting to a remote server for later.
The following code works well, but it creates a different output each time even though the key is the same. This is bad as when the application shuts down and restarts I won't be able to retrieve my password any more. How can I store passwords in a file and retrieve them later?
public class EncyptDecrypt {
static System.Security.Cryptography.TripleDESCryptoServiceProvider keyProv = new System.Security.Cryptography.TripleDESCryptoServiceProvider();
public static System.Security.Cryptography.TripleDESCryptoServiceProvider KeyProvider {
get {
keyProv.Key = new byte[] { 152, 134, 216, 239, 164, 150, 119, 103, 255, 229, 166, 215, 125, 130, 65, 42, 4, 48, 133, 250, 245, 169, 184, 233 };
return keyProv;
}
}
public static string Encrypt(string text, SymmetricAlgorithm key) {
if (text.Equals(string.Empty)) return text;
// Create a memory stream.
MemoryStream ms = new MemoryStream();
// Create a CryptoStream using the memory stream and the
// CSP DES key.
CryptoStream encStream = new CryptoStream(ms, key.CreateEncryptor(), CryptoStreamMode.Write);
// Create a StreamWriter to write a string
// to the stream.
StreamWriter sw = new StreamWriter(encStream);
// Write the plaintext to the stream.
sw.WriteLine(text);
// Close the StreamWriter and CryptoStream.
sw.Close();
encStream.Close();
// Get an array of bytes that represents
// the memory stream.
byte[] buffer = ms.ToArray();
// Close the memory stream.
ms.Close();
// Return the encrypted byte array.
return System.Convert.ToBase64String(buffer);
}
// Decrypt the byte array.
public static string Decrypt(string cypherText, SymmetricAlgorithm key) {
if (cypherText.Equals(string.Empty)) return cypherText;
string val;
try {
// Create a memory stream to the passed buffer.
MemoryStream ms = new MemoryStream(System.Convert.FromBase64String(cypherText));
// Create a CryptoStream using the memory stream and the
// CSP DES key.
CryptoStream encStream = new CryptoStream(ms, key.CreateDecryptor(), CryptoStreamMode.Read);
// Create a StreamReader for reading the stream.
StreamReader sr = new StreamReader(encStream);
// Read the stream as a string.
val = sr.ReadLine();
// Close the streams.
sr.Close();
encStream.Close();
ms.Close();
}
catch (System.Exception) {
return string.Empty;
}
return val;
}
} | 0 | [
2,
24420,
5196,
550,
421,
166,
29,
205,
1246,
800,
3726,
3726,
31,
22,
79,
749,
20,
1718,
21,
20884,
19,
21,
3893,
30,
31,
22,
43,
101,
20,
11917,
26,
138,
9,
19170,
68,
25,
52,
40,
4255,
28,
31,
376,
14,
20884,
26,
6440,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I get access to Castle Windsor's Fluent Interfaces API?
===
I've been having tons of problems getting the non-xml configuration for Castle Widnsor set up working properly. In the meantime I've seen more and more people giving advice via the Windsor Container fluent interface. I've been Gooogling about for the last day and I cannot find this API anywhere.
I am talking about the key .Register() method which seems to be an extension method to the IWindsorContainer object. It seems like it might be in the Castle.MicroKernel.Registration namespace, but I cannot find the corresponding library anywhere! | 0 | [
2,
184,
107,
31,
164,
1381,
20,
1339,
10784,
22,
18,
19252,
6573,
18,
21,
2159,
60,
800,
3726,
3726,
31,
22,
195,
74,
452,
5278,
16,
1716,
1017,
14,
538,
8,
396,
8184,
8091,
26,
1339,
4807,
43,
2172,
248,
309,
71,
638,
7428,
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... |
What is semantic markup, and why would I want to use that?
===
Like it says. | 0 | [
2,
98,
25,
17220,
943,
576,
15,
17,
483,
83,
31,
259,
20,
275,
30,
60,
800,
3726,
3726,
101,
32,
898,
9,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
What is the best signature for overloaded arithmetic operators in C++?
===
I had assumed that the canonical form for operator+, assuming the existence of an overloaded operator+= member function, was like this:
const T operator+(const T& lhs, const T& rhs)
{
T tmp(lhs);
return tmp+=rhs;
}
But it was pointed out to me that this would also work:
const T operator+ (T lhs, const T& rhs)
{
return lhs+=rhs;
}
In essence this, form transfers creation of the temporary from the body of the implementation to the function call.
It seems a little awkward to have different types for the two parameters, but is there anything wrong with the second form? Is there a reason to prefer on over the other?
| 0 | [
2,
98,
25,
14,
246,
7810,
26,
84,
22546,
21211,
9475,
19,
272,
20512,
60,
800,
3726,
3726,
31,
41,
3632,
30,
14,
5742,
4272,
505,
26,
6022,
2430,
15,
11704,
14,
3012,
16,
40,
84,
22546,
6022,
2430,
3726,
322,
1990,
15,
23,
101,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CSS to make a table column take up as much room as possible, and other cols as little
===
I need to layout a html datatable with CSS.
The actual content of the table can differ, but there is always one main column and 2 or more other columns. I'd like to make the main column take up as MUCH width as possible, regardless of its contents, while the other columns take up as little width as possible. I can't specify exact widths for any of the columns because their contents can change.
How can I do this using a simple semantically valid html table and css only?
For example:
<pre>
| Main column | Col 2 | Column 3 |
<------------------ fixed width in px ------------------->
<------- as wide as possible --------->
Thin as possible depending on contents: <-----> <-------->
</pre> | 0 | [
2,
272,
18,
18,
20,
233,
21,
859,
4698,
247,
71,
28,
212,
337,
28,
938,
15,
17,
89,
3313,
18,
28,
265,
800,
3726,
3726,
31,
376,
20,
9106,
21,
13,
15895,
1054,
5924,
29,
272,
18,
18,
9,
14,
3463,
2331,
16,
14,
859,
92,
113... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 so wrong about using GC.Collect()?
===
Although I do understand the serious implications of playing with this function (or at least that's what I think), I fail to see why it's becoming one of these things that respectable programmers wouldn't ever use, even those who don't even know what it is for.
Let's say I'm developing an application where memory usage varies extremely depending on what the user is doing. Let's say the application life cycle can be divided into two main stages: editing and real-time processing. During the editing stage, billions or even trillions of objects are created; some small and some not so small, some may have finalizers and some may not, and their lifetimes vary from a very few milliseconds to long hours. Next, the user decides to switch to the real-time stage. At this point, performance plays a fundamental role and the slightest alteration in the program's flow could bring catastrophic consequences. Object creation is reduced to a minimum using pools and whatnot but still, the GC could chime in unexpectedly and throw it all away. I mean, someone could die.
So that's the question: Even in scenarios like this, wouldn't it be 'wise' to call GC.Collect() before entering the second stage to minimize risks?
After all, these two stages never overlap in time with each other and the optimizations and statistics the GC could have gathered would be of little use there...
Thanks in advance :)
| 0 | [
2,
98,
22,
18,
86,
1389,
88,
568,
13,
10362,
9,
15015,
5,
6,
60,
800,
3726,
3726,
419,
31,
107,
1369,
14,
2055,
14747,
16,
791,
29,
48,
1990,
13,
5,
248,
35,
639,
30,
22,
18,
98,
31,
277,
6,
15,
31,
7476,
20,
196,
483,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What are the "must have" features for a XML based GUI language
===
Summary for the impatient:
What I want to know is what you want to have in a new gui language. About the short answers mentioning `$your_favorite_one`; I assume you mean that, such a language should look like `$your_favorite_one`. These are not helpful. Resist the temptation.
I'm thinking on the user friendliness of XML based languages such as XHTML (or HTML, although not XML they are very similar), XUL, MXML and others. I have some opinions about what features should such a language have;
1. The language should be "human writable" such that, an average developer should be able to code a good amount without constantly referring which tags have which properties, what is allowed inside what. XHTML/HTML is the best one in this regard.
2. There should be good collection of controls built-in for common tasks. XHTML/HTML just sucks here.
3. It should be able to be styled with css-like language (with respect to functionality). It should be easy to separate concerns about the structure and eye-candy. Layout algorithm of this combined whole should be simple and intuitive. Why the hell float removes the element from the layout? Why there is not a layout:not-included or something similar instead?
I know that I don't even mention very important design considerations like interaction with rendering engine and other general purpose languages, data binding, strict XML compliance (ability to define new tags? without namespaces?) but these are the points that I would like to ask what you consider important for such a language?
| 0 | [
2,
98,
50,
14,
13,
7,
3605,
38,
57,
7,
967,
26,
21,
23504,
432,
9457,
816,
800,
3726,
3726,
14740,
26,
14,
19764,
45,
98,
31,
259,
20,
143,
25,
98,
42,
259,
20,
57,
19,
21,
78,
9457,
816,
9,
88,
14,
502,
6709,
21215,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a way to convert indentation in Python code to braces?
===
I am a totally blind programmer who would like to learn Python. Unfortunately the fact that code blocks are represented with different levels of indentation is a major stumbling block. I was wondering if there were any tools available that would allow me to write code using braces or some other code block delimiter and then convert that format into a properly indented representation that the Python interpreter could use? | 0 | [
2,
25,
80,
21,
161,
20,
8406,
19,
817,
8593,
19,
20059,
1797,
20,
15646,
18,
60,
800,
3726,
3726,
31,
589,
21,
5139,
4631,
17968,
72,
83,
101,
20,
2484,
20059,
9,
6200,
14,
837,
30,
1797,
5198,
50,
1622,
29,
421,
2216,
16,
19,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 import a website into a Visual Sourcesafe 2005 Database
===
What is the best way to import a website into a Visual Sourcesafe 2005 database?
I tried opening a the VSS database and drag-n-drop the folder but it started prompting me for a comment on each folder. Is there a better way or someway to have it only ask onces for any files or folders that are being processed? | 0 | [
2,
246,
161,
20,
9010,
21,
2271,
77,
21,
3458,
1267,
18166,
812,
6018,
800,
3726,
3726,
98,
25,
14,
246,
161,
20,
9010,
21,
2271,
77,
21,
3458,
1267,
18166,
812,
6018,
60,
31,
794,
1214,
21,
14,
4611,
18,
6018,
17,
5501,
8,
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... |
Iron python, beautiful soup, win32 app
===
Does beautiful soup work with iron python?
If so with which version of iron python?
How easy is it to distribute a windows desktop app on .net 2.0 using iron python (mostly c# calling some python code for parsing html)? | 0 | [
2,
1751,
20059,
15,
1632,
11554,
15,
628,
3125,
4865,
800,
3726,
3726,
630,
1632,
11554,
170,
29,
1751,
20059,
60,
100,
86,
29,
56,
615,
16,
1751,
20059,
60,
184,
2010,
25,
32,
20,
14751,
21,
1936,
17404,
4865,
27,
13,
9,
2328,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I use Qt and SDL together?
===
I am building a physics simulation engine and editor in Windows. I want to build the editor part using Qt and I want to run the engine using SDL with OpenGL.
My first idea was to build the editor using only Qt and share as much code with the engine (the resource manager, the renderer, the maths). But, I would also like to be able to run the simulation inside the editor. This means I also have to share the simulation code which uses SDL threads.
So, my question is this: Is there a way to have an the render OpenGL to a Qt window by using SDL?
I have read on the web that it might be possible to supply SDL with a window handle in which to render. Anybody has experience dong that?
Also, the threaded part of the simulator might pose a problem since it uses SDL threads.
| 0 | [
2,
184,
107,
31,
275,
2593,
38,
17,
13,
18,
8643,
429,
60,
800,
3726,
3726,
31,
589,
353,
21,
4339,
10926,
1406,
17,
1835,
19,
1936,
9,
31,
259,
20,
1895,
14,
1835,
141,
568,
2593,
38,
17,
31,
259,
20,
485,
14,
1406,
568,
13... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What are some decent ways to prevent users from creating meeting workspaces?
===
I have an Events list in sharepoint and need to disallow users from having the ability to create meeting workspaces in the new event form. Shy of customizing the new event form (which breaks attachment support), how can this be done? | 0 | [
2,
98,
50,
109,
12238,
2847,
20,
2501,
3878,
37,
2936,
1235,
170,
5582,
18,
60,
800,
3726,
3726,
31,
57,
40,
963,
968,
19,
1891,
3132,
17,
376,
20,
1460,
17976,
3878,
37,
452,
14,
2165,
20,
1600,
1235,
170,
5582,
18,
19,
14,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I apply my CSS stylesheet to an RSS feed.
===
On my blog I use some CSS classes which are defined in my stylesheet, but in RSS readers those styles don't show up. I had been searching for <code>class="whatever"</code> and replacing with <code>style="something: something;"</code>. But this means whenever I modify my CSS I need to modify my RSS-generating code too, and it doesn't work for a tag which belongs to multiple classes (i.e. <code>class="snapshot accent"</code>). Is there any way to point to my stylesheet from my feed? | 0 | [
2,
184,
92,
31,
5645,
51,
272,
18,
18,
1034,
17627,
20,
40,
13,
1224,
18,
4063,
9,
800,
3726,
3726,
27,
51,
8146,
31,
275,
109,
272,
18,
18,
2684,
56,
50,
2811,
19,
51,
1034,
17627,
15,
47,
19,
13,
1224,
18,
7807,
273,
6443,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
GDI+: MeasureString() pads the text on the left and the right
===
I'm using GDI+ in C++. (This issue might exist in C# too).
I notice that whenever I call Graphics::MeasureString() or Graphics::DrawString(), the string is padded with blank space on the left and right.
For example, if I am using a Courier font, (not italic!) and I measure "P" I get 90, but "PP" gives me 150. I would expect a monospace font to give exactly double the width for "PP".
My question is: is this intended or documented behaviour, and how do I disable this?
RectF Rect(0,0,32767,32767);
RectF Bounds1, Bounds2;
graphics->MeasureString(L"PP", 1, font, Rect, &Bounds1);
graphics->MeasureString(L"PP", 2, font, Rect, &Bounds2);
margin = Bounds1.Width * 2 - Bounds2.Width;
| 0 | [
2,
489,
1115,
2430,
45,
4058,
11130,
5,
6,
4432,
18,
14,
1854,
27,
14,
225,
17,
14,
193,
800,
3726,
3726,
31,
22,
79,
568,
489,
1115,
2430,
19,
272,
20512,
9,
13,
5,
1565,
1513,
530,
3182,
19,
272,
5910,
266,
6,
9,
31,
3551,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Lazy Function Definition in PHP - is it possible?
===
In JavaScript, you can use [Lazy Function Definitions][1] to optimize the 2nd - Nth call to a function by performing the **expensive** one-time operations only on the first call to the function.
I'd like to do the same sort of thing in PHP 5, but redefining a function is not allowed, nor is overloading a function.
Effectively what I'd like to do is like the following, only optimized so the 2nd - Nth calls (say 25-100) don't need to re-check if they are the first call.
$called = false;
function foo($param_1){
global $called;
if($called == false){
doExpensiveStuff($param_1);
$called = true;
}
echo '<b>'.$param_1.'</b>';
}
PS I've thought about using an include_once() or require_once() as the first line in the function to execute the external code just once, but I've heard that these too are expensive.
Any Ideas? or is there a better way to tackle this?
[1]: http://peter.michaux.ca/article/3556 | 0 | [
2,
16792,
1990,
5465,
19,
13,
26120,
13,
8,
25,
32,
938,
60,
800,
3726,
3726,
19,
8247,
8741,
15,
42,
92,
275,
636,
531,
3327,
1990,
18544,
500,
2558,
165,
500,
20,
22864,
14,
172,
706,
13,
8,
13,
103,
96,
645,
20,
21,
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... |
Preferred way to do logging in the SpringFrame work
===
I have done some searches looking for information about how to do logging with the Spring Framework.
We currently have an application that has no logging in it except for system.out statements (very bad way).
What I would like to do, is add logging, but also want to be able to control the logging at run time, with say JMX.
We are using Rad 7.0 / WebSphere 6.1
I am interesting to find out what is the best way(s) to accomplish this (I figure there may be several).
| 0 | [
2,
5981,
161,
20,
107,
13,
13919,
19,
14,
1573,
8361,
170,
800,
3726,
3726,
31,
57,
677,
109,
19994,
699,
26,
676,
88,
184,
20,
107,
13,
13919,
29,
14,
1573,
6596,
9,
95,
871,
57,
40,
3010,
30,
63,
90,
13,
13919,
19,
32,
161... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 enable desktop access to PCs on a remote network
===
What is the best way to enable remote access (for desktop support purposes) to a network where there is a single server on a fixed IP and a number of Windows DHCP clients (all with internet access, but the clients are all using NAT for external access)
| 0 | [
2,
246,
161,
20,
9240,
17404,
1381,
20,
5168,
18,
27,
21,
5388,
982,
800,
3726,
3726,
98,
25,
14,
246,
161,
20,
9240,
5388,
1381,
13,
5,
1106,
17404,
555,
4612,
6,
20,
21,
982,
113,
80,
25,
21,
345,
8128,
27,
21,
3535,
15735,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Compile errors in mshtml.h compiling with VS2008.
===
I'm in the processor of moving one of our projects from VS6 to VS2008 and I've hit the following compile error with mshtml.h:
1>c:\program files\microsoft sdks\windows\v6.0a\include\mshtml.h(5272) : error C2143: syntax error : missing '}' before 'constant'
1>c:\program files\microsoft sdks\windows\v6.0a\include\mshtml.h(5275) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft sdks\windows\v6.0a\include\mshtml.h(5275) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\mshtml.h(28523) : error C2059: syntax error : '}'
1>c:\program files\microsoft sdks\windows\v6.0a\include\mshtml.h(28523) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft sdks\windows\v6.0a\include\mshtml.h(28523) : error C2059: syntax error : '}'
Following the first error statement drops into this part of the mshtml.h code, pointing at the "True = 1" line:
EXTERN_C const GUID CLSID_CDocument;
EXTERN_C const GUID CLSID_CScriptlet;
typedef
enum _BoolValue
{ True = 1,
False = 0,
BoolValue_Max = 2147483647L
} BoolValue;
EXTERN_C const GUID CLSID_CPluginSite;
It looks like someone on expert-sexchange also came across this error but I'd rather not dignify that site with a "7 day free trial".
Any suggestions would be most welcome.
| 0 | [
2,
26561,
11908,
19,
4235,
15895,
9,
252,
24378,
29,
4611,
2753,
9,
800,
3726,
3726,
31,
22,
79,
19,
14,
14762,
16,
1219,
53,
16,
318,
2314,
37,
4611,
379,
20,
4611,
2753,
17,
31,
22,
195,
770,
14,
249,
26561,
7019,
29,
4235,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Notepad++: disable auto-indent after empty lines
===
I find the autoindent style of Notepad++ a little weird: when I am typing on an indented line, I *do* want it to indent the next line after I press Enter (this it does properly). However, when I am on an empty line (no indentation, no characters) and I press Enter, it indents the next line, using the same indentation as the last non-empty line. I find this extremely annoying; have you ever encountered this problem and do you know how to fix it?
(Note: I'm editing HTML/PHP files.)
(Also, suggestions of other good free editors for HTML/PHP are welcome, in case there is no way of changing this behaviour.) | 0 | [
2,
1945,
8240,
20512,
45,
1460,
579,
3108,
8,
108,
817,
38,
75,
2424,
1560,
800,
3726,
3726,
31,
477,
14,
3108,
108,
817,
38,
1034,
16,
1945,
8240,
20512,
21,
265,
5455,
45,
76,
31,
589,
25266,
27,
40,
19,
817,
1427,
293,
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... |
GCC inline assembler, mixing register sizes (x86)
===
Does anyone know how I can get rid of the following assembler warning?
Code is x86, 32 bit:
int test (int x)
{
int y;
// do a bit-rotate by 8 on the lower word. leave upper word intact.
asm ("rorw $8, %0\n\t": "=q"(y) :"0"(x));
return y;
}
If I compile it I get the following (very valid) warning:
Warning: using `%ax' instead of `%eax' due to `w' suffix
What I'm looking for is a way to tell the compiler/assembler that I want to access the lower 16 bit sub-register of %0. Accessing the byte sub-registers (in this case AL and AH) would be nice to know as well.
I've already choosen the "q" modifier, so the compiler is forced to use EAX, EBX, ECX or EDX. I've made sure the compiler has to picks a register that has sub-registers.
I know that I can force the asm-code to use a specific register (and it's sub-registers), but I want to leave the register-allocation job up to the compiler.
| 0 | [
2,
489,
3384,
19,
1143,
13,
13736,
139,
15,
5826,
2243,
13403,
13,
5,
396,
3274,
6,
800,
3726,
3726,
630,
1276,
143,
184,
31,
92,
164,
6681,
16,
14,
249,
13,
13736,
139,
3590,
60,
1797,
25,
993,
3274,
15,
2512,
1142,
45,
19,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to count rows in Lift (Scala's web framework)
===
I want to add a property to my User model that returns the number of rows in the Project table that have a user Id of the user.
So something like this...
def numProjects = {
/* somehow get count from Project table
The straight sql would be:
SELECT COUNT(*) FROM projects WHERE userId = <the current user>
*/
} | 0 | [
2,
184,
20,
2468,
11295,
19,
5360,
13,
5,
18,
3430,
58,
22,
18,
2741,
6596,
6,
800,
3726,
3726,
31,
259,
20,
3547,
21,
1354,
20,
51,
4155,
1061,
30,
4815,
14,
234,
16,
11295,
19,
14,
669,
859,
30,
57,
21,
4155,
4924,
16,
14,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What's the best way to introduce non-majors to HTML / programming?
===
The following question has been eating at me for the last couple months. After witnessing the quality of the replies here, I'm hopeful that I'll get some great responses here.
I'm TAing a course in the ECE department entitled "[Exploring Digital Information Technology][1]", intended for non-majors to get their feet wet with the whole "how computers work" thing. Being a grad student in computer architecture, not only is my background in the subject matter much different from the students (many of them are freshmen with no computer experience beyond Word and YouTube), but my entire mode of thinking seems to be fundamentally different. I've had a large degree of success TAing more technical courses before, where the students didnt necessarily have any background in the exact material, but they were detail-oriented, technical-minded folks that grok'ed things like variables, arrays, indexing, indirection, functions, etc. I've had an *extroardinarily* difficult time with the first unit of the course, which essentially covers HTML, JavaScript, and the Internet (network topologies, IP addresses, etc.)
My questions to the SO community are many, but I'll start with a few:
- At the highest level, if you were trying to teach someone how to think like a programmer (break down human-level algorithms into simple steps that can be translated into functions, procedural statements, if-then-else statements, and loops), would HTML and JavaScript be your approach? This gives results that are relatable (e.g. a webpage that does useful things) more quickly than other approaches, but the separation and integration of HTML and JavaScript, and the whole "declarative HTML talking to procedural JavaScript" thing seems to be cramming in too many abstract concepts too soon.
- If you did want to teach HTML and JS to a *total* beginner (somebody who has difficulty thinking algorithmically), what resources would you use, what projects would you assign, etc.? I'm finding that even when I break down concepts like a `for` loop as far as I think I can, it's still a little much. Is there someplace out there that starts from first principles and can really help a true beginner grok why parentheses and semicolons are necessary, what arguments to a function are, etc?
I honestly have many more questions, but I think this is a good place to start. I'm looking forward to compiling your results into something that can be used not only for future iterations of this course, but also in my personal "tech evangelism" pursuits. I did read through the other "How to Teach a Beginner to Do X" questions on here, but they seem to be targeting an entirely different class of 'beginner': folks who are mathematically-minded and very interested in learning about programming, but don't know where to start. I feel like the answers for that group will be substantially different than for those with a different mindset, and perhaps less intrinsic motivation to learn.
[1]: http://courses.ece.uiuc.edu/ece101/FA08/index.asp | 0 | [
2,
98,
22,
18,
14,
246,
161,
20,
8500,
538,
8,
14071,
18,
20,
13,
15895,
13,
118,
3143,
60,
800,
3726,
3726,
14,
249,
1301,
63,
74,
5320,
35,
55,
26,
14,
236,
1335,
818,
9,
75,
6165,
68,
14,
2190,
16,
14,
16287,
235,
15,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a clean way to prevent windows.h from creating a near & far macro?
===
Deep down in WinDef.h there's this relic from the segmented memory era:
#define far
#define near
This obviously causes problems if you attempt to use near or near as variable names. Any clean workarounds? Other then renaming my variables? | 0 | [
2,
25,
80,
21,
2745,
161,
20,
2501,
1936,
9,
252,
37,
2936,
21,
424,
279,
463,
9069,
60,
800,
3726,
3726,
855,
125,
19,
1511,
6917,
9,
252,
80,
22,
18,
48,
24391,
37,
14,
5631,
69,
1912,
2047,
45,
6926,
546,
7509,
463,
6926,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 uninstall python from OSX Leopard so that I can use the MacPorts version?
===
I want to use the macports version of python instead of the one that comes with Leopard. | 0 | [
2,
184,
107,
31,
367,
108,
21300,
20059,
37,
13,
759,
396,
15446,
86,
30,
31,
92,
275,
14,
1572,
1993,
18,
615,
60,
800,
3726,
3726,
31,
259,
20,
275,
14,
1572,
1993,
18,
615,
16,
20059,
700,
16,
14,
53,
30,
1624,
29,
15446,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Multiple database corruption on SQL Server 2000 MSDE
===
We use SQL Server 2000 MSDE for an Point Of Sale system running on about 800 cash registers. Each box has its own copy, and only the local software accesses it.
This is a newly updated platform for the cash register vendor--who shall remain nameless.
Routinely we are seeing corruption of Master, MSDB, Model and the database used by the software.
I am looking for some piece of mind here more than anything and the confidence to utter that age old response: "It's not a software problem, it's a hardware problem".
My gut tells me that with this type of corruption a hardware problem is indicated. Can anyone suggest some alternatives to check out? | 0 | [
2,
1886,
6018,
7858,
27,
4444,
255,
8128,
824,
4235,
546,
800,
3726,
3726,
95,
275,
4444,
255,
8128,
824,
4235,
546,
26,
40,
454,
16,
3299,
329,
946,
27,
88,
7993,
3392,
2243,
18,
9,
206,
1649,
63,
82,
258,
4344,
15,
17,
104,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
gsub partial replace
===
I would like to replace only the group in parenthesis in this expression :
my_string.gsub(/<--MARKER_START-->(.)*<--MARKER_END-->/, 'replace_text')
so that I get : `<--MARKER_START-->replace_text<--MARKER_END-->`
I know I could repeat the whole `MARKER_START` and `MARKER_END` blocks in the substitution expression but I thought there should be a more simple way to do this. | 0 | [
2,
489,
7563,
7284,
3934,
800,
3726,
3726,
31,
83,
101,
20,
3934,
104,
14,
214,
19,
4766,
438,
4557,
19,
48,
1803,
13,
45,
51,
1,
11130,
9,
263,
7563,
5,
118,
1,
8,
8,
4527,
106,
1,
13680,
8,
8,
1,
5,
9,
6,
2483,
1,
8,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Start project in CodePlex
===
How can I start a project in CodePlex.com? | 0 | [
2,
799,
669,
19,
1797,
11326,
800,
3726,
3726,
184,
92,
31,
799,
21,
669,
19,
1797,
11326,
9,
960,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
ASP.NET MVC routing
===
Up until now I've been able to get away with using the default routing that came with ASP.NET MVC. Unfortunately, now that I'm branching out into more complex routes, I'm struggling to wrap my head around how to get this to work.
A simple example I'm trying to get is to have the path /User/{UserID}/Items to map to the User controller's Items function. Can anyone tell me what I'm doing wrong with my routing here?
routes.MapRoute("UserItems", "User/{UserID}/Items", new {controller = "User", action = "Items"});
And on my aspx page
Html.ActionLink("Items", "UserItems", new { UserID = 1 })
| 0 | [
2,
28,
306,
9,
2328,
307,
8990,
19880,
800,
3726,
3726,
71,
163,
130,
31,
22,
195,
74,
777,
20,
164,
229,
29,
568,
14,
12838,
19880,
30,
281,
29,
28,
306,
9,
2328,
307,
8990,
9,
6200,
15,
130,
30,
31,
22,
79,
1686,
68,
70,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
When to use a Class in VBA?
===
When is it appropriate to use a class in VBA?
I'm assuming the [accelerated development and reduction of introducing bugs][1] is a common benefit for most languages that support OOP. But with VBA, is there a specific criterion?
[1]: http://en.wikipedia.org/wiki/Class_(computer_science)#Reasons_for_using_classes | 0 | [
2,
76,
20,
275,
21,
718,
19,
566,
969,
60,
800,
3726,
3726,
76,
25,
32,
4593,
20,
275,
21,
718,
19,
566,
969,
60,
31,
22,
79,
11704,
14,
636,
1738,
19537,
7432,
522,
17,
5895,
16,
11442,
13925,
500,
2558,
165,
500,
25,
21,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to set sql profiler to profile SQL 2005 reporting services
===
I'm trying to profile SQL reporting services, used from ASP.NET application. In SQL profiler all the SQL run by ASP.NET shows up. It looks like the reporting SQL (from the RDL) doesn't show. Is there some setting or filter I'm missing? | 0 | [
2,
184,
20,
309,
4444,
255,
5296,
139,
20,
5296,
4444,
255,
812,
6670,
687,
800,
3726,
3726,
31,
22,
79,
749,
20,
5296,
4444,
255,
6670,
687,
15,
147,
37,
28,
306,
9,
2328,
3010,
9,
19,
4444,
255,
5296,
139,
65,
14,
4444,
255,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 effect of "__callback" SAL annotation?
===
While I certainly understand the purpose of buffer annotations, I can't see what kind of errors [__callback](http://msdn.microsoft.com/en-us/library/ms235402.aspx) detects.
| 0 | [
2,
98,
25,
1590,
16,
13,
7,
1,
9200,
1958,
7,
3263,
40,
1270,
857,
60,
800,
3726,
3726,
133,
31,
3850,
1369,
14,
2131,
16,
17497,
40,
1270,
7504,
15,
31,
92,
22,
38,
196,
98,
825,
16,
11908,
636,
1,
9200,
1958,
500,
5,
21127... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 an elegant way to force browsers to reload cached CSS/JS files?
===
I have noticed that some browsers (in particular, Firefox and Opera) are very zealous in using cached copies of .css and .js files, even between browser sessions. This leads to a problem when you update one of these files but the user's browser keeps on using the cached copy.
The question is: what is the most elegant way of forcing the user's browser to reload the file when it has changed?
Ideally the solution would not force the browser to reload the file on every visit to the page. I will post my own solution as an answer, but I am curious if anyone has a better solution and I'll let your votes decide. | 0 | [
2,
98,
25,
40,
11614,
161,
20,
558,
16495,
18,
20,
27339,
16522,
43,
272,
18,
18,
118,
728,
18,
6488,
60,
800,
3726,
3726,
31,
57,
2711,
30,
109,
16495,
18,
13,
5,
108,
1498,
15,
535,
18219,
17,
1877,
6,
50,
253,
22834,
1291,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 secure an AJAX app
===
I am currently working on the authentication of an AJAX based site, and was wondering if anybody had any reccomendations on best practices for this sort of thing.
My original approach was a cookie based system. Essentially I set a cookie with an auth code, and every data access changed the cookie. As well, whenever there was a failed authentication, all sessions by that user were de-authenticated, to keep hijackers out. To hijack a session, somebody would have to leave themselves logged in, and a hacker would need to have the very last cookie update sent to spoof a session.
Unfortunatley, due to the nature of AJAX, when making multiple requests quickly, they might come back out of order, setting the cookie wrong, and breaking the session, so I need to reimplement.
My ideas were:
- A decidedly less secure session based method
- using SSL over the whole site (seems like overkill)
- Using an iFrame which is ssl authenticated to do secure transactions (I just sorta assume this is possible, with a little bit of jquery hacking)
The issue is not the data being transferred, the only concern is that somebody might get control over an account that is not theirs.
A decidedly less secure session based method
| 0 | [
2,
246,
161,
20,
4315,
40,
20624,
4865,
800,
3726,
3726,
31,
589,
871,
638,
27,
14,
27963,
16,
40,
20624,
432,
689,
15,
17,
23,
5712,
100,
11181,
41,
186,
6042,
960,
2451,
7504,
27,
246,
5242,
26,
48,
2058,
16,
584,
9,
51,
501... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ETW - Best Fix/Class-Library for Messy Interface ?
===
By ETW I mean "Event Tracing for Windows".<p>
According to my experimenting one virtue is that while it occasionally fails to record events in busy conditions it otherwise Just Works, as you might expect from a Kernel feature. ETW is the only game in town if you want per-processor-buffering to avoid thrashing the cache for a multi-thread-logging session between cores, since as I understand it "Only the Kernel Knows" where your threads are really running at any given instant, especially if you don't assign affinity etc.<p>
Yet the interface is messy, and gets even worse if you consider the Microsoft-recommended approach relative to EventWrite().
What's the best available effort at streamlining the programmer's access to this powerful Kernel Subsystem ?
| 0 | [
2,
2133,
499,
13,
8,
246,
6098,
118,
1898,
8,
1210,
2559,
622,
26,
21503,
6573,
13,
60,
800,
3726,
3726,
34,
2133,
499,
31,
884,
13,
7,
4943,
38,
20005,
26,
1936,
7,
9,
1,
306,
1,
496,
20,
51,
5737,
68,
53,
10128,
25,
30,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ASP.NET MVC & Web Services
===
Is adding a Web Service to my ASP.NET MVC project breaks the whole concept of MVC?
That Web Service (WCF) depends on the Model layer from my MVC project to communicate with the back-end (so it looks to me like it needs to be part of the MVC solution).
Should I add this to the Controller or Model layer? | 0 | [
2,
28,
306,
9,
2328,
307,
8990,
279,
2741,
687,
800,
3726,
3726,
25,
4721,
21,
2741,
365,
20,
51,
28,
306,
9,
2328,
307,
8990,
669,
7947,
14,
979,
2420,
16,
307,
8990,
60,
30,
2741,
365,
13,
5,
499,
8940,
6,
9597,
27,
14,
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... |
Know of an OCAML IDE?
===
Know of an OCAML/CAML IDE? Especially one that runs on Linux? | 0 | [
2,
143,
16,
40,
13,
14977,
8184,
13,
3448,
60,
800,
3726,
3726,
143,
16,
40,
13,
14977,
8184,
118,
8760,
255,
13,
3448,
60,
1118,
53,
30,
1461,
27,
13024,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Best C/C++ Network Library
===
I haven't done work in C/C++ for a little bit and was just wondering what people's favorite cross platform libraries are to use.
I'm looking for something that is a good quick and dirty library as well as a library that is a little more robust. Often those are two different libraries and that's okay. | 4 | [
2,
246,
272,
118,
150,
20512,
982,
1248,
800,
3726,
3726,
31,
2933,
22,
38,
677,
170,
19,
272,
118,
150,
20512,
26,
21,
265,
1142,
17,
23,
114,
5712,
98,
148,
22,
18,
3839,
919,
2452,
8649,
50,
20,
275,
9,
31,
22,
79,
699,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Architecture for a business objects / database access layer
===
For various reasons, we are writing a new business objects/data storage library. One of the requirements of this layer is to separate the logic of the business rules, and the actual data storage layer.
It is possible to have multiple data storage layers that implement access to the same object - for example, a main "database" data storage source that implements most objects, and another "ldap" source that implements a User object. In this scenario, User can optionally come from an LDAP source, perhaps with slightly different functionality (eg, not possible to save/update the User object), but otherwise it is used by the application the same way. Another data storage type might be a web service, or an external database.
There are two main ways we are looking at implementing this, and me and a co-worker disagree on a fundamental level which is correct. I'd like some advice on which one is the best to use. I'll try to keep my descriptions of each as neutral as possible, as I'm looking for some objective view points here.
* Business objects are base classes, and data storage objects inherit business objects. Client code deals with data storage objects.
In this case, common business rules are inherited by each data storage object, and it is the data storage objects that are directly used by the client code.
This has the implication that client code determines which data storage method to use for a given object, because it has to explicitly declare an instance to that type of object. Client code needs to explicitly know connection information for each data storage type it is using.
If a data storage layer implements different functionality for a given object, client code explicitly knows about it at compile time because the object looks different. If the data storage method is changed, client code has to be updated.
* Business objects encapsulate data storage objects.
In this case, business objects are directly used by client application. Client application passes along base connection information to business layer. Decision about which data storage method a given object uses is made by business object code. Connection information would be a chunk of data taken from a config file (client app does not really know/care about details of it), which may be a single connection string for a database, or several pieces connection strings for various data storage types. Additional data storage connection types could also be read from another spot - eg, a configuration table in a database that specifies URLs to various web services.
The benefit here is that if a new data storage method is added to an existing object, a configuration setting can be set at runtime to determine which method to use, and it is completely transparent to the client applications. Client apps do not need to be modified if data storage method for a given object changes.
* Business objects are base classes, data source objects inherit from business objects. Client code deals primarily with base classes.
This is similar to the first method, but client code declares variables of the base business object types, and Load()/Create()/etc static methods on the business objects return the appropriate data source-typed objects.
The architecture of this solution is similar to the first method, but the main difference is the decision about which data storage object to use for a given business object is made by the business layer, not the client code.
I know there are already existing ORM libraries that provide some of this functionality, but please discount those for now (there is the possibility that a data storage layer is implemented with one of these ORM libraries) - also note I'm deliberately not telling you what language is being used here, other than that it is strongly typed.
I'm looking for some general advice here on which method is better to use (or feel free to suggest something else), and why.
| 0 | [
2,
2607,
26,
21,
508,
3916,
13,
118,
6018,
1381,
5385,
800,
3726,
3726,
26,
617,
2932,
15,
95,
50,
1174,
21,
78,
508,
3916,
118,
18768,
4326,
1248,
9,
53,
16,
14,
4786,
16,
48,
5385,
25,
20,
1725,
14,
7085,
16,
14,
508,
1761,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can you program if you're blind?
===
Sight is one of the senses a programmer take for granted. Most programmers would spend hours looking at a computer monitor (especially during times when they are *in the zone*).
I know there are blind programmers who can program (such as T.V. Raman who currently works for google).
If you were a blind person (or slowly becoming blind), how would you set up your development environment to assist you in programming?
(One suggestion per answer please. The purpose of this question is to bring the good ideas to the top. In addition, screen readers can read the good ideas earlier) | 2 | [
2,
184,
92,
42,
625,
100,
42,
22,
99,
4631,
60,
800,
3726,
3726,
2064,
25,
53,
16,
14,
11060,
21,
17968,
247,
26,
2743,
9,
127,
17968,
18,
83,
3256,
974,
699,
35,
21,
1428,
7626,
13,
5,
12183,
112,
436,
76,
59,
50,
1637,
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... |
What are the print functions in Adobe AIR ?
===
I've been trying to figure out how to print in Adobe AIR. I know the standard javascript functions don't work. The AIRforJSDev guide says:
"The window.print() method is not supported within Adobe
AIR 1.0. There are other methods available via the exposed AIRAPIs that give you access to printing within the runtime"
But I can't find those functions. I've looked in the language reference but can't find them there anywhere. Where are they and what are they ? | 0 | [
2,
98,
50,
14,
4793,
3719,
19,
20299,
282,
13,
60,
800,
3726,
3726,
31,
22,
195,
74,
749,
20,
1465,
70,
184,
20,
4793,
19,
20299,
282,
9,
31,
143,
14,
1236,
8247,
8741,
3719,
221,
22,
38,
170,
9,
14,
282,
1106,
728,
18,
1443... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Connection to report server could not be made from BI VS 2005 but the report server is browseable
===
I have IIS6 configured such that browsing to http://localhost:8082/Reports<instance name> gets me the reporting services default home page, which is all as expected. However, when I try to publish a report via Microsoft Business Intelligence Visual Studio 2005 I get the following error: A connection could not be made to the report server http://localhost:8082/Reports<instance name> The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version.
I have windows authentication turned on for report server. Does that have anything to do with not being able to publish projects? | 0 | [
2,
2760,
20,
1330,
8128,
110,
52,
44,
117,
37,
1732,
4611,
812,
47,
14,
1330,
8128,
25,
10175,
62,
579,
800,
3726,
3726,
31,
57,
595,
18,
379,
28895,
145,
30,
10175,
68,
20,
7775,
6903,
15580,
11694,
45,
2887,
4075,
118,
17437,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What should I do with the vendor directory with respect to subversion?
===
So I have a problem. I checked in my frozen gems and rails even though you aren't supposed to do that. I figured it was easy and wouldn't be that big of a deal anyway. Well, later I updated rails and in doing so deleted all the .svn files in the vendor/rails directories. I have heard that what I really *should* do is just do something to do with svn:externals to my vendor directory. What exactly do I need to do and will capistrano still use my frozen gems if they aren't in my repo? If it will not use my frozen gems how can I regenerate those .svn files correctly, because this *will* happen again.
Thanks! | 0 | [
2,
98,
378,
31,
107,
29,
14,
23510,
16755,
29,
2873,
20,
972,
10898,
60,
800,
3726,
3726,
86,
31,
57,
21,
1448,
9,
31,
6505,
19,
51,
7203,
8551,
18,
17,
2240,
18,
166,
362,
42,
4847,
22,
38,
2293,
20,
107,
30,
9,
31,
5700,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can't connect to MySQL server on 'localhost' (10061)
===
![alt text][1]
I recently installed MySQL 5 on windows 2003 and tried configuring an instance. Everything worked fine until i got to "Applying Security settings", at which point it gave me the above error.
I do have a port 3306 exception in my firewall for 'MySQL Server'. Please help.
[1]: https://dl-web.getdropbox.com/get/error.gif?w=1d931ddc | 0 | [
2,
92,
22,
38,
6379,
20,
51,
18,
22402,
8128,
27,
13,
22,
15580,
11694,
22,
13,
5,
4031,
4821,
6,
800,
3726,
3726,
13,
187,
2558,
192,
38,
1854,
500,
2558,
165,
500,
31,
1989,
4066,
51,
18,
22402,
331,
27,
1936,
973,
17,
794,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Directory Layout for Erlang Services?
===
In our Java applications we typically use the maven conventions (docs, src/java, test, etc.). For Perl we follow similar conventions only using a top level 'lib' which is easy to add to Perl's @INC.
I'm about to embark on creating a service written in Erlang, what's a good source layout for Erlang applications? | 0 | [
2,
16755,
9106,
26,
13,
106,
9949,
687,
60,
800,
3726,
3726,
19,
318,
8247,
3767,
95,
2442,
275,
14,
1216,
3124,
15117,
13,
5,
13799,
18,
15,
13,
18,
5453,
118,
1004,
1385,
15,
1289,
15,
2722,
9,
6,
9,
26,
416,
255,
95,
1740,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 generically detect if a database is 'empty' from Java
===
Can anyone suggest a good way of detecting if a database is empty from Java (needs to support at least Microsoft SQL Server, Derby and Oracle)?
By empty I mean in the state it would be if the database were freshly created with a new create database statement, though the check need not be 100% perfect if covers 99% of cases.
My first thought was to do something like this...
tables = metadata.getTables(null, null, null, null);
Boolean isEmpty = !tables.next();
return isEmpty;
...but unfortunately that gives me a bunch of underlying system tables (at least in Microsoft SQL Server). | 0 | [
2,
184,
92,
31,
12733,
1326,
9092,
100,
21,
6018,
25,
13,
22,
26542,
22,
37,
8247,
800,
3726,
3726,
92,
1276,
5601,
21,
254,
161,
16,
9092,
68,
100,
21,
6018,
25,
2424,
37,
8247,
13,
5,
556,
69,
18,
20,
555,
35,
639,
7099,
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... |
When do you say that the code is Legacy code?
===
Any useful metrics will be fine | 0 | [
2,
76,
107,
42,
395,
30,
14,
1797,
25,
7780,
1797,
60,
800,
3726,
3726,
186,
4811,
11544,
18,
129,
44,
1123,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do I prevent SoapExtensions being added to my web service app?
===
It seems that anyone can snoop on incoming/outgoing web service SOAP messages just by dropping in a simple SoapExtension into the bin folder and then plumbing it in using:
<soapExtensionTypes>
<add type="MyLoggingSoapExtension, SoapLoggingTools" priority="0" group="High" />
<soapExtensionTypes>
Is there a way to prevent SOAP extensions from loading or to be asked in my app (through an event or some such mechanism) whether it's ok to load ?
| 0 | [
2,
184,
107,
31,
2501,
6447,
1706,
25573,
18,
142,
905,
20,
51,
2741,
365,
4865,
60,
800,
3726,
3726,
32,
2206,
30,
1276,
92,
22562,
27,
17126,
118,
1320,
13269,
2741,
365,
6447,
7561,
114,
34,
6780,
19,
21,
1935,
6447,
1706,
2557... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 set my application's desktop icon for Linux: KDE, Gnome etc?
===
I have a cross platform program that runs on Windows, Linux and Macintosh. My windows version has an Icon but I don't know how to make have one for my Linux build.
Is there a standard format for KDE, Gnome etc. or will I have to do something special for each one?
My app is in c++ and distributed as source so the end user will compile it with gcc.
If I can have the icon embedded directly inside my exe binary that would be the best.
| 0 | [
2,
184,
20,
309,
51,
3010,
22,
18,
17404,
9801,
26,
13024,
45,
680,
546,
15,
24117,
2722,
60,
800,
3726,
3726,
31,
57,
21,
919,
2452,
625,
30,
1461,
27,
1936,
15,
13024,
17,
24024,
9,
51,
1936,
615,
63,
40,
9801,
47,
31,
221,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Which I/O library do you use in your C++ code?
===
In new C++ code, I tend to use the C++ iostream library instead of the C stdio library.
I've noticed some programmers seem to stick to stdio, insisting that it's more portable.
Is this really the case? What do you use? | 0 | [
2,
56,
31,
118,
111,
1248,
107,
42,
275,
19,
154,
272,
20512,
1797,
60,
800,
3726,
3726,
19,
78,
272,
20512,
1797,
15,
31,
5480,
20,
275,
14,
272,
20512,
13,
1963,
11260,
1248,
700,
16,
14,
272,
354,
6921,
1248,
9,
31,
22,
195... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can you suggest something a little more advanced than java.util.Properties?
===
Do you know any libraries similar to java.util.Properties that support more advanced features like grouping properties, storing arrays, etc?
I am not looking for some heavy super-advanced solution, just something light and useful for any project.
Thanks. | 0 | [
2,
92,
42,
5601,
301,
21,
265,
91,
2255,
119,
8247,
9,
14255,
9,
10890,
106,
3915,
60,
800,
3726,
3726,
107,
42,
143,
186,
8649,
835,
20,
8247,
9,
14255,
9,
10890,
106,
3915,
30,
555,
91,
2255,
967,
101,
19288,
3704,
15,
25615,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a way to verify that code will work on the 360 while doing XNA dev?
===
I'm working on a casual game on XNA with the intention of deploying to the Xbox 360. I'm not going to have access to hardware for a few weeks and I'm on a tight deadline, so I'd like to test that a few things -- Boo and a few custom libraries -- will work properly on the 360. If they don't, I need to work around them sooner rather than later, so testing this is quite important.
With that explained, is there a way I can go into a 'simulator' of sorts to run code on the .NET Compact Framework for 360 before actually deploying to the 360? | 0 | [
2,
25,
80,
21,
161,
20,
21012,
30,
1797,
129,
170,
27,
14,
11760,
133,
845,
993,
325,
9664,
60,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
10093,
250,
27,
993,
325,
29,
14,
5140,
16,
17617,
68,
20,
14,
13800,
11760,
9,
31,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I generate a list of n unique random numbers in Ruby?
===
This is what I have so far:
myArray.map!{ rand(max) }
Obviously, however, sometimes the numbers in the list are not unique. How can I make sure my list only contains unique numbers without having to create a bigger list from which I then just pick the n unique numbers? | 0 | [
2,
184,
107,
31,
7920,
21,
968,
16,
13,
103,
2619,
5477,
2116,
19,
10811,
60,
800,
3726,
3726,
48,
25,
98,
31,
57,
86,
463,
45,
51,
8576,
93,
9,
15022,
187,
1,
11310,
5,
8304,
6,
13,
1,
4409,
15,
207,
15,
1030,
14,
2116,
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... |
Conditional compilation for working at home
===
I code C++ using MS Dev Studio and I work from home two days per week. I use CVS to keep my sources synchronized between the two computers but there are difference between the environments the machines are in.
Can anyone suggest a way I can conditionally modify constants in my code depending on whether I am compiling on my home box or not ?
What I am after is a way of defining a symbol, let's call it _ATHOME, automatically so I can do this:
#ifdef _ATHOME
# define TEST_FILES "E:\\Test"
# define TEST_SERVER "192.168.0.1"
#else
# define TEST_FILE "Z:\\Project\\Blah\\Test"
# define TEST_SERVER "212.45.68.43"
#endif
*NB: This is for development and debugging purposes of course, I would never release software with hard coded constants like this.* | 0 | [
2,
21206,
4868,
26,
638,
35,
213,
800,
3726,
3726,
31,
1797,
272,
20512,
568,
4235,
9664,
1120,
17,
31,
170,
37,
213,
81,
509,
416,
877,
9,
31,
275,
13,
12732,
18,
20,
643,
51,
2662,
27202,
128,
14,
81,
7774,
47,
80,
50,
2841,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Server Generated web screenshots?
===
One problem I've been toying with off and on is a service that requires my server to produce a screenshot of a webpage at a given url. The problem is that I don't have any idea how I would accomplish this. I mostly use a LAMP software stack, so answers that were given with that in mind would be the most helpful. Again the basic requirements are: Given a url, the server needs to produce an image file of the rendered web page at that url. Thanks in advance! | 0 | [
2,
8128,
6756,
2741,
2324,
7868,
18,
60,
800,
3726,
3726,
53,
1448,
31,
22,
195,
74,
20,
8173,
29,
168,
17,
27,
25,
21,
365,
30,
4781,
51,
8128,
20,
2213,
21,
2324,
7868,
16,
21,
2741,
6486,
35,
21,
504,
287,
6362,
9,
14,
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... |
How do you extract an RT_RCDATA section from a Win32 executable (preferably in C#)?
===
The only way I know how to do this currently is opening up the EXE in Visual Studio. I'd love to be able to do this entirely in C# if possible. Other options include:
<ul>
<li>P/Invoking LoadResource() from the Win32 API</li>
<li>Using an existing tool (anybody know one?)</li>
<li>Other ideas?</li>
</ul>
Thanks! | 0 | [
2,
184,
107,
42,
10962,
40,
13,
5256,
1,
5453,
18768,
1050,
37,
21,
628,
3125,
1396,
17194,
5924,
13,
5,
3515,
2407,
4801,
19,
272,
5910,
6,
60,
800,
3726,
3726,
14,
104,
161,
31,
143,
184,
20,
107,
48,
871,
25,
1214,
71,
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... |
Why does the 'sizeof' operator return a size larger for a structure than the total sizes of the stucture's members?
===
Why does the 'sizeof' operator return a size larger for a structure than the total sizes of the stucture's members? | 0 | [
2,
483,
630,
14,
13,
22,
10454,
1041,
22,
6022,
788,
21,
1072,
1662,
26,
21,
1411,
119,
14,
600,
13403,
16,
14,
354,
6335,
6418,
22,
18,
443,
60,
800,
3726,
3726,
483,
630,
14,
13,
22,
10454,
1041,
22,
6022,
788,
21,
1072,
166... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Vista not allowing one .exe to call another .exe
===
I have a legacy VB6 executable that runs on Vista. This executable shells out another legacy MFC C++ executable.
In our early Vista testing, this call would display the typical UAC message to get the user's permission before running the second executable. This wasn't perfect, but acceptable. However, it now looks like this call is being completely ignored by the OS.
What can I do to make this call work? | 0 | [
2,
13520,
52,
2719,
53,
13,
9,
1706,
62,
20,
645,
226,
13,
9,
1706,
62,
800,
3726,
3726,
31,
57,
21,
7780,
13,
20468,
379,
1396,
17194,
5924,
30,
1461,
27,
13520,
9,
48,
1396,
17194,
5924,
12529,
70,
226,
7780,
307,
7061,
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... |
Will it be faster to use several threads to update the same database?
===
I wrote a Java program to add and retrieve data from an MS Access. At present it goes sequentially through ~200K insert queries in ~3 minutes, which I think is slow. I plan to rewrite it using threads with 3-4 threads handling different parts of the hundred thousands records. I have a compound question:
- Will this help speed up the program because of the divided workload or would it be the same because the threads still have to access the database sequentially?
- What strategy do you think would speed up this process (except for query optimization which I already did in addition to using Java's preparedStatement) | 0 | [
2,
129,
32,
44,
4233,
20,
275,
238,
20396,
20,
11100,
14,
205,
6018,
60,
800,
3726,
3726,
31,
738,
21,
8247,
625,
20,
3547,
17,
11917,
1054,
37,
40,
4235,
1381,
9,
35,
734,
32,
1852,
1353,
5495,
10107,
102,
120,
13,
1,
4621,
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 is the difference between Events with Delegate Handlers and those without?
===
What is the difference between this:
this.btnOk.Click += new System.EventHandler(this.btnOK_Click);
and this?
this.btnOk.Click += this.btnOK_Click;
They both work. The former is what Visual Studio defaults to when you use the snippets. But it seems like it only ads extra verbiage, or am I missing something? | 0 | [
2,
98,
25,
14,
2841,
128,
963,
29,
11300,
24641,
18,
17,
273,
366,
60,
800,
3726,
3726,
98,
25,
14,
2841,
128,
48,
45,
48,
9,
220,
38,
251,
197,
9,
150,
10129,
2754,
3726,
78,
329,
9,
4943,
96,
290,
1252,
5,
1565,
9,
220,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Adding code to __init__.py
===
I'm taking a look at how the model system in django works and I noticed something that I don't understand.
I know that you create an empty `__init__.py` file to specify that the current directory is a package. And that you can set some variable in `__init__.py` so that import * works properly.
But django adds a bunch of from ... import ... statements and defines a bunch of classes in `__init__.py`. Why? Doesn't this just make things look messy? Is there a reason that requires this code in `__init__.py`? | 0 | [
2,
4721,
1797,
20,
13,
1,
108,
242,
1,
9,
6448,
800,
3726,
3726,
31,
22,
79,
741,
21,
361,
35,
184,
14,
1061,
329,
19,
3857,
14541,
693,
17,
31,
2711,
301,
30,
31,
221,
22,
38,
1369,
9,
31,
143,
30,
42,
1600,
40,
2424,
13,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What tools allows me to keep track of html tags when doing web development?
===
What tools allows me keep track of tags when doing web development? For example, I would like to be able to quickly find whether I missed closing a div tag.
At the moment I am using notepad++ to write html. It highlights starting and ending tags, but it can take me time to review almost all tags to find where I went wrong. | 0 | [
2,
98,
4672,
2965,
55,
20,
643,
792,
16,
13,
15895,
3383,
18,
76,
845,
2741,
522,
60,
800,
3726,
3726,
98,
4672,
2965,
55,
643,
792,
16,
3383,
18,
76,
845,
2741,
522,
60,
26,
823,
15,
31,
83,
101,
20,
44,
777,
20,
976,
477,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
The Rails Way - Namespaces
===
I have a question about how to do something "The Rails Way". With an application that has a public facing side and an admin interface what is the general consensus in the Rails community on how to do it?
Namespaces, subdomains or forego them altogether? | 0 | [
2,
14,
2240,
18,
161,
13,
8,
204,
5582,
18,
800,
3726,
3726,
31,
57,
21,
1301,
88,
184,
20,
107,
301,
13,
7,
124,
2240,
18,
161,
7,
9,
29,
40,
3010,
30,
63,
21,
317,
4325,
270,
17,
40,
21,
43,
2160,
6573,
98,
25,
14,
297... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 is good to switch from c# to python
===
currently iam developing in .Net environment using C# but i want to know is it worth learning python. Thinking of learning Django framework. What is better??? | 0 | [
2,
25,
25,
254,
20,
5521,
37,
272,
5910,
20,
20059,
800,
3726,
3726,
871,
31,
765,
3561,
19,
13,
9,
2328,
2307,
568,
272,
5910,
47,
31,
259,
20,
143,
25,
32,
2715,
2477,
20059,
9,
1440,
16,
2477,
3857,
14541,
6596,
9,
98,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Migrate clearcase to perforce
===
I have a large quantity of clearcase data which needs to be migrated into perforce. The revisions span the better part of a decade and I need to preserve as much branch and tag information as possible. Additionally we make extensive use of symbolic links, supported in clearcase but not in perforce. What advice or tools can you suggest which might make this easier? | 0 | [
2,
22985,
1207,
10325,
20,
416,
8774,
800,
3726,
3726,
31,
57,
21,
370,
12881,
16,
1207,
10325,
1054,
56,
2274,
20,
44,
14204,
77,
416,
8774,
9,
14,
11323,
18,
6289,
14,
574,
141,
16,
21,
3953,
17,
31,
376,
20,
6224,
28,
212,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 does 'yield called out of block' mean in Ruby?
===
I'm new to Ruby, and I'm trying the following:
mySet = numOfCuts.times.map{ rand(seqLength) }
but I get the 'yield called out of block' error. I'm not sure what his means. BTW, this question is part of a more general question I asked [here][1]
[1]: http://stackoverflow.com/questions/119107/how-do-i-generate-a-list-of-n-unique-random-numbers-in-ruby | 0 | [
2,
98,
630,
13,
22,
93,
8487,
43,
227,
70,
16,
1921,
22,
884,
19,
10811,
60,
800,
3726,
3726,
31,
22,
79,
78,
20,
10811,
15,
17,
31,
22,
79,
749,
14,
249,
45,
51,
3554,
800,
13,
6336,
1041,
4118,
18,
9,
891,
18,
9,
15022,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Good Ada IDE?
===
What would be a good (free) Ada IDE for either Linux or Windows? | 0 | [
2,
254,
13,
4405,
13,
3448,
60,
800,
3726,
3726,
98,
83,
44,
21,
254,
13,
5,
4639,
6,
13,
4405,
13,
3448,
26,
694,
13024,
54,
1936,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
PHP unserialize keeps throwing same error over 100 times.
===
So I have a large 2d array that i serialize and base64_encode and throw into a database. On a different page I pull the array out and when I base64_decode the serialized array i can echo it out and it definitely looks valid.
However, if i try to unserialize(base64_decode($serializedArray)) It just throws the same error to the point of nearly crashing firefox.
The error is:
Warning: unserialize() [function.unserialize]: Node no longer exists in /var/www/dev/wc_paul/inc/analyzerTester.php on line 24
I would include the entire serialized array that I echo out but last time I tried that on this form it crashed my firefox.
Does anyone have any idea why this might be happening?
Thanks.
| 0 | [
2,
13,
26120,
367,
4104,
2815,
2952,
8968,
6033,
205,
7019,
84,
808,
436,
9,
800,
3726,
3726,
86,
31,
57,
21,
370,
172,
43,
7718,
30,
31,
5956,
2952,
17,
1000,
3470,
1,
219,
9375,
17,
3814,
77,
21,
6018,
9,
27,
21,
421,
2478,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 your favorite CS video lectures?
===
Do you watch video lectures? MIT, Stanford, Berkeley and lots of other universities provide online learning materials,lectures.. What are your favorite ones?
| 0 | [
2,
98,
50,
154,
3839,
272,
18,
763,
8947,
60,
800,
3726,
3726,
107,
42,
1455,
763,
8947,
60,
6414,
15,
8382,
15,
8039,
17,
7503,
16,
89,
4165,
1181,
2087,
2477,
2895,
15,
14439,
4221,
18,
9,
9,
98,
50,
154,
3839,
53,
18,
60,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
In .Net, what is the fastest way to recursively find all files from a root directory?
===
I want to search a directory for all files that match a certain pattern.
Surprisingly, I have not had to do this since vb6 (Dir)... I'm sure things have changed since then!
-Thanks
| 0 | [
2,
19,
13,
9,
2328,
15,
98,
25,
14,
7518,
161,
20,
302,
24244,
102,
477,
65,
6488,
37,
21,
5900,
16755,
60,
800,
3726,
3726,
31,
259,
20,
2122,
21,
16755,
26,
65,
6488,
30,
730,
21,
1200,
3732,
9,
11701,
15,
31,
57,
52,
41,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Copy all files and folders using msbuild
===
Just wondering if someone could help me with some msbuild scripts that I am trying to write. What I would like to do is copy all the files and sub folders from a folder to another folder using msbuild.
{ProjectName}
|----->Source
|----->Tools
|----->Viewer
|-----{about 5 sub dirs}
What I need to be able to do is copy all the files and sub folders from the tools folder into the debug folder for the application. This is the code that I have so far.
<ItemGroup>
<Viewer Include="..\$(ApplicationDirectory)\Tools\viewer\**\*.*" />
</ItemGroup>
<Target Name="BeforeBuild">
<Copy SourceFiles="@(Viewer)" DestinationFolder="@(Viewer->'$(OutputPath)\\Tools')" />
</Target>
The build script runs but doesn't copy any of the files or folders.
Thanks
| 0 | [
2,
4344,
65,
6488,
17,
19294,
18,
568,
4235,
29361,
800,
3726,
3726,
114,
5712,
100,
737,
110,
448,
55,
29,
109,
4235,
29361,
17505,
30,
31,
589,
749,
20,
2757,
9,
98,
31,
83,
101,
20,
107,
25,
4344,
65,
14,
6488,
17,
972,
192... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Position the caret in a MaskedTextbox
===
I would like to be able to override the default behaviour for positioning the caret in a masked textbox.
The default is to place the caret where the mouse was clicked, the masked textbox already contains characters due to the mask.
I know that you can hide the caret as mentioned in this [post][1], is there something similar for positioning the caret at the beginning of the textbox when the control gets focus.
[1]: http://stackoverflow.com/questions/44131/how-do-i-hide-the-input-caret-in-a-systemwindowsformstextbox | 0 | [
2,
649,
14,
781,
38,
19,
21,
20354,
11969,
5309,
800,
3726,
3726,
31,
83,
101,
20,
44,
777,
20,
84,
11891,
14,
12838,
7727,
26,
649,
68,
14,
781,
38,
19,
21,
20354,
1854,
5309,
9,
14,
12838,
25,
20,
209,
14,
781,
38,
113,
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... |
Simple Query of MS SQL 2005 DB from SharePoint, using SSPI authentication?
===
Within our Active Directory domain, we have a MS SQL 2005 server, and a SharePoint (MOSS 3.0 I believe) server. Both authenticate against our LDAP server. Would like to allow users of SharePoint to see some of the data from the MS SQL database. Primary challenge is authentication.
Any tips on getting the pass-through authentication to work? I have searched (Google) for a proper connection string to use, but keep finding ones that have embedded credentials or other schemes. I gather that SSPI is what I want to use, but am not sure how to implement. | 0 | [
2,
1935,
25597,
16,
4235,
4444,
255,
812,
13,
9007,
37,
1891,
3132,
15,
568,
13,
18,
18,
2159,
27963,
60,
800,
3726,
3726,
363,
318,
1348,
16755,
4603,
15,
95,
57,
21,
4235,
4444,
255,
812,
8128,
15,
17,
21,
1891,
3132,
13,
5,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Dash vs. Underscore
===
Should it be **/about_us** or **/about-us**?
From usability point of view, I personally think **/about-us** is much better for end-user yet Google and most other websites (and javascript frameworks) use underscore naming pattern. Is it just matter of style? Are there any compatibility issues with using dashes? | 0 | [
2,
8405,
4611,
9,
131,
15077,
800,
3726,
3726,
378,
32,
44,
13,
1409,
118,
6901,
1,
267,
1409,
54,
13,
1409,
118,
6901,
8,
267,
1409,
60,
37,
182,
4091,
454,
16,
1418,
15,
31,
7200,
277,
13,
1409,
118,
6901,
8,
267,
1409,
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... |
Nested for loops in different languages
===
Here is a fairly common problem. We have an array of arrays. We'd like to call some function for every combination of elements from the different arrays. Conceptually we'd like to do something like this:
for my $x (1, 2) {
for my $y ('a', 'b') {
for my $z ('A', 'B') {
print "$x $y $z\n";
}
}
}
except that we don't want to have to write out a different number of loops if we have a different number of elements. In other words we want to be able to implement the above as something like:
nested_for(
sub {print "@_\n"},
[1, 2], ['a', 'b'], ['A', 'B']
);
and get the same result. (Exact syntax may vary by language.)
One solution per post, please. | 0 | [
2,
5618,
69,
26,
19661,
19,
421,
2556,
800,
3726,
3726,
235,
25,
21,
6647,
757,
1448,
9,
95,
57,
40,
7718,
16,
7718,
18,
9,
95,
22,
43,
101,
20,
645,
109,
1990,
26,
352,
3733,
16,
2065,
37,
14,
421,
7718,
18,
9,
14425,
102,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to pass context around in a ASP.NET MVC web app
===
Ok, I'm a newbie to ASP.NET web apps... and web apps in general. I'm just doing a bit of a play app for an internal tool at work.
given this tutorial...
http://www.asp.net/learn/mvc-videos/video-395.aspx
The example basically has a global tasklist.
So if I wanted to do the same thing, but now I want to maintain tasks for projects. So I now select a project and I get the task list for that project. How do I keep the context of what project I have selected as I interact with the tasks? Do I encode it into the link somehow? or do you keep it in some kind of session data? or some other way?
| 0 | [
2,
184,
20,
1477,
4141,
140,
19,
21,
28,
306,
9,
2328,
307,
8990,
2741,
4865,
800,
3726,
3726,
5854,
15,
31,
22,
79,
21,
78,
5893,
20,
28,
306,
9,
2328,
2741,
4865,
18,
9,
9,
9,
17,
2741,
4865,
18,
19,
297,
9,
31,
22,
79,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I truncate a java string to fit in a given number of bytes, once UTF-8 encoded?
===
How do I truncate a java `String` so that I know it will fit in a given number of bytes storage once it is UTF-8 encoded? | 0 | [
2,
184,
107,
31,
22328,
62,
21,
8247,
3724,
20,
2742,
19,
21,
504,
234,
16,
34,
3231,
15,
382,
287,
11720,
8,
457,
13665,
60,
800,
3726,
3726,
184,
107,
31,
22328,
62,
21,
8247,
13,
1,
11130,
1,
86,
30,
31,
143,
32,
129,
274... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ssl_error_rx_record_too_long and Apache SSL
===
I've got a customer trying to access one of my sites, and they keep getting this error > ssl_error_rx_record_too_long
They're getting this error on all browsers, all platforms. I can't reproduce the problem at all.
My server and myself are located in the USA, the customer is located in India.
I googled on the problem, and the main source seems to be that the SSL port is speaking in HTTP. I checked my server, and this is not happening. I tried <a href="https://www.servertastic.com/support/KB/a36/error-code-ssl-error-rx-record-too-long.aspx">the solution mentioned here</a>, but the customer has stated it did not fix the issue.
Can anyone tell me how I can fix this, or how I can reproduce this??? | 0 | [
2,
13,
18,
18,
255,
1,
29992,
1,
21141,
1,
14953,
1,
8175,
1,
2701,
17,
17140,
13,
18,
18,
255,
800,
3726,
3726,
31,
22,
195,
330,
21,
7705,
749,
20,
1381,
53,
16,
51,
3259,
15,
17,
59,
643,
1017,
48,
7019,
13,
1,
13,
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... |
Rails performance analyzers
===
What are the preffered plugins for monitoring and analyzing the performance of a Rails app? I'm looking for both database/query analyzers and the rest of the stack if possible, though not necessarily all in one plugin. Which ones do you recommend?
( Bonus points for free ones :)
For example, [this one][1] looks spify.
[1]: http://railstips.org/2008/9/17/rails-app-monitoring | 0 | [
2,
2240,
18,
956,
16051,
1224,
800,
3726,
3726,
98,
50,
14,
782,
6866,
69,
10922,
108,
18,
26,
8984,
17,
23543,
14,
956,
16,
21,
2240,
18,
4865,
60,
31,
22,
79,
699,
26,
156,
6018,
118,
8190,
93,
16051,
1224,
17,
14,
760,
16,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to disable Notepad++'s annoying 'parenthesis completion'?
===
Whenever I type a (, [, or {, Notepad++ completes it with the corresponding closing bracket. I find this 'feature' annoying and would like to disable it. It doesn't seem to be listed in the Preferences dialog and a search of the online documentation didn't yield any useful result.
Does anybody here know where the option for this is hidden?
I'm currently using Notepad++ 5.0.3. | 0 | [
2,
184,
20,
1460,
579,
1945,
8240,
20512,
22,
18,
17610,
13,
22,
18908,
438,
4557,
5392,
22,
60,
800,
3726,
3726,
6634,
31,
1001,
21,
13,
5,
15,
636,
15,
54,
13,
1,
15,
1945,
8240,
20512,
1279,
18,
32,
29,
14,
7265,
4239,
1954... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 customize directory structure in ASP.NET MVC?
===
The project I'm starting to work at will have several dozens of controllers, so it would be nice to structure them into logical directories and respective namespaces, like "Controllers/Admin/", "Controllers/Warehouse/Supplies/", etc.
Does ASP.NET MVC support nested controller directories and namespacing?
How do I manage routes to those controllers? | 0 | [
2,
184,
20,
5816,
2952,
16755,
1411,
19,
28,
306,
9,
2328,
307,
8990,
60,
800,
3726,
3726,
14,
669,
31,
22,
79,
1422,
20,
170,
35,
129,
57,
238,
10273,
16,
9919,
18,
15,
86,
32,
83,
44,
2210,
20,
1411,
105,
77,
11545,
559,
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... |
Specify the from user when sending email using the mail command
===
Does anyone know how to change the from user when sending email using the mail command? I have looked through the man page and can not see how to do this. | 0 | [
2,
19077,
14,
37,
4155,
76,
4907,
8517,
568,
14,
4216,
1202,
800,
3726,
3726,
630,
1276,
143,
184,
20,
753,
14,
37,
4155,
76,
4907,
8517,
568,
14,
4216,
1202,
60,
31,
57,
292,
120,
14,
169,
2478,
17,
92,
52,
196,
184,
20,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Any one using lucene?
===
I'm using lucene in my project.
Here is my questoin:
should I use lucene to replace the whole search module which has been implemented with sql using a large number of `like` statement and accurate search by id or sth,
or should I just use lucene in fuzzy search(i mean full text search)? | 0 | [
2,
186,
53,
568,
18515,
556,
60,
800,
3726,
3726,
31,
22,
79,
568,
18515,
556,
19,
51,
669,
9,
235,
25,
51,
7769,
111,
108,
45,
378,
31,
275,
18515,
556,
20,
3934,
14,
979,
2122,
12613,
56,
63,
74,
6807,
29,
4444,
255,
568,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Collection of markers with Google maps
===
I've worked quite a lot with Bing maps but I'm new to Google maps.
With the Bing maps API there is something called `EntityCollection` which represents a group of overlays with useful functions such as get a count, hide or remove all markers within the group. I found it to be quite handy when you want to represent different type of objects on the map.
But after some research I can't seem to find something equivalent in Google Maps. Is there anything similar or would I have to write my own `MarkerCollection` class? Has anyone done this already with some code sample I could have a look at? | 0 | [
2,
1206,
16,
19482,
29,
8144,
6867,
800,
3726,
3726,
31,
22,
195,
577,
1450,
21,
865,
29,
18080,
6867,
47,
31,
22,
79,
78,
20,
8144,
6867,
9,
29,
14,
18080,
6867,
21,
2159,
80,
25,
301,
227,
13,
1,
2291,
856,
15015,
872,
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... |
<i> tag for icons?
===
I've looked into the source of facebook, they use the `<i>` tag to display icons. <br />
Also, today I looked into twitter's bootstrap. It also uses `<i>` tag to display icons.
But,
From the [HTML5 spec](http://www.w3.org/International/questions/qa-b-and-i-tags/):
> The i element represents a span of text in an alternate voice or mood,
> or otherwise offset from the normal prose, such as a taxonomic
> designation, a technical term, an idiomatic phrase from another
> language, a thought, a ship name, or some other prose whose typical
> typographic presentation is italicized.
Why are they using `<i>` tag to display icons ?
Is it not a bad practice ?
Or am I missing something here ? | 0 | [
2,
13,
1,
49,
1,
3383,
26,
9801,
18,
60,
800,
3726,
3726,
31,
22,
195,
292,
77,
14,
1267,
16,
9090,
15,
59,
275,
14,
13,
1,
49,
1,
3383,
20,
3042,
9801,
18,
9,
13,
1,
5145,
13,
118,
1,
67,
15,
786,
31,
292,
77,
10623,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
(ASK) window.location.href doesnt work jquery
===
i have some code using jquery mobile + phonegap and run it on my android, i want to redirect the page to div id content... i mean after i take a picture i'd like to load the next page... here is my code...
<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="js/jquery.mobile-1.0.min.css" />
<script src="js/jquery-1.6.4.min.js"></script>
<script src="js/jquery.mobile-1.0.min.js"></script>
<script type="text/javascript" charset="utf-8" src="phonegap-1.1.0.js"></script>
<script type="text/javascript" charset="utf-8">
var deviceReady = false;
/**
* Take picture with camera
*/
function takePicture() {
navigator.camera.getPicture(
function(uri) {
var img = document.getElementById('camera_image');
img.style.visibility = "visible";
img.style.display = "block";
img.src = uri;
document.getElementById('camera_status').innerHTML = "Success";
window.location.href = "#page2";
},
function(e) {
console.log("Error getting picture: " + e);
document.getElementById('camera_status').innerHTML = "Error getting picture.";
},
{ quality: 50, destinationType: navigator.camera.DestinationType.FILE_URI}
);
};
/**
* Select picture from library
*/
function selectPicture() {
navigator.camera.getPicture(
function(uri) {
var img = document.getElementById('camera_image');
img.style.visibility = "visible";
img.style.display = "block";
img.src = uri;
document.getElementById('camera_status').innerHTML = "Success";
window.location.href = "#page2";
},
function(e) {
console.log("Error getting picture: " + e);
document.getElementById('camera_status').innerHTML = "Error getting picture.";
},
{ quality: 50, destinationType: navigator.camera.DestinationType.FILE_URI, sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY});
};
/**
* Upload current picture
*/
function uploadPicture() {
// Get URI of picture to upload
var img = document.getElementById('camera_image');
var imageURI = img.src;
if (!imageURI || (img.style.display == "none")) {
document.getElementById('camera_status').innerHTML = "Take picture or select picture from library first.";
return;
}
// Verify server has been entered
server = document.getElementById('serverUrl').value;
if (server) {
// Specify transfer options
var options = new FileUploadOptions();
options.fileKey="file";
options.fileName=imageURI.substr(imageURI.lastIndexOf('/')+1);
options.mimeType="image/jpeg";
options.chunkedMode = false;
// Transfer picture to server
var ft = new FileTransfer();
ft.upload(imageURI, server, function(r) {
document.getElementById('camera_status').innerHTML = "Upload successful: "+r.bytesSent+" bytes uploaded.";
}, function(error) {
document.getElementById('camera_status').innerHTML = "Upload failed: Code = "+error.code;
}, options);
}
}
/**
* View pictures uploaded to the server
*/
function viewUploadedPictures() {
// Get server URL
server = document.getElementById('serverUrl').value;
if (server) {
// Get HTML that lists all pictures on server using XHR
var xmlhttp = new XMLHttpRequest();
// Callback function when XMLHttpRequest is ready
xmlhttp.onreadystatechange=function(){
if(xmlhttp.readyState === 4){
// HTML is returned, which has pictures to display
if (xmlhttp.status === 200) {
document.getElementById('server_images').innerHTML = xmlhttp.responseText;
}
// If error
else {
document.getElementById('server_images').innerHTML = "Error retrieving pictures from server.";
}
}
};
xmlhttp.open("GET", server , true);
xmlhttp.send();
}
}
/**
* Function called when page has finished loading.
*/
function init() {
document.addEventListener("deviceready", function() {deviceReady = true;}, false);
window.setTimeout(function() {
if (!deviceReady) {
alert("Error: PhoneGap did not initialize. Demo will not run correctly.");
}
},2000);
}
</script>
</head>
<body onload="init();">
<!-- Page 1 -->
<div data-role="page" id="page1">
<!-- Page 1 Header -->
<div data-role="header">
<h1>Ambil Gambar</h1>
</div>
<!-- Page 1 Content -->
<div data-role="content">
<center>
<a href="javascript:void(0)" onclick="takePicture();">
<img src="image/camera.png" width="150px" height="150px">
</a>
<br>
<br>
<b>Atau</b>
<br>
<br>
<a href="javascript:void(0)" onclick="selectPicture();">
<img src="image/upload.png">
</a>
<p>Find my friend Page 3 <a href="#page2">here</a></p>
</center>
</div>
<!-- Page 1 Footer -->
<div data-role="footer">
<h4>Footer 1</h4>
</div>
</div>
<!-- Page 2 -->
<div data-role="page" id="page2">
<!-- Page 2 Header -->
<div data-role="header">
<h1>Header 2</h1>
</div>
<!-- Page 2 Content -->
<div data-role="content">
<img style="width:100%;visibility:hidden;display:none;" id="camera_image" src="" />
<p>Find my friend Page 3 <a href="#page3">here</a></p>
</div>
<!-- Page 2 Footer -->
<div data-role="footer">
<h4>Footer 2</h4>
</div>
</div>
<!-- Page 3 -->
<div data-role="page" id="page3">
<!-- Page 3 Header -->
<div data-role="header">
<h1>Header 3</h1>
</div>
<!-- Page 3 Content -->
<div data-role="content">
<h3>Server:</h3>
<b>Images on server:</b>
<div id="server_images"></div>
<input type="button" onclick="uploadPicture();" value="Upload Picture" />
<input type="button" onclick="viewUploadedPictures();" value="View Uploaded Pictures" />
</div>
</div>
</body>
</html>
Can anyone help me please? thanks berfore... | 0 | [
2,
13,
5,
20310,
6,
1463,
9,
19032,
9,
252,
14057,
5886,
170,
487,
8190,
93,
800,
3726,
3726,
31,
57,
109,
1797,
568,
487,
8190,
93,
3241,
2754,
1132,
1136,
306,
17,
485,
32,
27,
51,
13005,
15,
31,
259,
20,
302,
14706,
14,
247... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 mock COM objects with Rhino?
===
I have tried to mock Interop excel worksheet using Rhino.Mocks object but its throwing exception.
Used Code:
var _mocks = new MockRepository();
var _workSheet = _mocks.StrictMock<**Excel.Worksheet**>(); | 0 | [
2,
25,
32,
938,
20,
10506,
13,
960,
3916,
29,
18642,
60,
800,
3726,
3726,
31,
57,
794,
20,
10506,
1480,
2594,
20700,
170,
17627,
568,
18642,
9,
79,
5668,
18,
3095,
47,
82,
6033,
5391,
9,
147,
1797,
45,
4033,
13,
1,
79,
5668,
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... |
Sqldatasource update statment for converting string to dd.mm.yyyy hh:mm
===
I have a gridview and sqldatasource.
In the sqldatasource update statment I'm trying to convert the string of the column to datetime , with this:
Date = Convert(DateTime,@Date,104)
//this converts the string to mm.dd.yyyy .
I can't find the code for `mm.dd.yyyy hh:mm .`
| 0 | [
2,
4444,
255,
18768,
12097,
11100,
12819,
1130,
26,
19583,
3724,
20,
13,
8096,
9,
3363,
9,
93,
93,
93,
93,
13,
10681,
45,
3363,
800,
3726,
3726,
31,
57,
21,
7354,
4725,
17,
4444,
255,
18768,
12097,
9,
19,
14,
4444,
255,
18768,
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... |
Hide specific fields from Paypal Express checkout Order details page using ActiveMerchant
===
Am using Paypal Express Checkout along with ActiverMerchant gem.
Now, I need to know if there is a way to let the users skip from entering their address information and contact details like mobile & eMail. In essence, I want to hide those fields from the Paypal page.
Can you please help achieve this either by settings/config in PayPal portal or through the API call from ActiveMerchant.
Thanks a bunch for rescuing me. | 0 | [
2,
3077,
1903,
2861,
37,
1372,
6720,
2999,
2631,
1320,
389,
3289,
2478,
568,
1348,
1263,
3606,
38,
800,
3726,
3726,
589,
568,
1372,
6720,
2999,
2631,
1320,
303,
29,
1348,
139,
1263,
3606,
38,
8551,
9,
130,
15,
31,
376,
20,
143,
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... |
Building cURL for Cocos2d-x Eclipse, something is missing for me
===
There is no problem in Xcode, but in Eclipse there is unfortunately.
I did this in Android.mk:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := game
LOCAL_MODULE_FILENAME := libgame
LOCAL_SRC_FILES := helloworld/main.cpp \
../../Classes/AppDelegate.cpp \
../../Classes/HelloWorldScene.cpp\
../../Classes/GameplayLayer.cpp\
../../Classes/swimmerc.cpp\
../../Classes/pugixml.cpp
LOCAL_C_INCLUDES := ../../libs/cocos2dx \
../../libs/cocos2dx/platform \
../../libs/cocos2dx/include \
../../libs/CocosDenshion/include \
$(LOCAL_PATH)/../../Classes/\
LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static cocosdenshion_static curl_static
include $(BUILD_SHARED_LIBRARY)
$(call import-module,cocos2dx)
$(call import-module,cocos2dx/platform/third_party/android/prebuilt/libcurl)
$(call import-module,CocosDenshion/android)
I put the `curl` folder in Classes. I then included it in `GameplayLayer.cpp`.
No errors occur if I use
CURL *curl;
CURLcode res;
But as soon as I put
curl = curl_easy_init();
I get an error,
make: *** [obj/local/armeabi/libgame.so] Error 1
Please help, I would gladly give one of my kidneys in exchange for getting this %&#@ to work. | 0 | [
2,
353,
14320,
26,
22470,
18,
135,
43,
8,
396,
11652,
15,
301,
25,
2863,
26,
55,
800,
3726,
3726,
80,
25,
90,
1448,
19,
993,
9375,
15,
47,
19,
11652,
80,
25,
6200,
9,
31,
144,
48,
19,
13005,
9,
79,
197,
45,
375,
1,
8353,
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... |
More messages then "smtp_accept_queue_per_connection" in one connection
===
<br>
I want to send many messages to one domain, so I have “queue_only”. When is queue filled, I execute <b>exim –q</b>. In this case exim send only one message per connection. On other hand, when I use <b>exim –qq</b>, exim send too many messages in one connection regardless I have set “smtp_accept_queue_per_connection”.<br>
Do you know how to send messages in one connection?<br><br>
My configuration:<br>
queue_only = true
queue_run_max = 50
remote_max_parallel = 14
smtp_accept_queue_per_connection = 11
smtp_accept_max_per_connection = 12
smtp_connect_backlog = 50
smtp_accept_max = 500
deliver_queue_load_max = 10
Thanks for your advice, Ivan | 0 | [
2,
91,
7561,
94,
13,
7,
18,
79,
13726,
1,
28050,
1,
2005,
4185,
1,
1432,
1,
25996,
872,
7,
19,
53,
2760,
800,
3726,
3726,
13,
1,
5145,
1,
31,
259,
20,
2660,
151,
7561,
20,
53,
4603,
15,
86,
31,
57,
13,
1,
2005,
4185,
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... |
Musicplayer stops when navigating on the site
===
How can I make the musicplayer on this page to play continuously, even if you are going from the frontpage to a sub-page? Like it is now, it stops when you enter the next page or if you refresh.
I use Wordpress with a custom made WP template btw.
http://cpanel12.proisp.no/~annaryuh/ | 0 | [
2,
232,
14049,
6604,
76,
1775,
13227,
1880,
27,
14,
689,
800,
3726,
3726,
184,
92,
31,
233,
14,
232,
14049,
27,
48,
2478,
20,
418,
11738,
15,
166,
100,
42,
50,
228,
37,
14,
431,
6486,
20,
21,
972,
8,
6486,
60,
101,
32,
25,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to bind iOS API to JavaScript
===
I am familiar with the good old Swig and I had a look at AppMobi but I am still wondering what's best practice to bind my own iOS API to JavaScript.
Thanks | 0 | [
2,
184,
20,
10193,
13,
7760,
21,
2159,
20,
8247,
8741,
800,
3726,
3726,
31,
589,
3694,
29,
14,
254,
315,
13,
18,
12445,
17,
31,
41,
21,
361,
35,
4865,
79,
14398,
47,
31,
589,
174,
5712,
98,
22,
18,
246,
1345,
20,
10193,
51,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... |
Message sending from iPhone to another mobile
===
In my app am using **MFMessageComposeViewController** to send message.
Following code is the example i used to send message
MFMessageComposeViewController *msgController = [[[MFMessageComposeViewController alloc] init] autorelease];
if([MFMessageComposeViewController canSendText])
{
msgController.messageComposeDelegate = self;
msgController.body = [NSString stringWithFormat:@"%@", appDelegate.finalConactStr ];
[self presentModalViewController:msgController animated:YES];
}
and am checking the result by using the following code
- (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result
{
switch (result)
{
case MessageComposeResultCancelled:
cancelAlert = [[UIAlertView alloc] initWithTitle:@"SMS a Contact" message:@"Cancelled"delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
[cancelAlert show];
[cancelAlert release];
NSLog(@"Result: canceled");
break;
case MessageComposeResultSent:
successAlert = [[UIAlertView alloc]initWithTitle:@"SMS a Contact" message:@"Successfully sent" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil];
[successAlert show];
[successAlert release];
NSLog(@"Result: sent");
break;
case MessageComposeResultFailed:
failAlert = [[UIAlertView alloc]initWithTitle:@"SMS a Contact" message:@"Failed" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil];
[failAlert show];
[failAlert release];
NSLog(@"Result: failed");
break;
default:
notSentAlert = [[UIAlertView alloc]initWithTitle:@"SMS a Contact" message:@"Not Sent" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil];
[notSentAlert show];
[notSentAlert release];
NSLog(@"Result: not sent");
break;
}
[self dismissModalViewControllerAnimated:YES];
}
but without sim also it is showing alert like **Successfully sent**
How can we check device has sim or not or message sending capability is there or not.
Any one can help or suggest me.
Thanks in advance. | 0 | [
2,
2802,
4907,
37,
21024,
20,
226,
3241,
800,
3726,
3726,
19,
51,
4865,
589,
568,
13,
1409,
13235,
3845,
18,
1303,
960,
15690,
4725,
12898,
1252,
1409,
20,
2660,
2802,
9,
249,
1797,
25,
14,
823,
31,
147,
20,
2660,
2802,
13,
13235,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 handle backend Exceptions in IQueryable<> methods?
===
A scenario with a HttpClient calling a ASP.NET Web API method, calling an EF repository.
I am having trouble catching SQL exceptions.
Client:
try
{
var client = new HttpClient();
var httpRequestMessage = new HttpRequestMessage();
var response = await client.SendAsync(httpRequestmessage);
response.EnsureSuccessStatusCode();
}
catch (Exception ex)
{
// internal error 500 here
}
Web API:
[HttpGet]
public IQueryable<Data> GetData()
{
try
{
return repository.Data();
}
catch (Exception ex)
{
// Nothing here
}
}
Repository:
public IQueryable<Data> GetData()
{
try
{
return dbContext.Data.Where(d=>d.Id == 1)
}
catch (Exception ex)
{
// nothing here
}
}
How can I handle SQL Server Exceptions (such as connection issues)? Neither the API layer, nor the repository layer catches them.
If I would turn the queryable into an Array in the repository:
var arr = dbContext.Data.Where(d => d.Id == 1).ToArray();
That would of course get caught. But how about the queryable scenario, how can I catch those?
| 0 | [
2,
184,
20,
3053,
97,
2451,
13392,
19,
13,
5312,
622,
579,
1,
3195,
60,
800,
3726,
3726,
21,
12705,
29,
21,
7775,
150,
18513,
38,
2555,
21,
28,
306,
9,
2328,
2741,
21,
2159,
2109,
15,
2555,
40,
11599,
24869,
9,
31,
589,
452,
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... |
Generate Dynamic Excel from Java
===
We've pre-defined Excel document structure with lots of formulas and macros written.
During download of Excel, thru Java application we populate certain cells in Excel with data. After download when user open Excel, macros & formulas embedded in it will read the pre-populated data and behave accordingly.
We are rightnow using ExtenXLS to generate Dynamic Excel document from Java. Licence is CPU based and it doesn't support Boxes with Dual core CPU. We are forced to buy more Licence.
Is there any better tool we can look at it which is either free, product and support cost are minimal (Support is must), licence is simple. | 0 | [
2,
7920,
7782,
20700,
37,
8247,
800,
3726,
3726,
95,
22,
195,
782,
8,
13439,
20700,
4492,
1411,
29,
7503,
16,
3729,
18,
17,
9069,
18,
642,
9,
112,
7121,
16,
20700,
15,
19637,
8247,
3010,
95,
1675,
12383,
1200,
2934,
19,
20700,
29,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Source code control policy
===
I'm looking for an overview over different source code control policies. I only came across the Main-Line policy and would like to better know others before committing to one with the team.
Can someone provide a link to an overview or even give me some names of policies so I can launch google on it? | 0 | [
2,
1267,
1797,
569,
1486,
800,
3726,
3726,
31,
22,
79,
699,
26,
40,
21598,
84,
421,
1267,
1797,
569,
4845,
9,
31,
104,
281,
464,
14,
407,
8,
1143,
1486,
17,
83,
101,
20,
574,
143,
654,
115,
19524,
20,
53,
29,
14,
173,
9,
92,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How well does Python's whitespace dependency interact with source control with regards to merging?
===
I'm wondering if the need to alter the indentation of code to adjust the nesting has any adverse effects on merging changes in a system like SVN.
This is a really open ended question. I'm sort of fishing for information/anecdotes here. | 0 | [
2,
184,
134,
630,
20059,
22,
18,
359,
5582,
26835,
10001,
29,
1267,
569,
29,
14179,
20,
18842,
60,
800,
3726,
3726,
31,
22,
79,
5712,
100,
14,
376,
20,
7835,
14,
19,
817,
8593,
16,
1797,
20,
14328,
14,
24338,
63,
186,
15528,
229... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
time length of an mp3 file
===
What is the simplest way to determine the length (in seconds) of a given mp3 file, without using outside libraries? (python source highly appreciated) | 0 | [
2,
85,
1476,
16,
40,
4628,
240,
3893,
800,
3726,
3726,
98,
25,
14,
24384,
161,
20,
3746,
14,
1476,
13,
5,
108,
2582,
6,
16,
21,
504,
4628,
240,
3893,
15,
366,
568,
719,
8649,
60,
13,
5,
6448,
11570,
1267,
2157,
13746,
6,
3,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.