unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Protected Memory Violation calling FORTRAN DLL from C#
===
I am trying to call out to a legacy dll compiled from FORTRAN code. I am new to Interop, but I've read some articles on it and it seems like my case should be fairly straightforward.
The method I really want to call has a complex method signature, but I can't even call this simple GetVersion method without getting a protected memory violation.
Here's my DllImport code:
[DllImport("GeoConvert.dll",
EntryPoint="_get_version@4",
CallingConvention=CallingConvention.StdCall)]
public static extern void GetGeoConvertVersion([MarshalAs(UnmanagedType.LPStr, SizeConst=8)]
ref string version);
Here's the FORTRAN code:
SUBROUTINE GetVer( VRSION )
C
!MS$DEFINE MSDLL
!MS$IF DEFINED (MSDLL)
ENTRY Get_Version (VRSION)
!MS$ATTRIBUTES DLLEXPORT,STDCALL :: Get_Version
!MS$ATTRIBUTES REFERENCE :: VRSION
!MS$ENDIF
!MS$UNDEFINE MSDLL
C
CHARACTER*8 VRSION
C
VRSION = '1.0a_FhC'
C
RETURN
END
Here's my unit test that fails:
[Test]
public void TestGetVersion()
{
string version = "";
LatLonUtils.GetGeoConvertVersion(ref version);
StringAssert.IsNonEmpty(version);
}
Here's the error message I get:
System.AccessViolationException
Message: Attempted to read or write protected memory.
This is often an indication that other memory is corrupt. | 0 | [
2,
3803,
1912,
12120,
2555,
26,
17685,
13,
43,
211,
37,
272,
5910,
800,
3726,
3726,
31,
589,
749,
20,
645,
70,
20,
21,
7780,
13,
43,
211,
9316,
37,
26,
17685,
1797,
9,
31,
589,
78,
20,
1480,
2594,
15,
47,
31,
22,
195,
1302,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Objective: no stored procedures, no triggers
===
We have been working on a complex database and client interface for the last 18 months. We are regularly adding new functionnalities to this application, and it is now used by tens of users on a daily basis in all our offices, including sites and overseas. This is just to tell you it is a REAL application with a REAL database.
Until now, we still did not have to write any stored procedures, except on a temporary basis to solve minor issues between client versions and updated database model (where the old client version will not properly update the newly created field, until everybody installs the newest version).
In the same way, we still did not need any triggers. In fact, the only SPs and triggers are the system ones, or the ones added for replication purpose.
I have the strange feeling that SPs and Triggers are mainly used to compensate for database design defaults and/or attempts to bypass database design rules, when developers consider that database optimisation has to oppose database normalisation.
The problem is that these tools are time-consuming (for both development or maintenance). Each developer shall then be very carefull using them, keeping in mind that they are the most "expensive" items to maintain in a database.
Could we consider that having none or few stored procedures / triggers in a database is a good indication of its normalisation level and/or its code maintenance cost? | 0 | [
2,
7038,
45,
90,
8214,
8876,
15,
90,
7286,
18,
800,
3726,
3726,
95,
57,
74,
638,
27,
21,
1502,
6018,
17,
6819,
6573,
26,
14,
236,
474,
818,
9,
95,
50,
4217,
4721,
78,
1990,
5025,
3808,
20,
48,
3010,
15,
17,
32,
25,
130,
147,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 load string of array in to combobox faster in MFC?
===
I have an array of 1000 strings how to load them in to combo box faster like kind of dumping in to rather than iterating it? | 0 | [
2,
184,
20,
6305,
3724,
16,
7718,
19,
20,
22621,
5309,
4233,
19,
307,
7061,
60,
800,
3726,
3726,
31,
57,
40,
7718,
16,
6150,
7887,
184,
20,
6305,
105,
19,
20,
22621,
1649,
4233,
101,
825,
16,
26523,
19,
20,
864,
119,
32,
106,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Merging files in Sourcesafe
===
All,
I currently have two projects that are under SourceSafe that I am unable to migrate to our SVN server for a number of reasons.
However I am currently in the process of trying to merge fixes from one project into the other.
I know Sourcesafe isn't the best at this but the process I am going through just now is particularly tedious
1. Compare the files identyfying the
changes I need to merge.
2. copy and
paste the relevant changes into the
desired project
3. Test
4. Commit
This doesn't seem too bad but with multiple changes and multiple files that need reviewed this is becoming a nightmare.
Does anyone have any other methods to carry this out??
| 0 | [
2,
18842,
6488,
19,
1267,
18166,
800,
3726,
3726,
65,
15,
31,
871,
57,
81,
2314,
30,
50,
131,
1267,
18166,
30,
31,
589,
2343,
20,
22985,
20,
318,
13,
18,
16578,
8128,
26,
21,
234,
16,
2932,
9,
207,
31,
589,
871,
19,
14,
953,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Ignored columns using vb6 to exctract from excel
===
I am trying to extract a table of values from an excel (2003) spreadsheet using vb6, the result of which needs to be stored in a (adodb) recordset. The table looks like this:
<pre>
Name Option.1 Option.2 Option.3 Option.4 Option.5 Option.6
Name1 2 3 4
Name2 2 3 4
Name3 2 3 4
Name4 2 3 4
Name5 2 3 4
Name6 2 3 4
Name7 2 3 4
Name8 2 3 4
Name9 2 3 4 5 6 7
</pre>
Upon connecting and executing the query "`SELECT * FROM [Sheet1$]`" or even a column-specific, "`SELECT [Option#6] FROM [Sheet1$]`"[1] and looping through the results, I am given `Null` values for the row `Name9`, `Option.4` --> `Option.6` rather than the correct values 5, 6, and 7. It seems the connection to the spreadsheet is using a "best guest" of deciding what the valid table limits are, and only takes a set number of rows into account.
To connect to the spreadsheet, I have tried both connection providers `Microsoft.Jet.OLEDB.4.0` and `MSDASQL` and get the same problem.
Here are the connection settings I use:
Set cn = New ADODB.Connection
With cn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source=" & filePath & ";Extended Properties=Excel 8.0;"
- - - - OR - - - -
.Provider = "MSDASQL"
.ConnectionString = "Driver={Microsoft Excel Driver (*.xls)};" & _
"DBQ=" & filePath & ";MaxScanRows=0;"
.CursorLocation = adUseClient
.Open
End With
Set rsSelects = New ADODB.Recordset
Set rsSelects = cn.Execute("SELECT [Option#5] FROM " & "[" & strTbl & "]")
This problem only occurs when there are more than 8 rows (excluding the column names), and I have set `MaxScanRow=0` for the `MSDASQL` connection, but this has produced the same results.
Notable project references I have included are:
- MS ActiveX Data Objects 2.8 Library
- MS ActiveX Data Objects Recordset 2.8 Library
- MS Excel 11.0 Object Library
- MS Data Binding Collection VB 6.0 (SP4)
Any help in this matter would be very appreciated!
[1] For some reason, when including a decimal point in the column name, it is interpreted as a #. | 0 | [
2,
5424,
7498,
568,
13,
20468,
379,
20,
1396,
150,
19915,
37,
20700,
800,
3726,
3726,
31,
589,
749,
20,
10962,
21,
859,
16,
4070,
37,
40,
20700,
13,
5,
3325,
6,
1789,
17627,
568,
13,
20468,
379,
15,
14,
829,
16,
56,
2274,
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... |
Protocol conversion / normalization: Biztalk, alternatives?
===
We have a need to take dozens of different protocols from systems such as security systems, fire alarms, camera systems etc.. and integrate them into a single common protocol.
I would like this to be a messaging server that many systems could subscribe to and or communicate through.
- polling and non-polling "drivers" (protocol converters)
- handle RS232 / RS485 / tcp
- programmable "drivers" in a managed language like Java or C#
- rules engine capability
Does biztalk fit this?
Are there open source alternatives?
Is there a Java / JEE way to do this?
At one end the system would be a SCADA system at the other is is kind of a middleware / messaging server.
Any thoughts on the best way to proceed would be appreciated. I know that there will be a considerable amount of programming involved on the driver side, however as tempted as I am, building the whole system from scratch would not be appropriate.
| 0 | [
2,
8494,
6263,
13,
118,
1826,
1829,
45,
1732,
380,
9718,
15,
2676,
18,
60,
800,
3726,
3726,
95,
57,
21,
376,
20,
247,
10273,
16,
421,
19957,
37,
1242,
145,
28,
1221,
1242,
15,
535,
6490,
18,
15,
3336,
1242,
2722,
9,
9,
17,
183... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
.NET DataTable skips first row on Load(DataReader)
===
I'm trying to populate a DataTable, to build a LocalReport, using the following:<br>
MySqlCommand cmd = new MySqlCommand();
cmd.Connection = new MySqlConnection(Properties.Settings.Default.dbConnectionString);
cmd.CommandType = CommandType.Text;
cmd.CommandText = "SELECT ... LEFT JOIN ... WHERE ..."; /* query snipped */
// prepare data
dataTable.Clear();
cn.Open();
// fill datatable
dt.Load(cmd.ExecuteReader());
// fill report
rds = new ReportDataSource("InvoicesDataSet_InvoiceTable",dt);
reportViewerLocal.LocalReport.DataSources.Clear();
reportViewerLocal.LocalReport.DataSources.Add(rds);
At one point I noticed that the report was incomplete and it was missing at least one record. I've changed a few conditions so that the query would return exactly two rows and... <b>surprise</b>: The report shows only one row instead of two. I've tried to debug it to find where the problem is and I got stuck at
dt.Load(cmd.ExecuteReader());
When I've noticed that the `DataReader` contains two records but the `DataTable` contains only one. By accident, I've added an `ORDER BY` clause to the query and noticed that this time the report showed correctly.<br><br>
Apparently, the DataReader contains two rows but the DataTable only reads both of them if the SQL query string contains an `ORDER BY` (otherwise it skips the first one). Can anyone explain why this is happening and how it can be fixed?
<br><br><br>Thanks,<br>Tom | 0 | [
2,
13,
9,
2328,
1054,
5924,
12532,
18,
64,
3131,
27,
6305,
5,
18768,
10647,
106,
6,
800,
3726,
3726,
31,
22,
79,
749,
20,
1675,
12383,
21,
1054,
5924,
15,
20,
1895,
21,
375,
17437,
15,
568,
14,
249,
45,
1,
5145,
1,
51,
18,
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... |
Geographical position from Java mobile application?
===
Is there a way of programmatically determining a rough geographical position of a mobile phone using J2ME application, for example determining the current cell? This question especially applies to non-GPS enabled devices.
I am not looking for a set of geographical coordinates, but an ability for a user to define location specific software behaviours.
Solution for any hardware will be highly appreciated; however the more generic a solution is — the better. Many thanks! | 0 | [
2,
10490,
649,
37,
8247,
3241,
3010,
60,
800,
3726,
3726,
25,
80,
21,
161,
16,
625,
6732,
1326,
13521,
21,
4182,
10490,
649,
16,
21,
3241,
1132,
568,
487,
135,
790,
3010,
15,
26,
823,
13521,
14,
866,
1667,
60,
48,
1301,
1118,
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... |
MS Dynamics AX / AXAPTA - Where is the code that prevents reprint of payment advices of unposted cheques?
===
We want to reprint a payment advice, even before it is posted. The report
BankPaymAdviceCheque should be able to do this but only prints advices for
already posted cheques. The report's dialog, however, allows you to choose
unposted ones as well.
No matter how I searched in the code, I cannot find
the bit that prevents unposted remittances from being re-printed -
Help would be greatly appreciated?
| 0 | [
2,
4235,
12289,
21,
396,
13,
118,
21,
6791,
21741,
13,
8,
113,
25,
14,
1797,
30,
2501,
18,
21727,
16,
7582,
4978,
18,
16,
367,
6962,
69,
28020,
18,
60,
800,
3726,
3726,
95,
259,
20,
21727,
21,
7582,
4978,
15,
166,
115,
32,
25,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to refactor: split a class into two which communicate via an interface
===
I am just embarking on my first large-scale refactor, and need to split an (unfortunately large) class into two, which then communicate only via an interface. (My Presenter has turned out to be a Controller, and needs to split GUI logic from App logic). Using C# in VisualStudio 2008 and Resharper, what is the easiest way to achieve this?
What I am going to try is
a) Collect the members for the new class and "extract new class"
b) clean up the resulting mess
c) "Extract Interface"
d) chase down any references to the class and convert them to interface references
but I have never done this before, and wonder whether anyone knows any good tips or gotchas before I start ripping everything apart...
Thanks! | 0 | [
2,
184,
20,
302,
17455,
45,
2132,
21,
718,
77,
81,
56,
8709,
1197,
40,
6573,
800,
3726,
3726,
31,
589,
114,
20116,
68,
27,
51,
64,
370,
8,
5093,
302,
17455,
15,
17,
376,
20,
2132,
40,
13,
5,
1020,
6469,
1020,
1373,
102,
370,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 access a file with the least amount of locking
===
in my application (c# 3.5) there are various processes accessing a single xml file (read and write) very frequently. i'm looking for the best/fastest way to read and create/append the file with the least amount of locking. caching the files data and flushing new content periodically is not an option, since the data is critical. | 0 | [
2,
184,
20,
1381,
21,
3893,
29,
14,
639,
2006,
16,
17538,
800,
3726,
3726,
19,
51,
3010,
13,
5,
150,
5910,
203,
9,
264,
6,
80,
50,
617,
5102,
1381,
68,
21,
345,
23504,
3893,
13,
5,
10647,
17,
2757,
6,
253,
3086,
9,
31,
22,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I prevent a DataGridView from sharing rows?
===
I've made a custom DataGridViewCell that displays a custom control instead of the cell; but if the DataGridView uses shared rows, then the custom control instance is also shared, so you get strange behaviour (for example, hovering over buttons highlights all the buttons). Also, I can't access the DataGridViewCell.Selected property, so I don't know what colour to paint the row.
How do I prevent a DataGridView from sharing rows? I know I can add the rows using the Rows.Add(object[]) override, but then the first row is still shared (i.e. has index -1) so the problem with colours still applies.
I need to be able to tell the DataGridView not to share a row containing a custom cell. Can that be done with attributes? Can it be done at all? | 0 | [
2,
184,
107,
31,
2501,
21,
1054,
16375,
4725,
37,
6126,
11295,
60,
800,
3726,
3726,
31,
22,
195,
117,
21,
5816,
1054,
16375,
4725,
9725,
30,
9412,
21,
5816,
569,
700,
16,
14,
1667,
73,
47,
100,
14,
1054,
16375,
4725,
2027,
2592,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 add exif data to an image?
===
On our site, we get a large amount of photos uploaded from various sources.
In order to keep the file sizes down, we strip all [exif data](http://en.wikipedia.org/wiki/Exif) from the source using [mogrify](http://www.imagemagick.org/www/mogrify.html):
mogrify -strip image.jpg
What we'd like to be able to do is to insert some basic exif data (Copyright Initrode, etc) back onto this new "clean" image, but I can't seem to find anything in the docs that would achieve this.
Has anybody any experience of doing this?
If it can't be done through imagemagick, a PHP-based solution would be the next best thing!
Thanks. | 0 | [
2,
184,
107,
31,
3547,
1396,
821,
1054,
20,
40,
1961,
60,
800,
3726,
3726,
27,
318,
689,
15,
95,
164,
21,
370,
2006,
16,
7064,
23782,
37,
617,
2662,
9,
19,
389,
20,
643,
14,
3893,
13403,
125,
15,
95,
4998,
65,
636,
1706,
821,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Create A 'Two-Sided' Unique Index On Two Fields?
===
How can I efficiently create a unique index on two fields in a table like this:
create table t (a integer, b integer);
where any unique combination of two different numbers cannot appear more than once on the same row in the table.
In order words if a row exists such that a=1 and b=2, another row cannot exist where a=2 and b=1 or a=1 and b=2. In other words two numbers cannot appear together more than once in any order.
I have no idea what such a constraint is called, hence the 'two-sided unique index' name in the title. | 0 | [
2,
184,
20,
1600,
21,
13,
22,
3734,
8,
14246,
22,
2619,
4348,
27,
81,
2861,
60,
800,
3726,
3726,
184,
92,
31,
20519,
1600,
21,
2619,
4348,
27,
81,
2861,
19,
21,
859,
101,
48,
45,
1600,
859,
13,
38,
13,
5,
58,
13820,
15,
334,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Creating multi-platform CDs for software distribution
===
This is not strictly programming related, but I hope still relevant.
I'm working on a project which is written in Java and intended for use on PCs and Macs. It will be distributed on CD (and perhaps DVD, eventually). Our intended audience is decidedly non-technical and, as such, it's important the CD "just work" when it's loaded.
This is not itself difficult. For Windows, we can setup Autorun to automatically launch the app and, for Mac, we can use special folder formatting to make it clear what the user should do.
The hitch is that we would like to ship one disc which could be used on either a Mac or a PC. I have seen some [rather byzantine methods][1] of accomplishing this with specific, proprietary software. Hopefully, this is not the only way to accomplish this.
So my question: **How do I create a CD to distribute software so that the CD will function, perform or appear "native" when opened on both a Mac and a PC?**
[1]: http://davidseah.com/blog/creating-a-hybrid-cd-rom-with-toast-7/ | 0 | [
2,
2936,
1889,
8,
27035,
1745,
18,
26,
2306,
2523,
800,
3726,
3726,
48,
25,
52,
10369,
3143,
1597,
15,
47,
31,
1376,
174,
7480,
9,
31,
22,
79,
638,
27,
21,
669,
56,
25,
642,
19,
8247,
17,
2081,
26,
275,
27,
5168,
18,
17,
157... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SpringSecurity : always redirect logged in users to a page
===
Spring security has a nice feature, it remembers the url of request resource and redirect users to that resource after authentication is successful. But I want users always redirected to some other page, just after user logs in. How is it done? | 0 | [
2,
1573,
17749,
13,
45,
550,
302,
14706,
13,
19287,
19,
3878,
20,
21,
2478,
800,
3726,
3726,
1573,
1221,
63,
21,
2210,
1580,
15,
32,
1518,
18,
14,
287,
6362,
16,
3772,
6577,
17,
302,
14706,
3878,
20,
30,
6577,
75,
27963,
25,
130... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Correct order for control structure logic (true/false, false/true)?
===
I am new to programming, and am wondering if there is a correct way to order your control structure logic.
It seems more natural to check for the most likely case first, but I have the feeling that some control structures won't work unless they check everything that's false to arrive at something that's true (logical deduction?)
It would be hard to adapt to this 'negative' view, I prefer a more positive outlook, presuming everything is true :)
| 0 | [
2,
4456,
389,
26,
569,
1411,
7085,
13,
5,
13398,
118,
13192,
870,
15,
4997,
118,
13398,
6,
60,
800,
3726,
3726,
31,
589,
78,
20,
3143,
15,
17,
589,
5712,
100,
80,
25,
21,
4456,
161,
20,
389,
154,
569,
1411,
7085,
9,
32,
2206,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Software Development at your company really like (methodologies, tools, ...)?
===
Since I've started my first job as a professional software developer about two years ago, I've read many articles about commonly accepted methodologies (e.g. Scrum, XP), technologies (e.g. EJB, Spring), techniques (e.g. TDD, code reviews), tools (bug tracking, wikis) and so on in software companies.
For many of these I've found that we at our company don't use them and I ask myself why. Are we doing it wrong or is it merely that these articles I've read are not really telling what it's like in the real world? Are these articles more academic?
So, please tell me what it's like at your company. Tell about everything regarding software development. Here are some suggestions (in the order as they come from my mind). Tell at least if you do it or not, or give a short comment:
- Test-Driven-Development
- Domain-Driven-Design
- Model-Driven-Design/Architecture
- Do you test?
- Unit Testing
- Integration Testing
- Acceptance Testing
- Code Reviews
- Innovative Technologies (Spring, Hibernate, Wicket, JSF, WS, REST, ...)
- Agile
- Pair Programming
- UML
- Domain-specific languages
- Requirement Specification (How?)
- Continous Integration
- Code-Coverage Tools
- Aenemic Domain Model
- Communication (Wiki, Mail, IM, Mailinglists, other documents)
- Effort estimates
- Team size
- Meetings
- Code metrics
- Static code analysis
- Bug tracking
- ...
And remember: I want to know what you really do, not what you would like to do or think you should do. | 4 | [
2,
98,
22,
18,
2306,
522,
35,
154,
237,
510,
101,
13,
5,
5909,
1807,
43,
13331,
18,
15,
4672,
15,
13,
9,
9,
9,
6,
60,
800,
3726,
3726,
179,
31,
22,
195,
373,
51,
64,
1205,
28,
21,
736,
2306,
10058,
88,
81,
122,
1464,
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... |
expose RMI server in JBoss?
===
I need to access RMI methods from a client front end.
For different reasons, I have JBoss running on the server side. This makes me thinking of using JBoss to expose the RMI server methods.
I'm kinda new to JBoss, so my question would be: What steps are required in order to make the RMI server methods visible to the client? | 0 | [
2,
13833,
761,
1435,
8128,
19,
487,
10349,
18,
60,
800,
3726,
3726,
31,
376,
20,
1381,
761,
1435,
3195,
37,
21,
6819,
431,
241,
9,
26,
421,
2932,
15,
31,
57,
487,
10349,
18,
946,
27,
14,
8128,
270,
9,
48,
1364,
55,
1440,
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... |
Replacing array in foreach loop with array modified in same loop
===
foreach($arrayOne as $value){
do function
}
In the above example, I'd like to pass $arrayOne into a loop, have a function operate that removes some elements of $arrayOne and then have the loop pass over the reduced $arrayOne on the elements that are left until the loop returns false.
Recommendations?
| 0 | [
2,
5496,
7718,
19,
26,
14322,
5293,
29,
7718,
5372,
19,
205,
5293,
800,
3726,
3726,
26,
14322,
5,
4403,
8576,
93,
849,
28,
5579,
15165,
6,
1,
107,
1990,
13,
1,
19,
14,
784,
823,
15,
31,
22,
43,
101,
20,
1477,
5579,
8576,
93,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Invoke() and BeginInvoke() behaving differently when executing an overridable method via a delegate
===
Can anyone tell me why this code behaves the way it does? See comments embedded in the code...
Am I missing something really obvious here?
using System;
namespace ConsoleApplication3
{
public class Program
{
static void Main(string[] args)
{
var c = new MyChild();
c.X();
Console.ReadLine();
}
}
public class MyParent
{
public virtual void X()
{
Console.WriteLine("Executing MyParent");
}
}
delegate void MyDelegate();
public class MyChild : MyParent
{
public override void X()
{
Console.WriteLine("Executing MyChild");
MyDelegate md = base.X;
// The following two calls look like they should behave the same,
// but they behave differently!
// Why does Invoke() call the base class as expected here...
md.Invoke();
// ... and yet BeginInvoke() performs a recursive call within
// this child class and not call the base class?
md.BeginInvoke(CallBack, null);
}
public void CallBack(IAsyncResult iAsyncResult)
{
return;
}
}
}
| 0 | [
2,
28371,
5,
6,
17,
2348,
108,
2625,
1048,
5,
6,
44,
13693,
12670,
76,
25836,
40,
84,
5175,
579,
2109,
1197,
21,
11300,
800,
3726,
3726,
92,
1276,
494,
55,
483,
48,
1797,
14149,
18,
14,
161,
32,
630,
60,
196,
7534,
12138,
19,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
IIS7 writing to a share over a network.
===
I am developing an application from windows vista machine. The web application is hosted in IIS. From that application i try to write to a network share on another vista machine but i keep getting the access denied error. On the share i gave everyone, guest, network, anonymous logon full control share and ntfs access. But still access is denied.
However when i start the application from visual studio it perfectly works, from IIS it throws access denied.
Any idea?
| 0 | [
2,
595,
18,
465,
1174,
20,
21,
1891,
84,
21,
982,
9,
800,
3726,
3726,
31,
589,
3561,
40,
3010,
37,
1936,
13520,
1940,
9,
14,
2741,
3010,
25,
2812,
19,
595,
18,
9,
37,
30,
3010,
31,
1131,
20,
2757,
20,
21,
982,
1891,
27,
226,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 determine active monitor of the current cursor location
===
I currently have an application which needs to have an awareness of which monitor the cursor is located when running in a multi-monitor configuration. | 0 | [
2,
184,
20,
3746,
1348,
7626,
16,
14,
866,
29588,
1474,
800,
3726,
3726,
31,
871,
57,
40,
3010,
56,
2274,
20,
57,
40,
6457,
16,
56,
7626,
14,
29588,
25,
335,
76,
946,
19,
21,
1889,
8,
2111,
242,
248,
8091,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Migrate table from MS SQL Server to MySQL
===
I have to migrate a table from MSSQL Server to MySql. The problem is that the table is quite big (65 millions records) and the whole process takes too much time. Does anyone have any idea how to speed things up ? Any useful tools that could improve this? | 0 | [
2,
22985,
859,
37,
4235,
4444,
255,
8128,
20,
51,
18,
22402,
800,
3726,
3726,
31,
57,
20,
22985,
21,
859,
37,
4235,
18,
22402,
8128,
20,
51,
18,
22402,
9,
14,
1448,
25,
30,
14,
859,
25,
1450,
580,
13,
5,
3577,
11999,
742,
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... |
String contains in bash
===
Using bash, I have a string:
string=`echo My string`
How can I test if it contains another string?
if [ $string ?? 'foo' ] then;
echo "It's there!";
fi;
Where ?? is my unknown operator. Do I use echo and grep?
if [ `echo $string || grep 'foo' ` ] then;
echo "It's there!";
fi;
That looks a bit clumsy.
| 0 | [
2,
3724,
1588,
19,
13158,
800,
3726,
3726,
568,
13158,
15,
31,
57,
21,
3724,
45,
3724,
3726,
1,
62,
2613,
51,
3724,
1,
184,
92,
31,
1289,
100,
32,
1588,
226,
3724,
60,
100,
636,
5579,
11130,
13,
60,
60,
13,
22,
4120,
111,
22,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Whats the diferance between Invoke() and BeginInvoke()
===
Just wondering what the difference between BeginInvoke() and Invoke() are?
Mainly what each one would be used for.
Thanks | 0 | [
2,
98,
18,
14,
926,
2407,
2416,
128,
28371,
5,
6,
17,
2348,
108,
2625,
1048,
5,
6,
800,
3726,
3726,
114,
5712,
98,
14,
2841,
128,
2348,
108,
2625,
1048,
5,
6,
17,
28371,
5,
6,
50,
60,
2011,
98,
206,
53,
83,
44,
147,
26,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
What is a good pattern for using a Global Mutex in C#?
===
The Mutex class is very misunderstood, and Global mutexes even more so.
What is good, safe pattern to use when creating Global mutexes? | 4 | [
2,
98,
25,
21,
254,
3732,
26,
568,
21,
2062,
20562,
396,
19,
272,
5910,
60,
800,
3726,
3726,
14,
20562,
396,
718,
25,
253,
29000,
15,
17,
2062,
20562,
13012,
18,
166,
91,
86,
9,
98,
25,
254,
15,
1834,
3732,
20,
275,
76,
2936,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Ant replace multiple lines of text
===
I have an xml file where I need to comment out a whole piece of text with Ant.
There's this ant task
<replace file="${src.dir}/Version.as" token="@revisionPrana" value="${revision}"/>
that I use to replace words, but in my case I need to replace a whole block like this:
<value>
<object class="edumatic.backoffice.view.modules.NavigationModuleInfo">
<property name="url"
value="edumatic/backoffice/view/modules/support/ExamsNavigationModule.swf" />
<property name="icon"
value="edumatic/backoffice/view/modules/support/assets/book.png" />
<property name="title" value="Assessments" />
<property name="pluginID" value="EXAM" />
</object>
</value>
<value>
<object class="edumatic.backoffice.view.modules.ContentModuleInfo">
<property name="url"
value="edumatic/backoffice/view/modules/support/ExamsContentModule.swf" />
<property name="pluginID" value="EXAM" />
</object>
</value>
Into
<!--value>
<object class="edumatic.backoffice.view.modules.NavigationModuleInfo">
<property name="url"
value="edumatic/backoffice/view/modules/support/ExamsNavigationModule.swf" />
<property name="icon"
value="edumatic/backoffice/view/modules/support/assets/book.png" />
<property name="title" value="Assessments" />
<property name="pluginID" value="EXAM" />
</object>
</value>
<value>
<object class="edumatic.backoffice.view.modules.ContentModuleInfo">
<property name="url"
value="edumatic/backoffice/view/modules/support/ExamsContentModule.swf" />
<property name="pluginID" value="EXAM" />
</object>
</value-->
So, basically I need to comment out a whole block of XML. Can I do this with a replace task (putting the whole block in the attribute token and value doesn't really work)? Or is there a quick way to read in the xml with ant and delete some nodes and save the xml again?
Searching for <value> and replace it by <!--value> isn't an option because there are multiple value children and not all of them need to be commented out.
Adding a attribute like <value id="1"> isn't an option either because the xml is being parsed by an IOC container (Prana). Maybe prana will ignore the id="1" but it still iss messy, and I don't like messy on the long term.
Thx, Lieven Cardoen aka Johlero | 0 | [
2,
40,
38,
3934,
1886,
1560,
16,
1854,
800,
3726,
3726,
31,
57,
40,
23504,
3893,
113,
31,
376,
20,
6484,
70,
21,
979,
1855,
16,
1854,
29,
40,
38,
9,
80,
22,
18,
48,
40,
38,
3005,
13,
1,
99,
5119,
3893,
3726,
7,
4403,
1,
18... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How many international languages does the iPhone Simulator support?
===
How many international languages does the iPhone Simulator support?
Choose: Settings/General/International/Language
Mine only has English listed, but I fear I may have inadvertently stripped out the localisations?
![iPhone/Settings/General/International/Language][1]
[1]: http://i36.tinypic.com/1q50t1.png | 0 | [
2,
184,
151,
294,
2556,
630,
14,
21024,
24565,
555,
60,
800,
3726,
3726,
184,
151,
294,
2556,
630,
14,
21024,
24565,
555,
60,
3538,
45,
12410,
118,
3661,
118,
16386,
118,
7020,
1114,
104,
63,
486,
1510,
15,
47,
31,
1719,
31,
123,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
RE: Using themes with ASP.Net MVC
===
I have an ASP.NET MVC (Beta 1) website that I'm using themes with. When I start my site (I'm still running using the ASP.Net Development Web Server) the default page gives me this error:
---------------
Server Error in '/' Application.
Using themed css files requires a header control on the page. (e.g. <head runat="server" />).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Using themed css files requires a header control on the page. (e.g. <head runat="server" />).
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: Using themed css files requires a header control on the page. (e.g. <head runat="server" />).]
System.Web.UI.PageTheme.SetStyleSheet() +2458366
System.Web.UI.Page.OnInit(EventArgs e) +8694828
System.Web.UI.Control.InitRecursive(Control namingContainer) +333
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
----------------
Do I need to change something with my routes? Or do I need to do something else to my site?
Thanks.
.michael delorenzo | 0 | [
2,
302,
45,
568,
6876,
29,
28,
306,
9,
2328,
307,
8990,
800,
3726,
3726,
31,
57,
40,
28,
306,
9,
2328,
307,
8990,
13,
5,
24398,
137,
6,
2271,
30,
31,
22,
79,
568,
6876,
29,
9,
76,
31,
799,
51,
689,
13,
5,
49,
22,
79,
174... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Unit Of Work
===
I have read in Patterns of Enterprise Application Architecture that a Unit Of Work should only be used in a single Session. So each session should have it's only Unit Of Work. Can anybody tell me why I could not use one Unit Of Work for the whole application (in my case ASP.NET).
thx, Lieven Cardoen aka Johlero | 0 | [
2,
1237,
16,
170,
800,
3726,
3726,
31,
57,
1302,
19,
6282,
16,
6002,
3010,
2607,
30,
21,
1237,
16,
170,
378,
104,
44,
147,
19,
21,
345,
3723,
9,
86,
206,
3723,
378,
57,
32,
22,
18,
104,
1237,
16,
170,
9,
92,
11181,
494,
55,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Working with optional stored procedure parameters
===
I am working on a stored procedure with several optional parameters. Some of these parameters are single values and it's easy enough to use a WHERE clause like:
WHERE (@parameter IS NULL OR column = @parameter)
However, in some instances, the WHERE condition is more complicated:
WHERE (@NewGroupId IS NULL OR si.SiteId IN (SELECT gs.SiteId
FROM [UtilityWeb].[dbo].[GroupSites] AS gs
WHERE gs.GroupId = @NewGroupId))
When I uncomment these complicated WHERE clauses, the query execution time doubles and the execution plan becomes remarkably more complicated. While the execution plan doesn't bother me, doubling the execution time of a query is a definite problem.
Is there a best practice or pattern that others have found for working with optional parameters in their stored procedures?
Is this one of those instances where dynamic SQL would be a better solution? | 0 | [
2,
638,
29,
12832,
8214,
7004,
12905,
800,
3726,
3726,
31,
589,
638,
27,
21,
8214,
7004,
29,
238,
12832,
12905,
9,
109,
16,
158,
12905,
50,
345,
4070,
17,
32,
22,
18,
2010,
511,
20,
275,
21,
113,
9040,
101,
45,
113,
13,
5,
1,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CSS Buttons (w/ Background but need bevel)
===
<input type="submit"
background: url(tick.png) bottom left no-repeat;
padding-left: 18px;
But the bevel goes away, how can I add an icon to submit button and keep the bevel? | 0 | [
2,
272,
18,
18,
12861,
13,
5,
499,
118,
2395,
47,
376,
44,
6532,
6,
800,
3726,
3726,
13,
1,
108,
4881,
1001,
3726,
7,
7563,
5130,
7,
2395,
45,
287,
6362,
5,
38,
7030,
9,
306,
2723,
6,
2129,
225,
90,
8,
99,
7081,
38,
73,
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... |
Secure iframe on unsecure page in a different domain
===
Our company is looking into allowing third party sites to use our online checkout system.
A client has stated that they would like to be able to use a lightbox style popup to display the checkout. And they would like this to be available on every page of the site, therefore mostly unsecure pages. Our checkout system and the client site are obviously on different domains.
I'm guessing that I could use a secure iframe (using https) to display our checkout system.
Would this iframe actually be secure?
Is the a sensible thing to do? (my gut says no, as how can the user tell the page is secure)
Are there any better ways to achieve this same functionality? | 0 | [
2,
4315,
31,
8361,
27,
367,
22917,
2478,
19,
21,
421,
4603,
800,
3726,
3726,
318,
237,
25,
699,
77,
2719,
422,
346,
3259,
20,
275,
318,
2087,
2631,
1320,
329,
9,
21,
6819,
63,
1240,
30,
59,
83,
101,
20,
44,
777,
20,
275,
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... |
Entity classes decoupled from LINQ to SQL provider for implementing the Repository pattern. How?
===
I have looked over the Repository pattern and I recognized some ideas that I was using in the past which made me feel well.
However now I would like to write an application that would use this pattern **BUT I WOULD LIKE TO HAVE THE ENTITY CLASSES DECOUPLED** from the repository provider.
I would create several assemblies :
1. an "Interfaces" assembly which would host common interfaces including the IRepository interface
2. an "Entities" assembly which would host the entity classes such as Product, User, Order and so on. This assembly would be referenced by the "Interfaces" assembly since some methods would return such types or arrays of them. Also it would be referenced by the main application assembly (such as the Web Application)
3. one or more Repository provider assembly/assemblies. Each would include (at least) a class that implements the IRepository interface and it would work with a certain Data Store. Data stores could include an SQL Server, an Oracle server, MySQL, XML files, Web / WCF services and so on.
Studying LINQ to SQL which looks very productive in terms of time taken to implement all seems well until I discover the deep dependency between the generated classes and the CustomDataContext class.
How can I use LINQ to SQL in such a scenario? | 0 | [
2,
9252,
2684,
121,
17856,
1294,
37,
6294,
1251,
20,
4444,
255,
11747,
26,
17333,
14,
24869,
3732,
9,
184,
60,
800,
3726,
3726,
31,
57,
292,
84,
14,
24869,
3732,
17,
31,
2124,
109,
3478,
30,
31,
23,
568,
19,
14,
640,
56,
117,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Multi-Threading Message Loop
===
My application has several threads:
1) Main Thread
2) 2 Sub-Main Threads (each with Message Loop, as shown below), used by TFQM
3) n Worker Threads (simple loop, containing Sleep())
My problem is, when I close my application, the Worker Threads manage to exit properly, but 1 of the 2 Sub-Main Threads hangs (never exits) when I issue WM_QUIT to close them.
----------
procedure ThreadProcFQM(P: Integer); stdcall;
var
Msg: TMsg;
_FQM: TFQM;
begin
_FQM := Ptr(P);
try
_FQM.fHandle := AllocateHwnd(_FQM.WndProc);
while GetMessage(Msg, 0, 0, 0) do
begin
TranslateMessage(Msg);
DispatchMessage(Msg);
end;
finally
DeallocateHWnd(_FQM.fHandle);
SetEvent(_FQM.hTerminated);
end;
end;
----------
procedure TFQM.Stop;
begin
PostMessage(fHandle, WM_QUIT, 0, 0);
WaitForSingleObject(hTerminated, INFINITE);
if hThread <> INVALID_HANDLE_VALUE then
begin
CloseHandle(hThread);
hThread := INVALID_HANDLE_VALUE;
end;
end;
| 0 | [
2,
23030,
1889,
8,
96,
22883,
2802,
5293,
800,
3726,
3726,
51,
3010,
63,
238,
20396,
45,
137,
6,
407,
9322,
172,
6,
172,
972,
8,
6232,
20396,
13,
5,
14322,
29,
2802,
5293,
15,
28,
1721,
1021,
6,
15,
147,
34,
13,
11720,
1251,
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... |
In portable C/C++, how to launch a command connecting the command's stdin to the launcher's stdout?
===
In a C/C++ program (p1), how to launch a dynamically constructed command (and its arguments) that reads its standard input from p1's standard output?
Note that a method other than this stdout --> stdin piping is also OK **provided** it is portable across Windows and Linux. I cannot e.g. use Perl, Ruby, Python, Java, etc.
Also, will this have a MinGW dependency for its Windows build?
| 0 | [
2,
19,
13469,
272,
118,
150,
20512,
15,
184,
20,
3394,
21,
1202,
6440,
14,
1202,
22,
18,
354,
3653,
20,
14,
19755,
22,
18,
354,
43,
1320,
60,
800,
3726,
3726,
19,
21,
272,
118,
150,
20512,
625,
13,
5,
306,
165,
6,
15,
184,
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 to globally map AltGr key to Alt key?
===
I want my AltGr key to behave exactly like left Alt.
Usually, I do this kind of stuff with [Autohotkey](http://www.autohotkey.com/), but I'm open to different solutions.
I tried this:
LControl & RAlt::Alt
And Autohotkey displayed error about "Alt" not being recognized action.
Then I tried the following code:
LControl & RAlt::
Send {Alt down}
KeyWait LCtrl
KeyWait Ralt
Send {Alt up}
return
which sort of works - I'm able to use the AltGr key for accessing hotkeys, but it still behaves differently:
When I press and release the Left Alt, the first menu item in the current program receives focus.
Pressing and releasing AltGr with this script does nothing.
Any ideas? Is this even possible with Autohotkey? (remapping right Ctrl and Shift to their left siblings was piece of cake)
<hr>
Note: I tried switching "<code>Alt</code>" to "<code>LAlt</code>" in the code and it made no difference. | 0 | [
2,
184,
20,
18861,
2942,
7051,
8807,
1246,
20,
7051,
1246,
60,
800,
3726,
3726,
31,
259,
51,
7051,
8807,
1246,
20,
14149,
1890,
101,
225,
7051,
9,
951,
15,
31,
107,
48,
825,
16,
3217,
29,
636,
18042,
7010,
4237,
500,
5,
21127,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I overcome the "The symbolic link cannot be followed because its type is disabled." error when getting the target of a symbolic link on Server 2008?
===
Following on from a [previous question](http://stackoverflow.com/questions/221417/how-do-i-programmatically-access-the-target-path-of-a-windows-symbolic-link), I am creating a symbolic link on a Server 2008 from a Vista machine using UNC paths. I can create the link just fine. I can go to the Server 2008 box and double click on the link in explorer to open the target file. What I cannot do though is use FileCreateW to get a handle to the UNC path link (from the Vista box). When I try it, it fails and GetLastError() returns error code 1463 (0x5B7), which is:
> The symbolic link cannot be followed because its type is disabled.
Can anyone tell me how to enable its "type" in Server 2008 (assuming the error means what it says)? | 0 | [
2,
184,
107,
31,
9059,
14,
13,
7,
124,
12882,
3508,
1967,
44,
709,
185,
82,
1001,
25,
10154,
9,
7,
7019,
76,
1017,
14,
2935,
16,
21,
12882,
3508,
27,
8128,
570,
60,
800,
3726,
3726,
249,
27,
37,
21,
636,
3515,
1755,
1291,
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,
1,
1,
1,
1,
1... |
VS.NET "watched" objects and recursive depth
===
In VS.NET, when you add an item to the watch, why is the base property often (always??) endlessly recursive? | 0 | [
2,
4611,
9,
2328,
13,
7,
9054,
69,
7,
3916,
17,
302,
24244,
5204,
800,
3726,
3726,
19,
4611,
9,
2328,
15,
76,
42,
3547,
40,
9101,
20,
14,
1455,
15,
483,
25,
14,
1000,
1354,
478,
13,
5,
21284,
60,
60,
6,
11340,
102,
302,
2424... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Is it wrong to cast an enumerator of a child class to an enumerator of a parent class?
===
I've got an error in my build which says:
> Error 12 Cannot implicitly convert
> type
> 'System.Collections.Generic.IEnumerator< BaseClass>'
> to
> 'System.Collections.Generic.IEnumerator< IParentClass>'.
> An explicit conversion exists (are you
> missing a cast?)
Is it wrong to simply cast it away?
This is my code:
public Dictionary<Int32, BaseClass> Map { get; private set; }
public IEnumerator<BaseClass> GetEnumerator()
{
return this.Map.Values.GetEnumerator();
}
public IEnumerator<IParentClass> IEnumerable<IParentClass>.GetEnumerator()
{
return this.GetEnumerator(); // ERROR!
}
My question is, can I just change this line:
return this.GetEnumerator();
to:
return (IEnumerator<IParentClass>)this.GetEnumerator();
(without any bad side effects)? | 0 | [
2,
25,
32,
1389,
20,
1325,
40,
26940,
248,
16,
21,
850,
718,
20,
40,
26940,
248,
16,
21,
4766,
718,
60,
800,
3726,
3726,
31,
22,
195,
330,
40,
7019,
19,
51,
1895,
56,
898,
45,
13,
1,
7019,
390,
1967,
20290,
102,
8406,
13,
1,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ASP.NET 3.5 Back-Button Control / Refresh Control (never found a working solution)
===
Hello and thanks for your time.
I've spent quite a bit of time searching for an answer to the old question of preventing duplicate posts when the user navigates back, forward, or refreshes the page. I've seen quite a few solutions proposed, none of which are working.
Proposed solution #1) Many people offer ways to instruct the browser to not cache pages, including some books I have. It is often noted that this isn't really a good solution because the user can turn off this feature in their browser, causing it to not honor the request.
Proposed solution #2) In a book I have it proposes that using timestamps set in the Viewstate and Session can detect stale pages. This detection DOES work, but the 'what to do about it' part does not: redirect to the same page, thereby reloading a page in it's pristine state.
I haven't posted any code because I've just gone in circles with many versions.
This is my first visit to this site and hopefully I can find some wonderful advice :)
Again, thank you for your time. | 0 | [
2,
28,
306,
9,
2328,
203,
9,
264,
97,
8,
811,
444,
569,
13,
118,
24905,
569,
13,
5,
9018,
216,
21,
638,
4295,
6,
800,
3726,
3726,
10975,
17,
3669,
26,
154,
85,
9,
31,
22,
195,
1111,
1450,
21,
1142,
16,
85,
5792,
26,
40,
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... |
Native VC++ using external (not project) dll reference how to specify path to dll
===
I have a native VC++ project that uses a dll (which is not in a project). Now, I must to put the dll in one the "Search Path Used by Windows to Locate a DLL"
[link][1]
[1]: http://msdn.microsoft.com/en-us/library/7d83bc18(VS.80).aspx
but I don't want the dll to sit in the exectuable or current or windows or system directory.
So my only option according to that is adding the path to the %PATH% environment variable.
Is there any other way?
Is there an elegant way to do so (adding to PATH)? should I do this on installation? should I be concerned if i'm doing this? | 0 | [
2,
1275,
13,
8990,
20512,
568,
4886,
13,
5,
1270,
669,
6,
13,
43,
211,
2801,
184,
20,
19077,
2013,
20,
13,
43,
211,
800,
3726,
3726,
31,
57,
21,
1275,
13,
8990,
20512,
669,
30,
2027,
21,
13,
43,
211,
13,
5,
2140,
25,
52,
19,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Entity Relationship Diagram for MS Access
===
I've worked with MySQL and MSSQL for some time and have used a variety of CASE and UML tools when designing some of my more complex projects.
I was recently asked by a colleague if I could provide an Access database for his department. The application itself isn't too complicated, and Access actually looks like the ideal tool for the task at hand.
Apart from a couple of very amateur databases many years ago (before I'd even heard of normalization) I haven't much experience of Access. I've got into the habit of using ER diagrams to design databases and want to do the same when working with Access. It seems that the built in "Relationship" view is fine for viewing relationships (duh!), but you have to create the tables first, which seems to defeat the point somewhat.
Does anybody know of any way to directly design the database using an ERD, either natively within Access, or else via round-trip generation using a 3rd party tool? Non of the software I usually use support Access.
I think I've been spoiled by by using "real" databases, but any help is appreciated... | 0 | [
2,
9252,
1429,
14161,
26,
4235,
1381,
800,
3726,
3726,
31,
22,
195,
577,
29,
51,
18,
22402,
17,
4235,
18,
22402,
26,
109,
85,
17,
57,
147,
21,
1747,
16,
610,
17,
13,
723,
255,
4672,
76,
15026,
109,
16,
51,
91,
1502,
2314,
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... |
C for loop implemented differently than other languages?
===
I read the following in a review of Knuth's "The Art of Computer Programming":
"The very 'practicality' means that the would-be CS major has to learn Kernighan's mistakes in designing C, notably the infamous fact that a for loop evaluates the for condition repeatedly, which duplicates while and fails to match the behavior of most other languages which implement a for loop."
(http://www.amazon.com/review/R9OVJAJQCP78N/ref=cm_cr_pr_viewpnt#R9OVJAJQCP78N)
What is this guy talking about? How could you implement a for loop that wasn't just syntactic sugar for a while loop? | 0 | [
2,
272,
26,
5293,
6807,
12670,
119,
89,
2556,
60,
800,
3726,
3726,
31,
1302,
14,
249,
19,
21,
1487,
16,
25938,
252,
22,
18,
13,
7,
124,
415,
16,
1428,
3143,
7,
45,
13,
7,
124,
253,
13,
22,
7310,
150,
18142,
856,
22,
1108,
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... |
Feeding an Excel QueryTable object from memory
===
Greetings,
The VBA code below will create an Excel QueryTable object and display it starting on Range("D2"). The specific address of this target range is immaterial.
My question is -- is it possible to manually feed in values to an in-memory Recordset, and then have the table read from it? In other words, I want to specify the table columns and values in VBA, not have them come from a database or file.
Public Sub Foo()
Dim blah As QueryTable
Dim rngTarget As Range
Dim strQuery As String
strQuery = "SELECT * FROM MY_TABLE"
Set rngTarget = Range("D2")
Dim qt As QueryTable
Set qt = rngTarget.Worksheet.QueryTables.Add(Connection:= _
"ODBC;DRIVER=SQL Server;SERVER=MY_SQL_SERVER;APP=MY_APP;Trusted_Connection=Yes", Destination:=rngTarget)
With qt
.CommandText = strQuery
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = False
.Name = "MY_RANGE_NAME"
.MaintainConnection = False
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = False
.AdjustColumnWidth = False
.RefreshPeriod = 0
.PreserveColumnInfo = False
.Refresh BackgroundQuery:=False
End With
End Sub
| 0 | [
2,
8524,
40,
20700,
25597,
5924,
3095,
37,
1912,
800,
3726,
3726,
13769,
18,
15,
14,
566,
969,
1797,
1021,
129,
1600,
40,
20700,
25597,
5924,
3095,
17,
3042,
32,
1422,
27,
978,
5,
7,
43,
135,
7,
6,
9,
14,
1903,
3218,
16,
48,
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... |
howto code hello world in java under an iphone ?
===
thanks a lot | 0 | [
2,
184,
262,
1797,
10975,
126,
19,
8247,
131,
40,
21024,
13,
60,
800,
3726,
3726,
3669,
21,
865,
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,
0,
0,
0... | [
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,
0... |
CSS not working with IIS7
===
I have a rails application that I am running with Vista,IIS7 and SQL 2005. For some reason the CSS is not being rendered. The CSS works fine when I use Webrick.
Any ideas how to get CSS working correctly with IIS7. I have uninstalled and reinstalled windows components "Common Http Features" with no luck.
| 0 | [
2,
272,
18,
18,
52,
638,
29,
595,
18,
465,
800,
3726,
3726,
31,
57,
21,
2240,
18,
3010,
30,
31,
589,
946,
29,
13520,
15,
2865,
18,
465,
17,
4444,
255,
812,
9,
26,
109,
1215,
14,
272,
18,
18,
25,
52,
142,
10877,
9,
14,
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... |
Using JavaScript within a JSP tag
===
I've seen [this question][1] regading the importing of js-files related to the tag content itself. I have a similar problem, here I have a jsp tag that generates some HTML and has a generic js-implementation that handles the behavior of this HTML. Furthermore I need to write some initialization statements, so I can use it afterwards through JavaScript. To be possible to use this "handler" within my JavaScript, it should be somehow accessible.
The question is... Is it Ok to write inline <script> tags along with my HTML for instantiation and initialization purposes (personally I don't think its very elegant)? And about being accessible to the JS world, should I leave a global var referencing my handler object (not very elegant aswell I think), are there better ways to do it?
[1]: http://stackoverflow.com/questions/49156/importing-javascript-in-jsp-tags | 0 | [
2,
568,
8247,
8741,
363,
21,
487,
3401,
3383,
800,
3726,
3726,
31,
22,
195,
541,
636,
1565,
1301,
500,
2558,
165,
500,
7953,
1283,
68,
14,
9010,
68,
16,
487,
18,
8,
16877,
18,
1597,
20,
14,
3383,
2331,
1145,
9,
31,
57,
21,
835... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why is the PopupControlExtender generating a full postback inside an UpdatePanel?
===
I have a button inside an updatepanel. I have a PopupControlExtender linked to the button so when the button is clicked a panel pops up. It works fine except it does a full postback and I can't figure out why. The button and the PopupControlExtender is inside an update panel which inside the ContentTemplate tag. When I take out the PopupControlExtender the button only does a partial postback. I'm having trouble finding any useful information on the PopupControlExtender. Do I have to declare a postback trigger or something? | 0 | [
2,
483,
25,
14,
1675,
576,
12898,
1706,
38,
13630,
13500,
21,
503,
678,
1958,
572,
40,
11100,
3206,
532,
60,
800,
3726,
3726,
31,
57,
21,
5167,
572,
40,
11100,
3206,
532,
9,
31,
57,
21,
1675,
576,
12898,
1706,
38,
13630,
4727,
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... |
Python - Library Problems
===
I'm relatively new to Python and am having problems programming with Scapy, the Python network manipulation tool. However, I can't tell if it's as much a Scapy problem as it is a being-a-Python-newbie problem. On the [scapy site][1], they give a sample program which I'm not able to run on my own machine:
#! /usr/bin/env python
import sys
from scapy import sr1,IP,ICMP
p=sr1(IP(dst=sys.argv[1])/ICMP())
if p:
p.show()
To which I get:
Traceback (most recent call last):
File "test.py", line 4, in <module>
from scapy import sr1,IP,ICMP
ImportError: cannot import name sr1
So my question then is: when installing Python libraries, do I need to change my path or anything similar? Also, is there something I can run in the interpreter to tell me the contents of the scapy package? I can run `from scapy import *` just fine, but since I have no idea what's inside it, it's hard to use it.
[1]: http://www.secdev.org/projects/scapy/build_your_own_tools.html
| 0 | [
2,
20059,
13,
8,
1248,
1716,
800,
3726,
3726,
31,
22,
79,
3109,
78,
20,
20059,
17,
589,
452,
1716,
3143,
29,
11583,
6448,
15,
14,
20059,
982,
17561,
5607,
9,
207,
15,
31,
92,
22,
38,
494,
100,
32,
22,
18,
28,
212,
21,
11583,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Timeouts WCF Services
===
How do the timeouts work in WCF? I know for example that you can configure sendTimeout and receiveTimeout for a clients binding. But how do they work? Msdn describes sendTimeout as:
A TimeSpan value that specifies the interval of time provided for a send operation to complete. This value should be greater than or equal to Zero. The default is 00:01:00.
What are send operations/receive operations? | 0 | [
2,
85,
12638,
11801,
410,
687,
800,
3726,
3726,
184,
107,
14,
85,
12638,
170,
19,
11801,
410,
60,
31,
143,
26,
823,
30,
42,
92,
1065,
15951,
2660,
891,
1320,
17,
2588,
891,
1320,
26,
21,
7421,
8728,
9,
47,
184,
107,
59,
170,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to improve Netbeans performance
===
hello and good day for everyone
This is my question.
Exists a real way to get Netbeans load faster and working time too?
It is to slow and when you have some time coding is worse it eat all my ram
with no more....
bye bye
| 0 | [
2,
184,
20,
3545,
4275,
863,
5950,
956,
800,
3726,
3726,
10975,
17,
254,
208,
26,
1266,
48,
25,
51,
1301,
9,
5636,
21,
683,
161,
20,
164,
4275,
863,
5950,
6305,
4233,
17,
638,
85,
266,
60,
32,
25,
20,
2276,
17,
76,
42,
57,
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... |
TRIGGER's that cause INSERT's to fail? Possible?
===
In cleaning up [this answer](http://stackoverflow.com/questions/229447/how-to-create-a-two-sided-unique-index-on-two-fields#229521) I learnt a bit about `TRIGGER`s and stored procedures in MySQL, but was stunned that, while `BEFORE INSERT` and `BEFORE UPDATE` triggers could modify data, they seemingly couldn't cause the insert/update to fail (ie. validation). In this particular case I was able to get this to work by manipulating the data in such a way as to cause a primary key duplicate, which in this particular case made sense, but doesn't necessarily make sense in a general sense.
Is this sort of functionality possible in MySQL? In any other RDBMS (my experience is limited to MySQL sadly)? Perhaps a `THROW EXCEPTION` style syntax? | 0 | [
2,
7286,
22,
18,
30,
1679,
14692,
22,
18,
20,
7476,
60,
938,
60,
800,
3726,
3726,
19,
9724,
71,
636,
1565,
1623,
500,
5,
21127,
6903,
25325,
2549,
9990,
9,
960,
118,
24652,
18,
118,
22313,
4268,
9816,
1544,
8,
262,
8,
6037,
1373... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
VS Design Time User Control CSS Duplication
===
I want to avoid the duplication of stylesheet link tags in the output html when a user control is dropped onto an aspx page. However if you omit the stylesheet link tag you don't get design time support for the stylesheet.
Anybody know a way around this problem? | 0 | [
2,
4611,
704,
85,
4155,
569,
272,
18,
18,
1052,
20669,
800,
3726,
3726,
31,
259,
20,
2658,
14,
1052,
20669,
16,
1034,
17627,
3508,
3383,
18,
19,
14,
5196,
13,
15895,
76,
21,
4155,
569,
25,
1539,
1204,
40,
28,
306,
396,
2478,
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... |
Why exactly would I want to use a WSDL to describe a Web service?
===
I'm having trouble understanding why a WSDL would be so beneficial, when the truth is that the service definition is not that human-readable, and most developers will use automated tools to consume it to generate objects in the application. Why isn't it easier for a service provider to define a simple XML schema, and just tell me in the documentation what I can get and how I can get it? I understand the whole "universal definition" aspect, but it all just seems so overcomplicated to me. Most APIs for social sites use a basic RESTful architecture, and all they do is give you a schema representation of the data you will get back. Seriously, I must be missing something here. | 0 | [
2,
483,
1890,
83,
31,
259,
20,
275,
21,
619,
18,
8643,
20,
4996,
21,
2741,
365,
60,
800,
3726,
3726,
31,
22,
79,
452,
2572,
3260,
483,
21,
619,
18,
8643,
83,
44,
86,
17623,
15,
76,
14,
1770,
25,
30,
14,
365,
5465,
25,
52,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Extreme Programming, does it work?
===
I'm wanting to hear from some people who have actually done extreme programming.
Does it work? Well?
Is it sustainable over the long term?
Thanks! | 0 | [
2,
4750,
3143,
15,
630,
32,
170,
60,
800,
3726,
3726,
31,
22,
79,
4638,
20,
990,
37,
109,
148,
72,
57,
1121,
677,
4750,
3143,
9,
630,
32,
170,
60,
134,
60,
25,
32,
9206,
84,
14,
175,
981,
60,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
TSQL Email Validation (without regex)
===
Ok, there are a million regexes out there for validating an email address, but how about some basic email validation that can be integrated into a TSQL query for Sql Server 2005?
I don't want to use a CLR procedure or function. Just straight TSQL.
Has anybody tackled this already?
| 0 | [
2,
13,
38,
18,
22402,
8517,
27999,
13,
5,
14506,
7953,
1706,
6,
800,
3726,
3726,
5854,
15,
80,
50,
21,
507,
7953,
1706,
160,
70,
80,
26,
7394,
1880,
40,
8517,
3218,
15,
47,
184,
88,
109,
2125,
8517,
27999,
30,
92,
44,
5547,
77... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Double-metaphone errors
===
I'm using [Lawrence Philips Double-Metaphone][1] algorithm with great success, but I have found the odd "unexpected result" for some combinations.
Does anyone else have additions or changes to the algorithm for other parts of it they wouldn't mind sharing, or just the combinations that they've found that do not work as expected.
eg. I had issues between:
* Peashill and Bushley. (both match with PXL)
* Rockliffe and Rockcliffe (RKLF and RKKL)
[1]: http://www.ddj.com/cpp/184401251?pgno=2 | 0 | [
2,
1494,
8,
5909,
58,
7709,
11908,
800,
3726,
3726,
31,
22,
79,
568,
636,
2371,
139,
2940,
3214,
18,
1494,
8,
5909,
58,
7709,
500,
2558,
165,
500,
9083,
29,
374,
1280,
15,
47,
31,
57,
216,
14,
4210,
13,
7,
1020,
6899,
11557,
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... |
Is there a string table resource for Visual C# 2005?
===
As a developer who spent many years working within Visual C++ 6, I'm used to working with the String Table resource to store unicode strings for localization. Is there a resource within Visual Studio 2005 that provides the same? Are there any third party libraries or tools? | 0 | [
2,
25,
80,
21,
3724,
859,
6577,
26,
3458,
272,
5910,
812,
60,
800,
3726,
3726,
28,
21,
10058,
72,
1111,
151,
122,
638,
363,
3458,
272,
20512,
400,
15,
31,
22,
79,
147,
20,
638,
29,
14,
3724,
859,
6577,
20,
1718,
28010,
7887,
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... |
Overcoming "It is being used by another person or program."
===
Is there a way to unlock Windows files without downloading a utility?
I have a few files on my Windows XP C: drive that are very old and very useless. When I try to delete these files I get the following message:
<pre>
Cannot delete FILENAME.zip: It is being used by another person or program
Close any programs that might be using the file and try again.
</pre>
No one is accessing this file. No program is using it currently. Windows has screwed up the file locking mechanism.
Is there a way to delete this file without downloading someone's unlocking utility? I find the sites offering these programs to be a tad sketchy. | 0 | [
2,
84,
9076,
13,
7,
242,
25,
142,
147,
34,
226,
840,
54,
625,
9,
7,
800,
3726,
3726,
25,
80,
21,
161,
20,
16497,
1936,
6488,
366,
7121,
68,
21,
10082,
60,
31,
57,
21,
310,
6488,
27,
51,
1936,
23045,
272,
45,
1493,
30,
50,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Ways to save enums in database
===
I am wondering what the best ways to save enums into a database is.
I know there are `name()` and `valueOf()` methods to make it into a String back. But are there any other (flexible) options to store these values?
Is there a smart way to make them into unique numbers (`ordinal()` is not safe to use)?
Any comments and suggestions would be helpful :) | 0 | [
2,
2847,
20,
2079,
1957,
723,
18,
19,
6018,
800,
3726,
3726,
31,
589,
5712,
98,
14,
246,
2847,
20,
2079,
1957,
723,
18,
77,
21,
6018,
25,
9,
31,
143,
80,
50,
13,
1,
7259,
5,
6,
1,
17,
13,
1,
15165,
1041,
5,
6,
1,
3195,
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 change highlighted text to a different color in MS Word?
===
I have some simple .doc files I made in Word 2007 where I changed the text color and used highlights to compare some similar texts. What I'd like to do is change any instances of green text or gray highlighting to different respective colors for each.
I'm sure there is a simple way to do this with VBA but any other sort of answers are also welcome. | 0 | [
2,
184,
107,
31,
753,
12528,
1854,
20,
21,
421,
1665,
19,
4235,
833,
60,
800,
3726,
3726,
31,
57,
109,
1935,
13,
9,
13799,
6488,
31,
117,
19,
833,
624,
113,
31,
1015,
14,
1854,
1665,
17,
147,
13046,
20,
11590,
109,
835,
6381,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 RSS news feed for JavaFx news and resources
===
...Yes I've seen:
http://stackoverflow.com/questions/116519/best-resources-for-learning-javafx
but it doesn't really answer the question. Maybe there just aren't any good resources at the moment? | 0 | [
2,
254,
13,
1224,
18,
996,
4063,
26,
8247,
16488,
996,
17,
2566,
800,
3726,
3726,
13,
9,
9,
9,
1714,
31,
22,
195,
541,
45,
7775,
6903,
25325,
2549,
9990,
9,
960,
118,
24652,
18,
11698,
11077,
1433,
118,
4936,
8,
99,
12097,
18,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Sync SQL Logins utility on 2005/2008
===
Anyone point my at a utility for syncing sql server logins after restoring a database to a different server?
I know I can do it with scripts, but I've been using a wonderful little utility - 'Db Maint Sync SQL Logins' (http://www.dbmaint.com/SyncSqlLogins.asp) to do it on sql server 2000 which unfortunately doesn't support 2005 and I'm loath to go back to actually thinking :-) | 0 | [
2,
6063,
150,
4444,
255,
2205,
17040,
10082,
27,
812,
118,
2753,
800,
3726,
3726,
1276,
454,
51,
35,
21,
10082,
26,
6063,
6302,
4444,
255,
8128,
2205,
17040,
75,
19144,
21,
6018,
20,
21,
421,
8128,
60,
31,
143,
31,
92,
107,
32,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Size of a byte in memory - Java
===
I have heard mixed opinions over the amount of memory that a byte takes up in a java program.
I am aware you can store no more than +127 in a java byte, and the [documentation](http://java.sun.com/docs/books/tutorial/java/nutsandbolts/datatypes.html) says that a byte is only 8 bits but [here](http://www.jguru.com/faq/view.jsp?EID=13647) I am told that it actually takes up the same amount of memory as an int, and therefore is just a Type that helps in code comprehension and not efficiency.
Can anyone clear this up, and would this be an implementation specific issue? | 0 | [
2,
1072,
16,
21,
34,
591,
19,
1912,
13,
8,
8247,
800,
3726,
3726,
31,
57,
752,
2198,
11900,
84,
14,
2006,
16,
1912,
30,
21,
34,
591,
1384,
71,
19,
21,
8247,
625,
9,
31,
589,
3854,
42,
92,
1718,
90,
91,
119,
2754,
11595,
19,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Sanitizing MySQL user parameters.
===
What are the dangerous characters that should be replaced in user input when the users' input will be inserted in a MySQL query? I know about quotes, double quotes, \r and \n. Are there others?<br><sub>(I don't have the option of using a smart connector that accepts parameters so I have to build the query myself and this will be implemented in multiple programming languages, including some obscure ones so solutions such as `mysql_real_escape_string` in PHP are not valid)</sub> | 0 | [
2,
523,
242,
3335,
51,
18,
22402,
4155,
12905,
9,
800,
3726,
3726,
98,
50,
14,
3342,
1766,
30,
378,
44,
1141,
19,
4155,
6367,
76,
14,
3878,
22,
6367,
129,
44,
14215,
19,
21,
51,
18,
22402,
25597,
60,
31,
143,
88,
18901,
15,
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... |
Class design for serialization - ideas or patterns?
===
Let me begin with an illustrative example (assume the implementation is in a statically typed language such as Java or C#).
Say you are building a content management system (CMS) or something similar. The data is hierarchically organised into `Folder`s. Each folder has a collection of children; a child may be a `Page` or a `Folder`. All items are stored within a root folder. No cycles are allowed. We have an acyclic graph.
The system will have a remote API and instances of `Folder` and `Page` must be serialized / de-serialized across the network. With a typical implementation of folder, in which a folder's children are a `List`, serialization of the root node would send the entire graph. This is unacceptable for obvious reasons.
**I am interested to hear people have solved this problem in the past.**
I have two potential suggestions:
1. *Navigation by query*: Change the domain model so that the folder class contains only a list of IDs for each child. To access a child we must query for it. Serialisation is now trivial since the graph ends at a well defined point. The major downside is that we lose type safety - the ID could be for something other than a folder/child.
1. *Stop and re-attach*: During serialization stop whenever we detect a reference to a folder or page, send the ID instead. When de-serializing we must then look up the corresponding object for each ID and re-attach it at the relevant position in the nascent object. | 0 | [
2,
718,
704,
26,
5956,
1829,
13,
8,
3478,
54,
6282,
60,
800,
3726,
3726,
408,
55,
2348,
29,
40,
13,
13898,
1939,
6142,
823,
13,
5,
9755,
9472,
14,
6123,
25,
19,
21,
12038,
1326,
1001,
43,
816,
145,
28,
8247,
54,
272,
5910,
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... |
Difference between files writen in binary and text mode
===
What translation occurs when writing to a file that was opened in text mode that does not occur in binary mode? Specifically in MS Visual C.
unsigned char buffer[256];
for (int i = 0; i < 256; i++) buffer[i]=i;
int size = 1;
int count = 256;
Binary mode:
FILE *fp_binary = fopen(filename, "wb");
fwrite(buffer, size, count, fp_binary);
Versus text mode:
FILE *fp_text = fopen(filename, "wt");
fwrite(buffer, size, count, fp_text);
| 0 | [
2,
2841,
128,
6488,
2757,
103,
19,
14171,
17,
1854,
3740,
800,
3726,
3726,
98,
4064,
3690,
76,
1174,
20,
21,
3893,
30,
23,
520,
19,
1854,
3740,
30,
630,
52,
3744,
19,
14171,
3740,
60,
3524,
19,
4235,
3458,
272,
9,
28839,
4892,
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... |
Removing items from the QueryString collection in C#
===
Using the following code I get a nice formatted string:
Request.QueryString.ToString
Gives me something like: &hello=worldµsoft=sucks
But when I use this code to clone the collection to another object (of the same type) I get the Type() back from the ToString() method instead.
System.Collections.Specialized.NameValueCollection variables = new System.Collections.Specialized.NameValueCollection(Request.QueryString);
if (!string.IsNullOrEmpty(variables["sid"]))
variables.Remove("sid");
Response.Write(variables.ToString());
Is there a tidier way to output it rather than looking and building the string manually? | 0 | [
2,
9096,
3755,
37,
14,
25597,
11130,
1206,
19,
272,
5910,
800,
3726,
3726,
568,
14,
249,
1797,
31,
164,
21,
2210,
13,
29850,
3724,
45,
3772,
9,
8190,
93,
11130,
9,
262,
11130,
2352,
55,
301,
101,
45,
279,
11515,
3726,
4423,
1569,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
.NET: is there a Click-and-drag "Desktop-Like" control?
===
OK, first for context look at the Windows desktop; You can take items (folders, files) on the desktop and drag them around to different places and they "stay" where you dragged them. This seems to be a pretty useful feature to offer users so as to allow them to create their own "groupings" of items.
My question is thus:
Is there a control in .NET that approximates this behavior with a collection of items?
I'm thinking something like a listbox in "LargeIcon" mode, but it allows you to drag the icons around to different places inside the control. | 0 | [
2,
13,
9,
2328,
45,
25,
80,
21,
10840,
8,
290,
8,
43,
11208,
13,
7,
3196,
197,
3880,
8,
1403,
7,
569,
60,
800,
3726,
3726,
5854,
15,
64,
26,
4141,
361,
35,
14,
1936,
17404,
73,
42,
92,
247,
3755,
13,
5,
8814,
445,
15,
6488... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using request.setAttribute in a JSP page
===
Is it possible to use request.setAttribute on a JSP page and then on HTML Submit get the same request attribute in the Servlet? | 0 | [
2,
568,
3772,
9,
18,
18895,
14755,
19,
21,
487,
3401,
2478,
800,
3726,
3726,
25,
32,
938,
20,
275,
3772,
9,
18,
18895,
14755,
27,
21,
487,
3401,
2478,
17,
94,
27,
13,
15895,
12298,
164,
14,
205,
3772,
35,
14755,
19,
14,
13,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
ASPX Textbox: Execute method on return keypress
===
I have a search box that doesn't have a submit button, I need to be able to hit enter and then execute a method, how do I do this? | 0 | [
2,
28,
306,
396,
1854,
5309,
45,
15644,
2109,
27,
788,
1246,
5890,
800,
3726,
3726,
31,
57,
21,
2122,
1649,
30,
1437,
22,
38,
57,
21,
12298,
5167,
15,
31,
376,
20,
44,
777,
20,
770,
2830,
17,
94,
15644,
21,
2109,
15,
184,
107,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
C# Proxies and the var keyword
===
This question is related to a previous post of mine [Here][1]. Basically, I want to inject a DAO into an entity i.e.
public class User
{
IUserDAO userDAO;
public User()
{
userDAO = IoCContainer.Resolve<IUserDAO>;
}
public User(IUserDAO userDAO)
{
this.userDAO = userDAO;
}
//Wrapped DAO methods i.e
public User Save()
{
return userDAO.Save(this);
}
}
Here if I had a custom methods in my DAO then I basically have to wrap them in the entity object. So if I had a IUserDAO.Register() I would then have to create a User.Register() method to wrap it.
What would be better is to create a proxy object where the methods from the DAO are dynamically assign to the User object. So I may have something that looks like this:
var User = DAOProxyService.Create(new User());
User.Save();
This would mean that I can keep the User entity as a pretty dumb class suitable for data transfer over the wire, but also magically give it a bunch of DAO methods.
This is very much out of my confort zone though, and I wondered what I would need to accomplish this? Could I use Castles Dynamic proxy? Also would the C# compiler be able to cope with this and know about the dynamically added methods?
Feel free to let me know if this is nonsense.
[1]: http://stackoverflow.com/questions/227225/is-injecting-dao-into-entities-a-bad-thing
| 0 | [
2,
272,
5910,
895,
396,
1596,
17,
14,
4033,
1246,
9587,
800,
3726,
3726,
48,
1301,
25,
1597,
20,
21,
1158,
678,
16,
1114,
636,
6836,
500,
2558,
165,
500,
9,
11374,
15,
31,
259,
20,
20316,
21,
13,
17104,
77,
40,
9252,
31,
9,
62... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Many-to-many relationships in ASP.NET Dynamic Data
===
I need to use a many to many relationship in my project and since Dynamic Data doesn't support it natively, I would like to ask for a sample of an implementation of something like it.
I'm specifically looking for a way to both create new instances of the target entity and add a new m2m relationship to a record as well as using existing instances to create the relationship.
I'm on a tight schedule, so any help is really appreciated. | 0 | [
2,
151,
8,
262,
8,
14842,
5833,
19,
28,
306,
9,
2328,
7782,
1054,
800,
3726,
3726,
31,
376,
20,
275,
21,
151,
20,
151,
1429,
19,
51,
669,
17,
179,
7782,
1054,
1437,
22,
38,
555,
32,
1275,
102,
15,
31,
83,
101,
20,
1349,
26,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Where can I find information about business logic patterns?
===
What I am looking for is some overview of "design patterns", but not on the coding level (factory, singleton, mvc, ...) but on the business logic level.
I don't know if that is understandable, so here are some typical business logic pattern questions for an ERP application:
- When two or more users are working on the same order, do I lock it? How can I avoid concurrent writes which might destroy the other users' work?
- How to I create a unique complex order number, which follows certain rules? Do I use a central server/service or are there better de-centralized methods?
- How do I create reports? Is it better to use a reporting server (Crystal Reports 2008 for example) or is it better to let every workstation create its own reports?
- During accounting, what rules do I have to follow to avoid rounding problems?
- For statistics, do I always recalculate all values (total value of *all* orders, for example) or do I make 'rolling' statistics, which are just updated whenever one of the base values changes (value of a *single* order)?
- ...
Just for clarification: I don't need quick answers for these questions, but I rather want to know a good source of information, where questions *like these* are answered and/or discussed. (Books, Internet, ...) | 4 | [
2,
113,
92,
31,
477,
676,
88,
508,
7085,
6282,
60,
800,
3726,
3726,
98,
31,
589,
699,
26,
25,
109,
21598,
16,
13,
7,
19862,
6282,
7,
15,
47,
52,
27,
14,
13,
15458,
662,
13,
5,
17455,
93,
15,
345,
444,
15,
307,
8990,
15,
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 to stop visual studio from updating assembly references?
===
In our environment we have a Lib folder which contains various third party assemblies referenced by our projects. For example, Enterprise Libary and Elmah.
Sometimes a dev doesn't do a get latest on that folder. When the dev then loads a project which can't find the assembly in the expected folder, Visual Studio automatically locates another copy and updates the project references.
The problem occurs when the dev checks in the project and it screws everyone else up.
Is there a way to stop visual studio 2008 from doing this? | 0 | [
2,
184,
20,
747,
3458,
1120,
37,
71,
43,
1880,
1475,
7231,
60,
800,
3726,
3726,
19,
318,
2307,
95,
57,
21,
13,
8326,
19294,
56,
1588,
617,
422,
346,
21066,
17571,
34,
318,
2314,
9,
26,
823,
15,
6002,
13,
8326,
1857,
17,
931,
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... |
Thread vs ThreadPool
===
What is the difference between using a new thread and using a thread from the thread pool? What performance benefits are there and why should I consider using a thread from the pool rather than one I've explicitly created? I'm thinking specifically of .NET here, but general examples are fine. | 0 | [
2,
9322,
4611,
9322,
13378,
800,
3726,
3726,
98,
25,
14,
2841,
128,
568,
21,
78,
9322,
17,
568,
21,
9322,
37,
14,
9322,
3067,
60,
98,
956,
5800,
50,
80,
17,
483,
378,
31,
3563,
568,
21,
9322,
37,
14,
3067,
864,
119,
53,
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... |
renumber primary key
===
How would I reset the primary key counter on a sql table and update each row with a new primary key?
| 0 | [
2,
302,
16299,
1256,
1246,
800,
3726,
3726,
184,
83,
31,
23422,
14,
1256,
1246,
2105,
27,
21,
4444,
255,
859,
17,
11100,
206,
3131,
29,
21,
78,
1256,
1246,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Drools.NET vs Windows Workflow Foundation (WF)
===
I am currently in the process of searching for a rules engine that works in .NET. Our logic is pretty simple, +, -, *, /, and, or, basic order of operations stuff. However we are going to need to store this information in the database and then generate the rules file when a new version is pulled from the database. So the common UI editors are going to be useless to us, unless one of them has a web version UI editor.
So my question is, given what I have said, which is going to be the best rules engine for us in terms of programmatic configuration and integration with ASP.NET. | 0 | [
2,
27008,
18,
9,
2328,
4611,
1936,
170,
9990,
1304,
13,
5,
15263,
6,
800,
3726,
3726,
31,
589,
871,
19,
14,
953,
16,
5792,
26,
21,
1761,
1406,
30,
693,
19,
13,
9,
2328,
9,
318,
7085,
25,
1772,
1935,
15,
2754,
15,
13,
8,
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... |
he HTTP headers are already written to the client browser Error
===
I got this error
Response object error 'ASP 0156 : 80004005'
Header Error
/ordermgmt/updateorderstatus.asp, line 1390
The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.
I put Response.Buffer=true;
Stilll it is showing error.
I have put reponse,Redirect @ this line number and that will be executed a number of times (it is in a loop).,After the first iteration it is showing this error
| 0 | [
2,
24,
7775,
157,
445,
50,
614,
642,
20,
14,
6819,
16495,
7019,
800,
3726,
3726,
31,
330,
48,
7019,
1627,
3095,
7019,
13,
22,
472,
306,
713,
13097,
13,
45,
13,
28064,
7114,
264,
22,
157,
106,
7019,
13,
118,
7861,
11984,
79,
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... |
Vertical display of Header Text in Grid View ASP .NET
===
Is there a way to display the headerText of the Grid View vertically?
http://img371.imageshack.us/img371/4813/testyk6.jpg
I hope the above link works
Thanks | 0 | [
2,
7035,
3042,
16,
157,
106,
1854,
19,
7354,
1418,
28,
306,
13,
9,
2328,
800,
3726,
3726,
25,
80,
21,
161,
20,
3042,
14,
157,
106,
11969,
16,
14,
7354,
1418,
23300,
60,
7775,
6903,
1660,
263,
25686,
9,
22039,
18,
22983,
9,
267,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best way to precompile JSPs using ANT
===
I am trying to figure out the best way to use ANT to precompile JSPs that will be deployed to an Oracle application server. Even though I am deploying to an Oracle app server I would like to avoid using Oracle's version of ANT.
| 0 | [
2,
98,
25,
14,
246,
161,
20,
782,
11103,
3599,
487,
18,
1919,
568,
40,
38,
800,
3726,
3726,
31,
589,
749,
20,
1465,
70,
14,
246,
161,
20,
275,
40,
38,
20,
782,
11103,
3599,
487,
18,
1919,
30,
129,
44,
6698,
20,
40,
15759,
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... |
Force a manual Merge of certain files within TortoiseSVN
===
**Is there some way to force some files to not be merged automatically (force me to manage the merge) when merging a branch back into the main tree?**
For example, I have web.config files that have specific paths based on whether I'm in the Dev or Production system. So, when I need to merge my dev branch back into main, I don't want to modify some of the tags, but other information might need to be updated.
The problem is that the merge may automatically update the settings that need to remain the same. I can easily revert back to the original, but then any new settings would be lost. It seems to be the easiest way to handle this would be for me to manually merge the changes in this case.
It's possible I'm coming at this from the wrong direction since I'm new to Tortoise and SVN. | 0 | [
2,
558,
21,
5132,
12666,
16,
1200,
6488,
363,
25691,
18,
16578,
800,
3726,
3726,
13,
1409,
403,
80,
109,
161,
20,
558,
109,
6488,
20,
52,
44,
3901,
7499,
13,
5,
8774,
55,
20,
4705,
14,
12666,
6,
76,
18842,
21,
1686,
97,
77,
14... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How many times do you verify a task in Scrum?
===
On our Scrum board, tasks start at 'To Do', go to 'In Progress', and when you're done with a task, they move to 'To Verify' before ending up in 'Done'. The 'To Verify' column is when you're done with a task and someone else can have a look at it, test it, and comment on it.
This has proven helpful for errors, better code, etc.
To people who have a similar practice: after the developer has addressed the comments/errors, do you verify it again, or do you assume the issues have been addressed and move the task to 'Done'?
I hope this is clear, and would like to hear your thoughts. | 0 | [
2,
184,
151,
436,
107,
42,
21012,
21,
3005,
19,
26562,
60,
800,
3726,
3726,
27,
318,
26562,
686,
15,
8674,
799,
35,
13,
22,
262,
107,
22,
15,
162,
20,
13,
22,
108,
3455,
22,
15,
17,
76,
42,
22,
99,
677,
29,
21,
3005,
15,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PHP as a thttpd module vs CGI in terms of memory usage
===
I am planning to use php in an embedded environment. Our current web server is thttpd. I am considering two options now: whether to run it as a cgi or as SAPI module. I know cgi has advantage in terms of security. But if we are to use php as cgi, an instance of the php should be loaded into the memory for each request.
I have tried compiling it as a SAPI module of thttpd and I have observed that thttpd's memory usage, specifically rss, does not grow larger as the number of request increases.
Can anybody explain how thttpd loads php? Is it loaded just one time and stays resident to the memory as long as thttpd is running? If so, we may consider this as an alternative to cgi.
Does it perform multi-threading, i.e. if there's multiple http request at the same time? or does process request one at a time?
| 0 | [
2,
13,
26120,
28,
21,
13,
38,
21127,
43,
12613,
4611,
272,
2234,
19,
1663,
16,
1912,
7514,
800,
3726,
3726,
31,
589,
2334,
20,
275,
13,
26120,
19,
40,
12138,
2307,
9,
318,
866,
2741,
8128,
25,
13,
38,
21127,
43,
9,
31,
589,
51... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Paginated query using sorting on different columns using ROW_NUMBER() OVER () in SQL Server 2005
===
Let's suppose I'm using the Northwind database and I would like to run a query via a stored procedure that contains, among other parameters, the following:
- `@Offset` to indicate where the pagination starts,
- `@Limit` to indicate the page size,
- `@SortColumn` to indicate the column used for sorting purposes,
- `@SortDirection`, to indicate ascendant or descendant sorting.
The idea is to do the pagination on the database, as the result set contains thousands of rows so caching is not an option (and using VIEWSTATE is not even considered as, IMO, sucks).
As you may know SQL Server 2005 provides the function [ROW_NUMBER][1] which *returns the sequential number of a row within a partition of a result set, starting at 1 for the first row in each partition*.
We need sorting on every returned column (five in this example) and dynamic SQL is not an option, so we have two possibilities: using plenty of `IF ... ELSE ...` and having 10 queries, which is a hell to maintain, or having a query like the following:
WITH PaginatedOrders AS (
SELECT
CASE (@SortColumn + ':' + @SortDirection)
WHEN 'OrderID:A' THEN ROW_NUMBER() OVER (ORDER BY Orders.OrderID ASC)
WHEN 'OrderID:D' THEN ROW_NUMBER() OVER (ORDER BY Orders.OrderID DESC)
WHEN 'CustomerID:A' THEN ROW_NUMBER() OVER (ORDER BY Orders.CustomerID ASC)
WHEN 'CustomerID:D' THEN ROW_NUMBER() OVER (ORDER BY Orders.CustomerID DESC)
WHEN 'EmployeeID:A' THEN ROW_NUMBER() OVER (ORDER BY Orders.EmployeeID ASC)
WHEN 'EmployeeID:D' THEN ROW_NUMBER() OVER (ORDER BY Orders.EmployeeID DESC)
WHEN 'OrderDate:A' THEN ROW_NUMBER() OVER (ORDER BY Orders.OrderDate ASC)
WHEN 'OrderDate:D' THEN ROW_NUMBER() OVER (ORDER BY Orders.OrderDate DESC)
WHEN 'ShippedDate:A' THEN ROW_NUMBER() OVER (ORDER BY Orders.OrderID ASC)
WHEN 'ShippedDate:D' THEN ROW_NUMBER() OVER (ORDER BY Orders.OrderID DESC)
END AS RowNumber,
OrderID, CustomerID, EmployeeID, OrderDate, ShippedDate
FROM Orders
-- WHERE clause goes here
)
SELECT
RowNumber, OrderID, CustomerID, EmployeeID, OrderDate, ShippedDate,
@Offset, @Limit, @SortColumn, @SortDirection
FROM PaginatedOrders
WHERE RowNumber BETWEEN @Offset AND (@Offset + @Limit - 1)
ORDER BY RowNumber
I've tried the query several times, with different arguments, and its performance it is quite good actually, but it stills looks like it might be optimized some other way.
Is anything wrong with this query or you would do it this way? Do you propose a different approach?
[1]: http://msdn.microsoft.com/en-us/library/ms186734.aspx | 0 | [
2,
19006,
12721,
25597,
568,
2058,
68,
27,
421,
7498,
568,
3131,
1,
16299,
5,
6,
84,
13,
5,
6,
19,
4444,
255,
8128,
812,
800,
3726,
3726,
408,
22,
18,
5787,
31,
22,
79,
568,
14,
200,
7809,
6018,
17,
31,
83,
101,
20,
485,
21,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I check if a file exists in C?
===
Is there a better way than simply trying to open the file?
int exists(const char *fname)
{
FILE *file;
if (file = fopen(fname, "r"))
{
fclose(file);
return 0;
}
return 1;
}
| 0 | [
2,
184,
107,
31,
2631,
100,
21,
3893,
5636,
19,
272,
60,
800,
3726,
3726,
25,
80,
21,
574,
161,
119,
1659,
749,
20,
368,
14,
3893,
60,
19,
38,
5636,
5,
12124,
38,
4892,
1637,
410,
7259,
6,
13,
1,
3893,
1637,
16877,
73,
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... |
Code coverage tools for perl
===
Are there any good (and preferably free) code coverage tools out there for perl? | 0 | [
2,
1797,
5245,
4672,
26,
416,
255,
800,
3726,
3726,
50,
80,
186,
254,
13,
5,
290,
6369,
4801,
551,
6,
1797,
5245,
4672,
70,
80,
26,
416,
255,
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... |
IModelBinder and ASP.NET MVC Beta
===
Does anyone have links to tutorials regarding the new IModelBinder in asp.net mvc beta?
I can't get my head around it properly, so much has changed.
Thanks | 0 | [
2,
31,
13998,
24200,
17,
28,
306,
9,
2328,
307,
8990,
8434,
800,
3726,
3726,
630,
1276,
57,
6271,
20,
29724,
18,
3467,
14,
78,
31,
13998,
24200,
19,
28,
306,
9,
2328,
307,
8990,
8434,
60,
31,
92,
22,
38,
164,
51,
157,
140,
32,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Data length in ntext column?
===
How do you find out the length/size of the data in an ntext column in SQL? - It's longer than 8000 bytes so I can't cast it to a varchar. Thanks. | 0 | [
2,
1054,
1476,
19,
13,
103,
11969,
4698,
60,
800,
3726,
3726,
184,
107,
42,
477,
70,
14,
1476,
118,
10454,
16,
14,
1054,
19,
40,
13,
103,
11969,
4698,
19,
4444,
255,
60,
13,
8,
32,
22,
18,
1045,
119,
13,
28064,
34,
3231,
86,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... |
Saving different csv files as different sheets in a single excel workbook
===
Related to this [question][1], how to save many different csv files into one excel workbook with one sheet per csv ? I would like to know how to do this programmatically in Java.
[1]: http://stackoverflow.com/questions/59075/how-do-i-save-each-sheet-in-an-excel-workbook-to-seperate-csv-files-with-a-macro | 0 | [
2,
7599,
421,
272,
18,
710,
6488,
28,
421,
8801,
19,
21,
345,
20700,
170,
5199,
800,
3726,
3726,
1597,
20,
48,
636,
24652,
500,
2558,
165,
500,
15,
184,
20,
2079,
151,
421,
272,
18,
710,
6488,
77,
53,
20700,
170,
5199,
29,
53,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
cross-hatching using PostScript
===
I am looking for a way to cross-hatch various basic shapes. Is there a fill style I can't find or should I use clipping? | 0 | [
2,
919,
8,
6775,
7192,
568,
678,
8741,
800,
3726,
3726,
31,
589,
699,
26,
21,
161,
20,
919,
8,
6775,
673,
617,
2125,
12129,
9,
25,
80,
21,
3509,
1034,
31,
92,
22,
38,
477,
54,
378,
31,
275,
29568,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
.NET Decimal = what in SQL?
===
What's the best data type in SQL to represent Decimal in .NET?
We want to store decimal numbers with up to 9 decimal place precision and want to avoid rounding errors etc on the front end.
Reading about data types, it appears using Decimal in .NET is the best option because you will not get rounding errors, although it is a bit slower than a Double.
We want to carry this through down to the DB and want minimum conversion issues when moving data through the layers. Any suggestions?
| 0 | [
2,
13,
9,
2328,
26380,
800,
98,
19,
4444,
255,
60,
800,
3726,
3726,
98,
22,
18,
14,
246,
1054,
1001,
19,
4444,
255,
20,
3501,
26380,
19,
13,
9,
2328,
60,
95,
259,
20,
1718,
26380,
2116,
29,
71,
20,
561,
26380,
209,
13133,
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... |
Making the jump from ASP.NET 2.0 to ASP.NET 3.5 MVC
===
I'm looking to find out all the requirements for making the jump from 2.0 to 3.5 MVC. Does SQL Server 2000 work with .net 3.5? Does the MVC Framework come with .net 3.5? How does AJAX work with all this stuff? Is visual studios team suite worth the time/money? We are moving from regular 2.0 webforms with no testing to TDD MVC and I need to know the lowdowns as in I've never made such a jump before (not that its a huge jump but I'm a nooby programmer that has just graduated college). Looking to move into production sometime next year. | 0 | [
2,
544,
14,
3936,
37,
28,
306,
9,
2328,
172,
9,
387,
20,
28,
306,
9,
2328,
203,
9,
264,
307,
8990,
800,
3726,
3726,
31,
22,
79,
699,
20,
477,
70,
65,
14,
4786,
26,
544,
14,
3936,
37,
172,
9,
387,
20,
203,
9,
264,
307,
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... |
Jython Spliting String Up
===
I am trying to manipulate a string using Jython, I have included below an example string:
This would be a title for a website :: SiteName<br />
This would be a title for a website :: SiteName :: SiteName
I am trying to remove all instances of ":: Sitename" or ":: SiteName :: SiteName", can anyone help me out? Cheers | 0 | [
2,
487,
93,
11570,
2132,
68,
3724,
71,
800,
3726,
3726,
31,
589,
749,
20,
18468,
21,
3724,
568,
487,
93,
11570,
15,
31,
57,
506,
1021,
40,
823,
3724,
45,
48,
83,
44,
21,
581,
26,
21,
2271,
13,
45,
45,
689,
7259,
1,
5145,
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... |
JAVA: How to convert a calendar from one TimeStamp to another
===
I have a Timestamp value that comes from my application. The user can be in any given local TimeZone.
Since this date is used for a WebService that assumes the time given is always in GMT, I have a need to convert the user's parameter from say (EST) to (GMT). Here's the kicker: The user is oblivious to his TZ. He enters the creation date that he wants to send to the WS, so what I need is:
User enters: 5/1/2008 6:42 PM (EST)
The parameter to the WS needs to be: 5/1/2008 6:42 PM (GMT)
I know TimeStamps are always supposed to be in GMT by default, but when sending the parameter, even though I created my Calendar from the TS (which is supposed to be in GMT), the hours are always off unless the user is in GMT. What am I missing?
Timestamp issuedDate = (Timestamp) getACPValue(inputs_, "issuedDate");
Calendar issueDate = convertTimestampToJavaCalendar(issuedDate);
...
private static java.util.Calendar convertTimestampToJavaCalendar(Timestamp ts_) {
java.util.Calendar cal = java.util.Calendar.getInstance(
GMT_TIMEZONE, EN_US_LOCALE);
cal.setTimeInMillis(ts_.getTime());
return cal;
}
| 0 | [
2,
8247,
45,
184,
20,
8406,
21,
7036,
37,
53,
436,
38,
10158,
20,
226,
800,
3726,
3726,
31,
57,
21,
436,
38,
10158,
1923,
30,
1624,
37,
51,
3010,
9,
14,
4155,
92,
44,
19,
186,
504,
375,
85,
11661,
9,
179,
48,
1231,
25,
147,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best way to copy between two Stream instances - C#
===
What is the best way to copy the contents of one stream to another? Is there a standard utility method for this? | 0 | [
2,
246,
161,
20,
4344,
128,
81,
3766,
13946,
13,
8,
272,
5910,
800,
3726,
3726,
98,
25,
14,
246,
161,
20,
4344,
14,
8478,
16,
53,
3766,
20,
226,
60,
25,
80,
21,
1236,
10082,
2109,
26,
48,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
MySQL Fulltext Search Score Explained
===
I've been experimenting with fulltext search lately and am curious about the meaning of the Score value. For example I have the following query:
SELECT table. * ,
MATCH (
col1, col2, col3
)
AGAINST (
'+(Term1) +(Term1)'
) AS Score
FROM table
WHERE MATCH (
col1, col2, col3
)
AGAINST (
'+(Term1) +(Term1)'
)
In the results for Score I've seen results, for one query, between 0.4667041301727 to 11.166275978088. I get that it's MySQLs idea of relevance (the higher the more weight).
What I don't get is how MySQL comes up with that score. Why is the number not returned as a decimal or something besides ?
How come if I run a query "IN BOOLEAN MODE" does the score always return a 1 or a 0 ? Wouldn't all the results be a 1?
Just hoping for some enlightenment. Thanks.
| 0 | [
2,
51,
18,
22402,
503,
11969,
2122,
1618,
2897,
800,
3726,
3726,
31,
22,
195,
74,
5737,
68,
29,
503,
11969,
2122,
10434,
17,
589,
7686,
88,
14,
1813,
16,
14,
1618,
1923,
9,
26,
823,
31,
57,
14,
249,
25597,
45,
5407,
859,
9,
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... |
SQL Server: Make all UPPER case to Proper Case/Title Case
===
I have a table that was imported as all UPPER CASE and I would like to turn it into Proper Case. What script have any of you used to complete this?
Thank you. | 0 | [
2,
4444,
255,
8128,
45,
233,
65,
1508,
610,
20,
4119,
610,
118,
22235,
610,
800,
3726,
3726,
31,
57,
21,
859,
30,
23,
11808,
28,
65,
1508,
610,
17,
31,
83,
101,
20,
805,
32,
77,
4119,
610,
9,
98,
3884,
57,
186,
16,
42,
147,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.