unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Open Source: Why not release into Public Domain?
===
I have recently been wondering why so little code is ever released as 'Public Domain'. MIT and BSD licenses are becoming extremely popular and practically only have the restriction of license propagation.
The reasons I can think of so far are:
1. **Credit** - aka Prestige, Street-cred, 'Props', etc. Authors don't want usage of the code restricted, but they also want credit for creating the code. Two problems with this reason.
1. I have seen projects copy/paste the MIT or BSD license without adding the 'Copyright InsertNameHere' thereby making it a tag-along license that doesn't give them credit.
2. I have talked to authors who say they don't care about people giving them credit, they just want people to use their code. Public Domain would make it easier for people to do so.
2. **License Change** - IANAL, but I believe by licensing their code, even with an extremely nonrestrictive license, this means they can change the license on a later revision? This reason is not good for explaining most BSD/MIT licensed code which seems to have no intent of ever becoming more restrictive.
3. **AS IS** - All licenses seem to have the SCREAMING CAPS declaration saying that the software is 'as is' and that the author offers no implied or express warranty. IANAL, but isn't this implied in public domain?
Am I missing some compelling reason? The authors I have talked to about this basically said something along the lines of "BSD/MIT just seems like what you do, no one does public domain". Is this groupthink in action, or is there a compelling anti-public domain argument?
Thanks | 0 | [
2,
368,
1267,
45,
483,
52,
830,
77,
317,
4603,
60,
800,
3726,
3726,
31,
57,
1989,
74,
5712,
483,
86,
265,
1797,
25,
462,
261,
28,
13,
22,
12259,
4603,
22,
9,
6414,
17,
334,
18,
43,
3962,
18,
50,
1535,
3898,
844,
17,
7839,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to protect image on Excel sheet
===
I have an Excel worksheet with an image (logo).
If I right-click on the picture and select Format Picture / Protection, the "Locked" checkbox is checked.
I then protect the worksheet with a password.
Despite all of the above, the end user can still select and delete the image.
Is there any way to prevent this? | 0 | [
2,
184,
20,
2196,
1961,
27,
20700,
6125,
800,
3726,
3726,
31,
57,
40,
20700,
170,
17627,
29,
40,
1961,
13,
5,
5567,
111,
6,
9,
100,
31,
193,
8,
150,
10129,
27,
14,
2151,
17,
5407,
2595,
2151,
13,
118,
2057,
15,
14,
13,
7,
39... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 deal with C++ useless warnings?
===
In Visual Studio, I often use objects only for RAII purposes. For example:
ScopeGuard close_guard = MakeGuard( &close_file, file );
The whole purpose of *close_guard* is to make sure that the file will be close on function exit, it is not used anywhere else. However, Visual Studio gives me a warning that a "*local variable is initialized but not referenced*". I want to turn this warning off for this specific case.
How do you deal with this kind of situation? Visual Studio thinks that this object is useless, but this is wrong since it has a non-trivial destructor.
I wouldn't want to use a *#pragma warning* directive for this since it would turn off this warning even for legitimate reasons. | 0 | [
2,
184,
107,
42,
1183,
29,
272,
20512,
12858,
3590,
18,
60,
800,
3726,
3726,
19,
3458,
1120,
15,
31,
478,
275,
3916,
104,
26,
6623,
49,
4612,
9,
26,
823,
45,
9914,
9499,
543,
1,
9499,
800,
233,
9499,
5,
279,
14330,
1,
16877,
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... |
RequiredFieldValidator - how to get rid of the default red font color
===
I can't seems to change the default color of the required field validator. In the source it is:
<span class="required">*</span>
<asp:RequiredFieldValidator ID="valReq_txtTracks" runat="server"
ControlToValidate="txtTracks"
Display="Dynamic" />
Here's what I have in my .skin file:
<asp:RequiredFieldValidator runat="server"
CssClass="error-text"
ErrorMessage="required" />
In the rendered source I see:
<span class="required">*</span>
<span id="ctl00_ctl00_cphContent_cphContent_valReq_txtTracks" class="error-text" style="color:Red;display:none;">required</span>
Notice the "style=color:Red;". That needs to go. I can't override it with a css-class because it's inline CSS. What should I do?
| 0 | [
2,
1390,
1109,
18506,
43,
3457,
13,
8,
184,
20,
164,
6681,
16,
14,
12838,
402,
9978,
1665,
800,
3726,
3726,
31,
92,
22,
38,
2206,
20,
753,
14,
12838,
1665,
16,
14,
1390,
575,
7394,
3457,
9,
19,
14,
1267,
32,
25,
45,
13,
1,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Loading Flex resources relative to server root as opposed to .swf location
===
I have a large (700kb) Flex .swf file representing the main file of a site.
For performance testing I wanted to try and move it off to Amazon S3 hosting (which i have already done with certain videos and large files).
I went ahead and did that, and updated the html page to reference the remote .swf.
It turns out that Flash will load any resources relative to the .swf file accessing the resource - no matter what the root of the html page is. So my resources are now being loaded from the remote site (where they don't exist).
There are two obvious things I could do :
* copy all my resources remotely (not ready for this since i'm just testing now)
* add in some layer of abstraction to every URL that the .swf accesses to derive a new path.
I really want to flick a switch and say 'load everything relative to [original server]'.
Does such a thing exist or am I stuck loading everythin from the remote machine unless I fully qualify every path?
i want to avoid anything 'hacky' like : subclass Image and hack the path there | 0 | [
2,
12797,
14409,
2566,
4543,
20,
8128,
5900,
28,
3499,
20,
13,
9,
18,
15263,
1474,
800,
3726,
3726,
31,
57,
21,
370,
13,
5,
7915,
18167,
6,
14409,
13,
9,
18,
15263,
3893,
3793,
14,
407,
3893,
16,
21,
689,
9,
26,
956,
4431,
31,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Database Localization - Lookup lists - smarter way
===
I'm looking to add some lookup lists in the database, but I want them to be easy localizable (SQL 2005, ADO.NET)
----------------------------------------
This would include:
- Easy Management of multiple languages at the same time
- Easy Retrieval of values from the database
- Fallback language (in case the selected language is missing)
I was thinking about having a table that would store the multi-language lookup-list (using for different languages the same id) and use a function that would return the value of the look-up list - by receiving the ID and the Language.
One of the pitfalls would be that i have to manually add a language parameter to every query that uses the lookup list.
I'm looking into a solution that would let me send the parameter as a "session/global variable", or that would send the parameter automatically with the sql query, and the function to retrieve it by itself (either to attach the parameter automatically, either to be able to read the parameter).
The solution can look something like this, but I don't mind if it is different, as long as it doesn't give the parameter explicitly to the Query (pseudocode):
> 1. Send the language using "the method"
> 2. Execute Query
> 3. Get the localized results
| 0 | [
2,
6018,
375,
1829,
13,
8,
361,
576,
7227,
13,
8,
3978,
106,
161,
800,
3726,
3726,
31,
22,
79,
699,
20,
3547,
109,
361,
576,
7227,
19,
14,
6018,
15,
47,
31,
259,
105,
20,
44,
2010,
375,
3186,
579,
13,
5,
18,
22402,
812,
15,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
New Facebook app - FBML or iFrame?
===
We're starting a new facebook app (incidentally in Rails), and are faced with the decision to use FBML or to use IFrames. It seems like in the past the consensus generally was that FBML was the better way to go, as it made things more inherently Facebook looking, however it seems now like things on the iFrame side are starting to improve, with one of their main engineers saying we [should use iframes][1]
So I'm wondering what have people found to work best. What benefits and drawbacks have you seen with either the iFrame approach, or the FBML approach.
Thanks Stack Overflowers!
[1]: http://www.ccheever.com/blog/?p=10 | 3 | [
2,
78,
9090,
4865,
13,
8,
13,
13478,
8184,
54,
31,
8361,
60,
800,
3726,
3726,
95,
22,
99,
1422,
21,
78,
9090,
4865,
13,
5,
108,
150,
13384,
1326,
19,
2240,
18,
6,
15,
17,
50,
3110,
29,
14,
1401,
20,
275,
13,
13478,
8184,
54,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can I use LINQ to convert a List<MyObjectType> into a DataSet?
===
I am completely new to LINQ in C#/.NET. I understand that I could use it to convert a DataSet into an Array, am I able to go in the opposite direction?
I'm using NPlot to generate a graph of captured prices, which are stored in a List<PriceInformation>, where PriceInformation is a class containing two public doubles and a DateTime.
Any suggestions very welcome. | 0 | [
2,
92,
31,
275,
6294,
1251,
20,
8406,
21,
968,
1,
915,
23793,
4474,
1,
77,
21,
1054,
3554,
60,
800,
3726,
3726,
31,
589,
1524,
78,
20,
6294,
1251,
19,
272,
5910,
118,
9,
2328,
9,
31,
1369,
30,
31,
110,
275,
32,
20,
8406,
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... |
If events are implemented as delegates in .NET, what is the point of the .event IL section?
===
I've seen some very good questions on Stack Overflow concerning delegates, events, and the .NET implementation of these two features. One question in particular, "[How do C# Events work behind the scenes?][1]", produced a great answer that explains some subtle points very well.
The answer to the above question makes this point:
> When you declare a field-like event
> ... the compiler generates the methods
> and a private field (of the same type
> as the delegate). Within the class,
> when you refer to ElementAddedEvent
> you're referring to the field. Outside
> the class, you're referring to the
> field
An MSDN article linked from the same question ("[Field-like events][2]") adds:
> The notion of raising an event is
> precisely equivalent to invoking the
> delegate represented by the event —
> thus, there are no special language
> constructs for raising events.
Wanting to examine further, I built a test project in order to view the IL that an event and a delegate are compiled to:
public class TestClass
{
public EventHandler handler;
public event EventHandler FooEvent;
public TestClass()
{ }
}
I expected the delegate field `handler` and the event `FooEvent` to compile to roughly the same IL code, with some additional methods to wrap access to the compiler-generated `FooEvent` field. But the IL generated wasn't quite what I expected:
.class public auto ansi beforefieldinit TestClass
extends [mscorlib]System.Object
{
.event [mscorlib]System.EventHandler FooEvent
{
.addon instance void TestClass::add_FooEvent(class [mscorlib]System.EventHandler)
.removeon instance void TestClass::remove_FooEvent(class [mscorlib]System.EventHandler)
}
.method public hidebysig specialname rtspecialname instance void .ctor() cil managed
{
// Constructor IL hidden
}
.field private class [mscorlib]System.EventHandler FooEvent
.field public class [mscorlib]System.EventHandler handler
}
Since events are nothing more than delegates with compiler-generated `add` and `remove` methods, I didn't expect to see events treated as anything more than that in IL. But the add and remove methods are defined in a section that begins `.event`, not `.method` as normal methods are.
My ultimate questions are: if events are implemented simply as delegates with accessor methods, what is the point of having a `.event` IL section? Couldn't they be implemented in IL without this by using `.method` sections? Is `.event` equivalent to `.method`?
[1]: http://stackoverflow.com/questions/213638/how-do-c-events-work-behind-the-scenes#213651
[2]: http://msdn.microsoft.com/en-us/library/aa664455.aspx | 0 | [
2,
100,
963,
50,
6807,
28,
10845,
19,
13,
9,
2328,
15,
98,
25,
14,
454,
16,
14,
13,
9,
4943,
38,
6317,
1050,
60,
800,
3726,
3726,
31,
22,
195,
541,
109,
253,
254,
2346,
27,
7566,
20285,
6477,
10845,
15,
963,
15,
17,
14,
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... |
Curious pop-up behavior when using WebBrowser class
===
My C# application includes an embedded web browser, which is made possible by the [System.Windows.Forms.WebBrowser][1] class. Users are able to navigate to websites using the app, however, when they encounter a page that includes a pop-up window, the pop-up window is opened by Internet Explorer.
Does anyone know how to suppress that behavior?
NOTE: I'm new to C#, so please take that into consideration when responding.
[1]: http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.aspx | 0 | [
2,
7686,
1675,
8,
576,
3257,
76,
568,
10192,
5417,
4104,
718,
800,
3726,
3726,
51,
272,
5910,
3010,
1103,
40,
12138,
2741,
16495,
15,
56,
25,
117,
938,
34,
14,
636,
10724,
9,
27508,
18,
9,
4190,
18,
9,
14113,
25699,
4104,
500,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to do page initialization functions in ASP.NET AJAX?
===
Quick question:
There seem to be a number of weird things one could do if one wanted, for hooking up page-load type events. Here are some specific questions:
1. I know about the auto-hooked-up `pageLoad` function. Are there any others like it?
2. Where do I hook up events like those from, e.g., `Sys.Application.add_init` or `Sys.WebForms.PageRequestManager.getInstance().addPageLoading`?
3. What's the difference between the first two of those and `pageLoad`, if any?
4. Rather importantly, what is the "correct" way to be sure that the ASP.NET AJAX files are all loaded before you start hooking up event handlers, processing the page, etc.? My current approach is to use the auto-hooked-up `pageLoad` to hook up the rest, but this seems kind of hacky.
Thanks! | 0 | [
2,
184,
20,
107,
2478,
2104,
1829,
3719,
19,
28,
306,
9,
2328,
20624,
60,
800,
3726,
3726,
2231,
1301,
45,
80,
2260,
20,
44,
21,
234,
16,
5455,
564,
53,
110,
107,
100,
53,
417,
15,
26,
5559,
68,
71,
2478,
8,
8294,
1001,
963,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Multipart forms from C# client
===
I am trying to fill a form in a php application from a C# client (Outlook addin). I used Fiddler to see the original request from within the php application and the form is transmitted as a multipart/form. Unfortunately .Net does not come with native support for this type of forms (WebClient has only a method for uploading a file).
Does anybody know a library or has some code to achieve this? I want to post different values and additionally (but only sometimes) a file.
Thanks for your help,
Sebastian | 0 | [
2,
1889,
3091,
1997,
37,
272,
5910,
6819,
800,
3726,
3726,
31,
589,
749,
20,
3509,
21,
505,
19,
21,
13,
26120,
3010,
37,
21,
272,
5910,
6819,
13,
5,
1320,
5810,
3547,
108,
6,
9,
31,
147,
12759,
139,
20,
196,
14,
501,
3772,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why doesn't this JOIN work?
===
I want to get a list of columns that includes the parameters to IDENTITY, when applicable. This query _should_ do it, but it only returns the first column.
SELECT c.name, i.seed_value, i.increment_value
FROM sys.columns c
LEFT OUTER JOIN sys.identity_columns i
ON i.object_id = c.object_id
AND i.column_id = c.column_id
Another way to put it is, if I write this as an INNER join, no rows are returned. Since the identity_columns view is derived from the columns view, this doesn't seem right. | 0 | [
2,
483,
1437,
22,
38,
48,
1865,
170,
60,
800,
3726,
3726,
31,
259,
20,
164,
21,
968,
16,
7498,
30,
1103,
14,
12905,
20,
3270,
15,
76,
14535,
9,
48,
25597,
13,
1,
14941,
1,
107,
32,
15,
47,
32,
104,
4815,
14,
64,
4698,
9,
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 does "The DBMS returned an unspecified error. The command code was 193." mean?
===
Anyone have an idea of what this means for MS SQL Server? I'm also calling this from Coldfusion, although I'm guessing that doesn't make any difference. | 0 | [
2,
98,
630,
13,
7,
124,
13,
43,
13178,
18,
587,
40,
27005,
7019,
9,
14,
1202,
1797,
23,
13,
21879,
9,
7,
884,
60,
800,
3726,
3726,
1276,
57,
40,
882,
16,
98,
48,
1108,
26,
4235,
4444,
255,
8128,
60,
31,
22,
79,
67,
2555,
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... |
How to outline a UIElement in Partial-Trust?
===
I asked a [similar question][1] about this previously, but I did not specify that this needs to work in Partial-Trust mode. Unfortunately both correct answers (using UIElement.BitmapEffect or UIElement.Effect) are not allowed in Partial-Trust, because it requires UIPermissionWindow.AllWindows.
Does anyone know of a way to do something similar to the [OuterGlowBitmapEffect][2] in a Partial-Trust app?
[1]: http://stackoverflow.com/questions/188844/how-can-i-highlightoutline-a-visual-object-in-wpf
[2]: http://msdn.microsoft.com/en-us/library/system.windows.media.effects.outerglowbitmapeffect.aspx | 0 | [
2,
184,
20,
11160,
21,
13,
5661,
27567,
19,
7284,
8,
11592,
60,
800,
3726,
3726,
31,
411,
21,
636,
19107,
1301,
500,
2558,
165,
500,
88,
48,
1343,
15,
47,
31,
144,
52,
19077,
30,
48,
2274,
20,
170,
19,
7284,
8,
11592,
3740,
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... |
Class-member access-modifiers
===
I want a method of the class: "`One`" ("`AccessibleWithinSameNamespace`") to be accessible by the class: "`Two`", without having "`Two`" extending "`One`".
Both classes are in the same namespace, so I'm thinking that maybe there's an access-modifier that emulates the "*protected*" modifyer, but for namespaces.
Some code:
namespace Test
{
class One
{
public void AccessibleToAll()
{
}
protected void AccessibleWithinSameNamespace()
{
// This method is not public
// I can be accessed from other classes
// within the same namespace of my class
}
}
}
namespace Test
{
class Two
{
public Two()
{
One one = new One();
// I am able to access this method because my class
// is in the same namespace as the class: "One"
one.AccessibleWithinSameNamespace();
}
}
} | 0 | [
2,
718,
8,
6990,
1381,
8,
13670,
16292,
18,
800,
3726,
3726,
31,
259,
21,
2109,
16,
14,
718,
45,
13,
7,
1,
849,
1,
7,
13,
5,
7,
1,
20604,
3426,
1410,
108,
18,
8357,
7259,
5582,
1,
7,
6,
20,
44,
7342,
34,
14,
718,
45,
13,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Permissions problems with Excel Services in SharePoint
===
I'm trying to implement an Excel Services reporting solution in SharePoint (MOSS). Since the source data is a SharePoint list, this problem is doubly frustrating. I keep bumping up against permissions problems, even though I've enabled virtually everything in sight.
The first error is about refreshing external data - it's not (really) external data, but that's a semantic point.
The second error is a cryptic "Excel Web Access" problem.
Anyone get this to work?? | 0 | [
2,
5572,
18,
1716,
29,
20700,
687,
19,
1891,
3132,
800,
3726,
3726,
31,
22,
79,
749,
20,
8713,
40,
20700,
687,
6670,
4295,
19,
1891,
3132,
13,
5,
7076,
18,
6,
9,
179,
14,
1267,
1054,
25,
21,
1891,
3132,
968,
15,
48,
1448,
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... |
Client notification, should I use an AJAX Push or Poll?
===
I am working on a simple notification service that will be used to deliver messages to the users surfing a website. The notifications do not have to be sent in real time but it might be a better user experience if they happened more frequently than say every 5 minutes. The data being sent to and from the client is not very large and it is a straight forward database query to retrieve the data.
In reading other conversations on the topic it would appear that an AJAX push can result in higher server loads. Since I can tolerate longer server delays is it worth while to have the server push notifications or to simply poll.
It is not much harder to implement the push scenario and so I thought I would see what the opinion was here.
Thanks for your help. | 0 | [
2,
6819,
52,
4634,
15,
378,
31,
275,
40,
20624,
3250,
54,
4994,
60,
800,
3726,
3726,
31,
589,
638,
27,
21,
1935,
52,
4634,
365,
30,
129,
44,
147,
20,
5879,
7561,
20,
14,
3878,
22449,
21,
2271,
9,
14,
52,
4634,
18,
107,
52,
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... |
WordPress: I got rid of the second "home" page, but it's not good enough
===
I have a WordPress site (2.6.2) in which the Home page is set to a static page. The ID of this page is 2, so in the WordPress template I have changed the `wp_list_pages` to look like this:
<?php wp_list_pages('exclude=2&title_li=&depth=1' ); ?>
this works fine, but now the Home page doesn't get "lit up" when it's selected (because in fact it's page_id 2 that is selected, and it doesn't show in the menu). Is there any easy way around this?
If not, in broad outlines, what's the hard way around this? Make my own version of the `wp_list_pages` function?
Thanks! | 0 | [
2,
833,
5890,
45,
31,
330,
6681,
16,
14,
153,
13,
7,
8167,
7,
2478,
15,
47,
32,
22,
18,
52,
254,
511,
800,
3726,
3726,
31,
57,
21,
833,
5890,
689,
13,
5,
135,
9,
379,
9,
135,
6,
19,
56,
14,
213,
2478,
25,
309,
20,
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... |
Graph rendering using 3D acceleration
===
We generate graphs for huge datasets. We are talking 4096 samples per second, and 10 minutes per graph. A simple calculation makes for 4096 * 60 * 10 = 2457600 samples per linegraph. Each sample is a double (8 bytes) precision FP. Furthermore, we render multiple linegraphs on one screen, up to about a hundred. This makes we render about 25M samples in a single screen. Using common sense and simple tricks, we can get this code performant using the CPU drawing this on a 2D canvas. Performant, that is the render times fall below one minute. As this is scientific data, we cannot omit any samples. Seriously, this is not an option. Do not even start thinking about it.
Naturally, we want to improve render times using all techniques available. Multicore, pre-rendering, caching are all quite interesting but do not cut it. We want 30FPS rendering with these datasets at minimum, 60FPS preferred. We now this is an ambitious goal.
A natural way to offload graphics rendering is using the GPU of the system. GPU's are made to work with huge datasets and process them parrallel. Some simple HelloWorld tests showed us a difference of day and night in rendering speed, using the GPU.
Now the problem is: GPU API's such as OpenGL, DirectX and XNA are made for 3D scenes in mind. Thus, using them to render 2D linegraphs is possible, but not ideal. In the proof of concepts we developed, we encountered that we need to transform the 2D world into a 3D world. Suddnely we have to work with and XYZ coordinate system with polygons, vertices and more of the goodness. That is far from ideal from a development perspective. Code gets unreadable, maintenance is a nightmare, and more issues boil up.
What would your suggestion or idea be to to this in 3D? Is the only way to do this to actually convert the two systems (2D coordinates versus 3D coordinates & entities)? Or is there a sleeker way to achieve this? | 0 | [
2,
7210,
15307,
568,
203,
43,
17661,
800,
3726,
3726,
95,
7920,
7210,
18,
26,
2329,
1054,
3554,
18,
9,
95,
50,
1582,
1417,
4060,
7855,
416,
153,
15,
17,
332,
902,
416,
7210,
9,
21,
1935,
19644,
1364,
26,
1417,
4060,
1637,
2083,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Internet Explorer Toolbar Tab Key
===
I've written a IE Toolbar in C# and everything is working fine except that when I open a child Windows Form from my toolbar, the tab key doesn't work on the child form to allow me to move from field to field.
The interesting part is that when I open my child form using form.showDialog() instead of form.show() the tabs work like normal.
The toolbar I've created is based on this [article][1] and this [article][2]
I've implemented TranslateAcceleratorIO as mentioned in several articles, but still no luck.
Has anybody else run into this issue?
[1]: http://lamp.codeproject.com/KB/shell/dotnetbandobjects.aspx?fid=3788&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2766883&fr=301#xx0xx
[2]: https://secure.codeproject.com/KB/cs/Issuewithbandobjects.aspx | 0 | [
2,
2620,
8520,
5607,
1850,
6523,
1246,
800,
3726,
3726,
31,
22,
195,
642,
21,
13,
660,
5607,
1850,
19,
272,
5910,
17,
796,
25,
638,
1123,
1613,
30,
76,
31,
368,
21,
850,
1936,
505,
37,
51,
5607,
1850,
15,
14,
6523,
1246,
1437,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Check username and password of Windows account
===
I have an installation package that installs a service process that I create. I'd like to prompt the user for the username/password of the account that the service process should run under. I'd like to verify the the username/password combination are valid before continuing with the installation. I have a C DLL that I am using for special installation behavior, but I can't figure out how to use the Windows API to verify an account's credentials. I'd like to be able to support the same account name syntax used by the service control manager. | 0 | [
2,
2631,
4155,
7259,
17,
20884,
16,
1936,
2176,
800,
3726,
3726,
31,
57,
40,
7758,
6030,
30,
16146,
18,
21,
365,
953,
30,
31,
1600,
9,
31,
22,
43,
101,
20,
11443,
4417,
14,
4155,
26,
14,
4155,
7259,
118,
6201,
9587,
16,
14,
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... |
Java array reflection: isArray vs. instanceof
===
Is there a preference or behavior difference between using:
if(obj.getClass().isArray()) {}
and
if(obj instanceof Object[]) {}
? | 0 | [
2,
8247,
7718,
9138,
45,
25,
8576,
93,
4611,
9,
4851,
1041,
800,
3726,
3726,
25,
80,
21,
9808,
54,
3257,
2841,
128,
568,
45,
100,
5,
111,
11741,
9,
3060,
1898,
5,
6,
9,
403,
8576,
93,
5,
6,
6,
13,
1,
17,
100,
5,
111,
11741... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
What is the best way to implement a property that is readonly to the public, but writable to inheritors?
===
If I have a property that I want to let inheritors write to, but keep readonly externally, what is the preferred way to implement this? I usually go with something like this:
private object m_myProp;
public object MyProp
{
get { return m_myProp; }
}
protected void SetMyProp(object value)
{
m_myProp = value;
}
Is there a better way? | 0 | [
2,
98,
25,
14,
246,
161,
20,
8713,
21,
1354,
30,
25,
1302,
4965,
20,
14,
317,
15,
47,
20127,
579,
20,
17569,
248,
18,
60,
800,
3726,
3726,
100,
31,
57,
21,
1354,
30,
31,
259,
20,
408,
17569,
248,
18,
2757,
20,
15,
47,
643,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Does a Poco to DataSet project exist?
===
I have a POCO object that goes 4 levels deep contained objects (like Invoice has line items that have taxes that have gl entries), and I want to turn the entire thing into a DataSet. So there would be 4 tables, each with constraints being applied to the parent table.
Does anyone know of something that would automated this? | 0 | [
2,
630,
21,
2353,
716,
20,
1054,
3554,
669,
3182,
60,
800,
3726,
3726,
31,
57,
21,
2353,
716,
3095,
30,
1852,
268,
2216,
855,
3437,
3916,
13,
5,
1403,
19,
13379,
63,
293,
3755,
30,
57,
7447,
30,
57,
13,
8430,
11399,
6,
15,
17,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What use are const pointers (as opposed to pointers to const objects)?
===
I've often used pointers to const objects, like so...
const int *p;
That simply means that you can't change the integer that `p` is pointing at through `p`. But I've also seen reference to const pointers, declared like this...
int* const p;
As I understand it, that means that the pointer variable *itself* is constant -- you can change the integer it points at all day long, but you can't make it point at something else.
What possible use would that have? | 0 | [
2,
98,
275,
50,
11608,
38,
454,
445,
13,
5,
472,
3499,
20,
454,
445,
20,
11608,
38,
3916,
6,
60,
800,
3726,
3726,
31,
22,
195,
478,
147,
454,
445,
20,
11608,
38,
3916,
15,
101,
86,
9,
9,
9,
11608,
38,
19,
38,
1637,
306,
73... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What functionality should always be third-party?
===
What prompts my question is [this post from Jeff Atwood][1], and [this post][2] from Dare Obasanjo. It seems to me that there might be at least a few areas where third-party functionality is a better idea than custom code.
For example, should logging always be third-party? How about encryption? Or search?
I'm looking forward to everyone's feedback on this.
[1]: http://www.codinghorror.com/blog/archives/001172.html
[2]: http://www.25hoursaday.com/weblog/2008/08/31/DevelopersUsingLibrariesIsNotASignOfWeakness.aspx | 0 | [
2,
98,
18548,
378,
550,
44,
422,
8,
9635,
60,
800,
3726,
3726,
98,
11443,
13531,
51,
1301,
25,
636,
1565,
678,
37,
3292,
35,
1208,
500,
2558,
165,
500,
15,
17,
636,
1565,
678,
500,
2558,
135,
500,
37,
7024,
13,
10595,
2729,
1636... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PHP - Sessions - Security
===
How secure are php Sessions? I am planning to use the native PHP sessions to authenticate users. Can users modify session data like they can $_POST and $_GET data? | 0 | [
2,
13,
26120,
13,
8,
5763,
13,
8,
1221,
800,
3726,
3726,
184,
4315,
50,
13,
26120,
5763,
60,
31,
589,
2334,
20,
275,
14,
1275,
13,
26120,
5763,
20,
14351,
1373,
3878,
9,
92,
3878,
17579,
3723,
1054,
101,
59,
92,
5579,
1,
6962,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Getting a BlockClosure in Squeak
===
How do I get a BlockClosure in Squeak (I want to use BlockClosure>>callCC)?
When I write [#foo] that is a BlockContext, what's the deal? | 0 | [
2,
1017,
21,
1921,
13023,
5838,
19,
16604,
800,
3726,
3726,
184,
107,
31,
164,
21,
1921,
13023,
5838,
19,
16604,
13,
5,
49,
259,
20,
275,
1921,
13023,
5838,
1,
9200,
3384,
6,
60,
76,
31,
2757,
636,
5910,
4120,
111,
500,
30,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... |
How can I implement a "natural" sort?
===
e.g,
foo1
foo2
foo10
foo100
rather than
foo1
foo10
foo100
foo2
| 0 | [
2,
184,
92,
31,
8713,
21,
13,
7,
17232,
7,
2058,
60,
800,
3726,
3726,
13,
62,
9,
263,
15,
4310,
111,
165,
4310,
111,
135,
4310,
111,
1036,
4310,
111,
4031,
864,
119,
4310,
111,
165,
4310,
111,
1036,
4310,
111,
4031,
4310,
111,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How much sustained data should a dedicated server be able to serve?
===
We have a decicated godaddy server and it seemed to grind to a halt when we had users downloading only 3MB every 2 seconds (this was over about 20 http requests).
I want to look into database locking etc. to see if that is a problem - but first I'm curious as to what a dedicated server ought to be able to serve. | 0 | [
2,
184,
212,
8832,
1054,
378,
21,
2360,
8128,
44,
777,
20,
1884,
60,
800,
3726,
3726,
95,
57,
21,
121,
9946,
1669,
162,
25078,
8128,
17,
32,
890,
20,
16913,
20,
21,
7278,
76,
95,
41,
3878,
7121,
68,
104,
203,
5024,
352,
172,
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... |
Where do you put program scope variables in UI driven application?
===
Ok, so I know that global variables are considered bad, and the singleton pattern is overused. And I have read in many places that a class should do only one task and contain only those variables that allow it to accomplish that one task. However, while working on my latest project, I actually thought about these rules before writing any code and have noticed that I tend to break them at the very beginning of the program.
I'm currently working on an MFC dialog based application, but this question could be applied to any UI driven application. I have separate classes that handle state machines, file reading/writing, and hardware interfacing. All of these objects will need some type of UI control or property display/editing. I've usually just put the objects in the main dialog class for the application and had the dialog class serve double duty; as both the main UI and the home for all other objects in the application. In other applications, I've created these objects globally and referenced them from wherever they were needed. Neither of these ways seem correct. The first option breaks the one class, one task rule, and the second relies on globals.
I'm just wondering what others do to organize their programs without breaking the rules? | 0 | [
2,
113,
107,
42,
442,
625,
9914,
12157,
19,
13,
5661,
5355,
3010,
60,
800,
3726,
3726,
5854,
15,
86,
31,
143,
30,
2062,
12157,
50,
724,
896,
15,
17,
14,
345,
444,
3732,
25,
84,
8795,
9,
17,
31,
57,
1302,
19,
151,
1489,
30,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to handle checkboxes in ASP.NET MVC forms?
===
This seems a bit bizarre to me, but as far as I can tell, this is how you do it.
I have a collection of objects, and I want users to select one or more of them. This says to me "form with checkboxes." My objects don't have any concept of "selected" (they're rudimentary POCO's formed by deserializing a wcf call). So, I do the following:
public class SampleObject{
public Guid Id {get;set;}
public string Name {get;set;}
}
In the view:
<%
using (Html.BeginForm())
{
%>
<%foreach (var o in ViewData.Model) {%>
<%=Html.CheckBox(o.Id)%> <%= o.Name %>
<%}%>
<input type="submit" value="Submit" />
<%}%>
And, in the controller, this is the only way I can see to figure out what objects the user checked:
public ActionResult ThisLooksWeird(FormCollection result)
{
var winnars = from x in result.AllKeys
where result[x] != "false"
select x;
// yadda
}
Its freaky in the first place, and secondly, for those items the user checked, the FormCollection lists its value as "true false" rather than just true.
Obviously, I'm missing something. I think this is built with the idea in mind that the objects in the collection that are acted upon within the html form are updated using `UpdateModel()` or through a ModelBinder.
But my objects aren't set up for this; does that mean that this is the only way? Is there another way to do it? | 0 | [
2,
184,
20,
3053,
2631,
5309,
160,
19,
28,
306,
9,
2328,
307,
8990,
1997,
60,
800,
3726,
3726,
48,
2206,
21,
1142,
15701,
20,
55,
15,
47,
28,
463,
28,
31,
92,
494,
15,
48,
25,
184,
42,
107,
32,
9,
31,
57,
21,
1206,
16,
391... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 configure log4net so that log.IsDebugEnabled is true?
===
I am trying to use log4net in an APS.NET application with Visual Studio 2005. I have declared an instance of the logger like so:
Private Shared ReadOnly log As ILog = LogManager.GetLogger("")
I am trying to use it in the following manner:
If log.IsDebugEnabled Then
log.Debug("Integration Services Constructed")
End If
Here is my configuration:
<log4net>
<root>
<level value="DEBUG" />
<appender-ref ref="RollingFileAppender" />
</root>
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="..\\logs\\logfile.log"/>
<appendToFile value="true"/>
<rollingStyle value="Size"/>
<maxSizeRollBackups value="10"/>
<maximumFileSize value="1MB"/>
<staticLogFileName value="true"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="DEBUG" />
<param name="LevelMax" value="FATAL" />
</filter>
</appender>
</log4net>
Unfortunately, log.IsDebugEnabled is always false. How do I configure log4net so that I can log only debug messages? | 0 | [
2,
184,
107,
31,
1065,
15951,
6738,
300,
2328,
86,
30,
6738,
9,
403,
546,
2345,
1863,
579,
43,
25,
1151,
60,
800,
3726,
3726,
31,
589,
749,
20,
275,
6738,
300,
2328,
19,
40,
21,
1919,
9,
2328,
3010,
29,
3458,
1120,
812,
9,
31,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I make FlexBuilder recognize my MXML files as applications instead of components?
===
I am attempting to import mxml files that I developed with Emacs into a new project in FlexBuilder...I have created a project and manually added all my MXML and actionscript files into FlexBuilder.
I now can't figure out how to run the application. I believe the problem lies in the fact that FlexBuilder believes that all my mxml files are components, when in fact, they are applications...Is there a way to change this?
When I right click on the file the "set as default application" and "run application" is disabled...
Thanks. | 0 | [
2,
184,
107,
31,
233,
14409,
20904,
5844,
51,
307,
396,
8184,
6488,
28,
3767,
700,
16,
5090,
60,
800,
3726,
3726,
31,
589,
6314,
20,
9010,
307,
396,
8184,
6488,
30,
31,
885,
29,
13,
62,
6893,
18,
77,
21,
78,
669,
19,
14409,
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 the get as much as possible from dbx
===
I do TDD on a daily basis for my C++ development on Solaris10. It has greatly reduced the time I have to spend using my debugger but sometime this is the only option.
DBX is pretty powerful but not that user friendly. Note that I'm talking about console DBX not the SunStudio GUI for DBX).
What are the best productivity tips you can give for dbx C++ debugging?
PS. Changing debugger is not an option. | 0 | [
2,
184,
14,
164,
28,
212,
28,
938,
37,
13,
9007,
396,
800,
3726,
3726,
31,
107,
15596,
43,
27,
21,
1954,
2239,
26,
51,
272,
20512,
522,
27,
4535,
403,
1036,
9,
32,
63,
5629,
2736,
14,
85,
31,
57,
20,
3256,
568,
51,
121,
2345... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Which sort algorithm works best on mostly sorted data?
===
Which sort algorithm works best on mostly sorted data? | 0 | [
2,
56,
2058,
9083,
693,
246,
27,
1555,
22554,
1054,
60,
800,
3726,
3726,
56,
2058,
9083,
693,
246,
27,
1555,
22554,
1054,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Parsing A Data Feed
===
I'm not the best at PHP and would be extremely grateful if somebody could help. Basically I need to parse each line of a datafeed and just get each bit of information between each "|" - then I can add it to a database. I think I can handle getting the information from between the "|"'s by using explode but I need a bit of help with parsing each line from a text file as a singular. Infact to make it even more simple, I just need it to use each line of a variable, I will submit content to the variable using a textarea and a form. Any help would be greatly appreciated! | 0 | [
2,
2017,
18,
68,
21,
1054,
4063,
800,
3726,
3726,
31,
22,
79,
52,
14,
246,
35,
13,
26120,
17,
83,
44,
3898,
8083,
100,
8861,
110,
448,
9,
11374,
31,
376,
20,
2017,
870,
206,
293,
16,
21,
1054,
20954,
17,
114,
164,
206,
1142,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Deploying to Amazon EC2
===
Has anyone got much experience deploying applications to Amazons EC2? I am considering doing this in future and wonder about peoples experiences compared to shared hosting and dedicated server hosting are. | 0 | [
2,
17617,
68,
20,
8059,
6695,
135,
800,
3726,
3726,
63,
1276,
330,
212,
1496,
17617,
68,
3767,
20,
8059,
18,
6695,
135,
60,
31,
589,
5154,
845,
48,
19,
1022,
17,
2666,
88,
148,
18,
5513,
2428,
20,
2592,
10637,
17,
2360,
8128,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
MSBuild -- Use the .csproj file or roll your own?
===
OK, so I readily concede that I'm a newbie when it comes to continuous integration.
That being said, I'm trying to set up a CC.NET environment to educate myself, but I'm having trouble finding the information I need to get the automated build portion set up.
I first tried using nAnt since it has been around longer and has better documentation, but I quickly ran into issues that seem to require installing Visual Studio on the server. Perhaps I wasn't looking hard enough for a way around that issue, but I decided to opt instead for MSBuild.
As I understand it, in C# the .csproj file produced by VS 2005 and forward *is* a valid MSBuild file. To wit, I've been able to integrate the MSBuild task into CC.NET using the .csproj file, but I have a few issues with this:
1. There's a lot going on in here that I'm not sure I really need.
2. I didn't create this file. I do not understand it, and that scares me.
3. Most of what is going on seems to be abstracted through <code>$(MSBuildToolsPath)\Microsoft.CSharp.targets</code>
4. As a result of 1, 2, and 3, modifying the file to include something like MbUnit seems convoluted and more difficult than it needs to be. My only real option is to include it in the <code>AfterBuild</code> section, which seems kind of like a hack to me.
So, a few questions for the CC.NET folks, the MSBuild folks, the MbUnit folks, and possible the nAnt folks.
1. Am I wasting my time with MSBuild? I know it's new, but finding good documentation on the web is proving difficult (actually, Microsoft seems to document it very well, but most of that is technical documentation. What I really want is a good example file, so I can see what an actual project looks like).
2. When using MSBuild, is it advisable to use the VS-generated .csproj file as the build file? Or should I create my own?
3. If I did use nAnt, is it required that VS must be installed on the server?
4. Lastly, should MbUnit tests be part of the MSBuild file or the CC.NET file? My research seems to suggest that they belong in the MSBuild file. If that is the case, do I create the MSBuild file and check that in to CVS in addition to the .csproj file? Or does the MbUnit task become part of my .csproj file?
I know there's a lot there, but most of what I've been able to find online assumes a certain level of familiarity with these topics that I just don't have -- unless I'm mistaken, the learning curve for this stuff isn't a curve at all, it's a step function. :) | 0 | [
2,
4235,
29361,
13,
8,
8,
275,
14,
13,
9,
6824,
2740,
728,
3893,
54,
3001,
154,
258,
60,
800,
3726,
3726,
5854,
15,
86,
31,
13563,
29449,
30,
31,
22,
79,
21,
78,
5893,
76,
32,
1624,
20,
6357,
8078,
9,
30,
142,
87,
15,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best model for taking user authentication off-line?
===
I am building authentication into a client-server application, and some of the feedback I've received is that I should leave the hash calculation to the server (it was initially implemented to have the client receive the hash, calculate a hash from the client's entered password, and compare them). That seems to make sense, but I am left with a problem -- **how can I authenticate users that are off-line**?
For example, if I deployed to a mobile device without internet access, what is the most secure way to handle authentication?
The way I see it, I will have to **either allow the client to receive the hash + any salt information**, OR **use a separate pin/password** and allow the client to receive the hash+salt for *that* password.
I would favor the latter because it seems to limit the attack vector -- if a mobile device is compromised, then the security of the whole system (e.g. all the network-authenticated pieces) stays intact.
What are my best options and considerations? | 0 | [
2,
98,
25,
14,
246,
1061,
26,
741,
4155,
27963,
168,
8,
1143,
60,
800,
3726,
3726,
31,
589,
353,
27963,
77,
21,
6819,
8,
10321,
106,
3010,
15,
17,
109,
16,
14,
13111,
31,
22,
195,
420,
25,
30,
31,
378,
767,
14,
19170,
19644,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Whats the best method to maintain or measure how well sorted a collection is so we can choose best sort algorithm?
===
Inspired by [this question][1]
The choice of which algorithm to use to sort a collection can be made better if we know ahead of time how well sorted a collection is. Is there a way we can measure (or maintain a measurement) of how well sorted the collection is? Can we do this in such a way that the cost of maintaining or measuring how well sorted something doesn't outweigh the benefit of choosing the best sort algorithm?
[1]: http://stackoverflow.com/questions/220044/which-sort-algorithm-works-best-on-mostly-sorted-data | 0 | [
2,
98,
18,
14,
246,
2109,
20,
4027,
54,
4058,
184,
134,
22554,
21,
1206,
25,
86,
95,
92,
3538,
246,
2058,
9083,
60,
800,
3726,
3726,
3054,
34,
636,
1565,
1301,
500,
2558,
165,
500,
14,
1837,
16,
56,
9083,
20,
275,
20,
2058,
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... |
Read/Write 'Extended' file properties (C#)
===
I'm trying to find out how to read/write to the extended file properties in C#
e.g. Comment, Bit Rate, Date Accessed, Category etc that you can see in Windows explorer.
Any ideas how to do this? | 0 | [
2,
1302,
118,
23716,
13,
22,
25138,
22,
3893,
3704,
13,
5,
150,
5910,
6,
800,
3726,
3726,
31,
22,
79,
749,
20,
477,
70,
184,
20,
1302,
118,
23716,
20,
14,
1984,
3893,
3704,
19,
272,
5910,
13,
62,
9,
263,
9,
6484,
15,
1142,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do i enable double-buffering of a control using C# (Window forms)?
===
How do i enable double-buffering of a control using C# (Window forms)?
I have a panelcontrol which i am drawing stuff into and also an owner drawn tabcontrol. Both suffer from flicker, so how to enable double-buffering? | 0 | [
2,
184,
107,
31,
9240,
1494,
8,
2345,
6866,
68,
16,
21,
569,
568,
272,
5910,
13,
5,
27508,
1997,
6,
60,
800,
3726,
3726,
184,
107,
31,
9240,
1494,
8,
2345,
6866,
68,
16,
21,
569,
568,
272,
5910,
13,
5,
27508,
1997,
6,
60,
31... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
A good Java library for network math
===
I'm looking for a Java library that is geared towards network math and already tested. Nothing particularly fancy, just something to hold ips and subnets, and do things like print a subnet mask or calculate whether an IP is within a given subnet.
Should I roll my own, or is there already a robust library for this?
| 0 | [
2,
21,
254,
8247,
1248,
26,
982,
5057,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
8247,
1248,
30,
25,
4256,
69,
1016,
982,
5057,
17,
614,
7631,
9,
626,
1653,
12251,
15,
114,
301,
20,
1027,
31,
1919,
17,
972,
2328,
18,
15,
17,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a faster alternative to Google Analytics?
===
I like to keep my websites extremely light and fast, but of course I need some kind of user tracking and analytics.
It seems like Google Analytics always takes significant enough processing time that I'd like to replace it with something faster (and/or hosted locally), perhaps having less features.
I really only care about these metrics: browser, OS, referrer, and # hits per page on a given day or week.
Does anyone have any good suggestions, or is Google Analytics really the best option? | 0 | [
2,
25,
80,
21,
4233,
2676,
20,
8144,
26320,
60,
800,
3726,
3726,
31,
101,
20,
643,
51,
13931,
3898,
471,
17,
1512,
15,
47,
16,
674,
31,
376,
109,
825,
16,
4155,
10353,
17,
26320,
9,
32,
2206,
101,
8144,
26320,
550,
1384,
1505,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
IE7 fails after reload of Orbited powered page
===
I am working on an [Orbited][1]-powered website and I'm experiencing some annoying behavior with IE7. Everything works fine and dandy in FF3, but in IE7, I get a recurring error if I reload the page:
Error: Can't execute code from a freed script
In other words, the site works in IE7 when you first browse to it, but breaks after a reload. I am running Orbited 0.7.0 and have followed [this tutorial][2] over at CometDaily. My code is identical to the tutorial code with the following exceptions:
1. I am not running the site on localhost, using a server with a real domain instead. All links are of course updated accordingly.
2. Static files(index.html) are served on port 80 by Django/Lighttpd rather than being served by Orbited deamon. Orbited is running on port 8000.
Now for the weird part. This problem does not occur if I am running on localhost.
I know Orbited.js creates one or two iframes to communicate with the Orbited deamon. I am guessing herein lies the problem somehow, but my knowledge in this area is limited.
So can anyone understand what is happening to my app? For the record, I have read about placing script tags after meta tags to avoid this problem. Sadly enough, it does not solve my problem. There aren't even any meta tags in the tutorial code, so I added one just to be sure.
BR // Fredrik
[1]: http://orbited.org
[2]: http://cometdaily.com/2008/10/10/scalable-real-time-web-architecture-part-2-a-live-graph-with-orbited-morbidq-and-jsio/ | 0 | [
2,
13,
660,
465,
13614,
75,
27339,
16,
5966,
69,
7462,
2478,
800,
3726,
3726,
31,
589,
638,
27,
40,
636,
248,
3326,
69,
500,
2558,
165,
500,
8,
9844,
2271,
17,
31,
22,
79,
15138,
109,
17610,
3257,
29,
13,
660,
465,
9,
796,
693... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 agnostic jdbc table import/export to files?
===
Is it at all possible to do database-agnostic table dumps/hydrates? I don't have any complicated constraints. I would also settle for db-specific ways, but the more pure jdbc it is the better (I don't want to resort to impdp/expdp). | 0 | [
2,
6018,
21,
21944,
487,
43,
7229,
859,
9010,
118,
1706,
1993,
20,
6488,
60,
800,
3726,
3726,
25,
32,
35,
65,
938,
20,
107,
6018,
8,
58,
21944,
859,
11424,
18,
118,
23673,
18,
60,
31,
221,
22,
38,
57,
186,
8343,
16747,
9,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I detected whether a hard drive is connected via USB?
===
I'm writing a little backup program for friends and family and want it to be as simple to use a possible. I don't want to have to ask the user where to backup their data to, I just want to search for and use the first USB hard drive connected to the computer. Obtaining the unique ID of the hard drive would probably be a good idea too, just as a double check for next time the backup runs. | 0 | [
2,
184,
107,
31,
11968,
1472,
21,
552,
1493,
25,
2587,
1197,
182,
220,
60,
800,
3726,
3726,
31,
22,
79,
1174,
21,
265,
10119,
625,
26,
954,
17,
190,
17,
259,
32,
20,
44,
28,
1935,
20,
275,
21,
938,
9,
31,
221,
22,
38,
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... |
Can I place named_scopes on collections of objects?
===
Let's say I have the following code:
@sites = Site.find(session[:sites]) # will be an array of Site ids
@languages = Language.for_sites(@sites)
for_sites is a named_scope in the Language model that returns the languages associated with those sites, and languages are associated with sites using has_many through.
Instead of the second line I'd like to say
@sites.languages
and have the same list returned to me. Is there any way to do that cleanly in Rails 2.1 (or edge)? I know associations and named scopes can be extended to have attributes, but unless I'm missing something that doesn't apply here. Any plugins that do this would be welcome, it doesn't have to be in core.
| 0 | [
2,
92,
31,
209,
377,
1,
11555,
18,
27,
5721,
16,
3916,
60,
800,
3726,
3726,
408,
22,
18,
395,
31,
57,
14,
249,
1797,
45,
13,
1,
18,
6359,
800,
689,
9,
19811,
5,
7202,
5991,
2558,
45,
18,
6359,
500,
6,
6926,
129,
44,
40,
77... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Java Instansiation.
===
1. **When an object is instantiated in Java, what is really going into memory?**
2. Are copies of parent constructors included?
3. Why do hidden data members behave differently than overridden methods when casting?
I understand the abstract explanations that are typically given to get you use this stuff correctly, but how does the JVM really do it.
| 0 | [
2,
8247,
19,
6114,
18,
49,
857,
9,
800,
3726,
3726,
137,
9,
13,
1409,
3185,
40,
3095,
25,
6322,
49,
1669,
19,
8247,
15,
98,
25,
510,
228,
77,
1912,
60,
1409,
172,
9,
50,
3298,
16,
4766,
6960,
248,
18,
506,
60,
203,
9,
483,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Managing file uploads in JSP/Servlets
===
Once again a very beginner-ish question, but here I go:
I would like to use a servlet or similar to copy an uploaded file (from an html file select) to a permanent location. This is all I need to do with the file. I am currently going with using the Apache Commons FileUpload and IO libraries. Is there no easier or more elegant solution? | 0 | [
2,
5616,
3893,
71,
8294,
18,
19,
487,
3401,
118,
10321,
11045,
800,
3726,
3726,
382,
188,
21,
253,
26931,
8,
1595,
1301,
15,
47,
235,
31,
162,
45,
31,
83,
101,
20,
275,
21,
13,
10321,
1336,
54,
835,
20,
4344,
40,
23782,
3893,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Simplest way to print out the contents of a text field in mssql
===
I need to output the contents of a text field using MS Query Analyzer. I have tried this:
select top 1 text from myTable
(where text is a `text` field)
and
DECLARE @data VarChar(8000)
select top 1 @data = text from myTable
PRINT @data
The first one prints only the first 2000 or so characters and the second only prints the first 8000 characters. Is there any way to get all of the text?
Notes:
* must work with MSSQL7 | 0 | [
2,
24384,
161,
20,
4793,
70,
14,
8478,
16,
21,
1854,
575,
19,
4235,
18,
22402,
800,
3726,
3726,
31,
376,
20,
5196,
14,
8478,
16,
21,
1854,
575,
568,
4235,
25597,
16051,
139,
9,
31,
57,
794,
48,
45,
5407,
371,
137,
1854,
37,
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... |
Error 1783 - instsrv.exe REMOVE from Win2k3
===
My applications installer offers the user the ability to run the application as a service through use of the srvany.exe application. To remove the application on uninstall, I've been using the application "instsrv.exe" with the following command:
> instsrv "myservice" REMOVE
On Windows Server 2003, I encounter an error 1783.
Any ideas what is causing this problem? Am I using the wrong approach for Win2k3? | 0 | [
2,
7019,
19614,
13,
8,
19,
10044,
10359,
9,
1706,
62,
4681,
37,
628,
135,
197,
240,
800,
3726,
3726,
51,
3767,
16146,
106,
2486,
14,
4155,
14,
2165,
20,
485,
14,
3010,
28,
21,
365,
120,
275,
16,
14,
3441,
2686,
93,
9,
1706,
62... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SQL Rows Splitting
===
Can someone please let me know how to get the different segments of the three rows
that are intersecting in different ways using SQL? The three rows in #t2 represent sets A,B, C - I am looking for A I B, A I C, B I C, A I B I C, A' , B', C' etc., (7 possible
segments with 3 rows as in a Venn diagram) where I is the Intersection.
I am looking for a generic solution which can handle n number of rows in #t2.
create table #t1 (key1 int, key2 int) -- for each Key1 there can be 1 or more Key2
go
create table #t2 (row_id int identity(101, 1), key1 int) --row_id is the primary key
go
insert into #t1
select 1, 11 union select 1, 12 union select 1, 13 union select 1, 14 union
select 2, 13 union select 2, 15 union select 2, 16 union select 2, 17 union
select 3, 13 union select 3, 12 union select 3, 16 union select 3, 17
-- 1 --> 11, 12, 13, 14
-- 2 --> 13, 15, 16, 17
-- 3 --> 13, 12, 16, 17
insert into #t2 (key1)
select 1 union select 2 union select 3
The output I am looking for is,
1001 11 (A')
1001 14 (A')
1002 12 (A I C - A I B I C)
1003 13 (A I B I C)
1004 15 (B')
1005 16 (B I C - A I B I C)
1005 17 (B I C - A I B I C)
The output has 5 segments, instead of the possible 7 as two of them are NULL.
Thanks.
| 0 | [
2,
4444,
255,
11295,
17282,
800,
3726,
3726,
92,
737,
2247,
408,
55,
143,
184,
20,
164,
14,
421,
9061,
16,
14,
132,
11295,
30,
50,
17822,
68,
19,
421,
2847,
568,
4444,
255,
60,
14,
132,
11295,
19,
6926,
38,
135,
3501,
3415,
21,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I access the HTTP request header fields via JavaScript?
===
I want to capture the HTTP request header fields, primarily the Referer and User-Agent, within my client-side JavaScript. How may I access them? | 0 | [
2,
184,
107,
31,
1381,
14,
7775,
3772,
157,
106,
2861,
1197,
8247,
8741,
60,
800,
3726,
3726,
31,
259,
20,
3683,
14,
7775,
3772,
157,
106,
2861,
15,
2257,
14,
5017,
106,
17,
4155,
8,
58,
7685,
15,
363,
51,
6819,
8,
1416,
8247,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
What is the comparative speed of temporary tables to physical tables in SQL?
===
I have a script that needs to extract data temporarily to do extra operations on it, but then doesn't need to store it any further after the script has run. I currently have the data in question in a series of temporary local tables (CREATE TABLE #table), which are then dropped as their use is completed. I was considering switching to physical tables, treated in the same way (CREATE TABLE table), if there would be an improvement in the speed of the script for it (or other advantages, maybe?).
...So, is there a difference in performance, between temporary tables and physical tables? From what I'm reading, temporary tables are just physical tables that only the session running the script can look at (cutting down on locking issues). | 0 | [
2,
98,
25,
14,
14102,
1362,
16,
4700,
7484,
20,
1825,
7484,
19,
4444,
255,
60,
800,
3726,
3726,
31,
57,
21,
3884,
30,
2274,
20,
10962,
1054,
7866,
20,
107,
2230,
1311,
27,
32,
15,
47,
94,
1437,
22,
38,
376,
20,
1718,
32,
186,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best Workstation Furniture for Programming?
===
I've used a variety of computer furniture over the years and was wondering what other folks liked? My current workstation at home is the couch because my wife has taken over my 48" Anthro Cart for her own computing needs. | 2 | [
2,
246,
170,
10839,
6626,
26,
3143,
60,
800,
3726,
3726,
31,
22,
195,
147,
21,
1747,
16,
1428,
6626,
84,
14,
122,
17,
23,
5712,
98,
89,
14563,
3345,
60,
51,
866,
170,
10839,
35,
213,
25,
14,
4914,
185,
51,
663,
63,
658,
84,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... |
How do you print out a stack trace to the console/log in Cocoa?
===
I'd like to log the call trace during certain points, like failed assertions, or uncaught exceptions. | 0 | [
2,
184,
107,
42,
4793,
70,
21,
7566,
5565,
20,
14,
8650,
118,
5567,
19,
24507,
60,
800,
3726,
3726,
31,
22,
43,
101,
20,
6738,
14,
645,
5565,
112,
1200,
819,
15,
101,
1702,
20878,
18,
15,
54,
16061,
12647,
13392,
9,
3,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How can I install local gem?
===
If I download a .gem file to a folder in my computer, can I install it later using gem install?
| 0 | [
2,
184,
92,
31,
16146,
375,
8551,
60,
800,
3726,
3726,
100,
31,
7121,
21,
13,
9,
20231,
3893,
20,
21,
19294,
19,
51,
1428,
15,
92,
31,
16146,
32,
138,
568,
8551,
16146,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How can I determine if a dynamically-created DOM element has been added to the DOM?
===
[**According to spec**][1], only the `BODY` and `FRAMESET` elements provide an "onload" event to attach to, but I would like to know when a dynamically-created DOM element has been added to the DOM in JavaScript.
The super-naive heuristics I am currently using, which work, are as follows:
- Traverse the **parentNode** property of the element back until I find the ultimate ancestor (i.e. parentNode.parentNode.parentNode.etc until parentNode is null)<br /><br />
- If the ultimate ancestor has a defined, non-null **body** property<br /><br />
- assume the element in question is part of the dom
- else<br /><br />
- repeat these steps again in 100 milliseconds
What I am after is either confirmation that what I am doing is sufficient (again, it is working in both IE7 and FF3) or a better solution that, for whatever reason, I have been completely oblivious to; perhaps other properties I should be checking, etc.
[1]: http://www.w3.org/TR/REC-html40/interact/scripts.html | 0 | [
2,
184,
92,
31,
3746,
100,
21,
7782,
1326,
8,
18475,
11859,
4520,
63,
74,
905,
20,
14,
11859,
60,
800,
3726,
3726,
636,
1409,
18821,
20,
12737,
1409,
500,
2558,
165,
500,
15,
104,
14,
13,
1,
9760,
1,
17,
13,
1,
8361,
3554,
1,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you run a program you don't know where the arguments start?
===
The subject doesn't say much cause it is not easy to question in one line.
I have to execute a few programs which I read from the registry. I have to read from a field where somebody saves the whole paths and arguments.
I've been using System.Diagnostics.ProcessStartInfo setting the name of the program and its arguments but I've found a wide variety of arguments which I have to parse to save the process executable file in one field and its arguments in the other.
Is there a way to just execute the whole string as is? | 0 | [
2,
184,
107,
42,
485,
21,
625,
42,
221,
22,
38,
143,
113,
14,
10553,
799,
60,
800,
3726,
3726,
14,
1550,
1437,
22,
38,
395,
212,
1679,
32,
25,
52,
2010,
20,
1301,
19,
53,
293,
9,
31,
57,
20,
15644,
21,
310,
1726,
56,
31,
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... |
Does the WinForms WebBrowser control support mhtml?
===
Or if any body knows of an alternative control that does?
It would be handy to serve up content to the WebBrowser control that has embedded images & other resources (like say from a database) without having a dependency on these resources being hosted on a webserver. Mhtml supports this but doesn't seem to work in a WebBrowser control? | 0 | [
2,
630,
14,
628,
4190,
18,
10192,
5417,
4104,
569,
555,
307,
15895,
60,
800,
3726,
3726,
54,
100,
186,
358,
3620,
16,
40,
2676,
569,
30,
630,
60,
32,
83,
44,
20277,
20,
1884,
71,
2331,
20,
14,
10192,
5417,
4104,
569,
30,
63,
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... |
What is the best library to create an AJAX auto-suggest textbox in a web form?
===
I'm creating a web application for work where the user has to enter the name of the person that requested the job. I'd like to create a simple AJAX auto-suggest dropdown so they don't need to type the entire name. On the backend, the database will provide suggestions based on previous entries. The website is built using CakePHP 1.1.
I know there are a lot of libraries out there, some better than others. Which do you think is the fastest and easiest to implement? | 0 | [
2,
98,
25,
14,
246,
1248,
20,
1600,
40,
20624,
3108,
8,
18,
21606,
1430,
1854,
5309,
19,
21,
2741,
505,
60,
800,
3726,
3726,
31,
22,
79,
2936,
21,
2741,
3010,
26,
170,
113,
14,
4155,
63,
20,
2830,
14,
204,
16,
14,
840,
30,
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... |
What is the easiest to use ORM framework for PHP?
===
I'm looking for Ruby's Active record for PHP. Something that is so simple that I just define my fields, extend the base ORM class, and I get ACID operations for free. I should get default getters and setters without writing any code, but overriding a default getter or setter is as easy as declaring get$fieldName or set$fieldName functions with the behavior I want. Symphony makes you create about 5 files per object, and all defined objects always load as far as I can tell. What is a better alternative? Why is it better? Can you put simple examples in your answers please?
Doctrine is another ORM I've looked at besides symphony . There also you need to create yaml files that describe your data structures. The database already defines this stuff. What will just read my table defs??? Is it hopeless? | 0 | [
2,
98,
25,
14,
27237,
20,
275,
54,
79,
6596,
26,
13,
26120,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
10811,
22,
18,
1348,
571,
26,
13,
26120,
9,
301,
30,
25,
86,
1935,
30,
31,
114,
9267,
51,
2861,
15,
7206,
14,
1000,
54,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Accessing HTTP Headers in Javascript?
===
How do I access the HTTP request header fields via JavaScript?
Related to [**this question**][1], which was modified to ask about specifically accessing browser information.
[1]: http://stackoverflow.com/questions/220149/how-do-i-access-the-http-request-header-fields-via-javascript | 0 | [
2,
1381,
68,
7775,
157,
445,
19,
8247,
8741,
60,
800,
3726,
3726,
184,
107,
31,
1381,
14,
7775,
3772,
157,
106,
2861,
1197,
8247,
8741,
60,
1597,
20,
636,
1409,
1565,
1301,
1409,
500,
2558,
165,
500,
15,
56,
23,
5372,
20,
1349,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Intercepting an exception inside IDisposable.Dispose
===
In the IDisposable.Dispose method is there a way to figure out if an exception is being thrown?
using (MyWrapper wrapper = new MyWrapper())
{
throw new Exception("Bad error.");
}
If an exception is thrown in the using statement I want to know about it when the IDisposable object is disposed. | 0 | [
2,
18324,
68,
40,
5391,
572,
13,
19405,
12551,
579,
9,
2906,
15690,
800,
3726,
3726,
19,
14,
13,
19405,
12551,
579,
9,
2906,
15690,
2109,
25,
80,
21,
161,
20,
1465,
70,
100,
40,
5391,
25,
142,
6027,
60,
568,
13,
5,
915,
499,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to embed fonts in HTML?
===
I'm trying to figure out a decent solution (especially from the SEO side) for embedding fonts in web pages. So far I have see [the W3C solution][1], which doesn't even work on Firefox, and [this pretty cool solution][2]. The second solution is for titles only. Is there a solution available for full text? I'm tired of the standard fonts for web pages.
Thanks!
[1]: http://www.spoono.com/html/tutorials/tutorial.php?id=19
[2]: http://wiki.novemberborn.net/sifr/How+to+use | 0 | [
2,
184,
20,
11911,
69,
9978,
18,
19,
13,
15895,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
1465,
70,
21,
12238,
4295,
13,
5,
12183,
37,
14,
13,
18,
3894,
270,
6,
26,
11911,
69,
3258,
9978,
18,
19,
2741,
4434,
9,
86,
463,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How comment a jsp Expression?
===
How can I comment a jsp expression like:
<%= map.size() %> | 0 | [
2,
184,
6484,
21,
487,
3401,
1803,
60,
800,
3726,
3726,
184,
92,
31,
6484,
21,
487,
3401,
1803,
101,
45,
13,
1,
11881,
3726,
2942,
9,
10454,
5,
6,
13,
11881,
1,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Using VS2005 and VSS is there a way to add comments to checkins?
===
All the googling around hasn't found an answer for me yet... I have one of our devs that is using VSS and VS2005. Checking in works (abeit quite painfully across the 'Net) but there doesn't seem to be a way to put comments into a checkin (unless you embed it in the source file maybe?) I'll be one of the firs to admit that my knowledge of VSS is pretty slim, and if there's a "Duh" answer, would be happy to hear it :) | 0 | [
2,
568,
4611,
2835,
17,
4611,
18,
25,
80,
21,
161,
20,
3547,
7534,
20,
2631,
108,
18,
60,
800,
3726,
3726,
65,
14,
162,
5598,
802,
140,
9979,
22,
38,
216,
40,
1623,
26,
55,
768,
9,
9,
9,
31,
57,
53,
16,
318,
9664,
18,
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... |
In C# why can't a ternary operator implicitly cast to a nullable type
===
I am curious as to why an implicit cast fails in...
int? someValue = SomeCondition ? ResultOfSomeCalc() : null;
and why I have to perform an explicit cast instead
int? someValue = SomeCondition ? ResultofSomeCalc() : (int?)null;
It seems to me that the compiler has all the information it need to make an implicit casting decision, no? | 0 | [
2,
19,
272,
5910,
483,
92,
22,
38,
21,
13,
8766,
1857,
6022,
20290,
102,
1325,
20,
21,
16203,
579,
1001,
800,
3726,
3726,
31,
589,
7686,
28,
20,
483,
40,
20290,
1325,
13614,
19,
9,
9,
9,
19,
38,
60,
109,
15165,
800,
109,
22141... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can you override MessageDlg calls to a Custom TForm/Dialog?
===
I have been using code similar to this
MessageDlg('', mtWarning, [mbOK], 0);
throughout my project, (thanks to the GExperts Message Dialog tool :) ) and i was wondering if anyone knows of a way do override the call and show my own custom Form.
The only way i can think to do it its make a New Form with something like
function MessageDlg(const Msg: string; DlgType: TMsgDlgType;
Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer;
begin
//show my own code here
end;
and put it each of my uses lists before the Dialogs unit but is there a guaranteed way to make sure it uses my code not the Dialogs unit Code.
I don't like the idea of copying the dialogs unit to a local dir and making changes to it.
Or is this all to much work and should i just use my own function call and replace all the MessageDlg with my own. (which would not be fun, ive prob used MessageDlg too much)
| 0 | [
2,
92,
42,
84,
11891,
2802,
43,
10641,
3029,
20,
21,
5816,
13,
38,
4190,
118,
4286,
5567,
60,
800,
3726,
3726,
31,
57,
74,
568,
1797,
835,
20,
48,
2802,
43,
10641,
5,
7,
15,
8651,
1885,
2981,
15,
636,
79,
12418,
500,
15,
713,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
CSS positioning div above another div when not in the order in the HTML
===
Given a template where the HTML cannot be modified because of other requirements, how is it possible to display a div above another div when they are not in that order in the HTML and both divs contain data that could produce a varying height and width.
HTML:
> `<div id="wrapper"`><br />
> `<div id="firstDiv"`><br />
> Content to be below in this situation<br />
> `</div`>
> `<div id="secondDiv"`><br />
> Content to be above in this situation<br />
> `</div`><br />
> `</div`>
Hopefully it is obvious that the desired result is:
> Content to be above in this
> situation<br /> Content to be below in
> this situation
When the dimensions are fixed it easy to position them where needed, but I need some ideas for when the content is variable. For the sake of this scenario, please just consider the width to be 100% on both. | 0 | [
2,
272,
18,
18,
649,
68,
13,
12916,
784,
226,
13,
12916,
76,
52,
19,
14,
389,
19,
14,
13,
15895,
800,
3726,
3726,
504,
21,
22894,
113,
14,
13,
15895,
1967,
44,
5372,
185,
16,
89,
4786,
15,
184,
25,
32,
938,
20,
3042,
21,
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... |
Remote machines cannot connect to Visual Studio web server
===
I remember when MS was developing Cassini - I believe they rolled it into VS 05/08, so I think this is a Cassini web server question.
I am using Windows XP with Visual Studio 2008, and find it quite inconvenient when I want to test a web page/styling with multiple browsers and multiple OSes. Right now I have to deploy the code on our server, and if there are any updates that need to happen, the process turns into quite a time drain. Since I am using XP/IIS 5, the option of using IIS is not an option. The use of IIS on XP requires an extra prefix for a project, which breaks all links, css etc.
Does anyone know how to allow the integrated development web server in Visual Studio 2008 to be seen by other computers? This would save loads of time.
| 0 | [
2,
5388,
6035,
1967,
6379,
20,
3458,
1120,
2741,
8128,
800,
3726,
3726,
31,
1518,
76,
4235,
23,
3561,
5913,
2651,
13,
8,
31,
985,
59,
2958,
32,
77,
4611,
13,
4071,
118,
3099,
15,
86,
31,
277,
48,
25,
21,
5913,
2651,
2741,
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... |
Best cubicle toys for programming
===
I need some employee/co-worker Christmas gift ideas. Do you have any good cubicle toys that help you to do any of:
1. think about programming problems
2. solve programming problems by representing common abstractions
3. can be directly programmed
4. can interface with a PC based IDE to be programmed.
Disallowed items are:
1. reference material in book, pamphlet, poster or cheat-sheet form, even if it has kick ass pop-cultural references.
2. edibles. [discuss separately]
3. things that need their own lab-space and/or extensive tools to be worked with.
So yes, Lego Mindstorms come to mind, but they aren't cubicle toys because they cost more than cubicle toys would, and they have too many losable parts. | 2 | [
2,
246,
11306,
413,
12029,
26,
3143,
800,
3726,
3726,
31,
376,
109,
7362,
118,
716,
8,
22560,
2638,
4207,
3478,
9,
107,
42,
57,
186,
254,
11306,
413,
12029,
30,
448,
42,
20,
107,
186,
16,
45,
137,
9,
277,
88,
3143,
1716,
172,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 an equivalent to -pedantic for gcc when using Microsoft's Visual C++ compiler?
===
I would like to have my warnings set to the highest level using Microsoft Visual C++ compiler. Similar to using -pedantic on gcc. What compiler switches do you use to have the most warnings enabled? | 0 | [
2,
25,
80,
40,
4602,
20,
13,
8,
3631,
210,
1786,
26,
489,
3384,
76,
568,
7099,
22,
18,
3458,
272,
20512,
21486,
60,
800,
3726,
3726,
31,
83,
101,
20,
57,
51,
3590,
18,
309,
20,
14,
1554,
662,
568,
7099,
3458,
272,
20512,
21486... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 xml/xslt library(ies) currently work well for java?
===
I need to apply some xml templates to various streams of xml data (and files, on occasion) and there seem to be a large number of xml libraries for java out there -- enough that it's difficult to quickly determine which libraries are still active, how they differ from the other options that are also active, and what criteria should be considered when choosing one.
What libraries do you use for manipulating xml in java, and why is it better than the alternatives? | 0 | [
2,
98,
23504,
118,
396,
18,
255,
38,
1248,
5,
1596,
6,
871,
170,
134,
26,
8247,
60,
800,
3726,
3726,
31,
376,
20,
5645,
109,
23504,
22894,
18,
20,
617,
9464,
16,
23504,
1054,
13,
5,
290,
6488,
15,
27,
5434,
6,
17,
80,
2260,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 causes DbProviderFactory.CreateDataAdapter.FillDataSet call to return fewer columns in a datarow than requested?
===
Our .Net service connects with SqlServer using DbProviderFactory instances. These instances are generated once at run time, and used for the rest of the service's life. In testing, this works just fine and no issues are found or seen. At a very high utilization site, however, the DbProviderFactory instances randomly go "bad". When the factory instance is in a bad state, calling DbProviderFactory.CreateDataAdapter will return DbDataAdapter instances where calling FillDataSet fills the DataSet with DataRow(s) containing fewer columns than requested, and possibly no columns.
What can cause this? Are there threading issues within DbProviderFactory? Are there known issues that can cause the DbProviderFactory to go into an invalid state? Once the DbProviderFactory gets into this state, all DataSets returned have at least one DataRow with fewer columns than requested, and possibly no columns. The only way out of this issue, as the service is now designed, is to restart the service, at which point it functions as expected.
Note: these are all select calls into untyped DataSets | 0 | [
2,
98,
4047,
13,
9007,
26735,
139,
17455,
93,
9,
18475,
4375,
27576,
106,
9,
19971,
18768,
3554,
645,
20,
788,
8477,
7498,
19,
21,
1054,
5417,
119,
6602,
60,
800,
3726,
3726,
318,
13,
9,
2328,
365,
8534,
29,
4444,
255,
10321,
106,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Determine Process Info Programmatically in Darwin/OSX
===
I have a class with the following member functions:
<pre><code>
/// caller pid
virtual pid_t Pid() const = 0;
/// physical memory size in KB
virtual uint64_t Size() const = 0;
/// resident memory for this process
virtual uint64_t Rss() const = 0;
/// cpu used by this process
virtual double PercentCpu() const = 0;
/// memory used by this process
virtual double PercentMemory() const = 0;
/// number of threads in this process
virtual int32_t Lwps() const = 0;
</code>
</pre>
This class' duty is to return process information about caller. Physical memory size can easily determined by a sysctl call, and pid is trivial, but the remaining calls have eluded me, aside from invoking a popen on ps or top and parsing the output - which isn't acceptable. Any help would be greatly appreciated.
Requirements:<br/>
Compiles on g++ 4.0<br/>
No obj-c<br/>
OSX 10.5<br/>
| 0 | [
2,
3746,
953,
15404,
625,
6732,
1326,
19,
11210,
118,
759,
396,
800,
3726,
3726,
31,
57,
21,
718,
29,
14,
249,
322,
3719,
45,
13,
1,
3515,
1,
9375,
1,
12894,
118,
21326,
13,
11031,
6599,
13,
11031,
1,
38,
13,
11031,
5,
6,
1160... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I check SQL replication status via T-SQL?
===
I want to be able to check the status of a publication and subscription in SQL Server 2008 T-SQL. I want to be able to determine if its okay, when was the last successful, sync, etc.. Is this possible? | 0 | [
2,
184,
107,
31,
2631,
4444,
255,
23841,
1782,
1197,
13,
38,
8,
18,
22402,
60,
800,
3726,
3726,
31,
259,
20,
44,
777,
20,
2631,
14,
1782,
16,
21,
3176,
17,
14213,
19,
4444,
255,
8128,
570,
13,
38,
8,
18,
22402,
9,
31,
259,
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... |
Disable layout in ASP.NET MVC?
===
In MonoRail you can just CancelLayout() to not render the layout. In ASP.NET MVC, the only way to affect the layout seems to be to pass the layout name into the View() method like View("myview", "mylayout"); only it seems that passing null or an empty string doesn't do what I'd want.
I ended up creating an empty layout that just rendered the content, but that seems silly. | 0 | [
2,
1460,
579,
9106,
19,
28,
306,
9,
2328,
307,
8990,
60,
800,
3726,
3726,
19,
4129,
7301,
42,
92,
114,
14815,
4414,
1320,
5,
6,
20,
52,
16535,
14,
9106,
9,
19,
28,
306,
9,
2328,
307,
8990,
15,
14,
104,
161,
20,
6245,
14,
910... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Organize PHP Class Heirarchy
===
I've got a somewhat primitive framework I've been using for most of my projects, but a general design issue came to mind that I haven't been able to work out yet. For a given application, should I separate the application-specific class structure from the framework's structure, or is buliding on top of the framework not such a bad thing?
For example, say I had a framework with a base Controller class and extended it for a given part of my application. Which arrangement makes the most sense, and why?
**Class Structure A:**
* Intuitive, easy to find source files when debugging.
* File naming/directory structure mirrors class heirarchy.
<pre>
- Framework_Control "Framework\Control.php"
- Framework_Control_Index "Framework\Control\Index.php"
- Framework_Control_Home "Framework\Control\Home.php"
- Framework_Control_Contact "Framework\Control\Contact.php"
- Framework_Control_About "Framework\Control\About.php"
</pre>
**Class Structure B:**
* Keeps framework modular and easily to replace/update.
* Adds some complexity to directory structure, directory/file naming no longer follows class heirarchy all the time.
<pre>
- Framework_Control "Framework\Control.php"
- Application_Control_Index "Application\Control\Index.php"
- Application_Control_Home "Application\Control\Home.php"
- Application_Control_Contact "Application\Control\Contact.php"
- Application_Control_About "Application\Control\About.php"
</pre>
I know overall it's going to come down to personal preference, but I want to make sure I weigh out all the pros and cons before I decide which way to go. It really comes down to class naming and directory structure as the actual hierarchy would remain the same in either case. | 0 | [
2,
246,
161,
20,
9213,
13,
26120,
718,
7678,
8027,
93,
800,
3726,
3726,
31,
22,
195,
330,
21,
4131,
11473,
6596,
31,
22,
195,
74,
568,
26,
127,
16,
51,
2314,
15,
47,
21,
297,
704,
1513,
281,
20,
594,
30,
31,
2933,
22,
38,
74... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 avaoid screen flickering on showing form with user drawn controls?
===
So the [transparent background problem][1] is solved. Now, every time I Show the form (or have to have it repainted), I get a lot of flickering. Is there any way I can not update the screen until the paint event is complete, or any other way to stop the 1/2 second of flickering and flashing while all the objects are being painted?
[1]: http://stackoverflow.com/questions/214215/user-drawn-controls-are-using-the-previous-forms-background | 0 | [
2,
184,
20,
13656,
6516,
2324,
22399,
27,
3187,
505,
29,
4155,
3160,
8671,
60,
800,
3726,
3726,
86,
14,
636,
7028,
18908,
2395,
1448,
500,
2558,
165,
500,
25,
15091,
9,
130,
15,
352,
85,
31,
298,
14,
505,
13,
5,
248,
57,
20,
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 is the reason to retain proprietorship on commissioned work?
===
I have always included clauses to transfer to my clients full author, ownership and use rights for all the source code, original images, original resources, etc. I develop/create for them.
Of course, I retain author, ownership and use rights for my libraries and I usually do not include source code for those. If the client requires my library’s source code, then I ask a premium for those and I provide them with the proper use license and I include the needed restrictions on allowed use.
I really see not the need to retain rights for myself or my company. A client’s work is just for them. I never reuse code (even if I have to write some process again, I do not see it as code reuse).
Why lots of companies/programmers retain author, ownership on commissioned work?
| 0 | [
2,
98,
25,
14,
1215,
20,
8201,
19654,
2418,
27,
3488,
170,
60,
800,
3726,
3726,
31,
57,
550,
506,
9040,
18,
20,
2617,
20,
51,
7421,
503,
1314,
15,
5074,
17,
275,
1096,
26,
65,
14,
1267,
1797,
15,
501,
3502,
15,
501,
2566,
15,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Do I have to close() every EntityManager?
===
I have just started migrating my homegrown persistence framework to JPA.
Given that the persistence frameworks hide a lot of the plumbing, I'm interested in knowing if NOT closing EntityManagers will create a resource leak, or if the frameworks will collect and close them for me.
I intend in all places to close them, but do I HAVE to?
At the moment using TopLink, just because it works with NetBeans easily, but am happy to investigate other JPA providers. | 0 | [
2,
107,
31,
57,
20,
543,
5,
6,
352,
9252,
22256,
60,
800,
3726,
3726,
31,
57,
114,
373,
28749,
51,
213,
16347,
28584,
6596,
20,
487,
1060,
9,
504,
30,
14,
28584,
6596,
18,
3077,
21,
865,
16,
14,
28845,
15,
31,
22,
79,
3158,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can a windows service programmatically restart itself
===
I need to write robust code in .NET to enable a windows service (server 2003) to restart itself. What it the best way to so this? Is there some .NET API to do it? | 0 | [
2,
184,
92,
21,
1936,
365,
625,
6732,
1326,
22767,
1145,
800,
3726,
3726,
31,
376,
20,
2757,
15313,
1797,
19,
13,
9,
2328,
20,
9240,
21,
1936,
365,
13,
5,
10321,
106,
973,
6,
20,
22767,
1145,
9,
98,
32,
14,
246,
161,
20,
86,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... |
Compass Search Annotations cause compiler errors
===
I'm trying to use the @Searchable annotations from the Compass search engine in my Java program, but I receive a compile-time error: "type mismatch: cannot convert Searchable to Annotation".
I have included all of the jar files that I can think of, and scoured the web for working examples to no avail.
Does anyone have a working example of Compass annotations? | 0 | [
2,
18879,
2122,
40,
1270,
7504,
1679,
21486,
11908,
800,
3726,
3726,
31,
22,
79,
749,
20,
275,
14,
13,
1,
25136,
579,
40,
1270,
7504,
37,
14,
18879,
2122,
1406,
19,
51,
8247,
625,
15,
47,
31,
2588,
21,
26561,
8,
891,
7019,
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... |
Join arrays in VB.net
===
What's the simplest way to join one or more arrays (or ArrayLists) in Visual Basic? I'm using .NET 3.5, if that matters much. | 0 | [
2,
1865,
7718,
18,
19,
13,
20468,
9,
2328,
800,
3726,
3726,
98,
22,
18,
14,
24384,
161,
20,
1865,
53,
54,
91,
7718,
18,
13,
5,
248,
7718,
5739,
18,
6,
19,
3458,
2125,
60,
31,
22,
79,
568,
13,
9,
2328,
203,
9,
264,
15,
100,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Java Concurrent and Parallel GC
===
This article <a href="http://www.petefreitag.com/articles/gctuning/">here</a> suggest to use -XX:+UseParNewGC 'To enable a parallel young generation GC with the concurrent GC'.
My confusion is that to enable both parallel and concurrent gc
- do I just gotta use -XX:+UseParNewGC
- or do i gotta use both -XX:+UseParNewGC *and* -XX:+UseConcMarkSweepGC | 0 | [
2,
8247,
19513,
17,
3821,
13,
10362,
800,
3726,
3726,
48,
2002,
13,
1,
58,
746,
14057,
3726,
7,
21127,
6903,
6483,
9,
6240,
62,
10185,
49,
8628,
9,
960,
118,
20360,
18,
118,
10362,
7736,
68,
118,
7,
1,
6836,
1,
118,
58,
1,
560... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Cannot bind to the property or column Name on the DataSource. Parameter name: dataMember
===
This is the exception that I'm getting when I'm trying to bind to a System.Type.Name.
Here is what I'm doing:
this.propertyTypeBindingSource.DataSource = typeof(System.Type);
/* snip */
this.nameTextBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.propertyTypeBindingSource, "Name", true));
Is there some trick with binding to System.Type, is it not allowed or is there any workaround? Have no problems with binding to other types.
| 0 | [
2,
1967,
10193,
20,
14,
1354,
54,
4698,
204,
27,
14,
1054,
12097,
9,
18906,
204,
45,
1054,
6990,
800,
3726,
3726,
48,
25,
14,
5391,
30,
31,
22,
79,
1017,
76,
31,
22,
79,
749,
20,
10193,
20,
21,
329,
9,
4474,
9,
7259,
9,
235,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you implement a "Logout" link using ASP.NET MVC?
===
This seems like a pretty stupid question, but I'm trying to figure out the best way to do this. Would you simply redirect to a /Logout page and have the controller call the FormsAuthentication.SignOut function?
That was my first thought, but then I wondered if it could be abused by third party websites. Let's say someone just decides to post a link to your /Logout page. The user would get signed out of your application. Is there a good way to prevent that? | 0 | [
2,
184,
107,
42,
8713,
21,
13,
7,
5567,
1320,
7,
3508,
568,
28,
306,
9,
2328,
307,
8990,
60,
800,
3726,
3726,
48,
2206,
101,
21,
1772,
3553,
1301,
15,
47,
31,
22,
79,
749,
20,
1465,
70,
14,
246,
161,
20,
107,
48,
9,
83,
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... |
Practical limit for the number of databases in SQL Server?
===
In one of the stackoverflow podcasts (#18 I think) Jeff and Joel were talking about multi vs single tenant databases. Joel mentioned that "FogBugz on Demand" used a database per customer architecture and I was wondering if there is a point beyond which you'll need to have multiple database servers to distribute the load? | 0 | [
2,
5713,
4496,
26,
14,
234,
16,
6018,
18,
19,
4444,
255,
8128,
60,
800,
3726,
3726,
19,
53,
16,
14,
7566,
2549,
9990,
15124,
18,
13,
5,
5910,
1087,
31,
277,
6,
3292,
17,
8873,
46,
1582,
88,
1889,
4611,
345,
18536,
6018,
18,
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 you configure WCF to support Fault contracts where both the host and client are in the same process using net.pipe?
===
I'm trying to create an in-process unit test for my service to client interactions using net.pipe binding. Like a good WCF service it uses FaultContractAttribute on service operations to expose possible faults *(wrapped exceptions)* to metadata. I would like to have the client and service endpoints configured thru XML *(App.config).* However, whenever a fault is thrown, it's just a CommunicationException "pipe has closed", and not the typed Fault I was expecting.
I tried Adding IMetadataExchange endpoint for net.pipe, but that didn't work. I also tried <serviceMetadata HttpGetEnabled="true" />. Which being on Vista required me to netsh the ACL for the http endpoint. That too did not work.
This is the latest attempt at a config, but it pumps out *"The contract name 'IMetadataExchange' could not be found in the list of contracts implemented by the service"*
<system.serviceModel>
<client>
<endpoint name="Client"
contract="IService"
address="net.pipe://localhost/ServiceTest"
binding="netNamedPipeBinding"
bindingConfiguration="netPipeBindingConfig" />
</client>
<services>
<service
name="Service"
behaviorConfiguration="ServiceFaults">
<host>
<baseAddresses>
<add baseAddress="net.pipe://localhost/ServiceTest/"/>
<add baseAddress="http://localhost/ServiceTest/"/>
</baseAddresses>
</host>
<endpoint
address=""
binding="netNamedPipeBinding"
bindingConfiguration="netPipeBindingConfig"
name="ServicePipe"
contract="IService" />
<endpoint
address="MEX"
binding="mexNamedPipeBinding"
bindingConfiguration="mexNetPipeBindingConfig"
name="MexUserServicePipe"
contract="**IMetadataExchange**" />
</service>
</services>
<bindings>
<netNamedPipeBinding>
<binding name="netPipeBindingConfig"
closeTimeout="00:30:00"
sendTimeout="00:30:00" />
</netNamedPipeBinding>
<mexNamedPipeBinding>
<binding name="mexNetPipeBindingConfig"></binding>
</mexNamedPipeBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceFaults">
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
<behavior name="MEX">
<serviceMetadata httpGetEnabled="true" httpGetUrl="http://localhost/ServiceTest/MEX"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
Any Links to examples or recommendations for how to get this done would be appreciated.
| 0 | [
2,
184,
107,
42,
1065,
15951,
11801,
410,
20,
555,
4173,
8712,
113,
156,
14,
2015,
17,
6819,
50,
19,
14,
205,
953,
568,
4275,
9,
15185,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
1600,
40,
19,
8,
16835,
1237,
1289,
26,
51,
365,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 deal with time storage in SQL
===
I have a web application that I'm writing (C#, MSSQL) and I need to store the timestamp when a record is stored in the system. Normally, I would just do this with SQL and the DATETIME function. However, the server is located in a different time zone than our company is located... AND we may change to another server in completely different time zone. The hosting company will not change the server time to match our local time zone. (Not that I blame them, but it was one thing I tried.)
So, my question is, what is the best way to store the date/time of the record update and what is the best way to present that date/time back to the user in our local time zone?
I want the least messy way of doing this, so a combo of C# and SQL would be fine as long as the solution is easy to implement. (My normal style is to do more work in stored procedures and less in C#, if that matters.)
Can you show me some sample code? Thanks! | 0 | [
2,
184,
20,
1183,
29,
85,
4326,
19,
4444,
255,
800,
3726,
3726,
31,
57,
21,
2741,
3010,
30,
31,
22,
79,
1174,
13,
5,
150,
5910,
15,
4235,
18,
22402,
6,
17,
31,
376,
20,
1718,
14,
436,
38,
10158,
76,
21,
571,
25,
8214,
19,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Access Control for Multiple User
===
I'am working on a PHP + MySQL Social Networking application, now i need to setup different access control (read,create,edit,delete) for global (all items) and/or self items (item which created by themselves) for each module to group or specific user.
does anyone has suggesstions in doing this (table structures, etc)?
| 0 | [
2,
1381,
569,
26,
1886,
4155,
800,
3726,
3726,
31,
22,
765,
638,
27,
21,
13,
26120,
2754,
51,
18,
22402,
668,
16230,
3010,
15,
130,
31,
376,
20,
18161,
421,
1381,
569,
13,
5,
10647,
15,
6037,
1373,
15,
69,
242,
15,
24249,
591,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 deal with NUL?
===
From time to time, I run into communications issue with other programmers, when we talk about NULL. Now NULL could be
<BR>
<BR> a NULL pointer
<BR> the NUL character
<BR> an empty data element in some sort of database.
<BR> NUL seems to be the most confusing. It is the ASCII character 0x00.
<BR> I tend to use '\0' in my code to represent it. Some developers in my group
<BR> tend to prefer to simply use 0, and let the compiler implicitly cast it to a char.
<BR> What do you prefer to use for NUL? and why? | 0 | [
2,
184,
107,
42,
1183,
29,
3152,
255,
60,
800,
3726,
3726,
37,
85,
20,
85,
15,
31,
485,
77,
3380,
1513,
29,
89,
17968,
18,
15,
76,
95,
930,
88,
16203,
9,
130,
16203,
110,
44,
13,
1,
5145,
1,
13,
1,
5145,
1,
21,
16203,
454,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 filter a php array with a mysql table
===
Say I have an array of strings in a php array called $foo with a few hundred entries, and I have a mysql table 'people' that has a field named 'name' with a few thousand entries. What is an efficient way to find out which strings in $foo aren't a 'name' in an entry in 'people' without submitting a query for every string in $foo?
So I want to find out what strings in $foo have not already been entered in 'people.' | 0 | [
2,
184,
20,
11945,
21,
13,
26120,
7718,
29,
21,
51,
18,
22402,
859,
800,
3726,
3726,
395,
31,
57,
40,
7718,
16,
7887,
19,
21,
13,
26120,
7718,
227,
5579,
4120,
111,
29,
21,
310,
1874,
11399,
15,
17,
31,
57,
21,
51,
18,
22402,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Magic Quotes in PHP
===
According to the [PHP manual][1], in order to make code more portable, they recommend using something like the following for escaping data:
if (!get_magic_quotes_gpc()) {
$lastname = addslashes($_POST['lastname']);
} else {
$lastname = $_POST['lastname'];
}
I have other validation checks that I will be performing, but how secure is the above strictly in terms of escaping data? I also saw that magic quotes will be deprecated in PHP 6. How will that affect the above code?
[1]: http://ca3.php.net/manual/en/function.get-magic-quotes-gpc.php | 0 | [
2,
2154,
18901,
19,
13,
26120,
800,
3726,
3726,
496,
20,
14,
636,
26120,
5132,
500,
2558,
165,
500,
15,
19,
389,
20,
233,
1797,
91,
13469,
15,
59,
12360,
568,
301,
101,
14,
249,
26,
14700,
1054,
45,
100,
13,
5,
187,
3060,
1,
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... |
Can I use the same editor for Control.Anchor property for my own user control's designer support?
===
I have a simple extender component that draws 3D borders around any Control. In my designer supprot for the component, I'd like to use the same editor that VS uses to select the Anchor property.
I know I can use the [Editor()] attribute, but I don't know the class name of the editor that's used. | 0 | [
2,
92,
31,
275,
14,
205,
1835,
26,
569,
9,
210,
11840,
1354,
26,
51,
258,
4155,
569,
22,
18,
4742,
555,
60,
800,
3726,
3726,
31,
57,
21,
1935,
7206,
106,
5912,
30,
10802,
203,
43,
5878,
140,
186,
569,
9,
19,
51,
4742,
11128,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Triangle maths for Game development
===
Im trying to make a triangle (isosceles triangle) to move around the screen and at the same time slightly rotate it when a user presses a directional key (like right or left).
I would like the nose (top point) of the triangle to lead the triangle at all times. (Like that old asteriods game).
My problem is with the maths behind this. At every X time interval, I want the triangle to move in "some direction", I need help finding this direction (x and y increments/decrements).
I can find the center point (Centroid) of the triangle, and I have the top most x an y points, so I have a line vector to work with, but not a clue as to "how" to work with it.
I think it has something to do with the old Sin and Cos methods and the amount (angle) that the triangle has been rotated, but Im a bit rusty on that stuff.
Any help is greatly appreciated.
Thanks. | 0 | [
2,
8676,
5057,
18,
26,
250,
522,
800,
3726,
3726,
797,
749,
20,
233,
21,
8676,
13,
5,
11037,
18,
19537,
18,
8676,
6,
20,
780,
140,
14,
2324,
17,
35,
14,
205,
85,
1847,
21448,
32,
76,
21,
4155,
16527,
21,
13,
19393,
1246,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.