unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Using ini-files with VB 6.0
===
I must be getting daft, but I can't seem to find how to read old-fashioned ini files with VB 6.0. All I can seem to find is about reading from and writing to the registry. Can someone push me in the right direction? Mind you, I am not a programmer, just a hobbyist trying to have some harmless fun with his computer, so please don't be to harsh when you point out the bleedin' obvious. | 0 | [
2,
568,
19,
49,
8,
16877,
18,
29,
13,
20468,
400,
9,
387,
800,
3726,
3726,
31,
491,
44,
1017,
1331,
3072,
15,
47,
31,
92,
22,
38,
2260,
20,
477,
184,
20,
1302,
315,
8,
15016,
19,
49,
6488,
29,
13,
20468,
400,
9,
387,
9,
65... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Record locking
===
I have a question about locking. This doesn't have to be only about record locking, but anyway.
Let's say i'm writing a web accessable CMS. I am struggling with some ideas.
I could, on the moment when a user opens an article for editing, flag the article as being 'in use'. so far so good.
but when do I remove the flag? when the user saves the article? but what if the user doesn't feel like typing anymore and decides to close his browser and go to bed?
a time-out mechanism comes to mind, but how long does it take to write an article? 10 minutes too short, 30 minutes too long..
Maybe I am overcomplicating, I'd like to hear your thoughts on this subject. | 0 | [
2,
571,
17538,
800,
3726,
3726,
31,
57,
21,
1301,
88,
17538,
9,
48,
1437,
22,
38,
57,
20,
44,
104,
88,
571,
17538,
15,
47,
2774,
9,
408,
22,
18,
395,
31,
22,
79,
1174,
21,
2741,
1381,
579,
2390,
18,
9,
31,
589,
7587,
29,
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... |
Simple 2 way encryption for C#
===
I'm looking for very simple encrypt and decrypt functionality for some data. It's not mission critical. I need something to keep honest people honest, but something a little stronger than ROT13 or Base64.
I'd prefer something that is already included in the .Net framework 2.0 so I don't have to worry about any external dependencies. | 0 | [
2,
1935,
172,
161,
24420,
26,
272,
5910,
800,
3726,
3726,
31,
22,
79,
699,
26,
253,
1935,
1957,
11435,
17,
121,
11435,
18548,
26,
109,
1054,
9,
32,
22,
18,
52,
1408,
2507,
9,
31,
376,
301,
20,
643,
6964,
148,
6964,
15,
47,
301... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 count the number of IL instructions executed?
===
I want to do some benchmarking of a C# process, but I don't want to use time as my vector - I want to count the number of IL instructions that get executed in a particular method call. Is this possible?
**Edit** I don't mean static analysis of a method body - I'm referring to the actual number of instructions that are executed - so if, for example, the method body includes a loop, the count would be increased by however many instructions make up the loop * the number of times the loop is iterated. | 0 | [
2,
25,
80,
21,
161,
20,
2468,
14,
234,
16,
6317,
7650,
5557,
60,
800,
3726,
3726,
31,
259,
20,
107,
109,
25324,
68,
16,
21,
272,
5910,
953,
15,
47,
31,
221,
22,
38,
259,
20,
275,
85,
28,
51,
7497,
13,
8,
31,
259,
20,
2468,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Design of Assertion Checking System
===
Coming to the point I am wondering if anybody could comment on the design of a "Performance Assertion Checking" system.
The idea is that a developer makes some assertions about his code and use these to test the evolution of the performance of the code.Has anyone has similar experience.
My current block is "Whats a better way to translate these assertions in a specified language (that are to be checked against specified logs or runtime instrumentation) into.. say CLR, or assembly or Bytecode that could be executed?"
Currently I have written a parser that parses the specification and holds it in a data structure.
Appreciate your time.
Any Ideas.. | 0 | [
2,
704,
16,
20878,
9886,
329,
800,
3726,
3726,
880,
20,
14,
454,
31,
589,
5712,
100,
11181,
110,
6484,
27,
14,
704,
16,
21,
13,
7,
22528,
20878,
9886,
7,
329,
9,
14,
882,
25,
30,
21,
10058,
1364,
109,
20878,
18,
88,
33,
1797,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Code Coverage for Mono?
===
mono creates its own debug targets called .mdb files when you use the mcs compiler.
is there a way of using NCover or another code coverage tool with Mono?
a commandline tool would be better so I can add it to our continuous integration server. | 0 | [
2,
1797,
5245,
26,
4129,
60,
800,
3726,
3726,
4129,
9695,
82,
258,
121,
16254,
7767,
227,
13,
9,
79,
9007,
6488,
76,
42,
275,
14,
1324,
18,
21486,
9,
25,
80,
21,
161,
16,
568,
13,
103,
14069,
54,
226,
1797,
5245,
5607,
29,
412... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 adopt a software development process?
===
Agile (SCRUM, XP, FDD, ...), Waterfall, RUP, ... Why would a small company bother adopting one in the first place. Why not just hack-away each project to completion (with a usual team size of 1~2).
I'm preparing a short presentation against the argument but would like to hear what everyone thinks. | 0 | [
2,
483,
9512,
21,
2306,
522,
953,
60,
800,
3726,
3726,
27475,
13,
5,
18,
25241,
15,
23045,
15,
398,
8096,
15,
13,
9,
9,
9,
6,
15,
12927,
15,
13,
7964,
15,
13,
9,
9,
9,
483,
83,
21,
284,
237,
8006,
17577,
53,
19,
14,
64,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Transactional queueing/dequeueing
===
I need to queue events and tasks for external systems in a reliable/transactional way. Using things like MSMQ or ActiveMQ look very seductive, but the transactional part becomes complicated (MSDTC, etc).
We could use the database (SQL Server 2005+, Oracle 9+) and achieve easier transactional support, but the queuing part becomes uglier.
Neither route seems all that great and is filled with nasty gotchas and edge cases.
Can someone offer some practical guidance in this matter?
Think: E/C/A or a scheduled task engine that wakes up every so often and see if there are any scheduled tasks that need running at this time (i.e. next-run-date has passed, but expiration-date has not yet been reached).
| 0 | [
2,
12799,
192,
22521,
68,
118,
546,
2005,
4185,
68,
800,
3726,
3726,
31,
376,
20,
22521,
963,
17,
8674,
26,
4886,
1242,
19,
21,
11398,
118,
7028,
8645,
192,
161,
9,
568,
564,
101,
4235,
79,
1251,
54,
1348,
79,
1251,
361,
253,
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... |
Daily Build vs. Zero Defect
===
How do you go about doing a daily build and striving for a zero-defect environment? Does it mean I never get to go home until I've killed all the bugs in my new code? Or does it mean I just don't check my code back in until I've fully tested it, which leaves the code effectively branched for a much longer time?
I'm working with a handful of programmers for the first time (as opposed to working on my own, or with just one other coder), so I'm just wrestling with decisions like this for the first time. Should we adopt a software development process? | 0 | [
2,
1954,
1895,
4611,
9,
4606,
18929,
800,
3726,
3726,
184,
107,
42,
162,
88,
845,
21,
1954,
1895,
17,
20899,
8397,
26,
21,
4606,
8,
546,
12768,
2307,
60,
630,
32,
884,
31,
243,
164,
20,
162,
213,
163,
31,
22,
195,
841,
65,
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... |
Site-Mining tools
===
Many of the questions asked here are relevant to research I'm doing. These questions and answers are widely dispersed and not always easy to find, doing manual browsing, and sometimes an insightful answer or comment occurs in unrelated topics as well.
I want to automate finding these relevant Q's & A's, based on sets of keywords, then use the information as pointers towards further in-depth research.
What tools, preferably open-source, are available that I can use for this type of site-mining? I am not a web guru & for me to try to develop them will take a long time and also impact on time I could have spent on my R&D.
-----------------------
*(PS: This site is so young and already there is such a wealth of information! This site should have happened long ago. Thank you Joel, Jeff & company, & all the SO-community. )*
| 0 | [
2,
689,
8,
2160,
68,
4672,
800,
3726,
3726,
151,
16,
14,
2346,
411,
235,
50,
7480,
20,
527,
31,
22,
79,
845,
9,
158,
2346,
17,
6709,
50,
2525,
17587,
17,
52,
550,
2010,
20,
477,
15,
845,
5132,
10175,
68,
15,
17,
1030,
40,
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... |
Best enterprise repository tool for Maven 2?
===
Some of the other questions and answers here on SO extol the virtues of using an enterprise repository tool like Archiva, Artifactory, or Nexus. What are the pros and cons of each? How do I choose between them?
In case it helps:
- We use both Maven 1 and Maven 2 (at least for a while)
- We want to store both internally-generated artifacts, publicly-available ones (ibiblio, codehaus, etc.), and proprietary ones (e.g. Sun's licensed JARs like the Servlet API).
- We would like something that runs on Windows, Linux, or both.
N.B. this question is not a duplicate of either [this one][1] or [this one][2].
[1]: http://stackoverflow.com/questions/161819/what-are-mainbest-maven-respositories-to-use
[2]: http://stackoverflow.com/questions/157463/host-maven-repository | 0 | [
2,
246,
6002,
24869,
5607,
26,
1216,
3124,
172,
60,
800,
3726,
3726,
109,
16,
14,
89,
2346,
17,
6709,
235,
27,
86,
1396,
13741,
14,
10128,
18,
16,
568,
40,
6002,
24869,
5607,
101,
13,
25328,
58,
15,
22929,
7159,
15,
54,
28674,
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... |
Dynamic Database Binding in C#
===
I have a project here that connects to an in-production database and grabs tables and views. The code I've inherited connects to a SQL Server database via a SqlConnection, with the user's provided credentials and the database location they provide. When data is required, it uses the connection and a SQL string to create a SqlDataAdapter, and fills a brand new DataSet. That data then gets displayed after manipulating it, replacing table column names with appropriate display names, that sort of thing.
Problem is, the entire process is slow, and the icing on the cake is that it displays large amounts of data in ListViews, which do not take kindly to being given ten thousand rows of data,
I've been trying to replace one of the more prominent usages with a DataGridView, because this seems like the perfect application for it, but it simply *won't work*. I'm trying to bind the DataGridView to the DataSet I've gotten from the connection code via a DataBinder, but when I fire it up to have a look the data's sitting in the DataSet while the DataGridView is completely empty.
Am I missing something simple here? Am I barking up the wrong tree?
Is it even worth fiddling around with binding anyway? All of the binding stuff I can see seems to get me 90% of the way there, but then I can't modify the connection string or sort particular columns the way I want, and it seems to want me to give it a defined schema which is going to break as soon as the database changes - whereas the handwritten code is at least defensively designed and quite flexible. | 0 | [
2,
7782,
6018,
8728,
19,
272,
5910,
800,
3726,
3726,
31,
57,
21,
669,
235,
30,
8534,
20,
40,
19,
8,
11386,
6018,
17,
15555,
7484,
17,
4146,
9,
14,
1797,
31,
22,
195,
7179,
8534,
20,
21,
4444,
255,
8128,
6018,
1197,
21,
4444,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Apache configuration help -- Why are different processes "in" different time zones?
===
I have Apache 2 running on a VPS server (running Debian). I recently changed the timezone on the server (using dpkg-reconfigure tzdata) from America/New_York to America/Los_Angeles to match my move across country.
However, the Apache processes seem to flitter between timezones. See this snippet from the access_log:
127.0.0.1 - - [02/Oct/2008:23:01:13 -0700] "GET /favicon.ico HTTP/1.0" 301 - "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3"
127.0.0.1 - - [03/Oct/2008:02:01:25 -0400] "GET /tag/wikipedia/?page=1 HTTP/1.0" 200 5984 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
127.0.0.1 - - [03/Oct/2008:02:01:36 -0400] "GET /index.atom HTTP/1.0" 200 7648 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.2) Gecko/2008091618 Firefox/3.0.2"
127.0.0.1 - - [03/Oct/2008:02:01:45 -0400] "GET /tag/moblog/ HTTP/1.0" 200 6563 "-" "msnbot/1.1 (+http://search.msn.com/msnbot.htm)"
127.0.0.1 - - [02/Oct/2008:23:01:46 -0700] "GET /tag/opensource/ HTTP/1.0" 200 5954 "-" "msnbot/1.1 (+http://search.msn.com/msnbot.htm)"
127.0.0.1 - - [03/Oct/2008:02:01:56 -0400] "GET /tag/dopplr/ HTTP/1.0" 200 3407 "-" "msnbot/1.1 (+http://search.msn.com/msnbot.htm)"
It jumps from 23:01 to 02:01 and back. Any idea how I can keep it consistent? | 0 | [
2,
17140,
8091,
448,
13,
8,
8,
483,
50,
421,
5102,
13,
7,
108,
7,
421,
85,
11225,
60,
800,
3726,
3726,
31,
57,
17140,
172,
946,
27,
21,
13,
10924,
18,
8128,
13,
5,
11325,
121,
10035,
6,
9,
31,
1989,
1015,
14,
85,
11661,
27,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Python object attributes - methodology for access
===
Suppose I have a class with some attributes. How is it best (in the Pythonic-OOP) sense to access these attributes ? Just like `obj.attr` ? Or perhaps write get accessors ?
What are the accepted naming styles for such things ?
----------
If this question has already been asked (and I have a hunch it has, though searching didn't bring results), please point to it - and I will close this one.
| 0 | [
2,
20059,
3095,
13422,
13,
8,
18653,
26,
1381,
800,
3726,
3726,
5787,
31,
57,
21,
718,
29,
109,
13422,
9,
184,
25,
32,
246,
13,
5,
108,
14,
20059,
596,
8,
21709,
6,
1259,
20,
1381,
158,
13422,
13,
60,
114,
101,
13,
1,
111,
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... |
.NET Date Compare: Count the amount of working days since a date?
===
What's the easiest way to compute the amount of working days since a date? VB.NET preferred, but C# is okay.
And by "working days", I mean all days excluding Saturday and Sunday. If the algorithm can also take into account a list of specific 'exclusion' dates that shouldn't count as working days, that would be gravy.
Thanks in advance for the contributed genius. | 0 | [
2,
13,
9,
2328,
1231,
11590,
45,
2468,
14,
2006,
16,
638,
509,
179,
21,
1231,
60,
800,
3726,
3726,
98,
22,
18,
14,
27237,
161,
20,
23909,
14,
2006,
16,
638,
509,
179,
21,
1231,
60,
13,
20468,
9,
2328,
5981,
15,
47,
272,
5910,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Thread-safe atomic operations in gcc
===
In a program I work on, I have a lot of code as follows:
pthread_mutex_lock( &frame->mutex );
frame->variable = variable;
pthread_mutex_unlock( &frame->mutex );
This is clearly a waste of CPU cycles if the middle instruction can just be replaced with an atomic store. I know that gcc is quite capable of this, but I haven't been able to find much documentation on such simple thread-safe atomic operations. How would I replace this set of code with an atomic operation?
(I know that simple stores should theoretically be atomic, but I don't want to have to hope that the optimizer isn't screwing up their atomic-ness at some point in the process.) | 0 | [
2,
9322,
8,
18166,
9692,
1311,
19,
489,
3384,
800,
3726,
3726,
19,
21,
625,
31,
170,
27,
15,
31,
57,
21,
865,
16,
1797,
28,
2415,
45,
351,
96,
10647,
1,
7903,
1706,
1,
3966,
5,
279,
8361,
8,
1,
7903,
1706,
13,
6,
73,
3523,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 applications or services should I target for object-capabilities lobby?
===
[Object-capabilities](http://en.wikipedia.org/wiki/Object-capability_model) are an amazing solution/paradigm to provide security, both flexibly and robustly. Ever since I discovered them and got to understand them, I'm bothered that there are pretty much no widely used tool using or providing them, and I'd like to lobby a bit for their adoption, possibly by either designing a system with them or porting a system to them.
As the Web is *the* platform to make newly produced applications easily visible and usable by numerous users, I'll probably go for a Web application. It also has the benefit that if I want to provide a service more than an easily deployed application, I don't have to worry about the programming language and tools I use, as long as they can answer HTTP requests (standalone server, CGI, FastCGI, whatever).
Now, one perfect fit for *ocaps* is some publication system, where you can edit and publish documents and use ocaps to restrict or delegate rights on the documents, and I'm already working on this. But are there other systems that would be an interesting target for an ocaps implementation? (because they are popular, because their security is praticularily a mess or a joke, because they would make a perfect match for *ocaps*, etc...)
**That is, what web services do you use where you'd wish it could be more secure and could enable you to share more and delegate more or in an easier way than is currently possible?** | 0 | [
2,
98,
3767,
54,
687,
378,
31,
2935,
26,
3095,
8,
4666,
58,
9168,
3808,
8521,
60,
800,
3726,
3726,
636,
23793,
8,
4666,
58,
9168,
3808,
500,
5,
21127,
6903,
219,
9,
17375,
26132,
9,
5583,
118,
17375,
118,
23793,
8,
4666,
4091,
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... |
Retrieving session information with ASP.NET MVC
===
Let's say you have an ASP.NET MVC web application with a page that is accessible to all registered users of your application. Now this page has mostly general information, but there is also one panel that shows the current logged in user's personal information. How do you go about implementing this?
My initial thought would be to have the controller read the current logged in user's ID from the session and pull the information necessary and pass that into the view. But that seems somewhat awkward to me for some reason to pull session information from within the controller. Is this the only way to do it? | 0 | [
2,
13,
6239,
3272,
8397,
3723,
676,
29,
28,
306,
9,
2328,
307,
8990,
800,
3726,
3726,
408,
22,
18,
395,
42,
57,
40,
28,
306,
9,
2328,
307,
8990,
2741,
3010,
29,
21,
2478,
30,
25,
7342,
20,
65,
3801,
3878,
16,
154,
3010,
9,
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 could I debug a .bat script?
===
Is there a way to step through a .bat script ? The thing is , I have a build script , which calls a lot of other scripts , and I would like to see what is the order in which they are called , so that I may know where exactly I have to go about and add my modifications . | 0 | [
2,
184,
110,
31,
121,
16254,
21,
13,
9,
4900,
3884,
60,
800,
3726,
3726,
25,
80,
21,
161,
20,
1424,
120,
21,
13,
9,
4900,
3884,
13,
60,
14,
584,
25,
13,
15,
31,
57,
21,
1895,
3884,
13,
15,
56,
3029,
21,
865,
16,
89,
17505,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Mono created features available on .NET?
===
I noticed the following today: [Mono at the PDC 2008][1]?
> My talk will cover new technologies that we have created as part of Mono. Some of them are reusable on .NET (we try to make our code cross platform) and some other are features that specific to Mono's implementation of the CLI.
Posted by Miguel de Icaza on 01 Oct 2008
Does anybody know what type of new technologies he is refering too?
Sounds like a great talk...
[1]: http://tirania.org/blog/archive/2008/Oct-01-1.html | 0 | [
2,
4129,
679,
967,
904,
27,
13,
9,
2328,
60,
800,
3726,
3726,
31,
2711,
14,
249,
786,
45,
636,
20027,
35,
14,
351,
7201,
570,
500,
2558,
165,
500,
60,
13,
1,
51,
930,
129,
1227,
78,
5740,
30,
95,
57,
679,
28,
141,
16,
4129,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 run a CLI Application as a Windows Service?
===
Say I have a third party Application that does background work, but prints out all errors and messages to the console. This means, that currently, we have to keep a user logged on to the server, and restart the application (double-click) every time we reboot.
*Not so very cool.*
I was kind of sure, that there was an easy way to do this - a generic service wrapper, that can be configured with a log file for `stdout` and `stderr`.
I did check `svchost.exe`, but [according to this site][1], its only for DLL stuff. Pity.
[1]: http://www.google.ch/url?sa=t&source=web&ct=res&cd=2&url=http%3A%2F%2Fsupport.microsoft.com%2Fkb%2F314056&ei=38DlSPGDLYbS0gWaupyXCw&usg=AFQjCNFuvFUsrk_qf9ATt6N_Csh4dMJZnw&sig2=UZLsm65gFNCdsUqszVgHWQ | 0 | [
2,
184,
92,
31,
485,
21,
19391,
3010,
28,
21,
1936,
365,
60,
800,
3726,
3726,
395,
31,
57,
21,
422,
346,
3010,
30,
630,
2395,
170,
15,
47,
12202,
70,
65,
11908,
17,
7561,
20,
14,
8650,
9,
48,
1108,
15,
30,
871,
15,
95,
57,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is Code complied unit in ASP.net
===
I need to know what is code compiled unit in .net. It s located in this
path C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\App_folders
I need to know why its created ccu file also an complied file with application extension dll.
Do this take any reference from here.
Thanks | 0 | [
2,
98,
25,
1797,
27498,
1237,
19,
28,
306,
9,
2328,
800,
3726,
3726,
31,
376,
20,
143,
98,
25,
1797,
9316,
1237,
19,
13,
9,
2328,
9,
32,
13,
18,
335,
19,
48,
2013,
272,
45,
1,
27508,
18,
1,
22019,
12980,
9,
2328,
1,
8361,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Determining Referer in PHP
===
What is the most reliable and secure way to determine what page either sent, or called (via AJAX), the current page. I don't want to use the `$_SERVER['HTTP_REFERER']`, because of the (lack of) reliability, and I need the page being called to only come from requests originating on my site. | 0 | [
2,
13521,
5017,
106,
19,
13,
26120,
800,
3726,
3726,
98,
25,
14,
127,
11398,
17,
4315,
161,
20,
3746,
98,
2478,
694,
795,
15,
54,
227,
13,
5,
5034,
20624,
6,
15,
14,
866,
2478,
9,
31,
221,
22,
38,
259,
20,
275,
14,
13,
1,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Moving between dialog controls in Windows Mobile without the tab key
===
I have a windows mobile 5.0 app, written in C++ MFC, with lots of dialogs. One of the devices I'm currently targetting does not have a tab key, so I would like to use another key to move between controls. This is fine for buttons but not edit controls or combo boxes. I have looked at a [similar question][1] but the answer does not really suit. I've tried overriding the CDialog::OnKeyDown to no avail, and would rather not have to override the keystroke functionality for every control in every dialog. My thoughts so far are to write new classes replacing CEdit and CComboBox, but as always am just checking if there is an easier way, such as temporarily re-programming another key.
[1]: http://stackoverflow.com/questions/52098/how-do-you-navigate-out-of-a-combobox-on-a-windows-mobile-device-without-a-tab | 0 | [
2,
1219,
128,
28223,
8671,
19,
1936,
3241,
366,
14,
6523,
1246,
800,
3726,
3726,
31,
57,
21,
1936,
3241,
331,
9,
387,
4865,
15,
642,
19,
272,
20512,
307,
7061,
15,
29,
7503,
16,
28223,
18,
9,
53,
16,
14,
4690,
31,
22,
79,
871,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 resources do you read to create applications with a great user experience?
===
I am making the distinction between User Experience and pure User Interface (UI) design here, even though there is usually a tie-in. You can have great user interaction even with a ‘boring’ grey interface, (note that it is not a requirement!).
My bookshelf contains the following:
- [The Inmates are running the Asylum][1]
- [Don’t Make Me Think][2]
- [The Design of Everyday Things][3]
- [About Face 3.0][4]
- [Designing Interfaces][5]
- [The Laws of Simplicity][6]
- [The Visual Display of Quantitative Information][7]
- [Designing Interactions][8]
- [Getting Real (web][9])
What other books or resources would you add to this list?
[1]: http://www.amazon.com/Inmates-Are-Running-Asylum-Products/dp/0672326140/ref=sr_1_1?ie=UTF8&s=books&qid=1223003605&sr=1-1
[2]: http://www.amazon.com/Common-Approach-Usability-Circle-Com-Library/dp/0789723107
[3]: http://www.amazon.com/Design-Everyday-Things-Donald-Norman/dp/0385267746
[4]: http://www.amazon.com/About-Face-Essentials-Interaction-Design/dp/0470084111
[5]: http://www.amazon.com/Designing-Interfaces-Patterns-Effective-Interaction/dp/0596008031
[6]: http://www.amazon.com/Laws-Simplicity-Design-Technology-Business/dp/0262134721
[7]: http://www.amazon.com/Visual-Display-Quantitative-Information-2nd/dp/0961392142
[8]: http://www.amazon.com/Designing-Interactions-Bill-Moggridge/dp/0262134748
[9]: http://gettingreal.37signals.com/ | 0 | [
2,
56,
2566,
107,
42,
1302,
20,
1600,
3767,
29,
21,
374,
4155,
1496,
60,
800,
3726,
3726,
31,
589,
544,
14,
6519,
128,
4155,
1496,
17,
4267,
4155,
6573,
13,
5,
5661,
6,
704,
235,
15,
166,
362,
80,
25,
951,
21,
3795,
8,
108,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Automatically starting Windows Sound Recorder
===
My division has been tasked with recording the morning presentation audio for future use, using the built-in Windows Sound Recorder. Because of human nature, we don't always remember to start it on time.
Windows doesn't have a built-in equivalent to the Unix **cron** function. Besides installing a new software program (which will take time, possibly cost money, and require IA certification), is there an easy way to automate the recording?
I'm not adverse to writing a simple Python script for it, but I haven't programmed for Windows before; I don't know the APIs or anything required for this type of program. | 0 | [
2,
7499,
1422,
1936,
646,
14173,
800,
3726,
3726,
51,
460,
63,
74,
14605,
29,
1576,
14,
959,
6364,
4023,
26,
1022,
275,
15,
568,
14,
392,
8,
108,
1936,
646,
14173,
9,
185,
16,
585,
1444,
15,
95,
221,
22,
38,
550,
1518,
20,
799... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Tool or code for Cache and Memory Bus performances
===
I am facing a performance issue on a multi-core (8+) architecture with software written in C++ / VistualStudio / WindowsXP.
Suddenly I realized that I have no idea of the performances of my L1 and L2 cache and CPU->to->Memory bandwidth.
I have tested several tools (including VTune, Glowcode, etc, etc) but all of them fails when tested on load in a multicore architecture (which is the very reason why I need them!).
Can you suggest any other tool which is not so fancy in doing graphs but can give me at least few indications of my cache/memory performances or can suggest snippets of code to manually instrument my application?
Thanks! | 0 | [
2,
5607,
54,
1797,
26,
16522,
17,
1912,
1683,
3200,
800,
3726,
3726,
31,
589,
4325,
21,
956,
1513,
27,
21,
1889,
8,
10375,
13,
5,
457,
2430,
6,
2607,
29,
2306,
642,
19,
272,
20512,
13,
118,
9060,
38,
6948,
21026,
13,
118,
1936,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Need assistance with accelerating a GOval object (making a Breakout game)
===
Hey peoples, I've been studying Java for a couple of weeks, and have decided to produce my own version of Breakout. The game is working fine, apart from the method which is supposed to modify the ball (GOval) speed based on the speed of the paddle (GRect). Anyway, this is the method:
private double paddleVelocity(){
double paddleTracker=(paddleXTracker+paddleXTrackerTwo+paddleXTrackerThree)/3; //get the average x-coordinate for the paddle
if(loopCounter>3){ //if the game has been through the loop more than three times (to ensure three x-coordinates have been stored)
paddleVelocity=(paddle.getX()-paddleTracker)/50; //set paddleVelocity to the current paddle x-coordinate minus the average of the previous three paddle x-coordinates (which therefore finds the velocity and direction)
}else{
paddleVelocity=(paddle.getX()-paddleXTracker)/50; //takes the previous paddle x-coordinate and subtracts it from the current x-coordinate (which therefore finds the velocity and direction)
}
return (paddleVelocity);
}
And this is the method that calls it:
private void detectCollisionPaddle(){;
double ballY = ball.getY()+(BALL_RADIUS*2);
if(paddle.getY()<=ballY && ball.getX()+BALL_RADIUS>=paddle.getX() && ball.getX()+BALL_RADIUS/2<=(paddle.getX()+PADDLE_WIDTH)){ //a mess of code which ensures the ball is within the bounds of the paddle
yVel=-yVel; //make the ball bounce off
bounceClip.play(); //play the bounce clip
xVel=xVel+paddleVelocity(); //increase the velocity of the ball in the direction and speed of the paddle
} }
The instance variables include:
private int loopCounter; //how many loops of the game code have been executed
private double paddleVelocity; //velocity of the paddle
private double paddleXTracker = 1; //value of the x-coordinate of the paddle one loop previous
private double paddleXTrackerTwo; //value of the x-coordinate of the paddle two loops previous
private double paddleXTrackerThree; //value of the x-coordinate of the paddle three loops previous
private double yVel = -1; //y velocity of the ball
private double xVel = 1; //x velocity of the ball
Basically I want paddleVelocity to grab three consecutive x-coordinates of the paddle, and compare them to the current position (paddle.getX()). This allows me to determine the speed and direction that the user has moved the paddle. I then return the result (paddleVelocity) which is supposed to add to the current velocity of the ball (xVel). However, this doesn't seem to function properly. When the call for paddleVelocity() is removed, the code works perfectly (albeit without acceleration). So I know there's an issue with the paddleVelocity method. It seems to be biased to the right side. Perhaps you guys can help, afterall, this is my first serious attempt at programming. Here's the game atm: http://cyb3rglitch.com/games/Glitchout_0.1/
Yes, the bricks don't break yet. :P Cheers! | 0 | [
2,
376,
4067,
29,
28968,
21,
162,
3377,
3095,
13,
5,
5603,
21,
26581,
250,
6,
800,
3726,
3726,
8409,
148,
18,
15,
31,
22,
195,
74,
4493,
8247,
26,
21,
1335,
16,
1342,
15,
17,
57,
868,
20,
2213,
51,
258,
615,
16,
26581,
9,
14... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Does the classic ASP has its own security framework or does it use that of IIS?
===
I'm supporting site that still uses mixed ASP.Net and classic ASP. The user could not access the site and I wonder if it could be arttributed to classic ASP or to IIS. | 0 | [
2,
630,
14,
2732,
28,
306,
63,
82,
258,
1221,
6596,
54,
630,
32,
275,
30,
16,
595,
18,
60,
800,
3726,
3726,
31,
22,
79,
3134,
689,
30,
174,
2027,
2198,
28,
306,
9,
2328,
17,
2732,
28,
306,
9,
14,
4155,
110,
52,
1381,
14,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Find running clickonce deployed single instance app?
===
I'm currently facing a problem with my single instance clickonce deployed app, and maybe someone has a good idea about it.
My app is called by a web application, which passes parameters to this exe. Now the problem is, if the application is already running, it takes quite a long time, until the new instance is started, the parameters are handed over to the running instance, and closed (with opening the url, checking for updates,...).
So is there a way to detect that there is a running instance, without introducing a new small app, which does this detection?
The goal is to descrease the time, which the second, third, ... call needs to get the parameters to the running instance.
tia
Martin
| 0 | [
2,
477,
946,
10840,
13120,
6698,
345,
4851,
4865,
60,
800,
3726,
3726,
31,
22,
79,
871,
4325,
21,
1448,
29,
51,
345,
4851,
10840,
13120,
6698,
4865,
15,
17,
913,
737,
63,
21,
254,
882,
88,
32,
9,
51,
4865,
25,
227,
34,
21,
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... |
Handling large databases
===
I have been working in a web project(asp.net) for around six months. The final produce is about to get live. The project uses sql server as the database. We have done performance testing with some large volumes of data, results show that performance degrades when data becomes too large, say 2 million rows (timeout issues, delayed reponses, etc). At first we were using fully normailized database, but now we made it partially normailzed due to performance issues (to reduce joins). First of all, is it the right decision?
Plus what are the possible solutions when data size becomes very large, as the no. of clients increase in future? | 0 | [
2,
7988,
370,
6018,
18,
800,
3726,
3726,
31,
57,
74,
638,
19,
21,
2741,
669,
5,
472,
306,
9,
2328,
6,
26,
140,
490,
818,
9,
14,
426,
2213,
25,
88,
20,
164,
515,
9,
14,
669,
2027,
4444,
255,
8128,
28,
14,
6018,
9,
95,
57,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
c++ uses value sematics and java something else?
===
what does it mean by value semantics and what java is using? | 0 | [
2,
272,
20512,
2027,
1923,
1353,
6732,
18,
17,
8247,
301,
962,
60,
800,
3726,
3726,
98,
630,
32,
884,
34,
1923,
17220,
18,
17,
98,
8247,
25,
568,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Sleeping in a DOS batch file
===
When writing a batch file to automate something on a Windows box, I've needed to pause its execution for several seconds (usually in a test/wait loop, waiting for a process to start). At the time, the best solution I could find uses ping (I kid you not) to achieve the desired effect. I've found a better write-up of it [here][1], which describes a callable "wait.bat", implemented as follows:
@ping 127.0.0.1 -n 2 -w 1000 > nul
@ping 127.0.0.1 -n %1% -w 1000> nul
You can then include calls to wait.bat in your own batch file, passing in the number of seconds to sleep.
[Apparently][2] the Windows 2003 Resource Kit provides a Unix-like sleep command (at last!). In the meantime, for those of us still using XP, 2K or (sadly) NT, is there a better way?
[1]: http://malektips.com/dos0017.html
[2]: http://malektips.com/xp_dos_0002.html | 0 | [
2,
4777,
19,
21,
107,
18,
13064,
3893,
800,
3726,
3726,
76,
1174,
21,
13064,
3893,
20,
3108,
5281,
301,
27,
21,
1936,
1649,
15,
31,
22,
195,
851,
20,
6911,
82,
5769,
26,
238,
2582,
13,
5,
13075,
19,
21,
1289,
118,
8195,
5293,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 anyone recommend a free internet-based private Wiki?
===
I'm starting a programming project soon with a group of friends. We will all be working remotely most of the time. I'd like to start an online wiki that we can all access but it needs to be something that is free, private and accessible only to the team. Can anyone suggest a good host for this kind of wiki? Ideally it would have a feature that allows me to back up the wiki to local storage. | 0 | [
2,
92,
1276,
12360,
21,
551,
2620,
8,
1281,
932,
13,
17375,
60,
800,
3726,
3726,
31,
22,
79,
1422,
21,
3143,
669,
651,
29,
21,
214,
16,
954,
9,
95,
129,
65,
44,
638,
23288,
127,
16,
14,
85,
9,
31,
22,
43,
101,
20,
799,
40,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How should I name packages if I don't have a domain associated with me?
===
So most Java resources when speaking of packages mention a `com.yourcompany.project` setup. However, I do not work for a company, and don't have a website. Are there any naming conventions that are common? An email address, perhaps? | 0 | [
2,
184,
378,
31,
204,
16875,
100,
31,
221,
22,
38,
57,
21,
4603,
1598,
29,
55,
60,
800,
3726,
3726,
86,
127,
8247,
2566,
76,
3324,
16,
16875,
3794,
21,
13,
1,
960,
9,
4314,
28359,
9,
21011,
1,
18161,
9,
207,
15,
31,
107,
52,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there any way to get a dual monitor view inside of a remote desktop session?
===
I frequently have to remote into my work desktop using rdp. One pain point has always been that I have a dual screen setup at home, but am unable to take advantage of it because the rdp session only uses 1 screen. My workaround up to this point has been to open a 2nd session to s different box on the secondary monitor and work that way. Does anyone know if there is a way to get rdp to take advantage of a dual monitor setup? | 0 | [
2,
25,
80,
186,
161,
20,
164,
21,
5747,
7626,
1418,
572,
16,
21,
5388,
17404,
3723,
60,
800,
3726,
3726,
31,
3086,
57,
20,
5388,
77,
51,
170,
17404,
568,
13,
897,
306,
9,
53,
1257,
454,
63,
550,
74,
30,
31,
57,
21,
5747,
232... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C# structural highlighting in Visual Studio 2008
===
I'm looking for an add-in to VS2008 that can enable structural highlighting (**vertical** lines in blocks of code) in the C# code editor.
I tried out CodeRush, but while the structural highlighting was great, I was annoyed with all the other stuff in CodeRush. No matter how much I disabled in the options, I couldn't quite get rid of it.
So I'm looking for another add-in that enables structural highlighting and (ideally) nothing else. Know of any?
| 0 | [
2,
272,
5910,
7208,
23102,
19,
3458,
1120,
570,
800,
3726,
3726,
31,
22,
79,
699,
26,
40,
3547,
8,
108,
20,
4611,
2753,
30,
92,
9240,
7208,
23102,
13,
5,
1409,
8122,
4272,
1409,
1560,
19,
5198,
16,
1797,
6,
19,
14,
272,
5910,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Detect Mobile view in zend framework not happening?
===
I am trying to implement the seperate template for mobile view using zend framework. I am following this [guide][1]
[1]: http://framework.zend.com/manual/en/zend.http.user-agent.html#zend.http.user-agent.quick-start
I have the following plugin called `Mobile.php`
<?php
class ZC_Controller_Plugin_Mobile extends Zend_Controller_Plugin_Abstract
{
public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request) {
$bootstrap = Zend_Controller_Front::getInstance()->getParam("bootstrap");
$useragent = $bootstrap->getResource("useragent");
$device = $useragent->getDevice();
Zend_Registry::set("useragent", $useragent);
Zend_Registry::set("device", $device);
/**
* @todo change this to be Mobile
*/
echo $device->getType() . " is the type of device";
}
}
This works in Desktop view.I got `desktop is the type of device` as the output when i run the site.When check the same , i got the following Application error,
[internal function]:zend_Http_UserAgent_Features_WurflApi::getFromRequest...
I am getting the error in this following line when i run site on mobile `$device = $useragent->getDevice();`
Kindly advice on this | 0 | [
2,
9092,
3241,
1418,
19,
10526,
43,
6596,
52,
4942,
60,
800,
3726,
3726,
31,
589,
749,
20,
8713,
14,
10332,
106,
1373,
22894,
26,
3241,
1418,
568,
10526,
43,
6596,
9,
31,
589,
249,
48,
636,
17599,
500,
2558,
165,
500,
636,
165,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Ruby validation based off of different field
===
I am new to rails validation.
I have two fields:
field :feed_entitlements, :type => Array
...
field :alert_news, :type => Boolean, :default => false
I want to put a validation on "alert_news" that requires a count > 0 in "feed_entitlements". Is this possible using a rails validation? It seems like all examples of validations that I can find are simple "can't be blank" type problems.
Thanks. | 0 | [
2,
10811,
27999,
432,
168,
16,
421,
575,
800,
3726,
3726,
31,
589,
78,
20,
2240,
18,
27999,
9,
31,
57,
81,
2861,
45,
575,
13,
45,
20954,
1,
219,
22235,
6601,
15,
13,
45,
4474,
800,
1,
7718,
13,
9,
9,
9,
575,
13,
45,
192,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using compression with C# webservice client in Visual Studio 2010
===
I'm invoking a webservice using C# and Visual Studio 2010. VS2010 takes care of generating the client proxy code when I provide the link to the WSDL. Is there a way to configure the client code to set the 'Accept-Encoding' header to (gzip, deflate) and handle compressed responses from the server? If not, how do I write custom code to handle this? | 0 | [
2,
568,
14864,
29,
272,
5910,
2741,
11449,
6819,
19,
3458,
1120,
498,
800,
3726,
3726,
31,
22,
79,
19,
2625,
1581,
21,
2741,
11449,
568,
272,
5910,
17,
3458,
1120,
498,
9,
4611,
2751,
1384,
781,
16,
13500,
14,
6819,
27188,
1797,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What's wrong with this MySQL Query
===
I have this table.
id name parents
1 Apparel
46 Apparel 1
47 Child Apparel 1,46
49 Child Apparel 2 46,1
I tried this query and it works fine.
SELECT * FROM categories WHERE 1 IN (parents)
id name parents
46 Apparel 1
47 Child Apparel 1,46
Why this query brings 1 record instead of 2?
SELECT * FROM categories WHERE 46 IN (parents)
id name parents
49 Child Apparel 2 46,1
| 0 | [
2,
98,
22,
18,
1389,
29,
48,
51,
18,
22402,
25597,
800,
3726,
3726,
31,
57,
48,
859,
9,
4924,
204,
1144,
137,
27536,
5084,
27536,
137,
5687,
850,
27536,
137,
15,
3516,
4648,
850,
27536,
172,
5084,
15,
165,
31,
794,
48,
25597,
17... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to get NeighboringCell Information(related to network info) in blackberry
===
I have to grapple to find neighbourCell information using the blackberry api package "net.rim.device.api.system" . The same is directly available in android at the link:
http://developer.android.com/reference/android/telephony/TelephonyManager.html.
can anybody suggest me some alternative to workaround ?
Thanks
| 0 | [
2,
184,
20,
164,
8268,
9725,
676,
5,
6203,
20,
982,
15404,
6,
19,
27367,
800,
3726,
3726,
31,
57,
20,
7711,
24212,
20,
477,
22245,
9725,
676,
568,
14,
27367,
21,
2159,
6030,
13,
7,
2328,
9,
14786,
9,
546,
18507,
9,
2552,
49,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a way to decrypt UTF32 string with Crypto++?
===
I'm trying to decrypt a UTF-32 encoded string with CryptoPP.
InvertibleRSAFunction privateKey;
privateKey.Initialize(params.GetModulus(), params.GetPublicExponent(), params.GetPrivateExponent());
RSAES_OAEP_SHA_Decryptor decryptor(privateKey);
StringSource(cipher, true,
new PK_DecryptorFilter(rng, decryptor,
new StringSink(recovered)
) // PK_DecryptorFilter
); // StringSource
But the problem is my plaintext is UTF-32 encoded. So recovered text is as "74 00 00 00 65 00 00 00 73 00 00 00 74 00 00 00" in memory (test). Of course I'm getting only the first byte 0x74 (t) with the code above. Is there a way to decrypt in UTF32 format? | 0 | [
2,
25,
80,
21,
161,
20,
121,
11435,
287,
11720,
3125,
3724,
29,
16277,
20512,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
121,
11435,
21,
287,
11720,
8,
3125,
13665,
3724,
29,
16277,
3421,
9,
19,
8122,
3426,
22038,
22359,
932,
4237,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Change text property of all items in form
===
i have many buttons and labels on my c# form. I have a button that changes all butons' and labels' text properties (change language button). Do i have to write all items in click event of button or is there a method that scans all form control items and change their text properties.
Thank you. | 0 | [
2,
753,
1854,
1354,
16,
65,
3755,
19,
505,
800,
3726,
3726,
31,
57,
151,
12861,
17,
13173,
27,
51,
272,
5910,
505,
9,
31,
57,
21,
5167,
30,
1693,
65,
47,
4710,
22,
17,
13173,
22,
1854,
3704,
13,
5,
16229,
816,
5167,
6,
9,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What could be a good disk intensive program
===
I am looking to run some experiments which are hard disk RW intensive on my unix box.
Could you suggest me some programs which I can use for this purpose ? | 0 | [
2,
98,
110,
44,
21,
254,
8582,
13633,
625,
800,
3726,
3726,
31,
589,
699,
20,
485,
109,
7715,
56,
50,
552,
8582,
13,
20393,
13633,
27,
51,
22540,
1649,
9,
110,
42,
5601,
55,
109,
1726,
56,
31,
92,
275,
26,
48,
2131,
13,
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... |
Firewall blocking/unblocking a port
===
I have an app installed on a server with windows 2008 R2 OS and hosted it on port 8080 (used apache tomcat for this).. I'm able to access the app through the URL..
Now, the problem is that I'm unable to access the URL (I mean app) from any other LAN connected machines.
After some exploration, I turned off the firewall of that server and I was able to access the app from other LAN connected machines..
I came to know the problem i.e Firewall is blocking that port 8080..
I can turn off the firewall, but it is not recommended right.. my requirement is to turn on the firewall and make this app accessible from any other LAN connected machine... I think I need to make that port open/something like that, but I don't have any idea regarding this.. no network admin is available as of now, so had to do it myself :( Kindly help me regarding this...
Thanks in advance!! :)
PS: I cannot download/install any other software's on that server, please suggest some way which can happen via command prompt/some settings to access that port from other LAN connected machines
| 0 | [
2,
535,
6051,
11828,
118,
1020,
12048,
68,
21,
1295,
800,
3726,
3726,
31,
57,
40,
4865,
4066,
27,
21,
8128,
29,
1936,
570,
761,
135,
13,
759,
17,
2812,
32,
27,
1295,
2972,
2887,
13,
5,
8795,
17140,
2067,
5782,
26,
48,
6,
9,
9,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I get data from a stored procedure into a temp table ?
===
Am working on sybase. All I need is something like this
Select * into #tmp exec my_stp; | 0 | [
2,
184,
92,
31,
164,
1054,
37,
21,
8214,
7004,
77,
21,
13,
9577,
859,
13,
60,
800,
3726,
3726,
589,
638,
27,
10315,
8436,
9,
65,
31,
376,
25,
301,
101,
48,
5407,
1637,
77,
6926,
38,
2554,
1396,
3319,
51,
1,
18,
13726,
73,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
#define TRACE(...) doesn't work in C++
===
I have the following preprocessor divective:
#ifndef NDEBUG
#define TRACE printf
#else
#define TRACE(...)
#endif
and example of usage is:
TRACE("TRACE: some parameter = %i\n", param);
In C all works perfectly well when I build both debug and release versions, but in C++ compiler emits the following:
warning: invalid character in macro parameter name
error: badly punctuated parameter list in `#define'
and points these warning and error to the 'TRACE(...)' directive.
How to write this in C++ correctly?
| 0 | [
2,
6926,
546,
7509,
5565,
5,
9,
9,
9,
6,
1437,
22,
38,
170,
19,
272,
20512,
800,
3726,
3726,
31,
57,
14,
249,
782,
16835,
248,
8523,
150,
6142,
45,
6926,
821,
103,
13862,
13,
12597,
16254,
6926,
546,
7509,
5565,
4793,
410,
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... |
What is C# analog of C++ std::pair?
===
I am interested what is C# analog of C++ std::pair? I have found System.Web.UI.Pair class, but wanted something template based.
Thank you! | 0 | [
2,
98,
25,
272,
5910,
11523,
16,
272,
20512,
354,
43,
45,
45,
306,
2642,
60,
800,
3726,
3726,
31,
589,
3158,
98,
25,
272,
5910,
11523,
16,
272,
20512,
354,
43,
45,
45,
306,
2642,
60,
31,
57,
216,
329,
9,
14113,
9,
5661,
9,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... |
How can I clone a .NET solution?
===
Starting new .NET projects always involves a bit of work. You have to create the solution, add projects for different tiers (Domain, DAL, Web, Test), set up references, solution structure, copy javascript files, css templates and master pages etc etc.
What I'd like is **an easy way of cloning any given solution**.
If you use copy/paste, the problem is that you need to then go through renaming namespaces, assembly names, solution names, GUIDs etc.
Is there a way of automating this?
Something like this would be great:
solutionclone.exe --solution=c:\code\abc\template.sln --to=c:\code\xyz --newname=MySolution
I'm aware that Visual Studio has project templates, but I've not seen solution templates.
Ideas welcome, thanks in advance folks!
| 0 | [
2,
184,
92,
31,
13871,
21,
13,
9,
2328,
4295,
60,
800,
3726,
3726,
1422,
78,
13,
9,
2328,
2314,
550,
6569,
21,
1142,
16,
170,
9,
42,
57,
20,
1600,
14,
4295,
15,
3547,
2314,
26,
421,
7197,
18,
13,
5,
537,
6232,
15,
6868,
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... |
Free program for building/Managing Test Plans?
===
Is there a free tool to manage/write test plans? At the moment my firm uses an excel spreadsheet, but it's less than Ideal.
I'm not talking about Unit tests but functional testing.
If there isn't a Free peice of software available what features should such software have. What needs to be recorded. Becuase I might just build something myself if I can't find anything suitable. | 0 | [
2,
551,
625,
26,
353,
118,
177,
7426,
1289,
1753,
60,
800,
3726,
3726,
25,
80,
21,
551,
5607,
20,
4705,
118,
23716,
1289,
1753,
60,
35,
14,
688,
51,
1904,
2027,
40,
20700,
1789,
17627,
15,
47,
32,
22,
18,
787,
119,
5628,
9,
31... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
[C++] What is returned from a function that returns the return of another function?
===
If I want to call Bar() instead of Foo(), does Bar() return me a copy (additional overhead) of what Foo() returns, or it returns the same object which Foo() places on the temporary stack?
vector<int> Foo(){
vector<int> result;
result.push_back(1);
return result;
}
vector<int> Bar(){
return Foo();
}
| 0 | [
2,
636,
150,
20512,
500,
98,
25,
587,
37,
21,
1990,
30,
4815,
14,
788,
16,
226,
1990,
60,
800,
3726,
3726,
100,
31,
259,
20,
645,
748,
5,
6,
700,
16,
4310,
111,
5,
6,
15,
630,
748,
5,
6,
788,
55,
21,
4344,
13,
5,
14854,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
[C++] Multithreading and refcounted object
===
I'm currently trying to pass a mono threaded program to multithread. This software do heavy usage of "refCounted" objects, which lead to some issues in multithread. I'm looking for some design pattern or something that might solve my problem.
The main problem is object deletion between thread, normally deletion only decrement the reference counting, and when refcount is equal to zero, then the object is deleted. This work well in monothread program, and allow some great performance improvement with copy of big object.
However, in multithread, two threads might want to delete the same object concurrently, as the object is protected by a mutex, only one thread delete the object and block the other one. But when it releases the mutex, then the other thread continue its execution with invalid (freed object), which lead to memory corruption.
Here is an example with this class RefCountedObject
class RefCountedObject
{
public:
RefCountedObject()
: _refCount( new U32(1) )
{}
RefCountedObject( const RefCountedObject& obj )
: _refCount( obj._refCount )
{
ACE_Guard< ACE_Mutex > guard( _refCountMutex );
++(*_refCount);
}
~RefCountedObject()
{
Destroy();
}
RefCountedObject& operator=( const RefCountedObject& obj )
{
if( this != &obj )
{
Destroy();
ACE_Guard< ACE_Mutex > guard( _refCountMutex );
_refCount = obj._refCount;
++(*_refCount);
}
return *this;
}
private:
void Destroy()
{
ACE_Guard< ACE_Mutex > guard( _refCountMutex ); // thread2 are waiting here
--(*_refCount); // This cause a free memory write by the thread2
if( 0 == *_refCount )
delete _refCount;
}
private:
mutable U32* _refCount;
mutable ACE_Mutex _refCountMutex;
};
Suppose that two threads want to delete the same RefCountedObject, both are in ~RefCountedObject and call Destroy(), the first thread has locked the mutex and the other one is waiting. After the deletion of the object by the first thread, the second will continue its execution and cause a free memory write.
Anyone has experience with a similar problem and found a solution ? | 0 | [
2,
636,
150,
20512,
500,
1889,
96,
22883,
17,
13,
14057,
16549,
69,
3095,
800,
3726,
3726,
31,
22,
79,
871,
749,
20,
1477,
21,
4129,
9322,
69,
625,
20,
1889,
96,
10647,
9,
48,
2306,
107,
1278,
7514,
16,
13,
7,
14057,
16549,
69,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Prevent Default Behavior in Key Listeners in YUI
===
I have a web page where I'd like to remap Ctrl+N to something new. I followed YUI's example of register Key Listeners and my function is called but Firefox still creates a new window. Seems to work fine IE7. How do stop the new window from showing up?
Example:
var kl2 = new YAHOO.util.KeyListener(document, { ctrl:true, keys:78 },
{fn:function(event) {
YAHOO.util.Event.stopEvent(event); // Doesn't help
alert('Click');}});
kl2.enable();
| 0 | [
2,
2501,
12838,
3257,
19,
1246,
15672,
19,
2600,
49,
800,
3726,
3726,
31,
57,
21,
2741,
2478,
113,
31,
22,
43,
101,
20,
302,
15022,
13,
4812,
6362,
2430,
103,
20,
301,
78,
9,
31,
709,
2600,
49,
22,
18,
823,
16,
2243,
1246,
156... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Maximum length of the textual representation of an IPv6 address?
===
I want to store the data returned by `$_SERVER["REMOTE_ADDR"]` in PHP into a DB field, pretty simple task, really. The problem is that I can't find any proper information about the maximum length of the **textual representation** of an IPv6 address, which is what a webserver provides through `$_SERVER["REMOTE_ADDR"]`.
I'm not interested in converting the textual representation into the 128 bits the address is usually encoded in, I just want to know how many characters maximum are needed to store any IPv6 address returned by `$_SERVER["REMOTE_ADDR"]`. | 2 | [
2,
2979,
1476,
16,
14,
1854,
6948,
5442,
16,
40,
31,
10166,
379,
3218,
60,
800,
3726,
3726,
31,
259,
20,
1718,
14,
1054,
587,
34,
13,
1,
4403,
1,
10321,
106,
2558,
7,
99,
20209,
1,
14854,
139,
7,
500,
1,
19,
13,
26120,
77,
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... |
What's quicker; including another file or querying a MySQL database in PHP?
===
In PHP, which is quicker; using `include('somefile.php')` or querying a MySQL database with a simple `SELECT` query to get the same information?
For example, say you had a JavaScript autocomplete search field which needed 3,000 terms to match against. Is it quicker to read those terms in from another file using `include` or to read them from a MySQL database using a simple `SELECT` query? | 0 | [
2,
98,
22,
18,
21927,
73,
215,
226,
3893,
54,
25597,
68,
21,
51,
18,
22402,
6018,
19,
13,
26120,
60,
800,
3726,
3726,
19,
13,
26120,
15,
56,
25,
21927,
73,
568,
13,
1,
22640,
5,
22,
3220,
16877,
9,
26120,
22,
6,
1,
54,
25597... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Learning VB6
===
I'm moving from Java Development to a MSFT environment. The app is currently written in VB6 and while its going to go to VB.NET/C# in the future, I need to find a way to pick up VB6 now. I'm told its old, and there will be no books on it available these days.
Any tips? Sites? | 0 | [
2,
2477,
13,
20468,
379,
800,
3726,
3726,
31,
22,
79,
1219,
37,
8247,
522,
20,
21,
4235,
3072,
2307,
9,
14,
4865,
25,
871,
642,
19,
13,
20468,
379,
17,
133,
82,
228,
20,
162,
20,
13,
20468,
9,
2328,
118,
150,
5910,
19,
14,
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... |
is there a difference between DataTable.Clear and DataTable.Rows.Clear?
===
I recall there is a difference between some methods/properties called directly on the [DataTable][1] class, and the identically named methods/properties on the [DataTable.Rows][2] property. (Might have been the RowCount/Count property for which I read this.) The difference is one of them disregards [DataRow.RowState][3], and the other respects/uses it.
In this particular case I'm wondering about the difference between [DataTable.Clear][4] and [DataTable.Rows.Clear][5]. I can imagine one of them actually removes all rows, and the other one just marks them as deleted.
So my question is, **is there a difference between the two Clear methods, and if so what is the difference?**
(Oh, this is for .NET 1.1 btw, in case the semantics changed from one version to another.)
[1]: http://msdn.microsoft.com/en-us/library/system.data.datatable(VS.71).aspx
[2]: http://msdn.microsoft.com/en-us/library/system.data.datatable.rows(VS.71).aspx
[3]: http://msdn.microsoft.com/en-us/library/system.data.datarow.rowstate(VS.71).aspx
[4]: http://msdn.microsoft.com/en-us/library/system.data.datatable.clear(VS.71).aspx
[5]: http://msdn.microsoft.com/en-us/library/system.data.datarowcollection.clear(VS.71).aspx | 0 | [
2,
25,
80,
21,
2841,
128,
1054,
5924,
9,
18600,
17,
1054,
5924,
9,
5417,
18,
9,
18600,
60,
800,
3726,
3726,
31,
7111,
80,
25,
21,
2841,
128,
109,
3195,
118,
10890,
106,
3915,
227,
1703,
27,
14,
636,
18768,
5924,
500,
2558,
165,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how can I scale the content of iframe
===
how can I scale the content of iframe (in my example is an html page), and is not a popup is in page of my web site?
So I want for example to put the content that appears in iframe in for example 80% of the real size.
Can someone help me please....
Thanks
(question scraped from http://www.htmlcodetutorial.com/help/sutra32209.html) | 0 | [
2,
184,
92,
31,
3464,
14,
2331,
16,
31,
8361,
800,
3726,
3726,
184,
92,
31,
3464,
14,
2331,
16,
31,
8361,
13,
5,
108,
51,
823,
25,
40,
13,
15895,
2478,
6,
15,
17,
25,
52,
21,
1675,
576,
25,
19,
2478,
16,
51,
2741,
689,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I convert List<object> to Hashtable in C#?
===
I have a list of objects, each containing an Id, Code and Description.
I need to convert this list into a Hashtable, using **Description** as the key and **Id** as the value.
This is so the Hashtable can then be serialised to JSON.
Is there a way to convert from List<Object> to Hashtable without looping through each item in the list? | 0 | [
2,
184,
92,
31,
8406,
968,
1,
23793,
1,
20,
19170,
5924,
19,
272,
5910,
60,
800,
3726,
3726,
31,
57,
21,
968,
16,
3916,
15,
206,
3503,
40,
4924,
15,
1797,
17,
5318,
9,
31,
376,
20,
8406,
48,
968,
77,
21,
19170,
5924,
15,
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... |
Searching date meta tags in Sharepoint
===
I'm currently looking at indexing an ASP website from Sharepoint and I need to replicate the old "advanced search" schema that the users are familiar with. In order to do this I need to index a few meta tags from the web pages. This is easily done and for the text fields I can use them in the search as well. However for date meta tags, like "expired" or "published" I'm having some problems. The problem is basically that the meta tags are crawled as "text", but I need Sharepoint to parse them as datetime. I've seen a few posts on [TechNet][1] asking for the same, but with no answer.
[1]: https://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2614064&SiteID=17 TechNet
[1]: https://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2614064&SiteID=17 | 0 | [
2,
5792,
1231,
7618,
3383,
18,
19,
1891,
3132,
800,
3726,
3726,
31,
22,
79,
871,
699,
35,
4348,
68,
40,
28,
306,
2271,
37,
1891,
3132,
17,
31,
376,
20,
22156,
14,
315,
13,
7,
1283,
2686,
11014,
2122,
7,
23874,
30,
14,
3878,
50... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Better preverifiers than Sun WTK
===
I'm currently using the sun preverifier to preverify my MIDlet. I'm finding that it can be a bit slow, doesnt give any decent error messages and is only available as a windows exe.
Are there any better preverifiers around that will work cross platform (linux specifically) | 0 | [
2,
574,
782,
2304,
16292,
18,
119,
939,
619,
38,
197,
800,
3726,
3726,
31,
22,
79,
871,
568,
14,
939,
782,
2304,
16292,
20,
782,
2304,
8612,
51,
907,
1336,
9,
31,
22,
79,
3007,
30,
32,
92,
44,
21,
1142,
2276,
15,
5886,
590,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SQL 2005 Foreign key between another base
===
Is it possible to create in a table of database a foreign key to a column of table in another database in SQL 2005 ? | 0 | [
2,
4444,
255,
812,
1228,
1246,
128,
226,
1000,
800,
3726,
3726,
25,
32,
938,
20,
1600,
19,
21,
859,
16,
6018,
21,
1228,
1246,
20,
21,
4698,
16,
859,
19,
226,
6018,
19,
4444,
255,
812,
13,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How can I capture all exceptions from a wxPython application?
===
I'm writing a little debug app for a bit of kit we're developing and I'd like to roll it out to a few users to see if they can provoke any crashes. Does anyone know a way of effectively wrapping a wxPython app to catch any and all unhandled exceptions that would cause the app to crash?
Ideally I'd want to capture all output (not just errors) and log it to a file. Any unhandled excpetions ought to log to the current file and then allow the exception to pass on as per usual (i.e. the logging process ought to be transparent).
I'm sure someone must have done something along these lines before, but I've not managed to turn up anything that looks useful via google. | 0 | [
2,
184,
92,
31,
3683,
65,
13392,
37,
21,
619,
396,
6448,
11570,
3010,
60,
800,
3726,
3726,
31,
22,
79,
1174,
21,
265,
121,
16254,
4865,
26,
21,
1142,
16,
6346,
95,
22,
99,
3561,
17,
31,
22,
43,
101,
20,
3001,
32,
70,
20,
21,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to convert a DB2 date-time string into an Excel Date
===
I'll regularly get an extract from a DB/2 database with dates and timestaps formatted like this:
2002-01-15-00.00.00.000000
2008-01-05-12.36.05.190000
9999-12-31-24.00.00.000000
Is there an easier way to convert this into the Excel date format than decomposing with substrings?
DB2date = DateValue(Left(a, 4) + "/" + Mid(a, 6, 2) + "/" + Mid(a, 9, 2))
thanks for your help!
| 0 | [
2,
184,
20,
8406,
21,
13,
9007,
135,
1231,
8,
891,
3724,
77,
40,
20700,
1231,
800,
3726,
3726,
31,
22,
211,
4217,
164,
40,
10962,
37,
21,
13,
9007,
15718,
6018,
29,
4076,
17,
436,
536,
1919,
13,
29850,
101,
48,
45,
1093,
8,
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... |
Software development process for small teams
===
I might be an exception here but I have never worked on a team with more than three developers and / or five people. Still we could manager to get the job done (somehow).
Is there a software development process which fits this "extreme" scenario? And, if you work as a standalone programmer is there something you can adapt to your daily life to make it more predicatable, coherent, documented and still get the job done? | 0 | [
2,
2306,
522,
953,
26,
284,
952,
800,
3726,
3726,
31,
530,
44,
40,
5391,
235,
47,
31,
57,
243,
577,
27,
21,
173,
29,
91,
119,
132,
10168,
17,
13,
118,
54,
355,
148,
9,
174,
95,
110,
1382,
20,
164,
14,
1205,
677,
13,
5,
322... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 named_scopes with joins
===
I'm trying to create a named_scope that uses a join, but although the generated SQL looks right, the result are garbage. For example:
class Clip < ActiveRecord::Base
named_scope :visible, {
:joins => "INNER JOIN series ON series.id = clips.owner_id INNER JOIN shows on shows.id = series.show_id",
:conditions=>"shows.visible = 1 AND clips.owner_type = 'Series' "
}
(A Clip is owned by a Series, a Series belongs to a Show, a Show can be visible or invisible).
Clip.all does:
SELECT * FROM `clips`
Clip.visible.all does:
SELECT * FROM `clips` INNER JOIN series ON series.id = clips.owner_id INNER JOIN shows on shows.id = series.show_id WHERE (shows.visible = 1 AND clips.owner_type = 'Series' )
This looks okay. But the resulting array of Clip models includes a Clip with an ID that's not in the database - it's picked up a show ID instead. Where am I going wrong?
| 0 | [
2,
2240,
18,
377,
1,
11555,
18,
29,
10612,
800,
3726,
3726,
31,
22,
79,
749,
20,
1600,
21,
377,
1,
11555,
30,
2027,
21,
1865,
15,
47,
419,
14,
6756,
4444,
255,
1879,
193,
15,
14,
829,
50,
15024,
9,
26,
823,
45,
718,
12229,
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... |
Restore Eclipse subversion project connection
===
I have a project in subversion, which I'm developing using Eclipse. I did the original checkout from the svn repository from inside Eclipse. All was well for some weeks then for some unknown reason, Eclipse (specifically: subclipse in Ganymede) no longer recognizes my project as being under svn control. The team context-menu only shows the basic "apply patch" / "share this project" menu options. From the shell, I can still update the project using the svn command line tools, so I know that the svn credentials still work. Other projects under subversion in the same copy of Eclipse still work.
I realise that I can delete the local copy and check it out again, but I'd rather understand what has gone wrong - fix the problem, rather than mask the symptoms. Where does Eclipse store its knowledge of which projects are under version control? I looked at the `.project` file and the `.settings` directory, but couldn't see any obvious mention of svn nature or anything similar, even in the projects that are still working properly.
| 0 | [
2,
8454,
11652,
972,
10898,
669,
2760,
800,
3726,
3726,
31,
57,
21,
669,
19,
972,
10898,
15,
56,
31,
22,
79,
3561,
568,
11652,
9,
31,
144,
14,
501,
2631,
1320,
37,
14,
13,
18,
16578,
24869,
37,
572,
11652,
9,
65,
23,
134,
26,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to upload File JQuery
===
I would like to upload a file with jquery.This is my HTML
<span>File</span>
<input type="file" id="file" name="file" size="10"/>
<input id="uploadbutton" type="button" value="Upload"/>
And here my javascript:
$(document).ready(function() {
$("#uploadbutton").click(function() {
var filename = $("#file").val();
$.ajax({
type: "POST",
url: "addFile.do",
enctype: 'multipart/form-data',
data: "file=filename",
success: function(){
alert( "Data Uploaded: ");
}
});
});
});
| 0 | [
2,
184,
20,
71,
8294,
3893,
487,
8190,
93,
800,
3726,
3726,
31,
83,
101,
20,
71,
8294,
21,
3893,
29,
487,
8190,
93,
9,
1565,
25,
51,
13,
15895,
13,
1,
18,
3206,
1,
16877,
1,
118,
18,
3206,
1,
13,
1,
108,
4881,
1001,
3726,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 merge undo disks on Virtual Server 2005
===
Error message: "Virtual Server was unable to commit the changes made during the current session of "<VIRTUAL MACHINE NAME>". A likely cause of this problem is the parent virtual hard disk cannot be opened for read/write or it might be in use or the user has no read/write/modify permissions. The data in the undo disk is retained."
I can start up that virtual machine, do work on it, it gets saved, but when I try to overwrite the undo disk, I get this message. **How can I check if I have the required permission to overwrite the undo disk?** Of course I turned off the virtual machine first, and tried to initiate a "Merge Undo Disks" operation that way, so I don't think that the virtual hard disk is locked. | 0 | [
2,
92,
22,
38,
12666,
367,
537,
8582,
18,
27,
6599,
8128,
812,
800,
3726,
3726,
7019,
2802,
45,
13,
7,
8145,
38,
6948,
8128,
23,
2343,
20,
9686,
14,
1693,
117,
112,
14,
866,
3723,
16,
13,
7,
1,
8145,
38,
6948,
1940,
204,
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... |
Tcl/Tk examples?
===
[Tcl/Tk][1] is a simple way to script small GUIs.
Can anyone give a nice example with a *button* and a *text* widget. When the button is pressed should a shell command be executed and the output piped to the *text* widget.
If you have other nice and clean examples for useful tasks, please add them too.
[1]: http://en.wikipedia.org/wiki/Tcl | 0 | [
2,
13,
38,
5316,
118,
38,
197,
3770,
60,
800,
3726,
3726,
636,
38,
5316,
118,
38,
197,
500,
2558,
165,
500,
25,
21,
1935,
161,
20,
3884,
284,
9457,
18,
9,
92,
1276,
590,
21,
2210,
823,
29,
21,
1637,
811,
444,
2483,
17,
21,
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 remotely run a DTSX package from bat file?
===
I am trying to remotely run a DTSX package from a bat file with this command:
DTEXEC /DTS "\File System\MY_PACKAGE_NAME" /SERVER MY_SERVER_NAME /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING V
This is working fine locally but failing remotely (I do have admin rights on the machine I am pointing to and I have SQL permissions as well) I am getting a timeout error (Login timeout expired). | 0 | [
2,
184,
20,
23288,
485,
21,
13,
43,
38,
18,
396,
6030,
37,
3570,
3893,
60,
800,
3726,
3726,
31,
589,
749,
20,
23288,
485,
21,
13,
43,
38,
18,
396,
6030,
37,
21,
3570,
3893,
29,
48,
1202,
45,
13,
43,
38,
1706,
3319,
13,
118,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I make an array of constants in a NSIS install script?
===
I have a large number of NSIS install scripts (.nsi files) that simply define a bunch of constants and then the main installer logic resides an include file (.nsh) which is common to each of the installers. One of the include files looks like this:
!ifdef ABC_SUBFOLDER
RMDir /r "$ABCPath\Data\${ABC_SUBFOLDER}"
SetOutPath "$ABCPath\Data\${ABC_SUBFOLDER}"
File /r "${LOCAL_FOLDER}\ABC\${ABC_SUBFOLDER}\*.*"
!endif
!ifdef ABC_SUBFOLDER2
RMDir /r "$ABCPath\Data\${ABC_SUBFOLDER2}"
SetOutPath "$ABCPath\Data\${ABC_SUBFOLDER2}"
File /r "${LOCAL_FOLDER2}\ABC\${ABC_SUBFOLDER2}\*.*"
!endif
!ifdef ABC_SUBFOLDER3
RMDir /r "$ABCPath\Data\${ABC_SUBFOLDER3}"
SetOutPath "$ABCPath\Data\${ABC_SUBFOLDER3}"
File /r "${LOCAL_FOLDER3}\ABC\${ABC_SUBFOLDER3}\*.*"
!endif
... and so on up to 15 subfolders that may or may not be defined in the top level .nsi file. My question is, is there any better syntax in NSIS to achieve this without cut and pasting every time I need to increase the number of subfolders to support? | 0 | [
2,
184,
92,
31,
233,
40,
7718,
16,
3587,
18,
19,
21,
13,
103,
4557,
16146,
3884,
60,
800,
3726,
3726,
31,
57,
21,
370,
234,
16,
13,
103,
4557,
16146,
17505,
13,
5,
9,
2172,
49,
6488,
6,
30,
1659,
9267,
21,
7653,
16,
3587,
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... |
Oracle instant client with OraOLE DB provider?
===
Is it possible to use oracle instant client for application that use oraoledb driver for connecting to oracle 9i DB. | 0 | [
2,
15759,
6322,
6819,
29,
54,
58,
6069,
13,
9007,
11747,
60,
800,
3726,
3726,
25,
32,
938,
20,
275,
15759,
6322,
6819,
26,
3010,
30,
275,
54,
6281,
1294,
220,
2425,
26,
6440,
20,
15759,
561,
49,
13,
9007,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Disabling a EventTrigger\Storyboard Dynamically
===
<Grid.Triggers>
<EventTrigger RoutedEvent="Border.Loaded">
<EventTrigger.Actions >
<BeginStoryboard>
<Storyboard x:Name="MyStoryboard" AutoReverse="True" RepeatBehavior="Forever">
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
<SplineColorKeyFrame KeyTime="00:00:01" Value="#FFFAFAFA"/>
</ColorAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Grid.Triggers>
How do I enable\disable this animation based on binding to a property?
| 0 | [
2,
1460,
58,
8599,
21,
807,
3367,
11356,
1,
4416,
2806,
7782,
1326,
800,
3726,
3726,
13,
1,
16375,
9,
38,
11507,
445,
1,
13,
1,
4943,
38,
3367,
11356,
858,
546,
6645,
3726,
7,
24389,
9,
22546,
7,
1,
13,
1,
4943,
38,
3367,
1135... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Differences between JDK and Java SDK
===
Is there any substantial difference between those two terms?. I understand that JDK stands for Java Development Kit that is a subset of SDK (Software Development Kit). But specifying Java SDK, it should mean the same as JDK. | 0 | [
2,
4921,
128,
487,
43,
197,
17,
8247,
13,
18,
43,
197,
800,
3726,
3726,
25,
80,
186,
6185,
2841,
128,
273,
81,
1663,
60,
9,
31,
1369,
30,
487,
43,
197,
3486,
26,
8247,
522,
6346,
30,
25,
21,
16622,
16,
13,
18,
43,
197,
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... |
jQuery slideToggle jumps around
===
I'm using the jQuery slideToggle function on a site to reveal 'more information' about something. When I trigger the slide, the content is gradually revealed, but is located to the right by about 100 pixels until the end of the animation when it suddenly jumps to the correct position. Going the other way, the content jumps right by the same amount just before it starts its 'hide' animation, then is gradually hidden.
Occurs on IE7/8, FF, Chrome.
Any ideas on how I would fix this?
Thanks in advance. | 0 | [
2,
487,
8190,
93,
6464,
262,
263,
4875,
17659,
140,
800,
3726,
3726,
31,
22,
79,
568,
14,
487,
8190,
93,
6464,
262,
263,
4875,
1990,
27,
21,
689,
20,
6820,
13,
22,
1995,
676,
22,
88,
301,
9,
76,
31,
7286,
14,
6464,
15,
14,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
.Net Localization problem
===
I am currently building an Excel 2007 Add-in using VSTO (latest version + sp1) and .Net 3.5
The code simply takes the position a chart using the Top and Left properties and stores it in an XML file.
The problem im facing is that when the xml is generated using a Vista Ultimate + Excel 2007 + English environment the code works perfectly. When i move this to a Windows Server 2003 + Excel 2007 + French environment it crashes when I try to set the Top and Left properties. Further more it always returns 4 for both values on the server machine.
I have tried to play with the region and language settings but it has not changed anything so far.
I have also tried to store the values as integers instead of the float values being returned by the VSTO objects.
If someone has sone sort of idea what may be going wrong please point me in the right direction.
I will edit once ive traced some more... | 0 | [
2,
13,
9,
2328,
375,
1829,
1448,
800,
3726,
3726,
31,
589,
871,
353,
40,
20700,
624,
3547,
8,
108,
568,
4611,
262,
13,
5,
6554,
384,
615,
2754,
3782,
165,
6,
17,
13,
9,
2328,
203,
9,
264,
14,
1797,
1659,
1384,
14,
649,
21,
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... |
SQL Query which returns a table where each row represents a date in a given range
===
Is it possible to create a SQL query which will return one column which contains the dates from a given date range (e.g. all dates from last year till today). E.g.
dat
----
2007-10-01
2007-10-02
2007-10-03
2007-10-04
...
I am wondering if this is possible as an alternative to creating a table which holds all those dates precalculated. | 0 | [
2,
4444,
255,
25597,
56,
4815,
21,
859,
113,
206,
3131,
4719,
21,
1231,
19,
21,
504,
978,
800,
3726,
3726,
25,
32,
938,
20,
1600,
21,
4444,
255,
25597,
56,
129,
788,
53,
4698,
56,
1588,
14,
4076,
37,
21,
504,
1231,
978,
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... |
obtain current svn revision in webapp
===
what is the best way of displaying/using the revision number in a java webapp?
we just use ant to build our .war archive, no buildserver or such. i'd hope there was some kind if $ref that i could write in a resource file, but this is only updated when the file in question is committed. i need it globally.
what would you recommend? post-commit triggers that update certain files?
custom ant scripts? is there a more non-hacky way of doing this?
or it it better to have my own version number independent of svn. | 0 | [
2,
5545,
866,
13,
18,
16578,
11323,
19,
2741,
7753,
800,
3726,
3726,
98,
25,
14,
246,
161,
16,
17418,
118,
12655,
14,
11323,
234,
19,
21,
8247,
2741,
7753,
60,
95,
114,
275,
40,
38,
20,
1895,
318,
13,
9,
1885,
9250,
15,
90,
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... |
What is Microsoft's official stance on using WCF with Visual Studio 2005?
===
I noticed last night that the WCF extensions for Visual Studio 2005 aren't available on their site any longer. I've read that they want people to use Visual Studio 2008 for WCF/WF/WPF.
Have they made an official statement regarding this? | 0 | [
2,
98,
25,
7099,
22,
18,
989,
10930,
27,
568,
11801,
410,
29,
3458,
1120,
812,
60,
800,
3726,
3726,
31,
2711,
236,
343,
30,
14,
11801,
410,
17529,
26,
3458,
1120,
812,
4847,
22,
38,
904,
27,
66,
689,
186,
1045,
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... |
Parameterized Sql queries
===
This is a nut I'm cracking these days
Application I'm working on has some advanced processing towards SQL. One of the operations selects various metadata on the objects in the current context from different tables, based on the item names in the collection. For this, a range of "select...from...where...in()" is executed, and to prevent malicious SQL code, Sql parameters are used for constructing the contents of the "in()" clause.
However, when the item collection for constructing the "in()" clause is larger than 2100 items, this fails due to the Sql Server limitation of max 2100 Sql parameters per query.
One approach I'm trying out now is creating a #temp table for storing all item names and then joining the table in the original query, instead of using "where in()". This has me scratching my head on how to populate the table with the item names stored in an Array in the .NET code. Surely, there has to be some bulk way to insert everything rather than issuing a separate "insert into" for each item?
Other than that, I'm very much interested in alternative approaches for solving this issue.
Thanks a lot | 0 | [
2,
18906,
1333,
4444,
255,
9386,
2829,
800,
3726,
3726,
48,
25,
21,
8619,
31,
22,
79,
18461,
158,
509,
3010,
31,
22,
79,
638,
27,
63,
109,
2255,
5511,
1016,
4444,
255,
9,
53,
16,
14,
1311,
5407,
18,
617,
28057,
27,
14,
3916,
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 build and deploy Python web applications
===
I have a Python web application consisting of several Python packages. What is the best way of building and deploying this to the servers?
Currently I'm deploying the packages with Capistrano, installing the packages into a virtualenv with bash, and configuring the servers with puppet, but I would like to go for a more Python based solution.
I've been looking a bit into zc.buildout, but it's not clear for me what I can/should use it for. | 0 | [
2,
184,
20,
1895,
17,
17617,
20059,
2741,
3767,
800,
3726,
3726,
31,
57,
21,
20059,
2741,
3010,
4160,
16,
238,
20059,
16875,
9,
98,
25,
14,
246,
161,
16,
353,
17,
17617,
68,
48,
20,
14,
17595,
60,
871,
31,
22,
79,
17617,
68,
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... |
Write a password protected Zip file in Java
===
I need to zip and password protect a file. Is there a good (free) library for this?
| 0 | [
2,
2757,
21,
20884,
3803,
12133,
3893,
19,
8247,
800,
3726,
3726,
31,
376,
20,
12133,
17,
20884,
2196,
21,
3893,
9,
25,
80,
21,
254,
13,
5,
4639,
6,
1248,
26,
48,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How do I use Ruby for shell scripting?
===
I have some simple shell scripting tasks that I want to do
for example: Selecting a file in the working directory from a list of the files matching some regular expression
I know that I can do this sort of thing using standard bash and grep but I would be nice to be able to hack quick scripts that will work in windows and linux without me having to memorize a heap of command line programs and flags ect.
I tried to get this going but ended up getting confused about where I should be getting information such as a handle to the current directory and what class I should be using
So the question is: What do I need to know to write ruby shell scripts? | 0 | [
2,
184,
107,
31,
275,
10811,
26,
3593,
3884,
68,
60,
800,
3726,
3726,
31,
57,
109,
1935,
3593,
3884,
68,
8674,
30,
31,
259,
20,
107,
26,
823,
45,
20764,
21,
3893,
19,
14,
638,
16755,
37,
21,
968,
16,
14,
6488,
10120,
109,
1290... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
experiences using software load balancing vs. a hardware load balancer?
===
The ASP.NET application that I currently amd responsible for at my day job has hit its limit in terms of its ability to scale inside a single server. Obviously we are working toward moving session out of process and the test and hopefully deploy date draws near. I would like to draw on the experiencies of people using the built in load balancing in Windows vs. an appliance solution such as one by Baracudda, Coyote Point, F5 etc. Did you start with one and move to the other and why ?
thoughts and advice appreciated in advance... | 0 | [
2,
5513,
568,
2306,
6305,
16416,
6302,
4611,
9,
21,
7610,
6305,
4468,
139,
60,
800,
3726,
3726,
14,
28,
306,
9,
2328,
3010,
30,
31,
871,
589,
43,
1864,
26,
35,
51,
208,
1205,
63,
770,
82,
4496,
19,
1663,
16,
82,
2165,
20,
3464... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Calculate TPS
===
I have a the following scenarios. I am trying to calculate throughput of the java's XSLT transformer. I have 10 threrads, each iterates 1000 times. The task of the thread is to read the XML and XSLT file and trasnform it and write to a new file.
I want to calculate the TPS. Can you please suggest the way to calculate TPS?
Thanks and Regards,
Phani. | 0 | [
2,
18469,
13,
38,
1919,
800,
3726,
3726,
31,
57,
21,
14,
249,
19611,
9,
31,
589,
749,
20,
18469,
120,
4881,
16,
14,
8247,
22,
18,
993,
18,
255,
38,
8007,
106,
9,
31,
57,
332,
13,
96,
99,
8278,
18,
15,
206,
32,
106,
7759,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What are some best practices for OpenGL coding (esp. w.r.t. object orientation)?
===
This semester, I took a course in computer graphics at my University. At the moment, we're starting to get into some of the more advanced stuff like heightmaps, averaging normals, tesselation etc.
I come from an object-oriented background, so I'm trying to put everything we do into reusable classes. I've had good success creating a camera class, since it depends mostly on the one call to gluLookAt(), which is pretty much independent of the rest of the OpenGL state machine.
However, I'm having some trouble with other aspects. Using objects to represent primitives hasn't really been a success for me. This is because the actual render calls depend on so many external things, like the currently bound texture etc. If you suddenly want to change from a surface normal to a vertex normal for a particular class it causes a severe headache.
I'm starting to wonder whether OO principles are applicable in OpenGL coding. At the very least, I think that I should make my classes less granular.
What is the stack overflow community's views on this? What are your best practices for OpenGL coding? | 0 | [
2,
98,
50,
109,
246,
5242,
26,
368,
8430,
13,
15458,
13,
5,
160,
306,
9,
619,
9,
139,
9,
38,
9,
3095,
10245,
6,
60,
800,
3726,
3726,
48,
13738,
15,
31,
199,
21,
674,
19,
1428,
8351,
35,
51,
155,
9,
35,
14,
688,
15,
95,
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... |
Writing a generic class to handle built-in types
===
Not too practical maybe, but still interesting.
Having some abstract question on matrix multiplication I have quickly implemented a matrix for ints, then tested my assumptions.
And here I noticed that just int matrix is not good, if I occasionally want to use it with decimal or double. Of course, I *could* try just to cast all to double, but that's not convenient way.
Continue with assumption we could have a bunch of objects we are able to add and multiply - why don't use them in my matrix?
So, just after considering it would be a Matrix<T> class now I faced that generic T could not be used, I need it to support some interface which could add and multiply.
And the problem is I could override operators in my class, but I could not introduce an interface which would support operators. And I have an operators in built-in types, but still no interface over them.
What would you do in such a case considering you do not want to duplicate worker class body? Wrappers and implicit casting didn't help me much, I'm interested in a beautiful solution.
Thanks. | 0 | [
2,
1174,
21,
12733,
718,
20,
3053,
392,
8,
108,
2551,
800,
3726,
3726,
52,
266,
5713,
913,
15,
47,
174,
4883,
9,
452,
109,
8502,
1301,
27,
8187,
25432,
31,
57,
976,
6807,
21,
8187,
26,
19,
38,
18,
15,
94,
7631,
51,
20751,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can you control whether a variable's type is dynamic or static in VB9?
===
I would like to use VB9 but am not sure what syntax to use to say that I want a variable to be statically typed as in C#'s:
var foo = new Whatever();
In previous versions of VB:
Dim foo = New Whatever()
created a dynamically typed variable.
Is there a way to get static typing without actually writing the type in VB9? | 0 | [
2,
92,
42,
569,
1472,
21,
7612,
22,
18,
1001,
25,
7782,
54,
12038,
19,
13,
20468,
518,
60,
800,
3726,
3726,
31,
83,
101,
20,
275,
13,
20468,
518,
47,
589,
52,
562,
98,
22649,
20,
275,
20,
395,
30,
31,
259,
21,
7612,
20,
44,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Django, mod_python, apache and wacky sessions
===
I am running a Django through mod_python on Apache on a linux box. I have a custom authentication backend, and middleware that requires authentication for all pages, except static content.
My problem is that after I log in, I will still randomly get the log in screen now and again. It seems to me that each apache process has it's own python process, which in turn has it's own internals. So as long as I get served by the same process I logged in to, everything is fine and dandy. But if my request gets served by a different apache process, I am no longer authenticated.
I have checked the HTTP headers I send with FireBug, and they are the same each time, ie. same cookie.
Is this a known issue and are there workarounds/fixes? | 0 | [
2,
3857,
14541,
15,
7226,
1,
6448,
11570,
15,
17140,
17,
13,
21921,
93,
5763,
800,
3726,
3726,
31,
589,
946,
21,
3857,
14541,
120,
7226,
1,
6448,
11570,
27,
17140,
27,
21,
13024,
1649,
9,
31,
57,
21,
5816,
27963,
97,
2451,
15,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What deployment directories do you use for Rails applications (deploying to a debian box)?
===
I wonder what's the best deployment directory for Rails apps? Some developers use directories such as `/u/apps/#{appname}`. Are there **any** advantages when using `/u/apps/#{appname}` instead of `/var/www/#{appname}` or other OS default directories?
Obviously I want to pick the directory with the best security properties and the least friction for setting up the server environment.
How do you deploy your Rails apps? Why are you using a specific directory? Do you think it really matters anyway? | 0 | [
2,
98,
10475,
559,
1596,
107,
42,
275,
26,
2240,
18,
3767,
13,
5,
17309,
10892,
68,
20,
21,
121,
10035,
1649,
6,
60,
800,
3726,
3726,
31,
2666,
98,
22,
18,
14,
246,
10475,
16755,
26,
2240,
18,
4865,
18,
60,
109,
10168,
275,
55... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Immutable functional objects in highly mutable domain
===
I'm currently learning functional programming in my spare time with Scala, and I have an idle newbie question.
I can see the elegance of having immutable objects when doing something like calculating a Haar wavelet transform - i.e. when the data itself being represented by the objects doesn't change.
But I saw a blog where someone had a small game as an example when demonstrating immutability. If a creature object recieved damage, it didn't change its state - it returned a new creature object with the new hitpoints and a new "aggro towards X" flag. But if we were to design something like a MMORPG, World of Warcraft say. A hundred players in a battleground... possibly thousands of attacks and buffing/debuffing spell effects affecting them in different ways. Is it still possible to design the system with completely immutable objects? To me it would seem like there would be a ginormous swarm of new instances each 'tick'. And to get the currently valid instance of objects, all clients would constantly have to go through some sort of central "gameworld" object, or?
Does functional programming scale for this, or is this a case of "best tool for best job, probably not immutable here"? | 0 | [
2,
797,
7903,
579,
7652,
3916,
19,
2157,
2832,
5924,
4603,
800,
3726,
3726,
31,
22,
79,
871,
2477,
7652,
3143,
19,
51,
8001,
85,
29,
25975,
15,
17,
31,
57,
40,
18652,
78,
5893,
1301,
9,
31,
92,
196,
14,
28191,
16,
452,
797,
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... |
Language Books for Aspiring Experts
===
I'm a big fan of Bill Wagner's [Effective C#](http://www.amazon.co.uk/gp/product/0321245660?ie=UTF8&tag=ajsstuff).
(I believe he's got a [sequel out, too](http://www.amazon.co.uk/gp/product/0321485890?ie=UTF8&tag=ajsstuff))
What I love about this book are:
- It's short.
- It's _not_ for beginners, so it doesn't waste time covering the basics (again).
- It has good, pithy advice for programmers who want to raise their game in C#.
- It's practical, not philosphical.
Can you recommend similar books for other languages?
I would especially like:
- javascript
- Ruby
- SQL (various flavours)
- anything else you can think of, really.
Thanks :) | 4 | [
2,
816,
964,
26,
24502,
8365,
800,
3726,
3726,
31,
22,
79,
21,
580,
2514,
16,
1071,
10661,
22,
18,
636,
14659,
272,
5910,
500,
5,
21127,
6903,
6483,
9,
3812,
6931,
9,
716,
9,
2185,
118,
13321,
118,
14086,
118,
3601,
1941,
21468,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 prevent requirements from getting out of control?
===
I'm interested in data/information/knowledge management, so I am building an application for this purpose in an effort to understand the concepts better. However, since I'm building this for myself (and perhaps for others in the future), I have to play the role of customer/client as well as requirements analyst (in addition to software engineer, quality assurance, tester, and more). This is leading to some problems as there are a large number of features I want, and I'm not sure how to manage them.
Should I track all requirements, and then decide what order to do them in, perhaps breaking them up into several releases? Or should I treat every feature (each has its own set of requirements) as a separate application that will be integrated? Or is there a third (or forth, fifth, or sixth) alternative that I am missing? | 0 | [
2,
184,
107,
42,
2501,
4786,
37,
1017,
70,
16,
569,
60,
800,
3726,
3726,
31,
22,
79,
3158,
19,
1054,
118,
22793,
118,
28774,
1097,
15,
86,
31,
589,
353,
40,
3010,
26,
48,
2131,
19,
40,
2150,
20,
1369,
14,
8700,
574,
9,
207,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Retrieve list of defined roles in java ee 5
===
I was wondering if it would be possible to retrieve the complete list of security roles defined in a web.xml file in the java code? And if so how to do it?
I am aware of the 'isUserInRole' method but I also want to handle cases where a role is requested but not defined (or spelled differently) in the web.xml file. | 0 | [
2,
11917,
968,
16,
2811,
2954,
19,
8247,
13,
2851,
331,
800,
3726,
3726,
31,
23,
5712,
100,
32,
83,
44,
938,
20,
11917,
14,
1279,
968,
16,
1221,
2954,
2811,
19,
21,
2741,
9,
396,
8184,
3893,
19,
14,
8247,
1797,
60,
17,
100,
86... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 handle multiple selection in a drop down style control?
===
I have a WinForms application with a view where the user selects a single time span from a list of predefined time spans in a ComboBox, with it's DropDownStyle property set to DropDownList.
Now, the requirements have changed. The users are going to need the ability to make multiple selections from the list of time spans.
Is it possible to make multiple selections in a ComboBox? How do you present those choices when the ComboBox is collapsed? Don't forget the usability aspect.
Does some other control exist (built in or 3rd party, preferrably a drop down of some sort) that can provide for my users needs?
**Update:** Misleading title... | 0 | [
2,
184,
107,
42,
3053,
1886,
3155,
19,
21,
2804,
125,
1034,
569,
60,
800,
3726,
3726,
31,
57,
21,
628,
4190,
18,
3010,
29,
21,
1418,
113,
14,
4155,
5407,
18,
21,
345,
85,
6289,
37,
21,
968,
16,
782,
13439,
85,
16967,
19,
21,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
mod_python on CentOS under httpd and hsphere
===
I have asked our hosting provider to add mod_python to our httpd server. The server appears to be in an hsphere cluster and they appear to use yum to administer it. He is reporting some dependencies missing and I do't quite understand how that could have come about.
versions (this is as much as I have been given):
CentOS 5
apache - 2 (but he's not sure about the exact version)
mod_python - 3.3.1
numpy - 1.1.1
scipy - 0.6.0
yum - 3.2.8
hsphere - 3.1 patch 1
The error he is reporting is as follows:
yum install mod_python
...
Package mod_python.i386 0:3.2.8-3.1 set to be updated
Processing Dependency: httpd >- 2.0.40 for package: mod_python
Processing Dependency: httpd-mmn = 20051115 for package: mod_python
Finished Dependency Resolution
Error: Missing Dependency: httpd >= 2.0.40 is needed by package mod_python
Error: Missing Dependency: httpd-mmn = 20051115 is needed by package mod_python
Not being a UNIX admin I only have a naive guess about this, but the message would seem to suggest that there is a version mismatch between httpd and mod_python rather than the dependencies being missing completely.
So my question is, what should I ask/tell the Administrator to do?
Is there something obviously wrong with the combination of components above? | 0 | [
2,
7226,
1,
6448,
11570,
27,
5802,
759,
131,
7775,
43,
17,
746,
14079,
800,
3726,
3726,
31,
57,
411,
318,
10637,
11747,
20,
3547,
7226,
1,
6448,
11570,
20,
318,
7775,
43,
8128,
9,
14,
8128,
1780,
20,
44,
19,
40,
746,
14079,
7460... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I build a webpage for printing so it won't split badly over pages?
===
I have a web application that generates a long report and I need to print it. If I just print the page it will break at the end of the physical page. How can I calculate where to make a break in the web page so that the page breaks line up with the physical pages when they print? | 0 | [
2,
184,
107,
31,
1895,
21,
2741,
6486,
26,
7312,
86,
32,
230,
22,
38,
2132,
5730,
84,
4434,
60,
800,
3726,
3726,
31,
57,
21,
2741,
3010,
30,
7920,
18,
21,
175,
1330,
17,
31,
376,
20,
4793,
32,
9,
100,
31,
114,
4793,
14,
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... |
Clearing a list
===
I find it annoying that I can't clear a list. In this example:
a = []
a.append(1)
a.append(2)
a = []
The second time I initialize a to a blank list, it creates a new instance of a list, which is in a different place in memory, so I can't use it to reference the first, not to mention it's inefficient.
The only way I can see of retaining the same pointer is doing something like the following:
for i in range(len(a)):
a.pop()
This seems pretty long-winded though, is there a better way of solving this? | 0 | [
2,
8130,
21,
968,
800,
3726,
3726,
31,
477,
32,
17610,
30,
31,
92,
22,
38,
1207,
21,
968,
9,
19,
48,
823,
45,
21,
800,
20767,
21,
9,
22358,
43,
5,
165,
6,
21,
9,
22358,
43,
5,
135,
6,
21,
800,
20767,
14,
153,
85,
31,
210... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.