unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
How do I configure IE7 to download filetype instead of opening in browser
===
I have written a watir script that downloads files. One of the files it downloads has a .dcf extension. Months ago, on my machine, I changed a setting somewhere so that .dcf files prompt for download ("Do you want to open or save this file?") instead of opening in the browser. This is the behavior that I desire. I am using XP Pro/IE7.
I'm now setting up a dedicated test machine, but cannot seem to find the configuration option that I did on my machine - which was so easy to find that I didn't make note of it. All of the solutions that I am finding now are either about changing the download itself or modifying the registry. I am looking for something from the client perspective at the browser/IE level. | 0 | [
2,
184,
107,
31,
1065,
15951,
13,
660,
465,
20,
7121,
3893,
4474,
700,
16,
1214,
19,
16495,
800,
3726,
3726,
31,
57,
642,
21,
15553,
1523,
3884,
30,
7121,
18,
6488,
9,
53,
16,
14,
6488,
32,
7121,
18,
63,
21,
13,
9,
43,
8940,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 add an attribute to an XML node in Java 1.4
===
I tried:
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(f);
Element e = (Element) doc.getFirstChild();<br/>
e.setAttribute("objectId", "OBJ123");
But this throws a java.lang.ClassCastException error. | 0 | [
2,
184,
20,
3547,
40,
35,
14755,
20,
40,
23504,
15421,
19,
8247,
137,
9,
300,
800,
3726,
3726,
31,
794,
45,
4492,
20904,
17455,
93,
13,
43,
12425,
800,
4492,
20904,
17455,
93,
9,
2681,
108,
384,
2416,
5,
6,
73,
4492,
20904,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Running many virtual machines on a single host
===
I have a need to run a relatively large number of virtual machines on a relatively small number of physical hosts. Each virtual machine isn't doing to much - each only needs to run essentially one basic network service - think SMTP or the like. Furthermore, the load on each is going to be extremely light.
Unfortunately, the numbers are something like 100 virtual machines on 5 physical hosts. Each host is decent enough - core 2 with 2 gigs of ram and a 1tb disk. However, I know just taking a vmware image of ubuntu and throwing on that machine wont get me anywhere near 100 instances and would be something closer to 20.
So, is there any hope for this ratio of images to hosts? Also, which implementation of virtual machine would be best suited for this purpose - ie has efficient overall usage of resources? We mostly use vmware here, but if there is a significant performance advantage that could be gained by switching to Xen or the like, I am sure we would consider it.
Thank you in advance for your insights :) | 0 | [
2,
946,
151,
6599,
6035,
27,
21,
345,
2015,
800,
3726,
3726,
31,
57,
21,
376,
20,
485,
21,
3109,
370,
234,
16,
6599,
6035,
27,
21,
3109,
284,
234,
16,
1825,
5397,
9,
206,
6599,
1940,
2532,
22,
38,
845,
20,
212,
13,
8,
206,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to join the newest rows from a table?
===
I frequently run into problems of this form and haven't found a good solution yet:
Assume we have two tables representing an e-commerce system.
userData (userId, name, ...); orderData (orderId, userId, orderType, createDate, ...)
For all users in the system, select their user information, their newest order information with type = '1', and their newest order information with type = '2'. I want to do this in one query.
If it makes a difference, I'm using Postgres, but I would hope there's a solution that's general to all SQL.
| 0 | [
2,
184,
20,
1865,
14,
17175,
11295,
37,
21,
859,
60,
800,
3726,
3726,
31,
3086,
485,
77,
1716,
16,
48,
505,
17,
2933,
22,
38,
216,
21,
254,
4295,
768,
45,
7158,
95,
57,
81,
7484,
3793,
40,
13,
62,
8,
26470,
329,
9,
4155,
187... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Example code required for how to access embedded .Net image resources in C#.
===
It's very easy to mark an image file to become an embedded resource however how does one access the image thereafter. Please can I have some example code? | 0 | [
2,
823,
1797,
1390,
26,
184,
20,
1381,
12138,
13,
9,
2328,
1961,
2566,
19,
272,
5910,
9,
800,
3726,
3726,
32,
22,
18,
253,
2010,
20,
943,
40,
1961,
3893,
20,
533,
40,
12138,
6577,
207,
184,
630,
53,
1381,
14,
1961,
6045,
9,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Stuff in Windows Form Move When Maximized - C#
===
It's been a while since I've programmed a GUI program, so this may end up being super simple, but I can't find the solution anywhere online.
Basically my problem is that when I maximize my program, all the things inside of the window (buttons, textboxes, etc.) stay in the same position in the window, which results in a large blank area near the bottom and right side.
Is there a way of making the the elements in the program to stretch to scale? | 0 | [
2,
3217,
19,
1936,
505,
780,
76,
23952,
43,
13,
8,
272,
5910,
800,
3726,
3726,
32,
22,
18,
74,
21,
133,
179,
31,
22,
195,
2866,
43,
21,
9457,
625,
15,
86,
48,
123,
241,
71,
142,
1026,
1935,
15,
47,
31,
92,
22,
38,
477,
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... |
Windows path searching in LoadLibrary with manifest
===
If you call `LoadLibrary` without a path (e.g., `LoadLibrary("whatever.dll")`, Windows will generally follow its standard search algorithm, the same one it uses to find EXEs.
My question is this: suppose that an application manifest specifies specifies a particular version of a system DLL, say, comctl32.dll 6.0. In that case, will `LoadLibrary("comctl32.dll")` go immediately to the correct side-by-side folder, or does it still perform some kind of search? | 0 | [
2,
1936,
2013,
5792,
19,
6305,
1210,
2559,
622,
29,
13160,
800,
3726,
3726,
100,
42,
645,
13,
1,
8294,
1210,
2559,
622,
1,
366,
21,
2013,
13,
5,
62,
9,
263,
9,
15,
13,
1,
8294,
1210,
2559,
622,
5,
7,
13515,
9,
43,
211,
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... |
Any issues with ActiveMQ broker and clients running on different JDKs?
===
We have a distributed system with components (including the ActiveMQ broker) running on jdk 1.6.
A potential customer would like to integrate a component that was built on jdk 1.4 with our system. While this customer is willing to write code to integrate with our system, they are not comfortable moving from jdk 1.4.
Would there be any problems with a system where one client is running off of an older jdk?
| 0 | [
2,
186,
1549,
29,
1348,
79,
1251,
14930,
17,
7421,
946,
27,
421,
487,
43,
4020,
60,
800,
3726,
3726,
95,
57,
21,
4387,
329,
29,
5090,
13,
5,
3970,
14,
1348,
79,
1251,
14930,
6,
946,
27,
487,
43,
197,
137,
9,
379,
9,
21,
2222... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Trailing slash on an MVC route
===
In the latest MVC preview, I'm using this route for a legacy URL:
routes.MapRoute(
"Legacy-Firefox", // Route name
"Firefox-Extension/", // URL with parameters
new { controller = "Home", action = "Firefox", id = "" } // Parameter defaults
);
The problem is that both of these URL's work:
http://mysite.com/Firefox-Extension
http://mysite.com/Firefox-Extension/
I only want the second to work (for SEO). Also, when I create a link to that page, the routing engine gives me back a URL without a trailing slash.
This is the code I'm using to generate the link:
<%= Html.ActionLink("Firefox Extension", "Firefox", "Home")%>
I believe can fix the first problem by using an HTTP handler to do a 301 redirect to the URL with the trailing slash. However, I want to link to the URL with the trailing slash, and I'm hoping to not have to hard-code the version with the slash.
Anyone know how to force the route to use a trailing slash? | 0 | [
2,
14323,
14098,
27,
40,
307,
8990,
858,
800,
3726,
3726,
19,
14,
5736,
307,
8990,
16121,
15,
31,
22,
79,
568,
48,
858,
26,
21,
7780,
287,
6362,
45,
5050,
9,
15022,
20179,
5,
13,
7,
6727,
12852,
8,
5929,
18219,
7,
15,
12894,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to set working directory when debugging VB6 app?
===
I am debugging a VB6 executable. The executable loads dlls and files from it's current directory, when running. When run in debugger, the current directory seems to be VB6's dir.
How do I set working directory for VB6? | 0 | [
2,
184,
20,
309,
638,
16755,
76,
121,
16254,
2762,
13,
20468,
379,
4865,
60,
800,
3726,
3726,
31,
589,
121,
16254,
2762,
21,
13,
20468,
379,
1396,
17194,
5924,
9,
14,
1396,
17194,
5924,
19069,
13,
43,
211,
18,
17,
6488,
37,
32,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it possible to ScaleTransform everything on a Canvas/Grid except for 1 Control?
===
Given the following canvas:
<Canvas>
<Canvas.LayoutTransform>
<ScaleTransform ScaleX="1" ScaleY="1" CenterX=".5" CenterY=".5" />
</Canvas.LayoutTransform>
<Button x:Name="scaleButton" Content="Scale Me" Canvas.Top="10" Canvas.Left="10" />
<Button x:Name="dontScaleButton" Content="DON'T Scale Me" Canvas.Top="10" Canvas.Left="50" />
</Canvas>
Is it possible to scale 1 button, but not the other when ScaleX and ScaleY changes? | 0 | [
2,
25,
32,
938,
20,
3464,
7028,
4190,
796,
27,
21,
9696,
118,
16375,
1613,
26,
137,
569,
60,
800,
3726,
3726,
504,
14,
249,
9696,
45,
13,
1,
1245,
8471,
1,
13,
1,
1245,
8471,
9,
4414,
1320,
7028,
4190,
1,
13,
1,
5093,
7028,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 are entries in addition order in a .Net Dictionary?
===
I just saw this behaviour and I'm a bit surprised by it...
If I add 3 or 4 elements to a Dictionary<String, String>, and then do a "For Each" to get all the keys, they appear in the same order I added them.
The reason this surprises me is that a Dictionary is supposed to be a HashTable internally, so I expected things to come out in ANY order (ordered by the hash of the key, right?)
What am I missing here?
Is this a behaviour I can count on? | 0 | [
2,
483,
50,
11399,
19,
848,
389,
19,
21,
13,
9,
2328,
9186,
60,
800,
3726,
3726,
31,
114,
441,
48,
7727,
17,
31,
22,
79,
21,
1142,
2948,
34,
32,
9,
9,
9,
100,
31,
3547,
203,
54,
268,
2065,
20,
21,
9186,
1,
11130,
15,
3724,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I make sure my objects get garbage collected?
===
One of our programs is sometimes getting a OutOfMemory error on one users machine, but of course not when I'm testing it. I just ran it with jprofiler (on a 10 day evaluation license because I've never used it before), and filtering on our code prefix, the biggest chunk both in total size and number of instances is 8000+ instances of a particular simple class. I clicked the "Garbage Collect" button on jprofiler, and most instances of other classes of ours went away, but not these particulate ones. I ran the test again, still in the same instance, and it created 4000+ more instances of the class, but when I clicked "Garbage Collect", those went away leaving the 8000+ original ones.
These instances do get stuck into various Collections at various stages. I assume that the fact that they're not garbage collected must mean that something is holding onto a reference to one of the collections so that's holding onto a reference to the objects.
Any suggestions how I can figure out what is holding onto the reference? I'm looking for suggestions of what to look for in the code, as well as ways to find this out in jprofiler if there are. | 0 | [
2,
184,
107,
31,
233,
562,
51,
3916,
164,
15024,
3674,
60,
800,
3726,
3726,
53,
16,
318,
1726,
25,
1030,
1017,
21,
70,
1041,
790,
5171,
93,
7019,
27,
53,
3878,
1940,
15,
47,
16,
674,
52,
76,
31,
22,
79,
4431,
32,
9,
31,
114,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
XML Parsing Error: SYSTEM or PUBLIC, the URI is missing
===
I am parsing an RSS feed from the following URL:
[http://rss.sciam.com/ScientificAmerican-Global?format=xml][1]
// $xml_text is filled with the contents read from the URL
$xml_parser = xml_parser_create();
$res = xml_parse($xml_parser, $xml_text);
if (!$res) {
$error =
xml_error_string(xml_get_error_code($xml_parser)).
" at line ".
xml_get_current_line_number($xml_parser);
}
// $error contains: "SYSTEM or PUBLIC, the URI is missing at line 1"
[FeedValidator.org][2] says this is a good feed.
How can I get PHP's XML parser to work around this error?
[1]: http://rss.sciam.com/ScientificAmerican-Global?format=xml
[2]: http://FeedValidator.org | 2 | [
2,
23504,
2017,
18,
68,
7019,
45,
329,
54,
317,
15,
14,
13,
3594,
25,
2863,
800,
3726,
3726,
31,
589,
2017,
18,
68,
40,
13,
1224,
18,
4063,
37,
14,
249,
287,
6362,
45,
636,
21127,
6903,
1224,
18,
9,
18,
4321,
79,
9,
960,
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... |
When to use final
===
I've found a couple of references (<a href="http://www.javapractices.com/topic/TopicAction.do?Id=23">for example</a>) that suggest using `final` as much as possible and I'm wondering how important that is. This is mainly in the the context of method parameters and local variables, not final methods or classes. For constants, it makes obvious sense.
On one hand, the compiler can make some optimizations and it makes the programmer's intent clearer. On the other hand, it adds verbosity and the optimizations may be trivial.
Is it something I should make an effort to remember to do? | 0 | [
2,
76,
20,
275,
426,
800,
3726,
3726,
31,
22,
195,
216,
21,
1335,
16,
7231,
13,
5,
1,
58,
746,
14057,
3726,
7,
21127,
6903,
6483,
9,
1004,
1385,
7310,
14468,
5052,
9,
960,
118,
3880,
596,
118,
3880,
596,
8645,
9,
537,
60,
1340... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 stream an XPS document to a browser and embed it in a webpage?
===
I'm looking for some suggestions on how to go about this. Any input is appreciated!
Currently, I have an ASP.NET MVC application. On the client, I have a link with an ID of an XPS document. When the user clicks the link, they are taken to a page with details about the document. In addition to this information, I wish to display the document along side of this information, in the same page.
On the server side, once I have the ID, I can get the document, serialized as a byte array, from the database. The question is, what's the *best* way to get that serialized document into the webpage?
I would SEVERELY prefer not having to drop that document into the file system and then munge together a file path. I would like to be able to stream the document to the browser as a content type of "application/vnd.ms-xpsdocument".
I've tried using a web control to handle this (can't write binary out), thought about creating a HTTP handler to do this (no idea where to start), and have fuddled around with a couple other ways to get the document stream to the browser.
In addition, there is also the question of how to embed the document in the web page. Do I use an EMBED tag? Or an Object? Or do I use an iframe and set the source to point to whatever delivers the document?
Again, I don't expect a solution wrapped up in a bow. I'm looking for some advice on how to go about this. And, while this question is about xps documents, it applies to any application that streams a binary file that is to be hosted in a browser (PDFs, etc).
| 0 | [
2,
184,
92,
31,
3766,
40,
23045,
18,
4492,
20,
21,
16495,
17,
11911,
69,
32,
19,
21,
2741,
6486,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
109,
18389,
27,
184,
20,
162,
88,
48,
9,
186,
6367,
25,
13746,
187,
871,
15,
31,
57,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I use mysqldump to replicate views between accounts?
===
I'm using **mysqldump** to replicate a database between accounts on a particular machine. Everything works just great, except when we get to our defined views. Because the dump includes a line like the following ...
/*!50013 DEFINER=`user_a`@`localhost` SQL SECURITY DEFINER */
... when loading the dump into mysql on user_b we receive an error:
ERROR 1227 (42000) at line 657: Access denied; you need the SUPER privilege for this operation
Needless to say, I don't have SUPER privilege on this mysql instance. Is there a way to convince **mysqldump** to dump the views in a user-agnostic way? I can't find anything in the manual on this point. Do I have to actually parse the dumpfile to replace the usernames? Or am I missing something? | 0 | [
2,
184,
92,
31,
275,
51,
18,
22402,
43,
11134,
20,
22156,
4146,
128,
5310,
60,
800,
3726,
3726,
31,
22,
79,
568,
13,
1409,
915,
18,
22402,
43,
11134,
1409,
20,
22156,
21,
6018,
128,
5310,
27,
21,
1498,
1940,
9,
796,
693,
114,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ubuntu trouble with SDL
===
I'm trying to learn to use SDL for a little game I'm writing , but I have a problem . One single application can play sound at a given time on my system . If for example I have amarok or kaffeine ( or even firefox while playing a flash video ) , no other application can play sound . The only solution I've found is to run just an application at a given time , but , that doesn't seems like a natural solution .
Any hints ? | 0 | [
2,
287,
12968,
2473,
2572,
29,
13,
18,
8643,
800,
3726,
3726,
31,
22,
79,
749,
20,
2484,
20,
275,
13,
18,
8643,
26,
21,
265,
250,
31,
22,
79,
1174,
13,
15,
47,
31,
57,
21,
1448,
13,
9,
53,
345,
3010,
92,
418,
646,
35,
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... |
Hibernate.initialize() and second-level cache
===
Does anybody know if Hibernate's static initialize() method, which populates a proxy object, will attempt to hit the second-level cache before going to the database? My code seems to be behaving that way, and I can't seem to find anything in the documentation about this. The Javadoc is (as usual) sparse.
Thanks! | 0 | [
2,
4148,
2102,
8820,
9,
27313,
2952,
5,
6,
17,
153,
8,
3906,
16522,
800,
3726,
3726,
630,
11181,
143,
100,
4148,
2102,
8820,
22,
18,
12038,
2104,
2952,
5,
6,
2109,
15,
56,
1675,
12383,
18,
21,
27188,
3095,
15,
129,
1735,
20,
770... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Convert nmake makefile into Visual Studio 2005 project
===
We have some old C code here that's built with nmake.
Is there an automated way to pull the Makefile into Visual Studio 2005 and create a project? Some searching on MSDN indicates [VS6][1] could do this, but it looks like VS7/8 dropped the feature.
If necessary I can build the project from scratch using the project.mak file as a reference, but for more complex projects this may not be viable.
[1]: http://msdn.microsoft.com/en-us/library/aa269915(VS.60).aspx | 0 | [
2,
8406,
13,
103,
11115,
233,
16877,
77,
3458,
1120,
812,
669,
800,
3726,
3726,
95,
57,
109,
315,
272,
1797,
235,
30,
22,
18,
392,
29,
13,
103,
11115,
9,
25,
80,
40,
14904,
161,
20,
2201,
14,
233,
16877,
77,
3458,
1120,
812,
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... |
search 25 000 words within a text
===
I need to find occurrences of ~ 25 000 words within a text. What is the most suitable algorithm/library for this purpose?
target language is C++ | 0 | [
2,
2122,
771,
13,
3993,
715,
363,
21,
1854,
800,
3726,
3726,
31,
376,
20,
477,
12933,
18,
16,
13,
1,
771,
13,
3993,
715,
363,
21,
1854,
9,
98,
25,
14,
127,
6445,
9083,
118,
1210,
2559,
622,
26,
48,
2131,
60,
2935,
816,
25,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
What is the Best Way to Represent Summer Time Rules?
===
I need to store the summer time (daylight saving time) change-over rules for different world regions in a database. I already have a way of storing regions and sub-regions (so the whole ["half of Australia"/Arizona/Navaho][1] problem is taken care of), but I'm wondering what the most efficient schema would be to accomplish this. The two options as I see them:
- Have a table which contains unique one row for each year and region giving the start and end times for summer time as well as the specific offset
- Have a table which stores a formula and effective date range for each region (effective range required for regions like Israel)
The advantage to the first is flexibility, since literally *anything* is possible. Unfortunately, it also requires (a) more space, and correspondingly (b) a lot of work to get the data input. The second is nice because one row could correspond to one region for decades, but it also requires some sort of language parser and interpreter in the application layer. Since this database will be used by several different applications written in languages without powerful text processing capabilities, I would rather avoid that route.
I would love to just use zoneinfo or something like that, but unfortunately that's not an option in this case. Likewise, I cannot normalize the dates, timezone and summer time info *must* be in the database to satisfy certain use cases.
Does anybody have any experience doing something similar? Likewise, does anyone have any brilliant options that I may have missed?
[1]: http://en.wikipedia.org/wiki/Image:DaylightSaving-World-Subdivisions.png | 0 | [
2,
98,
25,
14,
246,
161,
20,
3501,
697,
85,
1761,
60,
800,
3726,
3726,
31,
376,
20,
1718,
14,
697,
85,
13,
5,
1185,
3130,
7599,
85,
6,
753,
8,
2549,
1761,
26,
421,
126,
3332,
19,
21,
6018,
9,
31,
614,
57,
21,
161,
16,
2561... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 list of all the tables defined for the database when using active record?
===
How do I get a list of all the tables defined for the database when using active record? | 0 | [
2,
184,
20,
968,
16,
65,
14,
7484,
2811,
26,
14,
6018,
76,
568,
1348,
571,
60,
800,
3726,
3726,
184,
107,
31,
164,
21,
968,
16,
65,
14,
7484,
2811,
26,
14,
6018,
76,
568,
1348,
571,
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,
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... |
ASP.NET Image Listbox
===
I want to display a list of images for the user to choose from. Instead of the typical vertical scroll bar in a listbox, I want this box to be horizontal. In fact, I would like to know if this control from Infragistics http://www.infragistics.com/dotnet/netadvantage/aspnet/webimageviewer.aspx#Overview is available elsewhere.
thanks
Shankar
| 0 | [
2,
28,
306,
9,
2328,
1961,
968,
5309,
800,
3726,
3726,
31,
259,
20,
3042,
21,
968,
16,
3502,
26,
14,
4155,
20,
3538,
37,
9,
700,
16,
14,
3874,
7035,
12159,
748,
19,
21,
968,
5309,
15,
31,
259,
48,
1649,
20,
44,
10095,
9,
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... |
How to draw delphi group boxes to have transparent backgrounds
===
I'm trying to get something very subtle to work, it looks pretty awful right now. I'm trying to paint the background of a TGroupBox so that the corners are show through to their parent object. I've got a bunch of nested group boxes that look very decent without XPThemes. <hr> (Top Picture is what I've got, bottom picture is what I want)
![See the subtle difference][1]
[1]: http://www.american-data.com/img/stackoverflowhelp.jpg "Screenshot"
Is there a way to paint part of a background transparent. | 0 | [
2,
184,
20,
2003,
23030,
214,
8120,
20,
57,
14862,
2395,
18,
800,
3726,
3726,
31,
22,
79,
749,
20,
164,
301,
253,
11065,
20,
170,
15,
32,
1879,
1772,
9021,
193,
130,
9,
31,
22,
79,
749,
20,
5107,
14,
2395,
16,
21,
13,
38,
80... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Framework platform support tradition
===
From the first days the .NET framework came out there was a minimum OS support:
- .NET 1.0 - Windows NT or higher (Windows 98/ME are also supported)
- .NET 2.0 - Windows 2000 or higher (Windows 98/ME are also supported)
- .NET 3.0 - Windows XP or higher
- .NET 3.5 - Windows XP or higher
This minimum OS support made possible to ignore platform-specific issues by using just the framework. Newer features were ignored on older platforms. For example, "Tile View" style in the ListView control or form transparency on the Windows 98/ME.
However, in the System.Core.dll (part of .NET 3.5) there are some classes that use a new Vista API and throw PlatformNotSupportedException if used on an XP machine. For example, take a look on the new EventLogReader class (in the System.Diagnostics.Eventing.Reader namespace).
Does Microsoft break with the tradition of platform support?
To be fair .NET 2.0 had already classes that supported NTFS security features, which are not available on the Windows 98/ME. | 0 | [
2,
13,
9,
2328,
6596,
2452,
555,
2876,
800,
3726,
3726,
37,
14,
64,
509,
14,
13,
9,
2328,
6596,
281,
70,
80,
23,
21,
5187,
13,
759,
555,
45,
13,
8,
13,
9,
2328,
137,
9,
387,
13,
8,
1936,
13,
2877,
54,
1184,
13,
5,
27508,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a user interface for generating Phing build files?
===
I want to use Phing as a build tool and I was wondering if there any (web) interfaces available for generating build files. Any recommendations on alternative methods to writing those by hand would be appreciated as well. | 0 | [
2,
25,
80,
21,
4155,
6573,
26,
13500,
4145,
68,
1895,
6488,
60,
800,
3726,
3726,
31,
259,
20,
275,
4145,
68,
28,
21,
1895,
5607,
17,
31,
23,
5712,
100,
80,
186,
13,
5,
14113,
6,
6573,
18,
904,
26,
13500,
1895,
6488,
9,
186,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... |
Visio VBA function to see if there's a shape in front of/behind a shape
===
Is there a way in Visio VBA to see if there is a shape in front of or behind a shape in Visio?
I imagine I could write something that checks the bounding box of each shape in a page to see if it occupies the same space as my shape.
I'd rather use something built-in since checking each shape could take a long time as a drawing gets more and more shapes. | 0 | [
2,
9060,
1963,
566,
969,
1990,
20,
196,
100,
80,
22,
18,
21,
2539,
19,
431,
16,
118,
24878,
21,
2539,
800,
3726,
3726,
25,
80,
21,
161,
19,
9060,
1963,
566,
969,
20,
196,
100,
80,
25,
21,
2539,
19,
431,
16,
54,
439,
21,
2539... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Team Build to run MbUnit tests?
===
I am having trouble getting Team Build to execute my MbUnit unit tests. I have tried to edit TFSPBuild.proj and added the following parts:
<Project ...>
<UsingTask TaskName="MbUnit.MSBuild.Tasks.MbUnit" AssemblyFile="path_to_MbUnit.MSBuild.Tasks.dll" />
...
...
<ItemGroup>
<TestAssemblies Include="$(OutDir)\Project1.dll" />
<TestAssemblies Include="$(OutDir)\Project2.dll" />
</ItemGroup>
<Target Name="Tests">
<MbUnit
Assemblies="@(TestAssemblies)"
ReportTypes="html"
ReportFileNameFormat="buildreport{0}{1}"
ReportOutputDirectory="." />
</Target>
...
</Project>
but I have yet to get the tests to run. Any ideas on how to get this up and running is highly appreciated | 0 | [
2,
184,
107,
31,
164,
173,
1895,
20,
485,
14023,
15464,
4894,
60,
800,
3726,
3726,
31,
589,
452,
2572,
1017,
173,
1895,
20,
15644,
51,
14023,
15464,
1237,
4894,
9,
31,
57,
794,
20,
9392,
13,
11720,
3401,
29361,
9,
2740,
728,
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... |
JQuery Datepicker returned Date object type
===
What's the object type returned by Datepicker?
Supposing I have the following:
$("#txtbox").datepicker({
onClose: function(date){
//something
}
});
What is <code>date</code>? I'm interested in reading the date object from another Datepicker for comparison, something like:
function(date){
oDate = $("#oDP").datepicker("getDate");
if(oDate == date)
//do one
else if(oDate > date)
//do two
}
However, this kind of comparison is not working. I'm guessing there is some sort of comparison method for Date object, but I don't know. I also tried comparing the String representation of the dates like <code>oDate.toString() > date.toString()</code> to no avail.
| 0 | [
2,
487,
8190,
93,
1231,
16855,
106,
587,
1231,
3095,
1001,
800,
3726,
3726,
98,
22,
18,
14,
3095,
1001,
587,
34,
1231,
16855,
106,
60,
11128,
14717,
31,
57,
14,
249,
45,
5579,
5,
7,
5910,
38,
396,
38,
5309,
7,
6,
9,
8209,
1685... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Persistent storage of encrypted data using .Net
===
I need to store encrypted data (few small strings) between application runs. I do not want the user to provide a passphrase every time (s)he launches the application. I.e. after all it goes down to storing securely the encryption key(s).
I was looking into RSACryptoServiceProvider and using PersistentKeyInCsp, but I'm not sure how it works. Is the key container persistent between application runs or machine restarts? If yes, is it user specific, or machine specific. I.e. if I store my encrypted data in user's roaming profile, can I decrypt the data if the user logs on a different machine?
If the above does not work, what are my options (I need to deal with roaming profiles).
| 0 | [
2,
15348,
4326,
16,
29403,
1054,
568,
13,
9,
2328,
800,
3726,
3726,
31,
376,
20,
1718,
29403,
1054,
13,
5,
3739,
499,
284,
7887,
6,
128,
3010,
1461,
9,
31,
107,
52,
259,
14,
4155,
20,
1181,
21,
1477,
13314,
870,
352,
85,
13,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you get Excel to refresh data on sheet from within VBA?
===
How do you get spreadsheet data in Excel to recalculate itself from within VBA, without the kluge of just changing a cell value? | 0 | [
2,
184,
107,
42,
164,
20700,
20,
24905,
1054,
27,
6125,
37,
363,
566,
969,
60,
800,
3726,
3726,
184,
107,
42,
164,
1789,
17627,
1054,
19,
20700,
20,
302,
16304,
12383,
1145,
37,
363,
566,
969,
15,
366,
14,
15744,
834,
16,
114,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Set up an HTTP proxy to insert a header
===
I need to test some HTTP interaction with a client I'd rather not modify. What I need to test is the behavior of the server when the client's requests include a certain, static header.
I'm thinking the easiest way to run this test is to set up an HTTP proxy that inserts the header on every request. What would be the simplest way to set this up? | 0 | [
2,
309,
71,
40,
7775,
27188,
20,
14692,
21,
157,
106,
800,
3726,
3726,
31,
376,
20,
1289,
109,
7775,
7754,
29,
21,
6819,
31,
22,
43,
864,
52,
17579,
9,
98,
31,
376,
20,
1289,
25,
14,
3257,
16,
14,
8128,
76,
14,
6819,
22,
18,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to avoid .pyc files?
===
Can I run the python interpreter without generating the compiled .pyc files? | 0 | [
2,
184,
20,
2658,
13,
9,
6448,
150,
6488,
60,
800,
3726,
3726,
92,
31,
485,
14,
20059,
19336,
366,
13500,
14,
9316,
13,
9,
6448,
150,
6488,
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... | [
1,
1,
1,
1,
1,
1,
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... |
Help a Newbie with C# variables
===
Okay this question is so basic it is probably in my book head first c#, but alas I am lazy :) Actually I read it and sort of understand and sort of don't. Here is what I have.
I am trying to save data to a database on a button push but the variables seem to be private by the nature of where they are defined. I have tried to move where they are defined, but this seems to produce other errors. I am sure someone can answer this in under 5 seconds and I do appreciate the help. Plus I know stackoverflow won't turn into a flame war becasue the question is so stupid.
Also if you are feeling genourous if you could explain to me (and others who see this behind me) not just how to fix it but why it was fixed that way. The code follows.
namespace enable
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
OleDbConnection favouriteConnection = new System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\\\192.168.123.5\\Share\\Matt\\BugTypes.mdb");
string strSQL = "SELECT CategoryName, Show " + "FROM [Categories] WHERE Show = 'Yes' " + "ORDER BY CategoryName";
OleDbDataAdapter adapter = new OleDbDataAdapter(strSQL, favouriteConnection);
OleDbCommandBuilder cBuilder = new OleDbCommandBuilder(adapter);
DataTable dTable = new DataTable();
adapter.Fill(dTable);
BindingSource bSource = new BindingSource();
bSource.DataSource = dTable;
dataGridView1.DataSource = bSource;
adapter.Update(dTable);
}
private void button1_Click(object sender, EventArgs e)
{
adapter.Update(dTable);//this is the button that needs to do the save, but can't see the variables.
}
}
} | 0 | [
2,
448,
21,
78,
5893,
29,
272,
5910,
12157,
800,
3726,
3726,
1705,
48,
1301,
25,
86,
2125,
32,
25,
910,
19,
51,
360,
157,
64,
272,
5910,
15,
47,
21,
4830,
31,
589,
16792,
13,
45,
6,
1121,
31,
1302,
32,
17,
2058,
16,
1369,
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... |
SharpZipLib - ZipException "End of extra data" - Why am I getting this exception?
===
I'm using SharpZipLib version 0.85.5 to unzip files. My code has been working nicely for a couple of months until I found a ZIP file that it doesn't like.
ICSharpCode.SharpZipLib.Zip.ZipException: End of extra data
at ICSharpCode.SharpZipLib.Zip.ZipExtraData.ReadCheck(Int32 length) in C:\C#\SharpZLib\Zip\ZipExtraData.cs:line 933
at ICSharpCode.SharpZipLib.Zip.ZipExtraData.Skip(Int32 amount) in C:\C#\SharpZLib\Zip\ZipExtraData.cs:line 921
at ICSharpCode.SharpZipLib.Zip.ZipEntry.ProcessExtraData(Boolean localHeader) in C:\C#\SharpZLib\Zip\ZipEntry.cs:line 925
at ICSharpCode.SharpZipLib.Zip.ZipInputStream.GetNextEntry() in C:\C#\SharpZLib\Zip\ZipInputStream.cs:line 269
at Constellation.Utils.Tools.UnzipFile(String sourcePath, String targetDirectory) in C:\C#\Constellation2\Utils\Tools.cs:line 90
--- End of inner exception stack trace ---
Here is my unzip method:
public static void UnzipFile(string sourcePath, string targetDirectory)
{
try
{
using (ZipInputStream s = new ZipInputStream(File.OpenRead(sourcePath)))
{
ZipEntry theEntry;
while ((theEntry = s.GetNextEntry()) != null)
{
//string directoryName = Path.GetDirectoryName(theEntry.Name);
string fileName = Path.GetFileName(theEntry.Name);
if (targetDirectory.Length > 0)
{
Directory.CreateDirectory(targetDirectory);
}
if (fileName != String.Empty)
{
using (FileStream streamWriter = File.Create(targetDirectory + fileName))
{
int size = 2048;
byte[] data = new byte[2048];
while (true)
{
size = s.Read(data, 0, data.Length);
if (size > 0)
{
streamWriter.Write(data, 0, size);
}
else
{
break;
}
}
}
}
}
}
}
catch (Exception ex)
{
throw new Exception("Error unzipping file \"" + sourcePath + "\"", ex);
}
}
The file unzips fine using XP's built-in ZIP support, WinZIP, and 7-Zip. The exception is being thrown at `s.GetNextEntry()`.
| 0 | [
2,
2641,
2553,
306,
8326,
13,
8,
12133,
10066,
872,
13,
7,
2451,
16,
2230,
1054,
7,
13,
8,
483,
589,
31,
1017,
48,
5391,
60,
800,
3726,
3726,
31,
22,
79,
568,
2641,
2553,
306,
8326,
615,
713,
9,
3058,
9,
264,
20,
367,
2553,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Unnamed/anonymous namespaces vs. static functions
===
A little-used feature of C++ is the ability to create anonymous namespaces, like so:
namespace {
int cannotAccessOutsideThisFile() { ... }
} // namespace
You would think that such a feature would be useless -- since you can't specify the name of the namespace, it's impossible to access anything within it from outside. But these unnamed namespaces *are* accessible within the file they're created in, as if you had an implicit using-clause to them.
My question is, why or when would this be preferable to using static functions? Or are they essentially two ways of doing the exact same thing? | 0 | [
2,
14550,
118,
210,
14016,
1291,
204,
5582,
18,
4611,
9,
12038,
3719,
800,
3726,
3726,
21,
265,
8,
8795,
1580,
16,
272,
20512,
25,
14,
2165,
20,
1600,
10364,
204,
5582,
18,
15,
101,
86,
45,
204,
5582,
13,
1,
19,
38,
1967,
20604,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Conditionally Format a String in .Net?
===
I would like to do some condition formatting of strings. I know that you can do some conditional formatting of integers and floats as follows:
Int32 i = 0;
i.ToString("$#,##0.00;($#,##0.00);Zero");
The above code would result in one of three formats if the variable is positive, negative, or zero.
I would like to know if there is any way to use sections on string arguments. For a concrete, but **contrived** example, I would be looking to replace the "if" check in the following code:
string MyFormatString(List<String> items, List<String> values)
{
string itemList = String.Join(", " items.ToArray());
string valueList = String.Join(", " values.ToArray());
string formatString;
if (items.Count > 0)
//this could easily be:
//if (!String.IsNullOrEmpty(itemList))
{
formatString = "Items: {0}; Values: {1}";
}
else
{
formatString = "Values: {1}";
}
return String.Format(formatString, itemList, valueList);
}
| 0 | [
2,
184,
20,
2874,
1326,
2595,
21,
3724,
19,
13,
9,
2328,
60,
800,
3726,
3726,
31,
83,
101,
20,
107,
109,
2874,
2595,
1203,
16,
7887,
9,
31,
143,
30,
42,
92,
107,
109,
21206,
2595,
1203,
16,
13820,
18,
17,
11510,
18,
28,
2415,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to test SqlServer connection without opening a database
===
The title pretty much says it all. I want to create a SqlConnection and then check that connection without opening a database, cause at that point I don't know yet where will I connect to. Is it possible to do that?
The SqlConnection class has a 'Open' member which tries to open the database you'd set in the Database property, and if you didn't set one, SqlServer tries with the master db. The thing is the user I'm trying to connect with (MACHINE\ASPNET) has access to some databases (which I don't know yet) and not the master db.
Regards,
Seba | 0 | [
2,
184,
20,
1289,
4444,
255,
10321,
106,
2760,
366,
1214,
21,
6018,
800,
3726,
3726,
14,
581,
1772,
212,
898,
32,
65,
9,
31,
259,
20,
1600,
21,
4444,
255,
25996,
872,
17,
94,
2631,
30,
2760,
366,
1214,
21,
6018,
15,
1679,
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... |
Are static indexers not supported in C#?
===
I've been trying this a few different ways, but I'm reaching the conclusion that it can't be done. It's a language feature I've enjoyed from other languages in the past. Is it just something I should just write off? | 0 | [
2,
50,
12038,
4348,
445,
52,
1827,
19,
272,
5910,
60,
800,
3726,
3726,
31,
22,
195,
74,
749,
48,
21,
310,
421,
2847,
15,
47,
31,
22,
79,
2669,
14,
6099,
30,
32,
92,
22,
38,
44,
677,
9,
32,
22,
18,
21,
816,
1580,
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... |
Software for OS X (Leopard) to track and record network usage
===
I'm looking for a program that I can install on a Mac that will tell me how many bytes I download each day, and store that info in such a way that I could later view the results.
Limiting by ports (80, 443, 21, 22) would be awesome as well.
Does such a thing exist? | 0 | [
2,
2306,
26,
13,
759,
993,
13,
5,
413,
2594,
1514,
6,
20,
792,
17,
571,
982,
7514,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
625,
30,
31,
92,
16146,
27,
21,
1572,
30,
129,
494,
55,
184,
151,
34,
3231,
31,
7121,
206,
208,
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... |
Color differences between images and html
===
I'm having issues with color matching css background colors with colors in images on the same html page. What gives? | 0 | [
2,
1665,
4921,
128,
3502,
17,
13,
15895,
800,
3726,
3726,
31,
22,
79,
452,
1549,
29,
1665,
10120,
272,
18,
18,
2395,
5268,
29,
5268,
19,
3502,
27,
14,
205,
13,
15895,
2478,
9,
98,
2352,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
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 timsort general-purpose or Python-specific?
===
> Timsort is an adaptive, stable,
> natural mergesort. It has supernatural
> performance on many kinds of partially
> ordered arrays (less than lg(N!)
> comparisons needed, and as few as
> N-1), yet as fast as Python's previous
> highly tuned samplesort hybrid on
> random arrays.
Have you seen [timsort](http://svn.python.org/projects/python/trunk/Objects/listsort.txt) used outside of CPython? Does it make sense? | 0 | [
2,
25,
2574,
22843,
297,
8,
12060,
54,
20059,
8,
9219,
60,
800,
3726,
3726,
13,
1,
2574,
22843,
25,
40,
22142,
15,
4521,
15,
13,
1,
1112,
12666,
22843,
9,
32,
63,
11215,
13,
1,
956,
27,
151,
8623,
16,
5933,
13,
1,
1905,
7718,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Questions about use of snapshot in Maven2
===
I am writing a POM file for a in-house jar artifact. The artifact depends on several other in-house artifacts which our team writes. When declaring the dependencies of the target, should I limit those dependencies to fixed release version or leave them to SNAPSHOT version. If too many other SNAPSHOT versions of depended modules, it creates uncertainties in testing, if I limit to fixed release version, I cannot leverage the bug fixes of the depended modules. Whats the practice out there?
Secondly, how do you name the snapshot version>
1.0.0-SNAPSHOT or 1.0-SNAPSHOT. | 0 | [
2,
2346,
88,
275,
16,
29946,
19,
1216,
3124,
135,
800,
3726,
3726,
31,
589,
1174,
21,
16214,
3893,
26,
21,
19,
8,
1682,
5112,
22929,
9,
14,
22929,
9597,
27,
238,
89,
19,
8,
1682,
10996,
56,
318,
173,
6215,
9,
76,
15594,
14,
29... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best way to bind WPF properties to ApplicationSettings in C#?
===
Similar to [this question][1], how do you do the same thing in WPF?
[1]: http://stackoverflow.com/questions/18421/best-way-to-bind-windows-forms-properties-to-applicationsettings-in-c | 0 | [
2,
246,
161,
20,
10193,
619,
7721,
3704,
20,
3010,
19831,
18,
19,
272,
5910,
60,
800,
3726,
3726,
835,
20,
636,
1565,
1301,
500,
2558,
165,
500,
15,
184,
107,
42,
107,
14,
205,
584,
19,
619,
7721,
60,
636,
165,
500,
45,
7775,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 ensure Visual Studio 2005 displays the tables and images correctly?
===
I have used Photoshop CS2's "Save for Web" feature to create a table of images for my site layout.
This HTML appears fine in a web browser, however when imported into Visual Studio and viewed in the site designer, the metrics are wrong and there are gaps between images.
Here is how it looks in the Designer:
![alt text][1]
And here is how it looks in the browser:
![alt text][2]
[1]: http://6960129727656312163-a-1802744773732722657-s-sites.googlegroups.com/site/sizerfx/Home/layout1.png?attredirects=0
[2]: http://sites.google.com/site/sizerfx/Home/layout2.png?attredirects=0
Is Visual Studio picky about layout of tables and images? How do I resolve this?
| 0 | [
2,
184,
107,
31,
4062,
3458,
1120,
812,
9412,
14,
7484,
17,
3502,
12044,
60,
800,
3726,
3726,
31,
57,
147,
7064,
5347,
272,
18,
135,
22,
18,
13,
7,
19863,
26,
2741,
7,
1580,
20,
1600,
21,
859,
16,
3502,
26,
51,
689,
9106,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Encode/Decode URLs in C++
===
Need good C++ code to do this | 0 | [
2,
20523,
118,
546,
9375,
13,
911,
7532,
19,
272,
20512,
800,
3726,
3726,
376,
254,
272,
20512,
1797,
20,
107,
48,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How can I disable copy / paste in Flex Text controls?
===
Long story short, I need to put some text in my Flex application and I don't want users to be able to copy. I was going to use a label, but apparently labels do not support text wrapping. Can I make it so that users cannot select text in a Flex Text control?
Thanks. | 0 | [
2,
184,
92,
31,
1460,
579,
4344,
13,
118,
640,
62,
19,
14409,
1854,
8671,
60,
800,
3726,
3726,
175,
609,
502,
15,
31,
376,
20,
442,
109,
1854,
19,
51,
14409,
3010,
17,
31,
221,
22,
38,
259,
3878,
20,
44,
777,
20,
4344,
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... |
How important is it to make your website layout fit on low-res displays?
===
How important is it to make a website layout fit on 640 x 480 and 800 x 600 displays? For some time I have been designing with the assumption of *at least* 1024 x 768, but I haven't been doing it professionally (just on my site which is just a blog that only 10-15 friends read). Does anyone have any non-anecdotal statistics about the distribution of screen resolutions from real web users?
<i>**Note 1:** "Non-anecdotal" means please don't give answers like "I know lots of people using 640x480" or "my mom runs in 800x600 so it must be really common." I'd rather have actual data (or links to actual data), especially if it is data about general users (rather than geeks).</i>
<i>**Note 2:** I'm not concerned with extremely-small displays like those on PDAs and cell phones (at least not at the moment). I'm just talking about desktop/laptop monitors.</i> | 0 | [
2,
184,
681,
25,
32,
20,
233,
154,
2271,
9106,
2742,
27,
708,
8,
99,
18,
9412,
60,
800,
3726,
3726,
184,
681,
25,
32,
20,
233,
21,
2271,
9106,
2742,
27,
13,
19780,
993,
13,
16318,
17,
7993,
993,
7316,
9412,
60,
26,
109,
85,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Panel.Dock Fill ignoring other Panel.Dock setting
===
If you create a panel on a form and set it to Dock=Top and drop another panel and set its Dock=Fill, it may fill the entire form, ignoring the first panel. Changing the tab order does nothing.
| 0 | [
2,
4113,
9,
11458,
3509,
9321,
89,
4113,
9,
11458,
2697,
800,
3726,
3726,
100,
42,
1600,
21,
4113,
27,
21,
505,
17,
309,
32,
20,
6120,
3726,
3880,
17,
2804,
226,
4113,
17,
309,
82,
6120,
3726,
19971,
15,
32,
123,
3509,
14,
1078,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Control for getting hotkeys like tab and space
===
I have a dialog box that allows users to set hotkeys for use in a 3d program on windows. I'm using CHotKeyCtrl, which is pretty good, but doesn't handle some keys that the users would like to use - specifically, tab and space.
The hotkey handling is smart enough to be able to fire on those keys, I just need a UI to let them be set. A control similar to CHotKeyCtrl would be ideal, but other workarounds are also appreciated. | 0 | [
2,
569,
26,
1017,
1047,
4237,
18,
101,
6523,
17,
726,
800,
3726,
3726,
31,
57,
21,
28223,
1649,
30,
2965,
3878,
20,
309,
1047,
4237,
18,
26,
275,
19,
21,
203,
43,
625,
27,
1936,
9,
31,
22,
79,
568,
4430,
38,
4237,
4812,
6362,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Migrate SQL2000 Database to SQL2005 on another machine
===
I've been beating myself over the head with this app migration for a few days now. What I have is an old MSSQL Server 2000-backed application that is being upgraded to a Windows 2003 Server running SMSQL Server 2005. I know little about SQL Server but obviously not enough.
I tried backing up the database on the old server by going to Databases->[Database]->All Tasks->Backup Database..., selecting 'Full', and saving the file. I moved that backup file to the new server and tried to do a restore but it complained saying that it was looking for the [Database].mdf file in the location it was on the old server.
So then I tried to do an Export Data, selected the local SQL 2000 database, pointed it to the new SQL 2005 database on the other machine, and it gets all the way to the end and dies complaining about the way one of the tables is being joined.
I tried then doing a 'Generate SQL' command on the 2000 box and running that under SQL 2005. It looks like there are a lot of outer joins using the old *= syntax that SQL Server 2005 doesn't support anymore and, this being a vendor database, have no idea what their true intentions were when they set up these tables.
Is there any other way I can try migrating this database over? | 0 | [
2,
22985,
4444,
255,
3050,
6018,
20,
4444,
255,
2835,
27,
226,
1940,
800,
3726,
3726,
31,
22,
195,
74,
4785,
992,
84,
14,
157,
29,
48,
4865,
8443,
26,
21,
310,
509,
130,
9,
98,
31,
57,
25,
40,
315,
4235,
18,
22402,
8128,
824,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Volatile vs. Interlocked vs. lock
===
Let's say that a class has a `public int counter` field that is accessed by multiple threads. This int is only incremented or decremented.
To increment this field, which approach should be used, and why?
<ul>
<li><code>lock(this.locker) this.counter++;</code></li>
<li><code>Interlocked.Increment(ref this.counter);</code></li>
<li>Change the access modifier of <code>counter</code> to <code>public volatile</code></li>
</ul>
Now that I've discovered <code>volatile</code>, I've been removing many <code>lock</code> statements and the use of <code>Interlocked</code>. But is there a reason not to do this? | 0 | [
2,
24208,
4611,
9,
1480,
3966,
69,
4611,
9,
3991,
800,
3726,
3726,
408,
22,
18,
395,
30,
21,
718,
63,
21,
13,
1,
12259,
19,
38,
2105,
1,
575,
30,
25,
12904,
34,
1886,
20396,
9,
48,
19,
38,
25,
104,
13,
28461,
69,
54,
6661,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
minOccurs="0" on required parameters in WSDL on ASP.NET web service
===
I'm writing a simple web service using Microsoft Visual Web Developer 2005 (Express Edition), and the dynamically generated WSDL has a minOccurs="0" for all the parameters.
How do I get minOccurs="1" for the required parameters without resorting to creating a static WSDL file? | 0 | [
2,
4232,
2499,
4734,
18,
3726,
7,
387,
7,
27,
1390,
12905,
19,
619,
18,
8643,
27,
28,
306,
9,
2328,
2741,
365,
800,
3726,
3726,
31,
22,
79,
1174,
21,
1935,
2741,
365,
568,
7099,
3458,
2741,
10058,
812,
13,
5,
21230,
1322,
6,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I setup an MX record for a sub-domain?
===
I am hitting a road block in assistance with GoDaddy in setting up an MX record correctly and tired of waiting "24 to 48 hours" for propagation. I am going to describe this question in relation to the GoDaddy interface and use "domain.com" instead of our real domain. This may be a more general DNS question or something just peculiar to GoDaddy's interface -- I don't know yet.
We are setting up new bulk email software for a hosted email product we offer. The bulk email sends out from a different server than our company email and we need to have bounce backs for bulk jobs come back to the bulk server. This requires that we have an MX record setup for that bulk email server. This domain/mx record has been setup as a "sub-domain" of our main domain as "mail2.domain.com".
Below is the current setup at GoDaddy and a description of what we have tried. The problem is in relation to the MX record and Goes To "mail2.domain.com".
<b>A Records</b>
Host Points to
@ ###.###.##.154
mail ###.###.##.150
mail2 ###.###.##.158
<b>MX Records</b>
Priority Host Goes To
10 mail2.domain.com mail2.domain.com
0 @ mail.domain.com
I have tried different variations for the Host value for mail2.domain.com with no luck. GoDaddy advised me on the phone last week to use "mail2" then their interface says to use "mail2.". These didn't work so I change it about 6 hours ago to be the full domain "mail2.domain.com" with no success yet. Everytime I make changes I wait a day or two to be sure whether they will work so this takes a long time to go by trial and error.
Does anyone know definitely how this should be setup?
Thanks | 0 | [
2,
184,
107,
31,
18161,
40,
307,
396,
571,
26,
21,
972,
8,
537,
6232,
60,
800,
3726,
3726,
31,
589,
6687,
21,
383,
1921,
19,
4067,
29,
162,
25078,
19,
2697,
71,
40,
307,
396,
571,
12044,
17,
4117,
16,
1672,
13,
7,
1996,
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... |
Polymorphism vs Overriding vs Overloading
===
In terms of Java, when someone says what is polymorphism. Would overloading or overriding be an acceptable answer?
I would seem to think that is a bit more than that. IF you had a abstract base class that defined a method with no implementation, and you defined that method in the sub class is that still overridding?
I think overloading is not the right answer for sure.
| 0 | [
2,
3446,
13348,
4611,
84,
5175,
68,
4611,
84,
16866,
800,
3726,
3726,
19,
1663,
16,
8247,
15,
76,
737,
898,
98,
25,
3446,
13348,
9,
83,
84,
16866,
54,
84,
5175,
68,
44,
40,
12513,
1623,
60,
31,
83,
2260,
20,
277,
30,
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... |
I am getting a "fatal error 7987" error from SQL Server 2000
===
The error happens trying to do an insert from a stored proc. | 0 | [
2,
31,
589,
1017,
21,
13,
7,
13063,
192,
7019,
9933,
3730,
7,
7019,
37,
4444,
255,
8128,
824,
800,
3726,
3726,
14,
7019,
5531,
749,
20,
107,
40,
14692,
37,
21,
8214,
13,
15617,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How to alter a column and a computed column
===
In SQL SERVER DB, I need to alter a column "baseColumn" and a computed column "upperBaseColumn". The upperBaseColumn has index on it.
This is how the table looks
create table testTable (baseColumn varchar(10), upperBaseColumn AS (upper(baseColumn))
create index idxUpperBaseColumn ON testTable (upperBaseColumn)
Now I need to increase the column length of both the baseColumn and the upperBaseColumn.
Whats the best way to do it.
Thanks for the help guys!!!
| 0 | [
2,
184,
20,
7835,
21,
4698,
17,
21,
26331,
4698,
800,
3726,
3726,
19,
4444,
255,
8128,
13,
9007,
15,
31,
376,
20,
7835,
21,
4698,
13,
7,
8436,
716,
4404,
103,
7,
17,
21,
26331,
4698,
13,
7,
18959,
8436,
716,
4404,
103,
7,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Python module for wiki markup
===
Is there a Python module for converting wiki markup to other languages (e.g. HTML)?
A similar question was asked here, [What's the easiest way to convert wiki markup to html][1], but no Python modules are mentioned.
Just curious. :) Cheers.
[1]: http://stackoverflow.com/questions/45991/whats-the-easiest-way-to-convert-wiki-markup-to-html | 0 | [
2,
20059,
12613,
26,
13,
17375,
943,
576,
800,
3726,
3726,
25,
80,
21,
20059,
12613,
26,
19583,
13,
17375,
943,
576,
20,
89,
2556,
13,
5,
62,
9,
263,
9,
13,
15895,
6,
60,
21,
835,
1301,
23,
411,
235,
15,
636,
608,
22,
18,
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... |
Is there a way to define an action for unhandled exceptions in a WinForms .NET 3.5 app?
===
Note, I realize that this has been addressed [here][1]. That post discusses exception handling in .NET 1.1 while implying that there is a better solution for >.NET 2.0 so this question is specifically about the more recent .NET versions.
I have a windows forms application which is expected to frequently and unexpectedly lose connectivity to the database, in which case it is to reset itself to its initial state.
I am already doing error logging, retry connection, etc. through a set of decorators on my custom DBWrapper object. After that is taken care of however, I would like to let the error fall through the stack. Once it reaches the top and is unhandled I would like it to be swallowed and my ApplicationResetter.Reset() method to be executed.
Can anyone tell me how to do this?
If this is impossible, then is there at least a way to handle this without introducing a dependency on ApplicationResetter to every class which might receive such an error and without actually shutting down and restarting my application (which would just look ugly)?
[1]: http://stackoverflow.com/questions/944/unhandled-exception-handler-in-net-11 | 0 | [
2,
25,
80,
21,
161,
20,
9267,
40,
1028,
26,
367,
3203,
1294,
13392,
19,
21,
628,
4190,
18,
13,
9,
2328,
203,
9,
264,
4865,
60,
800,
3726,
3726,
1945,
15,
31,
4007,
30,
48,
63,
74,
7832,
636,
6836,
500,
2558,
165,
500,
9,
30,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Implementing a replacement for Ruby's IO.popen() and system()
===
IO.popen() and system() in Ruby is sorely lacking several useful features, such as:
- obtaining the return value of the function
- capturing both stdout and stderr (seperately and merged)
- running without spawning an extra cmd.exe or /bin/sh process
Python has a module "subprocess" which I was thinking about using as inspiration for a similar module in Ruby. Now to the questions:
- How are Ruby-programmers working around the issues above, for example obtaining the return value when doing a popen() call?
- Is this something which has already been implemented?
| 0 | [
2,
17333,
21,
4610,
26,
10811,
22,
18,
13,
1963,
9,
6057,
219,
5,
6,
17,
329,
5,
6,
800,
3726,
3726,
13,
1963,
9,
6057,
219,
5,
6,
17,
329,
5,
6,
19,
10811,
25,
14230,
102,
11690,
238,
4811,
967,
15,
145,
28,
45,
13,
8,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Recommended gcc warning options for C
===
Other than -Wall what other warnings have people found useful?
[http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Warning-Options.html][1]
[1]: http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Warning-Options.html | 0 | [
2,
5773,
489,
3384,
3590,
6368,
26,
272,
800,
3726,
3726,
89,
119,
13,
8,
6051,
98,
89,
3590,
18,
57,
148,
216,
4811,
60,
636,
21127,
6903,
263,
3384,
9,
263,
4215,
9,
5583,
118,
218,
1143,
13799,
18,
118,
263,
3384,
8,
300,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Embedding the Java h2 database programmatically
===
At the moment we use [HSQLDB][1] as an embedded database, but we search for a database with less memory footprint as the data volume grows.
[Derby / JavaDB][2] is not an option at the moment because it stores properties globally in the system properties. So we thought of [h2][3].
While we used HSQLDB we created a Server-object, set the parameters and started it. This is described [here][4] (and given as example in the class org.hsqldb.test.TestBase).
The question is: Can this be done analogous with the h2 database, too? Do you have any code samples for that? Scanning the h2-page, I did not find an example.
[1]: http://www.hsqldb.org/
[2]: http://developers.sun.com/javadb/
[3]: http://www.h2database.com/html/main.html
[4]: http://hsqldb.org/doc/guide/ch04.html#N10BBC | 0 | [
2,
11911,
69,
3258,
14,
8247,
746,
135,
6018,
625,
6732,
1326,
800,
3726,
3726,
35,
14,
688,
95,
275,
636,
252,
18,
22402,
9007,
500,
2558,
165,
500,
28,
40,
12138,
6018,
15,
47,
95,
2122,
26,
21,
6018,
29,
787,
1912,
18511,
28,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Tips/Tricks for DataFlex
===
Is anyone out there still using DataFlex? If so, what are you favorite tips and tricks for this venerable 4GL? | 4 | [
2,
11034,
118,
15294,
18,
26,
1054,
19752,
800,
3726,
3726,
25,
1276,
70,
80,
174,
568,
1054,
19752,
60,
100,
86,
15,
98,
50,
42,
3839,
11034,
17,
13747,
26,
48,
26078,
268,
8430,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Question about XMLTextWriters and Streams
===
We have a VXML project that a 3rd party parses to provide us with a phone navigation system. We require them to enter an id code to leave a message, which is later reviewed by our company.
We currently have this working as follows:
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Stream m = new MemoryStream(); //Create Memory Stream - Used to create XML document in Memory
XmlTextWriter XML_Writer = new XmlTextWriter(m, System.Text.Encoding.UTF8);
XML_Writer.Formatting = Formatting.Indented;
XML_Writer.WriteStartDocument();
/* snip - writing a valid XML document */
XML_Writer.WriteEndDocument();
XML_Writer.Flush();
m.Position = 0;
byte[] b = new byte[m.Length];
m.Read(b, 0, (int)m.Length);
XML_Writer.Close();
HttpContext.Current.Response.Write(System.Text.Encoding.UTF8.GetString(b, 0, b.Length));
I'm just maintaining this app, I didn't write it...but the end section seems convoluted to me.
I know it's taking the output stream and feeding the written XML into it...but why is it first reading the entire string? Isn't that inefficient?
Is there a better way to write the above code? | 0 | [
2,
1301,
88,
23504,
11969,
9657,
18,
17,
9464,
800,
3726,
3726,
95,
57,
21,
566,
396,
8184,
669,
30,
21,
203,
897,
346,
2017,
7202,
20,
1181,
182,
29,
21,
1132,
8368,
329,
9,
95,
4077,
105,
20,
2830,
40,
4924,
1797,
20,
767,
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... |
Pre-setting locations for looking for source files in Visual Studio
===
Due to the legacy nature of some of our code, we're still using Microsoft Visual 6.0 (SP6). When I attach to a running process to debug it for the first time, it has no knowledge of where the source files are located when I break into the process. It therefore asks me to navigate to the appropriate directory in my source tree, given a source file name. It remembers these directories, so I don't have to enter the same directory twice, but it's still painful.
Is there a way of pre-configuring VC6 with all the source file directories in my tree? Note that our project is built using makefiles (using nmake), rather than via DSPs. | 0 | [
2,
782,
8,
19831,
4095,
26,
699,
26,
1267,
6488,
19,
3458,
1120,
800,
3726,
3726,
397,
20,
14,
7780,
1444,
16,
109,
16,
318,
1797,
15,
95,
22,
99,
174,
568,
7099,
3458,
400,
9,
387,
13,
5,
3401,
379,
6,
9,
76,
31,
19514,
20,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What can I do to increase the performance of a Lua program?
===
I asked a question about Lua perfromance, and on of the [responses](http://stackoverflow.com/questions/124455/how-do-you-pre-size-an-array-in-lua#152894) asked:
> Have you studied general tips for keeping Lua performance high? i.e. know table creation and rather reuse a table than create a new one, use of 'local print=print' and such to avoid global accesses.
This is a slightly different question from [Lua Patterns,Tips and Tricks](http://stackoverflow.com/questions/89523/lua-patternstips-and-tricks) because I'd like answers that specifically impact performance and (if possible) an explanation of why performance is impacted.
One tip per answer would be ideal.
| 0 | [
2,
98,
92,
31,
107,
20,
1839,
14,
956,
16,
21,
1612,
58,
625,
60,
800,
3726,
3726,
31,
411,
21,
1301,
88,
1612,
58,
416,
2665,
2416,
15,
17,
27,
16,
14,
636,
99,
18,
8782,
7202,
500,
5,
21127,
6903,
25325,
2549,
9990,
9,
960... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Linq query with multiple aggregates
===
How would I create the equivalent Linq To Objects query?
SELECT MIN(CASE WHEN p.type = "In" THEN p.PunchTime ELSE NULL END ) AS EarliestIn,
MAX(CASE WHEN p.type = "Out" THEN p.PunchTime ELSE NULL END ) AS LatestOUt
FROM Punches p
| 0 | [
2,
6294,
1251,
25597,
29,
1886,
8544,
18,
800,
3726,
3726,
184,
83,
31,
1600,
14,
4602,
6294,
1251,
20,
3916,
25597,
60,
5407,
4232,
5,
10325,
76,
351,
9,
4474,
800,
13,
7,
108,
7,
94,
351,
9,
13562,
673,
891,
962,
16203,
241,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Specify remote port to use for mail via exim4
===
I've got a stock Debian Etch system, using Exim4. The domains are mostly local but there are some that are remote. To handle the delivery of remote mail I use the Debian configuration file:
/etc/exim4/hubbed_hosts
This file lists the domain names, and remote MX machines to deliver to. For example:
example.org: mx.example.com
example.com: mx2.example.com
Looking at the exim4 configuration file I see that this used as follows:
hubbed_hosts:
debug_print = "R: hubbed_hosts for $domain"
driver = manualroute
domains = "${if exists{CONFDIR/hubbed_hosts}\
{partial-lsearch;CONFDIR/hubbed_hosts}\
fail}"
route_data = ${lookup{$domain}partial-lsearch{CONFDIR/hubbed_hosts}}
transport = remote_smtp
The issue I have is that _some_ of the hosts I'm using need to have their mail delivered to a non-standard port. Unfortunately the Debian hubbed_hosts file doesn't work if I try to change it to include a port:
example.org: mx1.example.org:2525
example.com: 1.2.3.4.2525
Is it possible to dynamically allow the port to be specified?
| 0 | [
2,
19077,
5388,
1295,
20,
275,
26,
4216,
1197,
1396,
1660,
300,
800,
3726,
3726,
31,
22,
195,
330,
21,
2070,
121,
10035,
13,
19913,
329,
15,
568,
1396,
1660,
300,
9,
14,
15544,
50,
1555,
375,
47,
80,
50,
109,
30,
50,
5388,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I keep a class from being inherited in C#?
===
In java, I could do this with the 'final' keyword. I don't see 'final' in C#. Is there a substitute? | 0 | [
2,
184,
92,
31,
643,
21,
718,
37,
142,
7179,
19,
272,
5910,
60,
800,
3726,
3726,
19,
8247,
15,
31,
110,
107,
48,
29,
14,
13,
22,
4932,
22,
1246,
9587,
9,
31,
221,
22,
38,
196,
13,
22,
4932,
22,
19,
272,
5910,
9,
25,
80,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
CrystalReportViewer Buttons Broken using MVC Framework
===
We are using the MVC framework (release 5) and the CrystalReportViewer control to show our reports. I cannot get any of the buttons at the top of the report viewer control to work.
If I'm working with the report 'HoursSummary'. If I hover over any of the buttons on the report viewer in IE the displayed link at the bottom of the pages is '../HoursSummary'. This creates a url of 'http://localhost/HoursSummary'. There is no 'HoursSummary' controller so I keep receiving 404 errors.
- I believe I want to redirect to 'http://localhost/reports/HoursSummary' since I do have a reports controller. If this is the correct method does anyone know which property I should set on the CrystalReportViewer control to make that happen?
- Is there an easier method to handle this situation?
| 0 | [
2,
4282,
17437,
4725,
106,
12861,
2023,
568,
307,
8990,
6596,
800,
3726,
3726,
95,
50,
568,
14,
307,
8990,
6596,
13,
5,
15202,
331,
6,
17,
14,
4282,
17437,
4725,
106,
569,
20,
298,
318,
2813,
9,
31,
1967,
164,
186,
16,
14,
12861... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 split a string in c# VB6-style without referencing Microsoft.VisualBasic?
===
Unfortunately, there seems to be no string.Split(string separator), only string.Split(char speparator).
I want to break up my string based on a multi-character separator, a la VB6. Is there an easy (that is, not by referencing Microsoft.VisualBasic or having to learn RegExes) way to do this in c#?
EDIT: Using .NET Framework 3.5. | 0 | [
2,
92,
31,
2132,
21,
3724,
19,
272,
5910,
13,
20468,
379,
8,
4381,
366,
13,
29254,
7099,
9,
20893,
26467,
60,
800,
3726,
3726,
6200,
15,
80,
2206,
20,
44,
90,
3724,
9,
25603,
5,
11130,
1353,
3574,
3457,
6,
15,
104,
3724,
9,
25... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best way to store media files on a database?
===
I want to store a large number of sound files in a database, but I don't know if it is a good practice. I would like to know the pros and cons of doing it in this way.
I also thought on the possibility to have "links" to those files, but maybe this will carry more problems than solutions. Any experience in this direction will be welcome :)
Thanks.
Note: The database will be MySQL. | 0 | [
2,
98,
25,
14,
246,
161,
20,
1718,
941,
6488,
27,
21,
6018,
60,
800,
3726,
3726,
31,
259,
20,
1718,
21,
370,
234,
16,
646,
6488,
19,
21,
6018,
15,
47,
31,
221,
22,
38,
143,
100,
32,
25,
21,
254,
1345,
9,
31,
83,
101,
20,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Multi-Like group and search with Regex
===
Ok, Regex wizards. I want to be able to search through my logfile and find any sessions with the word 'error' in it and then return the entire session log entry.
I know I can do this with a string/array but I'd like to learn how to do it with Regex but here's the question. If I decide to do this with Regex do I [have one or two problems][1]? ;o)
here's the log:
PS:I'm using the perl Regex engine.
----------
2008.08.27 08:04:21 (Wed)------------Start of Session-----------------
Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19)
Sending stdin.txt to foo@bar.com
Subject: test 1
Login name is foo@bar.com
The SMTP server does not require AUTH LOGIN.
Are you sure server supports AUTH?
The SMTP server does not like the sender name.
Have you set your mail address correctly?
2008.08.27 08:04:24 (Wed)-------------End of Session------------------
2008.08.27 08:05:56 (Wed)------------Start of Session-----------------
Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19)
Error: Wait a bit (possible timeout).
SMTP server error
Error: Not a socket.
Error: Not a socket.
2008.08.27 08:06:26 (Wed)-------------End of Session------------------
2008.08.27 08:07:58 (Wed)------------Start of Session-----------------
Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19)
Sending stdin.txt to foo@bar.com
Subject: Lorem Update 08/27/2008
Login name is foo@bar.com
2008.08.27 08:07:58 (Wed)-------------End of Session------------------
----------
[1]: http://www.codinghorror.com/blog/archives/001016.html | 0 | [
2,
1889,
8,
1403,
214,
17,
2122,
29,
7953,
1706,
800,
3726,
3726,
5854,
15,
7953,
1706,
19577,
9,
31,
259,
20,
44,
777,
20,
2122,
120,
51,
6738,
16877,
17,
477,
186,
5763,
29,
14,
833,
13,
22,
29992,
22,
19,
32,
17,
94,
788,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Precedence: header in email
===
My web application sends email fairly often, and it sends 3 kinds of emails: initiated by user, in response to an event in the system, and in automatic response to an email received by the application.
I would like to make sure that the third type of email does not get stuck in an endless loop of auto-responders talking to each other. Currently, I use the header:
Precedence: junk
but Yahoo! mail is treating these messages as spam. This is obviously not ideal, because we would like SOMEBODY to read our auto-response and make a decision on it, just not an out-of-office reply.
**What is the best way to send an email without triggering either junk filters or auto-responders?**
Precedence: junk?
Precedence: bulk?
Precedence: list?
X-Priority: 2? | 0 | [
2,
24720,
45,
157,
106,
19,
8517,
800,
3726,
3726,
51,
2741,
3010,
11350,
8517,
6647,
478,
15,
17,
32,
11350,
203,
8623,
16,
8517,
18,
45,
6900,
34,
4155,
15,
19,
1627,
20,
40,
807,
19,
14,
329,
15,
17,
19,
6715,
1627,
20,
40,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can anyone explain how the oracle "hash group" works?
===
I've recently come across a feature of doing a large query in oracle, where changing one thing resulted in a query that used to take 10 minutes taking 3 hours.
To briefly summarise, I store a lot of coordinates in the database, with each coordinate having a probability. I then want to 'bin' these coordinates into 50 metre bins (basically round the coordinate down to the nearest 50 metres) and sum the probability.
To do this, part of the query is 'select x,y,sum(probability) from .... group by x,y'
Initially I was storing a large number of points with a probability of 0.1 and queries were running reasonably ok, taking about 10 minutes for each one.
Then I had a request to change how the probabilities were calculated to adjust the distribution, so rather than all of them being 0.1, they were different values (e.g. 0.03, 0.06, 0.12, 0.3, 0.12, 0.06, 0.03). Running exactly the same query resulted in queries of about 3 hours.
Changing back to all 0.1 brought the queries back to 10 minutes.
Looking at the query plan and performance of the system, it looked like the problem was with the 'hash group' functionality designed to speed up grouping in oracle. I'm guessing that it was creating hash entries for each unique x,y,probability value and then summing probability for each unique x,y value.
Can anyone explain this behaviour any better?
Thanks
Nick
| 0 | [
2,
92,
1276,
3271,
184,
14,
15759,
13,
7,
25436,
214,
7,
693,
60,
800,
3726,
3726,
31,
22,
195,
1989,
340,
464,
21,
1580,
16,
845,
21,
370,
25597,
19,
15759,
15,
113,
4226,
53,
584,
2923,
19,
21,
25597,
30,
147,
20,
247,
332,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
When would you use a WeakHashMap or a WeakReference?
===
The use of weak references is something that I've never seen an implementation of so I'm trying to figure out what the use case for them is and how the implementation would work. When would you (or have you) had a need to use a WeakHashMap or WeakReference and how would it be used? | 0 | [
2,
76,
83,
42,
275,
21,
3910,
25436,
15022,
54,
21,
3910,
28018,
60,
800,
3726,
3726,
14,
275,
16,
3910,
7231,
25,
301,
30,
31,
22,
195,
243,
541,
40,
6123,
16,
86,
31,
22,
79,
749,
20,
1465,
70,
98,
14,
275,
610,
26,
105,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
TableLayoutPanel
===
does the TableLayoutPanel exist in VS 2005? | 0 | [
2,
859,
4414,
1320,
3206,
532,
800,
3726,
3726,
630,
14,
859,
4414,
1320,
3206,
532,
3182,
19,
4611,
812,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do I use ResourceBundle to avoid hardcoded config paths in Java apps?
===
I'd like to eliminate dependencies on hardcoded paths for configuration data in my Java apps, I understand that using ResourceBundle will help me use the classloader to find resources.
Can someone tell me how I would replace a hardcoded path to a resource (say a .properties configuration data file required by a class) with appropriate use of ResourceBundle? Simple clear example if possible, thanks all. | 0 | [
2,
184,
107,
31,
275,
6577,
9930,
413,
20,
2658,
552,
22254,
13,
14093,
2816,
12074,
19,
8247,
4865,
18,
60,
800,
3726,
3726,
31,
22,
43,
101,
20,
10628,
29411,
27,
552,
22254,
12074,
26,
8091,
1054,
19,
51,
8247,
4865,
18,
15,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Capturing video out of an OpenGL window in Windows
===
I am supposed to provide my users a really simple way of capturing video clips out of my OpenGL application's main window. I am thinking of adding buttons and/or keyboard shortcuts for starting and stopping the capture; when starting, I could ask for a filename and other options, if any. It has to run in Windows (XP/Vista), but I also wouldn't like to close the Linux door which I've so far been able to keep open.
The application uses OpenGL fragment and shader programs, the effects due to which I absolutely need to have in the eventual videos.
It looks to me like there might be even several different approaches that could potentially fulfill my requirements (but I don't really know where I should start):
- An encoding library with functions like startRecording(filename), stopRecording, and captureFrame. I could call captureFrame() after every frame rendered (or every second/third/whatever). If doing so makes my program run slower, it's not really a problem.
- A standalone external program that can be programmatically controlled from my application. After all, a standalone program that can *not* be controlled almost does what I need... But as said, it should be really simple for the users to operate, and I would appreciate seamlessness as well; my application typically runs full-screen. Additionally, it should be possible to distribute as part of the installation package for my application, which I currently prepare using NSIS.
- Use the Windows API to capture screenshots frame-by-frame, then employ (for example) one of the [libraries mentioned here][1]. It seems to be easy enough to find examples of how to capture screenshots in Windows; however, I would love a solution which doesn't really force me to get my hands super-dirty on the WinAPI level.
- Use OpenGL to render into an offscreen target, then use a library to produce the video. I don't know if this is even possible, and I'm afraid it might not be the path of least pain anyway. In particular, I would not like the actual rendering to take a different execution path depending on whether video is being captured or not. Additionally, I would avoid anything that might decrease the frame rate in the normal, non-capture mode.
If the solution were free in either sense of the word, then that would be great, but it's not really an absolute requirement. In general, the less bloat there is, the better. On the other hand, for reasons beyond this question, I cannot link in any GPL-only code, unfortunately.
Regarding the file format, I cannot expect my users to start googling for any codecs, but as long as also *displaying* the videos is easy enough for a basic-level Windows user, I don't really care what the format is. However, it would be great if it were possible to control the compression quality of the output.
Just to clarify: I *don't* need to capture video from an external device like camcorder, nor am I really interested in mouse movements, even though getting them does not harm either. There are no requirements regarding audio; the application makes no noise whatsoever.
I write C++ using Visual Studio 2008, for this very application also taking benefit of GLUT and GLUI. I have a solid understanding regarding C++ and linking in libraries and that sort of stuff, but on the other hand OpenGL is quite new for me: so far, I've really only learnt the necessary bits to actually get my job done.
I don't need a solution super-urgently, so feel free to take your time :)
[1]: http://stackoverflow.com/questions/93954/how-to-programatically-create-videos | 0 | [
2,
12859,
763,
70,
16,
40,
368,
8430,
1463,
19,
1936,
800,
3726,
3726,
31,
589,
2293,
20,
1181,
51,
3878,
21,
510,
1935,
161,
16,
12859,
763,
17270,
70,
16,
51,
368,
8430,
3010,
22,
18,
407,
1463,
9,
31,
589,
1440,
16,
4721,
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... |
Understanding IIS6 permissions, ACL, and identity--how can I restrict access?
===
When an ASP.NET application is running under IIS6.0 in Windows 2003 Server with impersonation, what user account is relevant for deciding file read/write/execute access privileges? I have two scenarios where I am trying to understand what access to grant/revoke. I thought the most relevant user is probably the identity specified in the Application Pool, but that doesn't seem to be the whole story.
The first issue concerns executing a local batch file via System.Diagnostics.Process.Start()--I can't do so when the AppPool is set to IWAM_WIN2K3WEB user, but it works fine if it is set to the Network Service identity. I of course made sure that the IWAM user has execute rights on the file.
The second involves writing to a file on the local hard drive--I'd like to be able to prevent doing so via the access control list via folder properties, but even when I set up **all** users in the folder as "read" (no users/groups with "write" at all), our ASP.NET still writes out the file no problem. How can it if it doesn't have write access?
Google search turns up bits and pieces but never the whole story. | 0 | [
2,
3260,
595,
18,
379,
5572,
18,
15,
21,
5316,
15,
17,
3270,
8,
8,
1544,
92,
31,
15436,
1381,
60,
800,
3726,
3726,
76,
40,
28,
306,
9,
2328,
3010,
25,
946,
131,
595,
18,
379,
9,
387,
19,
1936,
973,
8128,
29,
797,
7276,
857,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Does the cost of MSDN Subscriptions represent a deterrent to .NET adoption
===
I know just the question is a bit of heresey, but I'm curious...
Sure, there are the express editions. But when Microsoft is effectively competing for 'hearts and minds' in an OSS world, it seems more than a bit counterproductive to charge devs who wholeheartedly support .NET high subscription fees for Microsoft software. It's hard to imagine that, in the context of Microsoft's overall sales, dev licenses represent such a significant enough revenue stream as to justify the downsides.
So my question is: do you know of any instances where MSDN subscription rates have deterred a team from adopting .NET for a project - where cost played a role in a decision to go OSS instead? | 0 | [
2,
630,
14,
1516,
16,
4235,
43,
103,
14213,
18,
3501,
21,
15190,
8993,
20,
13,
9,
2328,
10004,
800,
3726,
3726,
31,
143,
114,
14,
1301,
25,
21,
1142,
16,
235,
4228,
15,
47,
31,
22,
79,
7686,
9,
9,
9,
562,
15,
80,
50,
14,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Communicating with a flash server using rtmp without Flash
===
I want to talk to a flash server which uses RTMP, but I don't want to use Flash, but rather c# or java.
I was looking at Red5 but their client API seems to be a bit wobbly.
Does anyone have any other ideas? | 0 | [
2,
23284,
29,
21,
4433,
8128,
568,
13,
5256,
2554,
366,
4433,
800,
3726,
3726,
31,
259,
20,
930,
20,
21,
4433,
8128,
56,
2027,
13,
5256,
2554,
15,
47,
31,
221,
22,
38,
259,
20,
275,
4433,
15,
47,
864,
272,
5910,
54,
8247,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can I test a floppy drive using WMI & System.Management namespace?
===
I would find out the *floppy inserted state*:
- no floppy inserted
- unformatted floppy inserted
- formatted floppy inserted
Can this determined using "WMI" in the System.Management namespace?
If so, can I generate events when the *floppy inserted state* changes?
| 0 | [
2,
92,
31,
1289,
21,
28425,
1493,
568,
619,
1435,
279,
329,
9,
23502,
204,
5582,
60,
800,
3726,
3726,
31,
83,
477,
70,
14,
1637,
14712,
17129,
14215,
146,
2483,
45,
13,
8,
90,
28425,
14215,
13,
8,
367,
29850,
28425,
14215,
13,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to stop Eclipse from hanging on a long autocompletion list?
===
I'm using the GL class from JOGL, which basically contains *all* OpenGL functions. Now I just installed the Javadoc for JOGL, because it's nice to have the parameter names if you can't remember the order.
However, with this Javadoc installed, it takes about *half a minute* to show the autocompletion list whenever I type <code>GL.</code>. Since I'm making a lot of OpenGL calls, this is hugely annoying.
Apart from uninstalling or disabling the JOGL Javadoc, is there any way to make the list appear faster, or not at all? | 0 | [
2,
184,
20,
747,
11652,
37,
4505,
27,
21,
175,
3108,
11103,
1336,
872,
968,
60,
800,
3726,
3726,
31,
22,
79,
568,
14,
13,
8430,
718,
37,
21160,
255,
15,
56,
11374,
1588,
1637,
1233,
2483,
368,
8430,
3719,
9,
130,
31,
114,
4066,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Any suggestions for a Perl XML Writer?
===
I need to create XML in Perl. From what I read, XML::LibXML is great for parsing and using XML that comes from somewhere else. Does anyone have any suggestions for an XML Writer? Is [XML::Writer][1] still maintained? Does anyone like/use it?
In addition to feature-completeness, I am interested an easy-to-use syntax, so please describe the syntax and any other reasons why you like that module in your answer.
Please respond with one suggestion per answer, and if someone has already answered with your favorite, please vote that answer up. Hopefully it will be easy to see what is most popular.
Thanks!
[1]: http://search.cpan.org/~josephw/XML-Writer/ | 0 | [
2,
186,
18389,
26,
21,
416,
255,
23504,
1462,
60,
800,
3726,
3726,
31,
376,
20,
1600,
23504,
19,
416,
255,
9,
37,
98,
31,
1302,
15,
23504,
45,
45,
8326,
396,
8184,
25,
374,
26,
2017,
18,
68,
17,
568,
23504,
30,
1624,
37,
3493,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 manage growing eclipse configurations?
===
I use eclipse for quite a lot of work, including:
* multiple "utility" projects that include code that most of my java work makes use of
* various plugin-related projects that I sync and use periodically (eg: the [Git][1] plugin)
* plugin projects I'm actually developing
* the occasional pydev / non-java project
* etc...
It is becoming quite difficult to keep all these things straight, particularly since I never need to use them all at once. I've tried using [Mylyn][2] (and I'm trying it again) but in the past it has caused eclipse to run extremely slow, and I am notoriously horrible at remembering to tell mylyn that I've switched tasks, so it tends to learn very odd (and largely useless) sets of resources.
I've considered using multiple workspaces, but that is problematic when multiple projects need to exist in multiple workspaces, and when I need to synchronize the eclipse metadata directories across workspaces.
What is the best way to manage complex working environments in eclipse? Other development environments aren't a viable option because there aren't any sane alternatives when it comes to developing eclipse plugins (and that is a requirement).
(I *think* a very similar question was asked a month or two ago, but I haven't been able to find it...)
[1]: http://git.or.cz/gitwiki/EclipsePlugin
[2]: http://www.eclipse.org/mylyn | 0 | [
2,
184,
107,
42,
4705,
1991,
11652,
8091,
18,
60,
800,
3726,
3726,
31,
275,
11652,
26,
1450,
21,
865,
16,
170,
15,
215,
45,
1637,
1886,
13,
7,
14255,
856,
7,
2314,
30,
468,
1797,
30,
127,
16,
51,
8247,
170,
1364,
275,
16,
1637... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a way to handle a variable number of parameters in a template class?
===
I have a set of callback classes that I use for handling callbacks with variable numbers of parameters. Right now I have about 6 different instances of it to handle differing numbers of arguments. Is there a way to make one instance than can handle a variable number of arguments?? Ultimately I would love to have each parameter be a POD type or a class pointer, or a struct pointer. Any ideas?
template <class T>
class kGUICallBackPtr
{
public:
kGUICallBackPtr() {m_obj=0;m_func=0;}
void Set(void *o,void (*f)(void *,T *));
inline void Call(T *i) {if(m_func) m_func(m_obj,i);}
inline bool IsValid(void) {return (m_func!=0);}
private:
void *m_obj;
void (*m_func)(void *,T *);
};
template <class T,class U>
class kGUICallBackPtrPtr
{
public:
kGUICallBackPtrPtr() {m_obj=0;m_func=0;}
void Set(void *o,void (*f)(void *,T *,U *));
inline void Call(T *i, U *j) {if(m_func) m_func(m_obj,i,j);}
inline bool IsValid(void) {return (m_func!=0);}
private:
void *m_obj;
void (*m_func)(void *,T *,U *j);
};
| 0 | [
2,
25,
80,
21,
161,
20,
3053,
21,
7612,
234,
16,
12905,
19,
21,
22894,
718,
60,
800,
3726,
3726,
31,
57,
21,
309,
16,
645,
1958,
2684,
30,
31,
275,
26,
7988,
645,
1958,
18,
29,
7612,
2116,
16,
12905,
9,
193,
130,
31,
57,
88,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TreeNode: How to prevent getChildCount from doing expensive operation?
===
I'm writing a Java Tree in which tree nodes could have children that take a long time to compute (in this case, it's a file system, where there may be network timeouts that prevent getting a list of files from an attached drive).
The problem I'm finding is this:
1. getChildCount() is called before the user specifically requests opening a particular branch of the tree. I believe this is done so the JTree knows whether to show a + icon next to the node.
2. An accurate count of children from getChildCount() would need to perform the potentially expensive operation
3. If I fake the value of getChildCount(), the tree only allocates space for that many child nodes before asking for an enumeration of the children. (If I return '1', I'll only see 1 child listed, despite that there are more)
The enumeration of the children can be expensive and time-consuming, I'm okay with that. But I'm not okay with getChildCount() needing to know the exact number of children.
Any way I can work around this?
| 0 | [
2,
8247,
1541,
251,
546,
45,
184,
20,
2501,
164,
11287,
16549,
37,
845,
5381,
1453,
60,
800,
3726,
3726,
31,
22,
79,
1174,
21,
8247,
1541,
19,
56,
1541,
16272,
110,
57,
391,
30,
247,
21,
175,
85,
20,
23909,
13,
5,
108,
48,
610... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 tell when an MXML component has totally finished creation?
===
An MXML component can be quite complex, containing many nested controls, including asynchronously loaded content such as Image/SWFLoader.
Is there one event I can watch for on my component that will only be raised when every control and sub-component has loaded, including SWFs and Images? | 0 | [
2,
184,
20,
494,
76,
40,
307,
396,
8184,
5912,
63,
5139,
842,
2502,
60,
800,
3726,
3726,
40,
307,
396,
8184,
5912,
92,
44,
1450,
1502,
15,
3503,
151,
5618,
69,
8671,
15,
215,
21,
16023,
13985,
8572,
2331,
145,
28,
1961,
118,
18,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Priority of C++ operators "&" and "->"
===
Given the following:
&row->count
Would &(row->count) be evaluated or (&row)->count be evaluated in C++? | 0 | [
2,
9857,
16,
272,
20512,
9475,
13,
7,
1569,
7,
17,
13,
7,
8,
1,
7,
800,
3726,
3726,
504,
14,
249,
45,
279,
5417,
8,
1,
16549,
83,
279,
5,
5417,
8,
1,
16549,
6,
44,
19018,
54,
13,
5,
1569,
5417,
6,
8,
1,
16549,
44,
19018,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
What's The Best Option For Rendering Complex Fonts?
===
I'm working on a game (using Ruby) and planning to have it available in several languages. I was wondering what's the best option for rendering text. In particular, whatever I use should be able to render complex fonts (Arabic and Persian in particular).
I've been looking around and have stumbled upon freetype, graphite, and using windows native api functions (I'm fine with it being not cross-platform) to name a few. What should I go with and what are the different trade-offs? | 0 | [
2,
98,
22,
18,
14,
246,
4255,
26,
15307,
1502,
9978,
18,
60,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
250,
13,
5,
12655,
10811,
6,
17,
2334,
20,
57,
32,
904,
19,
238,
2556,
9,
31,
23,
5712,
98,
22,
18,
14,
246,
4255,
26,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I put a File (Excel) online (Apache Server) with Password Protection but with the Option for Users to alter the File and save the changes?
===
I have to put an excel file online on a web server (Apache) with some basic password protection (basic http auth). User, however, should be able to open the file from within excel and save their changes back to the server.
Is there any simple and effective solution for it? I am not very experienced with webdav. | 0 | [
2,
184,
107,
31,
442,
21,
3893,
13,
5,
1706,
11040,
6,
2087,
13,
5,
7738,
2569,
8128,
6,
29,
20884,
2057,
47,
29,
14,
4255,
26,
3878,
20,
7835,
14,
3893,
17,
2079,
14,
1693,
60,
800,
3726,
3726,
31,
57,
20,
442,
40,
20700,
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... |
LinqtoSQL filter and order by syntax
===
My Techie Bretheren (and Sisteren, of course!),
I have a LinqToSql data model that has the following entities:
<img src="http://danimal.acsysinteractive.com/images/advisor.jpg" alt="data model" />
I need to retrieve all advisors for a specific office, ordered by their sequence within the office. I've got the first part working with a join:
public static List<Advisor>GetOfficeEmployees(int OfficeID)
{
List<Advisor> lstAdvisors = null;
using (AdvisorDataModelDataContext _context = new AdvisorDataModelDataContext())
{
var advisors = from adv in _context.Advisors
join advisoroffice in _context.OfficeAdvisors
on adv.AdvisorId equals advisoroffice.AdvisorId
where advisoroffice.OfficeId == OfficeID
select adv;
lstAdvisors = advisors.ToList();
}
return lstAdvisors;
}
However, I can't seem to wrap my weary brain around the order by clause. Can anyone give some suggestions? | 0 | [
2,
6294,
1251,
262,
18,
22402,
11945,
17,
389,
34,
22649,
800,
3726,
3726,
51,
6145,
660,
4929,
1887,
103,
13,
5,
290,
1035,
219,
15,
16,
674,
187,
6,
15,
31,
57,
21,
6294,
1251,
262,
18,
22402,
1054,
1061,
30,
63,
14,
249,
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... |
App.config for dll
===
We have an "engine" that loads dlls dynamically (whatever is located in a certain directory) and calls Workflow classes from them by way of reflection.
We now have some new Workflows that require access to a database, so I figured that I would put a config file in the dll directory.
But for some reason my Workflows just don't see the config file.
<configuration>
<appSettings>
<add key="ConnectString" value="Data Source=officeserver;Database=mydatabase;User ID=officeuser;Password=officeuser;" />
</appSettings>
</configuration>
Given the above config file, the following code prints an empty string:
Console.WriteLine(ConfigurationManager.AppSettings["ConnectString"]);
I think what I want is to just specify a config filename, but I'm having problems here. I'm just not getting results.
Anyone have any pointers? | 0 | [
2,
4865,
9,
14093,
2816,
26,
13,
43,
211,
800,
3726,
3726,
95,
57,
40,
13,
7,
16847,
7,
30,
19069,
13,
43,
211,
18,
7782,
1326,
13,
5,
13515,
25,
335,
19,
21,
1200,
16755,
6,
17,
3029,
170,
9990,
2684,
37,
105,
34,
161,
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... |
Inherit IEnumerable from Object consequences
===
I posted an answer to [this question][1], including a very short rant at the end about how String.Split() should accept IEnumerable<string> rather than string[].
That got me thinking. What if the base Object class from which everything else inherits provided a default implementation for IEnumerable such that everything now returns an Enumerator over exactly one item (itself) -- unless it's overridden to do something else like with collections classes.
The idea is that then if methods like String.Split() did accept IEnumerable rather than an array I could pass a single string to the function and it would just work, rather than having to much about with creating a separator array.
I'm sure there are all kinds of reasons not to do this, not the least of which is that if everything implemented IEnumerable, then the few classes where the implementation strays from the default could behave differently than you'd expect in certain scenarios. But I still thought it would be a fun exercise: what other consequences would there be?
[1]: http://stackoverflow.com/questions/154706 | 0 | [
2,
17569,
13,
660,
6336,
106,
579,
37,
3095,
8360,
800,
3726,
3726,
31,
6054,
40,
1623,
20,
636,
1565,
1301,
500,
2558,
165,
500,
15,
215,
21,
253,
502,
13,
7874,
35,
14,
241,
88,
184,
3724,
9,
25603,
5,
6,
378,
3440,
13,
660,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Secure communication between Flash and PHP script
===
I have little knowledge of Flash but for a little Flash game I have to store score and successful tries of users in a database using PHP. Now the Flash runs locally on the users computer and connects to a remote server. How can I secure against manipulation of game scores. Is there any best practice for this use case? | 0 | [
2,
4315,
3291,
128,
4433,
17,
13,
26120,
3884,
800,
3726,
3726,
31,
57,
265,
1918,
16,
4433,
47,
26,
21,
265,
4433,
250,
31,
57,
20,
1718,
1618,
17,
1300,
3919,
16,
3878,
19,
21,
6018,
568,
13,
26120,
9,
130,
14,
4433,
1461,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Simple way to trim Dollar Sign if present in C#
===
I have a DataRow and I am getting one of the elements which is a Amount with a dollar sign. I am calling a toString on it. Is there another method I can call on it to remove the dollar sign if present.
**So something like:**
*dr.ToString.Substring(1, dr.ToString.Length);*
But more conditionally in case the dollar sign ever made an appearance again.
I am trying to do this with explicitly defining another string.
| 0 | [
2,
1935,
161,
20,
8971,
9311,
1676,
100,
734,
19,
272,
5910,
800,
3726,
3726,
31,
57,
21,
1054,
5417,
17,
31,
589,
1017,
53,
16,
14,
2065,
56,
25,
21,
2006,
29,
21,
9311,
1676,
9,
31,
589,
2555,
21,
20,
11130,
27,
32,
9,
25,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to update an Access DB from the web?
===
I'm looking for a way to create an online form that will update an Access database that has just a few tables. Does anyone know of a simple solution for this? | 0 | [
2,
184,
20,
11100,
40,
1381,
13,
9007,
37,
14,
2741,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
161,
20,
1600,
40,
2087,
505,
30,
129,
11100,
40,
1381,
6018,
30,
63,
114,
21,
310,
7484,
9,
630,
1276,
143,
16,
21,
1935,
42... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do you remove subversion control for a folder?
===
I have a folder c:\websites\test and it contains folders and files that were checked out from a repository that no longer exists.
How do I get subversion to stop tracking that folder and any of the subfolders and files? I know I could simply delete the .svn folder but there are a lot of sub-folders in many layers. | 0 | [
2,
184,
107,
42,
4681,
972,
10898,
569,
26,
21,
19294,
60,
800,
3726,
3726,
31,
57,
21,
19294,
272,
45,
1,
14113,
18,
6359,
1,
10543,
17,
32,
1588,
19294,
18,
17,
6488,
30,
46,
6505,
70,
37,
21,
24869,
30,
90,
1045,
5636,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.