unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Is there a universally accepted value for no value?
===
I've seen N/A (always caps) used most often but I don't know if there is a standard. My data will be seen on Google so I would like to use the most recognized value.
| 0 | [
2,
25,
80,
21,
24365,
2217,
1923,
26,
90,
1923,
60,
800,
3726,
3726,
31,
22,
195,
541,
13,
103,
118,
58,
13,
5,
21284,
9293,
6,
147,
127,
478,
47,
31,
221,
22,
38,
143,
100,
80,
25,
21,
1236,
9,
51,
1054,
129,
44,
541,
27,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... |
How to get 'Next Page' link with Scrubyt
===
I'm trying to use Scrubyt to get the details from this page [http://www.nuffieldtheatre.co.uk/cn/events/event_listings.php?section=events][1]. I've managed to get the titles and detail URLs from the list, but I can't use next_page to get the scraper to go to the next page. I assume that's cause I'm not using the correct pattern for the next page link. I tried the string "Next Page", and I've also tried the XPath. Any other ideas?
The code is below:
require 'rubygems'
require 'scrubyt'
nuffield_data = Scrubyt::Extractor.define do
fetch 'http://www.nuffieldtheatre.co.uk/cn/events/event_listings.php?section=events'
event do
title 'The Coast of Mayo'
#url "href", :type => :attribute
link_url
end
next_page "Next Page", :limit => 2
end
nuffield_data.to_xml.write($stdout,1)
[1]: http://www.nuffieldtheatre.co.uk/cn/events/event_listings.php?section=events
| 0 | [
2,
184,
20,
164,
13,
22,
20021,
2478,
22,
3508,
29,
13371,
93,
38,
800,
3726,
3726,
31,
22,
79,
749,
20,
275,
13371,
93,
38,
20,
164,
14,
3289,
37,
48,
2478,
636,
21127,
6903,
6483,
9,
103,
5532,
1109,
124,
721,
99,
9,
716,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Obfuscate / Mask / Scramble personal information
===
I'm looking for a homegrown way to scramble production data for use in development and test. I've built a couple of scripts that make random social security numbers, shift birth dates, scramble emails, etc. But I've come up against a wall trying to scramble customer names. I want to keep real names so we can still use or searches so random letter generation is out. What I have tried so far is building a temp table of all last names in the table then updating the customer table with a random selection from the temp table. Like this:
DECLARE @Names TABLE (Id int IDENTITY(1,1),[Name] varchar(100))
/* Scramble the last names (randomly pick another last name) */
INSERT @Names SELECT LastName FROM Customer ORDER BY NEWID();
WITH [Customer ORDERED BY ROWID] AS
(SELECT ROW_NUMBER() OVER (ORDER BY NEWID()) AS ROWID, LastName FROM Customer)
UPDATE [Customer ORDERED BY ROWID] SET LastName=(SELECT [Name] FROM @Names WHERE ROWID=Id)
This worked well in test, but completely bogs down dealing with larger amounts of data (>20 minutes for 40K rows)
All of that to ask, how would you scramble customer names while keeping real names and the weight of the production data?
| 0 | [
2,
5122,
13735,
9530,
13,
118,
5983,
13,
118,
23801,
1319,
676,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
213,
16347,
161,
20,
23801,
637,
1054,
26,
275,
19,
522,
17,
1289,
9,
31,
22,
195,
392,
21,
1335,
16,
17505,
30,
233,
54... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it faster to sort a list after inserting items or adding them to a sorted list.
===
If I have a sorted list (say quicksort to sort), if I have a lot of values to add, is it better to suspend sorting, and add them to the end, then sort, or use binary chop to place the items correctly while adding them. Does it make a difference if the items are random, or already more or less in order? | 0 | [
2,
25,
32,
4233,
20,
2058,
21,
968,
75,
14692,
68,
3755,
54,
4721,
105,
20,
21,
22554,
968,
9,
800,
3726,
3726,
100,
31,
57,
21,
22554,
968,
13,
5,
6366,
2231,
22843,
20,
2058,
6,
15,
100,
31,
57,
21,
865,
16,
4070,
20,
3547... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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# - How can I add SqlParameters without knowing the name / type ?
===
I am creating a DB wrapper and am in the need of adding SQL paramters to my stament however I do not know the parameter names or type, how can this be done? I have seen many other libraries do this...
I just want the order of values to be mapped to the stored procedure...I thought the following code would work:
<pre>
public DataTable ExecuteDataTable(string storedProcName, params object[] args)
{
SqlCommand cmd = new SqlCommand(storedProcName, conn);
cmd.CommandType = CommandType.StoredProcedure;
// inserting params like this does not work...
for (int i = 0; i < args.Length; i++)
{
cmd.Parameters.Insert(i, args[0]);
}
DataTable dt = new DataTable();
dt.Load(cmd.ExecuteReader());
return dt;
}
</pre>
Any ideas of how to accomplish this? Note: I know there are other libraries such as the Enterprise Library that already does this, but I'm in a situation where that won't help...
Thanks. | 0 | [
2,
272,
5910,
13,
8,
184,
92,
31,
3547,
4444,
255,
6351,
7307,
18,
366,
2506,
14,
204,
13,
118,
1001,
13,
60,
800,
3726,
3726,
31,
589,
2936,
21,
13,
9007,
28051,
17,
589,
19,
14,
376,
16,
4721,
4444,
255,
2258,
79,
6052,
20,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What's better in regards to performance? type[,] or type[][]?
===
Is it more performant to have a bidemnsional array (type[,]) or an array of arrays (type[][]) in c#?
Particularly for initial allocation and item access | 0 | [
2,
98,
22,
18,
574,
19,
14179,
20,
956,
60,
1001,
2558,
15,
500,
54,
1001,
2558,
500,
2558,
500,
60,
800,
3726,
3726,
25,
32,
91,
2985,
1830,
20,
57,
21,
4458,
1503,
103,
5991,
192,
7718,
13,
5,
4474,
2558,
15,
500,
6,
54,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Howto: Count the items from a IEnumerable<T> without iterating?
===
private IEnumerable<string> Tables
{
get {
yield return "Foo";
yield return "Bar";
}
}
Let's say I want iterate on those and write something like processing #n of #m. Is there a way I can find out the value of m without iterating before my main iteration?
I hope I made myself clear. | 0 | [
2,
184,
262,
45,
2468,
14,
3755,
37,
21,
13,
660,
6336,
106,
579,
1,
38,
1,
366,
32,
106,
1880,
60,
800,
3726,
3726,
932,
13,
660,
6336,
106,
579,
1,
11130,
1,
7484,
13,
1,
164,
13,
1,
11537,
788,
13,
7,
4120,
111,
7,
73,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Show Only One Element with JQuery
===
I need to show only one element at a time when a link is clicked on. Right now i'm cheating by hiding everything again and then toggling the element clicked on. This works, unless i want EVERYTHING to disappear again. Short of adding a "Hide All" button/link what can i do?
Here's what i have so far:
$(document).ready(function(){
//hides everything
$("#infocontent *").hide();
//now we show them by which they click on
$("#linkjoedhit").click(function(event){
$("#infocontent *").hide();
$("#infojoedhit").toggle();
return false;
});
$("#linkgarykhit").click(function(event){
$("#infocontent *").hide();
$("#infogarykhit").toggle();
return false;
});
});
and the html looks like:
<div id="theircrappycode">
<a id="linkjoedhit" href="">Joe D</a><br/>
<a id="linkgarykhit" href="">Gary K</a>
</div>
<div id="infocontent">
<p id="infojoedhit">Information about Joe D Hitting.</p>
<p id="infogarykhit">Information about Gary K Hitting.</p>
</div
there are about 20 links like this. Because i am not coding the actual html, i have no control over the actual layout, which is horrendous. Suffice to say, this is the only way to organize the links/info. | 0 | [
2,
298,
104,
53,
4520,
29,
487,
8190,
93,
800,
3726,
3726,
31,
376,
20,
298,
104,
53,
4520,
35,
21,
85,
76,
21,
3508,
25,
15802,
27,
9,
193,
130,
31,
22,
79,
20091,
34,
5314,
796,
188,
17,
94,
20,
4572,
802,
14,
4520,
15802,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 render contextual difference between two timestamps in JavaScript?
===
Let's say I've got two strings in JavaScript:
var date1 = '2008-10-03T20:24Z'
var date2 = '2008-10-04T12:24Z'
How would I come to a result like so:
'4 weeks ago'
or
'in about 15 minutes'
(should support past and future).
There are solutions out there for the past diffs, but I've yet to find one with support for future time diffs as well.
Bonus points for a jQuery solution. | 0 | [
2,
184,
20,
16535,
4141,
6948,
2841,
128,
81,
436,
4919,
1919,
19,
8247,
8741,
60,
800,
3726,
3726,
408,
22,
18,
395,
31,
22,
195,
330,
81,
7887,
19,
8247,
8741,
45,
4033,
1231,
165,
800,
13,
22,
2753,
8,
1036,
8,
3601,
38,
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... |
Does anyone know of a php framework that would handle progressive enhancement for Flash/Flex content?
===
Ok, I'm using the term "Progressive Enhancement" kind of loosely here but basically I have a Flash-based website that supports deep linking and loads content dynamically - what I'd like to do is provide alternate content (text) for those either not having Flash and for search engine bots. So, for a user with flash they would navigate to:
http://www.samplesite.com/#specific_page
and they would see a flash site that would navigate to the "`specific_page`." Those without flash would see the "`specific_page`" rendered in text in the alternative content section.
Basically, I would use php/mysql to create a backend to handle all of this since the swf is also using dynamic data. The question is, does something out there that does this already exist? | 0 | [
2,
630,
1276,
143,
16,
21,
13,
26120,
6596,
30,
83,
3053,
5546,
19415,
26,
4433,
118,
19752,
2331,
60,
800,
3726,
3726,
5854,
15,
31,
22,
79,
568,
14,
981,
13,
7,
2740,
13026,
1284,
19415,
7,
825,
16,
13166,
235,
47,
11374,
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... |
Unit testing the app.config file with NUnit
===
When you guys are unit testing an application that relies on values from an app.config file? How do you test that those values are read in correctly and how your program reacts to incorrect values entered into a config file?
It would be ridiculous to have to modify the config file for the NUnit app, but I can't read in the values from the app.config I want to test.
| 0 | [
2,
1237,
4431,
14,
4865,
9,
14093,
2816,
3893,
29,
10210,
242,
800,
3726,
3726,
76,
42,
2776,
50,
1237,
4431,
40,
3010,
30,
19272,
27,
4070,
37,
40,
4865,
9,
14093,
2816,
3893,
60,
184,
107,
42,
1289,
30,
273,
4070,
50,
1302,
19... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I include IBM XLC template *.c files in the make dependency file?
===
For the XLC compiler, templated code goes in a *.c file. Then when your program is compiled that uses the template functions, the compiler finds the template definisions in the .c file and instantiates them.
The problem is that these .c files are not by default included when doing an xlC -qmakedepend to generate the build dependencies. So if you change one of those .c files, you won't automatically build everything that depends on it.
Has anyone found a good solution to this problem? | 0 | [
2,
184,
107,
31,
468,
10233,
993,
6109,
22894,
1637,
9,
150,
6488,
19,
14,
233,
26835,
3893,
60,
800,
3726,
3726,
26,
14,
993,
6109,
21486,
15,
22894,
43,
1797,
1852,
19,
21,
1637,
9,
150,
3893,
9,
94,
76,
154,
625,
25,
9316,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
IIS Returning Old User Names to my application
===
Here's my scenario. I created an application which uses Integrated Windows Authentication in order to work. In `Application_AuthenticateRequest()`, I use `HttpContext.Current.User.Identity` to get the current `WindowsPrincipal` of the user of my website.
Now here's the funny part. Some of our users have recently gotten married, and their names change. (i.e. the user's NT Login changes from `jsmith` to `jjones`) and when my application authenticates them, IIS passes me their OLD LOGIN . I continue to see `jsmith` passed to my application until I reboot my SERVER! Logging off the client does not work. Restarting the app pool does not work. Only a full reboot.
Does anyone know what's going on here? Is there some sort of command I can use to flush whatever cache is giving me this problem? Is my server misconfigured?
| 0 | [
2,
595,
18,
2485,
315,
4155,
1817,
20,
51,
3010,
800,
3726,
3726,
235,
22,
18,
51,
12705,
9,
31,
679,
40,
3010,
56,
2027,
5547,
1936,
27963,
19,
389,
20,
170,
9,
19,
13,
1,
2552,
20669,
1,
1346,
2504,
1786,
1373,
99,
10351,
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... |
Parallel HTTP requests in PHP using HTTP classes (not cURL)
===
**Problem**
I'd like to make concurrent/parallel/simultaneous HTTP requests in PHP. I'd like to avoid consecutive requests as:
- a set of requests will take too long to complete; the more requests the longer
- the timeout of one request midway through a set may cause later requests to not be made (if a script has an execution time limit)
I have managed to find details for making [simultaneuos [sic] HTTP requests in PHP with cURL][1], however I'd like to explicitly use PHP's [in-built HTTP functions][2] if at all possible.
Specifically, I need to POST data concurrently to a set of URLs. The URLs to which data are posted are beyond my control; they are user-set.
I don't mind if I need to wait for all requests to finish before the responses can be processed. If I set a timeout of 30 seconds on each request and requests are made concurrently, I know I must wait a maximum of 30 seconds (perhaps a little more) for all requests to complete.
I can find no details of how this might be achieved. However, I did recently notice a mention in the PHP manual of PHP5+ being able to handle concurrent HTTP requests - I intended to make a note of it at the time, forgot, and cannot find it again.
**Single request example (works fine)**
<?php
$request_1 = new HttpRequest($url_1, HTTP_METH_POST);
$request_1->setRawPostData($dataSet_1);
$request_1->send();
?>
**Concurrent request example (incomplete, clearly)**
<?php
$request_1 = new HttpRequest($url_1, HTTP_METH_POST);
$request_1->setRawPostData($dataSet_1);
$request_2 = new HttpRequest($url_2, HTTP_METH_POST);
$request_2->setRawPostData($dataSet_2);
// ...
$request_N = new HttpRequest($url_N, HTTP_METH_POST);
$request_N->setRawPostData($dataSet_N);
// Do something to send() all requests at the same time
?>
Any thoughts would be most appreciated!
[1]: http://www.phpied.com/simultaneuos-http-requests-in-php-with-curl/
[2]: http://php.net/manual/en/book.http.php | 0 | [
2,
3821,
7775,
12279,
19,
13,
26120,
568,
7775,
2684,
13,
5,
1270,
14320,
6,
800,
3726,
3726,
13,
1409,
2740,
2854,
79,
1409,
31,
22,
43,
101,
20,
233,
19513,
118,
6351,
211,
532,
118,
8672,
1287,
11613,
1291,
7775,
12279,
19,
13,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Yahoo Username Regex
===
I need a (php) regex to match Yahoo's username rules:
> Use 4 to 32 characters and start with a letter. You may use letters, numbers, underscores, and one dot (.). | 0 | [
2,
23553,
4155,
7259,
7953,
1706,
800,
3726,
3726,
31,
376,
21,
13,
5,
26120,
6,
7953,
1706,
20,
730,
23553,
22,
18,
4155,
7259,
1761,
45,
13,
1,
275,
268,
20,
2512,
1766,
17,
799,
29,
21,
1748,
9,
42,
123,
275,
2516,
15,
2116... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Does a pom.xml.template tell me everything I need to know to use the project as a dependency
===
I'm trying to add the lucene sandbox contribution called [term-highlighter][1] to my pom.xml.
I'm not really that familiar with Maven, but the code has a [pom.xml.template][2] which
seems to imply if I add a dependency that looks like:
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-highlighter</artifactId>
</dependency>
It might work. Can someone help me out in adding a lucene-community project to my pom.xml file?
[1]: http://lucene.apache.org/java/docs/lucene-sandbox/index.html#Term%20Highlighter
[2]: http://svn.apache.org/repos/asf/lucene/java/trunk/contrib/highlighter/pom.xml.template
| 0 | [
2,
630,
21,
16214,
9,
396,
8184,
9,
9577,
6554,
494,
55,
796,
31,
376,
20,
143,
20,
275,
14,
669,
28,
21,
26835,
800,
3726,
3726,
31,
22,
79,
749,
20,
3547,
14,
18515,
556,
1965,
5309,
5605,
227,
636,
3964,
8,
4542,
3130,
106,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Stop jQuery .load response from being cached
===
I have the following code making a GET request on a URL:
$('#searchButton').click(function() {
$('#inquiry').load('/portal/?f=searchBilling&pid=' + $('#query').val());
});
But the returned result is not always reflected. For example, I made a change in the response that spit out a stack trace but the stack trace did not appear when I clicked on the search button. I looked at the underlying PHP code that controls the ajax response and it had the correct code and visiting the page directly showed the correct result but the output returned by .load was old.
If I close the browser and reopen it it works once and then starts to return the stale information. Can I control this by jQuery or do I need to have my PHP script output headers to control caching? | 0 | [
2,
747,
487,
8190,
93,
13,
9,
8294,
1627,
37,
142,
16522,
43,
800,
3726,
3726,
31,
57,
14,
249,
1797,
544,
21,
164,
3772,
27,
21,
287,
6362,
45,
5579,
5,
22,
5910,
25136,
811,
444,
22,
6,
9,
150,
10129,
5,
22359,
5,
6,
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... |
Static and dynamic library linking
===
In C++, static library A is linked into dynamic libraries B and C. If a class defined in A uses a class defined in B, but not in C, will C link?
I thought the answer was yes, but I am now running into a problem with xlc_r7 where library C says the class referenced in A and defined in B is an undefined symbol, which it is as far as C is concerned. My problem with that is Library C isn't using the class referencing it. This links in Win32 and OpenVMS.
Is this a compiler discrepancy or a PEBCAK? | 0 | [
2,
12038,
17,
7782,
1248,
12585,
800,
3726,
3726,
19,
272,
20512,
15,
12038,
1248,
21,
25,
4727,
77,
7782,
8649,
334,
17,
272,
9,
100,
21,
718,
2811,
19,
21,
2027,
21,
718,
2811,
19,
334,
15,
47,
52,
19,
272,
15,
129,
272,
350... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Restoring UI settings in C# WinForms - which event to respond to?
===
When is the proper time to restore the UI layout settings of a System.Windows.Forms.Control?
I tried this:
FooBarGadget control = new FooBarGadget();
parent.Controls.Add(control);
control.FobnicatorWidth = lastLayoutSettings.FobWidth;
No cigar. Reason? control isn't finished laying out its internals; it's in its default size of 100x100 pixels after construction. Once it's done loading and actually displays in the UI, it will be 500x500 pixels. Therefore, setting the FobnicatorWidth to 200 pixels fails; it's larger than the control.
Is there a control.Loaded event - somwehere where I can restore my saved UI settings? | 0 | [
2,
19144,
13,
5661,
12410,
19,
272,
5910,
628,
4190,
18,
13,
8,
56,
807,
20,
4590,
20,
60,
800,
3726,
3726,
76,
25,
14,
4119,
85,
20,
8454,
14,
13,
5661,
9106,
12410,
16,
21,
329,
9,
27508,
18,
9,
4190,
18,
9,
12898,
60,
31,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to get effect of sorted database view?
===
I'd like to be able to (effectively) sort a database view - I know that conceptually order in a db view is invalid, but I have the following scenario to deal with:
- a third-party legacy application, that reads data from database tables using a select(*) from tablename statement
- the legacy application is very sensitive to the order of the records
- an application I've written to allow users to manage the data in the tables more easily, but inserts and deletes from the table naturally upset the order of the records.
Changing the statement in the legacy application to select (*) from tablename order by field would fix my problem, but isn't an option.
So - I've set up a staging table into which the data can be exported in the right order, but this is a resource-hungry option, means that the data isn't 'live' in the legacy application and is additional work for users.
I'd like to be able to get at an ordered version of the table with these contraints. Any ideas how? | 0 | [
2,
184,
20,
164,
1590,
16,
22554,
6018,
1418,
60,
800,
3726,
3726,
31,
22,
43,
101,
20,
44,
777,
20,
13,
5,
14659,
102,
6,
2058,
21,
6018,
1418,
13,
8,
31,
143,
30,
14425,
102,
389,
19,
21,
13,
9007,
1418,
25,
16671,
15,
47,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Make <h1> tag the same maximum width regardless of capitalization of text within
===
I'm trying to display a series of titles varying from 60 characters to 160 or so and the capitalization varies, some of it all caps, some half caps. When it's mostly lowercase the whole 160 characters of text fits in the width I want, but when it starts getting more caps (they must be wider), it starts over flowing.
Is there a way to use an attractive fixed witdh font (upper and lowercase widths the same too), or dynamically shrink the text to fit, or otherwise recognize how much space the text is going to take on the server side, and cut off the end dynamically? Or do you folks have a better solution? | 0 | [
2,
233,
13,
1,
252,
165,
1,
3383,
14,
205,
2979,
9456,
7148,
16,
1057,
1829,
16,
1854,
363,
800,
3726,
3726,
31,
22,
79,
749,
20,
3042,
21,
231,
16,
3037,
9852,
37,
2083,
1766,
20,
9379,
54,
86,
17,
14,
1057,
1829,
9803,
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... |
Regex for parsing directory and filename
===
I'm trying to write a regex that will parse out the directory and filename of a fully qualified path using matching groups.
so...
/var/log/xyz/10032008.log
would recognize group 1 to be "/var/log/xyz" and group 2 to be "10032008.log"
Seems simple but I can't get the matching groups to work for the life of me. | 0 | [
2,
7953,
1706,
26,
2017,
18,
68,
16755,
17,
3893,
7259,
800,
3726,
3726,
31,
22,
79,
749,
20,
2757,
21,
7953,
1706,
30,
129,
2017,
870,
70,
14,
16755,
17,
3893,
7259,
16,
21,
2337,
3135,
2013,
568,
10120,
1170,
9,
86,
9,
9,
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... |
Memory leaking with [NSKeyedUnarchiver decodeObjectForKey]
===
Every time I call this method my NSMutableData is leaking and I cannot figure out how to plug it. theData's retain count is upped by one after the decoder is allocated and initialized and I have no idea why.
- (void)readVenueArchiveFile:(NSString *)inFile key:(NSString *)inKey
{
NSMutableData *theData;
NSKeyedUnarchiver *decoder;
theData = [NSData dataWithContentsOfFile:inFile];
decoder = [[NSKeyedUnarchiver alloc] initForReadingWithData:theData];
venueIOList = [[decoder decodeObjectForKey:inKey] mutableCopy];
[decoder finishDecoding];
[decoder release];
}
| 0 | [
2,
1912,
26334,
29,
636,
2172,
4237,
69,
1020,
25328,
106,
121,
9375,
23793,
1106,
4237,
500,
800,
3726,
3726,
352,
85,
31,
645,
48,
2109,
51,
13,
2172,
7903,
579,
18768,
25,
26334,
17,
31,
1967,
1465,
70,
184,
20,
10922,
32,
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... |
Memory leak detection while running unit tests
===
I've got a Win32 C++ app with a suite of unit tests. After the unit tests have finished running, I'd like a human-readable report on any unfreed memory to be automatically generated. Ideally, the report will have a stack with files & line number info for each unfreed allocation. It would be nice to have them generated in a consistent order to make it easy to diff it from one run to the next. (Basically, I would like the results of valgrind --leak-check=full, but on windows).
I've had success with UMDH getting this kind of info from running processes, but that tool only seems to work if you attach to an existing process. I want this to happen automatically every time I run my unit tests.
Is there a tool that can do this? If so, how do I use it?
Thanks! | 0 | [
2,
1912,
11724,
11643,
133,
946,
1237,
4894,
800,
3726,
3726,
31,
22,
195,
330,
21,
628,
3125,
272,
20512,
4865,
29,
21,
6160,
16,
1237,
4894,
9,
75,
14,
1237,
4894,
57,
842,
946,
15,
31,
22,
43,
101,
21,
585,
8,
10647,
579,
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... |
Python - How do I write a decorator that restores the cwd?
===
How do I write a decorator that restores the current working directory to what it was before the decorated function was called? In other words, if I use the decorator on a function that does an os.chdir(), the cwd will not be changed after the function is called. | 0 | [
2,
20059,
13,
8,
184,
107,
31,
2757,
21,
17650,
3457,
30,
8454,
18,
14,
15739,
43,
60,
800,
3726,
3726,
184,
107,
31,
2757,
21,
17650,
3457,
30,
8454,
18,
14,
866,
638,
16755,
20,
98,
32,
23,
115,
14,
6933,
1990,
23,
227,
60,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Designing a GUI
===
How would you, as a developer with little (or no) artistic inclination, design a GUI for an application? In particular, I'm thinking about desktop apps but anything that relates to Web apps is welcome as well.
I find it extremely hard to design something that both I and potential users find pleasing. I can look up color schemes on the net, but how would I know where to place buttons/textboxes/etc.? | 0 | [
2,
15026,
21,
9457,
800,
3726,
3726,
184,
83,
42,
15,
28,
21,
10058,
29,
265,
13,
5,
248,
90,
6,
4917,
22893,
15,
704,
21,
9457,
26,
40,
3010,
60,
19,
1498,
15,
31,
22,
79,
1440,
88,
17404,
4865,
18,
47,
602,
30,
16429,
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... |
Is there a way to change something in Tool->Options via a macro?
===
I'd like to be able to toggle easily between two values for "maximum number of parallel project builds" in Visual Studio 2008 (in Tools->Options->Projects and Solutions->Build and Run). (When I'm planning on doing concurrent work I'd like to reduce it from 4 to 3.) I'm not too well versed in writing macros for the IDE. When I try recording a macro, and perform all the actions (open the dialog, change the setting, click OK), the only thing that gets recorded is this:
DTE.ExecuteCommand ("Tools.Options")
Is my goal unattainable? | 0 | [
2,
25,
80,
21,
161,
20,
753,
301,
19,
5607,
8,
1,
25458,
4710,
1197,
21,
9069,
60,
800,
3726,
3726,
31,
22,
43,
101,
20,
44,
777,
20,
20,
263,
4875,
2351,
128,
81,
4070,
26,
13,
7,
8304,
49,
18535,
234,
16,
3821,
669,
1895,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Suggestions for replication of data from MS Sql 2005 and MySql
===
My company currently has a transactional db running on Sql Server 2005. We are going to add a MySql (running on linux) reporting db. We'll need to get replication running from the MS-Sql db to the MySql db. It doesn't have to be real time but should be within a few minutes.
I've got pretty good MSSql Dev skills and so-so dba skills but no MySql background. The MySql guy on our team has no MSSql experience.
I was wondering if anybody has setup anything similar and might have some suggestions. I've seen some things on migrating data between the two but not much for on-going replication. Right now my best guess is to set something up in SSIS and run it under the Sql Agent. I'm going to work on the SSIS idea for now but welcome any suggestions.
Thanks in advance | 0 | [
2,
18389,
26,
23841,
16,
1054,
37,
4235,
4444,
255,
812,
17,
51,
18,
22402,
800,
3726,
3726,
51,
237,
871,
63,
21,
12799,
192,
13,
9007,
946,
27,
4444,
255,
8128,
812,
9,
95,
50,
228,
20,
3547,
21,
51,
18,
22402,
13,
5,
11325,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 big is too big for XP/SCRUM?
===
In the earliest stages of planning the development of a new system, which development model to follow seems paramount. I've always held onto the belief that a classic waterfall (or hybrid waterfall/iterative prototyping) is the best approach for medium to large projects. It seems that once a project gets to be a certain size, the Agile/XP/Scrum paradigms can't account for complex requirements, a large team, the complexities between multiple sub-systems, the need for documentation, personnel changes, etc, etc.
What's the limit of such agile methodologies in terms of system size, team size, LOC, etc? | 0 | [
2,
184,
580,
25,
266,
580,
26,
23045,
118,
18,
25241,
60,
800,
3726,
3726,
19,
14,
4448,
4891,
16,
2334,
14,
522,
16,
21,
78,
329,
15,
56,
522,
1061,
20,
1740,
2206,
13195,
9,
31,
22,
195,
550,
269,
1204,
14,
5765,
30,
21,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a "poor man's" alternative to RedGate for scripting out entire database schema?
===
I'm in a situation where I would to generate a script for a database that I could run on another server and get a database identical to the original one, but without any of the data. In essence, I want to end up with a big create script that captures the database schema.
I am working in an environment that has SQL Server 2000 installed, and I am unable to install the 2005 client tools (in the event that they would help). I can't afford RedGate, but I really would like to have a database with identical schema on another server.
Any suggestions? Any tools, tips, or T-SQL tricks would be much appreciated. | 0 | [
2,
25,
80,
21,
13,
7,
15979,
169,
22,
18,
7,
2676,
20,
402,
3322,
26,
3884,
68,
70,
1078,
6018,
23874,
60,
800,
3726,
3726,
31,
22,
79,
19,
21,
1858,
113,
31,
83,
20,
7920,
21,
3884,
26,
21,
6018,
30,
31,
110,
485,
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... |
Binding a socket to port 80 in ansi c
===
When I try to bind port 80 to a socket in c, i always get the error, that I don't have permission to use this port. is there an easy way to get this permission? | 0 | [
2,
8728,
21,
18482,
20,
1295,
2972,
19,
40,
18,
49,
272,
800,
3726,
3726,
76,
31,
1131,
20,
10193,
1295,
2972,
20,
21,
18482,
19,
272,
15,
31,
550,
164,
14,
7019,
15,
30,
31,
221,
22,
38,
57,
5572,
20,
275,
48,
1295,
9,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... |
Factoring web services?
===
What are some guidelines for factoring of web services? On one extreme you have different procedures for every operation, and expose all types through WSDL. This seems to result in the WS interface changing as often as the business logic. On the other, a generic interface where the types and validation are performed a layer down from the WS interface. This second option seems to provide more interface stability, and other possibilities such as service chaining. I've flip-flopped between the two on multiple projects, and wanted some feedback on how others have approached this. | 0 | [
2,
3932,
68,
2741,
687,
60,
800,
3726,
3726,
98,
50,
109,
12629,
26,
3932,
68,
16,
2741,
687,
60,
27,
53,
4750,
42,
57,
421,
8876,
26,
352,
1453,
15,
17,
13833,
65,
2551,
120,
619,
18,
8643,
9,
48,
2206,
20,
829,
19,
14,
619... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What's the right way to display emoticons?
===
In your own application that is.
The problem more complex than it would initially seem, especially when you take into account editing, word wrapping, variable width fonts, and color emoticons.
**So my question is really to people who have done this, have you come up with a satisfactory way of rendering emoticons that isn't just one massive hack?**
To start the discussion:
In two implementations I've tried the following approaches.
In a 3D application where lines of text where rendered to "textures"; I replaced emoticon strings with images, matching the type of the text renders, so the emoticon becomes just another element of the text.
Essentially the text rendering engine had to be modified at the deepest levels. This produces good results, but is very time consuming, and very hard to get right (Or at least for me anyway ;P)
In the second approach (With a different language and platform) I decided to try a higher-level "fake" by replacing emoticon strings with a single character and drawing emotions over the replaced character. This of course has lots of limitations, but has the benefit of being fairly fast to implement, and it's possible to reach a reasonably stable state without an excess of effort.
| 0 | [
2,
98,
22,
18,
14,
193,
161,
20,
3042,
3579,
9440,
4710,
60,
800,
3726,
3726,
19,
154,
258,
3010,
30,
25,
9,
14,
1448,
91,
1502,
119,
32,
83,
1537,
2260,
15,
1118,
76,
42,
247,
77,
2176,
9510,
15,
833,
13437,
15,
7612,
9456,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
unexpected T_CONCAT_EQUAL
===
I'm getting an unexpected T_CONCAT_EQUAL error on a line of the following form:
$arg1 .= "arg2".$arg3."arg4";
I'm using PHP5. I could simply go an do the following:
$arg1 = $arg1."arg2".$arg3."arg4";
but I'd like to know whats going wrong in the first place. Any ideas?
Thanks,
sweeney
| 0 | [
2,
9380,
13,
38,
1,
1126,
5782,
1,
62,
14512,
800,
3726,
3726,
31,
22,
79,
1017,
40,
9380,
13,
38,
1,
1126,
5782,
1,
62,
14512,
7019,
27,
21,
293,
16,
14,
249,
505,
45,
5579,
10663,
165,
13,
9,
3726,
13,
7,
10663,
135,
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... |
Set server or workstation GC
===
How can I configure an application, or even an entire machine, to use either the server or workstation flavor of the CLR's garbage collection? | 0 | [
2,
309,
8128,
54,
170,
10839,
13,
10362,
800,
3726,
3726,
184,
92,
31,
1065,
15951,
40,
3010,
15,
54,
166,
40,
1078,
1940,
15,
20,
275,
694,
14,
8128,
54,
170,
10839,
11974,
16,
14,
10842,
139,
22,
18,
15024,
1206,
60,
3,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
SetCursor reverts after a mouse move
===
I am using SetCursor to set the system cursor to my own image. The code looks something like this:
HCURSOR cur = LoadCursorFromFile("somefilename.cur");
SetCursor(cur);
When I do this the cursor does change, but on the first mouse move message it changes back to the default system arrow cursor. This is the only code in the project that is setting the cursor. What do I need to do to make the cursor stay the way I set it?
| 0 | [
2,
309,
4734,
18,
248,
24156,
18,
75,
21,
7567,
780,
800,
3726,
3726,
31,
589,
568,
309,
4734,
18,
248,
20,
309,
14,
329,
29588,
20,
51,
258,
1961,
9,
14,
1797,
1879,
301,
101,
48,
45,
746,
4734,
18,
248,
5087,
800,
6305,
4734... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 disable the "smart insert" function that is bound to the Tab key in the Visual Studio emacs mode?
===
In both the Visual Studio emacs mode and the default mode the tab key is bound to Edit.InsertTab. However, in the emacs mode the tab button jumps to where it expects the next line to start instead of inserting a tab.
Is there a way to disable this "smart insert" while keeping the emacs key bindings? | 0 | [
2,
184,
107,
31,
1460,
579,
14,
13,
7,
18,
9534,
14692,
7,
1990,
30,
25,
4138,
20,
14,
6523,
1246,
19,
14,
3458,
1120,
13,
62,
6893,
18,
3740,
60,
800,
3726,
3726,
19,
156,
14,
3458,
1120,
13,
62,
6893,
18,
3740,
17,
14,
128... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Should I convert from MooTools to jQuery?
===
I have a fairly large codebase that depends on MooTools v1.11 and am about to convert to version 1.2. Since this is a pretty major overhaul, I've toyed with the idea of converting to jQuery.
Anyone have advice on whether to update to jQuery or just stick with MooTools? | 0 | [
2,
378,
31,
8406,
37,
13,
8765,
20799,
18,
20,
487,
8190,
93,
60,
800,
3726,
3726,
31,
57,
21,
6647,
370,
1797,
8436,
30,
9597,
27,
13,
8765,
20799,
18,
566,
165,
9,
1306,
17,
589,
88,
20,
8406,
20,
615,
137,
9,
135,
9,
179,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Asp.Net 2 Custom Server Controls Properties
===
I am having a very hard time finding a standard pattern / best practice that deals with rendering child controls inside a composite based on a property value.
Here is a basic scenario. I have a Composite Control that has two child controls, a textbox and a dropdown. Lets say there is a property that toggles which child to render.
so:
myComposite.ShowDropdown = true;
If true, it shows a dropdown, otherwise it shows the textbox.
The property value should be saved across postbacks, and the the correct control should be displayed based on the postback value.
Any good examples out there?
| 0 | [
2,
28,
306,
9,
2328,
172,
5816,
8128,
8671,
3704,
800,
3726,
3726,
31,
589,
452,
21,
253,
552,
85,
3007,
21,
1236,
3732,
13,
118,
246,
1345,
30,
10342,
29,
15307,
850,
8671,
572,
21,
12639,
432,
27,
21,
1354,
1923,
9,
235,
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... |
Scroll of a texbox always on bottom
===
There is a way to keep the scroll on bottom for a multi line textbox?
Something like in the vb6
txtfoo.selstart=len(txtfoo.text)
I'm trying with txtfoo.selectionstart=txtfoo.text.length without success.
Regards.
| 0 | [
2,
12159,
16,
21,
14012,
5309,
550,
27,
2129,
800,
3726,
3726,
80,
25,
21,
161,
20,
643,
14,
12159,
27,
2129,
26,
21,
1889,
293,
1854,
5309,
60,
301,
101,
19,
14,
13,
20468,
379,
20225,
11720,
4328,
9,
3434,
13680,
3726,
2284,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to communicate with an Arduino over it's serial interface in C++ on Linux?
===
I have an RFID reader connected to an Arduino board. I'd like to connect to it over it's serial interface, and whenever the RFID reader omits a signal ( when it has read an (RF)ID ), I'd like to retrieve it in my C++ program.
I already have the code for simply printing the RFID to serial from the Arduino.
What I don't know, is *how to read it from C++* in Linux ?
I have looked at **libserial**, which looks straightforward. However, how can I *have the C++ program react to a signal and then read the RFID*, instead of listening continously? Is this necessary? | 0 | [
2,
184,
20,
8709,
29,
40,
13,
1514,
291,
3252,
84,
32,
22,
18,
5956,
6573,
19,
272,
20512,
27,
13024,
60,
800,
3726,
3726,
31,
57,
40,
761,
15817,
7765,
2587,
20,
40,
13,
1514,
291,
3252,
686,
9,
31,
22,
43,
101,
20,
6379,
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... |
ActionScript 3.0 + Calculate timespan between two dates?
===
In ActionScript 3.0, is there an automatic way to calculate the number of days, hours, minutes and seconds between two specified dates?
Basicly, what I need is the ActionScript equivalent of the .NET Timespan class.
Any idea? | 0 | [
2,
1028,
8741,
203,
9,
387,
2754,
18469,
436,
3206,
128,
81,
4076,
60,
800,
3726,
3726,
19,
1028,
8741,
203,
9,
387,
15,
25,
80,
40,
6715,
161,
20,
18469,
14,
234,
16,
509,
15,
974,
15,
902,
17,
2582,
128,
81,
9931,
4076,
60,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Server-side Report in Crystal 2008?
===
I am looking to integrate Crystal Reports 2008 into a Windows Forms application. I would like to avoid direct connections from my client application to the database, while giving the user the "complete" report experience. Is it possible to for Crystal Reports 2008 to execute a report on a server into a client-side Windows Forms client control, similar to Microsoft Reporting Services? | 0 | [
2,
8128,
8,
1416,
1330,
19,
4282,
570,
60,
800,
3726,
3726,
31,
589,
699,
20,
18399,
4282,
2813,
570,
77,
21,
1936,
1997,
3010,
9,
31,
83,
101,
20,
2658,
1744,
6760,
37,
51,
6819,
3010,
20,
14,
6018,
15,
133,
1438,
14,
4155,
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... |
Where to find like-minded FOSS developers?
===
I have started work on an open-source project and I'd like to find related projects and people that want to work on something similar. Is there a site for finding such people?
The idea is a multi-syntax extensible .NET compiler framework, in case those people are here. | 0 | [
2,
113,
20,
477,
101,
8,
12693,
13,
15912,
10168,
60,
800,
3726,
3726,
31,
57,
373,
170,
27,
40,
368,
8,
12097,
669,
17,
31,
22,
43,
101,
20,
477,
1597,
2314,
17,
148,
30,
259,
20,
170,
27,
301,
835,
9,
25,
80,
21,
689,
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... |
If you are using getters and setters, how should you name the private member variables?
===
As kind of a follow up to [this question about prefixes][1], I agree with most people on the thread that prefixes are bad. But what about if you are using getters and setters? Then you need to differeniate the publicly accessible getter name from the privately stored variable. I normally just use an underscore, but is there a better way?
[1]: http://stackoverflow.com/questions/111605/what-kind-of-prefix-do-you-use-for-member-variables | 0 | [
2,
100,
42,
50,
568,
164,
6052,
17,
309,
6052,
15,
184,
378,
42,
204,
14,
932,
322,
12157,
60,
800,
3726,
3726,
28,
825,
16,
21,
1740,
71,
20,
636,
1565,
1301,
88,
14315,
160,
500,
2558,
165,
500,
15,
31,
4524,
29,
127,
148,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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# equivalent of sql server's IsNull() function
===
In sql server you can use the IsNull funtion to check if a value is null. I am wondering if there is anything similar in C#, rather than manually checking:
For eg:
myNewValue = IsNull(myValue, new MyValue());
instead of:
if (myValue == null)
myValue = new MyValue();
myNewValue = myValue;
Thanks. | 0 | [
2,
272,
5910,
4602,
16,
4444,
255,
8128,
22,
18,
25,
4215,
211,
5,
6,
1990,
800,
3726,
3726,
19,
4444,
255,
8128,
42,
92,
275,
14,
25,
4215,
211,
2414,
3309,
20,
2631,
100,
21,
1923,
25,
16203,
9,
31,
589,
5712,
100,
80,
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... |
Initializing C# auto-properties
===
I'm used to writing classes like this:
public class foo {
private string mBar = "bar";
public string Bar {
get { return mBar; }
set { mBar = value; }
}
//... other methods, no constructor ...
}
Converting Bar to an auto-property seems convenient and concise, but how can I retain the initialization without adding a constructor and putting the initialization in there?
public class foo {
//private string mBar = "bar";
public string Bar { get; set; }
//... other methods, no constructor ...
//behavior has changed.
}
| 0 | [
2,
2104,
3335,
272,
5910,
3108,
8,
10890,
106,
3915,
800,
3726,
3726,
31,
22,
79,
147,
20,
1174,
2684,
101,
48,
45,
317,
718,
4310,
111,
13,
1,
932,
3724,
307,
1850,
800,
13,
7,
1850,
7,
73,
317,
3724,
748,
13,
1,
164,
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... |
How do you get a System.Web.HttpWebRequest object to use SSL 2.0?
===
I don't know if I have all the information needed to phrase this question well, so bear with me.
I have a local web page (local meaning 192.168.*) that is protected with a self-signed SSL cert. I'm trying to access this page using a System.Net.HttpWebRequest object, but I'm running into a weird problem.
If this page is accessed in Internet Explorer with the "Use SSL 2.0" option turned off, the browser returns back an error as if it can't establish a connection. (In other words, a browser connection error, as opposed to a server-sent error.) If the "Use SSL 2.0" option is turned on, the page works fine and you get the standard warning that this is a self-signed cert, do you want to continue, etc. (Oddly enough, Firefox, which supposedly does not have SSL 2.0 turned on, works just fine.)
Now my problem is that I'm trying to access this page with an HttpWebRequest object and the error it's returning back is that the connection has been unexpectedly closed, just like the error IE throws when "Use SSL 2.0" is turned off. (I already have code in place to ignore the fact that it's a self-signed cert, but it's not even getting that far.)
How do I get the System.Net.HttpWebRequest to, well, "Use SSL 2.0" when it's making its request?
| 0 | [
2,
184,
107,
42,
164,
21,
329,
9,
14113,
9,
21127,
458,
3692,
10351,
3095,
20,
275,
13,
18,
18,
255,
172,
9,
387,
60,
800,
3726,
3726,
31,
221,
22,
38,
143,
100,
31,
57,
65,
14,
676,
851,
20,
6845,
48,
1301,
134,
15,
86,
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... |
MySQL: Conditionally selecting next and previous rows.
===
http://thedailywtf.com/Articles/The-Hot-Room.aspx
You see how at the bottom there're links to the next and previous articles ("Unprepared For Divide_By_Zero" and "A Completely Different Game")? How do I do that, but selecting the next and previous non-private articles? This works for selecting the next article:
SELECT * FROM articles WHERE id > ? AND private IS NULL
But I cannot find a way to select the previous article.
What is the proper/efficient way to do this, preferably in one query? | 0 | [
2,
51,
18,
22402,
45,
2874,
1326,
20764,
328,
17,
1158,
11295,
9,
800,
3726,
3726,
7775,
6903,
124,
9394,
102,
499,
11720,
9,
960,
118,
20360,
18,
118,
124,
8,
7010,
8,
4447,
9,
472,
306,
396,
42,
196,
184,
35,
14,
2129,
80,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Merging Rails databases
===
I have two databases with the same structure. The tables have an integer as a primary key as used in Rails.
If I have a patients table, I will have one patient using primary key 123 in one database and another patient using the same primary key in the other database.
What would you suggest for merging the data from both databases?
| 0 | [
2,
18842,
2240,
18,
6018,
18,
800,
3726,
3726,
31,
57,
81,
6018,
18,
29,
14,
205,
1411,
9,
14,
7484,
57,
40,
13820,
28,
21,
1256,
1246,
28,
147,
19,
2240,
18,
9,
100,
31,
57,
21,
3586,
859,
15,
31,
129,
57,
53,
4836,
568,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Http Streaming Comet possible in Safari?
===
By HTTP Streaming Comet, I mean the "forever iframe" / "forever xhr" variations that don't close the connection after data has been pushed from the server, as opposed to standard polling and long polling which close and resend a new request for every server push event.
I looked at the dojo.io.cometd package and it seems they only have polling implementations. I also found [this example][1], but it doesn't seem to work in webkit even after a fair bit of tinkering (I got it to work everywhere else). [This announcement from the safari blog][2] seems to suggest that it's possible with xhr, but I couldn't find any code or documentation, nor I could get it to work.
Does anyone know of a technique, script, library or demo that accomplishes HTTP streaming comet in Webkit browsers (Safari and Chrome)?
[1]: http://www.zeitoun.net/articles/comet_and_php/start
[2]: http://simonwillison.net/2007/Nov/16/ | 0 | [
2,
25,
7775,
11920,
15625,
938,
19,
25055,
60,
800,
3726,
3726,
34,
7775,
11920,
15625,
15,
31,
884,
14,
13,
7,
1106,
5221,
31,
8361,
7,
13,
118,
13,
7,
1106,
5221,
993,
3112,
7,
8194,
30,
221,
22,
38,
543,
14,
2760,
75,
1054,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What coding projects are used to create art and beauty?
===
Today the blinkenlights [stereoscope][1] project starts as part of the [nuit blanche][2] art event in Toronto. The Toronto city hall is transferred into a giant matrix display. There are [tools][3] to create custom animations and an [iphone application][4] to view the live stream.
![blinkenlights][5]
I think this is a great example of using technology for art and beauty. What other coding/programming projects are out there for the sake of art and beauty?
[1]: http://blinkenlights.net/stereoscope
[2]: http://www.scotiabanknuitblanche.ca/
[3]: http://blinkenlights.net/stereoscope/create
[4]: http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=291807780&mt=8
[5]: http://static.flickr.com/3232/2909334414_331d1aff43.jpg | 0 | [
2,
98,
13,
15458,
2314,
50,
147,
20,
1600,
415,
17,
3679,
60,
800,
3726,
3726,
786,
14,
11718,
219,
15413,
636,
1911,
3894,
11555,
500,
2558,
165,
500,
669,
3244,
28,
141,
16,
14,
636,
23029,
38,
16768,
500,
2558,
135,
500,
415,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 this an acceptable way to make a simple "scheduler" in C#?
===
I'm making a simple scheduler with C# in .Net. All it does is execute a simple select statement on a table in a SQL Server DB once per minute (this does not need to scale or anything... the db does not have a high load). Here is my proposed implementation:
static void Main(string[] args)
{
while (true)
{
System.Threading.Thread.Sleep(timeout); // timeout is, say, 60000
CheckTable();
}
}
Is this ok? What is a better way?
p.s. Someone suggested using the Windows Forms Timer class... however that seems like overkill.
Cheers! | 0 | [
2,
25,
48,
40,
12513,
161,
20,
233,
21,
1935,
13,
7,
7526,
11203,
106,
7,
19,
272,
5910,
60,
800,
3726,
3726,
31,
22,
79,
544,
21,
1935,
4345,
139,
29,
272,
5910,
19,
13,
9,
2328,
9,
65,
32,
630,
25,
15644,
21,
1935,
5407,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ReSharper-- Unstable for anybody else?
===
I have seen Jetbrain's ReSharper tool on many "must-have" tool lists. I've installed it on a few occasions over the last few years and it's turned my Visual Studio sluggish and erratic. I generally uninstall it after a week or two because it make VS flaky, I want to like it, but I can't get past the instability.
So what's the deal? Am I having bad luck? Does the tool have issues but the usefulness out weighs the issues? Anyone else out there have trouble with it? Are there some troublesome options to turn off?
| 0 | [
2,
302,
23646,
106,
8,
8,
16571,
26,
11181,
962,
60,
800,
3726,
3726,
31,
57,
541,
4797,
20128,
22,
18,
302,
23646,
106,
5607,
27,
151,
13,
7,
3605,
38,
8,
5815,
7,
5607,
7227,
9,
31,
22,
195,
4066,
32,
27,
21,
310,
5795,
84... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 the #region directive really useful in .NET?
===
After maintaining lots of code littered with #region (in both C# and VB.NET), it seems to me that this construct is just a bunch of "make work" for the programmer. It's work to PUT the dang things into the code, and then they make searching and reading code very annoying.
What are the benefits? Why do coders go to the extra trouble to put this in their code.
Make me a believer! | 0 | [
2,
25,
14,
6926,
18790,
15626,
510,
4811,
19,
13,
9,
2328,
60,
800,
3726,
3726,
75,
8215,
7503,
16,
1797,
26851,
29,
6926,
18790,
13,
5,
108,
156,
272,
5910,
17,
13,
20468,
9,
2328,
6,
15,
32,
2206,
20,
55,
30,
48,
6960,
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... |
Can I use Collections.EMPTY_LIST wihout an UncheckedException?
===
Is there a Generics Friendly way of using Collection.EMPTY_LIST in my Java Program.
I know I could just declare one myself, but I'm just curious to know if there's a way in the JDK to do this.
Something like `users = Collections<User>.EMPTY_LIST;` | 0 | [
2,
92,
31,
275,
5721,
9,
26542,
1,
5739,
4807,
24220,
40,
367,
12542,
69,
10066,
872,
60,
800,
3726,
3726,
25,
80,
21,
12733,
18,
4753,
161,
16,
568,
1206,
9,
26542,
1,
5739,
19,
51,
8247,
625,
9,
31,
143,
31,
110,
114,
10123,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I get modrewrite to not apply rules to a specific folder?
===
How do I get modrewrite to ENTIRELY ignore the /vip/ directory so that all requests pass directly to the folder?
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^vip/.$ - [PT]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
See also http://stackoverflow.com/questions/163302/how-do-i-ignore-a-directory-in-modrewrite -- reposting because I wasn't sufficiently clear about the problem first time around. | 0 | [
2,
184,
107,
31,
164,
7226,
99,
23716,
20,
52,
5645,
1761,
20,
21,
1903,
19294,
60,
800,
3726,
3726,
184,
107,
31,
164,
7226,
99,
23716,
20,
2894,
7174,
14,
13,
118,
1755,
306,
118,
16755,
86,
30,
65,
12279,
1477,
1703,
20,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Understanding dlls and how they work in Visual Studio
===
Does anyone have a good resource on dlls and how they are used / generated in Visual Studio? A few questions I'm rather hazy on specifically are:
- How refresh files work
- How dll version numbers are generated
- The difference between adding a reference by project vs browsing for the specific dll
Any other tips are welcome as well. | 0 | [
2,
3260,
13,
43,
211,
18,
17,
184,
59,
170,
19,
3458,
1120,
800,
3726,
3726,
630,
1276,
57,
21,
254,
6577,
27,
13,
43,
211,
18,
17,
184,
59,
50,
147,
13,
118,
6756,
19,
3458,
1120,
60,
21,
310,
2346,
31,
22,
79,
864,
27538,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What are some good java make utilities?
===
I'm looking for a make utility for building large java programs. I'm aware of ANT already, but want to see what else is available.
Ideally, it should be able to handle the .java->.class package directory weirdness that fouls up GNU Make.
Win32, but cross platform is a plus. | 0 | [
2,
98,
50,
109,
254,
8247,
233,
19817,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
233,
10082,
26,
353,
370,
8247,
1726,
9,
31,
22,
79,
3854,
16,
40,
38,
614,
15,
47,
259,
20,
196,
98,
962,
25,
904,
9,
5628,
102,
15,
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... |
$SAFE on ruby
===
I want to be able to run unstrusted ruby code. I want to be able to pass variables to said untrusted code that it may use. I also want said code to return a result to me. Here is a conceptual example of what I am thinking
input = "sweet"
output = nil
Thread.start {
$SAFE = 4
#... untrusted code goes here, it uses the input variable(s)
#to calculate some result that it places in the output variable
}
#parse the output variable as a string.
Just to clarify, I am basically using the untrusted code as a function. I want to
provide its some inputs, and then allow it to write to the output. That is all I really want, I don't care how it is done, I just want the ability to use untrusted Ruby code as a sort of function. The solution does not have to look anything like the code I wrote above, I am just using it to illustrate what I want.
Now, I can currently think of 3 ways to do this:
1. Use the $SAFE level construct above.
2. whytheluckystiff has a Sandbox plugin for ruby
3. I could run each function in its own virtual machine, using some sort of os virtualization software like vmware or Xen or something.
I am wondering if anyone has any recommendations for running untrusted ruby code in a functional way? What option would you recomend? How would you go about it? Thanks. | 0 | [
2,
5579,
18166,
27,
10811,
800,
3726,
3726,
31,
259,
20,
44,
777,
20,
485,
367,
18,
11592,
69,
10811,
1797,
9,
31,
259,
20,
44,
777,
20,
1477,
12157,
20,
87,
367,
11592,
69,
1797,
30,
32,
123,
275,
9,
31,
67,
259,
87,
1797,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using Resharper? Time Saver?
===
I have installed Resharper and "played" with it twice now. I have always found it annoying and that it got in the way of the Hotkeys I was already using in Visual Studio. The people that use it tend to swear by it. My question is:
For those of you that do use it, where do you find it saves you the most time or what do you think its best feature is? Please be specific. | 0 | [
2,
568,
302,
23646,
106,
60,
85,
2079,
139,
60,
800,
3726,
3726,
31,
57,
4066,
302,
23646,
106,
17,
13,
7,
11061,
7,
29,
32,
2088,
130,
9,
31,
57,
550,
216,
32,
17610,
17,
30,
32,
330,
19,
14,
161,
16,
14,
1047,
4237,
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... |
Extending Java Web Applications with plugins
===
I have this web application that has grown to an unmanageable mess.
I want to split it into a common "framework" part (that still includes web stuff like pages and images) and several modules that add extra functionality and screens. I want this refactoring to also be useful as a plugin system for third-party extensions.
All modules need to be separate unit of deployments, ideally a war or jar file.
I tried to just make several regular war files, but Tomcat keeps (according to the servlet spec) these war files completely separate from each-other, so that they cannot share their classes, for example.
I need to plugins to be able to see the "main" classpath.
I need to main application to have some control over the plugins, such as being able to list them, and set their configuration.
I would like to maintain complete separation between the plugins themselves (unless they specify dependencies) and any other unrelated web applications that may be running on the same Tomcat.
I would like them to be rooted under the "main" application URL prefix, but that is not necessary.
I would like to use Tomcat (big architectural changes need to be coordinated with too many people), but also to hear about a clean solution in the EJB or OSGi world if there are.
| 0 | [
2,
8176,
8247,
2741,
3767,
29,
10922,
108,
18,
800,
3726,
3726,
31,
57,
48,
2741,
3010,
30,
63,
3651,
20,
40,
367,
177,
1303,
579,
3957,
9,
31,
259,
20,
2132,
32,
77,
21,
757,
13,
7,
8361,
3783,
7,
141,
13,
5,
887,
174,
1103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Simple way to programically get all stored procedures
===
Is there a way to get stored procedures from a SQL 2005 Express database using C#? I would like to export all of this data in the same manner that you can script it our using SQL Management Studio, without having to install the GUI.
I've seen some references to do thing via the PowerShell but in the end a C# console app is what I really want. | 0 | [
2,
1935,
161,
20,
625,
8438,
164,
65,
8214,
8876,
800,
3726,
3726,
25,
80,
21,
161,
20,
164,
8214,
8876,
37,
21,
4444,
255,
812,
2999,
6018,
568,
272,
5910,
60,
31,
83,
101,
20,
7487,
65,
16,
48,
1054,
19,
14,
205,
3832,
30,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a Timer class in C# that isn't in the Windows.Forms namespace?
===
I want to use a timer in my simple .Net application written in C#. The only one I can find is the Windows.Forms.Timer class. I don't want to reference this namespace just for my console app.
Is there a C# Timer (or Timer like) class for use in Console apps? | 0 | [
2,
25,
80,
21,
85,
139,
718,
19,
272,
5910,
30,
2532,
22,
38,
19,
14,
1936,
9,
4190,
18,
204,
5582,
60,
800,
3726,
3726,
31,
259,
20,
275,
21,
85,
139,
19,
51,
1935,
13,
9,
2328,
3010,
642,
19,
272,
5910,
9,
14,
104,
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... |
Padding - Encryption algorithm
===
I'm writing an implementation of the XXTEA encryption algorithm that works on "streams", ie, can be used like: crypt mykey < myfile > output.
One of the requisites is that it doesn't have access to the file at all (it only reads an fixed size block until find an EOF). The algorithm needs that the data bytes is multiple of 4, so its needed to add a padding.
For plain text a good solution is to pad with NULLs, and in the decryption just ignore the NULLs, but the same strategy cannot be used for binary streams (that can contain embedded NULLs).
I've read the common solutions, like padding with the number of missing chars (if it miss 3 chars, then append an 3, 3, 3 at the end) and etc, but I wonder: theres a more elegant solution? | 0 | [
2,
4432,
3258,
13,
8,
24420,
9083,
800,
3726,
3726,
31,
22,
79,
1174,
40,
6123,
16,
14,
13,
8962,
12265,
24420,
9083,
30,
693,
27,
13,
7,
11260,
18,
7,
15,
13,
660,
15,
92,
44,
147,
101,
45,
13,
11435,
51,
4237,
13,
1,
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... |
Why isn't my custom WCF behavior extension element type being found?
===
I have a solution that contains two projects. One project is an ASP.NET Web Application Project, and one is a class library. The web application has a project reference to the class library. Neither of these is strongly-named.
In the class library, which I'll call "Framework," I have an endpoint behavior (an IEndpointBehavior implementation) and a configuration element (a class derived from BehaviorExtensionsElement). The configuration element is so I can attach the endpoint behavior to a service via configuration.
In the web application, I have an AJAX-enabled WCF service. In web.config, I have the AJAX service configured to use my custom behavior. The system.serviceModel section of the configuration is pretty standard and looks like this:
<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="MyEndpointBehavior">
<enableWebScript />
<customEndpointBehavior />
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<services>
<service name="WebSite.AjaxService">
<endpoint
address=""
behaviorConfiguration="MyEndpointBehavior"
binding="webHttpBinding"
contract="WebSite.AjaxService" />
</service>
</services>
<extensions>
<behaviorExtensions>
<add
name="customEndpointBehavior"
type="Framework.MyBehaviorExtensionsElement, Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
</behaviorExtensions>
</extensions>
</system.serviceModel>
At runtime, this works perfectly. The AJAX enabled WCF service correctly uses my custom configured endpoint behavior.
The problem is when I try to add a new AJAX WCF service. If I do Add -> New Item... and select "AJAX-enabled WCF Service," I can watch it add the .svc file and codebehind, but when it gets to updating the web.config file, I get this error:
> The configuration file is not a valid configuration file for WCF Service Library.
> The type 'Framework.MyBehaviorExtensionsElement, Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' registered for extension 'customEndpointBehavior' could not be loaded.
Obviously the configuration is entirely valid since it works perfectly at runtime. If I remove the <customEndpointBehavior /> element from my behavior configuration temporarily and then add the AJAX-enabled WCF Service, everything goes without a hitch.
Unfortunately, in a larger project where we will have multiple services with various configurations, removing all of the custom behaviors temporarily is going to be error prone. While I realize I could go without using the wizard and do everything manually, not everyone can, and it'd be nice to be able to just use the product as it was meant to be used - wizards and all.
**Why isn't my custom WCF behavior extension element type being found?** | 0 | [
2,
483,
2532,
22,
38,
51,
5816,
11801,
410,
3257,
3896,
4520,
1001,
142,
216,
60,
800,
3726,
3726,
31,
57,
21,
4295,
30,
1588,
81,
2314,
9,
53,
669,
25,
40,
28,
306,
9,
2328,
2741,
3010,
669,
15,
17,
53,
25,
21,
718,
1248,
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... |
.NET Usercontrols telerik devexpress infragistics ComponentOne whos best
===
I am considering the purchase of some .NET user controls with interest in both WinForms and asp.net. I have trialed in the past devexpress when I needed a hierarchical data grid for a personal project which I was impressed with. Rather than just jump for them I am interested in peoples experience of different products such as:<br><br>
Telerik<br>Dev Express<br>Infragistics<br>
ComponentOne<br>
Any Others?<br><br>
I would like peoples opinions on:<br>
- Features Set and Number of Controls<br>
- Installation and Upgrade<br>
- Ease of use<br>
- Documentation<br>
- Price<br>
- License<br>
- Development (Updates to controls their side)<br><br>
Also if anyone has any links to review (hopefully side by side) please post them
| 0 | [
2,
13,
9,
2328,
4155,
12898,
18,
4338,
6639,
9664,
21230,
19,
22133,
3771,
18,
5912,
849,
72,
18,
246,
800,
3726,
3726,
31,
589,
5154,
14,
3301,
16,
109,
13,
9,
2328,
4155,
8671,
29,
1163,
19,
156,
628,
4190,
18,
17,
28,
306,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Improving code readability for SQL commands
===
In one of my classes for a web application I am developing, I have some reasonably long SQL queries.
When developing a three-tier application, what are the best practices to make this kind of code neater?
Dim dc As New SqlCommand("INSERT INTO Choices VALUES ('" + _
SanitizeInput(strUser) + "', '" + _
SanitizeInput(strFirstHalfDay) + "', '" + _
SanitizeInput(strSecondHalfDay) + "', '" + _
SanitizeInput(strFullDay) + "', " + _
SanitizeInput(Convert.ToInt32(firstHalfPaid).ToString()) + ", " + _
SanitizeInput(Convert.ToInt32(secondHalfPaid).ToString()) + ", " + _
SanitizeInput(Convert.ToInt32(fullPaid).ToString()) + ")", cn)
Do you consider this kind of code to be acceptable or stinky? | 0 | [
2,
9273,
1797,
1302,
4091,
26,
4444,
255,
14294,
800,
3726,
3726,
19,
53,
16,
51,
2684,
26,
21,
2741,
3010,
31,
589,
3561,
15,
31,
57,
109,
19531,
175,
4444,
255,
9386,
2829,
9,
76,
3561,
21,
132,
8,
5259,
3010,
15,
98,
50,
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 can I compress a folder and email the compressed file in Python?
===
I would like to compress a folder and all its sub-folders/files, and email the zip file as an attachment. What would be the best way to achieve this with Python? | 0 | [
2,
184,
92,
31,
26060,
21,
19294,
17,
8517,
14,
18472,
3893,
19,
20059,
60,
800,
3726,
3726,
31,
83,
101,
20,
26060,
21,
19294,
17,
65,
82,
972,
8,
8814,
445,
118,
16877,
18,
15,
17,
8517,
14,
12133,
3893,
28,
40,
14575,
9,
98... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... |
vb.net - sending UDP data including hex
===
As a hobby i'm interesting programming a Ethernet connected LED sign to scroll messages across a screen.
But I'm having trouble making a UDP sender in VB .net (using 2008 currently)
Now the sign is nice enough to have a specs sheet on programming for it:
http://support.favotech.com/protocol.specs.2.4.jetfile.pdf
But an example of a line to send to it (Page 3):
<0x01>Z30<0x02>AA<0x06><0x1B>0b<0x1C>1<0x1A>1This message will show up on the screen<0x04>
With codes such as <0x01> representing the hex character.
Now, to send this to the sign I need to use UDP, however the examples I have all encode the message as ascii before sending, like this one:
( from http://www.java2s.com/Code/VB/Network-Remote/UDPClientsendspacketstoandreceivespacketsfromaserver.htm )
Imports System.Threading
Imports System.Net.Sockets
Imports System.IO
Imports System.Net
Public Class MainClass
Shared Dim client As UdpClient
Shared Dim receivePoint As IPEndPoint
Public Shared Sub Main()
receivePoint = New IPEndPoint(New IPAddress(0), 0)
client = New UdpClient(8888)
Dim thread As Thread = New Thread(New ThreadStart(AddressOf WaitForPackets))
thread.Start()
Dim packet As String = "client"
Console.WriteLine("Sending packet containing: ")
'
' Note the following line below, would appear to be my problem.
'
Dim data As Byte() = System.Text.Encoding.ASCII.GetBytes(packet)
client.Send(data, data.Length, "localhost", 5000)
Console.WriteLine("Packet sent")
End Sub
Shared Public Sub WaitForPackets()
While True
Dim data As Byte() = client.Receive(receivePoint)
Console.WriteLine("Packet received:" & _
vbCrLf & "Length: " & data.Length & vbCrLf & _
System.Text.Encoding.ASCII.GetString(data))
End While
End Sub ' WaitForPackets
End Class
To output a hexcode in VB.net, I think the syntax may possibly be: &H1A , To send what the specs would define as <0x1A>
So my question is - could I modify that code, to correctly send a correctly formated packet to this sign? | 0 | [
2,
13,
20468,
9,
2328,
13,
8,
4907,
287,
7431,
1054,
215,
24,
396,
800,
3726,
3726,
28,
21,
18229,
31,
22,
79,
4883,
3143,
21,
27820,
2587,
481,
1676,
20,
12159,
7561,
464,
21,
2324,
9,
47,
31,
22,
79,
452,
2572,
544,
21,
287,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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# method can be made static, but should it?
===
Reshaper likes to point out multiple functions per asp.net page that could be made static. Does it help me if I do make them static? Should I make them static and move them to a utility class? | 0 | [
2,
272,
5910,
2109,
92,
44,
117,
12038,
15,
47,
378,
32,
60,
800,
3726,
3726,
302,
3162,
1432,
101,
18,
20,
454,
70,
1886,
3719,
416,
28,
306,
9,
2328,
2478,
30,
110,
44,
117,
12038,
9,
630,
32,
448,
55,
100,
31,
107,
233,
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,
0... |
What is the best way to install a C# windows service that doesn't require running installutil manually?
===
I'd like to package a C# windows service project so it can be easily installed by anyone without having to use installutil command prompt utility? Is there an easy way to configure a Visual Studio setup project to do that similar to how winforms applications are installed?
Thanks | 0 | [
2,
98,
25,
14,
246,
161,
20,
16146,
21,
272,
5910,
1936,
365,
30,
1437,
22,
38,
4077,
946,
16146,
14255,
23671,
60,
800,
3726,
3726,
31,
22,
43,
101,
20,
6030,
21,
272,
5910,
1936,
365,
669,
86,
32,
92,
44,
2351,
4066,
34,
127... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Open source cad drawing (dwg) library in C#
===
Anyone knows of an open source DWG (autocad drawing) library in C#? | 0 | [
2,
368,
1267,
8762,
3533,
13,
5,
43,
14932,
6,
1248,
19,
272,
5910,
800,
3726,
3726,
1276,
3620,
16,
40,
368,
1267,
15952,
263,
13,
5,
18042,
13489,
3533,
6,
1248,
19,
272,
5910,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Change SQL Server 2005 Server Collation
===
I need to set up an instance of SQL Server 2005 with SQL\_Latin1\_General\_CP850\_Bin as the server collation (the vendor did not take into accounting looking at DB collation for a bunch of things so stored procedures and temp tables default to the server level and the default collation will not work). During the install for SQL Server it did not give that as an option so I left it at default and finished installing it.
According to [MSDN][1] and [Technet][2] I should need to just run the following command:
setup.exe /q /ACTION=RebuildDatabase /INSTANCENAME=MSSQLSERVER /SAPWD="sa-pwd" /SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS" /SqlCollation=SQL_Latin1_General_CP1_CI_AI
However, whenever I run the above command with my parameters I get the pop-up of the SQL Server installation wizard, accept the agreement, and then it gives me output stating how to use the command.
Any idea what I can do?
[1]: http://msdn.microsoft.com/en-us/library/ms179254.aspx
[2]: http://technet.microsoft.com/en-us/library/ms179254.aspx | 0 | [
2,
753,
4444,
255,
8128,
812,
8128,
9470,
857,
800,
3726,
3726,
31,
376,
20,
309,
71,
40,
4851,
16,
4444,
255,
8128,
812,
29,
4444,
255,
1,
10577,
165,
1,
3661,
1,
7439,
17043,
1,
4772,
28,
14,
8128,
9470,
857,
13,
5,
124,
235... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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++ template destructors for both primitive and complex data types
===
In a [related question][1] I asked about creating a generic container. Using polymorphic templates seems like the right way to go.
However, I can't for the life of me figure out how a destructor should be written. I want the owner of the memory allocated to be the containers even if the example constructor takes in an array of T (along with its dimensions), allocated at some other point.
I would like to be able to do something like
`MyContainer<float> blah(); ... delete blah;`
and
`MyContainer<ComplexObjectType*> complexBlah(); ... delete complexBlah;`
Can I do something like this? Can I do it without smart pointers?
Again, thanks for your input.
[1]: http://stackoverflow.com/questions/168408/c-alternatives-to-void-pointers-that-isnt-templates | 0 | [
2,
272,
20512,
22894,
13,
20137,
248,
18,
26,
156,
11473,
17,
1502,
1054,
2551,
800,
3726,
3726,
19,
21,
636,
6203,
1301,
500,
2558,
165,
500,
31,
411,
88,
2936,
21,
12733,
12147,
9,
568,
3446,
12498,
596,
22894,
18,
2206,
101,
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... |
Change new projects warning level in VS2008 (Express)
===
I like having my warning level set at W4 but all new projects start at W3. Is there some way to change the default value for warning levels for new projects? | 0 | [
2,
753,
78,
2314,
3590,
662,
19,
4611,
2753,
13,
5,
21230,
6,
800,
3726,
3726,
31,
101,
452,
51,
3590,
662,
309,
35,
619,
300,
47,
65,
78,
2314,
799,
35,
619,
240,
9,
25,
80,
109,
161,
20,
753,
14,
12838,
1923,
26,
3590,
221... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Generic Java Framework to Manage Bidirectional Associations and Inverse Updates
===
I've been looking for a generic way to deal with bidirectional associations and a way to handle the inverse updates in manual written Java code.
For those who don't know what I'm talking about, here is an example. Below it are my current results of (unsatisfying) solutions.
public class A {
public B getB();
public void setB(B b);
}
public class B {
public List<A> getAs();
}
Now, when updating any end of the association, in order to maintain consistency, the other end must be updated as well. Either manually each time
a.setB(b);
b.getA().add(a);
or by putting matching code in the setter / getter and use a custom List implementation.
I've found an outdated, unmaintained project whose dependencies are no longer available ([https://e-nspire-gemini.dev.java.net/][1]). It deals with the problem by using annotations that are used to inject the necessary code automatically.
Does anyone know of another framework that deals with this?
ciao,
Elmar
[1]: https://e-nspire-gemini.dev.java.net/ | 0 | [
2,
12733,
8247,
6596,
20,
4705,
1732,
19393,
10642,
17,
19,
9453,
16779,
800,
3726,
3726,
31,
22,
195,
74,
699,
26,
21,
12733,
161,
20,
1183,
29,
1732,
19393,
10642,
17,
21,
161,
20,
3053,
14,
19,
9453,
16779,
19,
5132,
642,
8247,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PHP DateTime microseconds always returns 0
===
this code always returns 0 for microseconds:
<?php
$dt = new DateTime();
echo $dt->format("Y-m-d\TH:i:s.u") . "\n";
?>
Output:
[root@www1 ~]$ php date_test.php
2008-10-03T20:31:26.000000
[root@www1 ~]$ php date_test.php
2008-10-03T20:31:27.000000
[root@www1 ~]$ php date_test.php
2008-10-03T20:31:27.000000
[root@www1 ~]$ php date_test.php
2008-10-03T20:31:28.000000
Any ideas? | 0 | [
2,
13,
26120,
1231,
891,
2899,
5007,
18,
550,
4815,
713,
800,
3726,
3726,
48,
1797,
550,
4815,
713,
26,
2899,
5007,
18,
45,
13,
1,
60,
26120,
5579,
43,
38,
800,
78,
1231,
891,
5,
6,
73,
8117,
5579,
43,
38,
8,
1,
23588,
5,
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... |
Eclipse's WTP translation output
===
How can I view the intermediate translation done to JSP and JSPX pages by WTP? I'm getting weird syntax errors in my Problems tab of Eclipse in a project that has plenty of .jspx pages. They don't affect anything in the running application (Tomcat 6.0) and they appeared only over the last 2 weeks, after an update.
The reason why I'd like to view the output is that I'm using the Stripes framework at http://stripesframework.org and the errors disappear for a particular .jspx file after I remove the <stripes:errors /> line of that file. At the same time, the syntax errors only appeared after I did recent fresh install of Eclipse at work, but then an update of Eclipse at home shortly therafter. I'd like to see the output to determine whose problem this should be (WTP, Stripes, or maybe just me :).
Remember that this issue is somewhat cosmetic, as it doesn't affect anything functionally. It simply spams my Problems tab in Eclipse and shows the little red X icons in the project explorer. | 0 | [
2,
11652,
22,
18,
619,
13726,
4064,
5196,
800,
3726,
3726,
184,
92,
31,
1418,
14,
6889,
4064,
677,
20,
487,
3401,
17,
487,
3401,
396,
4434,
34,
619,
13726,
60,
31,
22,
79,
1017,
5455,
22649,
11908,
19,
51,
1716,
6523,
16,
11652,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Bad Gateway 502 error with Apache mod_proxy and Tomcat
===
We're running a web app on Tomcat 6 and Apache mod_proxy 2.2.3. Seeing a lot of 502 errors like this:
> Bad Gateway!
> The proxy server received an invalid response from an upstream server.
>
> The proxy server could not handle the request GET /the/page.do.
>
> Reason: Error reading from remote server
>
> If you think this is a server error, please contact the webmaster.
>
> Error 502
Tomcat has plenty of threads, so it's not thread-constrained. We're pushing 2400 users via JMeter against the app. All the boxes are sitting inside our firewall on a fast unloaded network, so there shouldn't be any network problems.
Anyone have any suggestions for things to look at or try? We're heading to tcpdump next. | 0 | [
2,
896,
12171,
1222,
135,
7019,
29,
17140,
7226,
1,
4899,
9229,
17,
2067,
5782,
800,
3726,
3726,
95,
22,
99,
946,
21,
2741,
4865,
27,
2067,
5782,
400,
17,
17140,
7226,
1,
4899,
9229,
172,
9,
135,
9,
240,
9,
2078,
21,
865,
16,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how provide good documentation in my code
===
I am always wondering what should I write for inline code documentation? I always end up with one liners "This function does x" or a 4 paragraph essay describing every micro detail of the function. I am trying to find a balance that provides good documentation without being to verbose. So if you could replay with the one thing that you find the most helpful when you read inline documentation (ex. describe the inputs, describe what is returned...). Then we will let the community vote up the most important one. | 0 | [
2,
184,
1181,
254,
13945,
19,
51,
1797,
800,
3726,
3726,
31,
589,
550,
5712,
98,
378,
31,
2757,
26,
19,
1143,
1797,
13945,
60,
31,
550,
241,
71,
29,
53,
12588,
18,
13,
7,
1565,
1990,
630,
993,
7,
54,
21,
268,
20599,
8474,
7153... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Should I lock an ISAM table to insert a value into a unique key field?
===
I have an ISAm table in mySql that was created similar to this:
create table mytable (
id int not null auto_increment primary key,
name varchar(64) not null );
create unique index nameIndex on mytable (name);
I have multiple processes inserting rows into this table. If two processes try to insert the same "name", I want to make sure that one of them either gets an error or finds the row with the matching "name".
Should I lock the table and in the lock make sure that the name doesn't exist, or should I rely on the server giving an error to one of the processes that try to insert a value that already exists in the unique indexed field?
I'm a bit hesitant to use a lock because I don't want to get into a deadlock situation.
Please let me know what you think. Thanks!
| 0 | [
2,
378,
31,
3991,
40,
25,
765,
859,
20,
14692,
21,
1923,
77,
21,
2619,
1246,
575,
60,
800,
3726,
3726,
31,
57,
40,
25,
765,
859,
19,
51,
18,
22402,
30,
23,
679,
835,
20,
48,
45,
1600,
859,
51,
5924,
13,
5,
4924,
19,
38,
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... |
Does the iPhone timeout if a function takes too long to execute?
===
I have a function in which I get en external resource from the web using cocoa's Url object. And it works fine on the simulator, but occasionally fails on the device itself (it's a google query so the resource obviously does exist). Which leads me to believe that there is some internal timeout barrier on the hardware, but haven't read that such a barrier exists or not.
Anyone else encountered similar issues? Or knows if the timeout is documented or can be changed? | 0 | [
2,
630,
14,
21024,
85,
1320,
100,
21,
1990,
1384,
266,
175,
20,
15644,
60,
800,
3726,
3726,
31,
57,
21,
1990,
19,
56,
31,
164,
1957,
4886,
6577,
37,
14,
2741,
568,
24507,
22,
18,
287,
6362,
3095,
9,
17,
32,
693,
1123,
27,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using "~" in a path resolvs as C:\
===
I'm trying to implement a server control that frobs a couple of files inside the web directory of an ASP.NET site. I'm using VS Web Dev Express 2008 as my IDE. When I call `HttpContext.Current.Request.ApplicationPath` to get a path to the web root so I can find those files, it returns C:\. What the heck?
Absolute paths work just fine, but I'd like to be able to feed the server control a relative directory and just let it do it's thing. What have I done wrong? | 0 | [
2,
568,
13,
7,
1,
7,
19,
21,
2013,
302,
5594,
710,
18,
28,
272,
45,
1,
800,
3726,
3726,
31,
22,
79,
749,
20,
8713,
21,
8128,
569,
30,
8467,
4562,
21,
1335,
16,
6488,
572,
14,
2741,
16755,
16,
40,
28,
306,
9,
2328,
689,
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# & Win32 notify when separate window is closing / closed.
===
Is there a way to attach an event to a foreign / separate window from an .NET process that when the foreign window is closed or is about to close my application can be notified?
I found this http://msdn.microsoft.com/en-us/library/ms229658.aspx
But that seems to only be for the .NET compact framework. I am looking for something using the .NET 2.0 framework.
Thanks. | 0 | [
2,
272,
5910,
279,
628,
3125,
52,
8612,
76,
1725,
1463,
25,
4239,
13,
118,
827,
9,
800,
3726,
3726,
25,
80,
21,
161,
20,
19514,
40,
807,
20,
21,
1228,
13,
118,
1725,
1463,
37,
40,
13,
9,
2328,
953,
30,
76,
14,
1228,
1463,
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... |
Best Dual HD Set up for Development
===
I've got a machine I'm going to be using for development, and it has two 7200 RPM 160 GB SATA HDs in it.
The information I've found on the net so far seems to be a bit conflicted about which things (OS, Swap files, Programs, Solution/Source code/Other data) I should be installing on how many partitions on which drives to get the most benefit from this situation.
Some people suggest having a separate partition for the OS and/or Swap, some don't bother. Some people say the programs should be on the same physical drive as the OS with the data on the other, some the other way around. Same with the Swap and the OS.
I'm going to be installing Vista 64 bit as my OS and regularly using Visual Studio 2008, VMWare Workstation, SQL Server management studio, etc (pretty standard dev tools).
So I'm asking you--how would you do it? | 0 | [
2,
246,
5747,
8590,
309,
71,
26,
522,
800,
3726,
3726,
31,
22,
195,
330,
21,
1940,
31,
22,
79,
228,
20,
44,
568,
26,
522,
15,
17,
32,
63,
81,
453,
4621,
12936,
9379,
14857,
847,
58,
8590,
18,
19,
32,
9,
14,
676,
31,
22,
19... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to design a high performance grid with VS 2005(specifically C#)
===
I need to build a high performance winforms data grid using Visual Studio 2005, and I'm at a loss with where to start. I've build plenty of data grid applications, but none of those were very good when the data was constantly refreshing.
The grid is going to be roughly 100 rows by 40 columns, and each cell in the grid is going to update between 1 and 2 times a second(some cells possibly more). To me, this is the biggest drawback of the out of the box data grid, the repainting isn't very efficient.
Couple caveats
1) No third party vendors. This grid is backbone of all our applications, so while XCeed or Syncfusion or whatever might get us up and running faster, we'd slam into its limitations and be hosed. I'd rather put in the extra work up front, and have a grid that does exactly what we need.
2) I have access to Visual Studio 2008, so if it would be much better to start this in 2008, then I can do that. If its a tossup, I'd like to stick with 2005.
So whats the best approach here? | 0 | [
2,
184,
20,
704,
21,
183,
956,
7354,
29,
4611,
812,
5,
9219,
1326,
272,
5910,
6,
800,
3726,
3726,
31,
376,
20,
1895,
21,
183,
956,
628,
4190,
18,
1054,
7354,
568,
3458,
1120,
812,
15,
17,
31,
22,
79,
35,
21,
1526,
29,
113,
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 iterate over a range of numbers in bash?
===
How do I iterate over a range of numbers in bash when the range is given by a variable?
I know I can do this:
for i in {1..5}; do echo $i; done
Which gives:
> 1
> 2
> 3
> 4
> 5
Yet how can I replace either of the range endpoints with a variable? This doesn't work:
END=5
for i in {1..$END]; do echo $i; done
Which prints:
> {1..5}
| 0 | [
2,
184,
107,
31,
32,
106,
1373,
84,
21,
978,
16,
2116,
19,
13158,
60,
800,
3726,
3726,
184,
107,
31,
32,
106,
1373,
84,
21,
978,
16,
2116,
19,
13158,
76,
14,
978,
25,
504,
34,
21,
7612,
60,
31,
143,
31,
92,
107,
48,
45,
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... |
What is the simplest way to set up a BIRT report viewer for a xulrunner application?
===
I recently began using [BIRT][1] and have developed a report to use with my [xulrunner][2] application. What I haven't yet figured out is how I should deploy the viewer. It seems like BIRT mostly targets Java applications, so there are instructions for deploying on J2EE, JBoss, and other technologies -- with which I am not familiar (but I'm not developing in Java anyway).
Reviewing [this article][3] on deploying BIRT and reviewing the [deployment details][4] on BIRT's web site, I'm not sure where to go. I wasn't expecting to have to add some large Java dependency for the xulrunner application --is there no way I can drop an executable in with my xulrunner app, call it from my app, and pass it a report document? (Or something else that would be simpler than learning and using J2EE, JBoss, tomcat?)
[1]: http://www.eclipse.org/birt/phoenix/deploy/
[2]: http://developer.mozilla.org/en/XULRunner
[3]: http://www.onjava.com/pub/a/onjava/2006/07/26/deploying-birt.html
[4]: http://www.eclipse.org/birt/phoenix/deploy/ | 0 | [
2,
98,
25,
14,
24384,
161,
20,
309,
71,
21,
8719,
38,
1330,
16812,
26,
21,
993,
1287,
12993,
3010,
60,
800,
3726,
3726,
31,
1989,
260,
568,
636,
10071,
38,
500,
2558,
165,
500,
17,
57,
885,
21,
1330,
20,
275,
29,
51,
636,
396,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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#] How to efficiently filter a large LIstViewItemCollection?
===
So I have a ListView with an upper limit of about 1000 items. I need to be able to filter these items using a textbox's TextChanged event. I have some code that works well for a smaller number of items (~400), but when I need to re-display a full list of all 1000 items, it takes about 4 seconds.
I am not creating new ListViewItems every time. Instead, I keep a list of the full item collection and then add from that. It seems that the .Add method is taking a long time regardless. Here is a little sample:
this.BeginUpdate();
foreach (ListViewItem item in m_cachedItems)
{
MyListView.Add(item);
}
this.EndUpdate;
I have tried only adding the missing items (i.e., the difference between the items currently being displayed and the total list of items), but this doesn't work either. There can be a situation in which there is only one item currently displayed, the user clears the textbox, and I need to display the entire list.
I am not very experienced in eeking performance out of .NET controls with a large sample like this, so I don't really know a better way to do it. Is there any way around using the .Add() method, or if not, just e better general solution? Thanks for any help you guys can offer in advance. | 0 | [
2,
636,
150,
5910,
500,
184,
20,
20519,
11945,
21,
370,
968,
4725,
2119,
79,
15015,
872,
60,
800,
3726,
3726,
86,
31,
57,
21,
968,
4725,
29,
40,
1508,
4496,
16,
88,
6150,
3755,
9,
31,
376,
20,
44,
777,
20,
11945,
158,
3755,
56... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 property as a collection
===
Greetings,
I need to include a property in my class which is a collection of System.IO.File objects. I am not really sure how to do this and how I would add and removed objects.
Please let me know if I need to add more information.
Thank you | 0 | [
2,
718,
1354,
28,
21,
1206,
800,
3726,
3726,
13769,
18,
15,
31,
376,
20,
468,
21,
1354,
19,
51,
718,
56,
25,
21,
1206,
16,
329,
9,
1963,
9,
16877,
3916,
9,
31,
589,
52,
510,
562,
184,
20,
107,
48,
17,
184,
31,
83,
3547,
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... |
Which US universities have good Master/PhD programs on software development?
===
I'm a computer science student from Venezuela.
I am looking for universities that have good Master/PhD programs on software development (computer science also, but I'm looking for something more into the engineering side of software, not the theoretical).
Thanks for any answers | 0 | [
2,
56,
182,
4165,
57,
254,
1129,
118,
3971,
43,
1726,
27,
2306,
522,
60,
800,
3726,
3726,
31,
22,
79,
21,
1428,
762,
1209,
37,
8237,
9,
31,
589,
699,
26,
4165,
30,
57,
254,
1129,
118,
3971,
43,
1726,
27,
2306,
522,
13,
5,
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... |
Proper nullable type checking in C#?
===
Ok, my actual problem was this: I was implementing an `IList<T>`. When I got to `CopyTo(Array array, int index)`, this was my solution:
void ICollection.CopyTo(Array array, int index)
{
// Bounds checking, etc here.
if (!(array.GetValue(0) is T))
throw new ArgumentException("Cannot cast to this type of Array.");
// Handle copying here.
}
This worked in my original code, and still works. But it has a small flaw, which wasn't exposed till I started building tests for it, specifically this one:
public void CopyToObjectArray()
{
ICollection coll = (ICollection)_list;
string[] testArray = new string[6];
coll.CopyTo(testArray, 2);
}
Now, this test should pass. It throws the `ArgumentException` about not being able to cast. Why? `array[0] == null`. The `is` keyword always returns false when checking a variable that is set to `null`. Now, this is handy for all sorts of reasons, including avoiding null dereferences, etc. What I finally came up with for my type checking was this:
try
{
T test = (T)array.GetValue(0);
}
catch (InvalidCastException ex)
{
throw new ArgumentException("Cannot cast to this type of Array.", ex);
}
This isn't exactly elegant, but it works... Is there a better way though? | 0 | [
2,
4119,
16203,
579,
1001,
9886,
19,
272,
5910,
60,
800,
3726,
3726,
5854,
15,
51,
3463,
1448,
23,
48,
45,
31,
23,
17333,
40,
13,
1,
49,
5739,
1,
38,
1,
9,
76,
31,
330,
20,
13,
1,
19625,
262,
5,
8576,
93,
7718,
15,
19,
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... |
Open source Java library to produce webpage thumbnails server-side
===
I am searching for an open source Java library to generate thumbnails for a given URL. I need to bundle this capability, rather than call out to external services, such as [Amazon][1] or [websnapr][2].
[http://www.webrenderer.com/][3] was mentioned in this post: [Server generated web screenshots][4], but it is a commercial solution.
I'm hoping for a Java based solution, but may need to look into executing an external process such as [khtml2png][5], or integrating something like [html2ps][6].
Any suggestions?
[1]: http://aws.amazon.com/ast/
[2]: http://www.websnapr.com/
[3]: http://www.webrenderer.com/
[4]: http://stackoverflow.com/questions/119116/server-generated-web-screenshots#119264
[5]: http://khtml2png.sourceforge.net/index.php?page=faq
[6]: http://user.it.uu.se/~jan/html2ps.html | 0 | [
2,
368,
1267,
8247,
1248,
20,
2213,
2741,
6486,
5078,
325,
947,
18,
8128,
8,
1416,
800,
3726,
3726,
31,
589,
5792,
26,
40,
368,
1267,
8247,
1248,
20,
7920,
5078,
325,
947,
18,
26,
21,
504,
287,
6362,
9,
31,
376,
20,
10194,
48,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Keeping dot files synched across machines?
===
Like most *nix people, I tend to play with my tools and get them configured just the way that I like them. This was all well and good until recently. As I do more and more work, I tend to log onto more and more machines, and have more and more stuff that's configured great on my home machine, but not necessarily on my work machine, or my web server, or any of my work servers...
How do you keep these config files updated? Do you just manually copy them over? Do you have them stored somewhere public? | 0 | [
2,
2882,
14123,
6488,
6063,
6261,
464,
6035,
60,
800,
3726,
3726,
101,
127,
1637,
14064,
148,
15,
31,
5480,
20,
418,
29,
51,
4672,
17,
164,
105,
28895,
114,
14,
161,
30,
31,
101,
105,
9,
48,
23,
65,
134,
17,
254,
163,
1989,
9,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I detect a held down mouse button over a PictureBox in C#?
===
I need to fire an event when the mouse is above a PictureBox with the mouse button already clicked and held down. | 0 | [
2,
184,
92,
31,
9092,
21,
269,
125,
7567,
5167,
84,
21,
2151,
5309,
19,
272,
5910,
60,
800,
3726,
3726,
31,
376,
20,
535,
40,
807,
76,
14,
7567,
25,
784,
21,
2151,
5309,
29,
14,
7567,
5167,
614,
15802,
17,
269,
125,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
What is an efficient method of paging through very large result sets in SQL 2005?
===
In SQL 2000 days, I used to use temp table method where you create a temp table with new identity column and primary key then select where identity column between A and B.
When SQL 2005 came along I found out about Row_Number() and I've been using it ever since...
But now, I found a serious performance issue with Row_Number().
It performs very well when you are working with not-so-gigantic result sets and sorting over an identity column. However, it performs very poorly when you are working with large result sets like over 10,000 records and sorting it over non-identity column. Row_Number() performs poorly even if you sort by an identity column if the result set is over 250,000 records. For me, it came to a point where it throws an error, "command timeout!"
What do you use to do paginate a large result set on SQL 2005?
Is temp table method still better in this case? I'm not sure if this method [using temp table with SET ROWCOUNT][1] will perform better... But some say there is an issue of giving wrong row number if you have multi-column primary key.
In my case, I need to be able to sort the result set by a date type column... for my production web app.
Let me know what you use for high-performing pagination in SQL 2005. And I'd also like to know a smart way of creating indexes. I'm suspecting choosing right primary keys and/or indexes (clustered/non-clustered) will play a big role here.
Thanks in advance.
P.S. What does stackoverflow use?
[1]: http://www.4guysfromrolla.com/webtech/042606-1.shtml | 0 | [
2,
98,
25,
40,
8243,
2109,
16,
19006,
68,
120,
253,
370,
829,
3415,
19,
4444,
255,
812,
60,
800,
3726,
3726,
19,
4444,
255,
824,
509,
15,
31,
147,
20,
275,
13,
9577,
859,
2109,
113,
42,
1600,
21,
13,
9577,
859,
29,
78,
3270,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
J2EE -- is it just fluff or the real stuff?
===
I'm familiar with the LAMP stack and over the years have successfully deployed a handful of web sties based on it. I've used everything from Apache + modPerl, to PHP, to Ruby and Rails. With good use of caching my Rails site can sustain a pretty good load, but I'm not talking massive.
I never really liked Java as a language, or XML for that matter, and have very much been ignoring the whole J2EE side of things. For those who have had real and direct experience in both worlds: is there something super cool about J2EE that I'm missing, or is just a bunch of hot air? What justifies the high price of the proprietary app servers?
I'm not trolling here: I'm looking for concrete examples of things that J2EE really nails that are missing from *modern* LAMP frameworks, if such differences exist. (Modern = Rails, Django, etc). Alternatively pipe in with those things that LAMP really does better (fewer XML sit ups for one). | 0 | [
2,
487,
135,
2851,
13,
8,
8,
25,
32,
114,
6777,
2460,
54,
14,
683,
3217,
60,
800,
3726,
3726,
31,
22,
79,
3694,
29,
14,
6792,
7566,
17,
84,
14,
122,
57,
3673,
6698,
21,
8893,
16,
2741,
13,
18,
3915,
432,
27,
32,
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... |
Is It Possible To Order By Any Column Given a Stored Procedure Parameter in SQL Server?
===
I was looking into sorting tables by a column designated given some input, and from what I've found, there is no easy way to do this. The best I've found is a switch statement:
SELECT Column1, Column2, Column3, Column4
FROM Table
ORDER BY CASE WHEN @OrderBY = 'Column1' THEN Column1
WHEN @OrderBY = 'Column2' THEN Column2
WHEN @OrderBY = 'Column3' THEN Column3
WHEN @OrderBY = 'Column4' THEN Column4
Is it possible to do this without having a `CASE` statement like that? If the table gets bigger and more columns need to be sorted by, this could become messy.
The only way I've been able to do this is by just concatenating a big SQL string, which sort of defeats the advantages of Stored Procedures, and makes the SQL hard to write and maintain. | 0 | [
2,
25,
32,
938,
20,
389,
34,
186,
4698,
504,
21,
8214,
7004,
18906,
19,
4444,
255,
8128,
60,
800,
3726,
3726,
31,
23,
699,
77,
2058,
68,
7484,
34,
21,
4698,
3232,
504,
109,
6367,
15,
17,
37,
98,
31,
22,
195,
216,
15,
80,
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... |
DateTime, DateTime? and LINQ
===
When I retrieve a record using LINQ that has a DateTime field only the ToString() is available.
Where are all the other DateTime methods?
I have to Convert.ToDateTime the DateTime? that the Field returns?
What is the difference between (DateTime) and (DateTime?) | 0 | [
2,
1231,
891,
15,
1231,
891,
60,
17,
6294,
1251,
800,
3726,
3726,
76,
31,
11917,
21,
571,
568,
6294,
1251,
30,
63,
21,
1231,
891,
575,
104,
14,
20,
11130,
5,
6,
25,
904,
9,
113,
50,
65,
14,
89,
1231,
891,
3195,
60,
31,
57,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.