unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Korn shell wraparound
===
Okay, I'm sure this is simple but it is driving me nuts. I recently went to work on a program where I've had to step back in time a bit and use Redhat 9. When I'm typing on the command line from a standard xterm running Korn shell, when I reach the end of the line the screen slides to the right (cutting off the left side of my command) instead of wrapping the text around to a new line. This makes things difficult for me because I can't easily copy and paste from the previous command straight from the command line. I have to look at the history and paste the command from there. In case you're wondering, I do a lot of command-line awk scripts that cause the line to get quite long.
Is there a way to force the command line to wrap instead of shifting visibility to the right side of the command I'm typing? I've poured through man page options with no luck. I'm running XFree86 4.2.99.903(174) and KSH 5.2.14. Thanks. | 0 | [
2,
4435,
103,
3593,
8118,
10037,
800,
3726,
3726,
1705,
15,
31,
22,
79,
562,
48,
25,
1935,
47,
32,
25,
2891,
55,
13771,
9,
31,
1989,
296,
20,
170,
27,
21,
625,
113,
31,
22,
195,
41,
20,
1424,
97,
19,
85,
21,
1142,
17,
275,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
.Net Web Service Logging
===
My ideal situation for logging in our web service would be to log all the method calls (authentication as well as data access) with the parameters passed to them as well as errors that may have occured, and have them linked with a single ID that associates them with the same call. In addition, I'd ideally like to be able to control whether all parameters are logged, or if just the method call is logged. I'd like to be able to control if all logins are logged or just the failed ones. Again, all information retrieved in a single request would be linked together via an id (guid or otherwise).
This is my ideal logging situation. If anyone knows how to implement all of this and would be willing to move to the Manchester, NH area... ;)
But seriously, does anyone know how I would go about tying a webservice request received to an error, or method call? My initial attempts involve messing around in a Soap Extension, trying to add a header (soap or html) and what not to pass an arbitrary value from the extension into the service itself. All my attempts have not succeeded.
Our current logging situation has the authentication logging to one table, the method/business calls to another table, and exceptions logging to another table, with no interconnection between them. Timestamps are helpful, sometimes, but not reliable enough to effectively debug. We're currently on .Net 2.0 with the potential to be using 3.5 by the end of the year, so it would be more helpful if replies were kept to 2.0 functionality.
Anyone got any ideas? | 0 | [
2,
13,
9,
2328,
2741,
365,
13,
13919,
800,
3726,
3726,
51,
5628,
1858,
26,
13,
13919,
19,
318,
2741,
365,
83,
44,
20,
6738,
65,
14,
2109,
3029,
13,
5,
1346,
2504,
1786,
857,
28,
134,
28,
1054,
1381,
6,
29,
14,
12905,
1100,
20,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I dump an entire Python process for later debugging inspection?
===
I have a Python application in a strange state. I don't want to do live debugging of the process. Can I dump it to a file and examine its state later? I know I've restored corefiles of C programs in gdb later, but I don't know how to examine a Python application in a useful way from gdb.
<small>(This is a variation on my question about <a href="http://stackoverflow.com/questions/141351/how-do-i-find-what-is-using-memory-in-a-python-process-in-a-production-system">debugging memleaks in a production system</a>.)</small> | 0 | [
2,
184,
107,
31,
11424,
40,
1078,
20059,
953,
26,
138,
121,
16254,
2762,
9762,
60,
800,
3726,
3726,
31,
57,
21,
20059,
3010,
19,
21,
2578,
146,
9,
31,
221,
22,
38,
259,
20,
107,
515,
121,
16254,
2762,
16,
14,
953,
9,
92,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to ignore accents in highlight function.
===
I have a micro-mini-search engine that highlights the search terms in my rails app. The search ignores accents and the highlight is case insensitive. Almost perfect.
But, for instance if I have a record with the text "pão de queijo" and searches for "pao de queijo" the record **is** returned but the iext **is not** highlighted. Similarly, if I search for "pÃo de queijo" the record is returned but not highlighted properly.
My code is as simple as:
<%= highlight(result_pessoa.observacoes, search_string, '<span style="background-color: yellow;">\1</span>') %>
| 0 | [
2,
184,
20,
7174,
7980,
18,
19,
14373,
1990,
9,
800,
3726,
3726,
31,
57,
21,
2899,
8,
6840,
8,
25136,
1406,
30,
13046,
14,
2122,
1663,
19,
51,
2240,
18,
4865,
9,
14,
2122,
7174,
18,
7980,
18,
17,
14,
14373,
25,
610,
19,
19435,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 programmatically repair (not merely compact) an Access .mdb file?
===
I have a corrupt database. If I open it in MS Access, MS Access offers to repair it, and it succeeds.
How can I do that with code?
I know from trying it that JRO.JetEngine.CompactDatabase does NOT work. | 0 | [
2,
184,
92,
31,
625,
6732,
1326,
5612,
13,
5,
1270,
5494,
8285,
6,
40,
1381,
13,
9,
79,
9007,
3893,
60,
800,
3726,
3726,
31,
57,
21,
11305,
6018,
9,
100,
31,
368,
32,
19,
4235,
1381,
15,
4235,
1381,
2486,
20,
5612,
32,
15,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Which Haskell package contains given module.
===
I know a Haskell module name, but I can't figure out in what package it is defined. This is bad because I can't compile without a package exposing this module.
Specificaly it is Text.Regex that I can't locate, but I would like to know how to solve that problem in general.
| 0 | [
2,
56,
63,
16507,
6030,
1588,
504,
12613,
9,
800,
3726,
3726,
31,
143,
21,
63,
16507,
12613,
204,
15,
47,
31,
92,
22,
38,
1465,
70,
19,
98,
6030,
32,
25,
2811,
9,
48,
25,
896,
185,
31,
92,
22,
38,
26561,
366,
21,
6030,
17302... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
sql 2005 rollback transaction
===
I just did a **delete from table**
How do I roll back or undelete the rows?? | 0 | [
2,
4444,
255,
812,
3001,
1958,
12799,
800,
3726,
3726,
31,
114,
144,
21,
13,
1409,
24249,
591,
37,
859,
1409,
184,
107,
31,
3001,
97,
54,
367,
24249,
591,
14,
11295,
60,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Programatically Lighten a Color
===
**Motivation**
I'd like to find a way to take an arbitrary color and lighten it a few shades, so that I can programatically create a nice gradient from the one color to a lighter version. The gradient will be used as a background in a UI.
**Possibility 1**
Obviously I can just split out the RGB values and increase them individually by a certain amount. Is this actually what I want?
**Possibility 2**
My second thought was to convert the RGB to HSV/HSB/HSL (Hue, Saturation, Value/Brightness/Lightness), increase the brightness a bit, decrease the saturation a bit, and then convert it back to RGB. Will this have the desired effect in general? | 0 | [
2,
625,
721,
8438,
471,
219,
21,
1665,
800,
3726,
3726,
13,
1409,
24271,
857,
1409,
31,
22,
43,
101,
20,
477,
21,
161,
20,
247,
40,
17237,
1665,
17,
471,
219,
32,
21,
310,
15969,
15,
86,
30,
31,
92,
625,
721,
8438,
1600,
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... |
Is there an issue sending XML via WCF?
===
Suppose you have an XElement or an XmlElment or even a string containing xml that you want to send via WCF. Are there any special precautions you have to take? The question just came up, what happens when, within the xml message, you transmit an xml document declaration (<?xml version=’1.0’ ?>), which may happen if serializing an XmlDocument... | 0 | [
2,
25,
80,
40,
1513,
4907,
23504,
1197,
11801,
410,
60,
800,
3726,
3726,
5787,
42,
57,
40,
993,
27567,
54,
40,
23504,
532,
1130,
54,
166,
21,
3724,
3503,
23504,
30,
42,
259,
20,
2660,
1197,
11801,
410,
9,
50,
80,
186,
621,
20474... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Operator overloading for C++ maps
===
I need help understanding some C++ operator overload statements. The class is declared like this:
template <class key_t, class ipdc_t>
class ipdc_map_template_t : public ipdc_lockable_t
{
...
typedef map<key_t,
ipdc_t*,
less<key_t>> map_t;
...
The creator of the class has created an iterator for the internal map structure:
struct iterator : public map_t::iterator
{
iterator() {}
iterator(const map_t::iterator & it)
: map_t::iterator(it) {}
iterator(const iterator & it)
: map_t::iterator(
*static_cast<const map_t::iterator *>(&it)) {}
operator key_t() {return ((this->operator*()).first);} // I don't understand this.
operator ipdc_t*() const {return ((this->operator*()).second);} // or this.
};
And begin() and end() return the begin() and end() of the map:
iterator begin() {IT_ASSERT(is_owner()); return map.begin();}
iterator end() {return map.end();}
My question is, if I have an iterator, how do I use those overloads to get the key and the value?
ipdc_map_template_t::iterator iter;
for( iter = my_instance.begin();
iter != my_instance.end();
++iter )
{
key_t my_key = ??????;
ipdc_t my_value = ??????;
}
| 0 | [
2,
6022,
84,
16866,
26,
272,
20512,
6867,
800,
3726,
3726,
31,
376,
448,
3260,
109,
272,
20512,
6022,
84,
8294,
9015,
9,
14,
718,
25,
2482,
101,
48,
45,
22894,
13,
1,
1898,
1246,
1,
38,
15,
718,
15735,
7201,
1,
38,
1,
718,
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... |
Best place for log files in an in-house IT environment
===
All of my users are a short walk down the hall, and all of my programs run on workstations on the same LAN. Some years ago, I had the staff write the log files for all of their programs to a shared folder hierarchy, naming each log file after the machine name in a sub-directory named after the app.
But this arrangement wasn't that great, since if the file server went down then none of the programs anywhere could write logs. Yet keeping logs local to each workstation would make it a pain in the ass to read them whenever we had to debug a problem.
We tried making a DNS alias for the logging fileserver so we could point it to a backup machine when necessary, but DNS aliases don't work with Windows file shares.
Putting the path to the shared log folder in each program isn't great--even if it's field configurable--because we have dozens of programs on dozens of machines.
We've also looked into using Microsoft's distributed file system, but the price is ridiculous.
I'd like a way to gather the logging for many programs on the local network into one place so I can tail and analyze them without paying a visit to the remote machine. We use .Net for all our programs. | 0 | [
2,
246,
209,
26,
6738,
6488,
19,
40,
19,
8,
1682,
32,
2307,
800,
3726,
3726,
65,
16,
51,
3878,
50,
21,
502,
1466,
125,
14,
554,
15,
17,
65,
16,
51,
1726,
485,
27,
170,
10839,
18,
27,
14,
205,
6178,
9,
109,
122,
1464,
15,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Antlr: Simplest way to recognize dates and numbers?
===
What is the simplest (shortest, fewest rules, and no warnings) way to parse both valid dates and numbers in the same grammar? My problem is that a lexer rule to match a valid month (1-12) will match any occurrence of 1-12. So if I just want to match a number, I need a parse rule like:
number: (MONTH|INT);
It only gets more complex when I add lexer rules for day and year. I want a parse rule for date like this:
date: month '/' day ( '/' year )? -> ^('DATE' year month day);
I don't care if month,day & year are parse or lexer rules, just so long as I end up with the same tree structure. I also need to be able to recognize numbers elsewhere, e.g.:
foo: STRING OP number -> ^(OP STRING number);
STRING: ('a'..'z')+;
OP: ('<'|'>');
| 0 | [
2,
40,
38,
12988,
45,
24384,
161,
20,
5844,
4076,
17,
2116,
60,
800,
3726,
3726,
98,
25,
14,
24384,
13,
5,
10849,
1430,
15,
310,
1430,
1761,
15,
17,
90,
3590,
18,
6,
161,
20,
2017,
870,
156,
7394,
4076,
17,
2116,
19,
14,
205,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Application Title Cut Off In VB6
===
Platform: Windows XP
Development Platform: VB6
When trying to set an application title via the Project Properties dialog on the Make tab, it seems to silently cut off the title at a set number of characters. Also tried this via the App.Title property and it seems to suffer from the same problem. I wouldn't care about this but the QA Dept. insists that we need to get the entire title displayed.
Does anyone have a workaround or fix for this?
| 0 | [
2,
3010,
581,
1077,
168,
19,
13,
20468,
379,
800,
3726,
3726,
2452,
45,
1936,
23045,
522,
2452,
45,
13,
20468,
379,
76,
749,
20,
309,
40,
3010,
581,
1197,
14,
669,
3704,
28223,
27,
14,
233,
6523,
15,
32,
2206,
20,
8555,
1077,
16... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to escape an underscore in a C preprocessor token?
===
The following snippet is supposed to take the value of PROJECT (defined in the Makefile)
and create an include file name. For example, if PROJECT=classifier, then it should at the end generate classifier_ir.h for PROJECTINCSTR
I find that this code works as long as I am not trying to use an underscore in the suffix. However the use of the underscore is not optional - our code base uses them everywhere. I can work around this because there are a limited number of values for PROJECT but I would like to know how to make the following snippet actually work, with the underscore. Can it be escaped?
#define QMAKESTR(x) #x
#define MAKESTR(x) QMAKESTR(x)
#define MAKEINC(x) x ## _ir.h
#define PROJECTINC MAKEINC(PROJECT)
#define PROJECTINCSTR MAKESTR(PROJECTINC)
#include PROJECTINCSTR | 0 | [
2,
184,
20,
2220,
40,
131,
15077,
19,
21,
272,
782,
16835,
248,
20,
2853,
60,
800,
3726,
3726,
14,
249,
13,
29061,
25,
2293,
20,
247,
14,
1923,
16,
669,
13,
5,
13439,
19,
14,
233,
16877,
6,
17,
1600,
40,
468,
3893,
204,
9,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
taglib -> dependency injection pojo/service how?
===
Is there a nice way to dependency inject using a jsp taglib?
either using ejb 3.0, spring, or guice...
I have a lot of services/pojos that I would like to use in my taglibs | 0 | [
2,
3383,
8326,
13,
8,
1,
26835,
13646,
2353,
1636,
118,
11449,
184,
60,
800,
3726,
3726,
25,
80,
21,
2210,
161,
20,
26835,
20316,
568,
21,
487,
3401,
3383,
8326,
60,
694,
568,
13,
10022,
220,
203,
9,
387,
15,
1573,
15,
54,
9457,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Tokenizers in .NET
===
This must be a classic .NET question for anyone migrating from Java.
.NET does not seem to have a direct equivalent to java.io.StreamTokenizer, however the JLCA provides a SupportClass that attempts to implement it. I believe the JLCA also provides a Tokenizer SupportClass that takes a String as the source, which I thought a StreamTokenizer would be derived from, but isn't.
What is the *preferred* way to Tokenize both a Stream and a String? or is there one? I'd like to have the flexibility that java.io.StreamTokenizer provides. Any thoughts? | 0 | [
2,
20,
2853,
11907,
18,
19,
13,
9,
2328,
800,
3726,
3726,
48,
491,
44,
21,
2732,
13,
9,
2328,
1301,
26,
1276,
28749,
37,
8247,
9,
13,
9,
2328,
630,
52,
2260,
20,
57,
21,
1744,
4602,
20,
8247,
9,
1963,
9,
11260,
262,
2853,
11... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Alternatives to the MVC
===
What are the alternative "design methods" to the Model View Controller? MVC seems to be popular (SO was built with it, I know that much) but is it the only method used? | 0 | [
2,
2676,
18,
20,
14,
307,
8990,
800,
3726,
3726,
98,
50,
14,
2676,
13,
7,
19862,
3195,
7,
20,
14,
1061,
1418,
9919,
60,
307,
8990,
2206,
20,
44,
844,
13,
5,
656,
23,
392,
29,
32,
15,
31,
143,
30,
212,
6,
47,
25,
32,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Pulling both the text and attribute of a given node using Xpath
===
I'm parsing XML results from an API call using PHP and xpath.
$dom = new DOMDocument();
$dom->loadXML($response->getBody());
$xpath = new DOMXPath($dom);
$xpath->registerNamespace("a", "http://www.example.com");
$hrefs = $xpath->query('//a:Books/text()', $dom);
for ($i = 0; $i < $hrefs->length; $i++) {
$arrBookTitle[$i] = $hrefs->item($i)->data;
}
$hrefs = $xpath->query('//a:Books', $dom);
for ($i = 0; $i < $hrefs->length; $i++) {
$arrBookDewey[$i] = $hrefs->item($i)->getAttribute('DeweyDecimal');
}
This works but is there a way I can access both the text and the attribute from one query? And if so how do you get to those items once query is executed? | 0 | [
2,
3303,
156,
14,
1854,
17,
35,
14755,
16,
21,
504,
15421,
568,
993,
8353,
800,
3726,
3726,
31,
22,
79,
2017,
18,
68,
23504,
1736,
37,
40,
21,
2159,
645,
568,
13,
26120,
17,
993,
8353,
9,
5579,
5555,
800,
78,
11859,
28132,
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 are the good code review/walkthrough techniques?
===
Our team is pretty committed to code walkthroughs. I define a walkthrough as: Where two people sit down next to a computer and look at a diff prior to committing.
I do find them to be very time consuming, but it is often the case that good results are generated from such a procedure. So my question is, what is the single technique/techniques that I can do to make a walkthrough as effective as possible, both as the reviewer and as the presenter?
| 4 | [
2,
98,
50,
14,
254,
1797,
1487,
118,
10915,
11639,
4212,
60,
800,
3726,
3726,
318,
173,
25,
1772,
4164,
20,
1797,
1466,
11639,
18,
9,
31,
9267,
21,
1466,
11639,
28,
45,
113,
81,
148,
2066,
125,
328,
20,
21,
1428,
17,
361,
35,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
gcc3.3 undefined reference to std::_Rb_tree<>::insert_unique
===
I'm building a shared library with g++ 3.3.4. I cannot link to the library because I am getting
./BcdFile.RHEL70.so: undefined symbol: _ZNSt8_Rb_treeIjjSt9_IdentityIjESt4lessIjESaIjEE13insert_uniqueERKj
Which c++filt describes as
std::_Rb_tree<unsigned int, unsigned int, std::_Identity<unsigned int>, std::less<unsigned int>, std::allocator<unsigned int> >::insert_unique(unsigned int const&)
I thought this might have come from using hash_map, but I've taken that all out and switched to regular std::map. I am using g++ to do the linking, which is including `-lstdc++`.
Does anyone know what class would be instantiating this template? Or even better, which library I need to be linking to?
| 0 | [
2,
489,
3384,
240,
9,
240,
367,
13439,
2801,
20,
354,
43,
45,
45,
1,
7549,
1,
8101,
1,
45,
45,
108,
18,
6767,
1,
1020,
5312,
800,
3726,
3726,
31,
22,
79,
353,
21,
2592,
1248,
29,
489,
20512,
203,
9,
240,
9,
300,
9,
31,
196... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Lightest possible PHP MVC
===
I currently use [CodeIgniter][1] for when I want an MVC framework in PHP because it's a very bare framework, is there anything even bearer than CodeIgniter or am I missing a vital plot point in the way that CodeIgniter works?
[1]: http://codeigniter.com/ | 4 | [
2,
471,
1430,
938,
13,
26120,
307,
8990,
800,
3726,
3726,
31,
871,
275,
636,
9375,
9693,
242,
106,
500,
2558,
165,
500,
26,
76,
31,
259,
40,
307,
8990,
6596,
19,
13,
26120,
185,
32,
22,
18,
21,
253,
4856,
6596,
15,
25,
80,
602... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Documentation: Is there an alternative to Lotus' ScreenCam?
===
I'm using very old version of Lotus' Screen cam to record UI manipulation for documentation.
What do you use for this purpose?
| 0 | [
2,
13945,
45,
25,
80,
40,
2676,
20,
15175,
22,
2324,
8760,
60,
800,
3726,
3726,
31,
22,
79,
568,
253,
315,
615,
16,
15175,
22,
2324,
5373,
20,
571,
13,
5661,
17561,
26,
13945,
9,
98,
107,
42,
275,
26,
48,
2131,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Rules for multi-user WinForms Apps on Vista
===
We have an MSI installer for a .Net WinForms app for Windows XP that installs and runs only as an admin. Users have to log in to the app when it runs. Customers want it to install and run under a user account under Vista, and to use their Windows account.
A preliminary look through the code shows lots of problems; the installer writes to the registry and installs the app in C:\Program Files\. The app stores user preference in the registry, writes data to C:\Documents and Settings\All Users\, and creates temp files in C:\.
I guess the first thing to do is store data files in System.Environment.CommonApplicationData and user preferences in System.Environment.LocalApplicationData. Can a user account install an app to System.Environment.ProgramFiles?
A problem is that the app must be installable and uninstallable by any user, and all users share the same data files. Each user has their own preferences.
Is there a book or web site that gives a detailed breakdown on what is required to build a WinForms app that obeys the rules for multiple users on Vista? | 0 | [
2,
1761,
26,
1889,
8,
16704,
628,
4190,
18,
4865,
18,
27,
13520,
800,
3726,
3726,
95,
57,
40,
4235,
49,
16146,
106,
26,
21,
13,
9,
2328,
628,
4190,
18,
4865,
26,
1936,
23045,
30,
16146,
18,
17,
1461,
104,
28,
40,
21,
43,
2160,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
class with valueTypes fields and boxing
===
I'm experimenting with generics and I'm trying to create structure similar to Dataset class.<br>
I have following code
public struct Column<T>
{
T value;
T originalValue;
public bool HasChanges
{
get { return !value.Equals(originalValue); }
}
public void AcceptChanges()
{
originalValue = value;
}
}
public class Record
{
Column<int> id;
Column<string> name;
Column<DateTime?> someDate;
Column<int?> someInt;
public bool HasChanges
{
get
{
return id.HasChanges | name.HasChanges | someDate.HasChanges | someInt.HasChanges;
}
}
public void AcceptChanges()
{
id.AcceptChanges();
name.AcceptChanges();
someDate.AcceptChanges();
someInt.AcceptChanges();
}
}
Problem I have is that when I add new column I need to add it also in HasChanges property and AcceptChanges() method. This just asks for some refactoring.<br>
So first solution that cames to my mind was something like this:
public interface IColumn
{
bool HasChanges { get; }
void AcceptChanges();
}
public struct Column<T> : IColumn {...}
public class Record
{
Column<int> id;
Column<string> name;
Column<DateTime?> someDate;
Column<int?> someInt;
IColumn[] Columns { get { return new IColumn[] {id, name, someDate, someInt}; }}
public bool HasChanges
{
get
{
bool has = false;
IColumn[] columns = Columns; //clone and boxing
for (int i = 0; i < columns.Length; i++)
has |= columns[i].HasChanges;
return has;
}
}
public void AcceptChanges()
{
IColumn[] columns = Columns; //clone and boxing
for (int i = 0; i < columns.Length; i++)
columns[i].AcceptChanges(); //Here we are changing clone
}
}
As you can see from comments we have few problems here with struct cloning. Simple solution to this is to change Column<T> to class, but from my tests it seems that it increases memory usage by ~40% (because of each object metadata) which is not acceptable for me.
<br>
<br>
So my question is: does anyone have any other ideas how to create methods that can work on different structured objects/records? Maybe someone from F# community can suggest how such problems are solved in functional languages and how it impacts performance and memory usage.
| 0 | [
2,
718,
29,
1923,
4474,
18,
2861,
17,
8131,
800,
3726,
3726,
31,
22,
79,
5737,
68,
29,
12733,
18,
17,
31,
22,
79,
749,
20,
1600,
1411,
835,
20,
1054,
3554,
718,
9,
1,
5145,
1,
31,
57,
249,
1797,
317,
13,
10346,
4698,
1,
38,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I get the key value of a db.ReferenceProperty without a database hit?
===
Is there a way to get the key (or id) value of a db.ReferenceProperty, without dereferencing the actual entity it points to? I have been digging around - it looks like the key is stored as the property name preceeded with an _, but I have been unable to get any code working. Examples would be much appreciated. Thanks. | 0 | [
2,
184,
107,
31,
164,
14,
1246,
1923,
16,
21,
13,
9007,
9,
28018,
10890,
106,
1084,
366,
21,
6018,
770,
60,
800,
3726,
3726,
25,
80,
21,
161,
20,
164,
14,
1246,
13,
5,
248,
4924,
6,
1923,
16,
21,
13,
9007,
9,
28018,
10890,
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... |
PostgreSQL's and MySQL's full text search
===
How do the full text search systems of PostgreSQL and MySQL compare? Is any clearly better than the oder? In which way are they different? | 0 | [
2,
678,
6879,
18,
22402,
22,
18,
17,
51,
18,
22402,
22,
18,
503,
1854,
2122,
800,
3726,
3726,
184,
107,
14,
503,
1854,
2122,
1242,
16,
678,
6879,
18,
22402,
17,
51,
18,
22402,
11590,
60,
25,
186,
2885,
574,
119,
14,
13,
17812,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Anyone used the ABC Metric for measuring an application's size?
===
There are some nice things about it (like it encapsulates the concept of Cyclomatic complexity), and I was wondering if anyone has used it in "real life". If so, what are your experiences? Is it a useful measure of size (as opposed to KLOC or Function Points)?
For those wondering what I'm smoking:
Here's a link to some info on it: http://c2.com/cgi/wiki/Wiki?AbcMetric | 0 | [
2,
1276,
147,
14,
5079,
11544,
26,
9937,
40,
3010,
22,
18,
1072,
60,
800,
3726,
3726,
80,
50,
109,
2210,
564,
88,
32,
13,
5,
1403,
32,
1957,
4666,
18,
12383,
18,
14,
2420,
16,
12833,
6732,
12745,
6,
15,
17,
31,
23,
5712,
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... |
Why should i learn F#?
===
what is the new language F# is all about? where is that going to be useful? | 4 | [
2,
483,
378,
31,
2484,
398,
5910,
60,
800,
3726,
3726,
98,
25,
14,
78,
816,
398,
5910,
25,
65,
88,
60,
113,
25,
30,
228,
20,
44,
4811,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Buffer a large file; BufferedInputStream limited to 2gb; Arrays limited to 2^31 bytes
===
I am sequentially processing a large file and I'd like to keep a large chunk of it in memory, 16gb ram available on a 64 bit system.
A quick and dirty way is to do this, is simply wrap the input stream into a buffered input stream, unfortunately, this only gives me a 2gb buffer. I'd like to have more of it in memory, what alternatives do I have? | 0 | [
2,
17497,
21,
370,
3893,
73,
17497,
69,
108,
4881,
11260,
1317,
20,
172,
11400,
73,
7718,
18,
1317,
20,
172,
1,
3513,
34,
3231,
800,
3726,
3726,
31,
589,
1353,
5495,
10107,
102,
5511,
21,
370,
3893,
17,
31,
22,
43,
101,
20,
643,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why would an UpdatePanel stop working after a few minutes?
===
What aspects of the UpdatePanel are sensitive to time?
I have an UpdatePanel that works fine. If I leave the page for a few minutes and come back, the UpdatePanel doesn't work. Looking at firebug, I see that it sends the Request and gets a Response back. However, the page itself doesn't update. I'm not seeing any script errors either. So far I haven't been able to identify any other factor than the passage of time. | 0 | [
2,
483,
83,
40,
11100,
3206,
532,
747,
638,
75,
21,
310,
902,
60,
800,
3726,
3726,
98,
4842,
16,
14,
11100,
3206,
532,
50,
7830,
20,
85,
60,
31,
57,
40,
11100,
3206,
532,
30,
693,
1123,
9,
100,
31,
767,
14,
2478,
26,
21,
310... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best way to compare 2 XML documents in Java
===
I'm trying to write an automated test of an application that basically translates a custom message format into an XML message and sends it out the other end. I've got a good set of input/output message pairs so all I need to do is send the input messages in and listen for the XML message to come out the other end.
When it comes time to compare the actual output to the expected output I'm running into some problems. My first thought was just to do string comparisons on the expected and actual messages. This doens't work very well because the example data we have isn't always formatted consistently and there are often times different aliases used for the XML namespace (and sometimes namespaces aren't used at all.)
I know I can parse both strings and then walk through each element and compare them myself and this wouldn't be too difficult to do, but I get the feeling there's a better way or a library I could leverage.
So, boiled down, the question is:
Given two Java Strings which both contain valid XML how would you go about determining if they are semantically equivalent? Bonus points if you have a way to determine what the differences are. | 0 | [
2,
246,
161,
20,
11590,
172,
23504,
4374,
19,
8247,
800,
3726,
3726,
31,
22,
79,
749,
20,
2757,
40,
14904,
1289,
16,
40,
3010,
30,
11374,
18510,
21,
5816,
2802,
2595,
77,
40,
23504,
2802,
17,
11350,
32,
70,
14,
89,
241,
9,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
jquery override form submit not working when submit called by javascript on a element
===
I've got a page with a normal form with a submit button and some jquery which binds to the form submit event and overrides it with e.preventDefault() and runs an ajax command. This works fine when the submit button is clicked but when a link with onclick='document.formName.submit();' is clicked, the event is not caught by the ajax form submit event handler. Any ideas why not or how to get this working without binding to all the a elements?
Cheers!
Trev | 0 | [
2,
487,
8190,
93,
84,
11891,
505,
12298,
52,
638,
76,
12298,
227,
34,
8247,
8741,
27,
21,
4520,
800,
3726,
3726,
31,
22,
195,
330,
21,
2478,
29,
21,
1826,
505,
29,
21,
12298,
5167,
17,
109,
487,
8190,
93,
56,
10193,
18,
20,
14... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.
===
i have a scenario. (Windows form, c#.NEt )
1) There is a main form which host some user control.
2) user control does some heavy data operation, as such if i dirctly call the Usercontrol_Load method the UI become non responsive for the duration for load method execution.
3) To overcome this i thoght i shoud load data on different thread, (trying to change existing code as little as i can)
4) I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.
5) NOW came a real problem, all the UI (main form and its child usercontrls) was created on primary main thread. In the LOAD method of the usercontrl i m fetching data based on the values of some contrl(like textbox) on userCoontrl.
Pseudocode wud look like this
//CODE 1
UserContrl1_LOadDataMethod()
{
if(textbox1.text=="MyName") <<======this gives exception
{
//Load data correspondin to "MyName"
//Populate a globale variable List<string> which will be binded to grid at some later stage
}
}
The Exception it gave was "**Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on**."
To know more on this i did some 'googling' and suggestion came up like using the following code
//CODE 2
UserContrl1_LOadDataMethod()
{
if(InvokeRequired) // Line #1
{
this.Invoke(new MethodInvoker(UserContrl1_LOadDataMethod));
return;
}
if(textbox1.text=="MyName") **<<======Now it wont give exception**
{
//Load data correspondin to "MyName"
//Populate a globale variable List<string> which will be binded to grid at some later stage
}
}
BUT BUT BUT... it seems i m back to square one. The Application again become non responsive, seems like because of the execution of the Line #1 if condition, the loading task is again done by parent thread and not the third that i spawned
i dont know whether i perceived this right or wrong. i m naive to threading.
How to resolve this and also what is the effect of execution of Line#1 if block | 0 | [
2,
919,
8,
96,
10647,
1453,
52,
7394,
45,
569,
12904,
37,
21,
9322,
89,
119,
14,
9322,
32,
23,
679,
27,
9,
800,
3726,
3726,
31,
57,
21,
12705,
9,
13,
5,
27508,
18,
505,
15,
272,
5910,
9,
2328,
13,
6,
137,
6,
80,
25,
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... |
Server based syntax highlighting in Management Studio
===
Why are some keywords highlighted blue and some gray in SQL Server Management Studio?
And why does the UNION keyword highlight as gray when connected to a SQL Server 2000 database, but blue when connected to a SQL Server 2005 database? | 0 | [
2,
8128,
432,
22649,
23102,
19,
1097,
1120,
800,
3726,
3726,
483,
50,
109,
1246,
12827,
12528,
705,
17,
109,
2030,
19,
4444,
255,
8128,
1097,
1120,
60,
17,
483,
630,
14,
667,
1246,
9587,
14373,
28,
2030,
76,
2587,
20,
21,
4444,
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,
0,
0,
0... |
Force a Samba process to close a file
===
Is there a way to force a Samba process to close a given file without killing it?
Samba opens a process for each client connection, and sometimes I see it holds open files far longer than needed. Usually i just kill the process, and the (windows) client will reopen it the next time it access the share; but sometimes it's actively reading other file for a long time, and i'd like to just 'kill' one file, and not the whole connection. | 0 | [
2,
558,
21,
13,
18,
7483,
953,
20,
543,
21,
3893,
800,
3726,
3726,
25,
80,
21,
161,
20,
558,
21,
13,
18,
7483,
953,
20,
543,
21,
504,
3893,
366,
2389,
32,
60,
13,
18,
7483,
8965,
21,
953,
26,
206,
6819,
2760,
15,
17,
1030,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 XPath do a foreign key lookup across two subtrees of an XML?
===
Say I have the following XML...
<root>
<base>
<tent key="1" color="red"/>
<tent key="2" color="yellow"/>
<tent key="3" color="blue"/>
</base>
<bucket>
<tent key="1"/>
<tent key="3/>
</bucket>
</root>
...what would the XPath be that returns that the "bucket" contains "red" and "blue"? | 0 | [
2,
92,
993,
8353,
107,
21,
1228,
1246,
361,
576,
464,
81,
972,
8101,
18,
16,
40,
23504,
60,
800,
3726,
3726,
395,
31,
57,
14,
249,
23504,
9,
9,
9,
13,
1,
14032,
1,
13,
1,
8436,
1,
13,
1,
1316,
38,
1246,
3726,
7,
165,
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... |
SSIS gurus: Links to Great Learning Content requested
===
Okay, you don't need to be a guru, but if you happen to have a good working knowledge on SSIS and you used some tutorials around the web to get you there, then please share them. I have been trying to find some solid stuff (screencasts maybe), but I am having a hard time.
Any solid links would be appreciated and I will add them to this question in an aggregated format at the end. Thank you. | 0 | [
2,
13,
18,
4557,
10334,
18,
45,
6271,
20,
374,
2477,
2331,
6602,
800,
3726,
3726,
1705,
15,
42,
221,
22,
38,
376,
20,
44,
21,
10334,
15,
47,
100,
42,
2384,
20,
57,
21,
254,
638,
1918,
27,
13,
18,
4557,
17,
42,
147,
109,
2972... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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/C++ Structure offset
===
I'm looking for a piece of code that can tell me the offset of a field within a structure without allocating an instance of the structure.
IE: given
struct mstct {
int myfield;
int myfield2;
};
I could write:
mstct thing;
printf("offset %lu\n", (unsigned long)(&thing.myfield2 - &thing));
And get "offset 4" for the output. How can I do it without that "mstct thing" declaration/allocating one?
I know that &<struct> does not always point at the first byte of the first field of the structure, I can account for that later. | 0 | [
2,
272,
118,
150,
20512,
1411,
17493,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
1855,
16,
1797,
30,
92,
494,
55,
14,
17493,
16,
21,
575,
363,
21,
1411,
366,
65,
2499,
1880,
40,
4851,
16,
14,
1411,
9,
13,
660,
45,
504,
13,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is classic ASP still a alternative adverse other languages for new projects?
===
There are a lot of webs still using classic ASP instead of ASP.NET but that is not the question - "never change a running project".
The question is if it is still a first choice as a base for a new web-project or would it be worth to switch to ASP.NET? Would you recommend a classic ASP programmer another language to switch over? There was no single update to classic ASP since it first release but a lot of companies are still using it for new projects. Deservedly? | 0 | [
2,
25,
2732,
28,
306,
174,
21,
2676,
15528,
89,
2556,
26,
78,
2314,
60,
800,
3726,
3726,
80,
50,
21,
865,
16,
2741,
18,
174,
568,
2732,
28,
306,
700,
16,
28,
306,
9,
2328,
47,
30,
25,
52,
14,
1301,
13,
8,
13,
7,
9018,
753,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Create xml-stylesheet PI with Rails XMLBuilder
===
I want to attach an xslt stylesheet to an XML document that I build with XMLBuilder. This is done with a Processing Instruction that looks like
<?xml-stylesheet type='text/xsl' href='/stylesheets/style.xslt' ?>
Normally, I'd use the `instruct!` method, but `:xml-stylesheet` is not a valid Ruby symbol.
XMLBuilder has a solution for this case for elements using `tag!` method, but I don't see the equivalent for Processing Instructions.
Any ideas? | 0 | [
2,
1600,
23504,
8,
4381,
17627,
4194,
29,
2240,
18,
23504,
20904,
800,
3726,
3726,
31,
259,
20,
19514,
40,
993,
18,
255,
38,
1034,
17627,
20,
40,
23504,
4492,
30,
31,
1895,
29,
23504,
20904,
9,
48,
25,
677,
29,
21,
5511,
7304,
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... |
Xsl relative path for xsl:import or xsl:include
===
I am trying to use VBSctipt to do an xslt transform on an xml object.
The xsl file I'm translating includes the `<xsl:import href="script.xsl"/>` directive. If I use the absolute href (http://localhost/mysite/script.xsl) it imports the style sheet fine; however, if I use the relative path (script.xsl) it reports "resource not found". I need to be able to port this amongst a set of machines, so I need to be able to use the relative uri. Any suggestions?
notes:
- VBscript file is at http://localhost/myscript.asp
- first xsl file is at http://localhost/mysite/styles.xsl
- second xsl file is at http://localhost/mysite/script.xsl
| 0 | [
2,
993,
18,
255,
4543,
2013,
26,
993,
18,
255,
45,
1660,
1993,
54,
993,
18,
255,
45,
22640,
800,
3726,
3726,
31,
589,
749,
20,
275,
13,
20468,
18,
14468,
4417,
20,
107,
40,
993,
18,
255,
38,
8007,
27,
40,
23504,
3095,
9,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Which database has the best support for replication
===
I have a fairly good feel for what MySQL replication can do. I'm wondering what other databases support replication, and how they compare to MySQL and others?
Some questions I would have are:
1. Is replication built in, or an add-on/plugin?
2. Do they use statement- or row-based replication?
3. Is it easy to check consistency between master and slaves?
4. How easy is it to get a failed replica back in sync with the master?
5. Any other interesting features... | 0 | [
2,
56,
6018,
63,
14,
246,
555,
26,
23841,
800,
3726,
3726,
31,
57,
21,
6647,
254,
583,
26,
98,
51,
18,
22402,
23841,
92,
107,
9,
31,
22,
79,
5712,
98,
89,
6018,
18,
555,
23841,
15,
17,
184,
59,
11590,
20,
51,
18,
22402,
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... |
Symbian S60 Code Editor
===
Am I completely overlooking a simple code editor for Symbian S60v3 phones?
I am looking for something similar to [CEdit][1] which is for Windows Mobile.
[1]: http://www.logicalsky.com/Product_CEdit.php | 0 | [
2,
13,
7261,
10035,
13,
18,
3374,
1797,
1835,
800,
3726,
3726,
589,
31,
1524,
14237,
21,
1935,
1797,
1835,
26,
13,
7261,
10035,
13,
18,
3374,
710,
240,
14830,
60,
31,
589,
699,
26,
301,
835,
20,
636,
11014,
242,
500,
2558,
165,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there use for the Scroll Lock button anymore?
===
The scroll lock button seems to be a reminder of the good old green terminal days. Does anyone still use it? Should the 101 button keyboard become the 100 button keyboard? | 0 | [
2,
25,
80,
275,
26,
14,
12159,
3991,
5167,
3375,
60,
800,
3726,
3726,
14,
12159,
3991,
5167,
2206,
20,
44,
21,
14973,
16,
14,
254,
315,
647,
3855,
509,
9,
630,
1276,
174,
275,
32,
60,
378,
14,
7698,
5167,
8896,
533,
14,
808,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
C# Lambda Expressions or Delegates as a Properties or Arguments
===
I'm looking to create an ValidationRule<T> class that validates properties on an entity type object. I'd really like to set the name of the property to inspect, and then give the class a delegate or a lambda expression that will be evaluated at runtime when the object runs its IsValid() method. Does anyone have a snippet of something like this, or any ideas on how to pass an anonymous method as an argument or property?
Also, I'm not sure if I'm explaining what I'm trying to accomplish so please ask questions if I'm not being clear. Thanks in advance. | 0 | [
2,
272,
5910,
13,
24187,
13832,
54,
10845,
28,
21,
3704,
54,
10553,
800,
3726,
3726,
31,
22,
79,
699,
20,
1600,
40,
27999,
16154,
1,
38,
1,
718,
30,
7394,
7759,
3704,
27,
40,
9252,
1001,
3095,
9,
31,
22,
43,
510,
101,
20,
309,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 use OpenId with the ASP MembershipProvider?
===
I have a ASP.Net 2.0 website that is currently using a custom MembershipProvider and the standard login control. I would like to replace the login control with the one from DotNetOpenId.
I override the ValidateUser which checks the username and password, but I shouldn't need to implement this when using OpenId.
Is it possible to use OpenId and still have the membership provider available to me to so that I can still use it to access the current logged in user?
Or is it the case the there is need for the using provider model anymore?
| 0 | [
2,
92,
31,
275,
368,
1340,
29,
14,
28,
306,
4363,
26735,
139,
60,
800,
3726,
3726,
31,
57,
21,
28,
306,
9,
2328,
172,
9,
387,
2271,
30,
25,
871,
568,
21,
5816,
4363,
26735,
139,
17,
14,
1236,
6738,
108,
569,
9,
31,
83,
101,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best (free) way to store data? How about updates to the file system?
===
I have an idea for how to solve this problem, but I wanted to know if there's something easier and more extensible to my problem.
The program I'm working on has two basic forms of data: images, and the information associated with those images. The information associated with the images has been previously stored in a JET database of extreme simplicity (four tables) which turned out to be both slow and incomplete in the stored fields. We're moving to a new implementation of data storage. Given the simplicity of the data structures involved, I was thinking that a database was overkill.
Each image will have information of it's own (capture parameters), will be part of a group of images which are interrelated (taken in the same thirty minute period, say), and then part of a larger group altogether (taken of the same person). Right now, I'm storing people in a dictionary with a unique identifier. Each person then has a List of the different groups of pictures, and each picture group has a List of pictures. All of these classes are serializable, and I'm just serializing and deserializing the dictionary. Fairly straightforward stuff. Images are stored separately, so that the dictionary doesn't become astronomical in size.
The problem is: what happens when I need to add new information fields? Is there an easy way to setup these data structures to account for potential future revisions? In the past, the way I'd handle this in C was to create a serializable struct with lots of empty bytes (at least a k) for future extensibility, with one of the bytes in the struct indicating the version. Then, when the program read the struct, it would know which deserialization to use based on a massive switch statement (and old versions could read new data, because extraneous data would just go into fields which are ignored).
Does such a scheme exist in C#? Like, if I have a class that's a group of String and Int objects, and then I add another String object to the struct, how can I deserialize an object from disk, and then add the string to it? Do I need to resign myself to having multiple versions of the data classes, and a factory which takes a deserialization stream and handles deserialization based on some version information stored in a base class? Or is a class like Dictionary ideal for storing this kind of information, as it will deserialize all the fields on disk automatically, and if there are new fields added in, I can just catch exceptions and substitute in blank Strings and Ints for those values?
If I go with the dictionary approach, is there a speed hit associated with file read/writes as well as parameter retrieval times? I figure that if there's just fields in a class, then field retrieval is instant, but in a dictionary, there's some small overhead associated with that class.
Thanks! | 0 | [
2,
246,
13,
5,
4639,
6,
161,
20,
1718,
1054,
60,
184,
88,
16779,
20,
14,
3893,
329,
60,
800,
3726,
3726,
31,
57,
40,
882,
26,
184,
20,
8402,
48,
1448,
15,
47,
31,
417,
20,
143,
100,
80,
22,
18,
301,
4950,
17,
91,
1396,
871... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Unit Tests for comparing text files in NUnit
===
I have a class that processes a 2 xml files and produces a text file.
I would like to write a bunch of unit / integration tests that can individually pass or fail for this class that do the following:
1. For input A and B, generate the output.
2. Compare the contents of the generated file to the contents expected output
3. When the actual contents differ from the expected contents, fail and display some **useful** information about the differences.
Below is the prototype for the class along with my first stab at unit tests.
**Is there a pattern I should be using for this sort of testing, or do people tend to write zillions of TestX() functions?**
**Is there a better way to coax text-file differences from NUnit?** Should I embed a textfile diff algorithm?
----
class ReportGenerator
{
string Generate(string inputPathA, string inputPathB)
{
//do stuff
}
}
----
[TextFixture]
public class ReportGeneratorTests
{
static Diff(string pathToActualResult, string pathToExpectedResult)
{
using (StreamReader rs1 = File.OpenText(pathToExpectedResult))
{
using (StreamReader rs2 = File.OpenText(pathToActualResult))
{
string actualContents = rs2.ReadToEnd();
string expectedContents = rs1.ReadToEnd();
//this works, but the output could be a LOT more useful.
Assert.AreEqual(expendedContents, actualContents);
}
}
}
static TestGenerate(string pathToInputA, string pathToInputB, string pathToExpectedResult)
{
ReportGenerator obj = new ReportGenerator();
string pathToResult = obj.Generate(pathToInputA, pathToInputB);
Diff(pathToExpectedResult, pathToActualReport);
}
[Test]
public void TestX()
{
TestGenerate("x1.xml", "x2.xml", "x-expected.txt");
}
[Test]
public void TestY()
{
TestGenerate("y1.xml", "y2.xml", "y-expected.txt");
}
//etc...
} | 0 | [
2,
1237,
4894,
26,
15047,
1854,
6488,
19,
10210,
242,
800,
3726,
3726,
31,
57,
21,
718,
30,
5102,
21,
172,
23504,
6488,
17,
6700,
21,
1854,
3893,
9,
31,
83,
101,
20,
2757,
21,
7653,
16,
1237,
13,
118,
8078,
4894,
30,
92,
16579,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 key differences between ASP.NET webforms and MVC
===
I know what MVC is and I work in webforms but I don't know how MVC will be that much different. I guess the code behind model will be different. So will it be like webforms minus the code behind and instead having it in a controller?
I see there are other related posts but I don't they address this. | 0 | [
2,
98,
50,
14,
1246,
4921,
128,
28,
306,
9,
2328,
2741,
4190,
18,
17,
307,
8990,
800,
3726,
3726,
31,
143,
98,
307,
8990,
25,
17,
31,
170,
19,
2741,
4190,
18,
47,
31,
221,
22,
38,
143,
184,
307,
8990,
129,
44,
30,
212,
421,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SQL - Query to get server's IP address
===
Is there a query in SQL Server 2005 I can use to get the server's IP or name? | 0 | [
2,
4444,
255,
13,
8,
25597,
20,
164,
8128,
22,
18,
15735,
3218,
800,
3726,
3726,
25,
80,
21,
25597,
19,
4444,
255,
8128,
812,
31,
92,
275,
20,
164,
14,
8128,
22,
18,
15735,
54,
204,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do I locate resources on the classpath in java? Specifically stuff that ends in .hbm.xml
===
How do I locate resources on the classpath in java?
Specifically stuff that ends in .hbm.xml.
| 0 | [
2,
184,
107,
31,
12717,
2566,
27,
14,
718,
8353,
19,
8247,
60,
3524,
3217,
30,
3451,
19,
13,
9,
18098,
79,
9,
396,
8184,
800,
3726,
3726,
184,
107,
31,
12717,
2566,
27,
14,
718,
8353,
19,
8247,
60,
3524,
3217,
30,
3451,
19,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Which object should I mock?
===
I am writing a <a href="http://martinfowler.com/eaaCatalog/repository.html">repository</a>. Fetching objects is done through a DAO. Creating and updating objects is done through a Request object, which is given to a RequestHandler object (a la <a href="http://en.wikipedia.org/wiki/Command_pattern">Command pattern</a>). I didn't write the DAO, Request, or RequestHandler, so I can't modify them.
I'm trying to write a test for this repository. I have mocked out both the DAO and RequestHandler. My goal is to have the mocked RequestHandler simply add the new or updated object to the mocked DAO. This will create the illusion that I'm talking to the DB. This way, I don't have to mock the repository for all the classes that call this repository.
The problem is that the Request object is this gob of string blobs and various alphanumeric codes. I'm pretty sure XML is involved too. It's sort of a mess. Another developer is writing the code to create the Request object based on the objects being stored. And since RequestHandler takes in Requests and not the object I'm storing, it can't update the mocked DAO.
So the question is: do I mock the Request too, or should I wait until the other guy, who is kind of slow, to finish his code before I write the test? Or screw it and mock out the entire repository when testing the classes that call the repository?
BTW, I say "mock" not in the NMock sense, but rather like faking the DB with an in-memory collection. | 0 | [
2,
56,
3095,
378,
31,
10506,
60,
800,
3726,
3726,
31,
589,
1174,
21,
13,
1,
58,
746,
14057,
3726,
7,
21127,
6903,
17067,
19361,
106,
9,
960,
118,
3537,
58,
9709,
5567,
118,
99,
14882,
14599,
9,
15895,
7,
1,
99,
14882,
14599,
1,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there an embeddable Webkit component for Windows / C# development?
===
I've seen a few COM controls which wrap the Gecko rendering engine ([GeckoFX][1], as well as the control shipped by Mozilla - [mozctlx.dll][2]). Is there a wrapper for Webkit that can be included in a .NET Winform application?
[1]: http://code.google.com/p/geckofx/
[2]: http://stackoverflow.com/questions/26147/is-it-possible-to-embed-gecko-or-webkit-in-a-cnet-win-form-just-like-a-webview | 0 | [
2,
25,
80,
40,
11911,
69,
43,
579,
2741,
13703,
5912,
26,
1936,
13,
118,
272,
5910,
522,
60,
800,
3726,
3726,
31,
22,
195,
541,
21,
310,
13,
960,
8671,
56,
8118,
14,
28456,
15307,
1406,
13,
5,
2558,
834,
2601,
1041,
396,
500,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can I Install Visual Studio 2008 Express with VS 2005 ?
===
I wonder if They can work perfectly together... | 0 | [
2,
92,
31,
16146,
3458,
1120,
570,
2999,
29,
4611,
812,
13,
60,
800,
3726,
3726,
31,
2666,
100,
59,
92,
170,
5759,
429,
9,
9,
9,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do you teach the stuff that good programming is made of?
===
In my company we get on and off shore contractors in and out all the time. It is hard to maintain a code base like that since the level of maturity in writing code varies considerably. To a certain extent my role consists of mentoring the development resources. I have found that if I just let them code, i will get something very naive put together. What is the best way to teach people who are already developers how and when to use interfaces, abstraction, wrapping, design patterns, reflection etc. | 0 | [
2,
184,
107,
42,
5348,
14,
3217,
30,
254,
3143,
25,
117,
16,
60,
800,
3726,
3726,
19,
51,
237,
95,
164,
27,
17,
168,
3944,
19323,
19,
17,
70,
65,
14,
85,
9,
32,
25,
552,
20,
4027,
21,
1797,
1000,
101,
30,
179,
14,
662,
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... |
.NET unable to connect to Oracle DB using Oracle proxy user
===
I am setting up a test version of my website against a new schema. I am trying to connect using the proxy connection and am getting the following error:
> ORA-28150: proxy not authorized to connect as client
my connect string has the following form:
> Data Source=_Instance_; User Id=_user_; Proxy User Id=_prxy\_usr_;Proxy Password=_prxy\_pass_; Min Pool Size = 0; Connection Timeout = 30
Do you have any idea what might be wrong?
| 0 | [
2,
13,
9,
2328,
2343,
20,
6379,
20,
15759,
13,
9007,
568,
15759,
27188,
4155,
800,
3726,
3726,
31,
589,
2697,
71,
21,
1289,
615,
16,
51,
2271,
149,
21,
78,
23874,
9,
31,
589,
749,
20,
6379,
568,
14,
27188,
2760,
17,
589,
1017,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Under what circumstances are dynamic languages not appropriate?
===
What factors indicate that a project's solution should not be coded in a dynamic language? | 0 | [
2,
131,
98,
5072,
50,
7782,
2556,
52,
4593,
60,
800,
3726,
3726,
98,
4776,
4342,
30,
21,
669,
22,
18,
4295,
378,
52,
44,
13,
22254,
19,
21,
7782,
816,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Is there a dynamic language based .NET build tool?
===
I might be starting a new project in .NET soon, and would prefer not to use an XML-based build tool like Nant or MSBuild. I like Rake, but I'm thinking it may be better to have something based on a .NET dynamic language (such as Boo), similar in spirit to gant or BuildR for Java. Is there such a thing for .NET? If not, what do you recommend? | 0 | [
2,
25,
80,
21,
7782,
816,
432,
13,
9,
2328,
1895,
5607,
60,
800,
3726,
3726,
31,
530,
44,
1422,
21,
78,
669,
19,
13,
9,
2328,
651,
15,
17,
83,
6369,
52,
20,
275,
40,
23504,
8,
1281,
1895,
5607,
101,
13,
11028,
54,
4235,
2936... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Integrating External Sources in a Build
===
Where I work I have several projects in separate repositories. Each project shares a lot of common code that I want to pull out into a distinct project. I'm thinking of calling the project with the following scheme: Company.Department.Common or Company.Department.Utility.
I've constructed a project for this and it has an automated build script (as does every other project).
My question is that I would like to refactor my existing projects to depend on this new project. One method that is quite basic but not exactly what I am looking for is to simply build my Utility project, copy the DLL to my lib folder in my consuming project, and check that DLL in with that consuming project.
I personally feel that method is quite poor. I would like to have a reference to my Utility project and will perform a svn-update and build of the Utility project before the build of the consuming project.
FYI, the kind of code that's in the Utlity project are Logging facilities, BDD Unit Testing classes, IoC faclities, and Common Company.Department focused classes.
Hope my question isn't too vague, but with some answers I may be able to sharpen the focus on exactly what I would like to do.
Lastly, this is for .Net projects and using NAnt as the build script, and svn for code versioning. | 0 | [
2,
24529,
4886,
2662,
19,
21,
1895,
800,
3726,
3726,
113,
31,
170,
31,
57,
238,
2314,
19,
1725,
302,
14882,
262,
2829,
9,
206,
669,
5945,
21,
865,
16,
757,
1797,
30,
31,
259,
20,
2201,
70,
77,
21,
4421,
669,
9,
31,
22,
79,
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 would you store hours of operation in C#?
===
We're building an app that stores "hours of operation" for various businesses. What is the easiest way to represent this data so you can easily check if an item is open?
Some options:
- Segment out blocks (every 15 minutes) that you can mark "open/closed". Checking involves seeing if the "open" bit is set for the desired time (a bit like a train schedule).
- Storing a list of time ranges (11am-2pm, 5-7pm, etc.) and checking whether the current time falls in any specified range (this is what our brain does when parsing the strings above).
Does anyone have experience in storing and querying timetable information and any advice to give?
(There's all sorts of crazy corner cases like "closed the first Tuesday of the month", but we'll leave that for another day). | 0 | [
2,
184,
83,
42,
1718,
974,
16,
1453,
19,
272,
5910,
60,
800,
3726,
3726,
95,
22,
99,
353,
40,
4865,
30,
4134,
13,
7,
4754,
18,
16,
1453,
7,
26,
617,
4426,
9,
98,
25,
14,
27237,
161,
20,
3501,
48,
1054,
86,
42,
92,
2351,
26... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Explicit code parallelism in c++
===
Out of order execution in CPUs means that a CPU can reorder instructions to gain better performance and it means the CPU is having to do some very nifty bookkeeping and such. There are other processor approaches too, such as hyper-threading.
Some fancy compilers understand the (un)interrelatedness of instructions to a limited extent, and will automatically interleave instruction flows (probably over a longer window than the CPU sees) to better utilise the processor. Deliberate compile-time interleaving of floating and integer instructions is another example of this.
Now I have highly-parallel task. And I typically have one normal x86 processor without hyper-threading.
Is there a straight-forward way to get my the body of my 'for' loop for this highly-parallel task to be interleaved so that two (or more) iterations are being done together? (This is slightly different from 'loop unwinding' as I understand it.)
My task is a 'virtual machine' running through a set of instructions, which I'll really simplify for illustration as:
<pre>void run(int num) {
for(int n=0; n<num; n++) {
vm_t data(n);
for(int i=0; i<data.len(); i++) {
data.insn(i).parse();
data.insn(i).eval();
}
}
}</pre>
So the execution trail might look like this:
<pre>data(1) insn(0) parse
data(1) insn(0) eval
data(1) insn(1) parse
...
data(2) insn(1) eval
data(2) insn(2) parse
data(2) insn(2) eval</pre>
Now, what I'd like is to be able to do two (or more) iterations explicitly in parallel:
<pre>data(1) insn(0) parse
data(2) insn(0) parse \ processor can do OOO as these two flow in
data(1) insn(0) eval /
data(2) insn(0) eval \ OOO opportunity here too
data(1) insn(1) parse /
data(2) insn(1) parse</pre>
Is there some c++ template madness to get this kind of explicit parallelism generated?
Of course I can do the interleaving - and even staggering - myself in code, but it makes for much less readable code. And if I really want unreadable, I can go so far as assembler! But surely there is some pattern for this kind of thing? | 0 | [
2,
14990,
1797,
3821,
756,
19,
272,
20512,
800,
3726,
3726,
70,
16,
389,
5769,
19,
17578,
18,
1108,
30,
21,
17578,
92,
302,
7861,
7650,
20,
3288,
574,
956,
17,
32,
1108,
14,
17578,
25,
452,
20,
107,
109,
253,
1781,
3072,
93,
360... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Test if a floating point number is an integer
===
This code works (C# 3)
double d;
if(d == (double)(int)d) ...;
1. Is there a better way to do this?
2. For extraneous reasons I want to avoid the double cast so; what nice ways exist other than this? (even if they aren't as good) | 0 | [
2,
1289,
100,
21,
8319,
454,
234,
25,
40,
13820,
800,
3726,
3726,
48,
1797,
693,
13,
5,
150,
5910,
203,
6,
1494,
13,
43,
73,
100,
5,
43,
800,
3726,
13,
5,
14368,
6,
5,
6391,
6,
43,
6,
13,
9,
9,
9,
73,
137,
9,
25,
80,
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... |
mangling __FILE__ and __LINE__ in code for quoting?
===
Is there a way to get the C/C++ preprocessor or a template or such to mangle/hash the __FILE__ and __LINE__ and perhaps some other external input like a build-number into a single short number that can be quoted in logs or error messages?
(The intention would be to be able to reverse it (to a list of candidates if its lossy) when needed when a customer quotes it in a bug report.) | 0 | [
2,
17200,
802,
13,
1,
16877,
1,
17,
13,
1,
1143,
1,
19,
1797,
26,
28146,
60,
800,
3726,
3726,
25,
80,
21,
161,
20,
164,
14,
272,
118,
150,
20512,
782,
16835,
248,
54,
21,
22894,
54,
145,
20,
169,
4875,
118,
25436,
14,
13,
1,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Standard way to detect mobile browsers in a web application based on the http request
===
We are beginning to go down the path of mobile browser support for an enterprise e-commerce webapp (Java/Servlet based). Of course there are many decisions to be made, but it seems to me the cornerstone is to be able to reliably detect mobile browsers, and make decisions on the content to be returned accordingly. Is there a standard way to make this determination (quickly) based on the http request, and ideally glean more information about the given browser and device making the request (screen size, html capabilities, etc?).
I would also appreciate any supplemental information that would be of use from someone who has gone down this path of taking an existing large scale enterprise webapp and architect-ing out mobile browser support from the development side.
| 0 | [
2,
1236,
161,
20,
9092,
3241,
16495,
18,
19,
21,
2741,
3010,
432,
27,
14,
7775,
3772,
800,
3726,
3726,
95,
50,
997,
20,
162,
125,
14,
2013,
16,
3241,
16495,
555,
26,
40,
6002,
13,
62,
8,
26470,
2741,
7753,
13,
5,
1004,
1385,
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 tell if a UIView is visible and on screen?
===
If I have a UIView (or UIView subclass) that is visible, how can I tell if it's currently being shown on the screen (as opposed to, for example, being in a section of a scroll view that is currently off-screen)?
To maybe give you a better idea of what I mean, UITableView has a couple of methods for determining the set of currently visible cells. I'm looking for some code that can make a similar determination for any given UIView.
| 0 | [
2,
184,
107,
31,
494,
100,
21,
13,
5661,
4725,
25,
4560,
17,
27,
2324,
60,
800,
3726,
3726,
100,
31,
57,
21,
13,
5661,
4725,
13,
5,
248,
13,
5661,
4725,
972,
1898,
6,
30,
25,
4560,
15,
184,
92,
31,
494,
100,
32,
22,
18,
87... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Sending the same but modifed object over ObjectOutputStream
===
I have the following code that shows either a bug or a misunderstanding on my part.
I sent the same list, but modified over an ObjectOutputStream. Once as [0] and other as [1]. But when I read it, I get [0] twice. I think this is caused by the fact that I am sending over the same object and ObjectOutputStream must be caching them somehow.
Is this work as it should, or should I file a bug?
<pre>
import java.io.*;
import java.net.*;
import java.util.*;
public class OOS {
public static void main(String[] args) throws Exception {
Thread t1 = new Thread(new Runnable() {
public void run() {
try {
ServerSocket ss = new ServerSocket(12344);
Socket s= ss.accept();
ObjectOutputStream oos = new ObjectOutputStream(s.getOutputStream());
List<Integer> same = new ArrayList<Integer>();
same.add(0);
oos.writeObject(same);
same.clear();
same.add(1);
oos.writeObject(same);
} catch(Exception e) {
e.printStackTrace();
}
}
});
t1.start();
Socket s = new Socket("localhost", 12344);
ObjectInputStream ois = new ObjectInputStream(s.getInputStream());
// outputs [0] as expected
System.out.println(ois.readObject());
// outputs [0], but expected [1]
System.out.println(ois.readObject());
System.exit(0);
}
}
</pre> | 0 | [
2,
4907,
14,
205,
47,
7226,
821,
69,
3095,
84,
3095,
1320,
4881,
11260,
800,
3726,
3726,
31,
57,
14,
249,
1797,
30,
1285,
694,
21,
6256,
54,
21,
13,
21558,
27,
51,
141,
9,
31,
795,
14,
205,
968,
15,
47,
5372,
84,
40,
3095,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can gmail's "random signatures" from an RSS feed be used for truly dynamic signatures?
===
This is a new gmail labs feature that lets you specify an RSS feed to grab random quotes from to append to your email signature. I'd like to use that to generate signatures programmatically based on parameters I pass in, the current time, etc. But it seems gmail caches the contents of the URL you specify. Any way to control that or anyone know how often gmail looks at the URL? | 0 | [
2,
92,
489,
8079,
22,
18,
13,
7,
2195,
5555,
19506,
7,
37,
40,
13,
1224,
18,
4063,
44,
147,
26,
4574,
7782,
19506,
60,
800,
3726,
3726,
48,
25,
21,
78,
489,
8079,
17020,
1580,
30,
6884,
42,
19077,
40,
13,
1224,
18,
4063,
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... |
Setting up our new Dev server What is the easiest way to assign multiple IP addresses
===
I'm setting up our new Dev server, what is the easiest way to assign multiple IP addresses to Windows 2008 Server Network Adapter?
I'm setting up our development machine, running IIS 7 and want to have the range between 192.168.1.200 - .254 available when I'm setting up a new website in IIS 7.
| 0 | [
2,
2697,
71,
318,
78,
9664,
8128,
98,
25,
14,
27237,
161,
20,
13952,
1886,
15735,
12636,
800,
3726,
3726,
31,
22,
79,
2697,
71,
318,
78,
9664,
8128,
15,
98,
25,
14,
27237,
161,
20,
13952,
1886,
15735,
12636,
20,
1936,
570,
8128,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 URL do I post to for Live Search SOAP service?
===
Its possible I am just really really thick. However, looking over the SDK for the live search (MSN search) that uses SOAP, doesn't tell me what URL the service is at?? I can download SDKs for C# or VB which probably encapsulate, but that doesn't help me (I am using ruby).
http://search.live.com/developer/ | 0 | [
2,
98,
287,
6362,
107,
31,
678,
20,
26,
515,
2122,
6447,
365,
60,
800,
3726,
3726,
82,
938,
31,
589,
114,
510,
510,
2318,
9,
207,
15,
699,
84,
14,
13,
18,
43,
197,
26,
14,
515,
2122,
13,
5,
79,
18,
103,
2122,
6,
30,
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... |
Resources for high performance computing in C++
===
I'm looking for books or online resources that go in detail over programing techniques for high performance computing using C++. | 0 | [
2,
2566,
26,
183,
956,
10626,
19,
272,
20512,
800,
3726,
3726,
31,
22,
79,
699,
26,
964,
54,
2087,
2566,
30,
162,
19,
6110,
84,
625,
68,
4212,
26,
183,
956,
10626,
568,
272,
20512,
9,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do I remotely debug a stored procedure within the same domain?
===
What are the steps needed to successfully be able to remotely debug a store proc (SQL Server 2005) from within VS 2005? Again both client and server machines are on the same domain. I have never done this so step by step instructions would greatly be appreciated. | 0 | [
2,
184,
107,
31,
23288,
121,
16254,
21,
8214,
7004,
363,
14,
205,
4603,
60,
800,
3726,
3726,
98,
50,
14,
2382,
851,
20,
3673,
44,
777,
20,
23288,
121,
16254,
21,
1718,
13,
15617,
13,
5,
18,
22402,
8128,
812,
6,
37,
363,
4611,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you version your projects?
===
I understand that Microsoft uses this template when versioning their products: Major.Minor.Build.Revision.
Major is changed when the "developers" want to show that there is a big change in the software and backward compatibility cannot be assumed. Maybe a major rewrite of the code is done.
Minor number represents a significant enhancement with the intention of backward compatibility.
Build number is a small change, for example a recompilation of the same source.
Revision is used to fix a security hole and should be fully interchangeable. Both Build and Revision are optional. This information is based on [MSDN Version Class][1].
How do you version your projects and why do you version them this way?
[1]: http://msdn.microsoft.com/en-us/library/system.version.aspx | 0 | [
2,
184,
107,
42,
615,
154,
2314,
60,
800,
3726,
3726,
31,
1369,
30,
7099,
2027,
48,
22894,
76,
615,
68,
66,
1985,
45,
394,
9,
2160,
248,
9,
29361,
9,
99,
10732,
9,
394,
25,
1015,
76,
14,
13,
7,
26051,
445,
7,
259,
20,
298,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Most efficient way to get default constructor of a Type.
===
What is the most efficient way to get the default constructor (i.e. instance constructor with no parameters) of a System.Type?
I was thinking something along the lines of the code below but it seems like there should be a simplier more efficient way to do it.
Type type = typeof(FooBar)
BindingFlags flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance;
type.GetConstructors(flags)
.Where(constructor => constructor.GetParameters().Length == 0)
.First();
| 0 | [
2,
127,
8243,
161,
20,
164,
12838,
6960,
248,
16,
21,
1001,
9,
800,
3726,
3726,
98,
25,
14,
127,
8243,
161,
20,
164,
14,
12838,
6960,
248,
13,
5,
49,
9,
62,
9,
4851,
6960,
248,
29,
90,
12905,
6,
16,
21,
329,
9,
4474,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 best Eclipse 3.4 JVM settings?
===
What are the best JVM settings you have found for running eclipse.
<b>please post the list of settings you would use in the eclipse.ini file</b>
Thanks! | 4 | [
2,
98,
50,
14,
246,
11652,
203,
9,
300,
487,
20147,
12410,
60,
800,
3726,
3726,
98,
50,
14,
246,
487,
20147,
12410,
42,
57,
216,
26,
946,
11652,
9,
13,
1,
220,
1,
6744,
678,
14,
968,
16,
12410,
42,
83,
275,
19,
14,
11652,
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,
0,
0,
0,
0,
0,
0,
0,
0... |
Visual Studio Express Edition to get a MCTS Certification?
===
In few weeks I'll get an MCTS Certification, and for learning I'm using MS Visual Studio 2008.
As after certification I'll teach in a 3 month course about the basis of .NET Framework, do you think that the Visual Studio Express Edition (both C# and Web development) are sufficient for learning or I need to buy a complete edition license for each guy involved (actually an EDU edition)?
| 0 | [
2,
3458,
1120,
2999,
1322,
20,
164,
21,
1324,
38,
18,
10439,
60,
800,
3726,
3726,
19,
310,
1342,
31,
22,
211,
164,
40,
1324,
38,
18,
10439,
15,
17,
26,
2477,
31,
22,
79,
568,
4235,
3458,
1120,
570,
9,
28,
75,
10439,
31,
22,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Getting a boost::shared_ptr for this
===
I am making extensive use of `boost:shared_ptr` in my code. In fact, most of the objects that are allocated on the heap are held by a `shared_ptr`. Unfortunately this means that I can't pass `this` into any function that takes a `shared_ptr`. Consider this code:
void bar(boost::shared_ptr<Foo> pFoo)
{
...
}
void Foo::someFunction()
{
bar(this);
}
There are two problems here. First, this won't compile because the T* constructor for `shared_ptr` is explicit. Second, if I force it to build with `bar(boost::shared_ptr<Foo>(this))` I will have created a second shared pointer to my object that will eventually lead to a double-delete.
This brings me to my question: Is there any standard pattern for getting a copy of the existing shared pointer you know exists from inside a method on one of those objects? Is using intrusive reference counting my only option here?
| 0 | [
2,
1017,
21,
10419,
45,
45,
16608,
43,
1,
4417,
139,
26,
48,
800,
3726,
3726,
31,
589,
544,
3386,
275,
16,
13,
1,
10858,
384,
45,
16608,
43,
1,
4417,
139,
1,
19,
51,
1797,
9,
19,
837,
15,
127,
16,
14,
3916,
30,
50,
11685,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Which is better for web testing? Record-Play automation or coding?
===
I am working on a new project and I wanted to know which automation tool is the best to use. Should I record-play or code? | 0 | [
2,
56,
25,
574,
26,
2741,
4431,
60,
571,
8,
5438,
23217,
54,
13,
15458,
60,
800,
3726,
3726,
31,
589,
638,
27,
21,
78,
669,
17,
31,
417,
20,
143,
56,
23217,
5607,
25,
14,
246,
20,
275,
9,
378,
31,
571,
8,
5438,
54,
1797,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
What's the best way to format 24 hour time in XSLT 1.0?
===
I've had a hard time finding good ways of taking a time format and easily determining if it's valid then producing a resulting element that has some formatting using XSLT 1.0.
Given the following xml:
<root>
<srcTime>2400</srcTime>
</root>
It would be great to produce the resulting xml:
<root>
<dstTime>24:00</dstTime>
</root>
However, if the source xml contains an invalid 24 hour time format, the resulting *dstTime* element should be blank.
For example, when the invalid source xml is the following:
<root>
<srcTime>NOON</srcTime>
</root>
The resulting xml should be:
<root>
<dstTime></dstTime>
</root>
The question is, what's the **best XSLT 1.0** fragment that could be written to produce the desired results? The hope would be to keep it quite simple and not have to parse the every piece of the time (i.e. pattern matching would be sweet if possible). | 0 | [
2,
98,
22,
18,
14,
246,
161,
20,
2595,
937,
1671,
85,
19,
993,
18,
255,
38,
137,
9,
387,
60,
800,
3726,
3726,
31,
22,
195,
41,
21,
552,
85,
3007,
254,
2847,
16,
741,
21,
85,
2595,
17,
2351,
13521,
100,
32,
22,
18,
7394,
94... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 stop Eclipse 3.4 losing reference to the JRE in projects
===
Sometimes when using eclipse it loses references to the JRE.
i.e. It cannot find classes like Object or Arraylist.
It only occurs in some projects.
I have found that if you change the installed JRE to another and then back again to the one you want to use, it will then work again
Is there a better way to stop it doing this? | 0 | [
2,
184,
20,
747,
11652,
203,
9,
300,
2281,
2801,
20,
14,
487,
99,
19,
2314,
800,
3726,
3726,
1030,
76,
568,
11652,
32,
14745,
7231,
20,
14,
487,
99,
9,
31,
9,
62,
9,
32,
1967,
477,
2684,
101,
3095,
54,
7718,
5739,
9,
32,
104... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best way to start Unit and Functional testing of a Ruby Rails website?
===
I am testing a Ruby Rails website and wanted to get started with Unit and Functional testing. | 0 | [
2,
98,
25,
14,
246,
161,
20,
799,
1237,
17,
7652,
4431,
16,
21,
10811,
2240,
18,
2271,
60,
800,
3726,
3726,
31,
589,
4431,
21,
10811,
2240,
18,
2271,
17,
417,
20,
164,
373,
29,
1237,
17,
7652,
4431,
9,
3,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
What is the single best book on Automated Testing of Websites
===
I am looking for the one good book to read for Automated Testing in general of a website. | 0 | [
2,
98,
25,
14,
345,
246,
360,
27,
14904,
4431,
16,
13931,
800,
3726,
3726,
31,
589,
699,
26,
14,
53,
254,
360,
20,
1302,
26,
14904,
4431,
19,
297,
16,
21,
2271,
9,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Is there a way to determine the signature of a Lua function?
===
Recently, [Lee Baldwin](http://stackoverflow.com/users/5200/lee-baldwin) showed how to write a [generic, variable argument memoize function](http://stackoverflow.com/questions/129877/how-do-i-write-a-generic-memoize-function#141689). I thought it would be better to return a simpler function where only one parameter is required. Here is my total bogus attempt:
local function memoize(f)
local cache = {}
if select('#', ...) == 1 then
return function (x)
if cache[x] then
return cache[x]
else
local y = f(x)
cache[x] = y
return y
end
end
else
return function (...)
local al = varg_tostring(...)
if cache[al] then
return cache[al]
else
local y = f(...)
cache[al] = y
return y
end
end
end
end
Obviously, `select('#', ...)` fails in this context and wouldn't really do what I want anyway. Is there any way to tell inside **memoize** how many arguments **f** expects?
***
"No" is a fine answer if you know for sure. It's not a big deal to use two separate **memoize** functions. | 0 | [
2,
25,
80,
21,
161,
20,
3746,
14,
7810,
16,
21,
1612,
58,
1990,
60,
800,
3726,
3726,
1989,
15,
636,
4716,
11674,
500,
5,
21127,
6903,
25325,
2549,
9990,
9,
960,
118,
16704,
18,
18133,
4621,
118,
4716,
8,
3817,
43,
4181,
6,
1908,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Java: Enum parameter in method
===
I have a method lets say:
private static String drawCellValue(int maxCellLength, String cellValue, String align) { }
and as you can notice, I have a parameter called align. Inside this method I'm going to have some if condition on whether the value is a 'left' or 'right'.. setting the parameter as String, obviously I can pass any string value.. I would like to know if it's possible to have an Enum value as a method parameter, and if so, how?
Just in case someone thinks about this; I thought about using a Boolean value but I don't really fancy it. First, how to associate true/false with left/right ? (Ok, I can use comments but I still find it dirty) and secondly, I might decide to add a new value, like 'justify', so if I have more than 2 possible values, Boolean type is definitely not possible to use.
Any ideas? | 0 | [
2,
8247,
45,
1957,
723,
18906,
19,
2109,
800,
3726,
3726,
31,
57,
21,
2109,
6884,
395,
45,
932,
12038,
3724,
2003,
9725,
15165,
5,
6391,
2049,
9725,
6325,
15,
3724,
1667,
15165,
15,
3724,
23389,
6,
13,
1,
13,
1,
17,
28,
42,
92,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
App to Change Ldap Password for a JIRA/SVN server
===
I'm setting up a server to offer JIRA and SVN. I figure, I'll use LDAP to keep the identity management simple.
So, before I write one.... is there a good app out there to let users change their ldap password? I want something that lets a user authenticate with ldap and update their password. A form with username, old password, new password and verification would be enough.
I can write my own, but it seems silly to do so if there's already a good app out there that handles this....
Thanks for the help. | 0 | [
2,
4865,
20,
753,
644,
20472,
20884,
26,
21,
487,
3517,
118,
18,
16578,
8128,
800,
3726,
3726,
31,
22,
79,
2697,
71,
21,
8128,
20,
1994,
487,
3517,
17,
13,
18,
16578,
9,
31,
1465,
15,
31,
22,
211,
275,
644,
20472,
20,
643,
14,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you establish context and call an WebSphere EJB from the Sun JRE (not IBM)
===
Is there a way to call an EJB that is served through WebSphere (iiop://host:port/ejbName) from a vanilla JRE (like Sun). A lot of people have been telling me that this type of architecture relies in a homogenous environment. Thoughts? | 0 | [
2,
184,
107,
42,
4088,
4141,
17,
645,
40,
2741,
14079,
13,
10022,
220,
37,
14,
939,
487,
99,
13,
5,
1270,
10233,
6,
800,
3726,
3726,
25,
80,
21,
161,
20,
645,
40,
13,
10022,
220,
30,
25,
423,
120,
2741,
14079,
13,
5,
2865,
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... |
How do I call a Win32 Function in PowerShell 1.0 using P/Invoke?
===
There are many scenarios where it would be useful to call a Win32 function or some other DLL from a PowerShell script. to Given the following function signature:
bool MyFunction( char* buffer, int* bufferSize )
I hear there is something that makes this easier in PowerShell CTP 2, but I'm curious how this is best done in PowerShell 1.0. The fact that the function needing to be called ***is using pointers*** could affect the solution (yet I don't really know)
So the question is what's the best way to write a PowerShell script that can call an exported Win32 function like the one above? | 0 | [
2,
184,
107,
31,
645,
21,
628,
3125,
1990,
19,
414,
15984,
137,
9,
387,
568,
351,
118,
108,
2625,
1048,
60,
800,
3726,
3726,
80,
50,
151,
19611,
113,
32,
83,
44,
4811,
20,
645,
21,
628,
3125,
1990,
54,
109,
89,
13,
43,
211,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
WMI calls from WebService
===
So I have made a webservice that interfaces with a set of data contained in a WMI namespace. It works fine when I run it with the ASP.net in built development web server, and returns the data as requested. However when I publish it to an IIS 6 server (win 2003), the webservice no longer allows me to execute the WMI method calls. However it does let me still read from it.
Instead it gives me:
System.Management.ManagementException: Access denied at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode) at System.Management.ManagementObject.InvokeMethod(String methodName, ManagementBaseObject inParameters, InvokeMethodOptions options) at System.Management.ManagementObject.InvokeMethod(String methodName, Object[] args)
I have tried to fix this (and yes I know this is a bad practice but I just wanted to see if it would work) by adding the "Everyone" group to that WMI namespaces security settings and giving them full permisions (which includes execute). Then resetting IIS. However I still get this error.
Anyone got any ideas? | 0 | [
2,
619,
1435,
3029,
37,
2741,
11449,
800,
3726,
3726,
86,
31,
57,
117,
21,
2741,
11449,
30,
6573,
18,
29,
21,
309,
16,
1054,
3437,
19,
21,
619,
1435,
204,
5582,
9,
32,
693,
1123,
76,
31,
485,
32,
29,
14,
28,
306,
9,
2328,
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... |
What is the single best open source automation tool for functional web testing
===
I wanted to check out a new open source tool for automated testing of a website. I prefer multi-browser support, even multi-platform. | 0 | [
2,
98,
25,
14,
345,
246,
368,
1267,
23217,
5607,
26,
7652,
2741,
4431,
800,
3726,
3726,
31,
417,
20,
2631,
70,
21,
78,
368,
1267,
5607,
26,
14904,
4431,
16,
21,
2271,
9,
31,
6369,
1889,
8,
25699,
4104,
555,
15,
166,
1889,
8,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
What are the main differences between the popular web frameworks?
===
There are [lots of web application frameworks](http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks) available these days, for pretty much every language out there. What are their strengths, weaknesses, and unique features? Assuming the luxury of choice, what factors would lead you to consider one over another other?
Programming language is an obvious difference, but a Java vs Ruby flamewar won't be much fun, and most of these frameworks seem to be at least as much an investment in technology, tools and complexity as their language of choice; so I'm more interested in things like:
* Development speed and convenience
* Barriers to entry - both in terms of developer training, and of infrastructure needed
* Lock-in - how much code could you keep if you had to switch frameworks?
* Flexibility - does the framework dictate your architecture or design? (Whether that would be a good or bad thing is probably best left to a separate discussion.)
* Performance, scalability, and stability - obviously depending on the developers!
Also, is anyone using one of the less mainstream frameworks like [Seaside](http://www.seaside.st/) or [Weblocks](http://common-lisp.net/project/cl-weblocks/)? | 0 | [
2,
98,
50,
14,
407,
4921,
128,
14,
844,
2741,
6596,
18,
60,
800,
3726,
3726,
80,
50,
636,
5639,
18,
16,
2741,
3010,
6596,
18,
500,
5,
21127,
6903,
219,
9,
17375,
26132,
9,
5583,
118,
17375,
118,
960,
16258,
218,
1,
1041,
1,
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... |
WM_GETMINMAXINFO, the ptMaxSize not having any effect
===
In handling a WM_GETMINMAXINFO message, I attempt to alter the parameter MINMAXINFO structure by changing the ptMaxSize. It doesn't seem to have any effect. When I receive the WM_SIZE message, I always get the same value, no matter whether I increase or decrease the ptMaxSize in the WM_GETMINMAXINFO. | 0 | [
2,
19312,
1,
3060,
2160,
8304,
108,
4120,
15,
14,
12923,
8304,
10454,
52,
452,
186,
1590,
800,
3726,
3726,
19,
7988,
21,
19312,
1,
3060,
2160,
8304,
108,
4120,
2802,
15,
31,
1735,
20,
7835,
14,
18906,
4232,
8304,
108,
4120,
1411,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Auto-generation of .NET unit tests
===
Is there such a thing as unit test generation? If so...
...does it work well?
...What are the auto generation solutions that are available for .NET?
...are there examples of using a technology like this?
...is this only good for certain types of applications, or could it be used to replace all manually written unit testing? | 0 | [
2,
3108,
8,
12546,
16,
13,
9,
2328,
1237,
4894,
800,
3726,
3726,
25,
80,
145,
21,
584,
28,
1237,
1289,
2782,
60,
100,
86,
9,
9,
9,
13,
9,
9,
9,
10739,
32,
170,
134,
60,
13,
9,
9,
9,
608,
50,
14,
3108,
2782,
6776,
30,
50,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Automatically importing libraries into the Java Classpath using Eclipse
===
Is it possible to configure Eclipse to check on the latest versions of the Apache Commons, Hibernate, JUnit, ...; and then automagically import them to the Java Classpath at the time of loading?
If not ... Could this functionality be added via a plugin? | 0 | [
2,
7499,
9010,
68,
8649,
77,
14,
8247,
718,
8353,
568,
11652,
800,
3726,
3726,
25,
32,
938,
20,
1065,
15951,
11652,
20,
2631,
27,
14,
5736,
3281,
16,
14,
17140,
8322,
15,
4148,
2102,
8820,
15,
7446,
242,
15,
13,
9,
9,
9,
73,
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 much access do you give BA/PM's?
===
Where I work we have a little bit of a dilemma... I work on a small team developing an application for internal use. We recently just received a new PM to the project. She would like to have access to our database and our sourcecode (stored in svn). Our previous PM did not see a need, nor want, to have access to any of the things "in our sandbox".
Having said that, What is the proper amount of access to give a PM/BA? Is there a security breach of some kind with this? If you agree that the PM should have access to one or both, what kind of access?
I have thought on this for a bit and at first I did not want the PM/BA in my sandbox, but I have since went the other way in thinking what harm could it do? Am I incorrect?
Is this end a battle worth fighting? | 0 | [
2,
184,
212,
1381,
107,
42,
590,
2683,
118,
5576,
22,
18,
60,
800,
3726,
3726,
113,
31,
170,
95,
57,
21,
265,
1142,
16,
21,
23314,
9,
9,
9,
31,
170,
27,
21,
284,
173,
3561,
40,
3010,
26,
3117,
275,
9,
95,
1989,
114,
420,
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... |
How do I check OS with a precompiler directive?
===
I need my code to do different things, based on the operating system it gets compiled on. I'm looking for something like this:<br><br><code>
#ifOSisWindows<br>
//define something for Windows<br>
#else<br>
//define it for a Unix machine<br>
#endif</code><br><br>
Is there a way to do this? Is there a better way to do the same thing? | 0 | [
2,
184,
107,
31,
2631,
13,
759,
29,
21,
782,
11103,
49,
1252,
15626,
60,
800,
3726,
3726,
31,
376,
51,
1797,
20,
107,
421,
564,
15,
432,
27,
14,
2455,
329,
32,
3049,
9316,
27,
9,
31,
22,
79,
699,
26,
301,
101,
48,
45,
1,
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... |
Tools to help with editing a remote web application
===
I often have nothing more than an FTP access to a server on which the application is placed.
What I usually use now is "Keeping remote directory up to date" feature of [WinSCP][1]. Files of the local copy (in theory at least) keep being uploaded to a remote server as soon as they get saved and then all I need is to refresh a page in a browser to see the result (sometimes clearing session variables beforehand).
WinSCP's bugginess and FTP protocol deficiencies aside, I feel this may be somewhat primitive approach and perphaps there are better ways to get a task like that done.
[1]: http://winscp.net/ | 0 | [
2,
4672,
20,
448,
29,
9510,
21,
5388,
2741,
3010,
800,
3726,
3726,
31,
478,
57,
626,
91,
119,
40,
1187,
306,
1381,
20,
21,
8128,
27,
56,
14,
3010,
25,
1037,
9,
98,
31,
951,
275,
130,
25,
13,
7,
15880,
5388,
16755,
71,
20,
12... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
.dbc --> .csv
===
I have a little utility that converts .dbc files to .csv files, trouble is, somewhere in the conversion some data is lost/destroyed/whatever. I input a.dbc into converter, it produces a.csv. I delete a.dbc,and then run a.csv back through the converter, and I come back with a "slightly" different .dbc file then I had started with.
Does anyone know any better way of converting these files? Without loss of information..
I open both files in HexCMP (compares two hex files, show's you the differences) and the differences are totally random through out the file. | 0 | [
2,
13,
9,
43,
7229,
13,
8,
8,
1,
13,
9,
6824,
710,
800,
3726,
3726,
31,
57,
21,
265,
10082,
30,
8406,
18,
13,
9,
43,
7229,
6488,
20,
13,
9,
6824,
710,
6488,
15,
2572,
25,
15,
3493,
19,
14,
6263,
109,
1054,
25,
529,
118,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Highlight text inside of a textarea
===
Is it possible to highlight text inside of a textarea using javascript? Either changing the background of just a portion of the text area or making the text _selected_? | 0 | [
2,
14373,
1854,
572,
16,
21,
1854,
17760,
800,
3726,
3726,
25,
32,
938,
20,
14373,
1854,
572,
16,
21,
1854,
17760,
568,
8247,
8741,
60,
694,
4226,
14,
2395,
16,
114,
21,
2980,
16,
14,
1854,
217,
54,
544,
14,
1854,
13,
1,
18,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Python: How to make a cross-module variable?
===
The `__debug__` variable is handy in part because it affects every module. If I want to create another variable that works the same way, how would I do it?
The variable (let's be original and call it 'foo') doesn't have to be truly global, in the sense that if I change foo in one module, it is updated in others. I'd be fine if I could set foo before importing other modules and then they would see the same value for it. | 0 | [
2,
20059,
45,
184,
20,
233,
21,
919,
8,
19673,
62,
7612,
60,
800,
3726,
3726,
14,
13,
1,
546,
16254,
1,
7612,
25,
20277,
19,
141,
185,
32,
15476,
352,
12613,
9,
100,
31,
259,
20,
1600,
226,
7612,
30,
693,
14,
205,
161,
15,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Tomcat deployment
===
Is there a way, given a war file, to deploy on a tomcat server. I want to do this without having to use the web interface. | 0 | [
2,
2067,
5782,
10475,
800,
3726,
3726,
25,
80,
21,
161,
15,
504,
21,
176,
3893,
15,
20,
17617,
27,
21,
2067,
5782,
8128,
9,
31,
259,
20,
107,
48,
366,
452,
20,
275,
14,
2741,
6573,
9,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Do you have to restart apache to make re-write rules in the .htaccess take effect?
===
I have pushed my .htaccess files to the production severs, but they don't work. Would a restart be the next step, or should I check something else. | 0 | [
2,
107,
42,
57,
20,
22767,
17140,
20,
233,
302,
8,
23716,
1761,
19,
14,
13,
9,
9020,
20604,
247,
1590,
60,
800,
3726,
3726,
31,
57,
2007,
51,
13,
9,
9020,
20604,
6488,
20,
14,
637,
15114,
18,
15,
47,
59,
221,
22,
38,
170,
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,
0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.