unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
SQL Builder for PHP, with JOIN support?
===
Are any of you aware of a library that helps you build/manipulate SQL queries, that supports JOIN's?
It would give a lot of flexibility i'd think if you have something where you could return an object, that has some query set, and still be able to apply JOIN's to it, subqueries and such.
I've search around, and have only found SQL Builder, which seems very basic, and doesn't support joins. Which would be a major feature that would really make it useful. | 0 | [
2,
4444,
255,
14960,
26,
13,
26120,
15,
29,
1865,
555,
60,
800,
3726,
3726,
50,
186,
16,
42,
3854,
16,
21,
1248,
30,
7778,
42,
1895,
118,
177,
4307,
12383,
4444,
255,
9386,
2829,
15,
30,
6747,
1865,
22,
18,
60,
32,
83,
590,
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... |
Smart Sudoku Golf
===
The point of this question is to create the shortest <b>not abusively slow</b> Sudoku solver. This is defined as: <b>don't recurse when there are spots on the board which can only possibly be one digit</b>.
Here is the shortest I have so far in python:
r=range(81)
s=range(1,10)
def R(A):
bzt={}
for i in r:
if A[i]!=0: continue;
h={}
for j in r:
h[A[j]if(j/9==i/9 or j%9==i%9 or(j/27==i/27)and((j%9/3)==(i%9/3)))else 0]=1
bzt[9-len(h)]=h,i
for l,(h,i)in sorted(bzt.items(),key=lambda x:x[0]):
for j in s:
if j not in h:
A[i]=j
if R(A):return 1
A[i]=0;return 0
print A;return 1
R(map(int, "080007095010020000309581000500000300400000006006000007000762409000050020820400060"))
The last line I take to be part of the cmd line input, it can be changed to:
import sys; R(map(int, sys.argv[1]);
This is similar to other sudoku golf challenges, except that I want to eliminate unnecessary recursion. Any language is acceptable. The challenge is on! | 0 | [
2,
3978,
9680,
9266,
4034,
800,
3726,
3726,
14,
454,
16,
48,
1301,
25,
20,
1600,
14,
23576,
13,
1,
220,
1,
1270,
22785,
102,
2276,
1,
118,
220,
1,
9680,
9266,
8402,
139,
9,
48,
25,
2811,
28,
45,
13,
1,
220,
1,
804,
22,
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... |
OOP: Where to stop Abstracting
===
Where do you draw the line to stop making abstractions and to start writing sane code? There are tons of examples of 'enterprise code' such as the dozen-file "FizzBuzz" program... even something simple such as an RTS game can have something like:
class Player {} ;/// contains Weapons
class Weapons{} ;/// contains BulletTypes
class BulletType{} ;///contains descriptions of Bullets
class Bullet{} ;///extends PlaceableObject and RenderableObject which can be placed/drawn respectively
class PlaceableObject{} ;///has x,y,z, coords
class RenderableObject{} ;///an object with a draw() command
class MovingObject{}; ///an object with a move() function
etc... and it can turn into a nightmare. This can be drawn to its logical extreme, much like functional programming can be drawn to the extreme where you can create a language with only variables, function application, and anonymous function definitions (although I must admit that is slightly more elegant)...
Any sane advice on this topic? | 0 | [
2,
13,
21709,
45,
113,
20,
747,
8502,
68,
800,
3726,
3726,
113,
107,
42,
2003,
14,
293,
20,
747,
544,
23907,
18,
17,
20,
799,
1174,
523,
62,
1797,
60,
80,
50,
5278,
16,
3770,
16,
13,
22,
13679,
15839,
62,
1797,
22,
145,
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 to Safely Accept Pasted <embed> Code (PHP)
===
I want to allow users to paste <embed> and <object> HTML fragments (video players) via an HTML form. The server-side code is PHP. How can I protect against malicious pasted code, JavaScript, etc? I could parse the pasted code, but I'm not sure I could account for all variations. Is there a better way? | 0 | [
2,
184,
20,
9817,
3440,
640,
69,
13,
1,
1503,
4283,
1,
1797,
13,
5,
26120,
6,
800,
3726,
3726,
31,
259,
20,
1655,
3878,
20,
640,
62,
279,
255,
38,
73,
1503,
4283,
1,
17,
279,
255,
38,
73,
23793,
1,
13,
15895,
10837,
13,
5,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What are the best options for non-malicious cross site scripting?
===
I want to write a browser based app that retrieves data from multiple websites and posts it to my server app. What are the best options to do this?
The most straightforward approach would certainly be to have the server app retrieve the data, but that's not possible for copyright reasons. In my case individual users do have the right to access the data but my server app doesn't. So the request has to originate from the user's machine.
This is not a scheme to circumvent copyright law as the data is never published. It's made available to authorized users only. The problem is simply how to use a web app as an extension of the users's desktop.
It would be a trivial and legal thing to do with a desktop app, but I don't want to force users to download and install software. So my question is if anyone knows how this can be achieved with browser extensions, silverlight, flash, etc and what the limitations of each approach would be.
Thanks in advance for your help | 0 | [
2,
98,
50,
14,
246,
6368,
26,
538,
8,
19430,
9957,
919,
689,
3884,
68,
60,
800,
3726,
3726,
31,
259,
20,
2757,
21,
16495,
432,
4865,
30,
11917,
18,
1054,
37,
1886,
13931,
17,
9868,
32,
20,
51,
8128,
4865,
9,
98,
50,
14,
246,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Differentiating Between an AJAX Call / Browser Request
===
Is there anything in the header of an HTTP request that would allow me to differentiate between an AJAX call and a direct browser request from a given client? Are the user agent strings usually the same regardless? | 0 | [
2,
421,
49,
1880,
128,
40,
20624,
645,
13,
118,
16495,
3772,
800,
3726,
3726,
25,
80,
602,
19,
14,
157,
106,
16,
40,
7775,
3772,
30,
83,
1655,
55,
20,
22144,
128,
40,
20624,
645,
17,
21,
1744,
16495,
3772,
37,
21,
504,
6819,
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,
0,
0,
0,
0,
0,
0,
0... |
OOP: When to create derived classes, and when to implement features with conditionals?
===
When should I continue to make derived classes, and when should I just add conditionals to my code?
eg for a missile
class Object;
class Projectile : public Object;
class Missile : public Projectile;
class MissileGuided : public Missile;
Or should I implement that last one in the missiles code?
void Missile::Update()
{
if(homeing && ObjectExists(Target))
TurnTowards(Target.Pos)
Pos += Motion;
}
I'm thinking that for all the finer details the second one is better, because you start getting combinations of things (eg some missiles may not show on the radar, some may be destroyable, some may aquire new targets if the origenal is destroyed or out of range, etc)
However then the same could be said for requrlar projectiles sharing properties of missiles in some cases (eg may be destroyable, large projectiles may show on radar, etc)
And then further I could say that projectiles share properties with ships (both move, on collision they do damage, may show on radar, may be destroyable...)
And then everything ends up back as like 3 classes:
class Entity;
class Object : public Entity;
class Effect : public Entity;
Where is a good point to draw the line between creating derived classes, and implementing the features in the method with flags or something? | 0 | [
2,
13,
21709,
45,
76,
20,
1600,
3981,
2684,
15,
17,
76,
20,
8713,
967,
29,
21206,
18,
60,
800,
3726,
3726,
76,
378,
31,
1816,
20,
233,
3981,
2684,
15,
17,
76,
378,
31,
114,
3547,
21206,
18,
20,
51,
1797,
60,
12369,
26,
21,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to change the style of an element/container when the focus is "inside" it?
===
Suppose to have a code like this:
<div class="notSelected">
<label>Name
<input type="text" name="name" id="name" />
</label>
<div class="description">
Tell us what's your name to make us able to fake to be your friend
when sending you an email.
</div>
</div>
Now suppose I've something like this (it's just an example) for each element of a form.
I'd like to change the style from notSelected to Selected when:
- User focus on the input element
- User move the mouse over a notSelected div
When he change focus the Selected div should became notSelected again.
I'd like to do something like this to increment the size of the text of the selected div. Anyway it could be cool make other changes too so I'd prefer to change the class attribute.
What is the best way to do something like this in JavaScript? Is there any JavaScaript framework that can boost me doing this thing? So it will be easy to add effects like fading ect...
I downloaded MooTools but with a fast read of the docs I did not see how to do this without having a specific ID for any of the forms div, but is the first time I use it. I've no problem using any other framework, but if you suggest one, please write also what should I look for specifically, thank you. | 0 | [
2,
184,
20,
753,
14,
1034,
16,
40,
4520,
118,
1126,
5851,
106,
76,
14,
1776,
25,
13,
7,
108,
1416,
7,
32,
60,
800,
3726,
3726,
5787,
20,
57,
21,
1797,
101,
48,
45,
13,
1,
12916,
718,
3726,
7,
1270,
18,
7138,
7,
1,
13,
1,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MySQL++ library doesn't work after upgrading GCC
===
I was using mysql++ library and compiling with GCC 3.3.4.
That GCC version had some bugs so I upgraded to GCC 3.4.6.
After upgrading GCC I rebuilt mysql++ and recompiled my program. But now I get a segmentation fault error.
I get the following message:
> ./mysqlTest: Symbol `_ZTVSt15basic_stringbufIcSt11char_traitsIcESaIcEE'
> has different size in shared object, consider re-linking.
> Segmentation fault
Is there anything I have to rebuild, relink or whatever so my apps work again ??
What about the mysql C API ?? mysql++ is a wrapper around it.
Should the mysql C API be rebuilt or something??
please help, I dont know what to do. I need to make this work. | 0 | [
2,
51,
18,
22402,
20512,
1248,
1437,
22,
38,
170,
75,
26939,
489,
3384,
800,
3726,
3726,
31,
23,
568,
51,
18,
22402,
20512,
1248,
17,
24378,
29,
489,
3384,
203,
9,
240,
9,
300,
9,
30,
489,
3384,
615,
41,
109,
13925,
86,
31,
99... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why does an SSH remote commands get less environment variables then when run manually
===
I have a command that runs fine if I ssh to a machine and run it, but failes when I try to run it using a remote ssh command like :
ssh user@IP <command>
Comparing the output of "env" using both methods resutls in different environment variables. When I manually login to the machine and run env, I get much more environment variables then when I run :
ssh user@IP "env"
Any idea why ? | 0 | [
2,
483,
630,
40,
13,
18,
1635,
5388,
14294,
164,
787,
2307,
12157,
94,
76,
485,
23671,
800,
3726,
3726,
31,
57,
21,
1202,
30,
1461,
1123,
100,
31,
13,
18,
1635,
20,
21,
1940,
17,
485,
32,
15,
47,
7476,
160,
76,
31,
1131,
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... |
Garbage collection in Flex when removeChild() is called - managing race conditions
===
I have a 'framework' in Flex which loads and destroys child 'sections', which are instances of module classes. These have a lot of webservice and animation in them and are part of a public facing site.
Before I remove a section from the screen I call a 'hideSection()' interface method on the instance. In this method I fade out any controls, or return false if the section wants to prevent itself from being closed. Currently it also stops any Timer instances running.
The problem is that even with the section object removed from the stage there may be outstanding things left to happen. For instance I may have an effect running where effectEnded triggers something, or perhaps a slow webservice request might timeout and cause a error to popup.
Because of the way the garbage collector works - sometimes that object object gets killed off sooner, and other times later. I'm trying to minimize bad things happening once a section has been closed.
I've come up with the following possible solution. Wondered if there was a better one.
* Have a _disposed property which is set to true. Inside any event handler that could possibly have undesired behavior (after the section is closed) I would just say `if (_disposed) { return; }`.
* May also be necessary to implement an 'IDisposable' interface, like in .NET.
Is this really my only option - or can i somehow expedite the garbage collection. Could garbage collection even happen if there were effects still running?
I'm also curious as to whether I should set things to _null, especially timers. Or is it sufficient to just stop() a timer to get it to be garbage collected if there are no references left to it. | 0 | [
2,
15024,
1206,
19,
14409,
76,
4681,
11287,
5,
6,
25,
227,
13,
8,
5616,
764,
2039,
800,
3726,
3726,
31,
57,
21,
13,
22,
8361,
3783,
22,
19,
14409,
56,
19069,
17,
4407,
18,
850,
13,
22,
10579,
18,
22,
15,
56,
50,
13946,
16,
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... |
User interface for text mode LCD display
===
Does anybody know any resources on this subject?
I'm developing an embedded application for 2x16 LCD display. Ideally I would like to have a general (display independent) framework, that could be used virtually on any display - one or more segment(s) LED, 1x16, 2x16 LCD, etc.
Also would like to learn about general guidelines for such small user interfaces. | 0 | [
2,
4155,
6573,
26,
1854,
3740,
26827,
3042,
800,
3726,
3726,
630,
11181,
143,
186,
2566,
27,
48,
1550,
60,
31,
22,
79,
3561,
40,
12138,
3010,
26,
172,
396,
1091,
26827,
3042,
9,
5628,
102,
31,
83,
101,
20,
57,
21,
297,
13,
5,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best way to tell if Event.COMPLETE has already fired for an <Image> in Flex
===
I'm looking for the best way to tell if an `<mx:Image>` has already fired the 'Event.COMPLETE' event. I want to do something if it has shown, or attach an event handler if it hasnt yet.
something like :
if (newBackground.percentLoaded < 100)
or
if (newBackground.content != null)
i was originally doing `newBackground.content != null`, but that had some cross domain issues because the sandbox wont let me access content apparently!
i'm even a little weary of using `percentLoaded < 100` in case of possible race conditions.
yes i am familiar with `showEffect`, but that not what I want for this.
| 0 | [
2,
246,
161,
20,
494,
100,
807,
9,
15990,
63,
614,
3899,
26,
40,
13,
1,
22039,
1,
19,
14409,
800,
3726,
3726,
31,
22,
79,
699,
26,
14,
246,
161,
20,
494,
100,
40,
13,
1,
79,
396,
45,
22039,
1,
63,
614,
3899,
14,
13,
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... |
Running multiple applications in STM32 flash
===
I would like to have two applications in my STM32 flash, one is basically a boot and the other the 'main' application. I have figured out how to load each of them into different areas of flash, and after taking a memory dump everything looks like it is in the right place.
So when I do a reset it loads the boot, all the boot does at the moment is jump to the application. Debugging the boot, this all appears to work correctly. However the problems arrives after i've made the jump to the application, it just executes one instruction (assembly) and then jumps back to the boot. It should stay in the application indefinitely.
My question is then, where should I 'jump' to in the app?
It seems that there are a few potential spots, such as the interrupt vectors, the reset handler, the main function of the app. Actually I've tried all of those with no success.
Hopefully that makes sense, i'll update the question if not.
thanks for your help!
Richard | 0 | [
2,
946,
1886,
3767,
19,
354,
79,
3125,
4433,
800,
3726,
3726,
31,
83,
101,
20,
57,
81,
3767,
19,
51,
354,
79,
3125,
4433,
15,
53,
25,
11374,
21,
6801,
17,
14,
89,
14,
13,
22,
6232,
22,
3010,
9,
31,
57,
5700,
70,
184,
20,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you maintain development code and production code?
===
What are the best practices and rules-of-thumb to follow while maintaining code? Is it good practice to have only the production ready code in development branch, or untested latest code should be available in development branch?
How do you guys maintain your development code and production code? | 0 | [
2,
184,
107,
42,
4027,
522,
1797,
17,
637,
1797,
60,
800,
3726,
3726,
98,
50,
14,
246,
5242,
17,
1761,
8,
1041,
8,
96,
723,
220,
20,
1740,
133,
8215,
1797,
60,
25,
32,
254,
1345,
20,
57,
104,
14,
637,
1451,
1797,
19,
522,
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... |
can't insert a record into table
===
I wrote a program which includes writing and reading from database. When I run the app and try to perform writing I call the following method:
public static void AddMessage(string callID, string content)
{
string select =
"INSERT INTO Sporocilo (oznaka_klica, smer, vsebina, prebrano, cas_zapisa) VALUES (@callId, 0, @content, 0, @insertTime)";
SqlCommand cmd = new SqlCommand(select, conn);
cmd.Parameters.AddWithValue("callId", callID.ToString());
cmd.Parameters.AddWithValue("content", content);
cmd.Parameters.AddWithValue("insertTime", "10.10.2008");
try
{
conn.Open();
cmd.ExecuteScalar();
}
catch(Exception ex)
{
string sDummy = ex.ToString();
}
finally
{
conn.Close();
}
}
After the method call I read all the records from the table and display them in the form. The record inserted before refresh could be seen but then when I exit the app and look at the table I don't see the record.
Does anyone know what could cause such behavior? | 0 | [
2,
92,
22,
38,
14692,
21,
571,
77,
859,
800,
3726,
3726,
31,
738,
21,
625,
56,
1103,
1174,
17,
1876,
37,
6018,
9,
76,
31,
485,
14,
4865,
17,
1131,
20,
2985,
1174,
31,
645,
14,
249,
2109,
45,
317,
12038,
11364,
3547,
3845,
18,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
LINQ, Polymorphism, MetaDataMapping, Inheritance Mapper
===
I am writing a small program. The interface I am writing to control each repository that is made defines a method of Save(IPublicObject). I am using LINQ for the SQL Version of the repository CRUD. My question is this. I would like to have only the one method which accepts the interface type. I want to think how I can best locate the Save action for the inherited type I then pass in.
In the book I am reading Patterns of Enterprise Application Architecture. I am leaning on the Inheritance Maping. So I create a derived object of
print("
pubic class ConcretePublicObjectOne : IPublicObject{}
");
I want to then pass this into the Save Function of the respository and it is at this point I am trying to think how best to say, ok we need to use "WHAT?" Save Method etc...
Should I use a registry, configuration setting mapping the types?
Cheers for the help in advance
Andrew | 0 | [
2,
6294,
1251,
15,
3446,
13348,
15,
28057,
540,
5574,
15,
13852,
2942,
1432,
800,
3726,
3726,
31,
589,
1174,
21,
284,
625,
9,
14,
6573,
31,
589,
1174,
20,
569,
206,
24869,
30,
25,
117,
13110,
21,
2109,
16,
2079,
5,
49,
12259,
23... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 max array length limit in c++?
===
Is there a max length for an array in c++?
Is it a c++ limit or does it depends on my machine? Is it tweakable? Does it depends on the type the array is made of?
Can i break that limit somehow or do I have to search for a better way of storing information? And what should be the simplest way?
Thank you.
-luiss- | 0 | [
2,
25,
80,
21,
2049,
7718,
1476,
4496,
19,
272,
20512,
60,
800,
3726,
3726,
25,
80,
21,
2049,
1476,
26,
40,
7718,
19,
272,
20512,
60,
25,
32,
21,
272,
20512,
4496,
54,
630,
32,
9597,
27,
51,
1940,
60,
25,
32,
28769,
579,
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... |
Please share your experiences of DWR 3.0 M1 RC2 ?
===
I am planning to use DWR 3.0 M1 RC2 release candidate for my application. The primary reason of using this version is that it nicely integrates with Spring 2.5 framework and requires least possible level of configuration !
If you have using particularly this version of DWR, I would appreciate if you can share your experiences (benefits and problems).
Thanks in advance.
Jatan | 4 | [
2,
2247,
1891,
154,
5513,
16,
13,
43,
7127,
203,
9,
387,
307,
165,
16462,
135,
13,
60,
800,
3726,
3726,
31,
589,
2334,
20,
275,
13,
43,
7127,
203,
9,
387,
307,
165,
16462,
135,
830,
2316,
26,
51,
3010,
9,
14,
1256,
1215,
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... |
Rotation matrix for direction vector
===
I've been playing with some algorithms on the internet for a while and I can't seem to get them to work, so I'm tossing the question out here;
I am attempting to render a velocity vector line from a point. Drawing the line isn't difficult: just insert a line with length `velocity.length` into the graph. This puts the line centered at the point in the y-axis direction. We need to get this now in the proper rotation and translation.
The translational vector is not difficult to calculate: it is half the velocity vector. The rotational matrix, however, is being exceedingly elusive to me. Given a directional vector `<x, y, z>`, what's the matrix I need? | 0 | [
2,
9431,
8187,
26,
1400,
7497,
800,
3726,
3726,
31,
22,
195,
74,
791,
29,
109,
15935,
27,
14,
2620,
26,
21,
133,
17,
31,
92,
22,
38,
2260,
20,
164,
105,
20,
170,
15,
86,
31,
22,
79,
17238,
14,
1301,
70,
235,
73,
31,
589,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to compress files in .NET 1.1
===
I need to compress files in [*.zip] format in .NET 1.1. I don't want to use SharpZip for compression as I got random errors when running it in .NET 1.1. Check this:
http://forums.asp.net/p/1139901/1839049.aspx#1839049
| 0 | [
2,
184,
20,
26060,
6488,
19,
13,
9,
2328,
137,
9,
165,
800,
3726,
3726,
31,
376,
20,
26060,
6488,
19,
636,
2483,
9,
2553,
306,
500,
2595,
19,
13,
9,
2328,
137,
9,
165,
9,
31,
221,
22,
38,
259,
20,
275,
2641,
2553,
306,
26,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best way to detect whether an application is launched by Webstart
===
As it was made clear in my [recent question][1], Swing applications need to explicitly call System.exit() when they are ran using the Sun Webstart launcher (at least as of Java SE 6).
I want to restrict this hack as much as possible and I am looking for a reliable way to detect whether the application is running under Webstart. Right now I am checking that the value of the system property "webstart.version" is not null, but I couldn't find any guarantees in the documentation that this property should be set by future versions/alternative implementations.
Are there any better ways (preferably ones that do not ceate a dependency on the the webstart API?)
[1]: http://stackoverflow.com/questions/212009/do-i-have-to-explicitly-call-systemexit-in-a-webstart-application | 0 | [
2,
98,
25,
14,
246,
161,
20,
9092,
1472,
40,
3010,
25,
1601,
34,
2741,
13680,
800,
3726,
3726,
28,
32,
23,
117,
1207,
19,
51,
636,
99,
5089,
1301,
500,
2558,
165,
500,
15,
5587,
3767,
376,
20,
13108,
645,
329,
9,
1706,
242,
5,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Avoiding SQL injection in a user-generated SQL-regex
===
I'm creating a site where the user unfortunately has to provide a regex to be used in a MySQL WHERE clause. And of course I have to validate the user input to prevent SQL injection. The site is made in PHP, and I use the following regex to check my regex:
<pre>/^([^\\\\\']|\\\.)*$/</pre>
This is double-escaped because of PHP's way of handling regexes.
The way it's supposed to work is to only match safe regexps, without unescaped single quotes. But being mostly self-taught, i'd like to know if this is a safe way of doing it.
| 0 | [
2,
10298,
4444,
255,
13646,
19,
21,
4155,
8,
25314,
4444,
255,
8,
12463,
1706,
800,
3726,
3726,
31,
22,
79,
2936,
21,
689,
113,
14,
4155,
6200,
63,
20,
1181,
21,
7953,
1706,
20,
44,
147,
19,
21,
51,
18,
22402,
113,
9040,
9,
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... |
Database Abstraction - supporting multiple syntaxes
===
In a PHP project I'm working on we need to create some DAL extensions to support multiple database platforms. The main pitfall we have with this is that different platforms have different syntaxes - notable MySQL and MSSQL are quite different.
## What would be the best solution to this?
Here are a couple we've discussed:
**Class-based SQL building**
This would involve creating a class that allows you to build SQL querys bit-by-bit. For example:
$stmt = new SQL_Stmt('mysql');
$stmt->set_type('select');
$stmt->set_columns('*');
$stmt->set_where(array('id' => 4));
$stmt->set_order('id', 'desc');
$stmt->set_limit(0, 30);
$stmt->exec();
It does involve quite a lot of lines for a single query though.
**SQL syntax reformatting**
This option is much cleaner - it would read SQL code and reformat it based on the input and output languages. I can see this being a much slower solution as far as parsing goes however. | 0 | [
2,
6018,
23907,
13,
8,
3134,
1886,
22649,
160,
800,
3726,
3726,
19,
21,
13,
26120,
669,
31,
22,
79,
638,
27,
95,
376,
20,
1600,
109,
6868,
17529,
20,
555,
1886,
6018,
6843,
9,
14,
407,
4175,
5660,
95,
57,
29,
48,
25,
30,
421,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Html.ActionLink<> intellisense issues
===
When i use any of the other strongly typed HTML helpers after typing for example
Html.Actionlink<HomeController>(x=>x.
This pops up intellisense on the methods that the HomeController class has. However for the example above, this does not happen. Only after inserting the link text (second parameter) and going back to the lambda expression does the intellisense work.
Are other people experiencing these issues? | 0 | [
2,
13,
15895,
9,
8645,
6258,
1,
14635,
3159,
6498,
1549,
800,
3726,
3726,
76,
31,
275,
186,
16,
14,
89,
5020,
1001,
43,
13,
15895,
448,
445,
75,
25266,
26,
823,
13,
15895,
9,
8645,
6258,
1,
8167,
12898,
1252,
1,
5,
396,
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... |
What's the best way to iterate through elements of a matrix in Matlab?
===
I want to apply a function to all columns in a matrix with Matlab. I'm sure there must be an idiomatic way to do this, but I can't find it. Here's the method I am using:
function result= map_column(m, func)
result= m;
for col= 1:size(m,2)
result(:,col)= func(m(:,col));
end
end
which I can call with
smoothed= map_column(input, @(c) (smooth(c, 9)));
Is there anything wrong with this code? How could I improve it? | 0 | [
2,
98,
22,
18,
14,
246,
161,
20,
32,
106,
1373,
120,
2065,
16,
21,
8187,
19,
4277,
9086,
60,
800,
3726,
3726,
31,
259,
20,
5645,
21,
1990,
20,
65,
7498,
19,
21,
8187,
29,
4277,
9086,
9,
31,
22,
79,
562,
80,
491,
44,
40,
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 to install and run Ramazes Rapaste easiest?
===
I'm pretty familiar with Ruby and Ramaze, but I wanted to provide my Admins with an install howto, since they're more familiar with Tomcat and standard Apache installations.
I tried it locally first and it got pretty long:
sudo aptitude install ruby1.8 ruby1.8-dev rubygems1.8 sqlite3
wget http://www.geocities.jp/kosako3/oniguruma/archive/onig-5.8.0.tar.gz
tar zxvf onig-5.8.0.tar.gz
cd onig-5.8.0/
./configure
make
sudo make install
sudo gem install -r --include-dependencies --no-rdoc --no-ri ramaze mongrel sequel sqlite3-ruby ultraviolet
(mongrel 1.1.5 ruby)
(sqlite3-ruby 1.2.4 ruby)
(onigurama 1.1.0 ruby)
cp -r /usr/lib/ruby/gems/1.8/gems/ramaze-2008.06/examples/app/rapaste .
cd rapaste/
vi start.rb
Change the following line (add "java" at position 0)
UV_PRIORITY_NAMES = %w[ java ruby plain_text html css javascript yaml diff ]
ruby start.rb --adapter mongrel --port 7000
Is there a shorter way? Where could I optimize?
| 0 | [
2,
184,
20,
16146,
17,
485,
7388,
1734,
18,
4888,
472,
591,
27237,
60,
800,
3726,
3726,
31,
22,
79,
1772,
3694,
29,
10811,
17,
7388,
1734,
15,
47,
31,
417,
20,
1181,
51,
21,
43,
2160,
18,
29,
40,
16146,
184,
262,
15,
179,
59,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
online private source control system
===
I am looking for a *private* online source control system. Basically what I want is a private version of [Google Code][1] or [SourceForge][2]. Private in the sense that only me and the person I invite can view the source code. The source code in the source control should not be exposed to search engines or other people without the proper viewing rights.
I prefer to hold the source code on other servers, not on my machine. I don't want to handle all the database maintenance and backup and things like that. In exchange for this I don't mind to pay monthly access fee for this.
Any ideas?
[1]: http://code.google.com/hosting/
[2]: http://sourceforge.net/ | 0 | [
2,
2087,
932,
1267,
569,
329,
800,
3726,
3726,
31,
589,
699,
26,
21,
1637,
20181,
2483,
2087,
1267,
569,
329,
9,
11374,
98,
31,
259,
25,
21,
932,
615,
16,
636,
16111,
4875,
1797,
500,
2558,
165,
500,
54,
636,
12097,
1106,
834,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
In editor XML formatting.
===
Hi Anyone know of a simple system of getting xml formatted inside an editor. I mainly use textpad so that would be my main interest. What I'm really asking is that when I paste an xml string from a logfile or something into textpad that I can use a plugin or a third party tool to format the xml in textpad so it is readable.
Any suggestions? | 0 | [
2,
19,
1835,
23504,
2595,
1203,
9,
800,
3726,
3726,
4148,
1276,
143,
16,
21,
1935,
329,
16,
1017,
23504,
13,
29850,
572,
40,
1835,
9,
31,
2011,
275,
1854,
8240,
86,
30,
83,
44,
51,
407,
1163,
9,
98,
31,
22,
79,
510,
3379,
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... |
Break Statements In the real world
===
Been having a discussion on whirlpool about using break statements in for loops. I have been tought and also read else where that break statements should only be used with switch statements and with while loops on rare occasions.
My understanding is that you should only use for loops when you know the number of times that you want to loop, for example do work on x elements in an array, and while loops should be used every other time. Thus a for loop with a break can be easily refactored into a while loop with a condition.
At my uni, you will instantly fail an assignment if you use break any ware but a switch statement as it breaks the coding guild line of the uni. As im still completing my software engineering degree i would like to know from people in the real world. | 4 | [
2,
1442,
9015,
19,
14,
683,
126,
800,
3726,
3726,
74,
452,
21,
5460,
27,
13,
9373,
6362,
13378,
88,
568,
1442,
9015,
19,
26,
19661,
9,
31,
57,
74,
6161,
38,
17,
67,
1302,
962,
113,
30,
1442,
9015,
378,
104,
44,
147,
29,
5521,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Charts in webpages
===
Charts in webpages
------------------
What I"d like to accomplish is to present charts on webpages. For example aspx pages gridviews that present a two column table are able to be copied & placed into Excel then a chart created. The pages I currently use most are ASP.NET 3.0 or SharePoint team sites with stored procedures. People are very interested in how people perform chats in webpages.
Thanks in advance,
Catto
| 0 | [
2,
5158,
19,
2741,
6486,
18,
800,
3726,
3726,
5158,
19,
2741,
6486,
18,
13,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
98,
31,
7,
43,
101,
20,
14570,
25,
20,
734,
5158,
27,
2741,
6486,
18,
9,
26,
823,
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... |
Moving complex conditional statements to code behind
===
I was just wondering, if by moving complex if else statements and the resulting html markup to the code behind violates some 'MVC' law?
It seems like a great option when faced with inline if else statements that can become extremely unreadable. | 0 | [
2,
1219,
1502,
21206,
9015,
20,
1797,
439,
800,
3726,
3726,
31,
23,
114,
5712,
15,
100,
34,
1219,
1502,
100,
962,
9015,
17,
14,
2927,
13,
15895,
943,
576,
20,
14,
1797,
439,
21957,
18,
109,
13,
22,
79,
8990,
22,
451,
60,
32,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C to C translator / C-code cleanup tool
===
I wonder if there exist some free software that let me pass a C file and it outputs a more structured C-file.
I'm dealing with a short piece of C-Code that has been written long ago. I'd like to extract a clever algorithm from it, but working with the code itself is hard because it lacks everything that makes C-code readable.
Just a short example:
node *first(node *p)
{
node *aux=p;
if (aux)
do aux=aux->next;
while(aux!=p && (!aux->intersect || aux->intersect && aux->visited));
return aux;
}
What I'd like to get as an output would be something like this:
node *first(node *p)
{
node *aux=p;
if (aux)
{
do
{
aux=aux->next;
}
while( (aux!=p) && (!aux->intersect || (aux->intersect && aux->visited)));
}
return aux;
}
Does such an automatic code cleanup tool exist?
| 0 | [
2,
272,
20,
272,
10889,
13,
118,
272,
8,
9375,
26862,
5607,
800,
3726,
3726,
31,
2666,
100,
80,
3182,
109,
551,
2306,
30,
408,
55,
1477,
21,
272,
3893,
17,
32,
5196,
18,
21,
91,
17784,
272,
8,
16877,
9,
31,
22,
79,
5746,
29,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
windows service startup timeout
===
Is there a way to set a different value for service startup timeout per service?
I can change it using the ServicesPipeTimeout registry key, but it's per machine (http://support.microsoft.com/kb/824344).
At the moment the only thing I thought about was to do all the time-consuming startup actions in a different thread.
Thanks. | 0 | [
2,
1936,
365,
20205,
85,
1320,
800,
3726,
3726,
25,
80,
21,
161,
20,
309,
21,
421,
1923,
26,
365,
20205,
85,
1320,
416,
365,
60,
31,
92,
753,
32,
568,
14,
687,
15185,
891,
1320,
18269,
1246,
15,
47,
32,
22,
18,
416,
1940,
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... |
Determining realloc() behaviour before calling it
===
As I understand it, when asked to reserve a larger block of memory, the realloc() function will do one of three different things:
<code><pre>
if free contiguous block exists
grow current block
else if sufficient memory
allocate new memory
copy old memory to new
free old memory
else
return pointer to existing memory
</pre></code>
Growing the current block is a very cheap operation, so this is behaviour I'd like to take advantage of. However, if I'm reallocating memory because I want to (for example) insert a char at the start of an existing string, I don't want realloc() to copy the memory. I'll end up copying the entire string with realloc(), then copying it again manually to free up the first array element.
Is it possible to determine what realloc() will do? If so, is it possible to achieve in a cross-platform way? | 0 | [
2,
13521,
683,
10799,
5,
6,
7727,
115,
2555,
32,
800,
3726,
3726,
28,
31,
1369,
32,
15,
76,
411,
20,
2126,
21,
1662,
1921,
16,
1912,
15,
14,
683,
10799,
5,
6,
1990,
129,
107,
53,
16,
132,
421,
564,
45,
13,
1,
9375,
1,
3515,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you organize code in embedded projects?
===
Highly embedded (limited code and ram size) projects pose unique challenges for code organization.
I have seen quite a few projects with no organization at all. (Mostly by hardware engineers who are not typically concerned with non-functional aspects of code.)
However, I have been trying to organize my code accordingly:
1. hardware specific (drivers, initialization)
2. application specific (not likely to be reused)
3. reusable, hardware independent
For each module I try to keep the purpose to one of these three types.
Due to limited size of embedded projects and the emphasis on performance, it is often keep this organization.
| 0 | [
2,
184,
107,
42,
9213,
1797,
19,
12138,
2314,
60,
800,
3726,
3726,
2157,
12138,
13,
5,
23012,
1797,
17,
2843,
1072,
6,
2314,
10810,
2619,
7595,
26,
1797,
1165,
9,
31,
57,
541,
1450,
21,
310,
2314,
29,
90,
1165,
35,
65,
9,
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... |
Cross Domain User Tracking
===
We have several websites on different domains and I'd like to be able to track users' movements on these sites.
* Obviously cookies are not feasable, because they don't cross domain borders.
* I could look at a combination of IP address and User Agent, but there are some cases where that does not work.
* I don't want to use flash or other plugins.
Any ideas? Or am I doomed to rely on the IP/User_Agent combination? | 0 | [
2,
919,
4603,
4155,
10353,
800,
3726,
3726,
95,
57,
238,
13931,
27,
421,
15544,
17,
31,
22,
43,
101,
20,
44,
777,
20,
792,
3878,
22,
4889,
27,
158,
3259,
9,
1637,
4409,
19396,
50,
52,
3686,
472,
579,
15,
185,
59,
221,
22,
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... |
SharePoint and Firefox 3
===
I think most of the SharePoint developers and administrators know that with the change form Firefox 2 to Firefox 3 some functionality of SharePoint have became unavailable.
Especially adding Webparts to a site and using the PeoplePicker don't work anymore with Firefox 3. So I want to know how you deal with this problem when some of your users are complaining about having to use the IE to get the same functionality as with Firefox 2.
It's quite plain to me that it is not possible to get the full functionality with Firefox but it would be great to get at least the same with Firefox 3 as you got before with Firefox 2.
Or are there any workarounds to get Firefox 3 working with SharePoint properly? | 0 | [
2,
1891,
3132,
17,
535,
18219,
203,
800,
3726,
3726,
31,
277,
127,
16,
14,
1891,
3132,
10168,
17,
18618,
143,
30,
29,
14,
753,
505,
535,
18219,
172,
20,
535,
18219,
203,
109,
18548,
16,
1891,
3132,
57,
178,
22563,
9,
1118,
4721,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
GCC and ld can't find exported symbols...but they're there!
===
I have a C++ library and a C++ application trying to use functions and classes exported from the library. The library builds fine and the application compiles but fails to link. The errors I get follow this form:
> app-source-file.cpp:(.text+0x2fdb): undefined reference to `lib-namespace::GetStatusStr(int)'
Classes in the library seem to be resolved just fine by the linker, but free functions and exported data (like a cosine lookup table) invariably result in the above error.
I am using Ubuntu 8.04 (Hardy), and it is up to date with the latest Unbuntu packages.
The command to link the library is (with other libraries removed):
g++ -fPIC -Wall -O3 -shared -Wl,-soname,lib-in-question.so -o ~/project/lib/release/lib-in-question.so
The command to link the application is (with other libraries removed):
g++ -fPIC -Wall -O3 -L~/project/lib/release -llib-in-question -o ~/project/release/app-in-question
Finally, it appears (as best as I can tell) that the symbols in question are being exported properly:
nm -D ~/project/lib/release/lib-in-question.so | grep GetStatusStr --> U _ZN3lib-namespace12GetStatusStrEi
| 0 | [
2,
489,
3384,
17,
13,
6252,
92,
22,
38,
477,
18011,
9794,
9,
9,
9,
811,
59,
22,
99,
80,
187,
800,
3726,
3726,
31,
57,
21,
272,
20512,
1248,
17,
21,
272,
20512,
3010,
749,
20,
275,
3719,
17,
2684,
18011,
37,
14,
1248,
9,
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... |
Help with using TypeConverters for enums in an Excel PIA assembly
===
I would like to use a TypeCoverter to regionalise output for enums in an assembly that is a PIA loaded into Excel.
I can run this and it works on an assembly in a test project I created with an explicitly referenceed assembly, however when running a project that has been built as an Excel PIA. If I try:
<System.ComponentModel.TypeConverter(GetType(ResourceEnumConverter))> _
public enum MyEnum
ItemA
ItemB
end enum
and in code
myE = MyEnum.ItemA
Dim converter As System.ComponentModel.TypeConverter = TypeDescriptor.GetConverter(myE)
In the immediate window
? converter.ToString() goves
"System.ComponentModel.EnumConverter"
whereas in my other project (also a strongly signed assembly, but referenced directly from a newly created stub windows form project), I get
? converter.ToString
"ClassLibrary1.LocalizedEnumConverter"
so it look like the LocalizedEnumConverter is not being bound to the enum - any ideas? Is this because of the way Excel loads the assembly, and is there a way arounfd this? | 0 | [
2,
448,
29,
568,
1001,
1126,
8122,
445,
26,
1957,
723,
18,
19,
40,
20700,
13009,
1475,
800,
3726,
3726,
31,
83,
101,
20,
275,
21,
1001,
14069,
815,
20,
1254,
2628,
5196,
26,
1957,
723,
18,
19,
40,
1475,
30,
25,
21,
13009,
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... |
Gettext: Is it a good idea for the message ID to be the english text?
===
We're getting ready to translate our PHP website into various languages, and the gettext support in PHP looks like the way to go.
All the tutorials I see recommend using the english text as the message ID, i.e.
gettext("Hi there!")
But is that really a good idea? Let's say someone in marketing wants to change the text to "Hi there, y'all!". Then don't you have to update all the language files because that string -- which is actually the message ID -- has changed?
Is it better to have some kind of generic ID, like "hello.message", and an english translations file? | 0 | [
2,
164,
11969,
45,
25,
32,
21,
254,
882,
26,
14,
2802,
4924,
20,
44,
14,
486,
1854,
60,
800,
3726,
3726,
95,
22,
99,
1017,
1451,
20,
20628,
318,
13,
26120,
2271,
77,
617,
2556,
15,
17,
14,
164,
11969,
555,
19,
13,
26120,
1879,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
NHibernate custom SQL object creation
===
Somewhat-simplified example situation: I have entities A and B which are incredibly "heavy" domain objects. Loading one from the database is a pretty big deal. Then I have an entity C, which is a very simple object that has a label string, one A, and one B -- both lazy.
I'm doing some low-level querying to create huge lists of C, so I know exactly what IDs I need to save for C.A and C.B, but I *don't* want to load up entire objects and set them to the properties, because the overhead is insane.
Instead, I want to just insert the IDs directly into my C entities, and then let the A and B properties on it be fully loaded later only if needed.
I see the `<sql-insert/>` tag in the documentation, but the section is *really* sparse.
Is there any way to do what I want to do inside the NHibernate framework, or should I just do raw SQL? I'm trying to keep database portability if possible, which makes me shy away from the raw option. Seems like there's got to be a better way I'm missing. | 0 | [
2,
12109,
15191,
8820,
5816,
4444,
255,
3095,
2502,
800,
3726,
3726,
4131,
8,
11268,
823,
1858,
45,
31,
57,
12549,
21,
17,
334,
56,
50,
13003,
13,
7,
19870,
7,
4603,
3916,
9,
12797,
53,
37,
14,
6018,
25,
21,
1772,
580,
1183,
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 enumerate all the defined variables in a groovy script.
===
I have a groovy script with an unknown number of variables in context at runtime, how do I find them all and print the name and value of each? | 0 | [
2,
184,
107,
31,
26940,
62,
65,
14,
2811,
12157,
19,
21,
3452,
2026,
93,
3884,
9,
800,
3726,
3726,
31,
57,
21,
3452,
2026,
93,
3884,
29,
40,
2562,
234,
16,
12157,
19,
4141,
35,
485,
891,
15,
184,
107,
31,
477,
105,
65,
17,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How close are development webservers to production webservers?
===
Most python frameworks will have a development webserver of some kind that will have a warning that it isn't for use as production servers. How much different do they tend to be from their production equivalents?
I haven't quite decided which framework to go with, much less what production server to use, so it's kinda difficult for me to pin this down to a "compare development server x to production server y." So with that said, let me make the question a little bit more precise: In your past experience with a python framework, how much time did you have to spend getting your application up and running with a production system once its been developed on a development server? Or did you skip the development server and develop your app on a server that's more like what you will use in production? | 0 | [
2,
184,
543,
50,
522,
2741,
10321,
445,
20,
637,
2741,
10321,
445,
60,
800,
3726,
3726,
127,
20059,
6596,
18,
129,
57,
21,
522,
2741,
10321,
106,
16,
109,
825,
30,
129,
57,
21,
3590,
30,
32,
2532,
22,
38,
26,
275,
28,
637,
175... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Use sqlite database in iphone using xcode 4.3.2
===
How to use sqlite database in iphone using xcode 4.3.2....
I am having problem in finding path of my database ?? | 0 | [
2,
275,
4444,
10601,
6018,
19,
21024,
568,
993,
9375,
268,
9,
240,
9,
135,
800,
3726,
3726,
184,
20,
275,
4444,
10601,
6018,
19,
21024,
568,
993,
9375,
268,
9,
240,
9,
135,
9,
9,
9,
9,
31,
589,
452,
1448,
19,
3007,
2013,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Django list of ids as a form field
===
My apologizes if this question was somewhere before, but I could not find anything.
So, the question is really simple: is these any django native formfield that mimics the behavior of `request.POST.getlist('something')`?
In my UI, user creates a list of objects that he wants to save, and these objects are represented as a list of hidden inputs with the same name:
<input type="hidden" name="cc" value="1045">
<input type="hidden" name="cc" value="1055">
<input type="hidden" name="cc" value="1046">
`request.POST.getlist` does exactly what I need, but I don't want to work with the request directly, I want do to it through the form.
| 0 | [
2,
3857,
14541,
968,
16,
13,
9178,
28,
21,
505,
575,
800,
3726,
3726,
51,
12059,
18,
100,
48,
1301,
23,
3493,
115,
15,
47,
31,
110,
52,
477,
602,
9,
86,
15,
14,
1301,
25,
510,
1935,
45,
25,
158,
186,
3857,
14541,
1275,
505,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using portrait drawable with xml in drawable-land folder
===
I have
xmlA in drawable and drawable-land folder
xmlB in drawable and drawable-land folder
icon_image in drawable and drawable-land folder
I want to use icon_image in both the xml's
In xmlA it works fine but in xmlB i want to use icon_image of only drawable folder no matter my xml is in landscape mode or portarit mode. I don't want icon_image of drawable to be used
The problem is when application is in landscape mode xmlB uses the icon_image of drawable-land which is default behavior of android, i dont want this to happen.
How can i achieve this ? | 0 | [
2,
568,
5548,
2003,
579,
29,
23504,
19,
2003,
579,
8,
618,
19294,
800,
3726,
3726,
31,
57,
23504,
58,
19,
2003,
579,
17,
2003,
579,
8,
618,
19294,
23504,
220,
19,
2003,
579,
17,
2003,
579,
8,
618,
19294,
9801,
1,
22039,
19,
2003... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Visual Studio 2010 SP1 to 11 Beta - Unit Test Project Cannot be Loaded
===
We have a Visual Studio 2010 SP1 Framework 4.0 solution, and a C# project in it that contains unit tests.
I uninstalled VS2010 and installed VS11 Beta in a Windows 7 OS. I tried to connect out TFS, did a "get latest" and everything worked fine. Except our unit test project did not open. Its project file checked out automatically but a "load failed" warning is displayed next to the project itself. And under that writes "the project cannot be converted". If you undo checkout, that warning changes to "the project requires user input".
Is there a specific reason or solution for this problem, or is it because VS11 is still in beta?
Should I share the contents of the project file?
Thank you. | 0 | [
2,
3458,
1120,
498,
3782,
165,
20,
547,
8434,
13,
8,
1237,
1289,
669,
1967,
44,
8572,
800,
3726,
3726,
95,
57,
21,
3458,
1120,
498,
3782,
165,
6596,
268,
9,
387,
4295,
15,
17,
21,
272,
5910,
669,
19,
32,
30,
1588,
1237,
4894,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Empty rows in a GridView binded to a table on a sql server won't update / delete
===
I'm using SQL Server 2008 R2 Express, C# ASP.NET 4.
I have a table on the sql server created with this T-SQL(including data):
CREATE DATABASE [someDatabase]
GO
USE [someDatabase]
CREATE TABLE someTable (someCode [int] NOT NULL IDENTITY(1,1) PRIMARY KEY, someDescription [nvarchar](50) NULL);
INSERT INTO [dbo].[someTable] (someDescription) VALUES (''),('row 2, 1st non empty line'),('3'),(''),('5th row');
SELECT * FROM [dbo].[someTable]
I also have a Default.aspx file containing a Gridview with a ConnectionString to the above table, including Edit and Delete options (templates) - no code behind:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataKeyNames="someCode" DataSourceID="SqlDataSource1">
<Columns>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
<asp:BoundField DataField="someCode" HeaderText="someCode"
InsertVisible="False" ReadOnly="True" SortExpression="someCode" />
<asp:BoundField DataField="someDescription" HeaderText="someDescription"
SortExpression="someDescription" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConflictDetection="CompareAllValues"
ConnectionString="<%$ ConnectionStrings:someDatabaseConnectionString %>"
DeleteCommand="DELETE FROM [someTable] WHERE [someCode] = @original_someCode AND (([someDescription] = @original_someDescription) OR ([someDescription] IS NULL AND @original_someDescription IS NULL))"
InsertCommand="INSERT INTO [someTable] ([someDescription]) VALUES (@someDescription)"
OldValuesParameterFormatString="original_{0}"
SelectCommand="SELECT * FROM [someTable]"
UpdateCommand="UPDATE [someTable] SET [someDescription] = @someDescription WHERE [someCode] = @original_someCode AND (([someDescription] = @original_someDescription) OR ([someDescription] IS NULL AND @original_someDescription IS NULL))">
<DeleteParameters>
<asp:Parameter Name="original_someCode" Type="Int32" />
<asp:Parameter Name="original_someDescription" Type="String" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="someDescription" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="someDescription" Type="String" />
<asp:Parameter Name="original_someCode" Type="Int32" />
<asp:Parameter Name="original_someDescription" Type="String" />
</UpdateParameters>
</asp:SqlDataSource>
It looks like the GridView is nicely bound the database's table. However, I have a problem when **using optimistic concurrency**. Then I can't neither delete rows that has no description, nor I can't update those in Edit mode.
The GridView looks fine in a browser (IE9, Chrome 18), but when I try to delete one of the rows with no description it doesn't work. When I click on Edit of one of the no description rows, I get the chance to type a new value, however, when I click Update nothing happens.
Is it normal for GridView to malfunction? Is there a workaround?
Is there an access to the validation tools of the GridView template while it is in edit or delete mode of rows of the GridView?
| 0 | [
2,
2424,
11295,
19,
21,
7354,
4725,
10193,
69,
20,
21,
859,
27,
21,
4444,
255,
8128,
230,
22,
38,
11100,
13,
118,
27448,
800,
3726,
3726,
31,
22,
79,
568,
4444,
255,
8128,
570,
761,
135,
2999,
15,
272,
5910,
28,
306,
9,
2328,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Auto edit host and vhost and file for a new site on Aptana
===
I have Aptana install on a windows machine and work very well. However every time i make a new project I have to edit my Host file in Windows, and vhost in Apache. This then allows me to point my localhost back to the directory for the new project. Is there any way to get this to be automatically done when a new Aptana project is made?
Thanks | 0 | [
2,
3108,
9392,
2015,
17,
566,
11694,
17,
3893,
26,
21,
78,
689,
27,
8442,
9068,
800,
3726,
3726,
31,
57,
8442,
9068,
16146,
27,
21,
1936,
1940,
17,
170,
253,
134,
9,
207,
352,
85,
31,
233,
21,
78,
669,
31,
57,
20,
9392,
51,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to set up itunesartwork for ad-hoc distribution?
===
We're effecting in-house testing,
Everything is done, working, archiving.
But when we achieve the app, making an .ipa, we don't see itunes cover, even though we have an image named iTunesArtwork without extensions like .png. Also when our boss wants to install the .ipa with iTunes he doesn't have cover as well.
What do you think?
thanks | 0 | [
2,
184,
20,
309,
71,
12952,
2900,
3783,
26,
21,
43,
8,
1807,
150,
2523,
60,
800,
3726,
3726,
95,
22,
99,
1590,
68,
19,
8,
1682,
4431,
15,
796,
25,
677,
15,
638,
15,
13,
25328,
68,
9,
47,
76,
95,
4689,
14,
4865,
15,
544,
40... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Make file not working for boost
===
i am using the following structure for make file
OBJECTS := time.o
PROGRAM := time
CPPFLAGS += -Iusr/include/boost_1_49_0 -Lusr/include/boost_1_49_0/stage/lib
CXXFLAGS := -Wall -ggdb3
LDFLAGS += -lboost_date_time
$(PROGRAM) : $(OBJECTS)
g++ -o time time.cpp
clean :
rm $(PROGRAM) $(OBJECTS)
but when i enter make, it gives me lots of errors including
undefined reference to `boost::gregorian::greg_month::as_short_string() const'
time.cpp:(.text._ZN5boost9date_time15month_formatterINS_9gregorian10greg_monthENS0_13simple_formatIcEEcE12format_monthERKS3_RSo[boost::date_time::month_formatter<boost::gregorian::greg_month, boost::date_time::simple_format<char>, char>::format_month(boost::gregorian::greg_month const&, std::basic_ostream<char, std::char_traits<char> >&)]+0x56): undefined reference to `boost::gregorian::greg_month::as_long_string() const'
collect2: ld returned 1 exit status
When i use g++ -Wall -Iusr/include/boost_1_49_0 -Lusr/include/boost_1_49_0/stage/lib -o time time.cpp -lboost_date_time
the code compiles fine so somthing is not write with my makefile , please help (NOTE: i tried placing the -L <directory> flag in the LDFLAG variable but that didnt work either) | 0 | [
2,
233,
3893,
52,
638,
26,
10419,
800,
3726,
3726,
31,
589,
568,
14,
249,
1411,
26,
233,
3893,
3916,
13,
45,
3726,
85,
9,
111,
625,
13,
45,
3726,
85,
272,
3421,
22868,
18,
2754,
3726,
13,
8,
2366,
139,
118,
22640,
118,
10858,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 make a OS?
===
How do you make a OS that is compatible with Windows programs?
I use vb but is there another language i could learn it
Maybe I could try a Windows Kernel but HOW?? | 0 | [
2,
184,
20,
233,
21,
13,
759,
60,
800,
3726,
3726,
184,
107,
42,
233,
21,
13,
759,
30,
25,
14961,
29,
1936,
1726,
60,
31,
275,
13,
20468,
47,
25,
80,
226,
816,
31,
110,
2484,
32,
913,
31,
110,
1131,
21,
1936,
17007,
47,
184,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Creating a dictionary of words and their context in a sentence
===
I have a Python list containing hundreds of thousands of words. The words appear in the order they are in the text.
I'm looking to create a dictionary of each word associated with a string containing that word with 2 (say) words that appear before and after it.
For example the list: "This" "is" "an" "example" "sentence"
Should become the dictionary:
"This" = "This is an"
"is" = "This is an example"
"an" = "This is an example sentence"
"example" = "is an example sentence"
"sentence" = "an example sentence"
Something like:
WordsInContext = Dict()
ContextSize = 2
wIndex = 0
for w in Words:
WordsInContext.update(w = ' '.join(Words[wIndex-ContextSize:wIndex+ContextSize]))
wIndex = wIndex + 1
This may contain a few syntax errors, but even if those were corrected, I'm sure it would be a hideously inefficient way of doing this.
Can someone suggest a more optimized method please? | 0 | [
2,
2936,
21,
9186,
16,
715,
17,
66,
4141,
19,
21,
5123,
800,
3726,
3726,
31,
57,
21,
20059,
968,
3503,
4541,
16,
3805,
16,
715,
9,
14,
715,
1893,
19,
14,
389,
59,
50,
19,
14,
1854,
9,
31,
22,
79,
699,
20,
1600,
21,
9186,
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... |
Click on Overlay . Simulating Click using Jquery
===
I am overlaying hidden rectangle on my iframe. Then Detecting click inside my rectangular region. Then i will take its (X,Y) and simulate a click inside iframe on same coordinate(X,Y).
This way, i will pass user's click on hidden rectangular area to iframe as it is not possible to directly detect events on iframe because of security issues.
This will bypass that issue.
Some problem with my code. Not able to pass click to iframe on triggering.
Here is Js Fiddle
http://jsfiddle.net/biggenius/Y8cVD/9/
Here is a way to click inside box. h`ttp://jsfiddle.net/styson/PxcBs/1/`
Here are some solution worth considering. `http://stackoverflow.com/questions/10226448/detecting-click-inside-iframe-using-invisible-div/10226475#comment13139245_10226475`
http://i.stack.imgur.com/fQiJT.png | 0 | [
2,
10840,
27,
84,
4414,
13,
9,
4861,
10038,
10840,
568,
487,
8190,
93,
800,
3726,
3726,
31,
589,
84,
4414,
68,
3689,
27181,
27,
51,
31,
8361,
9,
94,
9092,
68,
10840,
572,
51,
11354,
632,
9,
94,
31,
129,
247,
82,
13,
5,
396,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Profiling WebMethods services?
===
What techniques are available to profile services running in WebMethods Integration Server?
That is, to obtain data which would indicate which parts would benefit most from optimisation.
| 0 | [
2,
8721,
49,
802,
2741,
5909,
1807,
43,
18,
687,
60,
800,
3726,
3726,
98,
4212,
50,
904,
20,
5296,
687,
946,
19,
2741,
5909,
1807,
43,
18,
8078,
8128,
60,
30,
25,
15,
20,
5545,
1054,
56,
83,
4342,
56,
1341,
83,
4234,
127,
37,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Sum and Group By in Linq to SQL?
===
Just getting started with Linq to SQL so forgive the newbie question. I'm trying to reproduce the following (working) query in Linq to SQL (VB.NET):
Select
f.Title,
TotalArea = Sum(c.Area)
From Firms f
Left Join Concessions c on c.FirmID = f.FirmID
Group By f.Title
Order by Sum(c.Area) DESC
(A Firm has many Concessions; a Concession has an area in hectares. I want a list of Firms starting with the ones that have the greatest total area of all their concessions.)
I'm imagining something like this as the Linq to SQL equivalent (**pseudo-code**)
From f As Firm In Db.Firms _
Order By f.Concessions.Sum(Area)
... but that's not right. Can anyone point me in the right direction?
| 0 | [
2,
3907,
17,
214,
34,
19,
6294,
1251,
20,
4444,
255,
60,
800,
3726,
3726,
114,
1017,
373,
29,
6294,
1251,
20,
4444,
255,
86,
8591,
14,
78,
5893,
1301,
9,
31,
22,
79,
749,
20,
21509,
14,
249,
13,
5,
14120,
6,
25597,
19,
6294,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Object Oriented Best Practices - Inheritance v Composition v Interfaces
===
I want to ask a question about how you would approach a simple object-oriented design problem. I have a few ideas of my own about what the best way of tackling this scenario, but I would be interested in hearing some opinions from the Stack Overflow community. Links to relevant online articles are also appreciated. I'm using C#, but the question is not language specific.
Suppose I am writing a video store application whose database has a `Person` table, with `PersonId`, `Name`, `DateOfBirth` and `Address` fields. It also has a `Staff` table, which has a link to a `PersonId`, and a `Customer` table which also links to `PersonId`.
A simple object oriented approach would be to say that a `Customer` "is a" `Person` and therefore create classes a bit like this:
class Person {
public int PersonId { get; set; }
public string Name { get; set; }
public DateTime DateOfBirth { get; set; }
public string Address { get; set; }
}
class Customer : Person {
public int CustomerId { get; set; }
public DateTime JoinedDate { get; set; }
}
class Staff : Person {
public int StaffId { get; set; }
public string JobTitle { get; set; }
}
Now we can write a function say to send emails to all customers:
static void SendEmailToCustomers(IEnumerable<Person> everyone) {
foreach(Person p in everyone)
if(p is Customer)
SendEmail(p);
}
This system works fine until we have someone who is both a customer and a member of staff. Assuming that we don't really want our `everyone` list to have the same person in twice, once as a `Customer` and once as a `Staff`, do we make an arbitrary choice between:
class StaffCustomer : Customer { ...
and
class StaffCustomer : Staff { ...
Obviously only the first of these two would not break the `SendEmailToCustomers` function.
So what would you do?
- Make the `Person` class have optional references to a `StaffDetails` and `CustomerDetails` class?
- Create a new class that contained a `Person`, plus optional `StaffDetails` and `CustomerDetails`?
- Make everything an interface (e.g. `IPerson`, `IStaff`, `ICustomer`) and create three classes that implemented the appropriate interfaces?
- Take another completely different approach? | 0 | [
2,
3095,
13,
6800,
246,
5242,
13,
8,
13852,
566,
4046,
566,
6573,
18,
800,
3726,
3726,
31,
259,
20,
1349,
21,
1301,
88,
184,
42,
83,
2141,
21,
1935,
3095,
8,
6800,
704,
1448,
9,
31,
57,
21,
310,
3478,
16,
51,
258,
88,
98,
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... |
What is the best practice for passing variables from one HTML page to another?
===
I'm relatively new to web application programming so I hope this question isn't too basic for everyone.
I created a HTML page with a FORM containing a dojox datagrid (v1.2) filled with rows of descriptions for different grocery items. After the user selects the item he's interested in, he will click on the "Submit" button.
At this point, I can get the javascript function to store the item ID number as a javascript variable BUT I don't know how to pass this ID onto the subsequent HTML page.
Should I just pass the ID as an URL query string parameter? Are there any other better ways?
| 0 | [
2,
98,
25,
14,
246,
1345,
26,
2848,
12157,
37,
53,
13,
15895,
2478,
20,
226,
60,
800,
3726,
3726,
31,
22,
79,
3109,
78,
20,
2741,
3010,
3143,
86,
31,
1376,
48,
1301,
2532,
22,
38,
266,
2125,
26,
1266,
9,
31,
679,
21,
13,
158... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 format to only include decimal if there are any.
===
What is the best way to format a decimal if I only want decimal displayed if it is not an integer.
Eg:
decimal amount = 1000M
decimal vat = 12.50M
When formatted I want:
Amount: 1000 (not 1000.0000)
Vat: 12.5 (not 12.50)
| 0 | [
2,
184,
107,
31,
2595,
20,
104,
468,
26380,
100,
80,
50,
186,
9,
800,
3726,
3726,
98,
25,
14,
246,
161,
20,
2595,
21,
26380,
100,
31,
104,
259,
26380,
6115,
100,
32,
25,
52,
40,
13820,
9,
12369,
45,
26380,
2006,
800,
6150,
79,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
uniquely identify pc visiting a web site
===
I need to figure out a way uniquely identify each computer which visits the web site I am creating. Does anybody have any experience on how to achieve this?
Because i want the solution to work on all machines and all browsers (within reason) i am trying to create a solution using javascript.
I appreciate the help. Thanks. | 0 | [
2,
23703,
5808,
5168,
4803,
21,
2741,
689,
800,
3726,
3726,
31,
376,
20,
1465,
70,
21,
161,
23703,
5808,
206,
1428,
56,
7659,
14,
2741,
689,
31,
589,
2936,
9,
630,
11181,
57,
186,
1496,
27,
184,
20,
4689,
48,
60,
185,
31,
259,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SYN packets dropped occasionally on Linux
===
We're running a Debian with a 2.6.16 kernel, with iptables enabled. The system is running a custom made HTTP proxy, which is subjected to a mild load (it works fine with the same load on other sites). The system comprises of 4 servers that are preceded by a load balancer with virtual IP, which is preceded by an array of 4 ISA 2004 machines, so the basic topology is:
Client -> ISA [1-4] -> Load Balancer -> Our Proxy -> The Internet
Occasionally, the ISA will send us a SYN packet, to which no SYN-ACK is being sent. It will try again after 3 seconds, and a third time after another 6 seconds, after which it will report the proxy down, and switch to direct connection. During this time, meaning before, in between and after those 3 SYNs, other SYNs from the same ISA come and are successfully answered to.
A very similar problem is being reported by others (with no solution, however):
All coming from a flavor of Linux called CentOS. It’s peculiarity is in having iptables enabled by default.
http://www.linuxhelpforum.com/showthread.php?t=931912&mode=linear
http://www.centos.org/modules/newbb/viewtopic.php?topic_id=16147
Almost the same: but a bit different:
http://www.linuxquestions.org/questions/linux-networking-3/tcp-handshake-fails-synack-ignored-by-system.-637171/
Also seems to be relevant:
http://groups.google.com/group/comp.os.linux.networking/browse_thread/thread/b1c000e2d65e0034
I suspect iptables to be a culprit, but any additional feedback will be welcome. | 0 | [
2,
6063,
12795,
18,
1539,
4533,
27,
13024,
800,
3726,
3726,
95,
22,
99,
946,
21,
121,
10035,
29,
21,
172,
9,
379,
9,
1091,
17007,
15,
29,
15735,
5924,
18,
9338,
9,
14,
329,
25,
946,
21,
5816,
117,
7775,
27188,
15,
56,
25,
1584... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why exactly isn't MEF a DI/IoC Container?
===
It's been said on the blogosphere and by MS themselves that MEF isn't another IoC Container.
Ok...but why? It seems the same to me. Maybe it's not as good as Unity or castle Windsor, but it still fits the definition, doesn't it?
Can anyone explain why MEF isn't an IoC Container like Unity or Castle Windsor? | 0 | [
2,
483,
1890,
2532,
22,
38,
55,
410,
21,
926,
118,
49,
2499,
12147,
60,
800,
3726,
3726,
32,
22,
18,
74,
87,
27,
14,
8146,
111,
14079,
17,
34,
4235,
1366,
30,
55,
410,
2532,
22,
38,
226,
31,
2499,
12147,
9,
5854,
9,
9,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Has anyone read Web ReDesign 2.0, and if so, what do you think about it?
===
Has anyone read Web ReDesign 2.0, and if so, what do you think about it? (Link: http://www.amazon.com/Web-ReDesign-2-0-Workflow-VOICES/dp/0735714339/ref=sr_1_1?ie=UTF8&s=books&qid=1224432120&sr=8-1) And, also, if you know of any other books similar to this that you would recommend for process flow, I would be interested in hearing about them. Thanks for your answers! | 0 | [
2,
63,
1276,
1302,
2741,
23903,
172,
9,
387,
15,
17,
100,
86,
15,
98,
107,
42,
277,
88,
32,
60,
800,
3726,
3726,
63,
1276,
1302,
2741,
23903,
172,
9,
387,
15,
17,
100,
86,
15,
98,
107,
42,
277,
88,
32,
60,
13,
5,
6258,
45,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
"Endless scrolling" effect in a HTML table
===
I am displaying a scrolled data table in a web page. This table has several thousands of dynamic rows, so it is loaded from the server (via AJAX).
The user can scroll up and down, so what I need is to **detect when the user reaches the end of the scrollbar** (that is, the last row at the bottom of the table) in order to request and show more data.
You can find this effect in google reader, when you scroll down to the last post in a given feed, google requests and shows new posts in a transparent way, but I can't figure out how they achieve it.
By the way, right now I am using a [YUI Datatable][1]
[1]: http://developer.yahoo.com/yui/datatable/ | 0 | [
2,
13,
7,
2451,
923,
13,
28166,
7,
1590,
19,
21,
13,
15895,
859,
800,
3726,
3726,
31,
589,
17418,
21,
12159,
69,
1054,
859,
19,
21,
2741,
2478,
9,
48,
859,
63,
238,
3805,
16,
7782,
11295,
15,
86,
32,
25,
8572,
37,
14,
8128,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Html.BeginForm and adding properties
===
How would I go about adding enctype="multipart/form-data" to a form that is generated by using <% Html.BeginForm(); %> ? | 0 | [
2,
13,
15895,
9,
17143,
108,
4190,
17,
4721,
3704,
800,
3726,
3726,
184,
83,
31,
162,
88,
4721,
1957,
150,
4474,
3726,
7,
21531,
3091,
118,
4190,
8,
18768,
7,
20,
21,
505,
30,
25,
6756,
34,
568,
13,
1,
11881,
13,
15895,
9,
171... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
postgresSQL mysql oracle diferences
===
I'm having to start building the architecture for a database project but i really don't know the differences between the engines.
Anyone can explain whats the pros and bads of each of these three engines? We'll have to choose one of them and the only thing I actualy know about them is this:
- Mysql & Postgres:
- Are free but not so good as oracle
- Mysql as security problems (is this true?)
- Oracle:
- Best data base engine in the world
- Expensive
Can someone clear out other differences between them? This is a medium/large (we're thinking of around some 100 to 200 tables) project with low budget, what would you choose? And with a higher budget?
Thanks all for helping clarify the differences.
*ps: hope i'm not duplicating an already existing post, i've tried to search but didn't find any*
| 0 | [
2,
678,
13026,
22402,
51,
18,
22402,
15759,
926,
2407,
2940,
18,
800,
3726,
3726,
31,
22,
79,
452,
20,
799,
353,
14,
2607,
26,
21,
6018,
669,
47,
31,
510,
221,
22,
38,
143,
14,
4921,
128,
14,
4016,
9,
1276,
92,
3271,
98,
18,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Dictionary API or Library
===
Does anyone know of a good dictionary API or ruby library to lookup the definitions of words?
I'm thinking it should work something like:
1. I call get_definition(word)
2. It returns the definition for that word (ideally in some way to easily format the definition for display.
Thanks
| 0 | [
2,
9186,
21,
2159,
54,
1248,
800,
3726,
3726,
630,
1276,
143,
16,
21,
254,
9186,
21,
2159,
54,
10811,
1248,
20,
361,
576,
14,
18544,
16,
715,
60,
31,
22,
79,
1440,
32,
378,
170,
301,
101,
45,
137,
9,
31,
645,
164,
1,
28643,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 question in excl strings?
===
How can I construct the following string in an Excel formula:
Maurice "The Rocket" Richard
If I'm using single quotes, it's trivial = "Bob 'The Rocket' Richard" but what about double quotes?
Thanks | 0 | [
2,
1494,
1301,
19,
1396,
5316,
7887,
60,
800,
3726,
3726,
184,
92,
31,
6960,
14,
249,
3724,
19,
40,
20700,
3729,
45,
8089,
13,
7,
124,
6598,
7,
1098,
100,
31,
22,
79,
568,
345,
18901,
15,
32,
22,
18,
13,
19712,
800,
13,
7,
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,
0,
0... |
Favorite (non-esoteric) Programming Language
===
What is your favorite programming language? This is <b>not the one you use at work</b>, but the <b>one you tend to use for personal projects</b>... the one that you first go to because it most matches your way of thinking / programming style, etc...
List the reasons for it, too. | 4 | [
2,
3839,
13,
5,
3951,
8,
160,
10417,
2988,
6,
3143,
816,
800,
3726,
3726,
98,
25,
154,
3839,
3143,
816,
60,
48,
25,
13,
1,
220,
1,
1270,
14,
53,
42,
275,
35,
170,
1,
118,
220,
1,
15,
47,
14,
13,
1,
220,
1,
849,
42,
5480,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 with Windows Forms - STAThread
===
I am a newbie to WPF and have a couple of questions about WPF and Windows Forms integration.
I have an existing Visual C# Windows Forms application. I would like to integrate it with a WPF window, that can be shown on a button click. This was not possible as WPF expects the calling thread to be a STAThread and by default WinForm assumes that the thread is an MTAThread. I tried spawning a new thread with an apartment state of STAThread for calling the WPF UI but that did not work. I tried using the Dispatcher.BeginInvoke method and Background Worker as well, but none of them resolved the issue.
1) Can we make a call to WPF window/control without marking the Main as an STAThread? If it is possible, Can anyone please point me to a proper direction?
2) If the only way to accomplish this is by making the Main Thread an STAThread, will there be any impact to the general performance/responsiveness of the application.
Thanks in advance. | 0 | [
2,
619,
7721,
29,
1936,
1997,
13,
8,
6419,
96,
10647,
800,
3726,
3726,
31,
589,
21,
78,
5893,
20,
619,
7721,
17,
57,
21,
1335,
16,
2346,
88,
619,
7721,
17,
1936,
1997,
8078,
9,
31,
57,
40,
3149,
3458,
272,
5910,
1936,
1997,
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... |
Graphs on Windows Forms using C# (.NET 2.0)
===
Is there an Open Source Free Graph Control for Windows Forms .NET 2.0? | 0 | [
2,
7210,
18,
27,
1936,
1997,
568,
272,
5910,
13,
5,
9,
2328,
172,
9,
387,
6,
800,
3726,
3726,
25,
80,
40,
368,
1267,
551,
7210,
569,
26,
1936,
1997,
13,
9,
2328,
172,
9,
387,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Creating an MJPEG video stream in c#
===
I have images being sent to my database from a remote video source at about 5 frames per second as JPEG images. I am trying to figure out how to get those images into a video format so I can stream a live video feed to Silverlight.
It seems to make sense to create a MJPEG stream but I'm having a few problems. Firstly I was trying to stream via an HTTP request so I didn't have a deal with sockets but maybe this is breaking my code.
If I try surf to my stream from QT I get a video error, Media player shows the first frame image and Silverlight crashes :)
Here is the code that streams - since I content type used this way can only be sent once I know that it isn't ideal and might be the root cause. All images are coming in via a LINQ2SQL object.
I did already try simply updating the image source of an image control in Silverlight but the flicker isn't acceptable. If Silverlight doesn't support MJPEG then no point even continuing but it looks like it does. I do have access to the h.264 frames coming in but that seemed more complicated via MP4.
Response.Clear();
Response.ContentType = "multipart/x-mixed-replace; boundary=--myboundary";
ASCIIEncoding ae = new ASCIIEncoding();
HCData data = new HCData();
var videos = (from v in data.Videos
select v).Take(50); // sample the first 50 frames
foreach (Video frame in videos)
{
MemoryStream mem = new MemoryStream(frame.VideoData.ToArray());
mem.WriteTo(Response.OutputStream);
byte[] boundary = ae.GetBytes("--myboundary");
mem = new MemoryStream(boundary);
mem.WriteTo(Response.OutputStream);
Response.ContentType = "image/jpeg";
Thread.Sleep(300); // not ideal but controls frame rate a little :)
}
Thanks!
| 0 | [
2,
2936,
40,
307,
728,
20427,
763,
3766,
19,
272,
5910,
800,
3726,
3726,
31,
57,
3502,
142,
795,
20,
51,
6018,
37,
21,
5388,
763,
1267,
35,
88,
331,
12809,
416,
153,
28,
487,
20427,
3502,
9,
31,
589,
749,
20,
1465,
70,
184,
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... |
How software developer can become location independent?
===
I have been playing with the idea of working from whereever I happen and want to be.
Every now and then there is a need to change the scenery. So far I have done that simply by finding a job and relocating from country to another inside Europe. Luckily, this is pretty straightforward inside EU for an IT professional with some experience. But still I go to the company office every working day except occasional days when I work from home. This then dictates my current location because commuting between countries is usually not feasible.
There are companies which have taken this further. At least [Expat Software][1] and [Art & Logic][2] are geographically distributed and have a virtual office. Traditional telecommuting is common but it usually requires an office visit every now and then.
So, in order to be able to be totally location independent I could:
- Become an entrepreneur running a MISV
- Start contracting and find clients without need of frequent meetings.
- Join a company that allows me to work remotely and covers traveling expenses in case I am needed in the office.
Other options? Any location-independent developers here?
[1]: http://www.expatsoftware.com/
[2]: http://www.artlogic.com/ | 0 | [
2,
184,
2306,
10058,
92,
533,
1474,
1124,
60,
800,
3726,
3726,
31,
57,
74,
791,
29,
14,
882,
16,
638,
37,
113,
5221,
31,
2384,
17,
259,
20,
44,
9,
352,
130,
17,
94,
80,
25,
21,
376,
20,
753,
14,
19788,
9,
86,
463,
31,
57,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Emulate MySQL LIMIT clause in Microsoft SQL Server 2000
===
When I worked on the [Zend Framework's database component][1], we tried to abstract the functionality of the `LIMIT` clause supported by MySQL, PostgreSQL, and SQLite. That is, creating a query could be done this way:
$select = $db->select();
$select->from('mytable');
$select->order('somecolumn');
$select->limit(10, 20);
When the database supports `LIMIT`, this produces an SQL query like the following:
SELECT * FROM mytable ORDER BY somecolumn LIMIT 10, 20
This was more complex for brands of database that don't support `LIMIT`. That clause is not part of the standard SQL language, by the way. So Oracle and IBM DB2 required some special handling: generate row numbers, make the whole query a derived table, and in the outer query use `BETWEEN`. Not very efficient, but pretty reusable.
For example, the Oracle solution ended up rewriting a SQL query like this:
SELECT z2.*
FROM (
SELECT ROWNUM AS zend_db_rownum, z1.*
FROM ( $original_sql ) z1
) z2
WHERE z2.zend_db_rownum BETWEEN {$offset+1} AND {$offset+$count}
Microsoft SQL Server 2005 also has a similar row-numbering function, but this is not available in Microsoft SQL Server 2000.
So my question is, can you come up with a way to emulate the `LIMIT` functionality in Microsoft SQL Server 2000, solely using SQL? Without using cursors or T-SQL or a stored procedure. It has to support both arguments for `LIMIT`, both count and offset.
[1]: http://framework.zend.com/manual/en/zend.db.html | 0 | [
2,
23804,
51,
18,
22402,
4496,
9040,
19,
7099,
4444,
255,
8128,
824,
800,
3726,
3726,
76,
31,
577,
27,
14,
636,
4257,
43,
6596,
22,
18,
6018,
5912,
500,
2558,
165,
500,
15,
95,
794,
20,
8502,
14,
18548,
16,
14,
13,
1,
20565,
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... |
Looking for good and known javascript MVC pattern
===
what is the best way , to manage the JS files and the functions/objects context in asp.net MVC app ? | 0 | [
2,
699,
26,
254,
17,
167,
8247,
8741,
307,
8990,
3732,
800,
3726,
3726,
98,
25,
14,
246,
161,
13,
15,
20,
4705,
14,
487,
18,
6488,
17,
14,
3719,
118,
23793,
18,
4141,
19,
28,
306,
9,
2328,
307,
8990,
4865,
13,
60,
3,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
What's the best way to test an iPhone game for iPod Touch?
===
I've developed a game for the iPhone... on my iPhone. When I submitted it to the store I marked it as "iPhone only". Now I'm getting emails asking "Why not iPod touch?".
The game doesn't use any iPhone only features btw. So...
I'd like to test it on an actual iPod Touch to be sure it works. Is this really necessary?
If so do developers just go out and buy an iPod touch to test on? haha... guess this is pretty obvious :-p | 0 | [
2,
98,
22,
18,
14,
246,
161,
20,
1289,
40,
21024,
250,
26,
31,
10670,
1723,
60,
800,
3726,
3726,
31,
22,
195,
885,
21,
250,
26,
14,
21024,
9,
9,
9,
27,
51,
21024,
9,
76,
31,
7368,
32,
20,
14,
1718,
31,
2739,
32,
28,
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... |
Where do these classes belong . .
===
So i am reorganizing a winforms C# solution to help decouple and make it cleaner and more organized. The solution tracks a small business orders,etc . .
I have broken out the projects so far into
**App.View** - all GUI Related Code
**App.Data** - all data structures and interfaces
**App.BusinessLogic** - all business logic code that has no GUI references
I have some classes that i can't figure out where they belong. Please let me know your thoughts which project each class should go or if there is another project that should get created for this.
1. Class that retrieves user preferences from a database
2. Class that retrieves static data from our static data server and returns sets of data results.
3. Class that brings down user entitlements
4. The model class that stores a hashtable of orders
5. A class that emails out messages on a user action | 0 | [
2,
113,
107,
158,
2684,
6219,
13,
9,
13,
9,
800,
3726,
3726,
86,
31,
589,
302,
6826,
3335,
21,
628,
4190,
18,
272,
5910,
4295,
20,
448,
121,
17856,
413,
17,
233,
32,
19585,
17,
91,
2518,
9,
14,
4295,
1633,
21,
284,
508,
3204,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I get a status report of all files currently being uploaded via a HTTP form on an Apache Server?
===
How do I get a status report of all files currently being uploaded via HTTP form based file upload on an Apache Server? | 0 | [
2,
184,
107,
31,
164,
21,
1782,
1330,
16,
65,
6488,
871,
142,
23782,
1197,
21,
7775,
505,
27,
40,
17140,
8128,
60,
800,
3726,
3726,
184,
107,
31,
164,
21,
1782,
1330,
16,
65,
6488,
871,
142,
23782,
1197,
7775,
505,
432,
3893,
71... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
call OpenFileDialog from powershell
===
When I run the following, PowerShell hangs waiting for the dialog to close, even though the dialog is never displayed:
[void] [Reflection.Assembly]::LoadWithPartialName( 'System.Windows.Forms' )
$d = New-Object Windows.Forms.OpenFileDialog
$d.ShowDialog( )
Calling `ShowDialog` on a `Windows.Forms.Form` works fine. I also tried creating a `Form` and passing it as the parent to `$d.ShowDialog`, but the result was no different.
| 0 | [
2,
645,
368,
16877,
4286,
5567,
37,
414,
15984,
800,
3726,
3726,
76,
31,
485,
14,
249,
15,
414,
15984,
4546,
18,
1672,
26,
14,
28223,
20,
543,
15,
166,
362,
14,
28223,
25,
243,
6115,
45,
636,
2625,
1340,
500,
636,
27977,
872,
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... |
No rule to make target consoleio.c
===
In a [recent issue][1], I've found that DJGPP can only accept the DOS command line character limit. To work around this limitation, I've decided to try to write a makefile to allow me to [pass longer strings][2]. In the process of hacking together a makefile and testing it, I've come across a strange error. The makefile is as follows:
AS := nasm
CC := gcc
LD := ld
TARGET := $(shell basename $(CURDIR))
BUILD := build
SOURCES := source
CFLAGS := -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions \
-nostdinc -fno-builtin -I./include
ASFLAGS := -f aout
export OUTPUT := $(CURDIR)/$(TARGET)
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
SOBJS := $(SFILES:.s=.o)
COBJS := $(CFILES:.c=.o)
OBJS := $(SOBJS) $(COBJS)
build : $(TARGET).img
$(TARGET).img : $(TARGET).bin
concat.py
$(TARGET).bin : $(OBJS)
$(LD) -T link.ld -o $@ $^
$(SOBJS) : %.o : %.asm
$(AS) $(ASFLAGS) $< -o $@
$(COBJS) : %.o : %.c
$(CC) -c $< $(CFLAGS) -o $@
When attempting to run it, I receive this error:
<pre>make: *** No rule to make target `consoleio.c', needed by `consoleio.o'. Stop.</pre>
What I don't understand is why it's trying to find a rule for .c files. From what I understand, if the file is there, it should just use it. How do I make make not need a rule for .c files?
[1]: http://stackoverflow.com/questions/215933/gcc-compiler-error-on-windows-xp
[2]: http://www.delorie.com/djgpp/v2faq/faq16_4.html | 0 | [
2,
90,
1828,
20,
233,
2935,
8650,
1963,
9,
150,
800,
3726,
3726,
19,
21,
636,
99,
5089,
1513,
500,
2558,
165,
500,
15,
31,
22,
195,
216,
30,
3857,
263,
3421,
92,
104,
3440,
14,
107,
18,
1202,
293,
925,
4496,
9,
20,
170,
140,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 do I need to test on the iPod touch (besides the actual device) ?
===
I've tested my iPhone app on the iPhone. Now I want to test it on the iPod touch. Assuming I have an iPod touch what else do I need?
I just want to make sure all the certificates and stuff that I used for the iPhone will work for the iPod touch too.
| 0 | [
2,
98,
107,
31,
376,
20,
1289,
27,
14,
31,
10670,
1723,
13,
5,
22356,
14,
3463,
3646,
6,
13,
60,
800,
3726,
3726,
31,
22,
195,
7631,
51,
21024,
4865,
27,
14,
21024,
9,
130,
31,
259,
20,
1289,
32,
27,
14,
31,
10670,
1723,
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... |
Pros and cons of using nested C++ classes and enumerations?
===
What are the pros and cons of using nested public C++ classes and enumerations? For example, suppose you have a class called `printer`, and this class also stores information on output trays, you could have:
class printer
{
public:
std::string name_;
enum TYPE
{
TYPE_LOCAL,
TYPE_NETWORK,
};
class output_tray
{
...
};
...
};
printer prn;
printer::TYPE type;
printer::output_tray tray;
Alternatively:
class printer
{
public:
std::string name_;
...
};
enum PRINTER_TYPE
{
PRINTER_TYPE_LOCAL,
PRINTER_TYPE_NETWORK,
};
class output_tray
{
...
};
printer prn;
PRINTER_TYPE type;
output_tray tray;
I can see the benefits of nesting private enums/classes, but when it comes to public ones, the office is split - it seems to be more of a style choice.
So, which do you prefer and why? | 0 | [
2,
895,
18,
17,
11608,
16,
568,
5618,
69,
272,
20512,
2684,
17,
26940,
5757,
60,
800,
3726,
3726,
98,
50,
14,
895,
18,
17,
11608,
16,
568,
5618,
69,
317,
272,
20512,
2684,
17,
26940,
5757,
60,
26,
823,
15,
5787,
42,
57,
21,
71... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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't create xmlns reference to other project in XAML
===
I have a WPF project defined like this:
<pre>
MyApp.sln
MyAppWPF
MyApp.Domain
</pre>
In one of my xaml files in the MyAppWPF project I'm trying to reference a class defined in MyApp.Domain project. I have a **project reference** in MyAppWPF to MyApp.Domain. I am trying to create the reference like this:
<pre>
<Window x:Class="MyAppWPF.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:MyApp.Domain;assembly=MyApp.Domain"
Title="Window1" Height="305" Width="485">
<Window.Resources>
<local:MyClass x:Key="mine" />
</Window.Resources>
</Window>
</pre>
I get an error saying the assembly cannot be found, however I can create an instance of the class I want to reference in the code behind, so I know I've got it referenced correctly.
How do I do this? Do I need a strong name, or reference the dll directly instead of using a project reference? | 0 | [
2,
92,
22,
38,
1600,
23504,
2172,
2801,
20,
89,
669,
19,
13,
6791,
8184,
800,
3726,
3726,
31,
57,
21,
619,
7721,
669,
2811,
101,
48,
45,
13,
1,
3515,
1,
51,
7753,
9,
18,
16600,
51,
7753,
499,
7721,
51,
7753,
9,
537,
6232,
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... |
SQL Server application role, performance hit
===
I plan to use MS **SQL Server 2005 application roles** in my application. I will start the role by executing the *sp_setapprole* and finish by executing the *sp_unsetapprole* SPs. The application is implemented in **ASP.NET**.
I've read that **connection pooling doesn't work** with application pooling and there is no way to react on connection **disconnect event** (execute sp_unsetapprole just before disconnection).
I plan to call sp_setapprole at the start of all my SPs and call sp_unsetapprole at the end of all my SPs.
Have you used SQL application roles? What are your XPs? **What about performance hit**? | 0 | [
2,
4444,
255,
8128,
3010,
597,
15,
956,
770,
800,
3726,
3726,
31,
944,
20,
275,
4235,
13,
1409,
18,
22402,
8128,
812,
3010,
2954,
1409,
19,
51,
3010,
9,
31,
129,
799,
14,
597,
34,
25836,
14,
1637,
3401,
1,
3554,
7753,
661,
413,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 play a sound file in j2me on Samsung mobile phones?
===
File formats I would like to play include wav, mp3, midi.
I have tried using the Wireless Toolkit classes with no success.
I have also tried using the AudioClip class that is part of the Samsung SDK; again with
no success.
Thanks | 0 | [
2,
184,
107,
31,
418,
21,
646,
3893,
19,
487,
135,
790,
27,
22981,
3241,
14830,
60,
800,
3726,
3726,
3893,
13767,
31,
83,
101,
20,
418,
468,
3142,
710,
15,
4628,
240,
15,
907,
49,
9,
31,
57,
794,
568,
14,
10149,
5607,
13703,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I get using php?
===
I know that this is a simple question for PHP guys but I don't know the language and just need to do a simple "get" from another web page when my page is hit. i.e. signal the other page that this page has been hit. | 0 | [
2,
184,
107,
31,
164,
568,
13,
26120,
60,
800,
3726,
3726,
31,
143,
30,
48,
25,
21,
1935,
1301,
26,
13,
26120,
2776,
47,
31,
221,
22,
38,
143,
14,
816,
17,
114,
376,
20,
107,
21,
1935,
13,
7,
3060,
7,
37,
226,
2741,
2478,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Address Standardization/Correction/Geocoding
===
My place of employment is looking into buying a third party tool, for batch based US and Candian Address correction, with Geocoding.
What Products have you used?
What do you Like about them?
What do you not like about them?
We are a C/C++ Unix Shop.
Thanks in advance. | 0 | [
2,
3218,
1236,
1829,
118,
25345,
872,
118,
834,
111,
15458,
800,
3726,
3726,
51,
209,
16,
5029,
25,
699,
77,
9459,
21,
422,
346,
5607,
15,
26,
13064,
432,
182,
17,
92,
8258,
3218,
14608,
15,
29,
6389,
15458,
9,
98,
1985,
57,
42,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
spring + tomcat + aix2 == jax-ws web service ?
===
I'm looking for a straightforward example / tutorial for implementing a JAX-WS (soap1.1 and soap1.2) web service based on wsdl definition using spring, axis2 and tomcat.
hint anyone ?
-- Yonatan
| 0 | [
2,
1573,
2754,
2067,
5782,
2754,
21,
4028,
135,
800,
3726,
11712,
8,
10268,
2741,
365,
13,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
22262,
823,
13,
118,
29724,
26,
17333,
21,
11712,
8,
10268,
13,
5,
656,
2552,
165,
9,
165,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Log4j, configuring a Web App to use a relative path.
===
I have a java webapp that has to be deployed on either Win or Linux machines. I now want to add log4j for logging and I'd like to use a relative path for the log file as I don't want to change the file path on every deployment. The container will most likely be Tomcat but not necessarily.
What's the best way of doing this? | 0 | [
2,
6738,
300,
728,
15,
1065,
13549,
68,
21,
2741,
4865,
20,
275,
21,
4543,
2013,
9,
800,
3726,
3726,
31,
57,
21,
8247,
2741,
7753,
30,
63,
20,
44,
6698,
27,
694,
628,
54,
13024,
6035,
9,
31,
130,
259,
20,
3547,
6738,
300,
728,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 get the last inserted id using sqlite from Java?
===
What's the best way to get the last inserted id using sqlite from Java? Google is giving me different answers--some say select the last-insert-rowid; others say call statement.getGeneratedKeys(). What's the best route to take? (I just want to return the id, not use it for other inserts or anything.) | 0 | [
2,
98,
22,
18,
14,
246,
161,
20,
164,
14,
236,
14215,
4924,
568,
4444,
10601,
37,
8247,
60,
800,
3726,
3726,
98,
22,
18,
14,
246,
161,
20,
164,
14,
236,
14215,
4924,
568,
4444,
10601,
37,
8247,
60,
8144,
25,
1438,
55,
421,
670... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Big O Notation Homework--Code Fragment Algorithm Analysis?
===
For homework, I was given the following 8 code fragments to analyze and give a Big-Oh notation for the running time. Can anybody please tell me if I'm on the right track?
//Fragment 1
for(int i = 0; i < n; i++)
sum++;
I'm thinking O(N) for fragment 1
//Fragment 2
for(int i = 0; i < n; i+=2)
sum++;
O(N) for fragment 2 as well
//Fragment 3
for(int i = 0; i < n; i++)
for( int j = 0; j < n; j++)
sum++;
O(N^2) for fragment 3
//Fragment 4
for(int i = 0; i < n; i+=2)
sum++;
for(int j = 0; j < n; j++)
sum++;
O(N) for fragment 4
//Fragment 5
for(int i = 0; i < n; i++)
for( int j = 0; j < n * n; j++)
sum++;
O(N^2) for fragment 5 but the n * n is throwing me off a bit so I'm not quite sure
//Fragment 6
for(int i = 0; i < n; i++)
for( int j = 0; j < i; j++)
sum++;
O(N^2) for fragment 6 as well
//Fragment 7
for(int i = 0; i < n; i++)
for( int j = 0; j < n * n; j++)
for(int k = 0; k < j; k++)
sum++;
O(N^3) for fragment 7 but once again the n * n is throwing me off
//Fragment 8
for(int i = 1; i < n; i = i * 2)
sum++;
O(N) for fragment 8 | 0 | [
2,
580,
635,
15591,
22334,
8,
8,
9375,
14847,
9083,
2495,
60,
800,
3726,
3726,
26,
22334,
15,
31,
23,
504,
14,
249,
469,
1797,
10837,
20,
16051,
17,
590,
21,
580,
8,
1134,
15591,
26,
14,
946,
85,
9,
92,
11181,
2247,
494,
55,
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... |
Embed a website/page into Silverlight
===
Yes that sounds backwards. I want to create an area or frame in my Silverlight app to host another page from my site. I've seen it done before but I can't seem to find any examples.
This way I can control the entire page layout using SL but still use existing aspx pages.
thanks | 0 | [
2,
11911,
69,
21,
2271,
118,
6486,
77,
1172,
3130,
800,
3726,
3726,
1643,
30,
2795,
12207,
9,
31,
259,
20,
1600,
40,
217,
54,
3523,
19,
51,
1172,
3130,
4865,
20,
2015,
226,
2478,
37,
51,
689,
9,
31,
22,
195,
541,
32,
677,
115,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
call FolderBrowserDialog from powershell
===
Similar to [this question](http://stackoverflow.com/questions/216710/call-openfiledialog-from-powershell), after running the following code the browser dialog does appear with all the correct buttons, but the selection area that usally displays available folders is missing:
[void] [Reflection.Assembly]::LoadWithPartialName( 'System.Windows.Forms' )
$d = New-Object Windows.Forms.FolderBrowserDialog
$d.ShowDialog( )
| 0 | [
2,
645,
19294,
25699,
4104,
4286,
5567,
37,
414,
15984,
800,
3726,
3726,
835,
20,
636,
1565,
1301,
500,
5,
21127,
6903,
25325,
2549,
9990,
9,
960,
118,
24652,
18,
118,
17608,
20770,
118,
9200,
8,
10157,
16877,
4286,
5567,
8,
2665,
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... |
ImageUrl lost on postback with dynamic controls, but textboxes keep thier value
===
I have a button that adds an already defined usercontrol programtically. I am rebuilding each control on Postback and they show up fine. If i put text in the textbox it shows up fine, however my images are loosing thier url. Any idea why or how i can fix this?
I tried adding AJAX updatepanel to see if that would help, but it does not.
To further explain - i have a button that after clicks set the url of the image - i also put this value in the textbox just to see if the same thing happens - after postback, my textbox still has the value, but the image does not - and all of my other asp.net images loose thier image and they are defined right on the controls (ie: ImageUrl) | 0 | [
2,
1961,
911,
255,
529,
27,
678,
1958,
29,
7782,
8671,
15,
47,
1854,
5309,
160,
643,
8581,
106,
1923,
800,
3726,
3726,
31,
57,
21,
5167,
30,
10621,
40,
614,
2811,
4155,
12898,
625,
38,
8438,
9,
31,
589,
16633,
206,
569,
27,
678,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 does debugger works?
===
I keep wondering how does the debugger works? Particulary the one that can be 'attached' to already running executable. I understand that compiler translates code to machine language, but then how does debugger 'know' what it is being attached to? | 0 | [
2,
184,
630,
121,
2345,
11356,
693,
60,
800,
3726,
3726,
31,
643,
5712,
184,
630,
14,
121,
2345,
11356,
693,
60,
1498,
93,
14,
53,
30,
92,
44,
13,
22,
28484,
22,
20,
614,
946,
1396,
17194,
5924,
9,
31,
1369,
30,
21486,
18510,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 worth mitigating security risks in every application
===
As web developers our applications are vulnerable to a number of security holes (xss,
sql-injects,etc...). I'm a firm believer that if you're writing an app it should be
protected from all of these well known vulnerabilities. However, I'm having a hard time
convincing my team (and management) that it's worth the effort.
This leads me to wonder under what conditions should one fight the security fight? What
are the factors that should be considered when deciding what security vulnerabilities to
mitigate and which to ignore?
| 0 | [
2,
25,
32,
2715,
534,
8407,
1880,
1221,
12176,
19,
352,
3010,
800,
3726,
3726,
28,
2741,
10168,
318,
3767,
50,
8107,
20,
21,
234,
16,
1221,
8486,
13,
5,
396,
18,
18,
15,
4444,
255,
8,
108,
17759,
18,
15,
1198,
150,
9,
9,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What different ways can you
===
There are some cool and exciting features in .NET 3.5/C# 3.0, and with those features comes some darn interesting ways to write the exact same line of code.
Using the above stated tool set, what are the different ways the below code snippet could reasonably be rewritten?
string uploadDirectory = "c:\\some\\path\\";
if (Directory.Exists(uploadDirectory)) {
string[] files = Directory.GetFiles(uploadDirectory);
foreach (string filename in files) {
if (File.GetLastWriteTime(filename).AddHours(12) < DateTime.Now) {
File.Delete(filename);
}
}
} | 0 | [
2,
98,
421,
2847,
92,
42,
800,
3726,
3726,
80,
50,
109,
2700,
17,
12028,
967,
19,
13,
9,
2328,
203,
9,
10551,
150,
5910,
203,
9,
387,
15,
17,
29,
273,
967,
1624,
109,
3178,
103,
4883,
2847,
20,
2757,
14,
5340,
205,
293,
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... |
What's the best way to trim std::string
===
I'm currently using the following code to right-trim all the std::strings in my programs:
std::string s;
s.erase(s.find_last_not_of(" \n\r\t")+1);
It works fine, but I wonder if there are some end-cases where it might fail? | 0 | [
2,
98,
22,
18,
14,
246,
161,
20,
8971,
354,
43,
45,
45,
11130,
800,
3726,
3726,
31,
22,
79,
871,
568,
14,
249,
1797,
20,
193,
8,
3367,
79,
65,
14,
354,
43,
45,
45,
11130,
18,
19,
51,
1726,
45,
354,
43,
45,
45,
11130,
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 find the running time given algorithm speed and computer speed?
===
I'm currently working through an assignment that deals with Big-O and running times. I have this one question presented to me that seems to be very easy, but I'm not sure if I'm doing it correctly. The rest of the problems have been quite difficult, and I feel like I'm overlooking something here.
First, you have these things:
Algorithm A, which has a running time of 50n^3.
Computer A, which has a speed of 1 millisecond per operation.
Computer B, which has a speed of 2 milliseconds per operation.
An instance of size 300.
I want to find how long it takes algorithm A to solve this instance on computer A, and how long it takes it on computer B.
What I want to do is sub 300 in for n, so you have 50*(300^2) = 4500000.
Then, multiply that by 1 for the first computer, and by 2 for the second computer.
This feels odd to me, though, because it says the "running time" is 50n^3, not, "the number of operations is 50n^3", so I get the feeling that I'm multiplying time by time, and would end up with units of milliseconds squared, which doesn't seem right at all.
I would like to know if I'm right, and if not, what the question actually means. | 0 | [
2,
184,
107,
31,
477,
14,
946,
85,
504,
9083,
1362,
17,
1428,
1362,
60,
800,
3726,
3726,
31,
22,
79,
871,
638,
120,
40,
8427,
30,
10342,
29,
580,
8,
111,
17,
946,
436,
9,
31,
57,
48,
53,
1301,
1831,
20,
55,
30,
2206,
20,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.