unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Are static class instances unique to a request or a server in ASP.NET?
===
On an ASP.NET website, are static classes unique to each web request, or are they instantiated whenever needed and GCed whenever the GC decides to disposed of them?
The reason I ask is because I've written some static classes before in C# and the behavior is different than I would have expected. I would have expected static classes to be unique to each request, but it doesn't seem like that is the case.
If they are not unique to each request, is there a way to allow them to be? | 0 | [
2,
50,
12038,
718,
13946,
2619,
20,
21,
3772,
54,
21,
8128,
19,
28,
306,
9,
2328,
60,
800,
3726,
3726,
27,
40,
28,
306,
9,
2328,
2271,
15,
50,
12038,
2684,
2619,
20,
206,
2741,
3772,
15,
54,
50,
59,
6322,
49,
1669,
6634,
851,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Coverage and how do YOU measure it?
===
What is Code Coverage and how do YOU measure it? I was asked this question regarding our automating testing code coverage. It seems to be that outside of automated tools it is more art than science. Anyone have any real world examples of how they use code coverage?
| 0 | [
2,
98,
25,
1797,
5245,
17,
184,
107,
42,
4058,
32,
60,
800,
3726,
3726,
98,
25,
1797,
5245,
17,
184,
107,
42,
4058,
32,
60,
31,
23,
411,
48,
1301,
3467,
318,
3108,
79,
1880,
4431,
1797,
5245,
9,
32,
2206,
20,
44,
30,
719,
16... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Regular Expression To Split Two Joined Words?
===
I have an array of 1000 or so entries, with examples below:
wickedweather
liquidweather
driveourtrucks
gocompact
slimprojector
I would like to be able to split these into their respective words, as:
wicked weather
liquid weather
drive our trucks
go compact
slim projector
I was hoping a regular expression my do the trick. But, since there is no boundary to stop on, nor is there any sort of capitalization that I could possibly key on, I am thinking, that some sort of reference to a dictionary might be necessary?
I suppose it could be done by hand, but why - when it can be done with code! =) But this has stumped me. Any ideas? | 0 | [
2,
1290,
1803,
20,
2132,
81,
670,
715,
60,
800,
3726,
3726,
31,
57,
40,
7718,
16,
6150,
54,
86,
11399,
15,
29,
3770,
1021,
45,
9840,
18924,
4189,
18924,
1493,
4110,
20640,
18,
162,
11103,
5183,
8824,
21011,
248,
31,
83,
101,
20,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best way to use JavaDoc to document a Java enum?
===
I've just started using Java's enums in my own projects (I have to use JDK 1.4 at work) and I am confused as to the best practice of using JavaDoc for an enum.
I have found that this method works, but the resultant code is a little unrefined:
/**
* Doc for enum
*/
public enum Something {
/**
* First thing
*/
FIRST_THING,
/**
* Second thing
*/
SECOND_THING;
//could continue with more
}
Is there any way I could break up the enum declarations on their own lines without chaining them by commas, or is this the best approach for using JavaDoc for an enum? | 0 | [
2,
98,
25,
14,
246,
161,
20,
275,
8247,
13799,
20,
4492,
21,
8247,
1957,
723,
60,
800,
3726,
3726,
31,
22,
195,
114,
373,
568,
8247,
22,
18,
1957,
723,
18,
19,
51,
258,
2314,
13,
5,
49,
57,
20,
275,
487,
43,
197,
137,
9,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is using a front controller and headers the best way to mimic a response in PHP?
===
I've been researching PHP frameworks as of late for some personal projects, and it looks like most of them use a front controller to mimic a response. The controller gets the params from the request, and re-routes by sending the appropriate headers depending on the logic. This is the "response". Is this the best way to do this in PHP, or are there other theories about how to handle re-routing and responses? | 0 | [
2,
25,
568,
21,
431,
9919,
17,
157,
445,
14,
246,
161,
20,
13567,
21,
1627,
19,
13,
26120,
60,
800,
3726,
3726,
31,
22,
195,
74,
527,
68,
13,
26120,
6596,
18,
28,
16,
456,
26,
109,
1319,
2314,
15,
17,
32,
1879,
101,
127,
16,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using jQuery, how do you mimic the form serialization for a select with multiple options selected in a $.ajax call?
===
Below is my $.ajax call, how do I put a selects (multiple) selected values in the data section?
$.ajax({
type: "post",
url: "http://myServer" ,
dataType: "text",
data: {
'service' : 'myService',
'program' : 'myProgram',
'start' : start,
'end' : end ,
},
success: function(request) {
result.innerHTML = request ;
} // End success
}); // End ajax method
| 0 | [
2,
568,
487,
8190,
93,
15,
184,
107,
42,
13567,
14,
505,
5956,
1829,
26,
21,
5407,
29,
1886,
6368,
1704,
19,
21,
5579,
9,
6881,
7522,
645,
60,
800,
3726,
3726,
1021,
25,
51,
5579,
9,
6881,
7522,
645,
15,
184,
107,
31,
442,
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 run NUnit programmatically
===
I have some assembly that references NUnit and creates a single test class with a single test method. I am able to get the file system path to this assembly (e.g. "C:\...\test.dll"). I would like to programmatically use NUnit to run against this assembly.
So far I have:
var runner = new SimpleTestRunner();
runner.Load(path);
var result = runner.Run(NullListener.NULL);
However, calling runner.Load(path) throws a FileNotFound exception. I can see through the stack trace that the problem is with NUnit calling Assembly.Load(path) down the stack. If I change path to be something like "Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" then I still get the same error.
I have added an event handler to AppDomain.Current.AssemblyResolve to see if I could manually resolve this type but my handler never gets called.
What is the secret to getting Assembly.Load(...) to work?? | 0 | [
2,
184,
20,
485,
10210,
242,
625,
6732,
1326,
800,
3726,
3726,
31,
57,
109,
1475,
30,
7231,
10210,
242,
17,
9695,
21,
345,
1289,
718,
29,
21,
345,
1289,
2109,
9,
31,
589,
777,
20,
164,
14,
3893,
329,
2013,
20,
48,
1475,
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... |
What is the quickest way to detect an unreachable host in Java?
===
I would like the fastest and most accurate function `boolean isReachable(String host, int port)` that passes the following JUnit tests under the conditions below. Timeout values are specified by the JUnit test itself, and may be considered "unreachable."
**Please note:** All answers must be platform-independant. This means that `InetAddress.isReachable(int timeout)` is not going to work, since it relies on port `7` to do a ping on Windows (ICMP ping being an undocumented function on Windows), and this port is blocked in this setup.
LAN Setup:
- `thisMachine` (`192.168.0.100`)
- `otherMachine` (`192.168.0.200`)
- **no** machine is called `noMachine` or has the IP `192.168.0.666` (always unreachable)
- both machines are running Apache Tomcat on port `8080`; all other ports are unreachable (including port `7`)
- `example.com` (`208.77.188.166`) is running a webserver on port `80` and is only reachable when the LAN is connected to the Internet
Occasionally, the LAN is disconnected from the Internet in which case only local machines called by IP address are reachable (all others are unreachable; there's no DNS).
**All tests are run on `thisMachine`.**
@Test(timeout=400) // 80ms per call (reasonable?)
public void testLocalhost() {
// We can always reach ourselves.
assertTrue(isReachable("localhost", 8080));
assertTrue(isReachable("127.0.0.1", 8080));
assertTrue(isReachable("thisMachine", 8080)); // Even if there's no DNS!
assertTrue(isReachable("192.168.0.100", 8080));
assertFalse(isReachable("localhost", 80)); // Nothing on that port.
}
@Test(timeout=240) // 80ms per call (reasonable?)
public void testLAN() {
assertTrue(isReachable("192.168.0.200", 8080)); // Always connected to the LAN.
assertFalse(isReachable("192.168.0.666", 8080)); // No such a machine.
assertFalse(isReachable("noMachine", 8080)); // No such machine.
}
The following test is only run when the LAN is **disconnected** from the Internet.
@Test(timeout=3000) //1000ms per call (reasonable?)
public void testNoDNS() {
assertFalse(isReachable("otherMachine", 8080)); // No DNS.
assertFalse(isReachable("example.com", 80)); // No DNS & no Internet.
assertFalse(isReachable("208.77.188.166", 80)); // No Internet.
}
The following test is only run when the LAN is **connected** to the Internet.
@Test(timeout=3000) //1000ms per call (reasonable?)
public void testHaveDNS() {
assertTrue(isReachable("otherMachine", 8080)); // DNS resolves local names.
assertTrue(isReachable("example.com", 80)); // DNS available.
assertTrue(isReachable("208.77.188.166", 80)); // Internet available.
} | 0 | [
2,
98,
25,
14,
2231,
1430,
161,
20,
9092,
40,
367,
18700,
579,
2015,
19,
8247,
60,
800,
3726,
3726,
31,
83,
101,
14,
7518,
17,
127,
8137,
1990,
13,
1,
10858,
413,
210,
25,
18700,
579,
5,
11130,
2015,
15,
19,
38,
1295,
6,
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... |
Possible circular dependency issue with PHP application
===
I'm experiencing what I believe is a circular dependency issue with my PHP application. Please let me know if this is incorrect. Here is the situation:
Two classes, LogManager and DBSession.
DBSession is used to interact with the database, and LogManager is used to log to files. Both are widely used in my application. When you create an instance of DBSession, you must give it an instance of LogManager via a constructor parameter. This because DBSession will sometimes log information to a file, and will use the LogManager instance to do this. Now, I wanted to extend LogManager so that it could also log to a database table, rather than a text file. Naturally, my preference is to re-use existing classes, but I soon realized this brought about an interesting situation.
DBSession already requires an instance of LogManager for construction. If I want to re-use the DBSession class in LogManager, it will now require an instance of DBSession. How can I satisfy both demands? Clearly, something must be wrong with my approach.
How would you suggest I fix this?
Thanks in advance, guys. | 0 | [
2,
938,
8155,
26835,
1513,
29,
13,
26120,
3010,
800,
3726,
3726,
31,
22,
79,
15138,
98,
31,
985,
25,
21,
8155,
26835,
1513,
29,
51,
13,
26120,
3010,
9,
2247,
408,
55,
143,
100,
48,
25,
18867,
9,
235,
25,
14,
1858,
45,
81,
2684... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it possible to make the init method private in objective-c?
===
I need to hide (make private) the init method of my class in objective-c.
How can I do that?
| 0 | [
2,
25,
32,
938,
20,
233,
14,
19,
242,
2109,
932,
19,
7038,
8,
150,
60,
800,
3726,
3726,
31,
376,
20,
3077,
13,
5,
11115,
932,
6,
14,
19,
242,
2109,
16,
51,
718,
19,
7038,
8,
150,
9,
184,
92,
31,
107,
30,
60,
3,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Is there a site that emails out daily C# tips and tricks?
===
I subscribe to a newsletter from www.sqlservercentral.com that I like because each day I get an email digest with some interesting headlines & summaries of SQL Server articles that are already out there on the web. It's a great way to learn something new a bit at a time.
Is there something like this for C#? | 4 | [
2,
25,
80,
21,
689,
30,
8517,
18,
70,
1954,
272,
5910,
11034,
17,
13747,
60,
800,
3726,
3726,
31,
13,
20330,
20,
21,
17782,
37,
13,
6483,
9,
18,
22402,
10321,
106,
6306,
9,
960,
30,
31,
101,
185,
206,
208,
31,
164,
40,
8517,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Running a web app in Grails vs Django
===
I'm currently in the planning stage for a web application and I find myself trying to decide on using Grails or Django. From an operation perspective:
1. Which ecosystem is easier to maintain (migrations, backup, disaster recovery etc.)? If using grails it'll probably be a typical tomcat + mysql on linux. If django it'll be apache + mysql on linux.
2. Does django or grails have a better choice of cheap and flexible hosting? Initially it'll probably be low bandwidth requirements. I'm not sure about the exact specs required, but from what I've been reading it seems like django would require far less server resources (even 256MB server is ok) than grails. | 0 | [
2,
946,
21,
2741,
4865,
19,
489,
7301,
18,
4611,
3857,
14541,
800,
3726,
3726,
31,
22,
79,
871,
19,
14,
2334,
876,
26,
21,
2741,
3010,
17,
31,
477,
992,
749,
20,
4073,
27,
568,
489,
7301,
18,
54,
3857,
14541,
9,
37,
40,
1453,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Running compiled python (py2exe) as administrator in Vista
===
Is it possible to programaticly run compiled Python (comiled via py2exe) as administrator in Vista? | 0 | [
2,
946,
9316,
20059,
13,
5,
6448,
135,
1706,
62,
6,
28,
8890,
19,
13520,
800,
3726,
3726,
25,
32,
938,
20,
625,
12479,
102,
485,
9316,
20059,
13,
5,
960,
49,
1294,
1197,
7103,
135,
1706,
62,
6,
28,
8890,
19,
13520,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Custom button in C#: How to remove hover background?
===
I'm trying to do a custom button to my form (which has FormBorderStyle = none). I have my 3 states button images in an ImageList linked to the button.
this.btnClose.AutoSize = false;
this.btnClose.BackColor = System.Drawing.Color.Transparent;
this.btnClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.btnClose.FlatAppearance.BorderSize = 0;
this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClose.ForeColor = System.Drawing.Color.Transparent;
this.btnClose.ImageKey = "Disabled";
this.btnClose.ImageList = this.imageList1;
this.btnClose.Location = new System.Drawing.Point(368, -5);
this.btnClose.Margin = new System.Windows.Forms.Padding(0);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(31, 31);
this.btnClose.TabIndex = 0;
this.btnClose.UseVisualStyleBackColor = false;
this.btnClose.MouseLeave += new System.EventHandler(this.btnClose_MouseLeave);
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
this.btnClose.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnClose_MouseDown);
this.btnClose.MouseHover += new System.EventHandler(this.btnClose_MouseHover);
private void btnClose_MouseHover(object sender, EventArgs e)
{
btnClose.ImageKey = "enabled";
}
private void btnClose_MouseDown(object sender, MouseEventArgs e)
{
btnClose.ImageKey = "down";
}
private void btnClose_MouseLeave(object sender, EventArgs e)
{
btnClose.ImageKey = "disabled";
}
All is working, but there's one catch. Whenever I move the mouse hover the button I get a really annoying grey background.
How can I remove that?
Thanks for your time.
Best regards.
PS: I'm using VS2005 | 0 | [
2,
5816,
5167,
19,
272,
5910,
45,
184,
20,
4681,
21350,
2395,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
107,
21,
5816,
5167,
20,
51,
505,
13,
5,
2140,
63,
505,
24389,
4381,
800,
2369,
6,
9,
31,
57,
51,
203,
202,
5167,
3502,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Decimal
===
Does anyone know of a faster decimal implementation in python. As example below demonstrates, standard python decimal is ~100 times slower than float.
from timeit import Timer
def run(val, the_class):
test = the_class(1)
for c in xrange(10000):
d = the_class(val)
d + test
d - test
d * test
d / test
d ** test
str(d)
abs(d)
if __name__ == "__main__":
a = Timer("run(123.345, float)", "from decimal_benchmark import run")
print "FLOAT", a.timeit(1)
a = Timer("run('123.345', Decimal)", "from decimal_benchmark import run; from decimal import Decimal")
print "DECIMAL", a.timeit(1)
FLOAT 0.040635041427
DECIMAL 3.39666790146
Thanks,
Maksim
| 0 | [
2,
20059,
26380,
800,
3726,
3726,
630,
1276,
143,
16,
21,
4233,
26380,
6123,
19,
20059,
9,
28,
823,
1021,
19466,
15,
1236,
20059,
26380,
25,
13,
1,
4031,
436,
14085,
119,
11510,
9,
37,
85,
242,
9010,
85,
139,
6312,
485,
5,
3377,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I set the login info for SQL Server 2008 in Entity Framework?
===
Okay I'm still learning the ropes with the Entity Framework and I came across one more small issue.
When I create my Entity Model from the SQL Server 2008 database it warns me about saving the login information in the connection string in the config file. Initially I wasn't concerned about that so I just left it in there, but now I want to start thinking about deployment. So if I follow that advice and don't include the login information in the connection string, how else can I set that information later so that it can login to the database server?
Thanks | 0 | [
2,
184,
107,
31,
309,
14,
6738,
108,
15404,
26,
4444,
255,
8128,
570,
19,
9252,
6596,
60,
800,
3726,
3726,
1705,
31,
22,
79,
174,
2477,
14,
17353,
29,
14,
9252,
6596,
17,
31,
281,
464,
53,
91,
284,
1513,
9,
76,
31,
1600,
51,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What are the options available for cross platform rich user interfaces development?
===
Some of the requirements (restrictions) for such a ui framework/toolkit are:
- No single vendor lock down
- Ability for real time data visualization
- Good initial widgets
- Good dash boarding capabilities
- cross platform
- Good development/debug environment
- No flash
| 0 | [
2,
98,
50,
14,
6368,
904,
26,
919,
2452,
2042,
4155,
6573,
18,
522,
60,
800,
3726,
3726,
109,
16,
14,
4786,
13,
5,
99,
27245,
5757,
6,
26,
145,
21,
13,
5661,
6596,
118,
20799,
13703,
50,
45,
13,
8,
90,
345,
23510,
3991,
125,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is It Possible to Sandbox JavaScript Running In the Browser?
===
I'm wondering if it's possible to sandbox JavaScript running in the browser to prevent access to features that are normally available to JavaScript code running in an HTML page.
For example, let's say I want to provide a JavaScript API for end users to let them define event handlers to be run when "interesting events" happen, but I don't want those users to access the properties and functions of the ``window`` object. Am I able to do this?
In the simplest case, let's say I want to prevent users calling ``alert``. A couple of approaches I can think of are:
* Redefine ``window.alert`` globally. I don't think this would be a valid approach because other code running in the page (i.e. stuff not authored by users in their event handlers) might want to use ``alert``.
* Send the event handler code to the server to process. I'm not sure that sending the code to the server to process is the right approach because the event handlers need to run in the context of the page.
Perhaps a solution where the server processes the user defined function and then generates a callback to be executed on the client would work? Even if that approach works are there better ways to solve this problem? | 0 | [
2,
25,
32,
938,
20,
1965,
5309,
8247,
8741,
946,
19,
14,
16495,
60,
800,
3726,
3726,
31,
22,
79,
5712,
100,
32,
22,
18,
938,
20,
1965,
5309,
8247,
8741,
946,
19,
14,
16495,
20,
2501,
1381,
20,
967,
30,
50,
4147,
904,
20,
8247,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 raise an event from a SWF in a SWFLoader to a parent Flex application?
===
How can I raise an event from a SWF file loaded into a Flex application (using SWFLoader)?
I want to be able to detect
a) when a button is pressed
b) when the animation ends | 0 | [
2,
184,
20,
3972,
40,
807,
37,
21,
13,
18,
15263,
19,
21,
13,
18,
15263,
8294,
106,
20,
21,
4766,
14409,
3010,
60,
800,
3726,
3726,
184,
92,
31,
3972,
40,
807,
37,
21,
13,
18,
15263,
3893,
8572,
77,
21,
14409,
3010,
13,
5,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I handle foreign keys with WPF databinding?
===
I have a ListView in WPF that is databound to a basic table that I pull from the database. The code for the ListView is as follows:
<ListView Canvas.Left="402" Canvas.Top="480" Height="78" ItemsSource="{Binding}" Name="lsvViewEditCardPrint" Width="419">
<ListView.View>
<GridView>
<GridViewColumn DisplayMemberBinding="{Binding Path=IdCst}">Set</GridViewColumn>
<GridViewColumn DisplayMemberBinding="{Binding Path=Language}">Language</GridViewColumn>
<GridViewColumn DisplayMemberBinding="{Binding Path=Number}">Number</GridViewColumn>
<GridViewColumn DisplayMemberBinding="{Binding Path=IdArt}">Artwork</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
The IdCst column is a foreign key to a separate table, and I'd like to display the actual name field from that table instead of just the Id. Does anybody know how to set a databinding, or is there an event, such as OnItemDataBound, that I could intercept to modify the display? | 0 | [
2,
184,
107,
31,
3053,
1228,
5534,
29,
619,
7721,
1054,
22260,
60,
800,
3726,
3726,
31,
57,
21,
968,
4725,
19,
619,
7721,
30,
25,
1054,
7410,
20,
21,
2125,
859,
30,
31,
2201,
37,
14,
6018,
9,
14,
1797,
26,
14,
968,
4725,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
LAMP Server LiveCD
===
I'm looking for a LiveCD that will run a LAMP server, e.g. from files on a USB pen.
I've heard of [SLAMPP](http://en.wikipedia.org/wiki/SLAMPP), which looks like it could be what I need but the homepage isn't loading today.
There's also [LAMPPIX](http://lamppix.tinowagner.com/), however at first glance it looks like this involves burning a new CD every time I have a new project (not what I want to do - I'd rather just burn once and update the stuff on the USB pen).
What other options do I have, and what's worked well for you? | 4 | [
2,
6792,
8128,
515,
6324,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
515,
6324,
30,
129,
485,
21,
6792,
8128,
15,
13,
62,
9,
263,
9,
37,
6488,
27,
21,
182,
220,
2402,
9,
31,
22,
195,
752,
16,
636,
18,
20293,
306,
500,
5,
21... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I stop Visual Studio Express SP1 install detecting old version that doesn't exist
===
I haven't installed Visual Studio before on my computer. However when I try to install Visual Studio 2008 Express SP1 I get an error message
"Setup has detected that this computer does not meet the requirements to install this software. These requirements must be met before you can install Microsoft Visual C++ 2008 Express Edition with SP1 - ENU"
Requirements and Software Prerequisites
Visual Studios 2008 Service Pack 1
An earlier version of Microsoft Visual Studio 2008 has been detected on the system that must be updated to SP1 before installation can proceed. Please update all other versions of Visual Studio 2008 to SP1 by visiting Microsoft Update and then install Visual Studio 2008 Express SP1.
I'm not sure why I get this message since I have not installed VS2008 before. I've tried to run the VS2008 Patch Removal Tool but it says "Visual Studio 2008 Service Pack Preparation does not apply". I've applied all the patches from Microsoft Update but still get the same error. Any ideas what could be wrong?
| 0 | [
2,
184,
107,
31,
747,
3458,
1120,
2999,
3782,
165,
16146,
9092,
68,
315,
615,
30,
1437,
22,
38,
3182,
800,
3726,
3726,
31,
2933,
22,
38,
4066,
3458,
1120,
115,
27,
51,
1428,
9,
207,
76,
31,
1131,
20,
16146,
3458,
1120,
570,
2999... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
When running UPDATE ... datetime = NOW(); will all rows updated have the same date/time?
===
When you run something similar to:
UPDATE table SET datetime = NOW();
on a table with 1 000 000 000 records and the query takes 10 seconds to run, will all the rows have the exact same time (minutes and seconds) or will they have different times? In other words, will the time be when the query started or when each row is updated?
I'm running MySQL, but I'm thinking this applies to all dbs. | 0 | [
2,
76,
946,
11100,
13,
9,
9,
9,
1231,
891,
800,
130,
5,
6,
73,
129,
65,
11295,
6372,
57,
14,
205,
1231,
118,
891,
60,
800,
3726,
3726,
76,
42,
485,
301,
835,
20,
45,
11100,
859,
309,
1231,
891,
800,
130,
5,
6,
73,
27,
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... |
Building User ID/Password Functionality with Ruby on Rails? Overkill?
===
I am new to this community, but I am working on a site that requires implementation of a user/password/register check upon entry, which would check against a database, or write to the database, in the case of registration. I have experience with XHTML and CSS, and just discovered RoR. I honestly have very little insight into how to achieve my goal using just XHTML, so I decided to learn Ruby, taking a shot in the dark. I'm wondering if there's an easier language, or more direct fix that I should be implementing instead. Any thoughts? | 0 | [
2,
353,
4155,
4924,
118,
6201,
9587,
18548,
29,
10811,
27,
2240,
18,
60,
84,
7577,
60,
800,
3726,
3726,
31,
589,
78,
20,
48,
514,
15,
47,
31,
589,
638,
27,
21,
689,
30,
4781,
6123,
16,
21,
4155,
118,
6201,
9587,
118,
12463,
99... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 update contacts in Zimbra by scripting ?
===
I have a Zimbra installation and I need to programmaticaly update contacts in it. It seems that its REST interface is only working to add new contacts, but I need to update existing ones. Is there a way, tool or something, open-source, to do that ? | 0 | [
2,
184,
20,
11100,
11894,
19,
13,
18244,
2559,
34,
3884,
68,
13,
60,
800,
3726,
3726,
31,
57,
21,
13,
18244,
2559,
7758,
17,
31,
376,
20,
625,
6732,
58,
102,
11100,
11894,
19,
32,
9,
32,
2206,
30,
82,
760,
6573,
25,
104,
638,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Quick Rhinomocks Help
===
Can someone take a look at this code and tell me if there's any obvious reason it shouldn't be working? When service.getResponse is called within my code the mocking framework only returns null, not the object I specified.
[Test]
public void Get_All_Milestones()
{
var mockRepo = new MockRepository();
var service = mockRepo.DynamicMock<IRestfulService>();
var request = new RestRequestObject
{
Password = "testpw!",
UserName = "user",
SecureMode = true,
Url = "www.updatelog.com/",
Command = String.Format("projects/{0}/milestones/list", 123456),
Method = "POST"
};
var response = new RestResponseObject
{
StatusCode = 200,
ErrorsExist = false,
Response =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<milestones type=\"array\">\n <milestone>\n <completed type=\"boolean\">false</completed>\n <created-on type=\"datetime\">2008-10-02T17:37:51Z</created-on>\n <creator-id type=\"integer\">3028235</creator-id>\n <deadline type=\"date\">2008-10-20</deadline>\n <id type=\"integer\">7553836</id>\n <project-id type=\"integer\">123456</project-id>\n <responsible-party-id type=\"integer\">3028295</responsible-party-id>\n <responsible-party-type>Person</responsible-party-type>\n <title>Atb2 Editor Substantially Done</title>\n <wants-notification type=\"boolean\">true</wants-notification>\n </milestone>\n</milestones>\n"
};
using(mockRepo.Record())
{
Expect
.Call(service.GetResponse(request))
.Return(response);
}
using(mockRepo.Playback())
{
var dal = new DataAccess(service);
var result = dal.GetMilestones(123456);
Assert.IsNotNull(result, "The result should not be null.");
Assert.AreNotEqual(0, result.Count, "There should be exactly one item in this list.");
Assert.AreEqual(123456, result[0].ProjectId, "The project ids don't match.");
Assert.AreEqual(7553836, result[0].Id, "The ids don't match.");
}
mockRepo.VerifyAll();
} | 0 | [
2,
2231,
18642,
79,
5668,
18,
448,
800,
3726,
3726,
92,
737,
247,
21,
361,
35,
48,
1797,
17,
494,
55,
100,
80,
22,
18,
186,
4674,
1215,
32,
5714,
22,
38,
44,
638,
60,
76,
365,
9,
834,
8722,
8782,
870,
25,
227,
363,
51,
1797,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
File.Move not working properly for UNC paths
===
I'm attempting to use File.Move to move a file from one UNC location to another. This blows up if the UNC path for the destination happens to be the local machine (error: Access to the path is denied). Example File.Move(@"\\someServer\path\file.txt", @"\\blah2\somewhere\file.txt"). This assumes there's a network share out there somewhere named \\someServer and my local machine name is blah2. Change \\blah2 to C:\ and all is good. | 0 | [
2,
3893,
9,
16598,
52,
638,
7428,
26,
16061,
12074,
800,
3726,
3726,
31,
22,
79,
6314,
20,
275,
3893,
9,
16598,
20,
780,
21,
3893,
37,
53,
16061,
1474,
20,
226,
9,
48,
16408,
71,
100,
14,
16061,
2013,
26,
14,
6970,
5531,
20,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What are the advantages of using a GET request over a POST request?
===
Several of my ajax applications in the past have used GET request but now I'm starting to use POST request instead. POST requests seem to be slightly more secure and definitely more url friendly/pretty. Thus, i'm wondering if there is any reason why I should use GET request at all. | 0 | [
2,
98,
50,
14,
14683,
16,
568,
21,
164,
3772,
84,
21,
678,
3772,
60,
800,
3726,
3726,
238,
16,
51,
20624,
3767,
19,
14,
640,
57,
147,
164,
3772,
47,
130,
31,
22,
79,
1422,
20,
275,
678,
3772,
700,
9,
678,
12279,
2260,
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... |
how to check if a tag exists in xslt
===
I have the following template
<h2>one</h2>
<xsl:apply-templates select="one"/>
<h2>two</h2>
<xsl:apply-templates select="two"/>
<h2>three</h2>
<xsl:apply-templates select="three"/>
I would like to only display the headers (one,two,three) if there is at least one member of the corresponding template. How do I check for this?
| 0 | [
2,
184,
20,
2631,
100,
21,
3383,
5636,
19,
993,
18,
255,
38,
800,
3726,
3726,
31,
57,
14,
249,
22894,
13,
1,
252,
135,
1,
849,
1,
118,
252,
135,
1,
13,
1,
396,
18,
255,
45,
7753,
102,
8,
9577,
6554,
18,
5407,
3726,
7,
849,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Wizard Control for .NET Windows Forms?
===
I'm looking to add one or two wizards (you know, a simple dialog with multiple pages that walks a user through a process, step by step) to my WinForms application. I'm just curious of what controls -- whether they be third-party or you rolled your own -- you used to accomplish this? | 0 | [
2,
246,
10276,
569,
26,
13,
9,
2328,
1936,
1997,
60,
800,
3726,
3726,
31,
22,
79,
699,
20,
3547,
53,
54,
81,
19577,
13,
5,
245,
143,
15,
21,
1935,
28223,
29,
1886,
4434,
30,
7423,
21,
4155,
120,
21,
953,
15,
1424,
34,
1424,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can I turn off antialiasing on an HTML <canvas> element?
===
I'm playing around with the [<canvas>][1] element, drawing lines and such.
I've noticed that my diagonal lines are antialiased. I'd prefer the jaggy look for what I'm doing - is there any way of turning this feature off?
[1]: http://developer.mozilla.org/en/HTML/Canvas | 0 | [
2,
92,
31,
805,
168,
1082,
10060,
18,
68,
27,
40,
13,
15895,
13,
1,
1245,
8471,
1,
4520,
60,
800,
3726,
3726,
31,
22,
79,
791,
140,
29,
14,
636,
1569,
255,
38,
73,
1245,
8471,
1569,
263,
38,
73,
500,
2558,
165,
500,
4520,
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... |
Use Windows API from C# to set primary monitor
===
I'm trying to use the Windows API to set the primary monitor. It doesn't seem to work - my screen just flicks and nothing happens.
public const int DM_ORIENTATION = 0x00000001;
public const int DM_PAPERSIZE = 0x00000002;
public const int DM_PAPERLENGTH = 0x00000004;
public const int DM_PAPERWIDTH = 0x00000008;
public const int DM_SCALE = 0x00000010;
public const int DM_POSITION = 0x00000020;
public const int DM_NUP = 0x00000040;
public const int DM_DISPLAYORIENTATION = 0x00000080;
public const int DM_COPIES = 0x00000100;
public const int DM_DEFAULTSOURCE = 0x00000200;
public const int DM_PRINTQUALITY = 0x00000400;
public const int DM_COLOR = 0x00000800;
public const int DM_DUPLEX = 0x00001000;
public const int DM_YRESOLUTION = 0x00002000;
public const int DM_TTOPTION = 0x00004000;
public const int DM_COLLATE = 0x00008000;
public const int DM_FORMNAME = 0x00010000;
public const int DM_LOGPIXELS = 0x00020000;
public const int DM_BITSPERPEL = 0x00040000;
public const int DM_PELSWIDTH = 0x00080000;
public const int DM_PELSHEIGHT = 0x00100000;
public const int DM_DISPLAYFLAGS = 0x00200000;
public const int DM_DISPLAYFREQUENCY = 0x00400000;
public const int DM_ICMMETHOD = 0x00800000;
public const int DM_ICMINTENT = 0x01000000;
public const int DM_MEDIATYPE = 0x02000000;
public const int DM_DITHERTYPE = 0x04000000;
public const int DM_PANNINGWIDTH = 0x08000000;
public const int DM_PANNINGHEIGHT = 0x10000000;
public const int DM_DISPLAYFIXEDOUTPUT = 0x20000000;
public const int ENUM_CURRENT_SETTINGS = -1;
public const int CDS_UPDATEREGISTRY = 0x01;
public const int CDS_TEST = 0x02;
public const int CDS_SET_PRIMARY = 0x00000010;
public const long DISP_CHANGE_SUCCESSFUL = 0;
public const long DISP_CHANGE_RESTART = 1;
public const long DISP_CHANGE_FAILED = -1;
public const long DISP_CHANGE_BADMODE = -2;
public const long DISP_CHANGE_NOTUPDATED = -3;
public const long DISP_CHANGE_BADFLAGS = -4;
public const long DISP_CHANGE_BADPARAM = -5;
public const long DISP_CHANGE_BADDUALVIEW = -6;
public static void SetPrimary(Screen screen)
{
DISPLAY_DEVICE d = new DISPLAY_DEVICE();
DEVMODE dm = new DEVMODE();
d.cb = Marshal.SizeOf(d);
uint deviceID = 1;
User_32.EnumDisplayDevices(null, deviceID, ref d, 0); //
User_32.EnumDisplaySettings(d.DeviceName, 0, ref dm);
dm.dmPelsWidth = 2560;
dm.dmPelsHeight = 1600;
dm.dmPositionX = screen.Bounds.Right;
dm.dmFields = DM_POSITION | DM_PELSWIDTH | DM_PELSHEIGHT;
User_32.ChangeDisplaySettingsEx(d.DeviceName, ref dm, IntPtr.Zero, CDS_SET_PRIMARY, IntPtr.Zero);
}
I call the method like this:
SetPrimary(Screen.AllScreens[1])
Any ideas?
| 0 | [
2,
275,
1936,
21,
2159,
37,
272,
5910,
20,
309,
1256,
7626,
800,
3726,
3726,
31,
22,
79,
749,
20,
275,
14,
1936,
21,
2159,
20,
309,
14,
1256,
7626,
9,
32,
1437,
22,
38,
2260,
20,
170,
13,
8,
51,
2324,
114,
12407,
18,
17,
626... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Professional jQuery based Combox control?
===
Are there any **professional** Combobox controls (dropdown list with autosuggestion) based on the jQuery library?
It should be able to handle **large datasets** and **skinnable**. A **multi-column result list** would be great too. I'm working with ASP.NET, but it's a not a problem if I had to write a wrapper for it.
![alt text][1]
*I'm already using a third-party control, but I ran into some compatibilty issues between two vendor's controls. Well, I want to get rid of this kind of dependencies.*
[1]: http://img386.imageshack.us/img386/2987/comboboxts9.png | 0 | [
2,
736,
487,
8190,
93,
432,
22621,
396,
569,
60,
800,
3726,
3726,
50,
80,
186,
13,
1409,
17056,
1409,
22621,
5309,
8671,
13,
5,
12361,
2968,
968,
29,
3108,
18,
21606,
160,
3309,
6,
432,
27,
14,
487,
8190,
93,
1248,
60,
32,
378,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Connect to self-signed HTTPS web services from Flex
===
In my project I need to connect to an intra-net web service but we need SSL connection between the two machines.
Because this is an intra-net site the certificate of the web service might be a self-signed certificate.
The web service and the web page that loads my Flex application resides on the same web server (tomcat) so when I load the web page of the application with HTTPS I been asked to confirm the certificate, I confirm it but this confirmation does not apply on the Flex application (on Internet Explorer and Firefox).
I tried Google's Chrome and it actually asked me twice for confirmation, one for the web page and one for the connection to the web service so it worked great.
Is there a way to tell Flash player to accept also self-signed certificates of is it entirely concern the browser and Adobe guys can't do nothing about it?
In other words, is there a way to connect to a self-signed certificates HTTPS web services from Adobe Flex???
Thanks.
| 0 | [
2,
6379,
20,
1119,
8,
13472,
7775,
18,
2741,
687,
37,
14409,
800,
3726,
3726,
19,
51,
669,
31,
376,
20,
6379,
20,
40,
14369,
8,
2328,
2741,
365,
47,
95,
376,
13,
18,
18,
255,
2760,
128,
14,
81,
6035,
9,
185,
48,
25,
40,
1436... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Good Flash books/resources for programmers?
===
most flash books and resources seem to be targeted at artists, or atleast non-programmers, and actually because of that hard for those with a more programmatic mindset. Thus I'm looking for some good resources to train some entry level programmers to use flash well as programmers,not artists.
Any recommendations? | 4 | [
2,
254,
4433,
964,
118,
99,
12097,
18,
26,
17968,
18,
60,
800,
3726,
3726,
127,
4433,
964,
17,
2566,
2260,
20,
44,
9536,
35,
1542,
15,
54,
35,
255,
2857,
538,
8,
19746,
12271,
15,
17,
1121,
185,
16,
30,
552,
26,
273,
29,
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... |
Internal redirects after using Apache's mod_rewrite
===
I'm trying to implement the following mod_rewrite rule:
host.com/developer/ => host.com/developer/index.py <br>
host.com/developer/branchX => host.com/developer/index.py?branch=branchX <br>
host.com/developer/branchX/commitY => host.com/developer/index.py?branch=branchX&commit=commitY <br>
Currently, the appropriate config section looks like this:
Options FollowSymLinks
AllowOverride None
RewriteEngine on
RewriteRule ^([^/]+)$ /$1/index.py [L]
RewriteRule ^([^/]+)/([^/]+) /$1/index.py?branch=$2 [L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)$ /$1/index.py?branch=$2&commit=$3 [L]
However, after the URL has been initially rewritten, an internal redirect occurs and the URL is being rewritten again, ruining it. The process repeats many times and eventually results into a 500 error. The log (timestamps and perdir parts removed):
[..initial] (3) strip per-dir prefix: /home/www/host.com/master/a -> master/a
[..initial] (3) applying pattern '^([^/]+)$' to uri 'master/a'
[..initial] (3) strip per-dir prefix: /home/www/host.com/master/a -> master/a
[..initial] (3) applying pattern '^([^/]+)/([^/]+)' to uri 'master/a'
[..initial] (2) rewrite 'master/a' -> '/master/index.py?branch=a'
[..initial] (3) split uri=/master/index.py?branch=a -> uri=/master/index.py, args=branch=a
[..initial] (1) internal redirect with /master/index.py [INTERNAL REDIRECT]
[..initial/redir#1] (3) strip per-dir prefix: /home/www/host.com/master/index.py -> master/index.py
[..initial/redir#1] (3) applying pattern '^([^/]+)$' to uri 'master/index.py'
[..initial/redir#1] (3) strip per-dir prefix: /home/www/host.com/master/index.py -> master/index.py
[..initial/redir#1] (3) applying pattern '^([^/]+)/([^/]+)' to uri 'master/index.py'
[..initial/redir#1] (2) rewrite 'master/index.py' -> '/master/index.py?branch=index.py'
[..initial/redir#1] (3) split uri=/master/index.py?branch=index.py -> uri=/master/index.py, args=branch=index.py
How can I fix my rules to prevent the endless internal redirects?
Thanks. | 0 | [
2,
3117,
302,
14706,
18,
75,
568,
17140,
22,
18,
7226,
1,
99,
23716,
800,
3726,
3726,
31,
22,
79,
749,
20,
8713,
14,
249,
7226,
1,
99,
23716,
1828,
45,
2015,
9,
960,
118,
26051,
106,
118,
800,
1,
2015,
9,
960,
118,
26051,
106,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Swapp every pair of characters in string
===
Id like to make a swapped characters pairs combinations of string for example:
<br>base string: abcd<br>
Combinations:<BR>
1.bacd<br>
2.acbd<br>
3.abdc<BR>
etc.
How i can do it?
| 0 | [
2,
17150,
306,
352,
2146,
16,
1766,
19,
3724,
800,
3726,
3726,
4924,
101,
20,
233,
21,
29225,
1766,
7473,
17908,
16,
3724,
26,
823,
45,
13,
1,
5145,
1,
8436,
3724,
45,
5079,
43,
1,
5145,
1,
17908,
45,
1,
5145,
1,
137,
9,
969,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ASP.NET and VB.NET OleDbConnection Problem
===
I'm working on an ASP.NET website where I am using an asp:repeater with paging done through a VB.NET code-behind file. I'm having trouble with the database connection though. As far as I can tell, the paging is working, but I can't get the data to be certain.
The database is a Microsoft Access database. The function that should be accessing the database is:
Dim pagedData As New PagedDataSource
Sub Page_Load(ByVal obj As Object, ByVal e As EventArgs)
doPaging()
End Sub
Function getTheData() As DataTable
Dim DS As New DataSet()
Dim strConnect As New OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0;Data Source=App_Data/ArtDatabase.mdb")
Dim objOleDBAdapter As New OleDbDataAdapter("SELECT ArtID, FileLocation, Title, UserName, ArtDate FROM Art ORDER BY Art.ArtDate DESC", strConnect)
objOleDBAdapter.Fill(DS, "Art")
Return DS.Tables("Art").Copy
End Function
Sub doPaging()
pagedData.DataSource = getTheData().DefaultView
pagedData.AllowPaging = True
pagedData.PageSize = 2
Try
pagedData.CurrentPageIndex = Int32.Parse(Request.QueryString("Page")).ToString()
Catch ex As Exception
pagedData.CurrentPageIndex = 0
End Try
btnPrev.Visible = (Not pagedData.IsFirstPage)
btnNext.Visible = (Not pagedData.IsLastPage)
pageNumber.Text = (pagedData.CurrentPageIndex + 1) & " of " & pagedData.PageCount
ArtRepeater.DataSource = pagedData
ArtRepeater.DataBind()
End Sub
The ASP.NET is:
<asp:Repeater ID="ArtRepeater" runat="server">
<HeaderTemplate>
<h2>Items in Selected Category:</h2>
</HeaderTemplate>
<ItemTemplate>
<li><asp:HyperLink ID="HyperLink" NavigateUrl='<%# Eval("ArtID", "ArtPiece.aspx?ArtID={0}") %>' runat="server">
<img src="<%# Eval("FileLocation") %>" alt="<%# DataBinder.Eval(Container.DataItem, "Title") %>t"/> <br />
<%# DataBinder.Eval(Container.DataItem, "Title") %></asp:HyperLink>
</li>
</ItemTemplate>
</asp:Repeater>
Any help is greatly appreciated, thanks in advance!
| 0 | [
2,
28,
306,
9,
2328,
17,
13,
20468,
9,
2328,
12116,
9007,
25996,
872,
1448,
800,
3726,
3726,
31,
22,
79,
638,
27,
40,
28,
306,
9,
2328,
2271,
113,
31,
589,
568,
40,
28,
306,
45,
99,
306,
9834,
29,
19006,
68,
677,
120,
21,
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... |
Disable Visual Studio's validation of non-xml files that look like xml?
===
I have a bunch of Velocity template files in a Visual Studio 2008 project, the problem is that despite the fact that the extension is `.vm` instead of `.xml` or similar Visual Studio thinks that the HTML they contains must conform to XML naming standards and generates errors (not just warnings even) on each compilation.
How do I tell Visual Studio to ignore these "faulty" XML files? I am willing to turn of all validation on XML but I have found no such option either. | 0 | [
2,
1460,
579,
3458,
1120,
22,
18,
27999,
16,
538,
8,
396,
8184,
6488,
30,
361,
101,
23504,
60,
800,
3726,
3726,
31,
57,
21,
7653,
16,
10700,
22894,
6488,
19,
21,
3458,
1120,
570,
669,
15,
14,
1448,
25,
30,
869,
14,
837,
30,
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... |
Check if serial port is listening
===
I have an Arduino sending and receiving instructions with a python script via a serial port.
The Arduino takes a button state and when it is pushed it will send a message via serial to a python script and await a response. (via Serial.available()). Works well enough.
However if the python script has crashed for whatever reason (ideally it will run in the background, so cant be easily checked) the Arduino will wait forever and even on a script restart will we unavailable.
Is there a way for my Arduino to check if there is something listening on the serial port? (and alert me with flashing lights etc if not) or is this not how serial works? Worst case I guess I could use a timeout, although that is not ideal. | 0 | [
2,
2631,
100,
5956,
1295,
25,
4948,
800,
3726,
3726,
31,
57,
40,
13,
1514,
291,
3252,
4907,
17,
3396,
7650,
29,
21,
20059,
3884,
1197,
21,
5956,
1295,
9,
14,
13,
1514,
291,
3252,
1384,
21,
5167,
146,
17,
76,
32,
25,
2007,
32,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Tracker tool in Sourceforge
===
I am implementing a project on sourceforge. I want to know if any of you have used the tracker tool in sourceforge project hosting site.
1. How does it compare to trac/bugzilla?
2. In case I want/have to use trac, do I have to host it myself? Or can I use some other online hosting? | 0 | [
2,
792,
106,
5607,
19,
1267,
1106,
834,
800,
3726,
3726,
31,
589,
17333,
21,
669,
27,
1267,
1106,
834,
9,
31,
259,
20,
143,
100,
186,
16,
42,
57,
147,
14,
792,
106,
5607,
19,
1267,
1106,
834,
669,
10637,
689,
9,
137,
9,
184,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Suggestions for an easy to use imagemanipulation library in Delphi?
===
I would like my app customers to open an image and be able to
crop, rotate, resize antialiazed, lighten, darken, add an alphachannel and to be a little advanced have an autolevels routine. I have somewhat found code/liraries to do most of this functions, but they all seemes to be very hard to use or pretty bloatet with functionality i don't need. Anyway a roundup with some description, experiences would be very helpful :-)
| 0 | [
2,
18389,
26,
40,
2010,
20,
275,
1961,
177,
4307,
11123,
1248,
19,
23030,
60,
800,
3726,
3726,
31,
83,
101,
51,
4865,
5279,
20,
368,
40,
1961,
17,
44,
777,
20,
9833,
15,
21448,
15,
302,
10454,
1082,
10060,
10590,
15,
471,
219,
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... |
why is Class.newInstance() "evil"?
===
[Ryan Delucchi][1] asked [here][2] in comment #3 to [Tom Hawtin][3]'s answer:
> why is Class.newInstance() "evil"?
this in response to the code sample:
// Avoid Class.newInstance, for it is evil.
Constructor<? extends Runnable> ctor = runClass.getConstructor();
Runnable doRun = ctor.newInstance();
so, why is it Evil?
[1]: http://stackoverflow.com/users/9931/ryan-delucchi
[2]: http://stackoverflow.com/questions/194698/how-to-load-a-jar-file-at-runtime#194712
[3]: http://stackoverflow.com/users/4725/tom-hawtin-tackline | 0 | [
2,
483,
25,
718,
9,
2681,
108,
384,
2416,
5,
6,
13,
7,
16262,
7,
60,
800,
3726,
3726,
636,
622,
210,
121,
10542,
1594,
500,
2558,
165,
500,
411,
636,
6836,
500,
2558,
135,
500,
19,
6484,
11489,
20,
636,
6015,
1458,
499,
2864,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the most elegance way to read a text file with c++?
===
I'd like to read whole content of a text file to a std::string object with c++.
With Python, I can write:
text = open("text.txt", "rt").read()
It is very simple and elegance. I hate ugly stuff, so I'd like to know what is the most elegance way to read a text file with c++?
Thanks. | 0 | [
2,
98,
25,
14,
127,
28191,
161,
20,
1302,
21,
1854,
3893,
29,
272,
20512,
60,
800,
3726,
3726,
31,
22,
43,
101,
20,
1302,
979,
2331,
16,
21,
1854,
3893,
20,
21,
354,
43,
45,
45,
11130,
3095,
29,
272,
20512,
9,
29,
20059,
15,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to deal with old, obsolete database data of a long running system?
===
What are the possibilities of a programmer to handle data that are rarely used but cannot be simply deleted because at least reporting still requires it?
Some examples I am thinking of:
- Discountinued funding types of older years of a university
- Unused currencies (e.g. Italian lira)
- Names of disappeared countries (e.g. Austro-Hungary, USSR)
Some partial solutions are activity flags, activity periods, priorities of visualization but each of them means a case by case decision and it is hard to know what types of entities need this special handling.
May be there is a design pattern for this problem.
| 0 | [
2,
184,
20,
1183,
29,
315,
15,
18562,
6018,
1054,
16,
21,
175,
946,
329,
60,
800,
3726,
3726,
98,
50,
14,
13086,
16,
21,
17968,
20,
3053,
1054,
30,
50,
5664,
147,
47,
1967,
44,
1659,
19584,
185,
35,
639,
6670,
174,
4781,
32,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to test with RSpec a Rails plugin using "link_to" and "current_page?"
===
I'm writing a Rails plugin that builds up a menu in a view. I'm using *link`_`to* to build the link and *current_page?* to set class="active" on the current page.
I've *include*d *ActionView::Helpers::UrlHelper* so I can use *link`_`to*.
To get *current`_`page?* working in the view, I've had to inherit the current class (apparently ActionView::Base) and it works perfectly well. Unfortunately, this totally breaks the tests with RSpec.
I'm calling *link`_`to* and *current`_`page?* like this:
def menu(options = {}, &block)
carte = my_menu.new(self)
yield carte
carte.to_s unless carte.empty?
end
class my_menu
include ActionView::Helpers::TagHelper
include ActionView::Helpers::UrlHelper
def initialize(base)
@base = base
end
def link
@base.link_to(name, url_options, html_options)
@base.current_page?(url_options)
end
end
And I get this error with RSpec:
Undefined method `link_to' for #<Spec::Rails::Example::RailsExampleGroup::Subclass_1:0x24afa90>
Any clue? | 0 | [
2,
184,
20,
1289,
29,
13,
1224,
12610,
21,
2240,
18,
10922,
108,
568,
13,
7,
6258,
1,
262,
7,
17,
13,
7,
17657,
1,
6486,
60,
7,
800,
3726,
3726,
31,
22,
79,
1174,
21,
2240,
18,
10922,
108,
30,
1895,
18,
71,
21,
11379,
19,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Internet Explorer Debug Mode - Is there a quick way to enable/disable it?
===
I do web site debugging with IE (as well as other browsers) but my problem is with IE, as it is the browser i usually use for regular browsing.
In order to debug you need to turn on debug mode in the advanced options. Ok, fine. Its turned on. But the issue I have that is quite annoying is that it seems 30% of websites have JS errors, and IE in dbeug mode causes a popup. This is now also the case with SO as well, where i spend a lot of time now. Everytime i edit i get a js error pup up.
I guess it comes down to this: Does anyone know of a way to QUICKLY enable and disable debug mode, such as a Hokey, or an add-in, so you dont have to go into Advanced Options to enable and disable?
Thanks!
| 0 | [
2,
2620,
8520,
121,
16254,
3740,
13,
8,
25,
80,
21,
2231,
161,
20,
9240,
118,
2906,
579,
32,
60,
800,
3726,
3726,
31,
107,
2741,
689,
121,
16254,
2762,
29,
13,
660,
13,
5,
472,
134,
28,
89,
16495,
18,
6,
47,
51,
1448,
25,
29... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ASP.NET, XSLT and dynamic controls
===
I wish to use xml and xsl to generate controls on an asp.net page.
I currently have a asp.net content page that contains a xml control. When the page is loaded, an xml file is loaded and the required element is extracted and set as the xml control's DocumentContent and the xml control's TransformSource is set the appropriate xsl file.
In the xsl file, I wish to use templates to create asp.net controls depending upon the contents of the xml. Is there an easy way of doing this with the xml control on the content page? | 0 | [
2,
28,
306,
9,
2328,
15,
993,
18,
255,
38,
17,
7782,
8671,
800,
3726,
3726,
31,
2536,
20,
275,
23504,
17,
993,
18,
255,
20,
7920,
8671,
27,
40,
28,
306,
9,
2328,
2478,
9,
31,
871,
57,
21,
28,
306,
9,
2328,
2331,
2478,
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... |
Where to find a good reference when choosing a database?
===
Me and two others are working on a project at the university.
In the project we are making a prototype of a MMORPG.
We have decided to use PostgreSQL as our database. The other databases we considered were MS SQL-server and MySQL.
Does somebody have a good reference which will justify our choice? (preferably written during the last year)
| 0 | [
2,
113,
20,
477,
21,
254,
2801,
76,
10883,
21,
6018,
60,
800,
3726,
3726,
55,
17,
81,
654,
50,
638,
27,
21,
669,
35,
14,
155,
9,
19,
14,
669,
95,
50,
544,
21,
7063,
16,
21,
1620,
248,
9623,
9,
95,
57,
868,
20,
275,
678,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Where do I find eclipse faces config editor palette
===
While running through the cheat cheet "create a navigation rule" it says "select the page control from the palette and ...". But where's this "palette"? | 0 | [
2,
113,
107,
31,
477,
11652,
4904,
13,
14093,
2816,
1835,
27349,
800,
3726,
3726,
133,
946,
120,
14,
18585,
13,
11638,
38,
13,
7,
6037,
1373,
21,
8368,
1828,
7,
32,
898,
13,
7,
18,
16964,
14,
2478,
569,
37,
14,
27349,
17,
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,
0,
0... |
Inserting a newline into a pre tag (IE, Javascript)
===
In IE when I insert text into a `<pre>` tag the newlines are ignored:
<pre id="putItHere"></pre>
<script>
function putText() {
document.getElementById("putItHere").innerHTML = "first line\nsecond line";
}
</script>
Using `\r\n` instead of a plain `\n` does not work.
`<br/>` does work but at but inserts an extra blank line in FF, which is not acceptable for my purposes.
| 0 | [
2,
14692,
68,
21,
78,
1143,
77,
21,
782,
3383,
13,
5,
660,
15,
8247,
8741,
6,
800,
3726,
3726,
19,
13,
660,
76,
31,
14692,
1854,
77,
21,
13,
1,
3515,
1,
3383,
14,
78,
7939,
50,
5424,
45,
13,
1,
3515,
4924,
3726,
7,
4881,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Dataset ReadXmlSchema Errors
===
How is it possible for this to be true
XmlDocument d = BuildReportXML(schema);
DataSet ds = new DataSet();
ds.ReadXmlSchema(schema);
ds.ReadXml(new XmlNodeReader(d));
schema is the schema location that I apply to the xmldocument before I start setting data, assuring that all the columns are of the correct type. Then I set the schema to the dataset, and read the document into it. When I do this it throws an "Input string was not in a correct format." I have a few decimal variables in the xml, and I assume this is the error. All of the information is obviously of the correct format, else the xmldocument would have errored. What can I do??
| 0 | [
2,
1054,
3554,
1302,
396,
8184,
7526,
540,
11908,
800,
3726,
3726,
184,
25,
32,
938,
26,
48,
20,
44,
1151,
23504,
28132,
13,
43,
800,
1895,
17437,
396,
8184,
5,
7526,
540,
6,
73,
1054,
3554,
13,
43,
18,
800,
78,
1054,
3554,
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... |
Transactions, when should be discarded and rolledback
===
I'm trying to debug an application (under PostgreSQL) and came across the following error:
"current transaction is aborted, commands ignored".
As far as I can understand a "transaction" is just a notion related to the underlying database connection.
If the connection has an auto commit "false", you can execute queries through the same Statement as long as it isn't failing. In which case you should rollback and create a new one.
If auto commit is "true" then it doesn't matter as long as all your queries are considered atomic.
So why the aforementioned error by PostgreSQL then?
Under which SQLException(s) a "transaction" is considered invalid and should be rolled backed or not used for another query? | 0 | [
2,
13147,
15,
76,
378,
44,
17032,
17,
2958,
1958,
800,
3726,
3726,
31,
22,
79,
749,
20,
121,
16254,
40,
3010,
13,
5,
4579,
678,
6879,
18,
22402,
6,
17,
281,
464,
14,
249,
7019,
45,
13,
7,
17657,
12799,
25,
21557,
69,
15,
14294... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Limit displayed length of string on web page
===
I'm looking for a technique (javascript, CSS, whatever ???) that will let me control the amount of a string that is displayed. The string is the result of a search (and therefore not initially known). A simple Character count approach is trivial, but not acceptable, as it needs to handle proportional fonts. In otherwords if I want to limit to say 70 pixels then the examples below show different character counts (9 and 15) both measuring the same:-
Welcome M...
Hi Iain if I've ...
If you look at Yahoo search results they are able to limit the length of title strings and add ellipsis on the end of long strings to indicate more.
(try site:loot.com wireless+keyboard+and+mouse to see an example of Yahoo achieving this)
Any Ideas? | 0 | [
2,
4496,
6115,
1476,
16,
3724,
27,
2741,
2478,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
4873,
13,
5,
1004,
1385,
8741,
15,
272,
18,
18,
15,
2099,
13,
60,
60,
60,
6,
30,
129,
408,
55,
569,
14,
2006,
16,
21,
3724,
30,
25,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to log in an Oracle database?
===
I am interested in what methods of logging is frequent in an Oracle database.
Our method is the following:
We create a log table for the table to be logged. The log table contains all the columns of the original table plus some special fields including timestamp, modification type (insert, update, delete), modifier's id. A trigger on the original table creates one log row for each insertion and deletion, and two rows for a modification. Log rows contain the data before and after the alteration of the original one.
Although state of the records can be mined back in time using this method, it has some drawbacks:
- Introduction of a new column in the original table does not automatically involves log modification.
- Log modification affects log table and trigger and it is easy to mess up.
- State of a record at a specific past time cannot be determined in a straightforward way.
- ...
What other possibilities exist?
What kind of tools can be used to solve this problem?
I only know of [log4plsql][1]. What are the pros/cons of this tool?
[1]: http://log4plsql.sourceforge.net/ | 0 | [
2,
184,
20,
6738,
19,
40,
15759,
6018,
60,
800,
3726,
3726,
31,
589,
3158,
19,
98,
3195,
16,
13,
13919,
25,
5408,
19,
40,
15759,
6018,
9,
318,
2109,
25,
14,
249,
45,
95,
1600,
21,
6738,
859,
26,
14,
859,
20,
44,
13,
19287,
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... |
TransactionScope bug in .NET? More information?
===
I have read (or perhaps heard from a colleague) that in .NET, TransactionScope can hit its timeout and then VoteCommit (as opposed to VoteRollback). Is this accurate or hearsay? I couldn't track down information on the web that talked about this issue (if it IS an issue), so I wonder if anyone has any direct experience with it and can shed some light? | 0 | [
2,
12799,
11555,
6256,
19,
13,
9,
2328,
60,
91,
676,
60,
800,
3726,
3726,
31,
57,
1302,
13,
5,
248,
1774,
752,
37,
21,
12321,
6,
30,
19,
13,
9,
2328,
15,
12799,
11555,
92,
770,
82,
85,
1320,
17,
94,
2018,
960,
5130,
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... |
How can I get top terms for a subset of documents in a Lucene index?
===
I know its possible to get the top terms within a Lucene Index, but is there a way to get the top terms based on a subset of a Lucene index?
I.e. What are the top terms in the Index for documents within a certain date range?
| 0 | [
2,
184,
92,
31,
164,
371,
1663,
26,
21,
16622,
16,
4374,
19,
21,
18515,
556,
4348,
60,
800,
3726,
3726,
31,
143,
82,
938,
20,
164,
14,
371,
1663,
363,
21,
18515,
556,
4348,
15,
47,
25,
80,
21,
161,
20,
164,
14,
371,
1663,
43... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Loading JSP pages from custom sources
===
Would it be possible to execute a JSP page and capture its output outside of a web application?
Mode specifically, in my case there still exists a usual web application, but it loads JSP pages not from its classpath, but from an arbitrary source. It seems like I cannot simply get RequestDispatcher and point it to a JSP file on disk.
| 0 | [
2,
12797,
487,
3401,
4434,
37,
5816,
2662,
800,
3726,
3726,
83,
32,
44,
938,
20,
15644,
21,
487,
3401,
2478,
17,
3683,
82,
5196,
719,
16,
21,
2741,
3010,
60,
3740,
3524,
15,
19,
51,
610,
80,
174,
5636,
21,
3820,
2741,
3010,
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... |
Can you have two forms on a page with ASP.NET MVC?
===
Using web forms I know that you can only have one ASP.NET form on a page. I've done some implementations where I've used Javascript to add other forms to a page to support things like logon controls (that post back to Logon.aspx instead of the current page). I'm wondering if the single form per page is still present in ASP.NET MVC or if this restriction has been lifted. | 0 | [
2,
92,
42,
57,
81,
1997,
27,
21,
2478,
29,
28,
306,
9,
2328,
307,
8990,
60,
800,
3726,
3726,
568,
2741,
1997,
31,
143,
30,
42,
92,
104,
57,
53,
28,
306,
9,
2328,
505,
27,
21,
2478,
9,
31,
22,
195,
677,
109,
6123,
18,
113,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Team programming tools and experiences
===
I worked for some project in team, but every time we did not had the right tools to "work as a team" or the right way of doing it, are there any suggestion and or tools (thinking of svn) that should be easily adopted by the team and make it more productive?
What's the best in your experience?
Does this things works well even for people that never worked together, or needs time to learn to use the tools (and how much is this time) ?
Thanks | 4 | [
2,
173,
3143,
4672,
17,
5513,
800,
3726,
3726,
31,
577,
26,
109,
669,
19,
173,
15,
47,
352,
85,
95,
144,
52,
41,
14,
193,
4672,
20,
13,
7,
3783,
28,
21,
173,
7,
54,
14,
193,
161,
16,
845,
32,
15,
50,
80,
186,
10910,
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... |
Do you use the 'My' namespace in VB.NET?
===
VB.NET has the "my" namespace, but how many VB.NET developers actually use it?
- if you don't, why?
- if you are using it, why?
I'm considering building a framework for VB.NET, and using the My namespace to plug it into VB seems like a reasonable idea. Is it? | 4 | [
2,
107,
42,
275,
14,
13,
22,
915,
22,
204,
5582,
19,
13,
20468,
9,
2328,
60,
800,
3726,
3726,
13,
20468,
9,
2328,
63,
14,
13,
7,
915,
7,
204,
5582,
15,
47,
184,
151,
13,
20468,
9,
2328,
10168,
1121,
275,
32,
60,
13,
8,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 fetch the middle mouse button in java?
===
I use `public boolean mouseDown(Event ev, int x, int y)` to detect a click of the mouse.<br>
I can distinguish between the right mouse button (ev.metaDown() is true) and the left and middle.
How can i differentiate the left from the middle button?
Or if it is impossible with mouseDown, what should i use? | 0 | [
2,
184,
20,
18312,
14,
772,
7567,
5167,
19,
8247,
60,
800,
3726,
3726,
31,
275,
13,
1,
12259,
9827,
413,
210,
7567,
2968,
5,
4943,
38,
13,
2443,
15,
19,
38,
993,
15,
19,
38,
13,
93,
6,
1,
20,
9092,
21,
10840,
16,
14,
7567,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Password protected .NET ClickOnce deployment?
===
How can I **protect a ClickOnce deployed application with a password**? Do I have to change the IIS settings of the web or is there a way to do it programmatically? I'm using Visual Studio 2005 (.NET 2.0).
If I have to use web credentials, are auto-updates of the application still possible?
Would be great if you could provide some sample code or detailed instructions for administering IIS.
Thank you! | 0 | [
2,
20884,
3803,
13,
9,
2328,
10840,
13120,
10475,
60,
800,
3726,
3726,
184,
92,
31,
13,
1409,
16265,
21,
10840,
13120,
6698,
3010,
29,
21,
20884,
1409,
60,
107,
31,
57,
20,
753,
14,
595,
18,
12410,
16,
14,
2741,
54,
25,
80,
21,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I Access IMetaDataEmit and other MetaData COM interfaces from C# or F#?
===
I am writing a compiler in F# and I want to be able to access the [unmanaged metadata COM interfaces](http://msdn.microsoft.com/en-us/library/ms404384.aspx) in the .net runtime. Before anybody mentions it, *Reflection.Emit is not suitable for my purposes*, nor do I want to use any other method than the metadata COM interfaces.
I've imported mscoree.tlb but it doesn't seem to include the interfaces I need.
The interfaces I'm interested in include [IMetaDataEmit](http://msdn.microsoft.com/en-us/library/ms230877.aspx). Any sample code relating to this would be very useful, though I've not been able to find any so far.
C# samples would be fine as I can easily convert them to F#.
Thanks in advance to anybody who can help me with this rather cryptic query! | 0 | [
2,
184,
107,
31,
1381,
797,
5735,
18768,
7411,
38,
17,
89,
28057,
13,
960,
6573,
18,
37,
272,
5910,
54,
398,
5910,
60,
800,
3726,
3726,
31,
589,
1174,
21,
21486,
19,
398,
5910,
17,
31,
259,
20,
44,
777,
20,
1381,
14,
636,
1020... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Unit testing a module that checks internet connectivity
===
I have a C# module responsible for acquiring the list of network adapters that are "connected to the internet" on a windows Vista machine. The module uses the "[Network List Manager API][1]" (or NLM API) to iterate over all network connections and returns all those for which the IsConnectedToInternet value is true.
I received some suggestions for the implementation of this module in this [SO question][2]
To test this module I've decided to write a helper that returns the list of internet connected interfaces based on another logic, so it would be a sort of a "reality check" for the original module's logic. Note that for the test helper I am willing to use detection methods that might be considered bad practice for production code (e.g. relying on some internet resource like "Google" to be available - in case it shuts down, blocked by our internal firewall etc. it's relatively easy to fix the test as opposed to a deployed product base).
The alternative detection method I chose was to try to connect to "www.google.com:80" with a TcpClient. My problem: When I have more than one connected adapter (e.g. both wireless and LAN) the detection method fails for one of them with the error "A connect request was made on an already-connected socket".
My question is three fold:
1. How would you go about testing such a module in general? Do you support the idea of doing the same thing in a different way and comparing the results or is it an overkill and I should rely on the system's API? My main problem here, is that it's very hard to pre-configure the system so that I'll know what the expected results are in advance.
2. What alternative logic would you suggest? One thing that was suggested in the aforementioned question was looking at the routing table - what about considering each adapter that has a routing entry with a destination of 0.0.0.0 as "connected to the internet"? Other suggestions?
3. Do you understand why I get the "already-connected" error with the current test logic?
[1]: http://msdn.microsoft.com/en-us/library/aa370803(VS.85).aspx
[2]: http://stackoverflow.com/questions/38864/how-do-you-find-out-which-nic-is-connected-to-the-internet | 0 | [
2,
1237,
4431,
21,
12613,
30,
16602,
2620,
24026,
800,
3726,
3726,
31,
57,
21,
272,
5910,
12613,
1864,
26,
15120,
14,
968,
16,
982,
9924,
445,
30,
50,
13,
7,
23520,
20,
14,
2620,
7,
27,
21,
1936,
13520,
1940,
9,
14,
12613,
2027,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
synchronizing io operation in java on a string method argument?
===
Basically, I have a class with 2 methods: one to serialize an object into an XML file and another to read an object from XML.
Here is an example of synchronized part from the method that restores an object:
public T restore(String from) throws Exception {
// variables declaration
synchronized (from) {
try {
decoder = new XMLDecoder(new BufferedInputStream(
new FileInputStream(from)));
restoredItem = decoder.readObject();
decoder.close();
} catch (Exception e) {
logger.warning("file not found or smth: " + from);
throw new Exception(e);
}
}
// try to cast it
}
A similar approach is taken when serializing an object. Now, when I create a unit test which in turn creates 10 threads with each thread trying to serialize and instantly read either a Boolean or a String it would fail showing that ClassCastExceptions occur. This makes me think that I get serialization wrong (everything's ok in a single-threaded environment). If you've stayed with me down to this point :), here are the 2 issues I need your help on:
1. does it make sense to synchronize on a string argument passed to method (considering there's a string pool in java)? BTW, I've tried synchronizing on the XMLSerializer class itself with result staying the same.
2. how do i correctly synchronize io operations on a single file? | 0 | [
2,
13,
16023,
3335,
13,
1963,
1453,
19,
8247,
27,
21,
3724,
2109,
5476,
60,
800,
3726,
3726,
11374,
15,
31,
57,
21,
718,
29,
172,
3195,
45,
53,
20,
5956,
2952,
40,
3095,
77,
40,
23504,
3893,
17,
226,
20,
1302,
40,
3095,
37,
23... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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# check if a COM (Serial) port is already open
===
Is there an easy way of programmatically checking if a serial COM port is already open/being used?
Normally I would use:
try
{
// open port
}
catch (Exception ex)
{
// handle the exception
}
However, I would like to programatically check so I can attempt to use another COM port or some such. | 0 | [
2,
272,
5910,
2631,
100,
21,
13,
960,
13,
5,
4104,
2815,
6,
1295,
25,
614,
368,
800,
3726,
3726,
25,
80,
40,
2010,
161,
16,
625,
6732,
1326,
9886,
100,
21,
5956,
13,
960,
1295,
25,
614,
368,
118,
10554,
147,
60,
4147,
31,
83,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why do old editors like Vim and Emacs expose the difference between a File and a Buffer in the interface?
===
Does my question make sense? Using either Vim or Emacs, you come to understand that the interface exposes the code's representation of the state of the file you are editing in the buffer, the file is the on-disk storage you can fill a buffer from or write a buffer to. All these things a programmer would know, but when just editing text, why is it exposed? Any newer editor just tells you "Here is a file. Edit it."
Yes, I understand the *technical* meanings, but that isn't my question. This is a question not even about if it is a good idea to do it or not. Vim and Emacs are our two oldest editors in common use today, and they share this behavior. I know of no new editor that does the same. When did editors stop doing this and why? | 0 | [
2,
483,
107,
315,
12149,
101,
1790,
79,
17,
13,
62,
6893,
18,
13833,
14,
2841,
128,
21,
3893,
17,
21,
17497,
19,
14,
6573,
60,
800,
3726,
3726,
630,
51,
1301,
233,
1259,
60,
568,
694,
1790,
79,
54,
13,
62,
6893,
18,
15,
42,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Resources for i18n in C++
===
I'm playing around with the locale and i18n stuff in c++ and have been looking for real world examples. I've read through the Josuttis chapter on i18n in his book, and found it useful but with no real world examples to draw from I've no idea if I'm following best practices are committing beginner mistakes. What resources can stackoverflow point me towards both on the web and in print for doing i18n stuff in C++?
Also what libraries are available for C++ that makes i18n easier? What's not in the standard library that needs to be? At first glance, it seems that UTF8 support doesn't exist in the standard library.
| 0 | [
2,
2566,
26,
31,
1087,
103,
19,
272,
20512,
800,
3726,
3726,
31,
22,
79,
791,
140,
29,
14,
375,
62,
17,
31,
1087,
103,
3217,
19,
272,
20512,
17,
57,
74,
699,
26,
683,
126,
3770,
9,
31,
22,
195,
1302,
120,
14,
13366,
1982,
34... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Switch Requests to Content Specific to Requesting Domain
===
Lets say I have several web sites on my web server, all as applications under one domain. How could I register other domains to point to the same web server, and redirect requests to, e.g. a web site linked to the requesting domain?
I know I'll have to have a root site, and I'm guessing I may have have to do some voodoo in the request pipline on this root site, and dispatch a changed request to the relevant sub-site.
Example, I would like *acme.net* and *ajax.net* to both point to the same address as *root.net*. When a browser requests *acme.net*, the content at *acme.root.net* or *root.net/acme*, should be served, but the user must still see *acme.net* in their address bar
| 0 | [
2,
5521,
12279,
20,
2331,
1903,
20,
20033,
4603,
800,
3726,
3726,
6884,
395,
31,
57,
238,
2741,
3259,
27,
51,
2741,
8128,
15,
65,
28,
3767,
131,
53,
4603,
9,
184,
110,
31,
2243,
89,
15544,
20,
454,
20,
14,
205,
2741,
8128,
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... |
RichTextBox and underline color
===
Is there any way to change the color of an underline in a RichTextBox?
I've tried http://geekswithblogs.net/pvidler/archive/2003/10/15/188.aspx but it doesn't seem to work. Anybody know where did those enum values came from? Didn't see any documentation for it.
Thanks. | 0 | [
2,
2042,
11969,
5309,
17,
131,
1143,
1665,
800,
3726,
3726,
25,
80,
186,
161,
20,
753,
14,
1665,
16,
40,
131,
1143,
19,
21,
2042,
11969,
5309,
60,
31,
22,
195,
794,
7775,
6903,
11576,
4020,
1410,
7091,
5447,
9,
2328,
118,
306,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to obtain a list of available COM interfaces in Windows
===
Is there any way of obtaining a list of registered COM interfaces on a windows machine, with GUIDs?
Before anybody thinks this isn't related to programming, I need this data in order to reference a COM interface in F# (or C#) for interfaces that tlbimp isn't exposing. | 0 | [
2,
184,
20,
5545,
21,
968,
16,
904,
13,
960,
6573,
18,
19,
1936,
800,
3726,
3726,
25,
80,
186,
161,
16,
12114,
21,
968,
16,
3801,
13,
960,
6573,
18,
27,
21,
1936,
1940,
15,
29,
9457,
43,
18,
60,
115,
11181,
7973,
48,
2532,
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... |
Is Javascript a proper platform for cryptography? Or, can it be?
===
I noticed a good while back that Wikipedia links to a [Javascript implementation](http://pajhome.org.uk/crypt/md5/) of different hash functions. Also found [Clipperz Crypto](http://www.clipperz.com/open_source/javascript_crypto_library). Even Mozilla implements a [crypto object](http://developer.mozilla.org/en/JavaScript_crypto) in Firefox.
So, _Is Javascript a proper platform for cryptography? Or, can it be?_
Or, I suppose.. Are there any purposes or benefits for hashing data before POST? | 0 | [
2,
25,
8247,
8741,
21,
4119,
2452,
26,
16277,
15438,
60,
54,
15,
92,
32,
44,
60,
800,
3726,
3726,
31,
2711,
21,
254,
133,
97,
30,
20169,
6271,
20,
21,
636,
1004,
1385,
8741,
6123,
500,
5,
21127,
6903,
1060,
728,
8167,
9,
5583,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Spaghetti code
===
Can you post a (short) example of real, overdone spaghetti code (possibly saying what it does)? Can you show me a little debugger's nightmare?
I don't mean the [IOCCC][1] code, that is science fiction. I mean real life examples that happened to you...
[1]: http://www0.us.ioccc.org/main.html | 0 | [
2,
27852,
1797,
800,
3726,
3726,
92,
42,
678,
21,
13,
5,
10849,
6,
823,
16,
683,
15,
84,
43,
849,
27852,
1797,
13,
5,
21628,
1148,
98,
32,
630,
6,
60,
92,
42,
298,
55,
21,
265,
121,
2345,
11356,
22,
18,
10586,
60,
31,
221,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
__REQUIRED_RPCNDR_H_VERSION__
===
I create a header file from an IDL . The IDL file has been compiled in Visual C++ 2005 .
The generated header file contains #define __REQUIRED_RPCNDR_H_VERSION__ 475 .
I tried to use this header file in Visual Studio 2003 , where rpcndr.h contains
{
#define __RPCNDR_H_VERSION__ ( 450 ) // and
#if ( __RPCNDR_H_VERSION__ < __REQUIRED_RPCNDR_H_VERSION__ )
#error incorrect <rpcndr.h> version. Use the header that matches with the MIDL compiler.
#endif
}
Since 450<475 , i get a compile time error . Is there any way i can use the header file in Visual Studio 2003 . Do i need to make changes in the compiltaion setting of idl file .
PS : I have to compile the idl file in Visual C++ 2005 only . ( I do not have a choice to compile it in VS 2003 ) .
| 0 | [
2,
13,
1,
99,
3003,
2095,
1,
6952,
9881,
3807,
1,
252,
1,
10898,
1,
800,
3726,
3726,
31,
1600,
21,
157,
106,
3893,
37,
40,
31,
8643,
13,
9,
14,
31,
8643,
3893,
63,
74,
9316,
19,
3458,
272,
20512,
812,
13,
9,
14,
6756,
157,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Bidi associations and NHibernate mapping
===
I have classes BidiParent and BidiChildList which link parents and children in a bidirectional parent-child relationship. If a child's parent is updated by e.g. the service layer, the old and new parents' children lists are automatically updated to reflect the change. Likewise, if a parent's children list is updated by e.g. adding a new child, the child's parent is automatically changed as is the old parent's children list. I want to try to build up a "smart" domain model.
First question, obviously, is: is this even a good idea?
Second question is: is it possible to tell NHibernate to access and modify the *field* _Children or _Parent, but to consider the *property* Children or Parent to be entirely synonymous with the field? That NHibernate should load and save the internal fields, but HQL or LINQ queries should use the public properties?
public class BidiParent<C, P> { ... }
public class BidiChildList<C, P> : IList<C> { ... }
public class Parent {
public string Name { get; set; }
public IList<Child> Children {
get { return ChildrenBidi; }
set { ChildrenBidi.Set(value); }
}
private BidiChildList<Child, Parent> ChildrenBidi {
get { return BidiChildList.Create(this, p => p._Children, c => c._Parent, (c, p) => c._Parent = p); }
}
internal IList<Child> _Children = new List<Child>();
}
public class Child {
public string Name { get; set; }
public Parent Parent {
get { return ParentBidi.Get(); }
set { ParentBidi.Set(value); }
}
private BidiParent<Child, Parent> ParentBidi {
get { return BidiParent.Create(this, p => p._Children, () => _Parent, p => _Parent = p); }
}
internal Parent _Parent = null;
}
[Test]
public void MultilevelConstruction_Succeeds() {
var p = new Parent {
Name = "Bob",
Children = new List<Child> {
new Child { Name = "Kate" },
new Child { Name = "Billy" }
}
};
Assert.AreEqual(2, p.Children.Count);
Assert.AreEqual("Kate", p.Children[0].Name);
Assert.AreEqual("Billy", p.Children[1].Name);
Assert.AreSame(p, p.Children[0].Parent);
Assert.AreSame(p, p.Children[1].Parent);
}
| 0 | [
2,
4458,
49,
10642,
17,
12109,
15191,
8820,
13305,
800,
3726,
3726,
31,
57,
2684,
4458,
49,
18908,
17,
4458,
49,
11287,
5739,
56,
3508,
1144,
17,
391,
19,
21,
1732,
19393,
4766,
8,
11287,
1429,
9,
100,
21,
850,
22,
18,
4766,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is a "pseudocolumn"? Accidently coded "SELECT $FOO.." and got the error "Invalid pseudocolumn "$FOO".
===
I can't find any documentation for them. Is it something I should know? | 0 | [
2,
98,
25,
21,
13,
7,
1919,
62,
18601,
716,
4404,
103,
7,
60,
3351,
102,
13,
22254,
13,
7,
18,
16964,
5579,
4120,
111,
9,
9,
7,
17,
330,
14,
7019,
13,
7,
108,
18506,
43,
8452,
716,
4404,
103,
13,
7,
4403,
4120,
111,
7,
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... |
Asp.net Photo API (Shutterfly, etc . .)
===
I have a website with all my photos, i would like people to be able to click on my pictures and order prints, etc through a third party service (Shutterfly, etc). Does anyone have any best practices or code examples of doing this in C#, asp.net | 0 | [
2,
28,
306,
9,
2328,
3056,
21,
2159,
13,
5,
15640,
815,
9700,
15,
2722,
13,
9,
13,
9,
6,
800,
3726,
3726,
31,
57,
21,
2271,
29,
65,
51,
7064,
15,
31,
83,
101,
148,
20,
44,
777,
20,
10840,
27,
51,
3104,
17,
389,
12202,
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... |
In production, Apache + mod_wsgi or Nginx + mod_wsgi ?
===
What to use for a medium to large python WSGI application, Apache + mod_wsgi or Nginx + mod_wsgi?<br /><br />
Which combination will need more memory and CPU time?<br />
Which one is faster?<br/>
Which is known for being more stable than the other?<br /><br />
I am also thinking to use CherryPy's WSGI server but I hear it's not very suitable for a very high-load application, what do you know about this?
<br /><br />
***Note**: I didn't use any Python Web Framework, I just wrote the whole thing from scratch.*<br />
***Note'**: Other suggestions are also welcome.*
<br /> | 0 | [
2,
19,
637,
15,
17140,
2754,
7226,
1,
10268,
2234,
54,
13,
2723,
108,
396,
2754,
7226,
1,
10268,
2234,
13,
60,
800,
3726,
3726,
98,
20,
275,
26,
21,
4152,
20,
370,
20059,
619,
18,
2234,
3010,
15,
17140,
2754,
7226,
1,
10268,
223... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How would you implement an RSS feed in a Java web environment?
===
I am working on an implementation for RSS feeds for a collaboration platform.
Say there are several thousands of different collaboration rooms where users can share information, and each needs to publish an RSS feed with news, changes, etc...
Using a plain servlet (i.e. http://www.site.com/RSSServlet/?id=roomID) is costly, every time an RSS client is calling the servlet (and this will happen say every 10 minutes for each user registered to an RSS feed on one of the thousand of rooms) this will trigger the entire servlet lifecycle, which is costly.
On the other hand, keeping a static XML file on the disk for each of the thousands of rooms is costly as well, in terms of hard disk space as well as IO operations...
So, how would you implement RSS feeds in a Java envoronment? | 0 | [
2,
184,
83,
42,
8713,
40,
13,
1224,
18,
4063,
19,
21,
8247,
2741,
2307,
60,
800,
3726,
3726,
31,
589,
638,
27,
40,
6123,
26,
13,
1224,
18,
17058,
26,
21,
4004,
2452,
9,
395,
80,
50,
238,
3805,
16,
421,
4004,
3662,
113,
3878,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Deriving COM interfaces in .NET
===
This is complicated, at least for me, so please bare with me. I'll also preface with I've spent a day searching, to no avail.
Due to company constraints out of my control, I have the following scenario:
A COM library that defines the following interface (no CoClass, just the interface):
> IService : IDispatch { HRESULT
> DoSomething(); }
>
> IServiceProvider : IDispatch {
> HRESULT Init( IDispatch *sink,
> VARIANT_BOOL * result ); HRESULT
> GetService( LONG serviceIndicator,
> IService ** result ); };
| 0 | [
2,
121,
9655,
68,
13,
960,
6573,
18,
19,
13,
9,
2328,
800,
3726,
3726,
48,
25,
8343,
15,
35,
639,
26,
55,
15,
86,
2247,
4856,
29,
55,
9,
31,
22,
211,
67,
20910,
29,
31,
22,
195,
1111,
21,
208,
5792,
15,
20,
90,
24240,
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... |
Flex - Laying out text within a Canvas
===
Here's a problem I keep running into:
I have a lot of situations where I need to display some text with a styled container like so:
<mx:Canvas>
<mx:Text text="{text}" left="5" verticalCenter="0" right="5" />
</mx:Canvas>
As you can see - the text in constrained by the left and right margins of the canvas and I have not specified a height for the text control because I want it to grow vertically when I add text to it. Reason being - if there is one line of text I want it to display in the center of the canvas but if there are two or three lines of text I want the text control to show those two or three lines of text.
What keeps happening however, is that it will only display one line of text - no matter how many times I call invalidateSize() on it or the container. What do I do?
NOTE: Ok, maybe it's an easy fix because as I was typing this question I figured it out - but, here's a chance to answer an easy question!? | 0 | [
2,
14409,
13,
8,
11514,
70,
1854,
363,
21,
9696,
800,
3726,
3726,
235,
22,
18,
21,
1448,
31,
643,
946,
77,
45,
31,
57,
21,
865,
16,
8329,
113,
31,
376,
20,
3042,
109,
1854,
29,
21,
1034,
43,
12147,
101,
86,
45,
13,
1,
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... |
Where are the "Coding War Games" tasks from Peopleware?
===
In Peopleware, DeMarco and Lister write about the "Coding War Games", which was a project they ran between 1984 and 1986 (possibly longer) to help assess individual and workplace productivity. Each task was a small-to-medium sized independent program which could be implemented in any programming language.
My question: where are these tasks? They're not obviously indexed by Google and they don't seem to be available from DeMarco and Lister's company (http://www.systemsguild.com/).
More broadly, is there anything similar to this today that a motivated person could use to get a productivity self-assessment? And if not, who's going to help me create one? | 0 | [
2,
113,
50,
14,
13,
7,
15458,
176,
466,
7,
8674,
37,
148,
5011,
60,
800,
3726,
3726,
19,
148,
5011,
15,
11169,
18247,
17,
968,
106,
2757,
88,
14,
13,
7,
15458,
176,
466,
7,
15,
56,
23,
21,
669,
59,
717,
128,
1930,
17,
1901,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 tool which lists exported methods from a DLL?
===
As the question states - is there a good tool out there which lists methods an unmanaged DLL exports? I would like it to list COM methods and interfaces too. | 0 | [
2,
25,
80,
21,
5607,
56,
7227,
18011,
3195,
37,
21,
13,
43,
211,
60,
800,
3726,
3726,
28,
14,
1301,
202,
13,
8,
25,
80,
21,
254,
5607,
70,
80,
56,
7227,
3195,
40,
367,
177,
8030,
13,
43,
211,
16716,
60,
31,
83,
101,
32,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... |
Is it possible to set a style of link that shows only when the linked webpage is being viewed?
===
I got a problem like this (this is html/css menu):
Eshop | Another eshop | Another eshop
Client wants it work like this:
User comes to website, clicks on Eshop. Eshop changes to red color with red box outline. User decides to visit Another eshop, so Eshop will go back to normaln color without red box outline, and another eshop will do the red outline trick again..
I know there is A:visited but I don't want all visited menu links to be red with red box outline.
Thx for any help :) | 0 | [
2,
25,
32,
938,
20,
309,
21,
1034,
16,
3508,
30,
1285,
104,
76,
14,
4727,
2741,
6486,
25,
142,
6084,
60,
800,
3726,
3726,
31,
330,
21,
1448,
101,
48,
13,
5,
1565,
25,
13,
15895,
118,
6824,
18,
11379,
6,
45,
13,
160,
5347,
13... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the meaning of 'attempt to index upvalue'
===
I am taking my first steps programming in Lua and get this error when I run my script:
attempt to index upvalue 'base' (a function value)
It's probably due to something very basic that I haven't grasped yet, but I can't find any good information about it when googling. Could someone explain to me what it means? | 0 | [
2,
98,
25,
14,
1813,
16,
13,
22,
10303,
14228,
20,
4348,
71,
15165,
22,
800,
3726,
3726,
31,
589,
741,
51,
64,
2382,
3143,
19,
1612,
58,
17,
164,
48,
7019,
76,
31,
485,
51,
3884,
45,
1735,
20,
4348,
71,
15165,
13,
22,
8436,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Serializing java.lang.Locale
===
Got a class that serializes into xml with XMLEncoder nicely with all the variables there. Except for the one that holds *java.lang.Locale*. What could be the trick? TIA. | 0 | [
2,
5956,
3335,
8247,
9,
9949,
9,
15580,
62,
800,
3726,
3726,
330,
21,
718,
30,
5956,
13569,
77,
23504,
29,
23504,
219,
716,
1157,
24050,
29,
65,
14,
12157,
80,
9,
1613,
26,
14,
53,
30,
2763,
1637,
1004,
1385,
9,
9949,
9,
15580,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Locating a file on the path
===
Does anybody know how to determine the location of a file that's in one of the folders specified by the PATH environmental variable other than doing a dir filename.exe /s from the root folder?
I know this is stretching the bounds of a programming question but this is useful for deployment-related issues, also I need to examine the dependencies of an executable. :-) | 0 | [
2,
27917,
21,
3893,
27,
14,
2013,
800,
3726,
3726,
630,
11181,
143,
184,
20,
3746,
14,
1474,
16,
21,
3893,
30,
22,
18,
19,
53,
16,
14,
19294,
18,
9931,
34,
14,
2013,
2703,
7612,
89,
119,
845,
21,
13,
9035,
3893,
7259,
9,
1706,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why use a owner window in MessageBox.Show?
===
MessageBox.Show has forms like MessageBox.Show( ownerWindow, .... ).
What do I gain by assigning a owner window? | 0 | [
2,
483,
275,
21,
2410,
1463,
19,
2802,
5309,
9,
9303,
60,
800,
3726,
3726,
2802,
5309,
9,
9303,
63,
1997,
101,
2802,
5309,
9,
9303,
5,
2410,
27508,
15,
13,
9,
9,
9,
9,
13,
6,
9,
98,
107,
31,
3288,
34,
13952,
68,
21,
2410,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Storing a c# DateTimeOffset value in a SQL server 2005 database
===
I want to store a a c# DateTimeOffset value in a SQL server 2005 database.
Sql 2008 has this as a built-in-type, but SQL 2005 does not.
The DateTimeOffset structure has a DateTime value wich I store as DateTime, an an Offset property (of type TimeSpan). Since this is the time zone relative to UTC, presumably it is usally at a whole number of hours or half-hours.
Suggestions on how best to store this in a SQl 2005 database? | 0 | [
2,
25615,
21,
272,
5910,
1231,
891,
1299,
3554,
1923,
19,
21,
4444,
255,
8128,
812,
6018,
800,
3726,
3726,
31,
259,
20,
1718,
21,
21,
272,
5910,
1231,
891,
1299,
3554,
1923,
19,
21,
4444,
255,
8128,
812,
6018,
9,
4444,
255,
570,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the time complexity of popping elements from list in Python?
===
I wonder what is the time complexity of pop method of list objects in Python (in CPython particulary). Also does the value of N for list.pop(N) affects the complexity? | 0 | [
2,
98,
25,
14,
85,
12745,
16,
24157,
2065,
37,
968,
19,
20059,
60,
800,
3726,
3726,
31,
2666,
98,
25,
14,
85,
12745,
16,
1675,
2109,
16,
968,
3916,
19,
20059,
13,
5,
108,
9750,
93,
11570,
1498,
93,
6,
9,
67,
630,
14,
1923,
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,
0,
0,
0... |
How to avoid computation every time a python module is imported
===
I wrote a python module that makes use of a huge dictionary global variable, currently I put the computation code in the top section, every time this module is imported the heavy computation takes more then one minute which is totally unacceptable. How can I save the computation result somewhere so that the next import doesn't have to compute it? I tried cPickle, but loading the dictionary variable from a file(1.3M) takes approximately the same time as computation. | 0 | [
2,
184,
20,
2658,
21683,
352,
85,
21,
20059,
12613,
25,
11808,
800,
3726,
3726,
31,
738,
21,
20059,
12613,
30,
1364,
275,
16,
21,
2329,
9186,
2062,
7612,
15,
871,
31,
442,
14,
21683,
1797,
19,
14,
371,
1050,
15,
352,
85,
48,
126... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What are the Zope essentials ?
===
I started a job where Zope is involved. I know Python and my new Boss think I am going to handle the application server quickly.
I had a look to this system and its obviously very complex, so I'd like to know where to start and to look next;
Can somebody give me a step by step way to learn Zope ? I don't need the how, I need the what, for once ;-) | 0 | [
2,
98,
50,
14,
9017,
1664,
5832,
18,
13,
60,
800,
3726,
3726,
31,
373,
21,
1205,
113,
9017,
1664,
25,
1013,
9,
31,
143,
20059,
17,
51,
78,
4054,
277,
31,
589,
228,
20,
3053,
14,
3010,
8128,
976,
9,
31,
41,
21,
361,
20,
48,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how to change input button image usng css
===
So, I can create an input button with an image using
<INPUT type="image" src="/images/Btn.PNG" value="">
But, I can't get the same behavior using CSS. for instance, i've tried
<INPUT type="image" class="myButton" value="">
where "myButton" is defined in the css file as
.myButton{
background:url(/images/Btn.PNG) no-repeat;
cursor:pointer;
width: 200px;
height: 100px;
border: none;
}
If that's all I wanted to do, I could use the original style, but I want to change the button's appearance on hover (using a myButton:hover class). I know the links are good because I've been able to load them for a background image for other parts of the page (just as a check). I found examples on the web of how to do it using javascript, but I'm looking for a css solution.
I'm using Firefox 3.0.3 if that makes a difference.
Thanks | 0 | [
2,
184,
20,
753,
6367,
5167,
1961,
182,
2723,
272,
18,
18,
800,
3726,
3726,
86,
15,
31,
92,
1600,
40,
6367,
5167,
29,
40,
1961,
568,
13,
1,
108,
4881,
1001,
3726,
7,
22039,
7,
13,
18,
5453,
3726,
7,
118,
22039,
18,
118,
220,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I pass in an owner window to MessageBox.Show on a different thread?
===
I am trying to figure out Messagebox( ownerWindow, ... ).
Using reflector I see that the ownerWindow defaults to the ActiveWindow for the thread.
So the only time I need the ownerWindow parameter is to call Show from another thread.
However when I try this, I get a cross threading exception.
private void button1_Click( object sender, EventArgs e ) {
new Thread( () => MessageBox.Show( this, "Test" ) ).Start();
}
So it looks like the only time I need the explicitly state the owner window, I cann't use it!
| 0 | [
2,
184,
107,
31,
1477,
19,
40,
2410,
1463,
20,
2802,
5309,
9,
9303,
27,
21,
421,
9322,
60,
800,
3726,
3726,
31,
589,
749,
20,
1465,
70,
2802,
5309,
5,
2410,
27508,
15,
13,
9,
9,
9,
13,
6,
9,
568,
6907,
248,
31,
196,
30,
14... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What libs can I use to bind POJOs to external files for TDD without much overhead?
===
I need a way to bind POJO objects to an external entity, that could be XML, YAML, structured text or anything easy to write and maintain in order to create Mock data for unit testing and TDD. Below are some libraries I tried, but the main problems with them were that I am stuck (for at least more 3 months) to Java 1.4. I'd like any insights on what I could use instead, with as low overhead and upfront setup (like using Schemas or DTDs, for instance) as possible and without complex XML. Here are the libraries I really like (but that apparently doesn't work with 1.4 or doesn't support constructors - you gotta have setters):
<b>RE-JAXB (or Really Easy Java XML Bindings)</b>
<a href="http://jvalentino.blogspot.com/2008/07/in-response-to-easiest-java-xml-binding.html">http://jvalentino.blogspot.com/2008/07/in-response-to-easiest-java-xml-binding.html</a>
<a href="http://sourceforge.net/projects/rejaxb/"> http://sourceforge.net/projects/rejaxb/</a>
<u>Seamlessy binds this:</u>
<item>
<title>Astronauts' Dirty Laundry</title>
<link>http://liftoff.msfc.nasa.gov/news/2003/news-laundry.asp</link>
<description>Compared to earlier spacecraft, the International Space
Station has many luxuries, but laundry facilities are not one of them.
Instead, astronauts have other options.</description>
<pubDate>Tue, 20 May 2003 08:56:02 GMT</pubDate>
<guid>http://liftoff.msfc.nasa.gov/2003/05/20.html#item570</guid>
</item>
<u>To this:</u>
@ClassXmlNodeName("item")
public class Item {
private String title;
private String link;
private String description;
private String pubDate;
private String guid;
//getters and settings go here...
}
<u>Using:</u>
Rss rss = new Rss();
XmlBinderFactory.newInstance().bind(rss, new File("Rss2Test.xml"));
<u>Problem:</u> It relies on annotations, so no good for Java 1.4
<b>jYaml</b>
<a href="http://jyaml.sourceforge.net/">http://jyaml.sourceforge.net/</a>
<u>Seamlessly binds this:</u>
--- !user
name: Felipe Coury
password: felipe
modules:
- !module
id: 1
name: Main Menu
admin: !user
name: Admin
password: password
<u>To this:</u>
public class User {
private String name;
private String password;
private List modules;
}
public class Module {
private int id;
private String name;
private User admin;
}
<u>Using:</u>
YamlReader reader = new YamlReader(new FileReader("example.yaml"));
reader.getConfig().setClassTag("user", User.class);
reader.getConfig().setClassTag("module", Module.class);
User user = (User) reader.read(User.class);
<u>Problem:</u> It won't work with constructors (so no good for immutable objects). I'd have to either change my objects or write custom code por handling the YAML parsing.
Remember that I would like to avoid - as much as I can - writing data descriptors, I'd like something that "just works".
Do you have any suggestions? | 0 | [
2,
98,
13,
8326,
18,
92,
31,
275,
20,
10193,
2353,
1636,
18,
20,
4886,
6488,
26,
15596,
43,
366,
212,
8860,
60,
800,
3726,
3726,
31,
376,
21,
161,
20,
10193,
2353,
1636,
3916,
20,
40,
4886,
9252,
15,
30,
110,
44,
23504,
15,
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... |
Windows could not start the Apache2 on Local Computer - problem
===
During the installation of Apache2 I got the following message into cmd window:
> Installing the Apache2.2 service The
> Apache2.2 service is successfully
> installed. Testing httpd.conf....
>
> Errors reported here must be corrected
> before the service can be started.
> httpd.exe: Could not reliably
> determine the server's fully qualified
> domain name , using 192.168.1.3 for
> ServerName (OS 10048)Only one usage of
> each socket address (protocol/network
> address/port) is normally permitted.
> : make_sock: could not bind to address
> 0.0.0.0:80 no listening sockets available, shutting down Unable to
> open logs Note the errors or messages
> above, and press the <ESC> key to
> exit. 24...
and after installing everything look fine, but it isn't. If I try to start service I got the following message:
> Windows could not start the Apache2 on
> Local Computer. For more information,
> review the System Event Log. If this
> is a non-Micorsoft service, contact
> the service vendor, and refer to
> service-specific error code 1.
Apach2 version is 2.2.9
Does anyone have the same problem, or could help me.
| 0 | [
2,
1936,
110,
52,
799,
14,
17140,
135,
27,
375,
1428,
13,
8,
1448,
800,
3726,
3726,
112,
14,
7758,
16,
17140,
135,
31,
330,
14,
249,
2802,
77,
2390,
43,
1463,
45,
13,
1,
25429,
14,
17140,
135,
9,
135,
365,
14,
13,
1,
17140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 this set of regular expressions FULLY protect against cross site scriptiong?
===
What's an example of something dangerous that would not be caught by the code below?
public static string strip_dangerous_tags(string text_with_tags)
{
string s = Regex.Replace(text_with_tags, @"<script", "<scrSAFEipt", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"</script", "</scrSAFEipt", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"<object", "</objSAFEct", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"</object", "</obSAFEct", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onabort", "onSAFEabort", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onblur", "onSAFEblur", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onchange", "onSAFEchange", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onclick", "onSAFEclick", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"ondblclick", "onSAFEdblclick", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onerror", "onSAFEerror", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onfocus", "onSAFEfocus", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onkeydown", "onSAFEkeydown", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onkeypress", "onSAFEkeypress", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onkeyup", "onSAFEkeyup", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onload", "onSAFEload", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onmousedown", "onSAFEmousedown", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onmousemove", "onSAFEmousemove", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onmouseout", "onSAFEmouseout", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onmouseup", "onSAFEmouseup", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onmouseup", "onSAFEmouseup", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onreset", "onSAFEresetK", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onresize", "onSAFEresize", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onselect", "onSAFEselect", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onsubmit", "onSAFEsubmit", RegexOptions.IgnoreCase);
s = Regex.Replace(s, @"onunload", "onSAFEunload", RegexOptions.IgnoreCase);
return s;
} | 0 | [
2,
630,
48,
309,
16,
1290,
13832,
2337,
2196,
149,
919,
689,
3884,
49,
3279,
60,
800,
3726,
3726,
98,
22,
18,
40,
823,
16,
301,
3342,
30,
83,
52,
44,
1383,
34,
14,
1797,
1021,
60,
317,
12038,
3724,
4998,
1,
43,
14565,
1291,
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... |
Open sourced website
===
I have heard of desktop applications whose code has been open-sourced, but are there any websites whose code has been open-sourced? I don't think I have heard of any. If there are aren't any, are there any reasons why?
This will have the advantage of not having to wait for the web development team to include a new feature. Also, this would ensure that more eyes see the code, ensuring a lower bug count. Of course, hacking would be easy. | 0 | [
2,
368,
1267,
43,
2271,
800,
3726,
3726,
31,
57,
752,
16,
17404,
3767,
1196,
1797,
63,
74,
368,
8,
12097,
43,
15,
47,
50,
80,
186,
13931,
1196,
1797,
63,
74,
368,
8,
12097,
43,
60,
31,
221,
22,
38,
277,
31,
57,
752,
16,
186,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to copy a file to multiple directories using the gnu cp command
===
Is it possible to copy a single file to multiple directories using the cp command ?
I tried the following , which did not work:
cp file1 /foo/ /bar/
cp file1 {/foo/,/bar}
I know it's possible using a for loop, or find. But is it possible using the gnu cp command? | 0 | [
2,
184,
20,
4344,
21,
3893,
20,
1886,
559,
1596,
568,
14,
26092,
9750,
1202,
800,
3726,
3726,
25,
32,
938,
20,
4344,
21,
345,
3893,
20,
1886,
559,
1596,
568,
14,
9750,
1202,
13,
60,
31,
794,
14,
249,
13,
15,
56,
144,
52,
170,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.