unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Windows Forms - Multiple Event Loops
===
I have a Windows Forms (.NET) application that can have multiple documents open simultaneously.
It would be convenient to have each document (form) running its own event loop. With brief experimentation, starting several event loops in their own STA threads seems to work. Is there any reason why this is a bad idea?
| 0 | [
2,
1936,
1997,
13,
8,
1886,
807,
19661,
800,
3726,
3726,
31,
57,
21,
1936,
1997,
13,
5,
9,
2328,
6,
3010,
30,
92,
57,
1886,
4374,
368,
6888,
9,
32,
83,
44,
12845,
20,
57,
206,
4492,
13,
5,
4190,
6,
946,
82,
258,
807,
5293,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Authenticating a Web Service
===
We are deploying our ASP.NET 3.5 app to a production server for beta testing.
Each page is secured using SSL.
On our homepage (default.aspx) we have web services which populate flash objects.
I am getting an error:
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'.
Also, when using firefox, receive the Windows Login pop up screen.
Does anyone have any clue what or why this is happening?
Much thanks! | 0 | [
2,
14351,
1880,
21,
2741,
365,
800,
3726,
3726,
95,
50,
17617,
68,
318,
28,
306,
9,
2328,
203,
9,
264,
4865,
20,
21,
637,
8128,
26,
8434,
4431,
9,
206,
2478,
25,
6385,
568,
13,
18,
18,
255,
9,
27,
318,
213,
6486,
13,
5,
1386... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 good ways to design or diagram state?
===
The issue that prompted me to ask this is a web form that was not persisting data the way I expected it to. That's vague, but the point is, what do you like to do to model state, flow of data, and so forth? | 0 | [
2,
98,
50,
254,
2847,
20,
704,
54,
14161,
146,
60,
800,
3726,
3726,
14,
1513,
30,
9491,
55,
20,
1349,
48,
25,
21,
2741,
505,
30,
23,
52,
22084,
68,
1054,
14,
161,
31,
1727,
32,
20,
9,
30,
22,
18,
14800,
15,
47,
14,
454,
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... |
Bash script, match on dates like?
===
I'm writing a script to remove some build artifacts older than 1 week.
The files have names in the form *artifact-1.1-200810391018.exe*.
How do I go about removing only the files that are greater than 1 week old, excluding the time in hours and minutes at the end of the date-time-stamp?
Currently it is removing all of the files in the directory.
#!/bin/sh
NIGHTLY_LOCATIONS=( "/foo" "/bar" )
ARTIFACT_PREFIX="artifact-*-"
NUM_TO_KEEP=7
for home in $(seq 0 $((${#NIGHTLY_LOCATIONS[@]} - 1))); do
echo "Removing artifacts for" ${NIGHTLY_LOCATIONS[$location]}
for file in `find ${NIGHTLY_LOCATIONS[$location]} -name "$ARTIFACT_PREFIX*"`; do
keep=true
for day in $(seq 0 $((${NUM_TO_KEEP} - 1))); do
date=`date --date="$day days ago" +%Y%m%d`
echo $(basename $file ".exe") " = " $ARTIFACT_PREFIX$date
if [ "$(basename $file ".exe")" != "$ARTIFACT_PREFIX$date" ]; then
keep=false
fi
done
if [ !$keep ]; then
echo "Removing file"
rm -f $file
fi
done done
| 0 | [
2,
13158,
3884,
15,
730,
27,
4076,
101,
60,
800,
3726,
3726,
31,
22,
79,
1174,
21,
3884,
20,
4681,
109,
1895,
10996,
1234,
119,
137,
877,
9,
14,
6488,
57,
1817,
19,
14,
505,
1637,
2900,
49,
16839,
8,
165,
9,
165,
8,
2753,
1694... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 callback methods in PHP's session_set_save_handler be private?
===
I am writing a custom session handler in PHP and trying to make the methods defined in session_set_save_handler private.
session_set_save_handler(
array('Session','open'),
array('Session','close'),
array('Session','read'),
array('Session','write'),
array('Session','destroy'),
array('Session','gc')
);
For example I can set the open function to be private without any errors, but when I make the write method private it barks at me.
> Fatal error: Call to private method
> Session::write() from context '' in
> Unknown on line 0
I was just wondering if this was a bug or there is a way around this. Barring that I can certainly just make it public, but I'd rather not. There was a post from last year on php.net eluding to a similar thing, but just want to know if anyone had any ideas. Does it really matter? I am using PHP 5.2.0 on my development box, but could certainly upgrade.
| 0 | [
2,
92,
645,
1958,
3195,
19,
13,
26120,
22,
18,
3723,
1,
3554,
1,
19863,
1,
3203,
1252,
44,
932,
60,
800,
3726,
3726,
31,
589,
1174,
21,
5816,
3723,
24641,
19,
13,
26120,
17,
749,
20,
233,
14,
3195,
2811,
19,
3723,
1,
3554,
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... |
IE CSS Fieldset border extends too far to the right: Why??
===
I have defined a fieldset in HTML, and applied the following (simple) CSS rules to it:
fieldset
{
margin: 2em 0;
position:relative;
padding: 1em;
border:1px solid #ccc;
}
Everything is great, no big deal, except in all versions (well, up to 7 as far as I know) of IE the top border -- but not, interestingly, the bottom border -- of the fieldset visually extends too far to the right by about 25px, beyond where the vertical border is on that side.
It is worth noting that this element's width causes it to be outside its parent element width-wise to the right, when viewed in Firebug for example.
What is causing this problem in IE? Is this a known issue, and, if so, what is the fix / hack / workaround?
| 0 | [
2,
13,
660,
272,
18,
18,
575,
3554,
1862,
9073,
266,
463,
20,
14,
193,
45,
483,
60,
60,
800,
3726,
3726,
31,
57,
2811,
21,
575,
3554,
19,
13,
15895,
15,
17,
2435,
14,
249,
13,
5,
24629,
6,
272,
18,
18,
1761,
20,
32,
45,
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... |
Epoch Time
===
I am using MS SQL 2005, I have dates stored in epoch time (starting 1970) I need to create a statement that will effect any record that has not been updated in the last 24 hours. | 0 | [
2,
24612,
85,
800,
3726,
3726,
31,
589,
568,
4235,
4444,
255,
812,
15,
31,
57,
4076,
8214,
19,
24612,
85,
13,
5,
13680,
68,
1133,
6,
31,
376,
20,
1600,
21,
3331,
30,
129,
1590,
186,
571,
30,
63,
52,
74,
6372,
19,
14,
236,
93... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Is there a blocking StreamReader, TextReader, or StringReader in .NET?
===
I want to run a background task that reads input from a TextReader and processes it a line at a time. I want the background task to block until the user types some text into a field and clicks the submit button. Is there some flavour of TextReader that will block until text is available and lets you somehow add more text to the underlying source?
I thought that a StreamReader and StreamWriter pointing to the same MemoryStream might work, but it doesn't seem to. The StreamReader sees that the MemoryStream is empty at the start, and never checks again.
I realize that it would be easier to write a ProcessLine() method and call it whenever the user clicks the submit button. However, I'm trying to design a plug-in architecture, and I'd like the plug ins to look like old-fashioned console apps with an input stream and an output stream. I want the plug in's input stream to just block until the user clicks the submit button with some input text. | 0 | [
2,
25,
80,
21,
11828,
3766,
10647,
106,
15,
1854,
10647,
106,
15,
54,
3724,
10647,
106,
19,
13,
9,
2328,
60,
800,
3726,
3726,
31,
259,
20,
485,
21,
2395,
3005,
30,
11137,
6367,
37,
21,
1854,
10647,
106,
17,
5102,
32,
21,
293,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best datatype for currencies in MySQL?
===
I want to store values in a bunch of currencies and I'm not too keen on the imprecise nature of floats. Being able to do math on them directly in queries is also a requirement.
Is Decimal the way to go here? | 0 | [
2,
98,
25,
14,
246,
1054,
4474,
26,
5087,
139,
22851,
19,
51,
18,
22402,
60,
800,
3726,
3726,
31,
259,
20,
1718,
4070,
19,
21,
7653,
16,
5087,
139,
22851,
17,
31,
22,
79,
52,
266,
7194,
27,
14,
5420,
15110,
870,
1444,
16,
1151... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 conditionally suppress application exceptions written to the event log?
===
I am working on a windows service that polls for a connection to a network enabled devices every 15 seconds. If the service is not able to connect to a device, it throws an exception and tries again in 15 seconds. All of this works great.
But, lets say one of the devices is down for a day or more. I am filling up my exception log with the same exception every 15 seconds. Is there a standard way to prevent an exception from being written to the event log if the exception being thrown hasn't changed in the last x number of hours? | 0 | [
2,
184,
107,
31,
2874,
1326,
12451,
3010,
13392,
642,
20,
14,
807,
6738,
60,
800,
3726,
3726,
31,
589,
638,
27,
21,
1936,
365,
30,
16460,
26,
21,
2760,
20,
21,
982,
9338,
4690,
352,
357,
2582,
9,
100,
14,
365,
25,
52,
777,
20,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Open Browser window from Java program
===
I have an application written in Java. It is designed to run on a Linux box standalone. So, here is its initialization process:
1. Start X "Xorg :1 -br -terminate -dpms -quiet vt7"
2. Start Window Manager "metacity --display=:1 --replace"
3. Configure resources "xrdb -merge /etc/X11/Xresources"
4. Become a daemon and disconnect from controlling terminal
Once the program is up an running, there is a button the user can click that should spawn a firefox window. Here is my code to do that. Remember X is running on display :1.
<pre><code>
public boolean openBrowser()
{
| 0 | [
2,
368,
16495,
1463,
37,
8247,
625,
800,
3726,
3726,
31,
57,
40,
3010,
642,
19,
8247,
9,
32,
25,
1006,
20,
485,
27,
21,
13024,
1649,
26986,
9,
86,
15,
235,
25,
82,
2104,
1829,
953,
45,
137,
9,
799,
993,
13,
7,
396,
5583,
13,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to find the Number of Active Users when using a StateServer
===
How can you find out the number of active users when you're using a StateServer? Also is it possible to query the StateServer and retrieve the contents in the Session State?
I know that this is all possible if you use SqlServer for a backing store, but I want them to be in memory.
| 0 | [
2,
184,
20,
477,
14,
234,
16,
1348,
3878,
76,
568,
21,
202,
106,
2304,
800,
3726,
3726,
184,
92,
42,
477,
70,
14,
234,
16,
1348,
3878,
76,
42,
22,
99,
568,
21,
202,
106,
2304,
60,
67,
25,
32,
938,
20,
25597,
14,
202,
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... |
Observer pattern with WCF MSMQ
===
Is it possible to have multiple listeners to messages carried by MSMQ?
WCF appears to frame everything in terms of services, making communication a point-to-point affair. I want to use a message queue to buffer incoming traffic for another process that records the logs in a database.
There can be be any number of other processes interested in monitoring incoming traffic, and this positively begs for Observer pattern, but I can't see how to express Observer pattern, at least not using MSMQ via WCF.
Can anyone advise me on this?
--------------------------------------------------------------------------------
Some background on why I care, which may also serve to illustrate the problem: I have a Windows service that accepts connection requests from little black boxes in the field. It sets up sockets and the black boxes send messages describing events annotated with GPS locations in time and space.
I parse message packets from the socket stream and send them via MSMQ to another process that filters duplicates and writes the packets into a database table.
There is any amount of post-processing that would benefit from incremental computation in response to incoming traffic, and user tools perform user notification also in response to incoming traffic.
So, I'd really like to have one process sending the messages, and several receiving them. One of these receivers is responsible for parsing the packet contents and transcribing the message into a database; this is an obvious candidate for the responsibility of finally removing the message from the queue, but there is the question of how to ensure this is the last handler to process the message.
| 0 | [
2,
9855,
3732,
29,
11801,
410,
4235,
79,
1251,
800,
3726,
3726,
25,
32,
938,
20,
57,
1886,
15672,
20,
7561,
1521,
34,
4235,
79,
1251,
60,
11801,
410,
1780,
20,
3523,
796,
19,
1663,
16,
687,
15,
544,
3291,
21,
454,
8,
262,
8,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
WPF Trigger for IsSelected in a DataTemplate for ListBox items
===
I have a listbox, and I have the following ItemTemplate for it:
<DataTemplate x:Key="ScenarioItemTemplate">
<Border
Margin="5,0,5,0"
Background="#FF3C3B3B"
BorderBrush="#FF797878"
BorderThickness="2"
CornerRadius="5">
<DockPanel>
<DockPanel DockPanel.Dock="Top" Margin="0,2,0,0">
<Button
HorizontalAlignment="Left"
DockPanel.Dock="Left"
FontWeight="Heavy"
Foreground="White"/>
<Label
Content="{Binding Path=Name}"
DockPanel.Dock="Left"
FontWeight="Heavy"
Foreground="white"/>
<Label
HorizontalAlignment="Right"
Background="#FF3C3B3B"
Content="X"
DockPanel.Dock="Left"
FontWeight="Heavy"
Foreground="White"/>
</DockPanel>
<ContentControl
Name="designerContent"
Visibility="Collapsed"
MinHeight="100"
Margin="2,0,2,2"
Content="{Binding Path=DesignerInstance}"
Background="#FF999898">
</ContentControl>
</DockPanel>
</Border>
</DataTemplate>
As you can see the ContentControl has Visibility set to collapsed.
I need to define a trigger that causes the Visibility to be set to "Visible"
when the ListItem is selected, but I can't figure it out.
Any ideas?
UPDATE: Of course I could simply duplicate the DataTemplate and add triggers
to the ListBox in question to use either one or the other, but I want to prevent duplicating this code. | 0 | [
2,
619,
7721,
7286,
26,
25,
18,
7138,
19,
21,
1054,
9577,
6554,
26,
968,
5309,
3755,
800,
3726,
3726,
31,
57,
21,
968,
5309,
15,
17,
31,
57,
14,
249,
9101,
9577,
6554,
26,
32,
45,
13,
1,
18768,
9577,
6554,
993,
45,
4237,
3726,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
LinqToSQL Not Updating the Database...
===
// goal: update Address record identified by "id", with new data in "colVal"
string cstr = ConnectionApi.GetSqlConnectionString("SwDb"); // get connection str
using (DataContext db = new DataContext(cstr)) {
Address addr = (from a in db.GetTable<Address>()
where a.Id == id
select a).Single<Address>();
addr.AddressLine1 = colValue.Trim();
db.SubmitChanges(); // this seems to have no effect!!!
}
In the debugger, addr has all the current values from the db table, and I can verify that AddressLine1 is changed just before I call db.SubmitChanges()... SQL Profiler shows only a "reset connection" when the SubmitChanges line executes. Anyone got a clue why this isn't working? THANKS!
| 0 | [
2,
6294,
1251,
262,
18,
22402,
52,
71,
43,
1880,
14,
6018,
9,
9,
9,
800,
3726,
3726,
12894,
1195,
45,
11100,
3218,
571,
2889,
34,
13,
7,
1340,
7,
15,
29,
78,
1054,
19,
13,
7,
7771,
3377,
7,
3724,
272,
9729,
800,
2760,
2552,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
When using Spring Security, what is the proper way to obtain current username (i.e. SecurityContext) information in a bean?
===
I have a Spring MVC web app which uses Spring Security. I want to know the username of the currently logged in user. The code snippet below is what I'm doing. My question is, is this the accepted way?
I don't like having a call to a static method inside this controller - that defeats the whole purpose of Spring, IMHO. Is there a way to configure the app to have the current SecurityContext, or current Authentication, injected instead?
@RequestMapping(method = RequestMethod.GET)
public ModelAndView showResults(final HttpServletRequest request...) {
final String currentUser = SecurityContextHolder.getContext().getAuthentication().getName();
...
}
| 0 | [
2,
76,
568,
1573,
1221,
15,
98,
25,
14,
4119,
161,
20,
5545,
866,
4155,
7259,
13,
5,
49,
9,
62,
9,
1221,
1126,
11969,
6,
676,
19,
21,
15322,
60,
800,
3726,
3726,
31,
57,
21,
1573,
307,
8990,
2741,
4865,
56,
2027,
1573,
1221,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
VS2005 SP1 breakpoints in Vista Ultimate 64 not working
===
I just migrated to Windows Ultimate 64 SP1, because my system's hard drive crashed. I installed Visual Studio 2005 SP1 and all the patches that Microsoft has recommended. I finally got my source code from my SCM, but now debugging does not stop on any of my breakpoints I have set. This is just a plain Winforms app, nothing fancy.
The first thing I did was to change the build target to x86. No dice. Then I went and downloaded Debugging Tools for x64, still no dice. I set the debugger to break on all exceptions both handled and unhandled. No dice either.
I've been looking at Google search results, but no luck there either. I've been at this for 3 days now with no luck. Has anybody dealt with this issue before? | 0 | [
2,
4611,
2835,
3782,
165,
1442,
3132,
18,
19,
13520,
6612,
4384,
52,
638,
800,
3726,
3726,
31,
114,
14204,
20,
1936,
6612,
4384,
3782,
165,
15,
185,
51,
329,
22,
18,
552,
1493,
7579,
9,
31,
4066,
3458,
1120,
812,
3782,
165,
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... |
Starting Outlook and having an email pre-populated from command line.
===
Is this possible? I want to have the To:, Body, and an Attachment all pre-populated so all the user has to do is click send. Thanks! | 0 | [
2,
1422,
19837,
17,
452,
40,
8517,
782,
8,
27459,
37,
1202,
293,
9,
800,
3726,
3726,
25,
48,
938,
60,
31,
259,
20,
57,
14,
20,
45,
15,
358,
15,
17,
40,
14575,
65,
782,
8,
27459,
86,
65,
14,
4155,
63,
20,
107,
25,
10840,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Writing a unit testing framework for testing SQL stored procedures
===
Today I had an idea of writing an unit testing framework for stored procedures in MySQL. The full idea is written on the recent post on my blog. In short it goeas as this.
I want to automte my procedure testing, I want to use a standardized way to test my procederues. Unit testing is widely documented, and there are a zilloin of XUnit frameworks out there, why not write one for MySQL (or any other database).
It would be open source of course.
What do you think? It is silly, stupid, needless or what?
Or another idea would be to write a general database framework in SQL. Hmm, I really want to discuss that with some one, collect thought and ideas. | 0 | [
2,
1174,
21,
1237,
4431,
6596,
26,
4431,
4444,
255,
8214,
8876,
800,
3726,
3726,
786,
31,
41,
40,
882,
16,
1174,
40,
1237,
4431,
6596,
26,
8214,
8876,
19,
51,
18,
22402,
9,
14,
503,
882,
25,
642,
27,
14,
1764,
678,
27,
51,
814... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Finding unused jars used in an eclipse project
===
Are there any plugins/tools available to go through the classpath of an eclipse project (or workspace) and highlight any unused jars? | 0 | [
2,
3007,
18927,
5112,
18,
147,
19,
40,
11652,
669,
800,
3726,
3726,
50,
80,
186,
10922,
108,
18,
118,
20799,
18,
904,
20,
162,
120,
14,
718,
8353,
16,
40,
11652,
669,
13,
5,
248,
170,
5582,
6,
17,
14373,
186,
18927,
5112,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Natural Sort Order in C#
===
Anyone have a good resource or provide a sample of a natural order sort in C# for an FileInfo array? I am implementing the IComparer interface in my sorts. | 0 | [
2,
1112,
2058,
389,
19,
272,
5910,
800,
3726,
3726,
1276,
57,
21,
254,
6577,
54,
1181,
21,
5717,
16,
21,
1112,
389,
2058,
19,
272,
5910,
26,
40,
3893,
108,
4120,
7718,
60,
31,
589,
17333,
14,
31,
960,
3574,
106,
6573,
19,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Are UIs copyrighted?
===
Is it legal to more or less "copy" (or euphemistically, be very "inspired by") the idea and UI of a copyrighted program? This question popped in my mind when looking at "[Things][1]" which is a Mac-only program.
How legal would it be for someone to make a Windows version of this program with a basically identical UI design and feature set? Where are the legal boundaries of what counts as copyright infringement?
Unless you specify otherwise, I am assuming an "IANAL" for any answer, so you don't have to write that. ;)
[1]: http://culturedcode.com/things/ | 2 | [
2,
50,
287,
403,
8398,
69,
60,
800,
3726,
3726,
25,
32,
1517,
20,
91,
54,
787,
13,
7,
19625,
7,
13,
5,
248,
22484,
1503,
3771,
1326,
15,
44,
253,
13,
7,
20667,
34,
7,
6,
14,
882,
17,
13,
5661,
16,
21,
8398,
69,
625,
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... |
c++ adding method to class defined in header file
===
I'm wondering if it is possible to add methods in main program to an existing class defined in header file.
For example:
There is `class CFun` defined in file `CFun.hpp`, but in our `party.cpp` we want to add a method `void hello() {cout << "hello" << endl;};`without editting `CFun.hpp`
Obiviously (unfortunately) construction:
#include "CFun.hpp"
class CFun
{
public:
void hello() {cout << "hello" << endl;};
};
doesn't work returning an error `Multiple declaration for 'CFun'`
Is it possible to make it work without class inheritance?
| 0 | [
2,
272,
20512,
4721,
2109,
20,
718,
2811,
19,
157,
106,
3893,
800,
3726,
3726,
31,
22,
79,
5712,
100,
32,
25,
938,
20,
3547,
3195,
19,
407,
625,
20,
40,
3149,
718,
2811,
19,
157,
106,
3893,
9,
26,
823,
45,
80,
25,
13,
1,
189... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SQL query against a web page(or, advanced find)
===
Suppose I have [a table][1]. Now, I'm interested in Getting Useful Data Easily. This means I'd rather not drop it into Excel and go through contortions, nor somehow get it into CSV and then into a DB, and then into SQL.
I'd like to be able to execute a SQL query directly against a table in HTML.
Has anyone heard of a tool like this before? I've never seen one.
[1]: http://www.eia.doe.gov/emeu/aer/txt/ptb0808.html | 0 | [
2,
4444,
255,
25597,
149,
21,
2741,
2478,
5,
248,
15,
2255,
477,
6,
800,
3726,
3726,
5787,
31,
57,
636,
58,
859,
500,
2558,
165,
500,
9,
130,
15,
31,
22,
79,
3158,
19,
1017,
4811,
1054,
2351,
9,
48,
1108,
31,
22,
43,
864,
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 concept of shared sessions exist in ASP.NET?
===
I am working on a web application (ASP.NET) game that would consist of a single page, and on that page, there would be a game board akin to Monopoly. I am trying to determine what the best architectural approach would be. The main requirements I have identified thus far are:
- Up to six users share a single game state object.
- The users need to keep (relatively) up to date on the current state of the game, i.e. whose turn it is, what did the active user just roll, how much money does each other user have, etc.
I have thought about keeping the game state in a database, but it seems like overkill to keep updating the database when a game state object (say, in a cache) could be kept up to date. For example, the flow might go like this:
1. Receive request for data from a user.
2. Look up data in database. Create object from that data.
3. Verify user has permissions to perform request based on the game's state (i.e. make sure it's really their turn or have enough money to buy that property).
4. Update the game object.
5. Write the game object back to the database.
6. Repeat for every single request.
*Consider that a single server would be serving several concurrent games.*
I have thought about using AJAX to make requests to an an ASP.NET page.<br>
I have thought about using AJAX requests to a web service using silverlight.<br>
I have thought about using WCF duplex channels in silverlight.
I can't figure out what the best approach is. All seem to have their drawbacks. Does anyone out there have experience with this sort of thing and care to share those experiences? Feel free to ask your own questions if I am being too ambiguous! Thanks. | 0 | [
2,
630,
14,
2420,
16,
2592,
5763,
3182,
19,
28,
306,
9,
2328,
60,
800,
3726,
3726,
31,
589,
638,
27,
21,
2741,
3010,
13,
5,
472,
306,
9,
2328,
6,
250,
30,
83,
7929,
16,
21,
345,
2478,
15,
17,
27,
30,
2478,
15,
80,
83,
44,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I observe what's happening under the hood of ActiveMQ?
===
I'm experiencing an [issue][1] with ActiveMQ and would like to trace/view all ActiveMQ activity. The only log file I can find is one associated with persistent data (if this is turned on). Are there any other log files I view or generate to tell me what's happening under the hood of ActiveMQ and why my consumers aren't consuming messages? Any other suggestions?
Thanks in advance!
[1]: http://stackoverflow.com/questions/248182/my-c-activemq-client-can-send-messages-but-not-receive-messages | 0 | [
2,
184,
92,
31,
10503,
98,
22,
18,
4942,
131,
14,
6124,
16,
1348,
79,
1251,
60,
800,
3726,
3726,
31,
22,
79,
15138,
40,
636,
12565,
500,
2558,
165,
500,
29,
1348,
79,
1251,
17,
83,
101,
20,
5565,
118,
4725,
65,
1348,
79,
1251,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Slicing up a UIImage on iPhone
===
Objective: take a UIImage, crop out a square in the middle, change size of square to 320x320 pixels, slice up the image into 16 80x80 images, save the 16 images in an array.
Here's my code:
CGImageRef originalImage, resizedImage, finalImage, tmp;
float imgWidth, imgHeight, diff;
UIImage *squareImage, *playImage;
NSMutableArray *tileImgArray;
int r, c;
originalImage = [image CGImage];
imgWidth = image.size.width;
imgHeight = image.size.height;
diff = fabs(imgWidth - imgHeight);
if(imgWidth > imgHeight){
resizedImage = CGImageCreateWithImageInRect(originalImage, CGRectMake(floor(diff/2), 0, imgHeight, imgHeight));
}else{
resizedImage = CGImageCreateWithImageInRect(originalImage, CGRectMake(0, floor(diff/2), imgWidth, imgWidth));
}
CGImageRelease(originalImage);
squareImage = [UIImage imageWithCGImage:resizedImage];
if(squareImage.size.width != squareImage.size.height){
NSLog(@"image cutout error!");
//*code to return to main menu of app, irrelevant here
}else{
float newDim = squareImage.size.width;
if(newDim != 320.0){
CGSize finalSize = CGSizeMake(320.0, 320.0);
UIGraphicsBeginImageContext(finalSize);
[squareImage drawInRect:CGRectMake(0, 0, finalSize.width, finalSize.height)];
playImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
}else{
playImage = squareImage;
}
}
finalImage = [playImage CGImage];
tileImgArray = [NSMutableArray arrayWithCapacity:0];
for(int i = 0; i < 16; i++){
r = i/4;
c = i%4;
//*
tmp = CGImageCreateWithImageInRect(finalImage, CGRectMake(c*tileSize, r*tileSize, tileSize, tileSize));
[tileImgArray addObject:[UIImage imageWithCGImage:tmp]];
}
The code works correctly when the original (the variable image) has its smaller dimension either bigger or smaller than 320 pixels. When it's exactly 320, the resulting 80x80 images are almost entirely black, some with a few pixels at the edges that may (I can't really tell) be from the original image. | 0 | [
2,
27646,
71,
21,
13,
5661,
22039,
27,
21024,
800,
3726,
3726,
7038,
45,
247,
21,
13,
5661,
22039,
15,
9833,
70,
21,
735,
19,
14,
772,
15,
753,
1072,
16,
735,
20,
13,
12402,
396,
12402,
18146,
18,
15,
12982,
71,
14,
1961,
77,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Bulk file text substitution in place. Any simple way to do that?
===
First of all, I'm a Perl newbie, so please be gentle =)
I've been trying to code a Perl script to substitute some text on all source files of my project. I'm in need of something like:
<pre>perl -p -i.bak -e "s/thisgoesout/thisgoesin/gi" *.{cs,aspx,ascx}</pre>
But that parses <strong>all</strong> the files of a directory <strong>recursively</strong>.
I just started a script:
<pre>
use File::Find::Rule;
use strict;
my @files = (File::Find::Rule->file()->name('*.cs', '*.aspx', '*.ascx')->in('.'));
foreach my $f (@files){
if ($f =~ s/thisgoesout/thisgoesin/gi) {
#inplace file editing, or something like that
}
}
</pre>
But now I'm stuck. Is there a simple way to edit all files in place using Perl?
Please note that I don't need to keep a copy of every modified file, I'm have 'em all subversioned =) | 0 | [
2,
7238,
3893,
1854,
19910,
19,
209,
9,
186,
1935,
161,
20,
107,
30,
60,
800,
3726,
3726,
64,
16,
65,
15,
31,
22,
79,
21,
416,
255,
78,
5893,
15,
86,
2247,
44,
5654,
800,
6,
31,
22,
195,
74,
749,
20,
1797,
21,
416,
255,
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... |
Create (LLBLGen) Linq query dynamicly with strings
===
We need to generate LINQ queries which are 100% unknown during coding (design time). This is because the logic is avaiable in our framework which is 100% speerated from any data projects. For data we use LLBLGen generated data access code.
Normally by using invokes on the DLL, which we specify to the framework (not reference) we can create code to retrieve data. But now we need to do this by linq. How could we create a query like:
var q = from customer in m.Customer
select new
{
customer.Number,
customer.City,
customer.CountryEntity.Name
};
from strings only. We would have 1 string called "customer" so we know we have to retrieve from Customer. Then we would have a string[] containing the fieldnames we want to retrieve. As you can see these columns could include complex types (related fields).
Any advice, especially in combination with LLBLGen, would be great!
Thanks,
Gab | 0 | [
2,
1600,
13,
5,
211,
6287,
1863,
6,
6294,
1251,
25597,
7782,
102,
29,
7887,
800,
3726,
3726,
95,
376,
20,
7920,
6294,
1251,
9386,
2829,
56,
50,
12849,
2562,
112,
13,
15458,
13,
5,
19862,
85,
6,
9,
48,
25,
185,
14,
7085,
25,
21... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Multiple columns combined in MySql
===
I want to do a select in MySql that combines several columns... something like this pseudocode:
select payment1_paid and payment2_paid as paid_in_full from denormalized_payments where payment1_type = 'check';
I can't use any other language for this particular problem than MySql.
Thanks for any help!
| 0 | [
2,
1886,
7498,
2461,
19,
51,
18,
22402,
800,
3726,
3726,
31,
259,
20,
107,
21,
5407,
19,
51,
18,
22402,
30,
15339,
238,
7498,
9,
9,
9,
301,
101,
48,
8452,
9375,
45,
5407,
7582,
165,
1,
19731,
17,
7582,
135,
1,
19731,
28,
2192,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Favourite AJAX library for classic ASP?
===
Just wondering if there are any good libraries for AJAX (prefer JSON rather then XML but anything is good) for classic ASP (VBScript)...
Rather not reinvent the wheel if it's already working and debugged.
Cheers,
Gaspard | 0 | [
2,
7740,
20624,
1248,
26,
2732,
28,
306,
60,
800,
3726,
3726,
114,
5712,
100,
80,
50,
186,
254,
8649,
26,
20624,
13,
5,
3515,
2407,
487,
528,
864,
94,
23504,
47,
602,
25,
254,
6,
26,
2732,
28,
306,
13,
5,
20468,
8741,
6,
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... |
Functional test software/framework that covers Asp.Net Web Apps?
===
I recently began to use the [NexusLight][1], a functional test automation framework.
Are there more frameworks that does a similar task?
[1]: http://www.codeplex.com/aspnet/Wiki/View.aspx?title=ASP.NET%20QA | 0 | [
2,
7652,
1289,
2306,
118,
8361,
3783,
30,
2937,
28,
306,
9,
2328,
2741,
4865,
18,
60,
800,
3726,
3726,
31,
1989,
260,
20,
275,
14,
636,
22420,
267,
3130,
500,
2558,
165,
500,
15,
21,
7652,
1289,
23217,
6596,
9,
50,
80,
91,
6596,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Double Negation in C++ code.
===
I just came onto a project with a pretty huge code base.
I'm mostly dealing with C++ and a lot of the code they write uses double negation for their boolean logic.
if (!!variable && (!!api.lookup("some-string"))) {
do_some_stuff();
}
I know these guy's are intelligent programmers, it's obvious they aren't doing this by accident.
I'm no seasoned C++ expert, my only guess at why they are doing this is that they want to make absolutely positive that the value being evaluated is the actual boolean representation. So they negate it, then negate that again to get it back to it's actual boolean value.
Is this a correct? or am I missing something else?
Thanks,
Brian Gianforcaro | 0 | [
2,
1494,
9574,
857,
19,
272,
20512,
1797,
9,
800,
3726,
3726,
31,
114,
281,
1204,
21,
669,
29,
21,
1772,
2329,
1797,
1000,
9,
31,
22,
79,
1555,
5746,
29,
272,
20512,
17,
21,
865,
16,
14,
1797,
59,
2757,
2027,
1494,
9574,
857,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Error after changing the primary key to from PKID to UserID
===
I have a ASP.NET/VB that had a GridView to display a list of users from the Users table.
I changed the primary key column name in the database from PKID to UserID and updated all the old references to PKID in the declarations and code behind. I also deleted the WebsiteCache folder which held the visual studio cache of the website.
When I drop a new SQLDatasource on the page and try to configure it, the old PKID is still there but when I connect via Server Explorer the UserID column is shown as expected.
Is there another cache or something I'm missing in all this?
The error is:
UserID is neither a DataColumn nor a DataRelation for table DefaultView
| 0 | [
2,
7019,
75,
4226,
14,
1256,
1246,
20,
37,
351,
14927,
20,
275,
5175,
800,
3726,
3726,
31,
57,
21,
28,
306,
9,
2328,
118,
20468,
30,
41,
21,
7354,
4725,
20,
3042,
21,
968,
16,
3878,
37,
14,
3878,
859,
9,
31,
1015,
14,
1256,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 build a single instance application using Click Once?
===
I need to have a single instance application (as per this [answer][1]), but it needs to be deployed via click once.
The problem is that I require that click once doesn't automatically detect an update an attempt to load a newer version while the application is running. If it is running, then I need the other instance to be made active. Usually, when selecting a Click Once link, the very first thing it does is attempt to find an update. I want to intercept this and check for an already running instance **prior** to launching the normal update process.
Does anyone know how this is possible within a Click Once deployment scenario?
[1]: http://stackoverflow.com/questions/19147/what-is-the-correct-way-to-create-a-single-instance-application#19326 | 0 | [
2,
184,
92,
31,
1895,
21,
345,
4851,
3010,
568,
10840,
382,
60,
800,
3726,
3726,
31,
376,
20,
57,
21,
345,
4851,
3010,
13,
5,
472,
416,
48,
636,
5950,
4662,
500,
2558,
165,
500,
6,
15,
47,
32,
2274,
20,
44,
6698,
1197,
10840,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 something between a normal user account and root?
===
I'm developing an application that manages network interfaces on behalf of the user and it calls out to several external programs (such as ifconfig) that requires root to make changes. (Specifically, changing the IP address of a local interface, etc.) During development, I have been running the IDE as root (ugh) and the debugger as root (double-ugh). Is there a nice way for the end-user to run these under a non-root account? I strongly dislike the size of the attack surface presented by GTK, wxPython, Python, and my application when it runs as root.
I have looked into capabilities, but they look half-baked and I'm not sure if I'd be able to use them in Python, especially if they are on a thread basis. The only option I haven't explored is a daemon that has the setuid bit set and does all the root-type stuff on behalf of the UI. I'm hesitant to introduce that complexity this early in the project, as running as root is not a dealbreaker for the users. | 0 | [
2,
25,
80,
301,
128,
21,
1826,
4155,
2176,
17,
5900,
60,
800,
3726,
3726,
31,
22,
79,
3561,
40,
3010,
30,
9118,
982,
6573,
18,
27,
5883,
16,
14,
4155,
17,
32,
3029,
70,
20,
238,
4886,
1726,
13,
5,
4289,
28,
100,
14093,
2816,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What's the best way to link to an external style sheet in SharePoint
===
I have some user controls that I'm loading in SharePoint and I would prefer to have all those styles contained in an external style sheet. What's the best way to link to an external stylesheet in CSS?
Thanks. | 0 | [
2,
98,
22,
18,
14,
246,
161,
20,
3508,
20,
40,
4886,
1034,
6125,
19,
1891,
3132,
800,
3726,
3726,
31,
57,
109,
4155,
8671,
30,
31,
22,
79,
12797,
19,
1891,
3132,
17,
31,
83,
6369,
20,
57,
65,
273,
6443,
3437,
19,
40,
4886,
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... |
File Structure / Architecture for AJAX Site?
===
I'm building a site using ajax and am trying to decide where to put the files that supply the data for the ajax requests.
For example, I am going to have a .js file that can be included in a page that will create country/state select boxes. I will have the .js file under /inc/js.
However, I am not sure where I want to put the ajax file that supplies the state data based on the country selected. I could put it next to the file it supports, make a folder for ajax data request files, etc.
What do you do to keep your ajax requests organized by file? | 0 | [
2,
3893,
1411,
13,
118,
2607,
26,
20624,
689,
60,
800,
3726,
3726,
31,
22,
79,
353,
21,
689,
568,
20624,
17,
589,
749,
20,
4073,
113,
20,
442,
14,
6488,
30,
2837,
14,
1054,
26,
14,
20624,
12279,
9,
26,
823,
15,
31,
589,
228,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 do boolean logic on two columns in MySql, one of which is a Varchar?
===
This is the sequel to [this question][1].
I would like to combine three columns into one on a MySql select. The first two columns are boolean and the third is a string, which is sometimes null. This causes strange results:
Select *, (payment1_paid && ((payment2_paid || payment2_type ="none"))) as paid_in_full from payments
**Note:** `payment1_paid` is boolean, `payment2_paid` is boolean, `payment2_type` is varchar.
**Note:** Please ignore how ridiculous the structure of this table is. Behind every piece of bad code there is a long explanation :)
Thanks in advance for your help!
Daniel
[1]: http://stackoverflow.com/questions/248683/how-can-i-do-boolean-logic-on-two-columns-in-mysql
| 0 | [
2,
184,
107,
31,
107,
9827,
413,
210,
7085,
27,
81,
7498,
19,
51,
18,
22402,
15,
53,
16,
56,
25,
21,
4033,
5433,
60,
800,
3726,
3726,
48,
25,
14,
6998,
20,
636,
1565,
1301,
500,
2558,
165,
500,
9,
31,
83,
101,
20,
12287,
132... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Browser add-on to find a download's origin
===
Back in the earlier days of the internet I remember that in certain browsers, every time you downloaded an image or a file, the URL of where that file was downloaded from would be written into that file's properties (I guess the summary tab?). I think Netscape v2 did this if I remember correctly.
I really miss that kind of functionality as every once in a while I'll run into a neat little program stored somewhere in the depths of my hard drive and wonder where I got it from originally.
I googled around but I'm not quite sure what terms to use to describe what I'm looking for. So I'm wondering if anyone knows of a Firefox plug-in or something similar that would do this? | 0 | [
2,
16495,
3547,
8,
218,
20,
477,
21,
7121,
22,
18,
2986,
800,
3726,
3726,
97,
19,
14,
1201,
509,
16,
14,
2620,
31,
1518,
30,
19,
1200,
16495,
18,
15,
352,
85,
42,
23887,
40,
1961,
54,
21,
3893,
15,
14,
287,
6362,
16,
113,
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... |
VB6 Editor changing case of variable names!
===
I'm not much of a Visual Basic person, but I am tasked with maintaining an old VB6 app. Whenever I check out a file, the editor will replace a bunch of the uppercase variable names with lowercase automatically. How can I make this stop!? I don't want to have to change them all back, and it's a pain to have these changes show up in SourceSafe "Differences" when I'm trying to locate the REAL differences. | 0 | [
2,
13,
20468,
379,
1835,
4226,
610,
16,
7612,
1817,
187,
800,
3726,
3726,
31,
22,
79,
52,
212,
16,
21,
3458,
2125,
840,
15,
47,
31,
589,
14605,
29,
8215,
40,
315,
13,
20468,
379,
4865,
9,
6634,
31,
2631,
70,
21,
3893,
15,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SQL Query Help - task ordering, grouping and status + date conditions problem
===
Hopefully I can do the problem justice, because it was too difficult to summarise it in the title! (suggestions are welcome in the comments)
<u>Right, so here's my table:</u>
Tasks
task_id (number)
job_id (number)
to_do_by_date (date)
task_name (varchar / text)
status (number)
completed_date (date)
<u>for arguments sake let's make the values of status:</u>
1 = New
2 = InProgress
3 = Done
<u>and what I'm having trouble trying to do is create a query that pulls back all of the tasks:</u>
* where all of the tasks for a `job_id` have a `status` <> Done
* except where all tasks for a `job_id` are are done, but one or more tasks have a `completed_date` of today
* ordered by the `to_be_done_by` date, but grouping all of the job_id tasks together
* so the `job_id` with the next `to_do_by_date' task is shown first
<u>some information about the data:</u>
* a `job_id` can have an arbitrary number of tasks
<br />
<u>**Here's an example of the output I'm trying to get:**</u>
task_id job_id to_do_by_date task_name status completed_date
1 1 yesterday - 3 yesterday
2 1 today - 3 today
3 2 now - 3 today
4 2 2 hours time - 2 {null}
5 2 4 hours time - 2 {null}
6 2 tomorrow - 1 {null}
7 3 3 hours time - 2 {null}
8 3 tomorrow - 1 {null}
9 3 tomorrow - 1 {null}
<br />
I'm using Oracle 10g, so answers for Oracle or ANSI SQL, or a hint for how to approach this would be ideal, and I can create Views or wrap this in a Stored Procedure to offload logic from the application if your solution calls for it.
<br />
<u>here's a sql script that will create the example test data shown above:</u>
create table tasks (task_id number, job_id number, to_do_by_date date, task_name varchar2(50), status number, completed_date date);
insert into tasks values (1,1,sysdate -1, 'Job 1, Task 1', 3, sysdate -1);
insert into tasks values (2,1,sysdate -2/24, 'Job 1, Task 2', 3, sysdate -2/24);
insert into tasks values (3,2,sysdate, 'Job 2, Task 1', 3, sysdate);
insert into tasks values (4,2,sysdate +2/24, 'Job 2, Task 2', 2, null);
insert into tasks values (5,2,sysdate +4/24, 'Job 2, Task 3', 2, null);
insert into tasks values (6,2,sysdate +1, 'Job 2, Task 4', 1, null);
insert into tasks values (7,3,sysdate +3/24, 'Job 3, Task 1', 2, null);
insert into tasks values (8,3,sysdate +1, 'Job 3, Task 2', 1, null);
insert into tasks values (9,3,sysdate +1, 'Job 3, Task 3', 1, null);
commit;
<br />
Many, many thanks for your help :o)
| 0 | [
2,
4444,
255,
25597,
448,
13,
8,
3005,
15775,
15,
19288,
17,
1782,
2754,
1231,
2039,
1448,
800,
3726,
3726,
13416,
31,
92,
107,
14,
1448,
1557,
15,
185,
32,
23,
266,
1956,
20,
18074,
11864,
32,
19,
14,
581,
187,
13,
5,
18,
21606... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 .NET equivalent of Java Web Start?
===
Is there a .NET equivalent of Java Web Start?
I want a one-click, from the web, lightweight install for a group of .NET assemblies and resources. Hopefully, the link would continue to keep the user updated with the latest version, similar to what Java Web Start does.
The application is written in F#, for what it's worth. | 0 | [
2,
25,
80,
21,
13,
9,
2328,
4602,
16,
8247,
2741,
799,
60,
800,
3726,
3726,
25,
80,
21,
13,
9,
2328,
4602,
16,
8247,
2741,
799,
60,
31,
259,
21,
53,
8,
150,
10129,
15,
37,
14,
2741,
15,
13613,
16146,
26,
21,
214,
16,
13,
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 do I walk through tree of Pdf Objects in PDFSharp?
===
I am trying to to walk though the tree of PdfItem objects in an existing PDF document using PDFSharp in c#.
I want to create a hierarchy of all the objects as I go along -- similar to what the "PDF Explorer" example does -- but I want it to be a tree instead of a flat list of all the objects.
The root node is document.Internals.Catalog. And I want to to walk down through all the document.Internals.Catalog.Elements until I have visited every element.
One of the problems I run into is that there are circular references in the tree and I can't figure out how to detect them.
Any examples out there?
| 0 | [
2,
184,
107,
31,
1466,
120,
1541,
16,
13,
11124,
3916,
19,
13,
11124,
23646,
60,
800,
3726,
3726,
31,
589,
749,
20,
20,
1466,
362,
14,
1541,
16,
13,
11124,
2119,
79,
3916,
19,
40,
3149,
13,
11124,
4492,
568,
13,
11124,
23646,
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... |
PHP IDE--Want to sync local storage with FTP
===
I currently use Notepad++ for most of my development. I have been checking out other, more full-featured options and would like to switch (I'm in particular a fan of Aptana so far) but there is one thing about Notepad++ that I really like and I haven't been able to get so far.
My current workflow is something like this: [Workflow][1] (I tried to embed this image and it showed up in previews but not in the post, sorry)
![Workflow][2]
The process is this:
1. Download file from web server
2. Make edits in NP++
3. Save (this automatically saves a local copy in my default directory, which is also the folder I have setup using Subversion with Tourtise SVN)
4. When I want to commit a change to SVN, go through the local folder that has an up to date copy
What I can't figure out how to do with Aptana is automatically store a local copy of a file I download from my server, edit and save back to the server. Is there some way to do this? If so, that would solve my problem immediately.
Other options would be a suggestion for a better way to manage the relationship between my server, my editor and my SVN repository. I know Aptana can access my SVN repository too. Is there an easy way to commit changes from within Aptana when I want to (which means I could take Tourtise out of the equation I guess)?
Any suggestions appreciated. Thanks.
[1]: http://evanalyze.com/images/workflow
[2]: http://evanalyze.com/images/workflow.jpg | 0 | [
2,
13,
26120,
13,
3448,
8,
8,
14876,
20,
6063,
150,
375,
4326,
29,
1187,
306,
800,
3726,
3726,
31,
871,
275,
1945,
8240,
20512,
26,
127,
16,
51,
522,
9,
31,
57,
74,
9886,
70,
89,
15,
91,
503,
8,
26956,
43,
6368,
17,
83,
101,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best Forum software to Integrate with a Wordpress blog?
===
If you wanted to add a user Forum to your software site, and make it look and work like your WordPress blog, what Forum software would you choose?
Apparently bbPress has the same origins as WordPress, but is it best or are there other choices that are better? | 0 | [
2,
98,
25,
14,
246,
5691,
2306,
20,
18399,
29,
21,
833,
5890,
8146,
60,
800,
3726,
3726,
100,
42,
417,
20,
3547,
21,
4155,
5691,
20,
154,
2306,
689,
15,
17,
233,
32,
361,
17,
170,
101,
154,
833,
5890,
8146,
15,
98,
5691,
2306,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
JSONP and Cross-Domain queries - How to Update/Manipulate instead of just read
===
So I'm reading The Art & Science of Javscript, which is a good book, and it has a good section on JSONP. I've been reading all I can about it today, and even looking through every question here on StackOverflow. JSONP is a great idea, but it only seems to resolve the "Same Origin Problem" for <i>getting</i> data, but doesn't address it for <i>changing</i> data.
Did I just miss all the blogs that talked about this, or is JSONP <strong>not</strong> the solution I was hoping for? | 0 | [
2,
487,
528,
306,
17,
919,
8,
537,
6232,
9386,
2829,
13,
8,
184,
20,
11100,
118,
177,
4307,
12383,
700,
16,
114,
1302,
800,
3726,
3726,
86,
31,
22,
79,
1876,
14,
415,
279,
762,
16,
3009,
710,
8741,
15,
56,
25,
21,
254,
360,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a way to enforce function inlining in c#?
===
As far as I know there's no way to hint the c# compiler to inline a particular function and I guess it's like that by design.
I also think that not letting the programmer to specify what to inline and what not is generally a good idea, as it would imply that you think you're smarter than the JIT compiler (my respects to those who actually are), but, what if I wanted to specify that a critical portion of code needs to be extremely fast at any cost, no matter how to achieve it on the target machine? As of yet you can't do such a thing and I wonder if both the c# language and the JIT will ever support this feature.
In my case, I know what the target machine is, and I know that function inlining will help improve the performance. This leaves me thinking that the only way to enforce function inlining is getting to know under what circumstances the JIT will do it but I don't think that's a good idea either,
Any light on the subject would be much appreciated.
Thanks.
| 0 | [
2,
25,
80,
21,
161,
20,
16525,
1990,
19,
8930,
19,
272,
5910,
60,
800,
3726,
3726,
28,
463,
28,
31,
143,
80,
22,
18,
90,
161,
20,
6382,
14,
272,
5910,
21486,
20,
19,
1143,
21,
1498,
1990,
17,
31,
2321,
32,
22,
18,
101,
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... |
File Uploads Timeout > 3 min
===
I'm using SWFUpload to handle file uploads and have run into a problem where any file upload >= 3 min will time out. As far as I can tell, Apache and PHP are configured properly to handle large files. Are there any settings with Flash that might affect this? Does Flash have some sort of timeout value I could change? | 0 | [
2,
3893,
71,
8294,
18,
85,
1320,
13,
1,
203,
4232,
800,
3726,
3726,
31,
22,
79,
568,
13,
18,
15263,
576,
8294,
20,
3053,
3893,
71,
8294,
18,
17,
57,
485,
77,
21,
1448,
113,
186,
3893,
71,
8294,
13,
1,
3726,
203,
4232,
129,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
tortoise svn undo commit
===
I commited a bunch of files (dozens of files in different folders) by accident. What is the easiest, cleanest (and safest!) way to 'undo' that commit w/o having to delete the files from my working directory? | 0 | [
2,
25691,
13,
18,
16578,
367,
537,
9686,
800,
3726,
3726,
31,
9686,
69,
21,
7653,
16,
6488,
13,
5,
537,
4257,
18,
16,
6488,
19,
421,
19294,
18,
6,
34,
3351,
9,
98,
25,
14,
27237,
15,
2745,
1430,
13,
5,
290,
1834,
384,
187,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Running as admin some times.
===
I have a program that needs to run as a normal user most of the time once in a while I need to stop and start a service. How do I go about making a program that runs as a normal user most of the time but elevates into administrator mode for some function. | 0 | [
2,
946,
28,
21,
43,
2160,
109,
436,
9,
800,
3726,
3726,
31,
57,
21,
625,
30,
2274,
20,
485,
28,
21,
1826,
4155,
127,
16,
14,
85,
382,
19,
21,
133,
31,
376,
20,
747,
17,
799,
21,
365,
9,
184,
107,
31,
162,
88,
544,
21,
62... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Compiling FFMPEG on Windows using Wascana
===
Has anyone ever tried, or had any success at getting Wascana (Eclipse CDT + MinGW for Windows) to compile FFMPEG under Windows. Apparently it is possible, there is even a [tutorial at Craig Shaw's website][1] but I have not been able to make it work.
I run ./configure on the FFMPEG source code then create a new project in Eclipse and point it at the source but it doesn't recognise it as a Makefile project. I think I need to create a builder which works with MinGW but my feeble attempts so far have been unsuccessful.
[1]: http://www.craigshaw.com/2007/07/25/BuildingFFMPEGUsingCDTForWindows.aspx | 0 | [
2,
24378,
13,
2460,
79,
20427,
27,
1936,
568,
23,
1245,
58,
800,
3726,
3726,
63,
1276,
462,
794,
15,
54,
41,
186,
1280,
35,
1017,
23,
1245,
58,
13,
5,
3319,
6013,
870,
1745,
38,
2754,
12069,
499,
26,
1936,
6,
20,
26561,
13,
24... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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: using a recursive algorithm as a generator
===
Recently I wrote a function to generate certain sequences with nontrivial constraints. The problem came with a natural recursive solution. Now it happens that, even for relatively small input, the sequences are several thousands, thus I would prefer to use my algorithm as a generator instead of using it to fill a list with all the sequences.
Here is an example. Suppose we want to compute all the permutations of a string with a recursive function. The following naive algorithm takes an extra argument 'storage' and appends a permutation to it whenever it finds one:
<pre><code>def getPermutations(string, storage, prefix=""):
if len(string) == 1:
storage.append(prefix + string) # <-----
else:
for i in range(len(string)):
getPermutations(string[:i]+string[i+1:], storage, prefix+string[i])
storage = []
getPermutations("abcd", storage)
for permutation in storage: print permutation
</code></pre>
(Please don't care about inefficiency, this is only an example.)
Now I want to turn my function into a generator, i.e. to yield a permutation instead of appending it to the storage list:
<pre><code>def getPermutations(string, prefix=""):
if len(string) == 1:
yield prefix + string # <-----
else:
for i in range(len(string)):
getPermutations(string[:i]+string[i+1:], prefix+string[i])
for permutation in getPermutations("abcd"):
print permutation
</code></pre>
This code does *not* work (the function behaves like an empty generator). I don't know how Python implements generators internally, so I cannot understand *why* it does not work, if not vaguely. Am I missing something?
Anyway: is there a way to turn the above recursive algorithm into a generator *without replacing it with an iterative one*? | 0 | [
2,
20059,
45,
568,
21,
302,
24244,
9083,
28,
21,
15286,
800,
3726,
3726,
1989,
31,
738,
21,
1990,
20,
7920,
1200,
11173,
29,
538,
19712,
16747,
9,
14,
1448,
281,
29,
21,
1112,
302,
24244,
4295,
9,
130,
32,
5531,
30,
15,
166,
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... |
can you write extension methods on type arrays?
===
I need to write an extension method on a byte[]. Is that possible? | 0 | [
2,
92,
42,
2757,
3896,
3195,
27,
1001,
7718,
18,
60,
800,
3726,
3726,
31,
376,
20,
2757,
40,
3896,
2109,
27,
21,
34,
591,
2558,
500,
9,
25,
30,
938,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How can I create an ordered list of the most common substrings inside of my MySQL varchar column?
===
I have a MySQL database table with a couple thousand rows. The table is setup like so:
`id | text`
The `id` column is an auto-incrementing integer, and the `text` column is a 200-character varchar.
Say I have the following rows:
`3 | I think I'll have duck tonight`
`4 | Maybe the chicken will be alright`
`5 | I have a pet duck now, awesome!`
`6 | I love duck`
Then the list I'm wanting to generate might be something like:
- 3 occurrences of 'duck'
- 3 occurrences of 'I'
- 2 occurrences of 'have'
- 1 occurrences of 'chicken'
- .etc .etc
Plus, I'll probably want to maintain a list of substrings to ignore from the list, like 'I', 'will' and 'have. It's important to note that I do not know what people will post.
I do not have a list of words that I want to monitor, I just want to find the most common substrings. I'll then filter out any erroneous substrings that are not interesting from the list manually by editing the query.
Can anyone suggest the best way to do this? Thanks everyone! | 0 | [
2,
184,
92,
31,
1600,
40,
1905,
968,
16,
14,
127,
757,
972,
11130,
18,
572,
16,
51,
51,
18,
22402,
4033,
5433,
4698,
60,
800,
3726,
3726,
31,
57,
21,
51,
18,
22402,
6018,
859,
29,
21,
1335,
2996,
11295,
9,
14,
859,
25,
18161,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 verify that mod_rewrite is working
===
I am having a lot of trouble with mod_rewrite, and for a while I had it going, but for some reason everything has stopped working.
Is there any sort of basic test that I can do to make sure that it is not something fundamental broken.
It does show up in phpinfo(); | 0 | [
2,
184,
20,
21012,
30,
7226,
1,
99,
23716,
25,
638,
800,
3726,
3726,
31,
589,
452,
21,
865,
16,
2572,
29,
7226,
1,
99,
23716,
15,
17,
26,
21,
133,
31,
41,
32,
228,
15,
47,
26,
109,
1215,
796,
63,
1175,
638,
9,
25,
80,
186,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Initiate an ASP.NET application without IDE
===
I am very new to ASP.Net and would like to try this technology, mostly because I am impressed with the performances so far.
I come from the PHP world where you can just include some PHP code into your HTML page and that will do the trick as long as the web server is able to give the page to the PHP processor. One page, one PHP script, this is the rule. (I'm leaving behind path info issues here...)
Now I am very confused about all the ASP.Net tutorials I read so far. ASP.Net seems to be working in many different ways and it looks like history often changed the "best way".
Here what I understood so far:
* You can embed you ASP code within your HTML page, this seems to be the old way, when .Net did not exist. While this looks ok for me PHP guy, I do not understand how I can share classes between pages.
* You can "partially define" (WTF?) the System.Web.UI.Page class and separate the ASP code from the HTML using some events and controls (did not really understand that one).
* You can create controls that you directly embed into your HTML that can be bound to external data, code is then completely separated from the HTML and has to be compiled separately (again, absolutely no clue about that).
Now keep in mind that I am using Mono with Mac OS X, so no Visual Studio, every "use-Visual-Studio-and-everything-is-done-for-you-automatically" answer will be down-voted, I want to actually type my code and understand what is going on under the hood. I want to be able to control what I send to the browser and how.
What would you recommend for a newbie like me to experiment with ASP.Net (using the C# language is that is relevant). Feel free to answer with a long formatted article, I really want an **ASP.Net beginner tutorial for existing PHP developers**. | 0 | [
2,
17014,
40,
28,
306,
9,
2328,
3010,
366,
13,
3448,
800,
3726,
3726,
31,
589,
253,
78,
20,
28,
306,
9,
2328,
17,
83,
101,
20,
1131,
48,
1099,
15,
1555,
185,
31,
589,
7059,
29,
14,
3200,
86,
463,
9,
31,
340,
37,
14,
13,
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... |
Classic ASP: Page text translated from SQL table, a faster way?
===
Using classic ASP VBScript, coupled to MS SQL Server, we have a function that takes 3 integers, `page_id`, `heading_id`, `language_id`
it looks up the page heading in a translation table...
This table contains roughly 10,000 rows...
The heading column is nvarchar(1000) plus the 3 int columns meaning it's around 2KiB per row max...
so my question is, is it worth copying this table into memory (Application object for example) using ADO's GetRows or through another method, or is it not worth it due to the "large" data size.
There are approximately 1 to 250 headings per page, 462 pages, with average of 34 headings/page.
So to save ~34 database calls a page, I use a large chunk of memory, and calls to application, and possibly it's slower anyway?
Thoughts? | 0 | [
2,
2732,
28,
306,
45,
2478,
1854,
4331,
37,
4444,
255,
859,
15,
21,
4233,
161,
60,
800,
3726,
3726,
568,
2732,
28,
306,
13,
20468,
8741,
15,
13420,
20,
4235,
4444,
255,
8128,
15,
95,
57,
21,
1990,
30,
1384,
203,
13820,
18,
15,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Shortcut for commenting CSS in VS 2008
===
When I press the standard Ctrl + E, C (an other variants) in VS2008 whilst editing a CSS file, it says that command is not available. How do I setup a shortcut to apply a plain old /* */ comment to selected text in VS? Thanks | 0 | [
2,
502,
4118,
26,
17797,
272,
18,
18,
19,
4611,
570,
800,
3726,
3726,
76,
31,
901,
14,
1236,
13,
4812,
6362,
2754,
13,
62,
15,
272,
13,
5,
210,
89,
11070,
6,
19,
4611,
2753,
4575,
9510,
21,
272,
18,
18,
3893,
15,
32,
898,
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... |
If object is Generic List
===
Is there any way to determain if an object is a generic list? Im not going to know the type of the list, I just know its a list. How can I determine that? | 0 | [
2,
100,
3095,
25,
12733,
968,
800,
3726,
3726,
25,
80,
186,
161,
20,
15190,
6232,
100,
40,
3095,
25,
21,
12733,
968,
60,
797,
52,
228,
20,
143,
14,
1001,
16,
14,
968,
15,
31,
114,
143,
82,
21,
968,
9,
184,
92,
31,
3746,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do I synchronize two processes?
===
I have a single HW interface I want to use from two applications (processes) on the same workstation. The HW requires a single initialization call then either app uses the same function (in the same library) to do many transactions with the HW.
So each app should act like this:
main()
// I don't know if another app already init'ed the HW
ret = hw_init_lock(non-blocking)
if ret = OK
// no one else has done this, I have to
init_hw()
else
//someone else has already init'ed the HW, I gotta make sure it stays that way
//as long as I'm alive
increment_hw_init_ref_counter()
hw_trans_lock(blocking)
hw_trans()
hw_trans_unlock()
....
//exit app, uninit hw if we are last out
ret = decrement_hw_init_ref_counter()
if ret == 0
uninit_hw()
exit(0)
What is the mechanism I can use in the lock and reference count calls that is shared between two applications? I'm thinking named pipes i.e. mkfifo().
| 0 | [
2,
184,
107,
31,
13,
16023,
2952,
81,
5102,
60,
800,
3726,
3726,
31,
57,
21,
345,
746,
499,
6573,
31,
259,
20,
275,
37,
81,
3767,
13,
5,
16835,
160,
6,
27,
14,
205,
170,
10839,
9,
14,
746,
499,
4781,
21,
345,
2104,
1829,
645... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Windows Workflow - Web Service - App_Data Directory - Database
===
Thanks for the help, in advance.
Solution<br/>
-- WorkflowProject<br/>
-- Workflow1<br/>
-- Workflow2<br/>
-- WebProject (WAP)<br/>
-- App_Data<br/>
-- MyDatabase.vdb3<br/>
-- MyWebService.asmx<br/>
-- Web.Config<br/>
Ok, so.. that's the basic "outline" of the project.
The database, is stored in the website, and is a VistaDB database (this could also be an MSAccess or SQLite Database). In the website, I could code against the database. I might have |DataDirectory| in my connection string.
The WORKFLOW project is separate from the Website. The MyWebService.asmx is a "stub" for calling the Workflow based web service.
***How** do I open the database in the website **App_Data** directory ? Right now, I have the value hardcoded (i.e., @"E:\datadirectory\database.vdb3"), but this is not preferred and would only work on my development machine.*
I can't even pass in the location of the database, since the webservice (the .asmx file) is only 1 line, and is stub code for getting the caller into the workflow. I'm really at a loss as how to proceed.
Solution ? Best practices ? Links ?
Thank you!
| 0 | [
2,
1936,
170,
9990,
13,
8,
2741,
365,
13,
8,
4865,
1,
18768,
16755,
13,
8,
6018,
800,
3726,
3726,
3669,
26,
14,
448,
15,
19,
3612,
9,
4295,
1,
5145,
118,
1,
13,
8,
8,
170,
9990,
21011,
1,
5145,
118,
1,
279,
13502,
3401,
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... |
Alternative to deprecated javax.servlet.http.HttpUtils.parseQueryString?
===
I am looking to parse a URL to obtain a collection of the querystring parameters in Java.
It looks as if the javax.servlet.http.HttpUtils.parseQueryString method would be the obvious choice, but it has been deprecated.
Is there an alternative method that I am missing, or has it just been deprecated without an equivalent replacement/enhanced function? | 0 | [
2,
2676,
20,
121,
3515,
150,
1669,
8247,
396,
9,
10321,
1336,
9,
21127,
9,
21127,
14255,
18,
9,
3574,
870,
8190,
93,
11130,
60,
800,
3726,
3726,
31,
589,
699,
20,
2017,
870,
21,
287,
6362,
20,
5545,
21,
1206,
16,
14,
25597,
1113... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What's the best interactive Analysis and Plotting Tool for software testing?
===
My realtime app generates a data log: 100 words of data @10Khz. I need to analyze it and produce some plots of the results. There are intermediate calculations involved - I need to take some differences, averages, etc. Excel would work fine, except for:
- the 32000 item limit on graph data series is too small - that's only 3 seconds of data.
- the glacial speed at which it processes changes to graphs containing large data series is unbearable.
What are good alternatives to Excel for manipulating and plotting large quantities of data? I'm looking for something interactive, not a library.
| 0 | [
2,
98,
22,
18,
14,
246,
9194,
2495,
17,
22716,
5607,
26,
2306,
4431,
60,
800,
3726,
3726,
51,
683,
891,
4865,
7920,
18,
21,
1054,
6738,
45,
808,
715,
16,
1054,
13,
1,
1036,
4278,
380,
9,
31,
376,
20,
16051,
32,
17,
2213,
109,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Picasa API integrate with iphone.
===
I have tried to integrate the Picasa API on iphone, compiles fine, but I am seeing the following error in launch.
dyld: Library not loaded: @loader_path/../Frameworks/GData.framework/Versions/A/GData
Referenced from: /Users/jacksu/Library/Application Support/iPhone Simulator/User/Applications/9A7E3F54-022F-4771-BD6A-E458F5545144/PicasaTest.app/PicasaTest
Reason: image not found
I am not sure what could be the problem.
I imported the GDataFramework from Source/build/Debug/GData.framework. I have built the project under Source directory.
Any advise are welcome.
Thanks.
// Jack | 0 | [
2,
9327,
8588,
21,
2159,
18399,
29,
21024,
9,
800,
3726,
3726,
31,
57,
794,
20,
18399,
14,
9327,
8588,
21,
2159,
27,
21024,
15,
26561,
18,
1123,
15,
47,
31,
589,
2078,
14,
249,
7019,
19,
3394,
9,
9841,
6252,
45,
1248,
52,
8572,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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# using statement catch error
===
I am just looking at the using statement, I have always known what it does but until now not tried using it, I have come up with the below code:
using (SqlCommand cmd = new SqlCommand(reportDataSource, new SqlConnection(Settings.Default.qlsdat_extensionsConnectionString)))
{
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@Year", SqlDbType.Char, 4).Value = year;
cmd.Parameters.Add("@startDate", SqlDbType.DateTime).Value = start;
cmd.Parameters.Add("@endDate", SqlDbType.DateTime).Value = end;
cmd.Connection.Open();
DataSet dset = new DataSet();
new SqlDataAdapter(cmd).Fill(dset);
this.gridDataSource.DataSource = dset.Tables[0];
}
This seems to work but is there any point in this since as far as I can tell I would still need to enclose this in a try catch block to catch unforseen errors e.g. sql server down. Am I missing something?
As far as I can currently see it just stops me closing and disposing of cmd but there will be more lines of code due to the try catch still being needed.
| 0 | [
2,
272,
5910,
568,
3331,
2949,
7019,
800,
3726,
3726,
31,
589,
114,
699,
35,
14,
568,
3331,
15,
31,
57,
550,
167,
98,
32,
630,
47,
163,
130,
52,
794,
568,
32,
15,
31,
57,
340,
71,
29,
14,
1021,
1797,
45,
568,
13,
5,
18,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to compile a C# file outside of App_Code?
===
I'd like to stick a class down in my folder hierarchy. The scenario is too trivial to warrant it's own project or separate website. However, I hate to clutter my top-level App_Code with something that's used by a tiny corner of the site.
Is there a way in web.config to include another file or folder in the compilation process? | 0 | [
2,
184,
20,
26561,
21,
272,
5910,
3893,
719,
16,
4865,
1,
9375,
60,
800,
3726,
3726,
31,
22,
43,
101,
20,
5258,
21,
718,
125,
19,
51,
19294,
14417,
9,
14,
12705,
25,
266,
13,
19712,
20,
8677,
32,
22,
18,
258,
669,
54,
1725,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Setting iPhone wallpaper (locked screen background) programmatically?
===
I have an app which could benefit from the user being able to choose to set an image as the wallpaper (the background image on the "slide to unlock" screen).
Is there a way for non-jailbreak third-party apps to do this? A search for "wallpaper" in the iPhone documentation returns nothing. | 0 | [
2,
2697,
21024,
28129,
13,
5,
3966,
69,
2324,
2395,
6,
625,
6732,
1326,
60,
800,
3726,
3726,
31,
57,
40,
4865,
56,
110,
4234,
37,
14,
4155,
142,
777,
20,
3538,
20,
309,
40,
1961,
28,
14,
28129,
13,
5,
124,
2395,
1961,
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... |
[NSOperationQueue operations] returns an empty array when it shouldn't?
===
I'm writing an application that does async loading of images onto the screen. I have it set up to be NOT concurrent (that is, it spawns a thread and executes them one at a time), so I've only overridden the [NSOperation main] function in my NSOperation subclass.
Anyway, so when I add all of these operations, I want to be able later to access the queued operations to change their priorities. Unfortunately, whenever I call [NSOperationQueue operations], all I get back is an empty array. The best part is that after putting in some console print statements, threads are still in the queue and executing (indicated by prints) despite the array being empty!
What gives? I also took a look at theadcount just to make sure they're all not executing at once and that does not appear to be the case.
Any ideas? Pulling my hair out on this one.
EDIT: Also worth mentioning that the same code provides a full array when run in the simulator :( | 0 | [
2,
636,
2172,
11377,
2005,
4185,
1311,
500,
4815,
40,
2424,
7718,
76,
32,
5714,
22,
38,
60,
800,
3726,
3726,
31,
22,
79,
1174,
40,
3010,
30,
630,
21,
9507,
150,
12797,
16,
3502,
1204,
14,
2324,
9,
31,
57,
32,
309,
71,
20,
44,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Unit testing that an event is raised in C#
===
I have some code that raises `PropertyChangedEvents` events and I would like to be able to unit test that the events are being raised correctly.
The code that is raising the events is like
<pre><code>
public class MyClass : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
protected void NotifyPropertyChanged(String info)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(info));
}
}
public string MyProperty
{
set
{
if (_myProperty != value)
{
_myProperty = value;
NotifyPropertyChanged("MyProperty");
}
}
}
}
</code></pre>
I get a nice green test from the following code in my unit test, that uses delegates:
<pre><code>
[TestMethod]
public void Test_ThatMyEventIsRaised()
{
string actual = null;
MyClass myClass = new MyClass();
myClass.PropertyChanged += delegate(object sender, PropertyChangedEventArgs e)
{
actual = e.PropertyName;
};
myClass.MyProperty = ""testing;
Assert.IsNotNull(actual);
Assert.AreEqual("MyProperty", actual);
}
</pre></code>
However, if I then try and chain the setting of properties together like so:
<pre><code>
public string MyProperty
{
set
{
if (_myProperty != value)
{
_myProperty = value;
NotifyPropertyChanged("MyProperty");
MyOtherProperty = "SomeValue";
}
}
}
public string MyOtherProperty
{
set
{
if (_myOtherProperty != value)
{
_myOtherProperty = value;
NotifyPropertyChanged("MyOtherProperty");
}
}
}
</code></pre>
My test for the event fails - the event that it captures is the event for the MyOtherProperty.
I'm pretty sure the event fires, my UI reacts like it does, but my delegate only captures the last event to fire.
So I'm wondering:
1. Is my method of testing events correct?
2. Is my method of raising *chained* events correct?
| 0 | [
2,
1237,
4431,
30,
40,
807,
25,
1127,
19,
272,
5910,
800,
3726,
3726,
31,
57,
109,
1797,
30,
15303,
13,
1,
10890,
106,
1084,
16229,
546,
6645,
18,
1,
963,
17,
31,
83,
101,
20,
44,
777,
20,
1237,
1289,
30,
14,
963,
50,
142,
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... |
Summarize aggregated data
===
I have a table like as follows:
<table>
<thead>
<tr>
<th>SoftwareName</th>
<th>Count</th>
<th>Location</th>
</tr>
</thead>
<tbody>
<tr>
<td>Project</td>
<td>15</td>
<td>Canada</td>
</tr>
<tr>
<td>Visio</td>
<td>12</td>
<td>Canada</td>
</tr>
<tr>
<td>Project</td>
<td>10</td>
<td>USA</td>
</tr>
<tr>
<td>Visio</td>
<td>5</td>
<td>USA</td>
</tr>
</tbody>
</table>
<br />
How do I query it to give me a summary like...
<table>
<thead>
<tr>
<th>SoftwareName</th>
<th>Canada</th>
<th>USA</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<tr>
<td>Project</td>
<td>15</td>
<td>10</td>
<td>25</td>
</tr>
<tr>
<td>Visio</td>
<td>12</td>
<td>5</td>
<td>17</td>
</tr>
</tbody>
</table> 12 5 17
How to do in T-SQL? | 0 | [
2,
18074,
139,
2952,
8544,
43,
1054,
800,
3726,
3726,
31,
57,
21,
859,
101,
28,
2415,
45,
13,
1,
5924,
1,
13,
1,
38,
1743,
1,
13,
1,
6384,
1,
13,
1,
96,
1,
12980,
5011,
7259,
1,
118,
96,
1,
13,
1,
96,
1,
16549,
1,
118,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Strange treatment of "plus" character (+) by Internet Explorer 7
===
This is really weird... When I open the following simple HTML document in Internet Explorer 7.0.5730.11
<html>
<body>
<p>+</p>
</body>
</html>
it shows me a totally blank page. FWIW, this is just a trivial "repro" sample. In real HTML documents, I observed other, even more bizzarre effects caused by presense of the "plus" character that follows a tag.
Looks like a bug in IE. Did anybody encounter the same or similar problem?
| 0 | [
2,
2578,
2202,
16,
13,
7,
13349,
7,
925,
13,
5,
2430,
6,
34,
2620,
8520,
453,
800,
3726,
3726,
48,
25,
510,
5455,
9,
9,
9,
76,
31,
368,
14,
249,
1935,
13,
15895,
4492,
19,
2620,
8520,
453,
9,
387,
9,
4219,
1762,
9,
1306,
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... |
LINQ2SQL Database providers
===
I have heard that LINQ2SQL has been written to support multiple database vendor providers however for internal political reasons at MS, only SQL Server has been supported.
Is this a fair summary of the situation, and if so has a timetable been released as to when other databases will be supported?
I am aware of Matt Warren's [BUILDING AN IQUERYABLE PROVIDER][1] series on the wayward weblog, but I would prefer not to build something now that will be released (probably better than I will do it) later
[1]: http://blogs.msdn.com/mattwar/archive/2007/07/30/linq-building-an-iqueryable-provider-part-i.aspx | 0 | [
2,
6294,
1251,
135,
18,
22402,
6018,
13488,
800,
3726,
3726,
31,
57,
752,
30,
6294,
1251,
135,
18,
22402,
63,
74,
642,
20,
555,
1886,
6018,
23510,
13488,
207,
26,
3117,
675,
2932,
35,
4235,
15,
104,
4444,
255,
8128,
63,
74,
1827,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Do you use curly braces for additional scoping?
===
I mean other than using it when required for functions, classes, if, while, switch, try-catch.
I didn't know that it could be done like [this until I saw this SO question](http://stackoverflow.com/questions/241088/what-do-curly-braces-by-themselves-mean-in-java).
In the above link, Eli mentioned that "They use it to fold up their code in logical sections that don't fall into a function, class, loop, etc. that would usually be folded up."
What other uses are there besides those mentioned?
Is it a good idea to use curly braces to limit the scope of your variables and expand the scope only if required (working on a "need-to-access" basis)? Or is it actually silly?
How about using scopes just so that you can use the same variable names in different scopes but in the same bigger scope? Or is it a better practise to reuse the same variable (if you want to use the same variable name) and save on deallocating and allocating (I think some compilers can optimise on this?)? Or is it better to use different variable names altogether? | 4 | [
2,
107,
42,
275,
21056,
15646,
18,
26,
1351,
11530,
3181,
60,
800,
3726,
3726,
31,
884,
89,
119,
568,
32,
76,
1390,
26,
3719,
15,
2684,
15,
100,
15,
133,
15,
5521,
15,
1131,
8,
18208,
9,
31,
223,
22,
38,
143,
30,
32,
110,
44... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I make UITableViewCellAccessoryDisclosureIndicator visible in black background?
===
<pre>cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;</pre>
in this method
<pre>(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath</pre>
but I can only see it when I select that cell otherwise it's not visible.and it work perfectly when background is white.
I am sure that I need to set a property, but I don't know which property I need to change to make this thing work.
thanks in advance.
cheers. | 0 | [
2,
184,
107,
31,
233,
13,
11193,
579,
4725,
9725,
20604,
7159,
9752,
1415,
5838,
108,
4673,
3457,
4560,
19,
319,
2395,
60,
800,
3726,
3726,
13,
1,
3515,
1,
9725,
9,
20604,
7159,
4474,
800,
13,
11193,
579,
4725,
9725,
20604,
7159,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 application domains are CPU bound and will tend to benefit from multi-core technologies?
===
I hear a lot of people talking about the revolution that is coming in programming due to multi-core processors and parallelism, but I can't shake the feeling that for most of us, CPU cycles aren't the bottleneck. Pretty much all of my programs have been I/O bound in one way or another (database, filesystem, network, user interaction, etc.) for a very long time.
Now I can think of a few areas where CPU cycles are a limiting factor, like code breaking, graphics, sound, some forms of simulation (weather, physics, etc.), and some forms of mathematical research, but they all seem like fairly specialized application domains. My general impression is that most programs are still I/O bound and that for most of our industry CPUs have been plenty fast for quite a while now.
Am I off my rocker? What other application domains are CPU bound today? Do any of them include a large portion of the programming population? In essence, I'm wondering whether the multi-core CPUs will impact very many of us, and if so, how? | 0 | [
2,
98,
3010,
15544,
50,
17578,
4138,
17,
129,
5480,
20,
4234,
37,
1889,
8,
10375,
5740,
60,
800,
3726,
3726,
31,
990,
21,
865,
16,
148,
1582,
88,
14,
2458,
30,
25,
880,
19,
3143,
397,
20,
1889,
8,
10375,
21034,
17,
3821,
756,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 modify a method body at run-time in .NET?
===
I know that it is possible (in theory) to create a new type at run-time, but is it possible to modify a method body of an existing type at run-time? My plan (if I can get this to work) is to tag up methods with a custom attribute, and then at run-time search for methods with the attribute, and insert some of my own code into the method body.
Any suggestions?
I suppose if I can't get that approach to work, I could always go with a virtual method in a base class (with the attributes), combined with a static factory to spit out a derived dynamic type with my run-time generated method in the child class. This would not be quite as clean to use though. | 0 | [
2,
25,
32,
938,
20,
17579,
21,
2109,
358,
35,
485,
8,
891,
19,
13,
9,
2328,
60,
800,
3726,
3726,
31,
143,
30,
32,
25,
938,
13,
5,
108,
1639,
6,
20,
1600,
21,
78,
1001,
35,
485,
8,
891,
15,
47,
25,
32,
938,
20,
17579,
21,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
NSThread with _NSAutoreleaseNoPool error
===
I have an method which save files to the internet, it works but just slow. Then I'd like to make the user interface more smooth, so I create an NSThread to handle the slow task.
I am seeing a list of errors like:
_NSAutoreleaseNoPool(): Object 0x18a140 of class NSCFString autoreleased with no pool in place - just leaking
Without NSThread, I call the method like:
[self save:self.savedImg];
And I used the following to use NSThread to call the method:
NSThread* thread1 = [[NSThread alloc] initWithTarget:self
selector:@selector(save:) object:self.savedImg];
[thread1 start];
Thanks.
| 0 | [
2,
13,
2172,
96,
10647,
29,
13,
1,
2172,
18042,
15202,
251,
13378,
7019,
800,
3726,
3726,
31,
57,
40,
2109,
56,
2079,
6488,
20,
14,
2620,
15,
32,
693,
47,
114,
2276,
9,
94,
31,
22,
43,
101,
20,
233,
14,
4155,
6573,
91,
3905,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Java IPC: GUI and Command Line
===
I would like to implement a command line interface for a Java application. This wouldn't be too difficult to do, except I would like the command line program to affect the state of another Java GUI program. So for example, I could type:
java CliMain arg1 arg2
And another running GUI instance would perform an appropriate action.
What is the easiest way of implementing something like this? | 0 | [
2,
8247,
31,
5779,
45,
9457,
17,
1202,
293,
800,
3726,
3726,
31,
83,
101,
20,
8713,
21,
1202,
293,
6573,
26,
21,
8247,
3010,
9,
48,
1265,
22,
38,
44,
266,
1956,
20,
107,
15,
1613,
31,
83,
101,
14,
1202,
293,
625,
20,
6245,
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... |
Best Non-Microsoft/.net Development Blogs
===
I really don't want to rile anyone feathers and I really enjoy blogs like Joel,Coding Horror, Scott Hanselman,etc.
However, what are some good blogs/podcasts that focus on other platforms besides Microsoft based ones or maybe even no particular platform at ? In particular I am interested in areas like python,ruby,java,c, but any area besides MS fits the bill.
There may be other similar questions to this but I think this one is unique since we might get some answers we wouldn't see otherwise, ei everyone knows Coding Horror is great.
Please try to refrain from religious debates; the content of the blog is more important than the platform they are talking about, I just want to get an idea of what is out there and worth the time. | 4 | [
2,
246,
538,
8,
22019,
12980,
118,
9,
2328,
522,
8146,
18,
800,
3726,
3726,
31,
510,
221,
22,
38,
259,
20,
761,
3599,
1276,
13666,
17,
31,
510,
4696,
8146,
18,
101,
8873,
15,
15458,
3930,
15,
1824,
4800,
19965,
15,
1198,
150,
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... |
SMTP and IMAP server library for .net
===
does anyone know good SMTP/IMAP server libraries for C#?
I only found some long abandoned projects.
Thanks,
Fionn | 0 | [
2,
7613,
13726,
17,
31,
15022,
8128,
1248,
26,
13,
9,
2328,
800,
3726,
3726,
630,
1276,
143,
254,
7613,
13726,
118,
49,
15022,
8128,
8649,
26,
272,
5910,
60,
31,
104,
216,
109,
175,
3092,
2314,
9,
3669,
15,
398,
872,
103,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
I need a really good reason to use Python - abstract question
===
I have been trying to make a case for using Python at my work. We use C# and ASP.NET for basically all of our development. 80% or more of our projects are web applications. It seems natural that we would look at some of the nice dynamic web languages (Ruby, Python, etc), and with things like <a href="http://en.wikipedia.org/wiki/Ironruby">IronRuby</a> and <a href="http://en.wikipedia.org/wiki/Ironpython">IronPython</a>, I started seriously investigating.
I love Python. It's a beautiful, expressive language. It's a joy to code in, for sure. The multitude of python modules and frameworks make it very appealing. Problem is, I cannot think of any specific problems, any specific hurdles that would <b>require</b> a language like Python. ASP.NET gives us RAD, it gives us a full-featured framework and all that good stuff. Also, we all already know C# and have lots of projects in C#, learning a new language just <i>because</i> doesn't quite work.
Can you guys help me think of something to finally convince my boss to really learn Python and start using it on projects? | 0 | [
2,
31,
376,
21,
510,
254,
1215,
20,
275,
20059,
13,
8,
8502,
1301,
800,
3726,
3726,
31,
57,
74,
749,
20,
233,
21,
610,
26,
568,
20059,
35,
51,
170,
9,
95,
275,
272,
5910,
17,
28,
306,
9,
2328,
26,
11374,
65,
16,
318,
522,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 clean user input using ASP.NET MVC
===
I just want to know how to validate (or clean) user input in ASP.NET MVC for not to raise HttpRequestValidationException with values submitted.
For example, having an input text, if the user inputs `<BR/>` it will cause an exception and the Yellow Screen of Death will be show. I don't want that.
I want to catch the exception and to make visible an user friendly error in the currently view, preferable with the controls loaded with the same values submitted.
I have found this <http://www.romsteady.net/blog/2007/06/how-to-catch-httprequestvalidationexcep.html>, but it is useless for my purpose. Also, I have found this <http://msdn.microsoft.com/en-us/library/aa973813.aspx#anticross_sitescripting_topic5> and tried to put inside a model binder but I couldn't make to work. | 0 | [
2,
184,
20,
2745,
4155,
6367,
568,
28,
306,
9,
2328,
307,
8990,
800,
3726,
3726,
31,
114,
259,
20,
143,
184,
20,
7394,
1373,
13,
5,
248,
2745,
6,
4155,
6367,
19,
28,
306,
9,
2328,
307,
8990,
26,
52,
20,
3972,
7775,
99,
10351,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 change onClick handler dynamically?
===
I'm sure there are a million posts about this out there, but surprisingly I'm having trouble finding something.
I have a simple script where I want to set the onClick handler for an `<A>` link on initialization of the page.
When I run this I **immediately** get a 'foo' alert box where I expected to only get an alert when I click on the link.
What stupid thing am I doing wrong? (I've tried click= and onClick=)...
<script language="javascript">
function init(){
document.getElementById("foo").click = new function() { alert('foo'); };
}
</script>
<body onload="init()">
<a id="foo" href=#>Click to run foo</a>
</body> | 0 | [
2,
184,
20,
753,
27,
150,
10129,
24641,
7782,
1326,
60,
800,
3726,
3726,
31,
22,
79,
562,
80,
50,
21,
507,
9868,
88,
48,
70,
80,
15,
47,
11701,
31,
22,
79,
452,
2572,
3007,
301,
9,
31,
57,
21,
1935,
3884,
113,
31,
259,
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... |
shared components throughout all projects, is there a better alternative than svn:externals?
===
My situation: I have several components, which sometimes have changes to them, and are shared across a lot of different projects. Each project puts these in a subfolder called /depends. The depends holds a bunch of svn externals for all of our common components.
svn:externals is causing me a lot of time and pain.
- Show log on the project root folder will not show changes for svn:external folders (yet funny enough commit and update will work with svn:externals)
- When you branch, the svn:externals are not branched.
- Because of no branching on svn:externals, any change usually breaks the trunk.
Is there a better alternative for my situation? | 0 | [
2,
2592,
5090,
892,
65,
2314,
15,
25,
80,
21,
574,
2676,
119,
13,
18,
16578,
45,
1706,
8766,
192,
18,
60,
800,
3726,
3726,
51,
1858,
45,
31,
57,
238,
5090,
15,
56,
1030,
57,
1693,
20,
105,
15,
17,
50,
2592,
464,
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... |
convert foreign characters in a string?
===
Im trying to convert some strings that are in french canadian and basically, i'd like to be able to take out the french accent marks in the letters while keeping the letter, (i.e. the tilde of an E, but keep the e)
what is the best method for achieving this? | 0 | [
2,
8406,
1228,
1766,
19,
21,
3724,
60,
800,
3726,
3726,
797,
749,
20,
8406,
109,
7887,
30,
50,
19,
484,
1155,
17,
11374,
15,
31,
22,
43,
101,
20,
44,
777,
20,
247,
70,
14,
484,
7980,
4872,
19,
14,
2516,
133,
2882,
14,
1748,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
IE7 and the CSS table-cell property
===
So I just love it when my application is working great in Firefox, but then I open it in IE and... Nope, please try again.
The issue I'm having is that I'm setting a CSS display property to either "none" or "table-cell" with JavaScript.
I was initially using "display: block;", but Firefox was rending it weird without the table-cell property.
I would love to do this without adding an hack in the JavaScript to test for IE. Any suggestions?
Thanks. | 0 | [
2,
13,
660,
465,
17,
14,
272,
18,
18,
859,
8,
9725,
1354,
800,
3726,
3726,
86,
31,
114,
339,
32,
76,
51,
3010,
25,
638,
374,
19,
535,
18219,
15,
47,
94,
31,
368,
32,
19,
13,
660,
17,
9,
9,
9,
13,
18179,
15,
2247,
1131,
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... |
Django: Arbitrary number of unnamed urls.py parameters
===
I have a Django model with a large number of fields and 20000+ table rows. To facilitate human readable URLs and the ability to break down the large list into arbitrary sublists, I would like to have a URL that looks like this:
/browse/<name1>/<value1>/<name2>/<value2>/ .... etc ....
where 'name' maps to a model attribute and 'value' is the search criteria for that attribute. Each "name" will be treated like a category to return subsets of the model instances where the categories match.
Now, this could be handled with GET parameters, but I prefer more readable URLs for both the user's sake and the search engines. These URLs subsets will be embedded on each page that displays this model, so it seems worth the effort to make pretty URLs.
Ideally each name/value pair will be passed to the view function as a parameter named 'name1', 'name2', etc. However, I don't believe it's possible to defined named patterns via a regex's matched text. Am I wrong there?
So, it seems I need to do something like this:
urlpatterns = patterns('',
url(r'^browse/(?:([\w]+)/([\w]+)/)+$', 'app.views.view', name="model_browse"),
)
It seems this should match any sets of two name/value pairs. While it matches it successfully, it only passes the last name/value pair as parameters to the view function. My guess is that each match is overwriting the previous match. Under the guess that the containing (?:...)+ is causing it, I tried a simple repeating pattern instead:
urlpatterns = patterns('',
url(r'^browse/([\w]+/)+$', 'app.views.view', name="model_browse"),
)
... and got the same problem, but this time `*args` only includes the last matched pattern.
Is this a limitation of Django's url dispatcher, and/or Python's regex support? It seems either of these methods should work. Is there a way to achieve this without hardcoding each possible model attribute in the URL as an optional (.*) pattern?
Thanks!
| 0 | [
2,
3857,
14541,
45,
17237,
234,
16,
14550,
13,
911,
7532,
9,
6448,
12905,
800,
3726,
3726,
31,
57,
21,
3857,
14541,
1061,
29,
21,
370,
234,
16,
2861,
17,
824,
387,
2430,
859,
11295,
9,
20,
9681,
585,
1302,
579,
13,
911,
7532,
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... |
Java memory consumption, "top" and HP-Ux
===
We ship Java applications that are run on Linux, AIX and HP-Ux (PA-RISC). We seem to struggle to get acceptable levels of performance on HP-Ux from applications that work just fine in the other two environments. This is true of both execution time and memory consumption.
Although I'm yet to find a definitive article on "why", I believe that measuring memory consumption using "top" is a crude approach due to things like the shared code giving misleading results. However, it's about all we have to go on with a customer site where memory consumption on HP-Ux has become an issue. It only became an issue this time when we moved from Java 1.4 to Java 1.5 (on HP-Ux 11.23 PA-RISC). By "an issue", I mean that the machine ceased to create new processes because we had exhausted all 16GB of physical memory.
By measuring "before" and "after" total "free memory" we are trying to gauge how much has been consumed by a Java application. I wrote a quick app that stores 10,000 random 64 bit strings in an ArrayList and tried this approach to measuring consumption on Linux and HP-Ux under Java 1.4 and Java 1.5.
The results:
HP Java 1.4 ~60MB
HP Java 1.5 ~150MB
Linux Java 1.4 ~24MB
Linux Java 1.5 ~16MB
Can anyone explain why these results might arise? Is this some idiosyncrasy of the way "top" measures free memory? Does Java 1.5 on HP really consume 2.5 times more memory than Java 1.4?
Thanks. | 0 | [
2,
8247,
1912,
8330,
15,
13,
7,
3880,
7,
17,
5301,
8,
7147,
800,
3726,
3726,
95,
995,
8247,
3767,
30,
50,
485,
27,
13024,
15,
21,
4028,
17,
5301,
8,
7147,
13,
5,
1060,
8,
2777,
150,
6,
9,
95,
2260,
20,
4697,
20,
164,
12513,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Security Error in ASP application
===
Trying to get an ASP application deployed; it worked for a while but then started coming up with errors whenever the page is accessed:
Server Error in '/AppNameHere' Application.
---
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
An IISreset didn't change anything, but rebooting teh entire system got it to work for a few hours before teh problem came back. The .config for the application is set to full trust.
What could be causing this, and how can it be fixed? (Or, if more information is needed, where do I go looking to find it)
| 0 | [
2,
1221,
7019,
19,
28,
306,
3010,
800,
3726,
3726,
749,
20,
164,
40,
28,
306,
3010,
6698,
73,
32,
577,
26,
21,
133,
47,
94,
373,
880,
71,
29,
11908,
6634,
14,
2478,
25,
12904,
45,
8128,
7019,
19,
13,
22,
118,
7753,
7259,
6836,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Guidelines for formatting XML Namespace
===
I have not developed web services applications that publicly faced the Internet. As I begin to consider the issues of exposing schema definitions to a wide audience, I believe a certain amount of consideration should be spent on properly formatting the schema namespaces.
Has anybody come across a guideline document that advises how to go about standardising the namespace format for an organisation's XML schemas?
things like using FQDNs vs paths http://schemas.organisation.com/ vs http://organisation.com/schemas
styles to include version paths http://organisation.com/schemas/submissions/2006 or http://organisation.com/schemas/submissions/v1
etcetera | 0 | [
2,
12629,
26,
2595,
1203,
23504,
204,
5582,
800,
3726,
3726,
31,
57,
52,
885,
2741,
687,
3767,
30,
6713,
3110,
14,
2620,
9,
28,
31,
2348,
20,
3563,
14,
1549,
16,
17302,
23874,
18544,
20,
21,
1051,
2663,
15,
31,
985,
21,
1200,
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... |
Do you break up addresses into street / city / state / zip?
===
My current app needs to store address information for a user. I'm currently debating whether to use the customary street address / city / state / zip textboxes and dropdowns or to go with Google's method of simply having everything on one line. Any thoughts on the pros/cons of storing address information in either of these manners? | 0 | [
2,
107,
42,
1442,
71,
12636,
77,
446,
13,
118,
136,
13,
118,
146,
13,
118,
12133,
60,
800,
3726,
3726,
51,
866,
4865,
2274,
20,
1718,
3218,
676,
26,
21,
4155,
9,
31,
22,
79,
871,
23086,
1472,
20,
275,
14,
19049,
446,
3218,
13,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I mirror an SVN repo dir structure in my working dir without a full root checkout?
===
First, a couple operating parameters:
- .NET development using Visual Studio 2005/2008
- TortoiseSVN client
I've only primarily worked with Visual Source Safe and SourceGear Vault source control systems. In each, I map the root of the repository to a local working directory. For example:
$/ --> C:\source
When I go into any child directory in the repository and "Get Latest" the client will automatically create the complete directory hierarchy for me, mirroring the structure on my local disk. Thus when I get latest of
$/foo/bar/project1
it is created on the drive at
C:\source\foo\bar\project1
In subversion, when I check out a directory, I must specify the working directory. If I want to properly mirror my working directory structure to match the repository I have to either manually construct every child directory path or do a checkout of the repository root to the working root, getting everything in the repository.
**Is there a way to get a repository directory down in the hierarchy such that it will be created in a matching local directory structure without all the manual intervention?**
This isn't a problem with a small repository, but in many cases, I don't need a large percentage of the source repository. It's imperative that the physical structure is maintained in order for file references to projects and resources not to break. Plus the disk cost of SVN is twice the actual source size given all the working base copies of the files.
I'm currently using Tortoise. Is it possible there are other SVN clients that will do what I'm looking for? | 0 | [
2,
184,
107,
31,
3402,
40,
13,
18,
16578,
302,
1638,
13,
9035,
1411,
19,
51,
638,
13,
9035,
366,
21,
503,
5900,
2631,
1320,
60,
800,
3726,
3726,
64,
15,
21,
1335,
2455,
12905,
45,
13,
8,
13,
9,
2328,
522,
568,
3458,
1120,
812,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Formatting Resharper backing fields for properties in C#
===
Is there a way to control where Resharper puts its backing fields? currently it tries to put them at the top of the class. Id like them to go right above the property. | 0 | [
2,
2595,
1203,
302,
23646,
106,
3931,
2861,
26,
3704,
19,
272,
5910,
800,
3726,
3726,
25,
80,
21,
161,
20,
569,
113,
302,
23646,
106,
11179,
82,
3931,
2861,
60,
871,
32,
3919,
20,
442,
105,
35,
14,
371,
16,
14,
718,
9,
4924,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
What is a good design pattern in C# for classes that need to reference other classes?
===
I am working on a business problem in C#.NET. I have two classes, named C and W that will be instantiated independently at different times.
An object of class C needs to contain references to 0 ... n objects of class W, i.e. a C object can contain up to n W objects.
Each W object needs to contain a reference to exactly 1 object of class C, i.e. a W object is contained in one C object.
An object of class C is usually instantiated first. At a later point, its W contents are discovered, and instantiated. At this later point, I need to cross reference the C and W objects to each other.
What is a good design pattern for this? I actually have cases where I have three or four classes involved but we can talk about two classes to keep it simple.
I was thinking of something simple like:
class C
{
public List<W> contentsW;
}
class W
{
public C containerC;
}
This will work for the moment but I can foresee having to write a fair amount of code to keep track of all the references and their validity. I'd like to implement code down the road to do shallow refreshes of just the container and deep refreshes of all referenced classes. Are there any other approaches and what are their advantages? | 0 | [
2,
98,
25,
21,
254,
704,
3732,
19,
272,
5910,
26,
2684,
30,
376,
20,
2801,
89,
2684,
60,
800,
3726,
3726,
31,
589,
638,
27,
21,
508,
1448,
19,
272,
5910,
9,
2328,
9,
31,
57,
81,
2684,
15,
377,
272,
17,
619,
30,
129,
44,
63... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 control which nodes are selectable in a WPF TreeView?
===
I have a two-level hierarchy displayed in a WPF TreeView, but I only want the child nodes to be selectable - basically the top level nodes are for categorisation but shouldn't be selectable by themselves.
Can I achieve this?
Thanks... | 0 | [
2,
92,
31,
569,
56,
16272,
50,
5407,
579,
19,
21,
619,
7721,
1541,
4725,
60,
800,
3726,
3726,
31,
57,
21,
81,
8,
3906,
14417,
6115,
19,
21,
619,
7721,
1541,
4725,
15,
47,
31,
104,
259,
14,
850,
16272,
20,
44,
5407,
579,
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... |
Implementing an editable DropDownList in ASP.NET
===
What's the most elegant way of implementing a DropDownList in ASP.NET that is editable without using 3rd party components.
As a last resort I will probably try using a TextBox with an AutoCompleteExtender with an image to 'drop down' the list; or a TextBox overlapping a HTML Select with some JavaScript to fill values from the Select to the TextBox. But I'm really hoping there is a more terse and maintainable solution.
Thanks in advance. | 0 | [
2,
17333,
40,
9392,
579,
2804,
2968,
5739,
19,
28,
306,
9,
2328,
800,
3726,
3726,
98,
22,
18,
14,
127,
11614,
161,
16,
17333,
21,
2804,
2968,
5739,
19,
28,
306,
9,
2328,
30,
25,
9392,
579,
366,
568,
203,
897,
346,
5090,
9,
28,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can you programmatically tell an HTML SELECT to drop down (for example, due to mouseenter)
===
Can you do it programmatically? | 0 | [
2,
184,
92,
42,
625,
6732,
1326,
494,
40,
13,
15895,
5407,
20,
2804,
125,
13,
5,
1106,
823,
15,
397,
20,
7567,
13679,
6,
800,
3726,
3726,
92,
42,
107,
32,
625,
6732,
1326,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Find all radio groups which haven't been selected
===
I have a basic quiz/survey type application I'm working on, and I'd like to give the user a prompt before they submit if they haven't answered all the questions. All the questions are multiple choice using radio buttons:
<div class="question">
Q1: What is the second letter of the alphabet?
<div class="choices">
<input type="radio" name="question_1" value="1" /> A
<input type="radio" name="question_1" value="2" /> B
<input type="radio" name="question_1" value="3" /> C
</div>
</div>
<div class="question">
Q2: Which out of these is a berry?
<div class="choices">
<input type="radio" name="question_2" value="1" /> Apples
<input type="radio" name="question_2" value="2" /> Bananas
<input type="radio" name="question_2" value="3" /> Carrots
</div>
</div>
<div class="question"> ...etc
How do you find which groups haven't got an option ticked? Or at least, if there are any which haven't been answered?
jQuery is ok, and even preferred. | 0 | [
2,
477,
65,
603,
1170,
56,
2933,
22,
38,
74,
1704,
800,
3726,
3726,
31,
57,
21,
2125,
17667,
118,
4082,
8704,
1001,
3010,
31,
22,
79,
638,
27,
15,
17,
31,
22,
43,
101,
20,
590,
14,
4155,
21,
11443,
4417,
115,
59,
12298,
100,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best .net Micro Framework dev board, for under $300?
===
I'm looking for a relativity cheap .net Micro Framework development board for use on a personal robotics project. I'd don't need much for I/O, but I want at least one serial port and one Ethernet port.
I would prefer not to have to spend more than $300 on the board, but if there is an obvious reason to get a better one I'm flexible.
Currently I'm looking at [this device from SJJ Embedded Micro Solutions][1]. Has anyone had experience with this device?
[1]: http://www.sjjmicro.com/EDK.html | 0 | [
2,
98,
25,
14,
246,
13,
9,
2328,
2899,
6596,
9664,
686,
15,
26,
131,
5341,
2032,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
23490,
9148,
13,
9,
2328,
2899,
6596,
522,
686,
26,
275,
27,
21,
1319,
15219,
18,
669,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.