unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
How do you find a point a given perpendicular distance from a line?
===
I have a line that I draw in a window and I let the user drag it around. So, my line is defined by two points: (x1,y1) and (x2,y2). But now I would like to draw "caps" at the end of my line, that is, short perpendicular lines at each of my end points. The caps should be N pixels in length.
Thus, to draw my "cap" line at end point (x1,y1), I need to find two points that form a perpendicular line and where each of its points are N/2 pixels away from the point (X1,y1).
So, how to you calculate a point (x3,y3) given it needs to be a perpendicular distance N/2 away from the end point (x1,y1) of a known line, i.e. the line defined by (x1,y1) and (x2,y2)?
Thanks! | 0 | [
2,
184,
107,
42,
477,
21,
454,
21,
504,
20659,
1583,
37,
21,
293,
60,
800,
3726,
3726,
31,
57,
21,
293,
30,
31,
2003,
19,
21,
1463,
17,
31,
408,
14,
4155,
5501,
32,
140,
9,
86,
15,
51,
293,
25,
2811,
34,
81,
819,
45,
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... |
C/C++ strip chart
===
Just a quick question.
I'm looking for a simple strip chart (aka. graphing) control similar to the windows task manager 'Performance' view. And have found a few, but they all rely on MFC or .NET :(
Am hoping that someone here might have or know where to get a simple strip chart Win32 control that is not MFC.
Thanks.
| 0 | [
2,
272,
118,
150,
20512,
4998,
1795,
800,
3726,
3726,
114,
21,
2231,
1301,
9,
31,
22,
79,
699,
26,
21,
1935,
4998,
1795,
13,
5,
4176,
9,
7210,
68,
6,
569,
835,
20,
14,
1936,
3005,
1382,
13,
22,
22528,
22,
1418,
9,
17,
57,
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... |
Do you know of any .NET components for creating Distance Matrices / Routing graphs ?
===
Based on geographical data in classic GIS formats. These matrices are a basic input for different vehicle routing problems and such. They can usually be produced an best time or shortest distance basis. | 0 | [
2,
107,
42,
143,
16,
186,
13,
9,
2328,
5090,
26,
2936,
1583,
24849,
13,
118,
19880,
7210,
18,
13,
60,
800,
3726,
3726,
432,
27,
10490,
1054,
19,
2732,
16004,
13767,
9,
158,
24849,
50,
21,
2125,
6367,
26,
421,
2664,
19880,
1716,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... |
How best to integrate several systems?
===
Ok where I work we have a fairly substantial number of systems written over the last couple of decades that we maintain.
The systems are diverse in that multiple operating systems (Linux, Solaris, Windows), Multiple Databases (Several Versions of oracle, sybase and mysql), and even multiple languages (C, C++, JSP, PHP, and a host of others) are used.
Each system is fairly autonomous, even at the cost of entering the same data into multiple systems.
Management recently decided that we should investigate what it will take to get all the systems happily talking to each other and sharing data.
Keep in mind that while we can make software changes to any of the individual systems, a complete rewrite of any one system (or more) is not something management is likely to entertain.
The first thought of several of the developers here was the straight forward: If system A needs data from system B it should just connect to system B's database and get it. Likewise if it needs to give B data it should just insert it into B's database.
Due to the mess of databases (and versions) used, other developers were of the opinion that we should have one new database, combining the tables from all the other systems to avoid having to juggle multiple connections. By doing this they hope that we might be able to consolidate some tables and get rid of the redundant data entry.
This is about the time I was brought in for my opinion on the whole mess.
The whole idea of using the database as a means of system communication smells funny to me. Business logic will have to be placed into multiple systems (if System A wants to add data to System B it better understand B's rules concerning the data before doing the insert), several systems will most likely have to do some form of database polling to find any changes to their data, continuing maintenance will be a headache, as any change to a database schema now propagates several systems.
My first thought was to take the time and write APIs/Services for the different systems, which once written could be easily used to pass/retrieve data back and forth. A lot of the other developers feel that is excessive and far more work than just using the database.
So what would be the best way to go about getting these systems to talk to each other?
| 0 | [
2,
184,
246,
20,
18399,
238,
1242,
60,
800,
3726,
3726,
5854,
113,
31,
170,
95,
57,
21,
6647,
6185,
234,
16,
1242,
642,
84,
14,
236,
1335,
16,
3784,
30,
95,
4027,
9,
14,
1242,
50,
6951,
19,
30,
1886,
2455,
1242,
13,
5,
1226,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 execute a dynamic SQL Query against MS Access 2003 via VBA?
===
This is a _super basic_ question but I'm trying to execute a Query that I'm building via some form values against the MS Access database the form resides in. I don't think I need to go through ADO formally, but maybe I do.
Anyway, some help would be appreciated. Sorry for being a n00b. ;) | 0 | [
2,
184,
107,
42,
15644,
21,
7782,
4444,
255,
25597,
149,
4235,
1381,
973,
1197,
566,
969,
60,
800,
3726,
3726,
48,
25,
21,
13,
1,
8542,
2125,
1,
1301,
47,
31,
22,
79,
749,
20,
15644,
21,
25597,
30,
31,
22,
79,
353,
1197,
109,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Javascript Post Request like a Form Submit
===
I'm trying to direct a browser to a different page. If I wanted a GET request, I might say
document.location.href = 'http://example.com/q=a';
But the resource I'm trying to access won't respond properly unless I use a POST request. If this were not dynamically generated, I might use the HTML
<form action="http://example.com/" method="POST">
<input type="hidden" name="q" value="a">
</form>
Then I would just submit the form from the DOM.
But really I would like JavaScript that allows me to say
post_to_url('http://example.com/', {'q':'a'});
What's the best cross browser implementation?
| 0 | [
2,
8247,
8741,
678,
3772,
101,
21,
505,
12298,
800,
3726,
3726,
31,
22,
79,
749,
20,
1744,
21,
16495,
20,
21,
421,
2478,
9,
100,
31,
417,
21,
164,
3772,
15,
31,
530,
395,
4492,
9,
19032,
9,
252,
14057,
800,
13,
22,
21127,
6903... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Should the Enter key always trigger the default button, no matter which child control has the focus
===
I have a form with a default OK button, and a Cancel button. I have a treeview with nodes that can be edited, i.e. you can double-click them or press F2 to open another form.
Now, I've never liked that F2 shortcut, and now that I'm enabling treeview label edition, it's even worse. My first reaction when testing the form was to press "Enter" to edit the selected node, but doing this would go against the normal default button behavior.
Your opinion: Should an application always enforce the default button being triggered with the Enter key? If so what kind of shortcut should an application use to "edit the selected item"? | 0 | [
2,
378,
14,
2830,
1246,
550,
7286,
14,
12838,
5167,
15,
90,
1161,
56,
850,
569,
63,
14,
1776,
800,
3726,
3726,
31,
57,
21,
505,
29,
21,
12838,
5854,
5167,
15,
17,
21,
14815,
5167,
9,
31,
57,
21,
1541,
4725,
29,
16272,
30,
92,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a way to have PHP print the data to a web browser in real time?
===
For example, if I have an echo statement, there's no guarantee that the browser might display it right away, might display a few dozen echo statements at once, and might wait until the entire page is done before displaying anything.
Is there a way to have each echo appear in a browser as it is executed? | 0 | [
2,
25,
80,
21,
161,
20,
57,
13,
26120,
4793,
14,
1054,
20,
21,
2741,
16495,
19,
683,
85,
60,
800,
3726,
3726,
26,
823,
15,
100,
31,
57,
40,
8117,
3331,
15,
80,
22,
18,
90,
9120,
30,
14,
16495,
530,
3042,
32,
193,
229,
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... |
Castle-Windsor swapping service at runtime
===
Let say we defined an interface for tax service as ITaxService, and we got more than one implementation of TaxService (by region) however I wanted to attach a specific tax implementation to a specific customer from the spcific region.
Will DI help in this scenario? How? "code snippet would be much appreciate" | 0 | [
2,
1339,
8,
7809,
18,
248,
10143,
5574,
365,
35,
485,
891,
800,
3726,
3726,
408,
395,
95,
2811,
40,
6573,
26,
2225,
365,
28,
32,
7522,
11449,
15,
17,
95,
330,
91,
119,
53,
6123,
16,
2225,
11449,
13,
5,
779,
632,
6,
207,
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... |
Sharing GDI handles between processes in Windows CE 6.0
===
I know that GDI handles are unique and process specific in 'Big Windows' but do they work the same way in Windows CE 6.0?
For example:
I've got a font management service that several other services and applications will be using. This service has a list of valid fonts and configurations for printing and displaying; CreateFontIndirect() has been called on each of them. When one of these client applications requests a particular font (and configuration), can I return it the appropriate HFONT? If not, is there a safe/valid way to duplicate the handle, ala DuplicateHandle for Kernel handles.
The reason I ask, is that I've seen HFONTs passed to another application through PostMessage work correctly, but I didn't think they were 'supposed' to.
Thanks in advance.
Dave | 0 | [
2,
6126,
489,
1115,
3053,
18,
128,
5102,
19,
1936,
4000,
400,
9,
387,
800,
3726,
3726,
31,
143,
30,
489,
1115,
3053,
18,
50,
2619,
17,
953,
1903,
19,
13,
22,
6407,
1936,
22,
47,
107,
59,
170,
14,
205,
161,
19,
1936,
4000,
400,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What are the best/most popular ways to do aspect-oriented programming (AOP) in C#/.Net?
===
What are the best/most popular ways to do aspect-oriented programming (AOP) in C#/.Net? | 0 | [
2,
98,
50,
14,
246,
118,
4630,
844,
2847,
20,
107,
7289,
8,
6800,
3143,
13,
5,
58,
2594,
6,
19,
272,
5910,
118,
9,
2328,
60,
800,
3726,
3726,
98,
50,
14,
246,
118,
4630,
844,
2847,
20,
107,
7289,
8,
6800,
3143,
13,
5,
58,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Firing a SharePoint Workflow by updating a list item through List Webservice
===
I am developing, a simple SharePoint Sequential Workflow which should be bound to a document library. When associating the little workflow to a document library, i checked these options
- Allow this workflow to be manually
started by an authenticated user
with Edit Items Permissions.
- Start
this workflow when a new item is
created.
- Start this workflow when
an item is changed.
Now I upload a document to this library and the workflow starts and for instance sends a mail. It completes and everything is fine.
When I select Edit Properties on the new Item and save a change, the workflow is fired again. Absolutely what we expected.
Even when copying a new Item into the library with help of the Copy.asmx Webservice, the workflow starts normally.
But **now** I want to update the item **via the SharePoint WebService Lists.asmx**.
My CAML goes here:
<Method ID='1' Cmd='Update'>
<Field Name='ID'>1</Field>
<Field Name='myDummyPropertyField'>NewValue</Field>
</Method>
The Item is being updated (timestamp changed and a dummy property, too) but the workflow does NOT start again.
This behaviour is reproducable on our development **and** test system.
Checking the error logs (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS) I discovered a strange error message:
09/25/2008 16:51:40.17 w3wp.exe (0x1D94) 0x1D60 Windows SharePoint Services General 6875 Critical Error loading and running event receiver Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver in Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c. Additional information is below. : The object specified does not belong to a list.
Anybody who can confirm this behaviour? Or any solution hints? This would be great!
I am keeping you informed of any developments on this topic.
| 0 | [
2,
7139,
21,
1891,
3132,
170,
9990,
34,
71,
43,
1880,
21,
968,
9101,
120,
968,
2741,
11449,
800,
3726,
3726,
31,
589,
3561,
15,
21,
1935,
1891,
3132,
1353,
5495,
10107,
170,
9990,
56,
378,
44,
4138,
20,
21,
4492,
1248,
9,
76,
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... |
htmlentities With xml_parse?
===
I am currently running into a problem where an element is coming back from my xml file with a single quote in it. This is causing xml_parse to break it up into multiple chunks, example: Get Wired, You're Hired!
Is then enterpreted as 'Get Wired, You' being one object, the single quote being a second, and 're Hired!' as a third.
What I want to do is:
while($data = fread($fp, 4096)){
if(!xml_parse($xml_parser, htmlentities($data,ENT_QUOTES), feof($fp))) {
break;
}
}
But that keeps breaking. I can run a str_replace in place of htmlentities and it runs without issue, but does not want to with htmlentities.
Any ideas? | 0 | [
2,
13,
15895,
2291,
3808,
29,
23504,
1,
3574,
870,
60,
800,
3726,
3726,
31,
589,
871,
946,
77,
21,
1448,
113,
40,
4520,
25,
880,
97,
37,
51,
23504,
3893,
29,
21,
345,
16371,
19,
32,
9,
48,
25,
3242,
23504,
1,
3574,
870,
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... |
unlockbits, lockbits, and try-finally
===
I'm calling some code that uses the BitmapData class from .NET. I've hit something where I can't find a definitive answer on Googlespace.
Because it seems that LockBits and UnlockBits must always be called in a pair, I'm using this:
System.Drawing.Imaging.BitmapData tempImageData = tempImage.LockBits(
new System.Drawing.Rectangle(0, 0, tempImage.Width, tempImage.Height),
System.Drawing.Imaging.ImageLockMode.ReadOnly, tempImage.PixelFormat);
try
{
//Mess around with the image
}
finally
{
tempImage.UnlockBits(tempImageData);
}
(I've recently been playing around with the using statement, which is very useful in C#, which gave me the idea that I should do this.) Trouble is, even MS's own documentation ([http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.unlockbits.aspx][1]) doesn't see it fit to use the try-finally pattern.
Is try-finally necessary or gratuitous?
Thanks!
[1]: http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.unlockbits.aspx | 0 | [
2,
16497,
3326,
18,
15,
3991,
3326,
18,
15,
17,
1131,
8,
4932,
102,
800,
3726,
3726,
31,
22,
79,
2555,
109,
1797,
30,
2027,
14,
1142,
15022,
18768,
718,
37,
13,
9,
2328,
9,
31,
22,
195,
770,
301,
113,
31,
92,
22,
38,
477,
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... |
In ASP.NET MVC, how to write model so checkbox in view corresponds to integer in database?
===
I have a database column "WantsReply" that logically holds a boolean (bit) but is unfortunately implemented as an integer. Any nonzero value means "yes" and zero means "no".
If I write
class Entry {
[Column] public int WantsReply {get; set;}
}
in my model, and map it to a checkbox in the view using
Html.CheckBox( "WantsReply", View.Model.WantsReply )
then I get a conversion error when I submit the view. On the other hand if I write
[Column] public bool WantsReply {get; set;}
then the view submit works OK but then I get a different conversion error when I run a query like
from entry in Entries select entry;
How can I resolve this impedance mismatch so that both queries and submits work?
| 0 | [
2,
19,
28,
306,
9,
2328,
307,
8990,
15,
184,
20,
2757,
1061,
86,
2631,
5309,
19,
1418,
17016,
20,
13820,
19,
6018,
60,
800,
3726,
3726,
31,
57,
21,
6018,
4698,
13,
7,
14876,
18,
99,
306,
102,
7,
30,
11545,
102,
2763,
21,
9827,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Find CRLF in Notepad++
===
How can I find/replace all CRLF characters in notepad++? Looking for something equivalent to the ^p special character in Word. | 0 | [
2,
477,
6186,
9641,
19,
1945,
8240,
20512,
800,
3726,
3726,
184,
92,
31,
477,
118,
99,
5119,
65,
6186,
9641,
1766,
19,
1945,
8240,
20512,
60,
699,
26,
301,
4602,
20,
14,
13,
1,
306,
621,
925,
19,
833,
9,
3,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
this pointer inside object literal in javascript
===
I just came across an interesting situation in Javascript. I have a class with a method that defines several objects using object-literal notation. Inside those objects, the `this` pointer is being used. From the behavior of the program, I have deduced that the `this` pointer is referring to the class on which the method was invoked, and not the object being created by the literal. This seems arbitrary, though it is the way I would expect it to work. Is this defined behavior? Is it cross-browser safe? Is there any reasoning underlying why it is the way it is beyond "the spec says so" (for instance, is it a consequence of some broader design decision/philosophy)? Pared-down code example:
// inside class definition, itself an object literal, we have this function:
onRender: function() {
this.menuItems = this.menuItems.concat([
{
text: 'Group by Module',
rptletdiv: this
},
{
text: 'Group by Status',
rptletdiv: this
}]);
// etc
}
Thanks! | 0 | [
2,
48,
454,
106,
572,
3095,
20665,
19,
8247,
8741,
800,
3726,
3726,
31,
114,
281,
464,
40,
4883,
1858,
19,
8247,
8741,
9,
31,
57,
21,
718,
29,
21,
2109,
30,
13110,
238,
3916,
568,
3095,
8,
12438,
192,
15591,
9,
572,
273,
3916,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 .Net replacement for GetAsyncKeyState?
===
In VB6, I used a call to the Windows API, **GetAsyncKeyState**, to determine if the user has hit the ESC key to allow them to exit out of a long running loop.
Declare Function GetAsyncKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
Is there an equivalent in .NET? | 0 | [
2,
25,
80,
13,
9,
2328,
4610,
26,
164,
58,
9507,
150,
4237,
3859,
60,
800,
3726,
3726,
19,
13,
20468,
379,
15,
31,
147,
21,
645,
20,
14,
1936,
21,
2159,
15,
13,
1409,
3060,
58,
9507,
150,
4237,
3859,
1409,
15,
20,
3746,
100,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Visio Stencils for MS SQL Server
===
Does anyone have a good set of Visio Stencils for MS SQL Server? | 0 | [
2,
9060,
1963,
11471,
12837,
18,
26,
4235,
4444,
255,
8128,
800,
3726,
3726,
630,
1276,
57,
21,
254,
309,
16,
9060,
1963,
11471,
12837,
18,
26,
4235,
4444,
255,
8128,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
which tools are helpful in determining the complexity of a give C source code
===
I want to know which tool can be used to measure the complexity of a C source.
I have seen other post which ask the same question but I want to know specific tool for C source only.
| 0 | [
2,
56,
4672,
50,
15600,
19,
13521,
14,
12745,
16,
21,
590,
272,
1267,
1797,
800,
3726,
3726,
31,
259,
20,
143,
56,
5607,
92,
44,
147,
20,
4058,
14,
12745,
16,
21,
272,
1267,
9,
31,
57,
541,
89,
678,
56,
1349,
14,
205,
1301,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Problem with synchronizing on String objects?
===
I have a webapp that I am in the middle of doing some load/performance testing on, particularily on a feature where we expect a few hundred users to be accessing the same page and hitting refresh about every 10 seconds on this page. One area of improvement that we found we could make with this function was to cache the responses from the web service for some period of time, since the data is not changing.
After implementing this basic caching, in some further testing I found out that I didn't consider how concurrent threads could access the Cache at the same time. I found that within the matter of ~100ms, about 50 threads were trying to fetch the object from the Cache, finding that it had expired, hitting the web service to fetch the data, and then putting the object back in the cache.
The original code looked something like this:
private SomeData[] getSomeDataByEmail(WebServiceInterface service, String email) {
final String key = "Data-" + email;
SomeData[] data = (SomeData[]) StaticCache.get(key);
if (data == null) {
data = service.getSomeDataForEmail(email);
StaticCache.set(key, data, CACHE_TIME);
}
else {
logger.debug("getSomeDataForEmail: using cached object");
}
return data;
}
So, to make sure that only one thread was calling the web service when the object at `key` expired, I thought I needed to synchronize the Cache get/set operation, and it seemed like using the cache key would be a good candidate for an object to synchronize on (this way, calls to this method for email b@b.com would not be blocked by method calls to a@a.com).
I updated the method to look like this:
private SomeData[] getSomeDataByEmail(WebServiceInterface service, String email) {
SomeData[] data = null;
final String key = "Data-" + email;
synchronized(key) {
data =(SomeData[]) StaticCache.get(key);
if (data == null) {
data = service.getSomeDataForEmail(email);
StaticCache.set(key, data, CACHE_TIME);
}
else {
logger.debug("getSomeDataForEmail: using cached object");
}
}
return data;
}
I also added logging lines for things like "before synchronization block", "inside synchronization block", "about to leave synchronization block", and "after synchronization block", so I could determine if I was effectively synchronizing the get/set operation.
However it doesn't seem like this has worked. My test logs have output like:
>(log output is 'threadname' 'logger name' 'message')
http-80-Processor253 jsp.view-page - getSomeDataForEmail: about to enter synchronization block
http-80-Processor253 jsp.view-page - getSomeDataForEmail: inside synchronization block
http-80-Processor253 cache.StaticCache - get: object at key [SomeData-test@test.com] has expired
http-80-Processor253 cache.StaticCache - get: key [SomeData-test@test.com] returning value [null]
http-80-Processor263 jsp.view-page - getSomeDataForEmail: about to enter synchronization block
http-80-Processor263 jsp.view-page - getSomeDataForEmail: inside synchronization block
http-80-Processor263 cache.StaticCache - get: object at key [SomeData-test@test.com] has expired
http-80-Processor263 cache.StaticCache - get: key [SomeData-test@test.com] returning value [null]
http-80-Processor131 jsp.view-page - getSomeDataForEmail: about to enter synchronization block
http-80-Processor131 jsp.view-page - getSomeDataForEmail: inside synchronization block
http-80-Processor131 cache.StaticCache - get: object at key [SomeData-test@test.com] has expired
http-80-Processor131 cache.StaticCache - get: key [SomeData-test@test.com] returning value [null]
http-80-Processor104 jsp.view-page - getSomeDataForEmail: inside synchronization block
http-80-Processor104 cache.StaticCache - get: object at key [SomeData-test@test.com] has expired
http-80-Processor104 cache.StaticCache - get: key [SomeData-test@test.com] returning value [null]
http-80-Processor252 jsp.view-page - getSomeDataForEmail: about to enter synchronization block
http-80-Processor283 jsp.view-page - getSomeDataForEmail: about to enter synchronization block
http-80-Processor2 jsp.view-page - getSomeDataForEmail: about to enter synchronization block
http-80-Processor2 jsp.view-page - getSomeDataForEmail: inside synchronization block
I wanted to see only one thread at a time entering/exiting the synchronization block around the get/set operations.
Is there an issue in synchronizing on String objects? I thought the cache-key would be a good choice as it is unique to the operation, and even though the `final String key` is declared within the method, I was thinking that each thread would be getting a reference to *the same object* and therefore would synchronization on this single object.
What am I doing wrong here?
| 0 | [
2,
1448,
29,
13,
16023,
3335,
27,
3724,
3916,
60,
800,
3726,
3726,
31,
57,
21,
2741,
7753,
30,
31,
589,
19,
14,
772,
16,
845,
109,
6305,
118,
22528,
4431,
27,
15,
1498,
5768,
27,
21,
1580,
113,
95,
4186,
21,
310,
1874,
3878,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is still missing in our programmer toolbox?
===
We've got
- Good IDEs... with code completion, compilers, plug-ins, embedded servers... "The Works"
- Good build tools
- Nice unit testing frameworks
- Pretty decent application servers
- Lots of books about Design Patterns and XP (if only we had time to read them)
- Fast CPUs and pretty much unlimited storage (looking at YouTube ;-)
- Decent network performance and coverage around the globe
- A great support network via http://stackoverflow.com (and I really mean this!)
But what is still missing in our "programmer toolbox"? | 0 | [
2,
98,
25,
174,
2863,
19,
318,
17968,
5607,
5309,
60,
800,
3726,
3726,
95,
22,
195,
330,
13,
8,
254,
13,
8153,
9,
9,
9,
29,
1797,
5392,
15,
21486,
18,
15,
10922,
8,
108,
18,
15,
12138,
17595,
9,
9,
9,
13,
7,
124,
693,
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... |
"loader constraints violated when linking javax/xml/namespace/QName class" from webapp on Oracle 10g
===
We have a web application that can be deployed on many application servers, including Oracle 10g. On that platform, however, we are having classpath issues. The webapp uses JAXB 2, but Oracle 10g ships with JAXB 1, and this was causing errors. To get around those we configured Oracle to prefer classes in our webapp, but now we are getting the above error when attempting to instantiate a JAXB context.
Looking up the "loader constraints violated" exception - it seems to be thrown when a class that has been loaded with one classloader attempts to access something that is package private in the same package but loaded by a different classloader. I have tried removing any jars in our webapp that include javax.xml.namespace.QName, and have verified that it is the instance included in Oracle that is being picked up, but the error still occurs. Any ideas?
(This is a follow-on from an [earlier question](http://stackoverflow.com/questions/132409/jaxb-2-in-an-oracle-10g-webapp) regarding 10g and JAXB 2.) | 0 | [
2,
13,
7,
8294,
106,
16747,
16625,
76,
12585,
8247,
396,
118,
396,
8184,
118,
7259,
5582,
118,
1251,
7259,
718,
7,
37,
2741,
7753,
27,
15759,
332,
263,
800,
3726,
3726,
95,
57,
21,
2741,
3010,
30,
92,
44,
6698,
27,
151,
3010,
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... |
What assemblies are loaded by default when you create a new ASP.NET 2.0 Web Application Project ?
===
What assemblies are loaded by default when you create a new ASP.NET 2.0 Web Application Project ? | 0 | [
2,
98,
21066,
50,
8572,
34,
12838,
76,
42,
1600,
21,
78,
28,
306,
9,
2328,
172,
9,
387,
2741,
3010,
669,
13,
60,
800,
3726,
3726,
98,
21066,
50,
8572,
34,
12838,
76,
42,
1600,
21,
78,
28,
306,
9,
2328,
172,
9,
387,
2741,
301... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How can I load the contents of a text file into a batch file variable?
===
I need to be able to load the entire contents of a text file and load it into a variable for further processing.
How can I do that? | 0 | [
2,
184,
92,
31,
6305,
14,
8478,
16,
21,
1854,
3893,
77,
21,
13064,
3893,
7612,
60,
800,
3726,
3726,
31,
376,
20,
44,
777,
20,
6305,
14,
1078,
8478,
16,
21,
1854,
3893,
17,
6305,
32,
77,
21,
7612,
26,
653,
5511,
9,
184,
92,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Problem with adding graphics to TLabel
===
I'm trying to create with Delphi a component inherited from TLabel, with some custom graphics added to it on TLabel.Paint. I want the graphics to be on left side of text, so I overrode GetClientRect:
function TMyComponent.GetClientRect: TRect;
begin
result := inherited GetClientRect;
result.Left := 20;
end;
This solution has major problem I'd like to solve: It's not possible to click on the "graphics area" of the control, only label area. If the caption is empty string, it's not possible to select the component in designer by clicking it at all. Any ideas? | 0 | [
2,
1448,
29,
4721,
8351,
20,
13,
38,
21018,
800,
3726,
3726,
31,
22,
79,
749,
20,
1600,
29,
23030,
21,
5912,
7179,
37,
13,
38,
21018,
15,
29,
109,
5816,
8351,
905,
20,
32,
27,
13,
38,
21018,
9,
20578,
9,
31,
259,
14,
8351,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how do I get a handle to a custom component in Flex?
===
I have a custom login component in Flex that is a simple form that dispatches a custom LoginEvent when a user click the login button:
<pre><code>
<?xml version="1.0" encoding="utf-8"?>
<mx:Form xmlns:mx="http://www.adobe.com/2006/mxml" defaultButton="{btnLogin}">
<mx:Metadata>
[Event(name="login",tpye="events.LoginEvent")]
</mx:Metadata>
<mx:Script>
import events.LoginEvent;
private function _loginEventTrigger():void {
var t:LoginEvent = new LoginEvent(
LoginEvent.LOGIN,
txtUsername.text,
txtPassword.text);
dispatchEvent(t);
}
</mx:Script>
<mx:FormItem label="username:">
<mx:TextInput id="txtUsername" color="black" />
</mx:FormItem>
<mx:FormItem label="password:">
<mx:TextInput id="txtPassword" displayAsPassword="true" />
</mx:FormItem>
<mx:FormItem>
<mx:Button id="btnLogin"
label="login"
cornerRadius="0"
click="_loginEventTrigger()" />
</mx:FormItem>
</mx:Form>
</code></pre>
I then have a main.mxml file that contains the flex application, I add my component to the application without any problem:
<pre><code>
<custom:login_form id="cLogin" />
</code>
</pre>
I then try to wire up my event in actionscript:
<pre>
<code>
import events.LoginEvent;
cLogin.addEventListener(LoginEvent.LOGIN,_handler);
private function _handler(event:LoginEvent):void {
mx.controls.Alert.show("logging in...");
}
</code>
</pre>
Everything looks good to me, but when I compile I get an "error of undefined property cLogin...clearly I have my control with the id "cLogin" but I can't seem to get a"handle to it"...what am I doing wrong?
Thanks. | 0 | [
2,
184,
107,
31,
164,
21,
3053,
20,
21,
5816,
5912,
19,
14409,
60,
800,
3726,
3726,
31,
57,
21,
5816,
6738,
108,
5912,
19,
14409,
30,
25,
21,
1935,
505,
30,
14226,
160,
21,
5816,
6738,
1149,
6645,
76,
21,
4155,
10840,
14,
6738,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
iPod touch for iPhone developement
===
I am thinking about buying an iPod touch to make some money on developing apps for the iPhone. I like the concept of the App Store and had a quick look at it with iTunes.
Looks like applications are categorized, to be iPhone OR iPod applications.
Some apps which are free for the iPod seem to cost for iPhone users.
What its the difference of both platforms, or why is the App Store separating them ?
Does it make sense to develope for the iPhone using an iPod touch (beside phone/location related apps) ?
On developer.apple.com I can sign up for selling my Applications on the AppStore for 99$.
Do I have to expect any further costs ?
Is it a problem to develope from outside the US (in my case Germany) ?
| 0 | [
2,
31,
10670,
1723,
26,
21024,
2803,
9632,
800,
3726,
3726,
31,
589,
1440,
88,
9459,
40,
31,
10670,
1723,
20,
233,
109,
875,
27,
3561,
4865,
18,
26,
14,
21024,
9,
31,
101,
14,
2420,
16,
14,
4865,
1718,
17,
41,
21,
2231,
361,
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... |
Database Dublicate Value Issue ( Filtering Based on Previous Value)
===
Earlier this week I ask a question about filtering out duplicate values in sequence at run time. Had some good answers but the amount of data I was going over was to slow and not feasible.
Currently in our database, event values are not filtered. Resulting in duplicate data values (with varying timestamps). We need to process that data at run time and at the database level it’s to time costly ( and cannot pull it into code because it’s used a lot in stored procs) resulting in high query times. We need a data structure that we can query that has this data store filtered out so that no additional filtering is needed at runtime.
**Currently in our DB**
* 'F07331E4-26EC-41B6-BEC5-002AACA58337', '1', '2008-05-08 04:03:47.000'
* 'F07331E4-26EC-41B6-BEC5-002AACA58337', '0', '2008-05-08 10:02:08.000'
* 'F07331E4-26EC-41B6-BEC5-002AACA58337', '0', '2008-05-09 10:03:24.000’ (Need to delete this) **
* 'F07331E4-26EC-41B6-BEC5-002AACA58337', '1', '2008-05-10 04:05:05.000'
**What we need**
* 'F07331E4-26EC-41B6-BEC5-002AACA58337', '1', '2008-05-08 04:03:47.000'
* 'F07331E4-26EC-41B6-BEC5-002AACA58337', '0', '2008-05-08 10:02:08.000'
* 'F07331E4-26EC-41B6-BEC5-002AACA58337', '1', '2008-05-10 04:51:05.000'
This seems trivial, but our issue is that we get this data from wireless devices, resulting in out of sequence packets and our gateway is multithreaded so we cannot guarantee the values we get are in order. Something may come in like a '1' for 4 seconds ago and a '0' for 2 seconds ago, but we process the '1' already because it was first in. we have been spinning our heads on how to implement this. We cannot compare data to the latest value in the database because the latest may actually not have come in yet, so to throw that data out we'd be screwed and our sequence may be completely off. So currently we store every value that comes in and the database shuffles itself around based off of time.. but the units can send 1,1,1,0 and its valid because the event is still active, but we only want to store the on and off state ( first occurrence of the on state 1,0,1,0,1,0).. we thought about a trigger, but we'd have to shuffle the data around every time a new value came in because it might be earlier then the last message and it can change the entire sequence (inserts would be slow).
Any Ideas?
Ask if you need any further information.
| 0 | [
2,
6018,
7309,
4663,
1373,
1923,
1513,
13,
5,
25272,
432,
27,
1158,
1923,
6,
800,
3726,
3726,
1201,
48,
877,
31,
1349,
21,
1301,
88,
25272,
70,
19429,
4070,
19,
4030,
35,
485,
85,
9,
41,
109,
254,
6709,
47,
14,
2006,
16,
1054,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Good ISAM library or other simple file manager for large files on Windows x64
===
We have some very large data files (5 gig to 1TB) where we need quick read/write access. Since we have a fixed record size it seems like some form of ISAM would be the way to go. But would be happy to hear other suggestions.
Ideally the solution would have an Apache or LGPL style license but we will pay if we have to.
Must haves:
Scalable - over at least 1 TB files
Stable - either doesn't corrupt data or has fast recovery process
Runs well on X64 Windows
Nice to have:
Can participate in 2 phase commits
Intrinsic compression facilities
Portable to *nix platforms
C# API or Java API
Thanks,
Terence
| 0 | [
2,
254,
25,
765,
1248,
54,
89,
1935,
3893,
1382,
26,
370,
6488,
27,
1936,
993,
3470,
800,
3726,
3726,
95,
57,
109,
253,
370,
1054,
6488,
13,
5,
264,
7175,
20,
137,
11872,
6,
113,
95,
376,
2231,
1302,
118,
23716,
1381,
9,
179,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Alter a column length
===
I need to alter the length of a column "column_length" in say more than 500 tables and the tables might have no of records ranging from 10 records to 3 or 4 million records.
1) The column may just be a normal column
*create table test(column_length varchar(10))*
2) The column might contain non-clustered index on it.
*create table test(column_length varchar(10))*
*CREATE UNIQUE NONCLUSTERED INDEX column_length_ind ON test (column_length)*
3) The column might contain PRIMARY KEY clustered index on it
*create table test(column_length varchar(10))*
*alter table test add primary key clustered index on column_length*
4) The column might be a composite primary key
5) The column might have a foreign key reference
In short the column "column_length" might be anything.
All i need is to create scripts to alter the length of the column_length from varchar(10)
to varchar(50)
should i drop the indexes before altering and then recreate them?
What about the primary key and foreign key?
Through my research and testing I figured out that...
I can just alter the column's length with out dropping the primary key or any indexes but have to drop and recreate the foreign key alone.
Is this a right assumption? I need a verification on this..
Any help would be great
Thanks guys!!! | 0 | [
2,
7835,
21,
4698,
1476,
800,
3726,
3726,
31,
376,
20,
7835,
14,
1476,
16,
21,
4698,
13,
7,
716,
4404,
103,
1,
6325,
7,
19,
395,
91,
119,
3033,
7484,
17,
14,
7484,
530,
57,
90,
16,
742,
7657,
37,
332,
742,
20,
203,
54,
268,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 'out' parameters in .Net a bad idea?
===
I was recently asked this, but had no real answer besides it simply unnecessarily complicating an application. What other reasons are there? | 0 | [
2,
483,
50,
13,
22,
1320,
22,
12905,
19,
13,
9,
2328,
21,
896,
882,
60,
800,
3726,
3726,
31,
23,
1989,
411,
48,
15,
47,
41,
90,
683,
1623,
3410,
32,
1659,
367,
556,
5052,
18,
18966,
6479,
4663,
1880,
40,
3010,
9,
98,
89,
293... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Are there any decent UI components for touch screen web applications?
===
For various reasons a web application would be best suite a project that I am working on but I am worried about the user interface. There will be a lot of pick and choose options that could be handled by check lists, combo boxes, etc… and to a lesser extent their will be some free text fields. However, I am concerned about using standard components because users will have to access the application from touchscreen computers that will be wall mounted in a manufacturing environment (i.e. they will be very dirty and poorly maintained).
| 0 | [
2,
50,
80,
186,
12238,
13,
5661,
5090,
26,
1723,
2324,
2741,
3767,
60,
800,
3726,
3726,
26,
617,
2932,
21,
2741,
3010,
83,
44,
246,
6160,
21,
669,
30,
31,
589,
638,
27,
47,
31,
589,
3681,
88,
14,
4155,
6573,
9,
80,
129,
44,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ListBox+WrapPanel arrow key navigation
===
I'm trying to achieve the equivalent of a WinForms `ListView` with its `View` property set to `View.List`. Visually, the following works fine. The file names in my `Listbox` go from top to bottom, and then wrap to a new column.
Here's the basic XAML I'm working with:
<ListBox Name="thelist"
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding}"
ScrollViewer.VerticalScrollBarVisibility="Disabled">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel IsItemsHost="True"
Orientation="Vertical" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
However, default arrow key navigation does not wrap. If the last item in a column is selected, pressing the down arrow does not go to the first item of the next column.
I tried handling the `KeyDown` event like this:
private void thelist_KeyDown( object sender, KeyEventArgs e ) {
if ( object.ReferenceEquals( sender, thelist ) ) {
if ( e.Key == Key.Down ) {
e.Handled = true;
thelist.Items.MoveCurrentToNext();
}
if ( e.Key == Key.Up ) {
e.Handled = true;
thelist.Items.MoveCurrentToPrevious();
}
}
}
This produces the last-in-column to first-in-next-column behavior that I wanted, but also produces an oddity in the left and right arrow handling. Any time it wraps from one column to the next/previous using the up/down arrows, a single subsequent use of the left or right arrow key moves the selection to the left or right of the item that was selected just before the wrap occured.
Assume the list is filled with strings "0001" through "0100" with 10 strings per column. If I use the down arrow key to go from "0010" to "0011", then press the right arrow key, selection moves to "0020", just to the right of "0010". If "0011" is selected and I use the up arrow key to move selection to "0010", then a press of the right arrow keys moves selection to "0021" (to the right of "0011", and a press of the left arrow key moves selection to "0001".
Any help achieving the desired column-wrap layout and arrow key navigation would be appreciated. | 0 | [
2,
968,
5309,
2430,
7127,
24332,
532,
7409,
1246,
8368,
800,
3726,
3726,
31,
22,
79,
749,
20,
4689,
14,
4602,
16,
21,
628,
4190,
18,
13,
1,
5739,
4725,
1,
29,
82,
13,
1,
4725,
1,
1354,
309,
20,
13,
1,
4725,
9,
5739,
1,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What strategies and tools are useful for tackling memory leaks in .net?
===
I wrote C++ for 10 years. I encountered memory problems, but they could be fixed with a reasonable amount of effort.
For the last couple of years I've been writing C#. I find I still get lots of memory problems. They're difficult to diagnose and fix due to the non-determinancy, and because the c# philosophy is that you shouldn't have to worry about such things when you very definitely do.
What kind of strategies and tools are useful for tackling memory leaks in .net? | 0 | [
2,
98,
10272,
17,
4672,
50,
4811,
26,
15586,
802,
1912,
11724,
18,
19,
13,
9,
2328,
60,
800,
3726,
3726,
31,
738,
272,
20512,
26,
332,
122,
9,
31,
8208,
1912,
1716,
15,
47,
59,
110,
44,
3535,
29,
21,
9954,
2006,
16,
2150,
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... |
XML for Documentation - Standards?
===
I need to create Documentation for a tool. Now, there are about a billion different ways to do it, but I have the following requirements:
* Needs to be a physical file, so that it can go to SVN
* Needs to be printable
* Needs to be readable and searchable from the Web
* Needs to be able to include Images and basic formatting (Headlines)
* Optional: Needs to support Inline Links (Table of Content => Heading)
Word or PDF documents fulfill most parameters, but are not really readable from the web. A Web-based solution is not really printable.
So my idea is to have one central file that only includes Content, and then some tool that can generate output in PDF and additionally in HTML.
Now, LaTeX comes into mind, but this is a bit overkill. I thought of maybe some XML and then XSLT processing? The reason for wanting XSLT is also because then I can use the XML Viewer Web Part within Sharepoint to display it.
As I do not have much experience and don't want to reinvent the wheel, I just wonder if there is already some sort of "standard" XML Schema for Documents and standard XSLT? and as bonus, a PDF conversion?
I know I can just build that myself, but maybe one of the eleventy billion XML Standards specifies a "Documentation XML Schema" already? | 0 | [
2,
23504,
26,
13945,
13,
8,
3364,
60,
800,
3726,
3726,
31,
376,
20,
1600,
13945,
26,
21,
5607,
9,
130,
15,
80,
50,
88,
21,
2786,
421,
2847,
20,
107,
32,
15,
47,
31,
57,
14,
249,
4786,
45,
1637,
2274,
20,
44,
21,
1825,
3893,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Developing N-Tier App. In what direction?
===
Assuming the you are implementing a user story that requires changes in all layers from UI (or service facade) to DB.
In what direction do you move?
- From UI to Business Layer to Repository to DB?
- From DB to Repository to Business Layer to UI?
- It depends. (On what ?) | 0 | [
2,
3561,
13,
103,
8,
5259,
4865,
9,
19,
98,
1400,
60,
800,
3726,
3726,
11704,
14,
42,
50,
17333,
21,
4155,
609,
30,
4781,
1693,
19,
65,
9124,
37,
13,
5661,
13,
5,
248,
365,
7224,
6,
20,
13,
9007,
9,
19,
98,
1400,
107,
42,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
So you've entered the wild rainforest of someone's new API. How do you find your way through?
===
Got any tips for me with regards to figuring out new APIs? I'm trying to overcome my irrational fear of properly learning to work with other peoples' code, so I can seriously use all the advice I can get! | 0 | [
2,
86,
42,
22,
195,
1297,
14,
1808,
19122,
16,
737,
22,
18,
78,
21,
2159,
9,
184,
107,
42,
477,
154,
161,
120,
60,
800,
3726,
3726,
330,
186,
11034,
26,
55,
29,
14179,
20,
25379,
70,
78,
21,
8954,
60,
31,
22,
79,
749,
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... |
Are PDO prepared statements sufficient to prevent SQL injection?
===
Let's say I have code like this:
$dbh = new PDO("blahblah");
$stmt = $dbh->prepare('SELECT * FROM users where username = :username');
$stmt->execute( array(':username' => $_REQUEST['username']) );
The PDO documentation says
>>>>The parameters to prepared statements don't need to be quoted; the driver handles it for you.
Is that truly all I need to do to avoid SQL injections? Is it really that easy?
You can assume MySQL if it makes a difference.
| 0 | [
2,
50,
351,
537,
3268,
9015,
6722,
20,
2501,
4444,
255,
13646,
60,
800,
3726,
3726,
408,
22,
18,
395,
31,
57,
1797,
101,
48,
45,
5579,
43,
6216,
800,
78,
351,
537,
5,
7,
10754,
18098,
9396,
7,
6,
73,
5579,
384,
79,
38,
800,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 search the text of changelist descriptions in Perforce?
===
On occasion, I find myself wanting to search the text of changelist descriptions in Perforce. There doesn't appear to be a way to do this in P4V. I can do it by redirecting the output of the changes command to a file...
p4 changes -l > p4changes.txt
...(the -l switch tells it to dump the full text of the changelist descriptions) and then searching the file, but this is rather cumbersome. Has anyone found a better way? | 0 | [
2,
184,
107,
42,
2122,
14,
1854,
16,
753,
5739,
15740,
19,
416,
8774,
60,
800,
3726,
3726,
27,
5434,
15,
31,
477,
992,
4638,
20,
2122,
14,
1854,
16,
753,
5739,
15740,
19,
416,
8774,
9,
80,
1437,
22,
38,
1893,
20,
44,
21,
161,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Sharepoint: How to set the permission to edit WSS user profile
===
I'm running a SharePoint Application with a form based user authentication without using the MySite feature. So all the settings on the SSP administration site which only concern the user profile on the MySites should normally not affect the user profile of the application as these should be managed from WSS.
But where could I define the settings for the WSS user profiles? At the moment a user can only edit the attributes in his profile which are listed as additional columns for the application's user list (WebsiteAction --> WebisteSettings --> Users and Groups --> All users --> ListSettings). So all other attributes like first, surname, info, title etc. are partly imported form our identity directory (LDAP) but are not editable for the users.
So are there any options to define which of the attributes should be editable for the users and which one should not be? It would also be interesting if there are any options to define which LDAP attributes are mapped to the which WSS profile attribute.
Bye,
Flo | 0 | [
2,
1891,
3132,
45,
184,
20,
309,
14,
5572,
20,
9392,
619,
18,
18,
4155,
5296,
800,
3726,
3726,
31,
22,
79,
946,
21,
1891,
3132,
3010,
29,
21,
505,
432,
4155,
27963,
366,
568,
14,
51,
9097,
1580,
9,
86,
65,
14,
12410,
27,
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... |
positioning three divs with css
===
Who likes riddles? ;)
I have three divs:
<div id="login" />
<div id="content" />
<div id="menu" />
How would I define the CSS styles (without touching the html) to have the menu-div as the left column, the login-div in the right column and the content-div also in the right column but below the login-div.
The width of every div is fixed, but the height isn't. | 0 | [
2,
649,
68,
132,
13,
12916,
18,
29,
272,
18,
18,
800,
3726,
3726,
72,
101,
18,
16551,
18,
60,
13,
73,
6,
31,
57,
132,
13,
12916,
18,
45,
279,
255,
38,
73,
12916,
4924,
3726,
7,
5567,
108,
7,
13,
118,
1569,
263,
38,
73,
279... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ASP.NET MVC CTP5 Crashing IDE
===
I've recently installed the MVC CTP5 and VS is now crashing on me when I try to open an aspx, I get the following error in event viewer:
.NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (7A035E00) (80131506)
I was able to find [This][1] post on the asp.net forums relating to the same issue but nobody has had a working solution yet (at least not for me).
Just wondering if anyone else has run into this issue and what they have done to resolve it?
[1]: http://forums.asp.net/t/1313452.aspx | 0 | [
2,
28,
306,
9,
2328,
307,
8990,
272,
13726,
264,
14604,
13,
3448,
800,
3726,
3726,
31,
22,
195,
1989,
4066,
14,
307,
8990,
272,
13726,
264,
17,
4611,
25,
130,
14604,
27,
55,
76,
31,
1131,
20,
368,
40,
28,
306,
396,
15,
31,
164... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Do assemblies placed in the GAC gain full trust?
===
I've been hearing conflicting facts about this topic. What is correct? | 0 | [
2,
107,
21066,
1037,
19,
14,
4369,
150,
3288,
503,
1527,
60,
800,
3726,
3726,
31,
22,
195,
74,
3229,
22297,
10459,
88,
48,
8303,
9,
98,
25,
4456,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
What are the good, bad, and ugly about the web framework(s) that you use?
===
What web frameworks do you use, and what's good about them? What would you like to see changed? What made you switch away from The Framework You Don't Use Anymore?
| 0 | [
2,
98,
50,
14,
254,
15,
896,
15,
17,
9212,
88,
14,
2741,
6596,
5,
18,
6,
30,
42,
275,
60,
800,
3726,
3726,
98,
2741,
6596,
18,
107,
42,
275,
15,
17,
98,
22,
18,
254,
88,
105,
60,
98,
83,
42,
101,
20,
196,
1015,
60,
98,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How would you sort 1 million 32-bit integers in 2MB of RAM?
===
Please, provide code examples in a language of your choice. | 0 | [
2,
184,
83,
42,
2058,
137,
507,
2512,
8,
3326,
13820,
18,
19,
172,
5024,
16,
2843,
60,
800,
3726,
3726,
2247,
15,
1181,
1797,
3770,
19,
21,
816,
16,
154,
1837,
9,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Migrating web application to asp.net mvc
===
I need your advice regarding migration. I want to migrate existing project to ASP.NET MVC and I can figure out the proccess except of url rewriting issue:
for example how can I make following route:
[http://www.eireads.com/ireland/mayo/cars-3/1263-used-cars-citroen-c5-for-sale.aspx][1]
Or maybe I could somehow keep supporting legacy routes.
Please help
[1]: http://www.eireads.com/ireland/mayo/cars-3/1263-used-cars-citroen-c5-for-sale.aspx | 0 | [
2,
28749,
2741,
3010,
20,
28,
306,
9,
2328,
307,
8990,
800,
3726,
3726,
31,
376,
154,
4978,
3467,
8443,
9,
31,
259,
20,
22985,
3149,
669,
20,
28,
306,
9,
2328,
307,
8990,
17,
31,
92,
1465,
70,
14,
13,
15617,
5052,
18,
1613,
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... |
Obtaining a collection of constructed subclassed types using reflection
===
I want to create a class which implements IEnumerable<T> but, using reflection, generates T's and returns them via IEnumerable<T>, where T' is a entirely constructed subclass of T with some properties hidden and others read-only.
Okay., that might not be very clear. Let me explain this via the medium of code - I'd like to have a class CollectionView<T> as follows:-
public class CollectionView<T> : IEnumerable<T> {
public CollectionView(IEnumerable<T> inputCollection,
List<string> hiddenProperties, List<string> readonlyProperties) {
// ...
}
// IEnumerable<T> implementation which returns a collection of T' where T':T.
}
...
public class SomeObject {
public A { get; set; }
public B { get; set; }
public C { get; set; }
}
...
var hiddenProperties = new List<string>(new[] { "A" });
var readOnlyProperties = new List<string>(new[] { "C" });
IEnumerable<SomeObject> someObjects = CollectionView<SomeObject>(hiddenProperties,
readOnlyProperties);
...
dataGridView1.DataSource = someObjects;
(When displayed in dataGridView1 shows columns B and C and C has an underlying store which is read-only)
Is this possible/desirable or have I completely lost my mind/does this question demonstrate my deep inadequacy as a programmer?
I want to do this so I can manipulate a collection that is to be passed into a DataGridView, *without having to directly manipulate the DataGridView to hide columns/make columns read-only*. So no 'oh just use dataGridView1.Columns.Remove(blah) / dataGridView1.Columns[blah].ReadOnly = true' answers please!!
Help! | 0 | [
2,
12114,
21,
1206,
16,
2096,
972,
1898,
69,
2551,
568,
9138,
800,
3726,
3726,
31,
259,
20,
1600,
21,
718,
56,
8713,
18,
13,
660,
6336,
106,
579,
1569,
255,
38,
73,
38,
1569,
263,
38,
73,
47,
15,
568,
9138,
15,
7920,
18,
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... |
diff and merge of XML
===
Can anyone recommend a good XML diff and merge tool? | 0 | [
2,
20811,
17,
12666,
16,
23504,
800,
3726,
3726,
92,
1276,
12360,
21,
254,
23504,
20811,
17,
12666,
5607,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
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,
0... |
Linq output as an Interface?
===
Here's the code that I'm attempting to do:
public IList<IOperator> GetAll()
{
using (var c = new MyDataContext())
{
return c.Operators.ToList();
}
}
Operator implements IOperator, but I'm getting the following compilation error:
Cannot implicitly convert type 'System.Collections.Generic.List<MyProject.Core.Operator>' to 'System.Collections.Generic.IList<MyProject.Core.Model.IOperator>'. An explicit conversion exists (are you missing a cast?)
How do I cast this to get what I need?
| 0 | [
2,
6294,
1251,
5196,
28,
40,
6573,
60,
800,
3726,
3726,
235,
22,
18,
14,
1797,
30,
31,
22,
79,
6314,
20,
107,
45,
317,
31,
5739,
1,
49,
9477,
3457,
1,
164,
1233,
5,
6,
13,
1,
568,
13,
5,
3311,
272,
800,
78,
51,
18768,
1126... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 to write in the header comments of a code file?
===
I'm just starting a new green-field development project, and I'm trying to set some standards. I know that a lot of codebases have header comments in every code file with a copywrite notice and other gumph. Is this a necessary or useful practice?
For example, I don't think putting the name of the author or dates of modifications is useful, because our source control system tracks that for us. On the other hand, a simple copywrite notice might be useful, or even a requirement.
At this point in time, and for the forseeable future, we don't intend to distribute the source code in anyway.
What (if anything) do you put in the header of your code file? | 0 | [
2,
98,
20,
2757,
19,
14,
157,
106,
7534,
16,
21,
1797,
3893,
60,
800,
3726,
3726,
31,
22,
79,
114,
1422,
21,
78,
647,
8,
1109,
522,
669,
15,
17,
31,
22,
79,
749,
20,
309,
109,
3364,
9,
31,
143,
30,
21,
865,
16,
1797,
8436,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Who's using Ruby on Rails in production?
===
I've been kicking around Ruby and the rails framework and have been considering recommending to a client-of-a-client that they use it to rebuild their site, which is currently built in very bad ASP classic that will have to be rewritten from the ground up regardless of what technology is used.
One thing I'm missing from my pitch is a list of major sites using Ruby-on-Rails. Are there any yet?
| 0 | [
2,
72,
22,
18,
568,
10811,
27,
2240,
18,
19,
637,
60,
800,
3726,
3726,
31,
22,
195,
74,
11228,
140,
10811,
17,
14,
2240,
18,
6596,
17,
57,
74,
5154,
12360,
68,
20,
21,
6819,
8,
1041,
8,
58,
8,
150,
18513,
38,
30,
59,
275,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Create a method call in .NET based on a string value
===
Right now, I have code that looks something like this:
Private Sub ShowReport(ByVal reportName As String)
Select Case reportName
Case "Security"
Me.ShowSecurityReport()
Case "Configuration"
Me.ShowConfigurationReport()
Case "RoleUsers"
Me.ShowRoleUsersReport()
Case Else
pnlMessage.Visible = True
litMessage.Text = "The report name """ + reportName + """ is invalid."
End Select
End Sub
Is there any way to create code that would use my method naming conventions to simplify things? Here's some pseudocode that describes what I'm looking for:
Private Sub ShowReport(ByVal reportName As String)
Try
Call("Show" + reportName + "Report")
Catch ex As Exception
'method not found
End Try
End Sub
| 0 | [
2,
1600,
21,
2109,
645,
19,
13,
9,
2328,
432,
27,
21,
3724,
1923,
800,
3726,
3726,
193,
130,
15,
31,
57,
1797,
30,
1879,
301,
101,
48,
45,
932,
972,
298,
17437,
5,
779,
3377,
1330,
7259,
28,
3724,
6,
5407,
610,
1330,
7259,
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... |
Generating an Xml Serialization assembly as part of my build.
===
This code produces a FileNotFoundException, but ultimately runs without issue:
void ReadXml()
{
XmlSerializer serializer = new XmlSerializer(typeof(MyClass));
//...
}
Here is the exception:
----------
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
Additional information: Could not load file or assembly 'MyAssembly.XmlSerializers, Version=1.4.3190.15950, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
----
**It appears that the framework automatically generates the serialization assembly if it isn't found.** I can generate it manually using sgen.exe, which alleviates the exception.
**How do I get visual studio to generate the XML Serialization assembly automatically?** | 0 | [
2,
13500,
40,
23504,
5956,
1829,
1475,
28,
141,
16,
51,
1895,
9,
800,
3726,
3726,
48,
1797,
6700,
21,
3893,
1270,
12235,
10066,
872,
15,
47,
3308,
1461,
366,
1513,
45,
11364,
1302,
396,
8184,
5,
6,
13,
1,
23504,
4104,
2815,
11907,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there any good Markdown Javascript library or control?
===
I want to build a site where the user can enter text and format it in Markdown. The reason I'd like a Javascript solution is because I want to display a live preview, just like on StackOverflow.
My site is not targeted at developers, however, so an editor control would be ideal.
I gather that on StackOverflow, the [WMD editor][1] is being used.
A quick search on Google also turns up [Showdown library][2], which I think is actually being used by WMD.
Are there any other options? Are WMD/Showdown great tools already? What have been your experiences with the different options?
Thanks!
[1]: http://wmd-editor.com/
[2]: http://attacklab.net/showdown/ | 0 | [
2,
25,
80,
186,
254,
943,
2968,
8247,
8741,
1248,
54,
569,
60,
800,
3726,
3726,
31,
259,
20,
1895,
21,
689,
113,
14,
4155,
92,
2830,
1854,
17,
2595,
32,
19,
943,
2968,
9,
14,
1215,
31,
22,
43,
101,
21,
8247,
8741,
4295,
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... |
Why can't you use the keyword 'this' in a static method in .Net?
===
I guess that's a real noobie question, but I'm new to OO and .Net. I just don't understand why it can't be done. | 0 | [
2,
483,
92,
22,
38,
42,
275,
14,
1246,
9587,
13,
22,
1565,
22,
19,
21,
12038,
2109,
19,
13,
9,
2328,
60,
800,
3726,
3726,
31,
2321,
30,
22,
18,
21,
683,
90,
111,
5893,
1301,
15,
47,
31,
22,
79,
78,
20,
13,
4328,
17,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Retrieving an Record Problem
===
Okay, that may not be the best subject...
I am setting up an approval workflow within an application. I pass the username and the dollar amount to the subprocedure and figure out what workflow I need to use for the approval process. I thought I had this working until I try to handle the condition when the user hasn't been setup.
So in my table I have:
<pre>wfid wfuser wfamt
1 user1 0
2 user2 0
2 user2 10000.00</pre>
Now if user3 tries to send something to the workflow, it shouldn't go becuase they are not setup. (Please note I have another table that contains the actual flow definition)
I had this code to retrieve the correct workflow:
setgt (userId:amount) ARWFR1;
readp ARWFR1;
return wfid;
Obviously this works if the user is properly setup. However, throw our user3 sinareo back in and it won't work right. So then I tried:
setgt (userId:amount) ARWFR1;
readpe (userId) ARWFR1;
if (%eof());
return 0;
endif;
return wfid;
This is not working as I had expected. I am sure I am missing obvious, can you see it? I hope my current logic is clear enough. | 0 | [
2,
13,
6239,
3272,
8397,
40,
571,
1448,
800,
3726,
3726,
1705,
15,
30,
123,
52,
44,
14,
246,
1550,
9,
9,
9,
31,
589,
2697,
71,
40,
4988,
170,
9990,
363,
40,
3010,
9,
31,
1477,
14,
4155,
7259,
17,
14,
9311,
2006,
20,
14,
972,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Anyone Have Experience Creating an Occasionally-Connected Browser App With NHibernate?
===
We need to make our enterprise ASP.NET/NHibernate browser-based application able to function when connected to or disconnected from the customer's server. Has anyone done this? If so, how did you do it? (Technology, architecture, etc.)
Background:
We develop and sell an enterprise browser-based application used by construction field personnel to enter timesheet information. Currently, it requires a connection to the server back in the customer's office and we'd like to build an occasionally-connected version of the application for those clients without wireless Internet availability.
Our application is an ASP.NET application using NHibernate for O/R mapping. Being a Microsoft shop, the Microsoft Sync Framework is attractive, but we don't know whether it "plays well" with NHibernate.
Any insight would be greatly appreciated.
Dave T | 0 | [
2,
630,
1276,
57,
1496,
2936,
40,
4533,
8,
23520,
16495,
4865,
29,
12109,
15191,
8820,
60,
800,
3726,
3726,
95,
376,
20,
233,
318,
6002,
28,
306,
9,
2328,
118,
13880,
15191,
8820,
16495,
8,
1281,
3010,
777,
20,
1990,
76,
2587,
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... |
C# Exception Handling continue on error
===
I have a basic C# console application that reads a text file (CSV format) line by line and puts the data into a HashTable. The first CSV item in the line is the key (id num) and the rest of the line is the value. However I've discovered that my import file has a few duplicate keys that it shouldn't have. When I try to import the file the application errors out because you can't have duplicate keys in a HashTable. I want my program to be able to handle this error though. When I run into a duplicate key I would like to put that key into a arraylist and continue importing the rest of the data into the hashtable. How can I do this in C#
Here is my code:
----------
private static Hashtable importFile(Hashtable myHashtable, String myFileName)
{
StreamReader sr = new StreamReader(myFileName);
CSVReader csvReader = new CSVReader();
ArrayList tempArray = new ArrayList();
int count = 0;
while (!sr.EndOfStream)
{
String temp = sr.ReadLine();
if (temp.StartsWith(" "))
{
ServMissing.Add(temp);
}
else
{
tempArray = csvReader.CSVParser(temp);
Boolean first = true;
String key = "";
String value = "";
foreach (String x in tempArray)
{
if (first)
{
key = x;
first = false;
}
else
{
value += x + ",";
}
}
myHashtable.Add(key, value);
}
count++;
}
Console.WriteLine("Import Count: " + count);
return myHashtable;
}
| 0 | [
2,
272,
5910,
5391,
7988,
1816,
27,
7019,
800,
3726,
3726,
31,
57,
21,
2125,
272,
5910,
8650,
3010,
30,
11137,
21,
1854,
3893,
13,
5,
6824,
710,
2595,
6,
293,
34,
293,
17,
11179,
14,
1054,
77,
21,
19170,
5924,
9,
14,
64,
272,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How many of you do 3-tier design?
===
3-Tier design has been my standard design philosophy for years for database driven applications, and it has never failed me. For those who practice it, describe your layers.
I've found that many people muddle up the business tier and the data access tier, making it more like a 2.5-Tier design.
I prefer to move the data tier almost entirely into the database using stored procedures, and just have a very lightweight data tier in code that wraps sproc calls into business objects.
How do you approach it? | 0 | [
2,
184,
151,
16,
42,
107,
203,
8,
5259,
704,
60,
800,
3726,
3726,
203,
8,
5259,
704,
63,
74,
51,
1236,
704,
3177,
26,
122,
26,
6018,
5355,
3767,
15,
17,
32,
63,
243,
1702,
55,
9,
26,
273,
72,
1345,
32,
15,
4996,
154,
9124,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 configure Tomcat to always direct to index.jsp after login?
===
Currently Tomcat's login support redirects users back to where they initially were when the application figured out they weren't logged in.
For this particular application I need to force them to always go back to `index.jsp`.
I'm pretty sure this is a simple configuration option in the WAR's `web.xml`, but I haven't found the answer in google.
| 0 | [
2,
184,
92,
31,
1065,
15951,
2067,
5782,
20,
550,
1744,
20,
4348,
9,
728,
3401,
75,
6738,
108,
60,
800,
3726,
3726,
871,
2067,
5782,
22,
18,
6738,
108,
555,
302,
14706,
18,
3878,
97,
20,
113,
59,
1537,
46,
76,
14,
3010,
5700,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to interpret code metrics (calculated by SourceMonitor)
===
After reading the answers to the question ["Calculate Code Metrics"][1] I installed the tool [SourceMonitor][2] and calculated some metrics.
But I have no idea how to interpret them.
What's a "good" value for the metric
- "Percent Branch Statements"
- "Methods per Class"
- "Average Statements per Method"
- "Maximum Method or Function
Complexity"
I found no hints in the documentation, can anybody help me?
[1]: http://stackoverflow.com/questions/60394/calculate-code-metrics "Calculate Code Metrics"
[2]: http://www.campwoodsw.com/sm20.html "SourceMonitor" | 0 | [
2,
184,
20,
11584,
1797,
11544,
18,
13,
5,
16304,
13045,
34,
1267,
2111,
242,
248,
6,
800,
3726,
3726,
75,
1876,
14,
6709,
20,
14,
1301,
636,
7,
16304,
12383,
1797,
11544,
18,
7,
500,
2558,
165,
500,
31,
4066,
14,
5607,
636,
120... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 receive UDP Multicast in VxWorks 5.5
===
I have been unable to receive UDP multicast under VxWorks 5.5. I've joined the multicast group:
setsockopt(soc, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *) &ipMreq, sizeof (ipMreq));
Similar code on an adjacent Windows machine does receive multicast.
I am able to send multicast from VxWorks; ifShow() indicates the interface is multicast capable; MCAST_ROUTING is enabled in the kernel config, but still unable to receive multicast.
| 0 | [
2,
184,
20,
2588,
287,
7431,
1889,
6146,
19,
566,
396,
7684,
331,
9,
264,
800,
3726,
3726,
31,
57,
74,
2343,
20,
2588,
287,
7431,
1889,
6146,
131,
566,
396,
7684,
331,
9,
264,
9,
31,
22,
195,
670,
14,
1889,
6146,
214,
45,
3415... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Hiding the header on an Infragistics UltraCombo
===
I've gone through just about every property I can think of, but haven't found a simple way to hide the header on an UltraCombo control from Infragistics.
Headers make sense when I have multiple visible columns and whatnot, but sometimes it would be nice to hide it.
To give a simple example, let's say I have a combobox that displays whether something is active or not. There's a label next to it that says "Active". The combobox has one visible column with two rows -- "Yes" and "No".
When the user opens the drop down, they see "Active" or whatever the header caption for the column is and then the choices. I'd like it to just show "Yes" and "No" only.
It's a minor aesthetic issue that probably just bothers me and isn't even noticed by the users, but I'd still really like to know if there's a way around this default behavior. | 0 | [
2,
5314,
14,
157,
106,
27,
40,
19,
22133,
3771,
18,
6885,
960,
1192,
800,
3726,
3726,
31,
22,
195,
1042,
120,
114,
88,
352,
1354,
31,
92,
277,
16,
15,
47,
2933,
22,
38,
216,
21,
1935,
161,
20,
3077,
14,
157,
106,
27,
40,
688... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 select the rest of the word in incremental search in Intellij IDEA?
===
When in incremental search mode in Intellij IDEA, is there a way to select the rest of the word. For example, suppose I want to find the word “handleReservationGranted”. I type Ctrl-f to enter incremental search mode, and start typing the letters “han”. Now suppose I have found the beginning of “handleReservationGranted”. In my search box I have “han”, but I would now like to be able to select the rest of the word, so that the search box contains “handleReservationGranted” instead of “han”.
In Xemacs, I can type Ctrl-s, type “han”, and then type Ctrl-w. Now my search term is “handleReservationGranted”, and not “han”. So now if I press Ctrl-s, I find the next occurrence of “handleReservationGranted”.
Is there a similar feature in Intellij IDEA? The best I can do now is either to keep typing in the rest of the letters (dleReservationGranted), or exit incremental search, select the word with Ctrl-W, then enter search again with Ctrl-f.
I am using Intellij IDEA 7.0.3.
| 0 | [
2,
184,
5407,
14,
760,
16,
14,
833,
19,
29977,
2122,
19,
19,
4213,
9999,
882,
60,
800,
3726,
3726,
76,
19,
29977,
2122,
3740,
19,
19,
4213,
9999,
882,
15,
25,
80,
21,
161,
20,
5407,
14,
760,
16,
14,
833,
9,
26,
823,
15,
5787... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 browse my Tomcat localhost from another computer on the network?
===
I'm an IIS guy and know its as simple as just using the http://[computername]/path to webapp.. however, I can't seem to figure out how to make this possible for a JSP application I'm writing that runs under Tomcat. Is there a configuration setting I need to set somewhere? | 0 | [
2,
184,
92,
31,
10175,
62,
51,
2067,
5782,
375,
11694,
37,
226,
1428,
27,
14,
982,
60,
800,
3726,
3726,
31,
22,
79,
40,
595,
18,
1244,
17,
143,
82,
28,
1935,
28,
114,
568,
14,
7775,
6903,
2558,
18448,
7259,
500,
118,
8353,
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... |
Current standard compliance level of IronPython & IronRuby
===
Does anyone have some numbers on this? I am just looking for a percentage, a summary will be better.
Cheers | 0 | [
2,
866,
1236,
14969,
662,
16,
1751,
6448,
11570,
279,
1751,
1820,
779,
800,
3726,
3726,
630,
1276,
57,
109,
2116,
27,
48,
60,
31,
589,
114,
699,
26,
21,
5780,
15,
21,
14740,
129,
44,
574,
9,
10497,
18,
3,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Delphi: OpenFileDialog crashes with URL
===
Giving a URL to the TOpenFileDialog, the Execute method throws an exception:
OpenDialog1.Filename := 'http://www.osfi-bsif.gc.ca/app/DocRepository/1/eng/issues/terrorism/indstld_e.xls';
bResult := OpenDialog1.Execute;
But you are allowed to open files from a URL.
Delphi 5 | 0 | [
2,
23030,
45,
368,
16877,
4286,
5567,
21563,
29,
287,
6362,
800,
3726,
3726,
1438,
21,
287,
6362,
20,
14,
20,
3014,
16877,
4286,
5567,
15,
14,
15644,
2109,
13566,
40,
5391,
45,
368,
4286,
5567,
165,
9,
16877,
7259,
13,
45,
3726,
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... |
Error handling in PHP
===
I'm familiar with some of the basics, but what I would like to know more about is when and why error handling should be used in PHP. Is it something that can be overused and if so, what does overuse look like? Are there cases where it shouldn't be used? Also, what are some of the common security concerns in regard to error handling? | 0 | [
2,
7019,
7988,
19,
13,
26120,
800,
3726,
3726,
31,
22,
79,
3694,
29,
109,
16,
14,
2125,
18,
15,
47,
98,
31,
83,
101,
20,
143,
91,
88,
25,
76,
17,
483,
7019,
7988,
378,
44,
147,
19,
13,
26120,
9,
25,
32,
301,
30,
92,
44,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Eclipse folder Referenced Libraries disappears
===
In Java projects in Eclipse version 3.4.1 sometimes the folder "Referenced Libraries" disappears from the "Project Explorer" view. All third party jars are shown directly in the root of the project folder. The project compiles and runs fine. It seems to be a GUI problem.
How can I get this folder back? | 0 | [
2,
11652,
19294,
17571,
8649,
20341,
800,
3726,
3726,
19,
8247,
2314,
19,
11652,
615,
203,
9,
300,
9,
165,
1030,
14,
19294,
13,
7,
28018,
43,
8649,
7,
20341,
37,
14,
13,
7,
21011,
8520,
7,
1418,
9,
65,
422,
346,
5112,
18,
50,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How Do You Write Code That Is Safe for UTF-8?
===
We have a set of applications that were developed for the ASCII character set. Now, we're trying to install it in Iceland, and are running into problems where the Icelandic characters are getting screwed up.
We are working through our issues, but I was wondering: Is there a good "guide" out there for writing C++ code that is designed for 8-bit characters and which will work properly when UTF-8 data is given to it?
I can't expect everyone to read the whole Unicode standard, but if there is something more digestible available, I'd like to share it with the team so we don't run into these issues again. | 0 | [
2,
184,
107,
42,
2757,
1797,
30,
25,
1834,
26,
287,
11720,
8,
457,
60,
800,
3726,
3726,
95,
57,
21,
309,
16,
3767,
30,
46,
885,
26,
14,
28,
1892,
49,
925,
309,
9,
130,
15,
95,
22,
99,
749,
20,
16146,
32,
19,
10659,
15,
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... |
Conferences/Symposiums/Courses in Britain
===
I see lots of advertisements for cool looking conferences based on the latest web technologies on tech-ey sites all the time, but they all seem to be based in the USA - which is too far away to justify the expense :( So, does anyone know of some cool/fun/interesting events for web developers occurring in the UK? Or any sites that would list such events? I'm mostly interested in PHP/Ruby on Rails/C++/AJAX stuff, but more generalised things would rock too. | 0 | [
2,
10462,
118,
7261,
14882,
723,
18,
118,
17556,
18,
19,
1976,
800,
3726,
3726,
31,
196,
7503,
16,
16556,
26,
2700,
699,
10462,
432,
27,
14,
5736,
2741,
5740,
27,
6145,
8,
1436,
3259,
65,
14,
85,
15,
47,
59,
65,
2260,
20,
44,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Infopath doesn't render background colors/pictures w/ Outlook Task/Sharepoint
===
I am using Infopath forms to collect information to trigger my Windows Workflow sitting on Sharepoint 2007. The Infopath forms have logo's and branding which only show up on the Sharepoint portal but the infopath forms which are emailed when tasks are created during the workflow look different as in the background colors (Infopath Theme) and jpeg's are not there...web form compatibility was for checked in all appropriate places....any ideas? | 0 | [
2,
15404,
8353,
1437,
22,
38,
16535,
2395,
5268,
118,
25602,
18,
619,
118,
19837,
3005,
118,
16608,
3132,
800,
3726,
3726,
31,
589,
568,
15404,
8353,
1997,
20,
5543,
676,
20,
7286,
51,
1936,
170,
9990,
1805,
27,
1891,
3132,
624,
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... |
MySQL select statement
===
Is it possible to do a SELECT statement with a predetermined order, ie. selecting IDs 7,2,5,9 and 8 **and returning them in that order**, based on nothing more than the ID field?
Statements SELECT id FROM table WHERE id in (7,2,5,9,8); and SELECT id FROM table WHERE id in (8,2,5,9,7); both return them in the same order. | 0 | [
2,
51,
18,
22402,
5407,
3331,
800,
3726,
3726,
25,
32,
938,
20,
107,
21,
5407,
3331,
29,
21,
782,
22213,
389,
15,
13,
660,
9,
20764,
13,
9178,
453,
15,
135,
15,
264,
15,
518,
17,
469,
13,
1409,
290,
2485,
105,
19,
30,
389,
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... |
Run Pylons controller as separate app?
===
I have a Pylons app where I would like to move some of the logic to a separate batch process. I've been running it under the main app for testing, but it is going to be doing a lot of work in the database, and I'd like it to be a separate process that will be running in the background constantly. The main pylons app will submit jobs into the database, and the new process will do the work requested in each job.
How can I launch a controller as a stand alone script?
I currently have:
from warehouse2.controllers import importServer
importServer.runServer(60)
and in the controller file, but not part of the controller class:
def runServer(sleep_secs):
try:
imp = ImportserverController()
while(True):
imp.runImport()
sleepFor(sleep_secs)
except Exception, e:
log.info("Unexpected error: %s" % sys.exc_info()[0])
log.info(e)
But starting ImportServer.py on the command line results in:
2008-09-25 12:31:12.687000 Could not locate a bind configured on mapper Mapper|I
mportJob|n_imports, SQL expression or this Session | 0 | [
2,
485,
29262,
18,
9919,
28,
1725,
4865,
60,
800,
3726,
3726,
31,
57,
21,
29262,
18,
4865,
113,
31,
83,
101,
20,
780,
109,
16,
14,
7085,
20,
21,
1725,
13064,
953,
9,
31,
22,
195,
74,
946,
32,
131,
14,
407,
4865,
26,
4431,
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... |
Where do you do your validation? model, controller or view
===
Where do you put user input validation in a web form application?
1. View: Javascript client side
1. Controller: Server side language (C#...)
1. Model: Database (stored procedures or dependencies)
I think there is validation required by each level:
1. Did the user input a sane value
- are dates actual dates, are numbers actualy numbers ...
1. Do all of the checks in 1. again plus checks for malicious attacks(IE XSS or SQL injection)
- The checks done in 1. are mianly to avoid a server round trip when the user makes a mistake.
- Since they are done on the client side in javascript, you can't trust that they were run. Validating these values again will stop some malicious attacks.
1. Are dependencies met (ie. did the user add a comment to a valid question)
- A good interface makes these very hard to violate. If something is caught here, something went very wrong.
[inspired by [this response][1]]
[1]: http://stackoverflow.com/questions/134253/how-many-of-you-do-3-tier-design#134300 | 0 | [
2,
113,
107,
42,
107,
154,
27999,
60,
1061,
15,
9919,
54,
1418,
800,
3726,
3726,
113,
107,
42,
442,
4155,
6367,
27999,
19,
21,
2741,
505,
3010,
60,
137,
9,
1418,
45,
8247,
8741,
6819,
270,
137,
9,
9919,
45,
8128,
270,
816,
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... |
How do I use RegEx to sanitize numerical input of dollar values?
===
I have a form in which people will be entering dollar values.
Possible inputs:<br>
$999,999,999.99<br>
999,999,999.99<br>
999999999<br>
99,999<br>
$99,999<br>
The user can enter a dollar value however they wish. I want to read the inputs as floats so I can total them.
If there is a built-in PHP function for this and I don't have to use RegEx that is fine with me as well. | 0 | [
2,
184,
107,
31,
275,
7953,
1706,
20,
523,
242,
2952,
16010,
6367,
16,
9311,
4070,
60,
800,
3726,
3726,
31,
57,
21,
505,
19,
56,
148,
129,
44,
4604,
9311,
4070,
9,
938,
6367,
18,
45,
1,
5145,
1,
16888,
3483,
15,
23170,
15,
231... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 add html/styling to the author profile on wordpress?
===
I have added author pages to my company blog recently. Although I've no trouble pulling through relevant fields to populate the page - e.g. Author Name, User-profile, etc, I would really like to be able to add a small amount of html to the user-profile. Currently the whole thing is just dumped onto the author profile page - you can [view my sample here][1].
Although we can add anchors, it seems to strip out other html tags. I presume this is some sort of security feature to prevent external users from adding malicious code. However, membership isn't open, and we could really do to be able to add a bit more structure to the text.
[1]: http://www.setfiremedia.com/blog/author/samsutton | 0 | [
2,
184,
107,
42,
3547,
13,
15895,
118,
9433,
802,
20,
14,
1314,
5296,
27,
833,
5890,
60,
800,
3726,
3726,
31,
57,
905,
1314,
4434,
20,
51,
237,
8146,
1989,
9,
419,
31,
22,
195,
90,
2572,
3303,
120,
7480,
2861,
20,
1675,
12383,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C#/.net ActiveDirectory Resources
===
I have recently assumed maintenance of an app that performs a lot of ActiveDirectory-related tasks, both querying and updating.
I have the existing code to look at of course, but I was also curious if anyone had any good links for AD manipulation through C# and .Net, or pointers to any good books I can convince my boss to buy. | 0 | [
2,
272,
5910,
118,
9,
2328,
1348,
10197,
93,
2566,
800,
3726,
3726,
31,
57,
1989,
3632,
5010,
16,
40,
4865,
30,
11563,
21,
865,
16,
1348,
10197,
93,
8,
6203,
8674,
15,
156,
25597,
68,
17,
71,
43,
1880,
9,
31,
57,
14,
3149,
179... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Anyone ever tried to develop in C or C++ for Blackberry platforms?
===
Every indication I have, based on my experience in embedded computing is that doing something like this would require expensive equipment to get access to the platform (ICE debuggers, JTAG probes, I2C programmers, etc, etc), but I've always wondered if some ambitious hacker out there has found a way to load native code on a Blackberry device. Anyone? | 0 | [
2,
1276,
462,
794,
20,
2803,
19,
272,
54,
272,
20512,
26,
27367,
6843,
60,
800,
3726,
3726,
352,
11290,
31,
57,
15,
432,
27,
51,
1496,
19,
12138,
10626,
25,
30,
845,
301,
101,
48,
83,
4077,
5381,
2181,
20,
164,
1381,
20,
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... |
How do I submit multiple models in Struts 2?
===
I have a JSP that allows users to dynamically create additional form fields to create multiple objects. Perhaps I want to allow users to be able to submit as many line items as they want when submitting an invoice form.
How do I create a Struts 2 Action that will be able to take in an ArrayList populated with objects created from those dynamically generated fields. | 0 | [
2,
184,
107,
31,
12298,
1886,
2761,
19,
18316,
18,
172,
60,
800,
3726,
3726,
31,
57,
21,
487,
3401,
30,
2965,
3878,
20,
7782,
1326,
1600,
1351,
505,
2861,
20,
1600,
1886,
3916,
9,
1774,
31,
259,
20,
1655,
3878,
20,
44,
777,
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... |
Mobile Capability for meta tags render en ASP.NET Mobile
===
Anybody knows what is mobile capability for render Meta Tags for each adapter?
I am using Marg.Wurfl to detect mobile device, and it maps wurfl capabilities to mobile capabilities, but it does not render meta tags.I have found <strong>requiresXhtmlCssSuppression</strong> capability in ASP.NET Mobile Controls XHTML Adapter Source, but it doesn´t work to me.
Thx in advance,
| 0 | [
2,
3241,
11480,
26,
7618,
3383,
18,
16535,
1957,
28,
306,
9,
2328,
3241,
800,
3726,
3726,
11181,
3620,
98,
25,
3241,
11480,
26,
16535,
7618,
3383,
18,
26,
206,
9924,
106,
60,
31,
589,
568,
19996,
9,
21188,
4372,
20,
9092,
3241,
36... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What's the best free IDE for learning smalltalk?
===
What do you think is a good IDE for learning SmallTalk? I'll only be using it as a hobby, so it has to be free. | 0 | [
2,
98,
22,
18,
14,
246,
551,
13,
3448,
26,
2477,
284,
9718,
60,
800,
3726,
3726,
98,
107,
42,
277,
25,
21,
254,
13,
3448,
26,
2477,
284,
9718,
60,
31,
22,
211,
104,
44,
568,
32,
28,
21,
18229,
15,
86,
32,
63,
20,
44,
551,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Any performance impact in Oracle for using LIKE 'string' vs = 'string'?
===
This
SELECT * FROM SOME_TABLE WHERE SOME_FIELD LIKE '%some_value%';
is slower than this
SELECT * FROM SOME_TABLE WHERE SOME_FIELD = 'some_value';
but what about this?
SELECT * FROM SOME_TABLE WHERE SOME_FIELD LIKE 'some_value';
My testing indicates the second and third examples are exactly the same. If that's true, my question is, why ever use "=" ? | 0 | [
2,
186,
956,
2261,
19,
15759,
26,
568,
101,
13,
22,
11130,
22,
4611,
800,
13,
22,
11130,
22,
60,
800,
3726,
3726,
48,
5407,
1637,
37,
109,
1,
5924,
113,
109,
1,
1109,
101,
13,
22,
11881,
3220,
1,
15165,
11881,
22,
73,
25,
1408... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Refactoring global to local. Should they be static or not?
===
I'm refactoring "spaghetti code" C module to work in multitasking (RTOS) environment.
Now, there are very long functions and many unnecessary global variables.
When I try to replace global variables that exists only in one function with locals, I get into dilemma. Every global variable is behave like local "static" - e.g. keep its value even you exit and re-enter to the function.
For multitasking "static" local vars are worst from global. They make the functions non reentered.
There are a way to examine if the function is relay on preserving variable value re-entrancing without tracing all the logical flow? | 0 | [
2,
302,
17455,
68,
2062,
20,
375,
9,
378,
59,
44,
12038,
54,
52,
60,
800,
3726,
3726,
31,
22,
79,
302,
17455,
68,
13,
7,
3401,
6603,
8109,
1797,
7,
272,
12613,
20,
170,
19,
1889,
6922,
1581,
13,
5,
139,
262,
18,
6,
2307,
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... |
Delphi Popup Menu Checks
===
I am using a popup menu in Delphi. I want to use it in a "radio group" fashion where if the user selects an item it is checked and the other items are not checked. I tried using the AutoCheck property, but this allows multiple items to be checked. Is there a way to set the popup menu so that only one item can be checked? | 0 | [
2,
23030,
1675,
576,
11379,
16602,
800,
3726,
3726,
31,
589,
568,
21,
1675,
576,
11379,
19,
23030,
9,
31,
259,
20,
275,
32,
19,
21,
13,
7,
11129,
214,
7,
3161,
113,
100,
14,
4155,
5407,
18,
40,
9101,
32,
25,
6505,
17,
14,
89,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Where to put controller parent class in CakePHP?
===
I have two controllers which share most of their code (but must be, nonetheless, different controllers). The obvious solution (to me, at least) is to create a class, and make the two controllers inherit from it. The thing is... where to put it? Now I have it in app_controller.php, but it's kind of messy there. | 0 | [
2,
113,
20,
442,
9919,
4766,
718,
19,
8390,
26120,
60,
800,
3726,
3726,
31,
57,
81,
9919,
18,
56,
1891,
127,
16,
66,
1797,
13,
5,
811,
491,
44,
15,
9964,
15,
421,
9919,
18,
6,
9,
14,
4674,
4295,
13,
5,
262,
55,
15,
35,
639... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Source Control for multiple projects/solutions with shared libraries
===
I am currently working on a project to convert a number of Excel VBA powered workbooks to VSTO solutions. All of the workbooks will share a number of class libraries and third party assemblies, in fact most of the work is done in the class libraries. I currently have my folder structure laid out like this.
Base
Libraries
Assemblies
Workbooks
Workbook1
Workbook2
Each of the workbooks will be its own solution, and the workbook solutions just reference the assemblies in the folder structure. My question is how would you lay out the source control? Would you start the repository at the base? Or would you create a repository for each workbook solution? Would you rearrange the folders?
Now that we have the initial development done, we're about to have a bunch of outside developers come on to the project to helps us convert the rest of the workbooks and I really like the idea of them being able to check out from the base directory and having all of the dependencies ready to go. I also worry that there are other concerns that come with having 20+ solutions/projects under one source control repository.
I want everything to be as simple as possible for people joining the project but I don't want to sacrifice long term usability. In my mind I've been going back and forth, what's simpler one repository or one repository per solution?
I'd appreciate and insight you have, because I'm fresh out. | 0 | [
2,
1267,
569,
26,
1886,
2314,
118,
18,
18687,
3309,
18,
29,
2592,
8649,
800,
3726,
3726,
31,
589,
871,
638,
27,
21,
669,
20,
8406,
21,
234,
16,
20700,
566,
969,
7462,
170,
13828,
20,
4611,
262,
6776,
9,
65,
16,
14,
170,
13828,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 serialize an object into a string
===
I am able to serialize an object into a file and then restore it again as is shown in the next code snippet. I would like to serialize the object into a string and store into a database instead. Can anyone help me?
LinkedList<Diff_match_patch.Patch> patches = // whatever...
FileOutputStream fileStream = new FileOutputStream("foo.ser");
ObjectOutputStream os = new ObjectOutputStream(fileStream);
os.writeObject(patches1);
os.close();
FileInputStream fileInputStream = new FileInputStream("foo.ser");
ObjectInputStream oInputStream = new ObjectInputStream(fileInputStream);
Object one = oInputStream.readObject();
LinkedList<Diff_match_patch.Patch> patches3 = (LinkedList<Diff_match_patch.Patch>) one;
os.close(); | 0 | [
2,
184,
20,
5956,
2952,
40,
3095,
77,
21,
3724,
800,
3726,
3726,
31,
589,
777,
20,
5956,
2952,
40,
3095,
77,
21,
3893,
17,
94,
8454,
32,
188,
28,
25,
1721,
19,
14,
328,
1797,
13,
29061,
9,
31,
83,
101,
20,
5956,
2952,
14,
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... |
Is there a difference between 'valid xml' and 'well formed xml'?
===
I wasnt aware of a difference, but a coworker says there is, although he can't back it up. What's the difference if any? | 0 | [
2,
25,
80,
21,
2841,
128,
13,
22,
18506,
43,
23504,
22,
17,
13,
22,
854,
843,
23504,
22,
60,
800,
3726,
3726,
31,
2672,
3854,
16,
21,
2841,
15,
47,
21,
326,
22560,
898,
80,
25,
15,
419,
24,
92,
22,
38,
97,
32,
71,
9,
98,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
fork() as an argument
===
Usually when I need to fork in C, I do something like this:
pid_t p = fork();
if(p == 0) { /* do child stuff */ }
else { /* do parent stuff and pray there wasn't an error */ }
It occured to me that I could ditch the extra variable and use:
if(fork() == 0) { /* child */ }
else { /* parent/pray */ }
Improper error handling aside, (why) does this work/not work? | 0 | [
2,
8777,
5,
6,
28,
40,
5476,
800,
3726,
3726,
951,
76,
31,
376,
20,
8777,
19,
272,
15,
31,
107,
301,
101,
48,
45,
13,
11031,
1,
38,
351,
800,
8777,
5,
6,
73,
100,
5,
306,
800,
3726,
713,
6,
13,
1,
13,
118,
2483,
107,
850... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Microsoft.ApplicationBlocks.Data.ODBCHelper ?
===
I've found mention of a data application block existing for ODBC, but can't seem to find it anywhere. If i didn't have a copy of the Access DB application block I wouldn't believe it ever existed either.
Anyone know where to download either the DLL or the code-base from?
Thanks,
Brian Swanson | 0 | [
2,
7099,
9,
2552,
20669,
12048,
18,
9,
18768,
9,
111,
9007,
8856,
1432,
13,
60,
800,
3726,
3726,
31,
22,
195,
216,
3794,
16,
21,
1054,
3010,
1921,
3149,
26,
12340,
7229,
15,
47,
92,
22,
38,
2260,
20,
477,
32,
4922,
9,
100,
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... |
Show weights in JgraphT
===
I have implemented this Graph:
ListenableDirectedWeightedGraph<String, MyWeightedEdge> g =
new ListenableDirectedWeightedGraph<String, MyWeightedEdge>(
MyWeightedEdge.class);
in order to show what the class name says, a simple listenable directed weighted graph. I want to change the label of the edges and instead of the format
return "(" + source + " : " + target + ")";
I want it to show the weight of the edge. I realise that all actions on the nodes, e.g. the getEdgesWeight() method, are delegated from the graph and not the edge. How can I show the weight of the edge? Do I have to pass in the Graph to the edge somehow?
Any help is appreciated.
Cheers,
Christos | 0 | [
2,
298,
1763,
18,
19,
487,
9614,
38,
800,
3726,
3726,
31,
57,
6807,
48,
7210,
45,
3834,
579,
14147,
8696,
69,
9614,
1,
11130,
15,
51,
8696,
69,
8840,
1,
489,
800,
78,
3834,
579,
14147,
8696,
69,
9614,
1,
11130,
15,
51,
8696,
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... |
Getting software version numbers right. v1.0.0.1
===
I distribute software online, and always wonder if there is a proper way to better define version numbers.
Let's assume A.B.C.D in the answers. When do you increase each of the components?
Do you use any other version number tricks such as D mod 2 == 1 means it is an in house release only?
Do you have beta releases with their own version numbers, or do you have beta releases per version number? | 0 | [
2,
1017,
2306,
615,
2116,
193,
9,
566,
165,
9,
387,
9,
387,
9,
165,
800,
3726,
3726,
31,
14751,
2306,
2087,
15,
17,
550,
2666,
100,
80,
25,
21,
4119,
161,
20,
574,
9267,
615,
2116,
9,
408,
22,
18,
7158,
21,
9,
220,
9,
150,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ASPNET TreeView Expanded Node Style
===
Does anyone know how in ASP.Net's TreeView control, to have a custom style applied to an Expanded node? I have many root nodes and want the Expanded nodes to have a different background. | 0 | [
2,
28,
306,
2328,
1541,
4725,
2766,
15421,
1034,
800,
3726,
3726,
630,
1276,
143,
184,
19,
28,
306,
9,
2328,
22,
18,
1541,
4725,
569,
15,
20,
57,
21,
5816,
1034,
2435,
20,
40,
2766,
15421,
60,
31,
57,
151,
5900,
16272,
17,
259,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Integrate StackOverflow into IDEs?
===
Okay, this is just a crazy idea I have. StackOverflow looks very structured and integrable into development applications. So would it be possible, even useful, to have a StackOverflow plugin for, say, Eclipse?
Which features of StackOverflow would you like to have directly integrated into your IDE so you can use it "natively" without changing to a browser?
| 0 | [
2,
18399,
7566,
2549,
9990,
77,
13,
8153,
60,
800,
3726,
3726,
1705,
15,
48,
25,
114,
21,
3328,
882,
31,
57,
9,
7566,
2549,
9990,
1879,
253,
17784,
17,
13,
12370,
579,
77,
522,
3767,
9,
86,
83,
32,
44,
938,
15,
166,
4811,
15,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I know I reached a file's maximum size when using ofstream?
===
While writing a file using ofstream, how do I know when the file's size has reached the OS' maximum file size - more specifically linux's maximum file size - ?? | 0 | [
2,
184,
107,
31,
143,
31,
664,
21,
3893,
22,
18,
2979,
1072,
76,
568,
16,
11260,
60,
800,
3726,
3726,
133,
1174,
21,
3893,
568,
16,
11260,
15,
184,
107,
31,
143,
76,
14,
3893,
22,
18,
1072,
63,
664,
14,
13,
759,
22,
2979,
38... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can you suggest the best screencast available to learn CSS?
===
It should be hands-on, complete, targeted to programmers and detailed on layout tecniques!
Thanks! | 0 | [
2,
92,
42,
5601,
14,
246,
2324,
6146,
904,
20,
2484,
272,
18,
18,
60,
800,
3726,
3726,
32,
378,
44,
473,
8,
218,
15,
1279,
15,
9536,
20,
17968,
18,
17,
6036,
27,
9106,
13,
9568,
889,
13655,
187,
3669,
187,
3,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Is it frowned upon to release your software with > 1 first commercial version number?
===
Is it frowned upon to release your software with a version number high than 1?
For example, some **non** tech-savy people might see a competitor's product with a higher version number as meaning my software is not as good. | 0 | [
2,
25,
32,
6594,
685,
20,
830,
154,
2306,
29,
13,
1,
137,
64,
1439,
615,
234,
60,
800,
3726,
3726,
25,
32,
6594,
685,
20,
830,
154,
2306,
29,
21,
615,
234,
183,
119,
137,
60,
26,
823,
15,
109,
13,
1409,
3951,
1409,
6145,
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... |
c++ exception : throwing std::string
===
I would like to throw an exception when my C++ methods encounter something weird and can't recover. Is it OK to throw a std::string pointer?
Here's what I was looking forward to doing:
void Foo::Bar(){
if(!QueryPerformanceTimer(&m_baz)){
throw new std::String("it's the end of the world!");
}
}
void Foo:Caller(){
try{
this->Bar();// should throw
}catch(std::String* caught){ // not quite sure the syntax is ok here...
std::cout<<"Got "<<caught<<std::endl;
}
}
| 0 | [
2,
272,
20512,
5391,
13,
45,
6033,
354,
43,
45,
45,
11130,
800,
3726,
3726,
31,
83,
101,
20,
3814,
40,
5391,
76,
51,
272,
20512,
3195,
7007,
301,
5455,
17,
92,
22,
38,
7635,
9,
25,
32,
5854,
20,
3814,
21,
354,
43,
45,
45,
11... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.