unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
unit testing
===
Is there any good book or material which covers C# unit testing using mocks in depth? | 2 | [
2,
1237,
4431,
800,
3726,
3726,
25,
80,
186,
254,
360,
54,
1492,
56,
2937,
272,
5910,
1237,
4431,
568,
10506,
18,
19,
5204,
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... | [
1,
1,
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... |
Why can't I connect to a WCF service with net.tcp but i can with http?
===
I have a WCF service running on the IIS with a ServiceHostFactory. It's running fine with the WSHttpBinding but because of the speed and everything being on the same network (no firewalls) i want to speed up things a bit using the NetTcpBinding instead.
When i try to do that i get this error:
Could not connect to net.tcp://zzz.xxx.yyy/MyService.svc.
The connection attempt lasted for a time span of 00:00:01.0464395.
TCP error code 10061: No connection could be made because the target machine
actively refused it x.x.x.x:808.
I'm using `SecurityMode.None` just to make sure that is not screwing me also i tried either of these on two different tries:
binding.Security.Message.ClientCredentialType = MessageCredentialType.None;
binding.Security.Message.ClientCredentialType = TcpClientCredentialType.Windows;,
Also i should point out, that i'm pulling quite a lof of data from one of the service calls, so i also put these (both on the http and the tcp attempts - setting maxMessageSize to 1000000)
binding.MaxReceivedMessageSize = maxMessageSize;
binding.ReaderQuotas.MaxArrayLength = maxMessageSize;
It should be pretty easy getting it to work, so what am I missing?
| 0 | [
2,
483,
92,
22,
38,
31,
6379,
20,
21,
11801,
410,
365,
29,
4275,
9,
38,
7439,
47,
31,
92,
29,
7775,
60,
800,
3726,
3726,
31,
57,
21,
11801,
410,
365,
946,
27,
14,
595,
18,
29,
21,
365,
11694,
17455,
93,
9,
32,
22,
18,
946,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 scope should a DAO typically have.
===
its out of question that a dao will not hold any state.
however, for easiest access to the class, is it better to use prototype( = new every time) or singleton?
simple object creation is cheap for dao's.. it typically only holds a sessionfactory,
accessing the object from a list of singletons may be equally expensive.
| 0 | [
2,
56,
9914,
378,
21,
13,
17104,
2442,
57,
9,
800,
3726,
3726,
82,
70,
16,
1301,
30,
21,
13,
17104,
129,
52,
1027,
186,
146,
9,
207,
15,
26,
27237,
1381,
20,
14,
718,
15,
25,
32,
574,
20,
275,
7063,
5,
800,
78,
352,
85,
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... |
Hibernate Union alternatives
===
What alternatives do I have to implement a union query using hibernate? I know hibernate does not support union queries at the moment, right now the only way I see to make a union is to use a view table.
The other option is to use plain jdbc, but this way I would loose all my example/criteria queries goodies, as well as the hibernate mapping validation that hibernate performs against the tables/columns. | 0 | [
2,
4148,
2102,
8820,
667,
2676,
18,
800,
3726,
3726,
98,
2676,
18,
107,
31,
57,
20,
8713,
21,
667,
25597,
568,
4148,
2102,
8820,
60,
31,
143,
4148,
2102,
8820,
630,
52,
555,
667,
9386,
2829,
35,
14,
688,
15,
193,
130,
14,
104,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Entity Perspectives
===
Context:
So, I am attempting to build a rediculously complex domain model. Talking with the users, there are multiple ways the system will be used (For example: 1 way is from the perspective of the employee; another way is from the perspective of the employer). In actuality, they are multiple applications reusing the core domain.
Question:
Is it wrong to create the domain from multiple perspectives? For instance, to build the domain as the business is run would mean creating all kinds of relationship classes that carry extra information about the entity and so on... However, when running from a particular perspective, the picture is much clearer because most of the relationship classes can be rolled into their parent entity.
Ideas? Rebuttals? Am I completely off-base?
| 0 | [
2,
9252,
18452,
800,
3726,
3726,
4141,
45,
86,
15,
31,
589,
6314,
20,
1895,
21,
402,
596,
22717,
102,
1502,
4603,
1061,
9,
1582,
29,
14,
3878,
15,
80,
50,
1886,
2847,
14,
329,
129,
44,
147,
13,
5,
1106,
823,
45,
137,
161,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best book(s) for learning PHP
===
What book would you recommend for learning PHP? I am proficient with C++ and quite good with C#/Java.
Good websites would also help.
Please just one per response so people can up-vote the books individually. | 4 | [
2,
246,
360,
5,
18,
6,
26,
2477,
13,
26120,
800,
3726,
3726,
98,
360,
83,
42,
12360,
26,
2477,
13,
26120,
60,
31,
589,
28140,
29,
272,
20512,
17,
1450,
254,
29,
272,
5910,
118,
1004,
1385,
9,
254,
13931,
83,
67,
448,
9,
2247,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
is there a perceptual DeltaRGB comparison of two colours (ie: like DeltaE2000)?
===
I was wondering if anyone knows of a reliable Delta RGB formula or code snippet that does colour Delta of the full RGB tri stim values, like how DeltaE 2000/cmc does Lab/Lch that takes *perceptual* differences into account?. The RGB Colourspace could be any but if it needed to be a particular one I could keep it sRGB for the calculations. C# preferred, but I can convert from any language.
I currently have a very basic rgb delta formula, but I would like to implement something that gets a truer sense of perceptual colour difference. Current right now is
float delta = Math.Sqrt(Math.Pow(r1-r2, 2) + Math.Pow(g1-g2, 2) + Math.Pow(b1-b2, 2));
This is similar to DeltaE 76(lab) but has the same drawbacks where perceptual difference is not taken into account.
PLEASE dont just do a google search and paste the first thing you see! There are lots of Delta RGB formula's out there that may be found but do not take perceptual differences into account. If you have knowledge of this, please comment and/or paste any links to code samples. Also, I already have conversion from RGB to Lab/Lch and then into De2000/cmc. I am not looking for that.
Thanks in advance! | 0 | [
2,
25,
80,
21,
416,
13433,
6948,
6395,
139,
11400,
6050,
16,
81,
8739,
13,
5,
660,
45,
101,
6395,
62,
3050,
6,
60,
800,
3726,
3726,
31,
23,
5712,
100,
1276,
3620,
16,
21,
11398,
6395,
761,
11400,
3729,
54,
1797,
13,
29061,
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... |
When to use a build tool?
===
A beginner question, bear with me: I'm just wondering under what circumstances one should use a build tool like nant or msbuild? I'm working on a medium sized application (.net 3.0), every developer is doing his work and builds on his machine checking his code changes into the repository as he goes. Once we're all done, I'll get all the code from the repository, make a clean build on my machine and we deploy the binaries. Just out of curiosity, where comes the build tool in? | 0 | [
2,
76,
20,
275,
21,
1895,
5607,
60,
800,
3726,
3726,
21,
26931,
1301,
15,
2746,
29,
55,
45,
31,
22,
79,
114,
5712,
131,
98,
5072,
53,
378,
275,
21,
1895,
5607,
101,
13,
11028,
54,
4235,
29361,
60,
31,
22,
79,
638,
27,
21,
41... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 synch access to file between ASP.NET web site and ASP.NET web service on one web server
===
I have deployed ASP.NET web site and ASP.NET web service on the same web server. Both of them require access to shared file.
How to implement/share lock that supports single writers and multiple readers? If somebody reads, nobody can write, but all still can read. If somebody writes, nobody can read/write.
| 0 | [
2,
184,
20,
6063,
673,
1381,
20,
3893,
128,
28,
306,
9,
2328,
2741,
689,
17,
28,
306,
9,
2328,
2741,
365,
27,
53,
2741,
8128,
800,
3726,
3726,
31,
57,
6698,
28,
306,
9,
2328,
2741,
689,
17,
28,
306,
9,
2328,
2741,
365,
27,
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 to decode a CSR File?
===
I ran accross a CSR file (Certificate Signing Request) and I need to extract some information from it.
There's a way to decode it using .NET Framework? | 0 | [
2,
184,
20,
121,
9375,
21,
272,
18,
139,
3893,
60,
800,
3726,
3726,
31,
717,
21,
150,
7703,
21,
272,
18,
139,
3893,
13,
5,
17580,
24831,
591,
5479,
3772,
6,
17,
31,
376,
20,
10962,
109,
676,
37,
32,
9,
80,
22,
18,
21,
161,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Unit testing for safe publication.
===
How would you unittest a safe-publication guarantee in Java?
------------------------------------------------------------
To be concrete:
I have a Cache interface that has a method getOrLoad(K key, ObjectLoader loader). Thing is, if a Cache cannot find an object for the given key, then it must load it from the ObjectLoader instance. However, the Cache is required to guarantee that the act of loading an object from the loader and putting it into the Cache, constitutes a safe publication.
I'm now in the midst of writing a generic junit test for this Cache interface and I wonder how I would test that the Cache implementations adhere to this safe publication guarantee.
Any ideas? The actual code is in the test-systest module part of the [code repository](http://github.com/karmazilla/nanocaching/tree/master) in case you want to poke at the real files. | 0 | [
2,
1237,
4431,
26,
1834,
3176,
9,
800,
3726,
3726,
184,
83,
42,
1237,
10543,
21,
1834,
8,
12259,
857,
9120,
19,
8247,
60,
13,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can't install Visual Studio 2008 after having beta version
===
When trying to install Visual Studio 2008 I get the following message straight away:
"You must uninstall all pre-release products in a specific order before you can continue with setup."
And then it gived me [this link on how to do that][1].
I've been working on this problem for quite some time now, uninstalling the components as best I can (my list did not actually match microsoft's list), and I can find no trace of the beta software of 3.5 framework anywhere.
However, I just remembered something I had to "install" to make my AJAX 1.0 continue to work after installing 3.5 beta 2 - a [**batch script provided by ScottGu**][2]. I don't know enough to understand what it actually does, but maybe this is something I have to undo in order to make the installation work?!
I'm looking for a solution to undo what the batch did, and if that doesn't help I need more tips on how to locate what the problem might be, so that I can finally install Visual Studio 2008.
The content of the batch from ScottGu:
@ECHO OFF
ECHO Disabling publisher policy for System.Web.Extensions.
IF EXIST %windir%\assembly\GAC_MSIL\policy.1.0.System.Web.Extensions\3.5.0.0__31bf3856ad364e35\policy.1.0.System.Web.Extensions.cfg (
REN %windir%\assembly\GAC_MSIL\policy.1.0.System.Web.Extensions\3.5.0.0__31bf3856ad364e35\policy.1.0.System.Web.Extensions.cfg policy.1.0.System.Web.Extensions.cfg.disabled
IF ERRORLEVEL 1 (
ECHO On Windows Vista this script must be run as administrator.
GOTO :END
)
)
ECHO Disabling publisher policy for System.Web.Extensions.Design.
IF EXIST %windir%\assembly\GAC_MSIL\policy.1.0.System.Web.Extensions.Design\3.5.0.0__31bf3856ad364e35\policy.1.0.System.Web.Extensions.Design.cfg (
REN %windir%\assembly\GAC_MSIL\policy.1.0.System.Web.Extensions.Design\3.5.0.0__31bf3856ad364e35\policy.1.0.System.Web.Extensions.Design.cfg policy.1.0.System.Web.Extensions.Design.cfg.disabled
IF ERRORLEVEL 1 (
ECHO On Windows Vista this script must be run as administrator.
GOTO :END
)
)
:END
PAUSE
[1]: http://www.microsoft.com/express/support/uninstall/
[2]: http://weblogs.asp.net/scottgu/archive/2007/07/26/vs-2008-and-net-3-5-beta-2-released.aspx | 0 | [
2,
92,
22,
38,
16146,
3458,
1120,
570,
75,
452,
8434,
615,
800,
3726,
3726,
76,
749,
20,
16146,
3458,
1120,
570,
31,
164,
14,
249,
2802,
1599,
229,
45,
13,
7,
245,
491,
367,
108,
21300,
65,
782,
8,
15202,
1985,
19,
21,
1903,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How ho handle exceptions thrown by asmx services?
===
ASP.NET ajax script service occasionally throws exceptions. However, global.asax Application_Error method do not seem to catch them. The question is, how to catch and log these exceptions? | 0 | [
2,
184,
2189,
3053,
13392,
6027,
34,
28,
79,
396,
687,
60,
800,
3726,
3726,
28,
306,
9,
2328,
20624,
3884,
365,
4533,
13566,
13392,
9,
207,
15,
2062,
9,
8588,
396,
3010,
1,
29992,
2109,
107,
52,
2260,
20,
2949,
105,
9,
14,
1301,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... |
How to initialize an array in c
===
I have a large array in C (not C++ if that makes a difference). I want to initialize all members to the same value. I could swear I once knew a simple way to do this. I could use memset() in my case, but isn't there a way to do this built right into the c syntax? | 0 | [
2,
184,
20,
2104,
2952,
40,
7718,
19,
272,
800,
3726,
3726,
31,
57,
21,
370,
7718,
19,
272,
13,
5,
1270,
272,
20512,
100,
30,
1364,
21,
2841,
6,
9,
31,
259,
20,
2104,
2952,
65,
443,
20,
14,
205,
1923,
9,
31,
110,
6688,
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 factors should effect the Data Access Layer I use on a new project?
===
I will be teaching a class sson, and I need to explain what factors should affect your decision of data access technology.
I am familiar with many data access methods like Typed Data Sets, Linq to SQL, Linq to Entities, .netTiers, LLBLGen, and custom calls with SQL connection objects and command objects.
Some of my clients will only allow stored procedures to be used, and they will NOT discuss anything else.
Some of my clients are NOT ready to install .NET 3.5 yet.
Some clients require a middle web service tier in any web application.
Most of the time I use Types Data Sets and Custom Web Services, or I use .netTiers with CodeSmith. What else should I be thinking about?
| 0 | [
2,
98,
4776,
378,
1590,
14,
1054,
1381,
5385,
31,
275,
27,
21,
78,
669,
60,
800,
3726,
3726,
31,
129,
44,
2540,
21,
718,
13,
4449,
15,
17,
31,
376,
20,
3271,
98,
4776,
378,
6245,
154,
1401,
16,
1054,
1381,
1099,
9,
31,
589,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to create a JNIEnv mock in C/C++
===
I am writing some JNI code in C that I wish to test using cunit. In order to call the JNI functions, I need to create a valid JNIEnv struct.
Does anyone know if there is a mocking framework for such a purpose, or who can give me some pointers on how to create a mock JNIEnv struct myself? | 0 | [
2,
184,
20,
1600,
21,
487,
2913,
20763,
10506,
19,
272,
118,
150,
20512,
800,
3726,
3726,
31,
589,
1174,
109,
487,
889,
1797,
19,
272,
30,
31,
2536,
20,
1289,
568,
272,
15464,
9,
19,
389,
20,
645,
14,
487,
889,
3719,
15,
31,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Efficient traversal of a changelist
===
I have a list of changes to a list - Adds and Deletes. The list could be huge - say 10'000 items.
**I want to know the state of the list after change 9'000.**
I could walk the list from the start all the way to change 9'000. That seems a bit long-winded to me.
I could keep a list of items and record when they're added and when they're deleted, then walk this list to see what is in the list at a particular change. If Adds and Deletes were equally likely, I would halve the number of list elements I would need to walk through...
But Big O notation says that halving the size of the problem doesn't make things more efficient (if I've understood it correctly).
I could cache the state of the list at every 100th or 1000th change... but again, big O says that dividing the number of items by 'n' doesn't make things more efficient.
So what is the efficient way of doing this? Is there an efficient way of doing this?
| 0 | [
2,
8243,
19501,
192,
16,
21,
753,
5739,
800,
3726,
3726,
31,
57,
21,
968,
16,
1693,
20,
21,
968,
13,
8,
10621,
17,
27448,
18,
9,
14,
968,
110,
44,
2329,
13,
8,
395,
332,
22,
3993,
3755,
9,
13,
1409,
49,
259,
20,
143,
14,
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... |
Do web applications need HTML HEADER tags?
===
The question is, should we design applications/forms using headers or stick to spans and divs? When the world was using html to link documents, these header tags looked like the 'Table of contents'. In the new era where html is used for applications, using header tags in the orthodox fashion (i.e. h1 contains h2, h2 contains h3 ...) doesn't make sense. Or does it?
The one place where these seem to make sense is in the context of text browsers or those with CSS disabled. Are there any implications of violating the nesting order (for e.g: h2 being the top level element instead of h1) | 0 | [
2,
107,
2741,
3767,
376,
13,
15895,
157,
106,
3383,
18,
60,
800,
3726,
3726,
14,
1301,
25,
15,
378,
95,
704,
3767,
118,
4190,
18,
568,
157,
445,
54,
5258,
20,
16967,
17,
13,
12916,
18,
60,
76,
14,
126,
23,
568,
13,
15895,
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... |
Be notified when visual/logical child added/removed
===
I am currently looking for a way to be notified when a child is added to the visual or logical children.
I am aware of the Visual::OnVisualChildrenChanged method, but it does not apply to me since I can't always inherit and override this function. I am looking for an event.
So, is there a way for the owner of a FrameworkElement/Visual to be notified when a child is added? | 0 | [
2,
44,
22904,
76,
3458,
118,
14126,
850,
905,
118,
99,
16598,
43,
800,
3726,
3726,
31,
589,
871,
699,
26,
21,
161,
20,
44,
22904,
76,
21,
850,
25,
905,
20,
14,
3458,
54,
11545,
391,
9,
31,
589,
3854,
16,
14,
3458,
45,
45,
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... |
Interface doesn't accept inherited member (OO question)
===
I feel like a fool, but here goes:
public interface IHasErrorController{
ErrorController ErrorController { get; set; }
}
public class DSErrorController: ErrorController{yadi yadi ya}
public class DSWebsiteController : Controller, IHasErrorController{
public DSErrorController ErrorController { get; set; }
}
This gives me an error saying DSWebsiteController.ErrorController cannot implement IHasErrorController despite DSErrorController being inheritted from ErrorController.
Also, suggestions for a better naming so that the type ErrorController and the field Errorcontroller don't look the same are welcome (naming is hard). | 0 | [
2,
6573,
1437,
22,
38,
3440,
7179,
322,
13,
5,
4328,
1301,
6,
800,
3726,
3726,
31,
583,
101,
21,
5345,
15,
47,
235,
1852,
45,
317,
6573,
31,
6482,
29992,
12898,
1252,
1,
7019,
12898,
1252,
7019,
12898,
1252,
13,
1,
164,
73,
309,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Debugging with exceptions: How to work around 'Break when thrown'
===
I'm getting tired of clearing the Debugging->Exceptions option `Break when thrown` to get past an exception I handle properly, then setting the `Break when thrown` option to find the source of a subsequent exception not handled properly.
I would like a way to exclude certain try blocks from `Break when thrown`, with something like preprocessor directives or something. I tried recording a macro, but all it does is opens the Debugging->Exceptions dialogue.
It would be nice to specify, even at a coarser grain, which methods are exempt from `Break when thrown` debugging.
Is this a pipe dream?
| 0 | [
2,
121,
16254,
2762,
29,
13392,
45,
184,
20,
170,
140,
13,
22,
12008,
76,
6027,
22,
800,
3726,
3726,
31,
22,
79,
1017,
4117,
16,
8130,
14,
121,
16254,
2762,
8,
1,
10066,
5757,
4255,
13,
1,
12008,
76,
6027,
1,
20,
164,
640,
40,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Since there is no hash code value in JavaScript, how do you determine equality for two objects?
===
A strict equality operator will tell you if two object **types** are equal, however, is there any way to tell if two objects are equal, much like the hash code value in Java?
This is similar to this question, but requires a more academic answer:
http://stackoverflow.com/questions/194846/is-there-any-kind-of-hashcode-function-in-javascript
The scenario above demonstrates why it would be necessary to have one, and I'm wondering if there is any equivalent solution. | 0 | [
2,
179,
80,
25,
90,
19170,
1797,
1923,
19,
8247,
8741,
15,
184,
107,
42,
3746,
10337,
26,
81,
3916,
60,
800,
3726,
3726,
21,
8170,
10337,
6022,
129,
494,
42,
100,
81,
3095,
13,
1409,
4474,
18,
1409,
50,
2747,
15,
207,
15,
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... |
Automatically enforcing a max database table size by dropping old rows
===
I have an Oracle table which contains event log messages for an application. We don't want this table to grow out of control and eat up too much space, so we'd like to set a cap on the number of rows that it can contain to some big number like one million.
So we'd like to tell Oracle that when the table grows too large, it should delete the oldest rows to make space for new rows.
Is there any way to do this? I imagine we could do this with a trigger or by making all inserts with a stored procedure, but is there anything simpler? | 0 | [
2,
7499,
29296,
21,
2049,
6018,
859,
1072,
34,
6780,
315,
11295,
800,
3726,
3726,
31,
57,
40,
15759,
859,
56,
1588,
807,
6738,
7561,
26,
40,
3010,
9,
95,
221,
22,
38,
259,
48,
859,
20,
3213,
70,
16,
569,
17,
2749,
71,
266,
212... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using system environment variables in log4j xml configuration
===
Is it possible to reference system environment variables (as opposed to Java system properties) in a log4j xml configuration file?
I'd like to be able to do something like:
<level value="${env.LOG_LEVEL}" />
and have it get that from the system environment variables, so I can avoid having to pass in so many things with -D parameters. | 0 | [
2,
568,
329,
2307,
12157,
19,
6738,
300,
728,
23504,
8091,
800,
3726,
3726,
25,
32,
938,
20,
2801,
329,
2307,
12157,
13,
5,
472,
3499,
20,
8247,
329,
3704,
6,
19,
21,
6738,
300,
728,
23504,
8091,
3893,
60,
31,
22,
43,
101,
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 to get a calculated column back in Linq To SQL
===
We are using Linq To SQL with our own data context logic that executes the one linq query across multiple databases. When we get the results back, we need the database for each of the rows. So...
I want to have a property on my class that will return the database name (SQL Server, so DB_NAME()). How can I do this in Linq To Sql? | 2 | [
2,
184,
20,
164,
21,
10785,
4698,
97,
19,
6294,
1251,
20,
4444,
255,
800,
3726,
3726,
95,
50,
568,
6294,
1251,
20,
4444,
255,
29,
318,
258,
1054,
4141,
7085,
30,
15644,
18,
14,
53,
6294,
1251,
25597,
464,
1886,
6018,
18,
9,
76,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Guide to New Vista Features
===
I'm an MFC programmer. I just had my first taste of Vista (on a VPC... Yup, I'm late). I should be evaluating things in depth in the coming days. On taking a casual look, I noticed two major changes:
- The shell is new
- User Access Control
What other new features should I look out for from a programmer's point of view?
| 0 | [
2,
3378,
20,
78,
13520,
967,
800,
3726,
3726,
31,
22,
79,
40,
307,
7061,
17968,
9,
31,
114,
41,
51,
64,
3576,
16,
13520,
13,
5,
218,
21,
566,
5779,
9,
9,
9,
13,
93,
576,
15,
31,
22,
79,
456,
6,
9,
31,
378,
44,
26764,
564... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I share a folder of content between multiple ASP.Net projects in studio?
===
I would like to share 2 folders of content ('stylesheets' and 'graphics') between multiple asp.net projects in a solution.
Is there a way to do this and have studio display the graphics and such appropriately at design time? | 0 | [
2,
184,
92,
31,
1891,
21,
19294,
16,
2331,
128,
1886,
28,
306,
9,
2328,
2314,
19,
1120,
60,
800,
3726,
3726,
31,
83,
101,
20,
1891,
172,
19294,
18,
16,
2331,
13,
5,
22,
4381,
17627,
18,
22,
17,
13,
22,
12084,
18,
22,
6,
128,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Winforms - Dynamic Load / Save Settings
===
I have a "settings file" in my Winforms application called Settings.settings with a partial class for custom methods, etc. Is there a way to load / save dynamic settings based on arbitrary keys?
For example, I have some ListViews in my application in which I want to save / load the column widths; Instead of creating a width setting for each column for each list view I would like a simple method to load / save the widths automatically.
Below is an example of the **save** method I have tried:
internal sealed partial class Settings
{
public void SetListViewColumnWidths(ListView listView)
{
String baseKey = listView.Name;
foreach (ColumnHeader h in listView.Columns)
{
String key = String.Format("{0}-{1}", baseKey, h.Index);
this[key] = h.Width;
}
}
}
When running that code I get the error **"The settings property 'TestsListView-0' was not found."** Is there something I am missing? | 0 | [
2,
628,
4190,
18,
13,
8,
7782,
6305,
13,
118,
2079,
12410,
800,
3726,
3726,
31,
57,
21,
13,
7,
19831,
18,
3893,
7,
19,
51,
628,
4190,
18,
3010,
227,
12410,
9,
19831,
18,
29,
21,
7284,
718,
26,
5816,
3195,
15,
2722,
9,
25,
80... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Importing Active Directory Users and Groups into SQL Server (possibly via c#)
===
I need to import all ad groups in a few OUs into a table in SQL Server 2008. Once I have those I need to import all the members of those groups to a different table. I can use c# to do the work and pass the data to SQL server or do it directly in SQL server.
Suggestions on the best way to approach this?
Thanks | 0 | [
2,
9010,
68,
1348,
16755,
3878,
17,
1170,
77,
4444,
255,
8128,
13,
5,
21628,
1197,
272,
5910,
6,
800,
3726,
3726,
31,
376,
20,
9010,
65,
21,
43,
1170,
19,
21,
310,
13,
1291,
77,
21,
859,
19,
4444,
255,
8128,
570,
9,
382,
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... |
Can't find dynamic controls in datagrid on postback
===
Using .NET 1.1, I have a DataGrid that contains three columns for each row.
Row one has a label with some text.
Row three will always have two radio buttons and two checkboxes and those are in the HTML side of the page.
Row two will have dynamically generated controls (just textboxes for now) and there can be 1 or more per row. These will be used for user input.
There is a button on the page and when the user clicks the button I need to update the DataGrid’s source (my DataTable) with the new values from the user’s input.
The issue is the DataGrid seems to be losing the dynamically generated controls on PostBack. I can loop through each Item in the DataGrid and I can access the radio buttons and the checkboxes, but the textboxes aren’t there.
Any ideas?
| 0 | [
2,
92,
22,
38,
477,
7782,
8671,
19,
1054,
16375,
27,
678,
1958,
800,
3726,
3726,
568,
13,
9,
2328,
137,
9,
165,
15,
31,
57,
21,
1054,
16375,
30,
1588,
132,
7498,
26,
206,
3131,
9,
3131,
53,
63,
21,
1899,
29,
109,
1854,
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... |
MarshalAsAttribute Sizeconst .NET
===
Using C#, does anyone know how to get the MarshalAsAttribute's Sizeconst value in runtime ?
Eg. I would like to retrieve the value of 10.
[StructLayout[LayoutKind.Sequential, Pack=1]
Class StructureToMarshalFrom
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)]
public byte[] _value1;
}
Thanks in advance | 0 | [
2,
7583,
8588,
38,
14755,
1072,
12124,
38,
13,
9,
2328,
800,
3726,
3726,
568,
272,
5910,
15,
630,
1276,
143,
184,
20,
164,
14,
7583,
8588,
38,
14755,
22,
18,
1072,
12124,
38,
1923,
19,
485,
891,
13,
60,
12369,
9,
31,
83,
101,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Making Excel functions affect 'other' cells
===
Let's say that I create a Sub (not a function) whose mission in life is to take the active cell (i.e. Selection) and set an adjacent cell to some value. This works fine.
When you try to convert that Sub to a Function and try to evaluate it from from spreadsheet (i.e. setting it's formula to "=MyFunction()") Excel will bark at the fact that you are trying to affect the value of the non-active cell, and simply force the function to return #VALUE without touching the adjacent cell.
Is it possible to turn off this protective behavior? If not, what's a good way to get around it? I am looking for something a competent developer could accomplish over a 1-2 week period, if possible.
Regards,
Alan.
Note: I am using 2002, so I would favor a solution that would work for that version. Having that said, if future versions make this significantly easier, I'd like to know about it too. | 0 | [
2,
544,
20700,
3719,
6245,
13,
22,
9539,
22,
2934,
800,
3726,
3726,
408,
22,
18,
395,
30,
31,
1600,
21,
972,
13,
5,
1270,
21,
1990,
6,
1196,
1408,
19,
201,
25,
20,
247,
14,
1348,
1667,
13,
5,
49,
9,
62,
9,
3155,
6,
17,
309... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Good drupal books/resources for programmers/developers?
===
I am starting the website development process for a local charity organization and am looking to house the website within a Drupal infrastructure. I am familiar with how to theme things for these kind of CMSs, so that is not at issue.
I am, however, looking for a good print (or e-book) resource on how to use drupal to its best advantage. I am wanting to develop more modules and functions building on the already extensive list of modules available online and become a part of the drupal dev community.
Although this is a little o/t, I am also open to suggestions on the best WYSIWYG editor out there for drupal. Some research has suggested TinyMCE as a possibility. Essentially, no one at this organization has any coding skills and I want to make it as easy as possible to publish updates, whilst still having more extensibility than say, a feature-rich Wordpress page.
Cheers. | 4 | [
2,
254,
15708,
6720,
964,
118,
99,
12097,
18,
26,
17968,
18,
118,
26051,
445,
60,
800,
3726,
3726,
31,
589,
1422,
14,
2271,
522,
953,
26,
21,
375,
4902,
1165,
17,
589,
699,
20,
191,
14,
2271,
363,
21,
15708,
6720,
5282,
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 to get table names from access?
===
INORMATION_SCHEMA table does not exist in an access database :( | 0 | [
2,
184,
20,
164,
859,
1817,
37,
1381,
60,
800,
3726,
3726,
19,
248,
79,
857,
1,
7526,
540,
859,
630,
52,
3182,
19,
40,
1381,
6018,
13,
45,
5,
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... | [
1,
1,
1,
1,
1,
1,
1,
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... |
How do I get which JRadioButton is selected from a ButtonGroup
===
I have a swing application that includes radio buttons on a form. I have the ButtonGroup, however, looking at the available methods, I can't seem to get the name of the selected JRadioButton. Here's what I can tell so far:
- From ButtonGroup, I can perform a getSelection() to return the ButtonModel. From there, I can perform a getActionCommand, but that doesn't seem to always work. I tried different tests and got unpredictable results.
- Also from ButtonGroup, I can get an Enumeration from getElements(). However, then I would have to loop through each button just to check and see if it is the one selected.
Is there an easier way to find out which button has been selected? I'm programing this in Java 1.3.1 and swing. | 0 | [
2,
184,
107,
31,
164,
56,
487,
11129,
811,
444,
25,
1704,
37,
21,
5167,
8024,
800,
3726,
3726,
31,
57,
21,
5587,
3010,
30,
1103,
603,
12861,
27,
21,
505,
9,
31,
57,
14,
5167,
8024,
15,
207,
15,
699,
35,
14,
904,
3195,
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... |
Limit Database List to Ones With Permission SQL Server
===
By default if you connect to a remote SQL Server via an account that has access to say 1 of the 10 databases. You will still see in the Object Explorer all other databases, obviously due to permissions you cannot actually query them, but you can see their names.
I have heard that there is a method that disable this behavior, but I've been unable to find the answer, does anyone know how to do this? To give an example I have a SQL Server called MyDbServer, it has 4 databases,
1. MyDatabase
2. YourDatabse
3. PrivateDatabase
4. ReallyPrivateDb
If you connect via an account that only has permissions to "YourDatabse" you will still see a listing of all other databases, attempts to query will grant "select" permission denied or a similar error.
For security resons, we DO NOT want users to see any database other than the ones they are mapped to. | 0 | [
2,
4496,
6018,
968,
20,
53,
18,
29,
5572,
4444,
255,
8128,
800,
3726,
3726,
34,
12838,
100,
42,
6379,
20,
21,
5388,
4444,
255,
8128,
1197,
40,
2176,
30,
63,
1381,
20,
395,
137,
16,
14,
332,
6018,
18,
9,
42,
129,
174,
196,
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... |
Mounting/Unmounting USB disks on Windows
===
On Windows Server, by default, external USB disks don't always get mounted. I'd like my program (written in C#) to be able to detect external USB disks, identify them, and then mount them.
When it's finished, it should do whatever the programmatic equivalent of "Safely Remove Hardware" in order to flush and unmount the disk.
Any pointers?
| 0 | [
2,
17022,
118,
1020,
9780,
68,
182,
220,
8582,
18,
27,
1936,
800,
3726,
3726,
27,
1936,
8128,
15,
34,
12838,
15,
4886,
182,
220,
8582,
18,
221,
22,
38,
550,
164,
4897,
9,
31,
22,
43,
101,
51,
625,
13,
5,
6390,
19,
272,
5910,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ASP.Net AJAX WCF Authentication Services and Session Timeout
===
Our Web application uses the ASP.Net AJAX Authentication Services to perform login/logout. Everything works great if the login/logout actions are initiated from client side via JavaScript.
Question: When the session times out how do I call the AuthenticationService.Logout function from the SessionEnd event?
Looking for a simple clean way of doing it rather than creating another service layer mapping to the Authentication services and calling that service layer.
Ideas?
TIA | 0 | [
2,
28,
306,
9,
2328,
20624,
11801,
410,
27963,
687,
17,
3723,
85,
1320,
800,
3726,
3726,
318,
2741,
3010,
2027,
14,
28,
306,
9,
2328,
20624,
27963,
687,
20,
2985,
6738,
108,
118,
5567,
1320,
9,
796,
693,
374,
100,
14,
6738,
108,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
escaping formatting characters in java String.format
===
This question is pretty much the same as [this .Net question][1] exept for java.
How do you escape the %1$ characters in a java string.format?
THe reason I need to do this is that I'm building up a string that will later have more info inserted into it. I've thought of having one of the args just be "%1$" but that doesn't seem to be very elegant?
sorry if this is obvious my java is a tad rusty.
[1]: http://stackoverflow.com/questions/91362/how-to-escape-brackets-in-a-format-string-in-net | 0 | [
2,
14700,
2595,
1203,
1766,
19,
8247,
3724,
9,
23588,
800,
3726,
3726,
48,
1301,
25,
1772,
212,
14,
205,
28,
636,
1565,
13,
9,
2328,
1301,
500,
2558,
165,
500,
1396,
3492,
38,
26,
8247,
9,
184,
107,
42,
2220,
14,
13,
11881,
165,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
nearest ancestor node in jQuery
===
In my javascript experience, I found that is a very common task "searching the nearest ancestor of an element with some condition (tag name, class,...)".
Can the parents() method of jquery do the job? The order of returned elements of parents() is predictable? Is top-to-bottom or bottom-to-top?
For the moment I use this utility function:
function ancestor(elem, selector) {
var $elem = $( elem ).parent();
while( $elem.size() > 0 ) {
if( $elem.is( selector ) )
return $elem;
else
$elemento = $elemento.parent();
}
return null;
}
Can someone tell me if there is a clever way to do the job?
| 0 | [
2,
6557,
14628,
15421,
19,
487,
8190,
93,
800,
3726,
3726,
19,
51,
8247,
8741,
1496,
15,
31,
216,
30,
25,
21,
253,
757,
3005,
13,
7,
25136,
68,
14,
6557,
14628,
16,
40,
4520,
29,
109,
2874,
13,
5,
8628,
204,
15,
718,
15,
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 would you notifiy clients about changed data on the server using .Net 2.0?
===
Imagine a WinForms client app that displays fairly complex calculated data fetched from a server app with .Net Remoting over a HTTPChannel.
Since the client app might be running for a whole workday, I need a method to notify the client that new data is available so the user is able to start a reload of the data when he needs to.
Currently I am using remoted .Net events, serializing the event to the client and then rethrowing the event on the side of the client.
I am not very happy with this setup and plan to reimplement it.
Important for me is:
- .Net 2.0 based technology
- easy of use
- low complexity
- robust enough to survive a server or client restart still functional
When limited to .Net 2.0, how would you implement such a feature? What technologies / libraries would you use?
I am looking for inspiration on how to attack the problem. | 0 | [
2,
184,
83,
42,
52,
821,
49,
93,
7421,
88,
1015,
1054,
27,
14,
8128,
568,
13,
9,
2328,
172,
9,
387,
60,
800,
3726,
3726,
4382,
21,
628,
4190,
18,
6819,
4865,
30,
9412,
6647,
1502,
10785,
1054,
13,
28998,
37,
21,
8128,
4865,
29... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it possible to host a TCP endpoint in an IIS6 hosted service?
===
I created a wcf service based on ServiceHostFactory, and i'm hosting it in IIS6.
If i use a HTTP endpoint everything works just fine, but when i try to switch to TCP it goes bad.
Is it even possible to do this in II6?
I have a more specific question posted here, that asks for a solution, but i would be happy with (for starters if not) with just an answer (and perhaps an example) to this - less specific question.
[http://stackoverflow.com/questions/201004/why-cant-i-connect-to-a-wcf-service-with-nettcp-but-i-can-with-http][1]
[1]: http://stackoverflow.com/questions/201004/why-cant-i-connect-to-a-wcf-service-with-nettcp-but-i-can-with-http | 0 | [
2,
25,
32,
938,
20,
2015,
21,
13,
38,
7439,
241,
3132,
19,
40,
595,
18,
379,
2812,
365,
60,
800,
3726,
3726,
31,
679,
21,
11801,
410,
365,
432,
27,
365,
11694,
17455,
93,
15,
17,
31,
22,
79,
10637,
32,
19,
595,
18,
379,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best regular expression for validating email addresses?
===
Over the years I have slowly developed a regular expression that validates MOST email addresses correctly, assuming they don't use an IP address as the server part. Currently the expression is:
^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$
I use this in several PHP programs, and it works most of the time. However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs).
*What's the best regular expression you have or have seen for validating emails?*
I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function.
| 0 | [
2,
98,
25,
14,
246,
1290,
1803,
26,
7394,
1880,
8517,
12636,
60,
800,
3726,
3726,
84,
14,
122,
31,
57,
1447,
885,
21,
1290,
1803,
30,
7394,
7759,
127,
8517,
12636,
12044,
15,
11704,
59,
221,
22,
38,
275,
40,
15735,
3218,
28,
14,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MSTest run fails because source assembly is not trusted
===
I just added xUnit to our test project (for the Asserts, we're still using MSTest as the framework) and immediately the test runs refused to execute any of the tests. This is the error message:
> Failed to queue test run '{ .... }'
> Test run deployment issue: The
> location of the file or directory
> '...xUnit.dll' is not trusted.
| 0 | [
2,
4235,
10543,
485,
13614,
185,
1267,
1475,
25,
52,
9968,
800,
3726,
3726,
31,
114,
905,
993,
15464,
20,
318,
1289,
669,
13,
5,
1106,
14,
10908,
18,
15,
95,
22,
99,
174,
568,
4235,
10543,
28,
14,
6596,
6,
17,
1375,
14,
1289,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Semi-advanced SQL tutorial/ebook/video/something
===
I've recently been posting quite a few questions about database design and I've got some great answers. However, lots of the things that have been mentioned I've never heard of! These things include triggers on databases, constraints (using what looks like a SQL CHECK keyword) and various other things like that.
I guess this is to be expected when most of my SQL and RDBMS knowledge I got from various appendices in the back of programming books giving a "Quick into to SQL".
So...I want to try and fix this now. What I'm looking for are recommendations for good tutorials, webpages, ebooks or anything else that might help me with learning these concepts. I'd prefer something that wasn't directly the documentation for a tool (like MySQL) but was a bit more explained (and if possible more database-agnostic). | 0 | [
2,
1922,
8,
1283,
2686,
11014,
4444,
255,
29724,
118,
62,
5199,
118,
14785,
118,
9099,
800,
3726,
3726,
31,
22,
195,
1989,
74,
15669,
1450,
21,
310,
2346,
88,
6018,
704,
17,
31,
22,
195,
330,
109,
374,
6709,
9,
207,
15,
7503,
16... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is log4net much slower than System.Diagnostics.Trace?
===
I'm investigating the differences between using log4net and <code>System.Diagnostics.Trace</code> for logging, and I'm curious about the performance differences I've observed.
I created a test application to compare the performance of both logging methods in several scenarios, and I'm finding that log4net is significantly slower than the <code>Trace</code> class. For example, in a scenario where I log 1,000 messages with no string formatting, log4net's mean execution time over 1,000 trials is 9.00ms. <code>Trace</code> executes with a mean of 1.13ms. A lot of my test cases have a relatively large amount of variance in the log4net execution times; the periodic nature of outlier long executions seems to suggest GC interference. Poking around with CLR Profiler confirms there are a large amount of collections for a ton of <code>log4net.Core.LoggingEvent</code> objects that are generated (to be fair, it looks like <code>Trace</code> generates a ton of <code>Char[]</code> objects as well, but it doesn't display the large variance that log4net does.)
One thing I'm keeping in mind here are that even though log4net seems roughly 9 times slower than <code>Trace</code>, the difference is 8ms over 1,000 iterations; this isn't exactly a significant performance drain. Still, some of my expected use cases might be calling methods that are logging things hundreds of thousands of times, and these numbers are from my fast machine. On a slower machine more typical of our users' configurations the difference is 170ms to 11ms which is a tiny bit more alarming.
Is this performance typical of log4net, or are there some gotchas that can significantly increase log4net's performance?
(*NOTE: I am aware that string formatting can alter the execution time; I am trying to compare apples to apples and I have test cases with no formatting and test cases with formatting; log4net stays as proportionally slow whether string formatting is used or not.*) | 0 | [
2,
25,
6738,
300,
2328,
212,
14085,
119,
329,
9,
4286,
21944,
18,
9,
38,
7367,
60,
800,
3726,
3726,
31,
22,
79,
12490,
14,
4921,
128,
568,
6738,
300,
2328,
17,
13,
1,
9375,
1,
10724,
9,
4286,
21944,
18,
9,
38,
7367,
1,
118,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I stop Excel from hanging after opening a spreadsheet in IE?
===
I have a web application which provides Excel files via IE 7. It requests the files with an HTTP GET from a URL which returns the data with a content type of 'application/vnd.ms-excel'. It then opens the spreadsheets in an IFrame.
This all works fine unless Excel is already open when a spreadsheet is downloaded. In this case it is still displayed correctly but reuses the instance of Excel which is open. When the IFrame is closed, Excel hangs. Excel only becomes unlocked if the user logs out of the web application or if they download a file of a different type.
Is there some kind of 'disposal' step which I'm not currently doing which would prevent Excel from hanging?
| 0 | [
2,
184,
92,
31,
747,
20700,
37,
4505,
75,
1214,
21,
1789,
17627,
19,
13,
660,
60,
800,
3726,
3726,
31,
57,
21,
2741,
3010,
56,
1927,
20700,
6488,
1197,
13,
660,
453,
9,
32,
12279,
14,
6488,
29,
40,
7775,
164,
37,
21,
287,
6362... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 most efficient way to handle en expired session with ASP.NET 2.0
===
On the site we are building. We need to be able to redirect the user to a default page when his session has ended.
At first sight we used the Session_End with a Response.Redirect to do this job.
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
Response.Redirect("~/global/exit.aspx")
End Sub
But it generates a crapload of *Response is not available in this context* errors. Naturally we don't want to spam our servers error logs.
What is the most efficient way to handle session ending with ASP.NET 2.0?
| 0 | [
2,
98,
25,
14,
127,
8243,
161,
20,
3053,
1957,
15524,
3723,
29,
28,
306,
9,
2328,
172,
9,
387,
800,
3726,
3726,
27,
14,
689,
95,
50,
353,
9,
95,
376,
20,
44,
777,
20,
302,
14706,
14,
4155,
20,
21,
12838,
2478,
76,
33,
3723,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Project Euler Question 3 Help
===
I'm trying to work through Project Euler and I'm hitting a barrier on problem 03. I have an algorithm that works for smaller numbers, but problem 3 uses a very, very large number.
**Problem 03:**
The prime factors of 13195 are 5, 7, 13 and 29.
What is the largest prime factor of the number 600851475143?
Here is my solution in C# and it's been running for I think close to an hour. I'm not looking for an answer because I do actually want to solve this myself. Mainly just looking for some help.
static void Main(string[] args) {
const long n = 600851475143;
//const long n = 13195;
long count, half, largestPrime = 0;
bool IsAPrime;
half = n / 2;
for (long i = half; i > 1 && largestPrime == 0; i--) {
if (n % i == 0) { // these are factors of n
count = 1;
IsAPrime = true;
while (++count < i && IsAPrime) {
if (i % count == 0) { // does a factor of n have a factor? (not prime)
IsAPrime = false;
}
}
if (IsAPrime) {
largestPrime = i;
}
}
}
Console.WriteLine("The largest prime factor is " + largestPrime.ToString() + ".");
Console.ReadLine();
} | 0 | [
2,
669,
28027,
1301,
203,
448,
800,
3726,
3726,
31,
22,
79,
749,
20,
170,
120,
669,
28027,
17,
31,
22,
79,
6687,
21,
8548,
27,
1448,
13,
3601,
9,
31,
57,
40,
9083,
30,
693,
26,
2012,
2116,
15,
47,
1448,
203,
2027,
21,
253,
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's the best way to get aggregate results from NHibernate?
===
For example, I am trying to get a min date, a max date, and a sum in different instances. I am trying to avoid hard coding a SQL string or looping through an IList to get these values. | 0 | [
2,
98,
22,
18,
14,
246,
161,
20,
164,
8544,
1736,
37,
12109,
15191,
8820,
60,
800,
3726,
3726,
26,
823,
15,
31,
589,
749,
20,
164,
21,
4232,
1231,
15,
21,
2049,
1231,
15,
17,
21,
3907,
19,
421,
13946,
9,
31,
589,
749,
20,
26... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Getting Started with RSpec - Looking for tutorials
===
I'm looking to get started building a project and want to use RSpec from day one. My Ruby background is limited, however, I do have a good understanding of MVC and the structure within Rbuy.
In doing some research for books and tutorials, I've found no currently published books, and have found no tutorials that give a good "hello world" type write up. And the documentation on the RSpec site is sparse to say the least.
Do any of you have links you'd like to share of good tutorials of getting started with roR and RSpec? | 0 | [
2,
1017,
373,
29,
13,
1224,
12610,
13,
8,
699,
26,
29724,
18,
800,
3726,
3726,
31,
22,
79,
699,
20,
164,
373,
353,
21,
669,
17,
259,
20,
275,
13,
1224,
12610,
37,
208,
53,
9,
51,
10811,
2395,
25,
1317,
15,
207,
15,
31,
107,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What exactly is Intentional Programming
===
On my reading spree, I stumbled upon something called [Intentional Programming][1].
I understood it somewhat, but I not fully. If anyone can explain it in better detail, please do. Is it being used in any real application?
[1]: http://en.wikipedia.org/wiki/Intentional_programming | 0 | [
2,
98,
1890,
25,
5140,
192,
3143,
800,
3726,
3726,
27,
51,
1876,
28761,
15,
31,
10282,
685,
301,
227,
636,
108,
1316,
3309,
192,
3143,
500,
2558,
165,
500,
9,
31,
4014,
32,
4131,
15,
47,
31,
52,
2337,
9,
100,
1276,
92,
3271,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
WHY is it removed: asp.net MVC CheckBoxList (w/o MVCContrib)
===
Why is the *CheckBoxList* removed from asp.net MVC preview release 5? Currently i don't see any way in which i can create a list of checkboxes (with similiar names but different id's) so people can select 0-1-more options from the list.
There is an *CheckBoxList* list present in the MVCContrib library but it is depreceated. I can understand this for the the other htmlhelpers but there does not seem to be a replacement for the *CheckBoxList* in preview 5.
I would like to create a very simple list like you see below, but what is the best way to do this using asp.net MVC preview releas 5?
<INPUT TYPE="checkbox" NAME="Inhoud" VALUE="goed"> goed <br>
<INPUT TYPE="checkbox" NAME="Inhoud" VALUE="redelijk"> redelijk<br>
<INPUT TYPE="checkbox" NAME="Inhoud" VALUE="matig"> matig<br>
<INPUT TYPE="checkbox" NAME="Inhoud" VALUE="slecht"> slecht
| 0 | [
2,
483,
25,
32,
1974,
45,
28,
306,
9,
2328,
307,
8990,
2631,
5309,
5739,
13,
5,
499,
118,
111,
307,
8990,
1126,
38,
17980,
6,
800,
3726,
3726,
483,
25,
14,
1637,
12542,
5309,
5739,
2483,
1974,
37,
28,
306,
9,
2328,
307,
8990,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I recover files from a corrupted .tar.gz archive?
===
I have a large number of files in a .tar.gz archive. When I try to extract the archive with gunzip, after a delay I receive the message
gunzip: SMS.tar.gz: unexpected end of file
Is there any way to recover even part of the archive? | 0 | [
2,
184,
92,
31,
7635,
6488,
37,
21,
11305,
69,
13,
9,
3958,
9,
263,
380,
9250,
60,
800,
3726,
3726,
31,
57,
21,
370,
234,
16,
6488,
19,
21,
13,
9,
3958,
9,
263,
380,
9250,
9,
76,
31,
1131,
20,
10962,
14,
9250,
29,
1223,
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... |
ASP.NET Masterpages and viewstate
===
I am looking to improve the performance of my site, not because it is performing badly but just as a general exercise. The usual suggestion for asp.net sites is to remove viewstate wherever possible. I believe this can be done by each control on a page separately or for the whole page.
My question is if I disable the page viewstate will this stop the viewstate of controls on a masterpage (as I understand it the masterpage is actually a control on the page). | 0 | [
2,
28,
306,
9,
2328,
1129,
6486,
18,
17,
1418,
3859,
800,
3726,
3726,
31,
589,
699,
20,
3545,
14,
956,
16,
51,
689,
15,
52,
185,
32,
25,
2955,
5730,
47,
114,
28,
21,
297,
5935,
9,
14,
3820,
10910,
26,
28,
306,
9,
2328,
3259,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
on a system with multiple monitors, how to list monitors and maximize a form into one of them?
===
I am working on a .NET application that displays multiple charts. My users would like an easy way to say "take chart #3 and maximize it on my fourth monitor".
How can I determine the number of monitors so I can give them a selection of "monitor #1, monitor #2, etc"? (Not every user has the same number of monitors.)
And once the user has selected a particular monitor, how can I use that information to position the chart they're trying to maximize?
| 0 | [
2,
27,
21,
329,
29,
1886,
18521,
15,
184,
20,
968,
18521,
17,
23952,
21,
505,
77,
53,
16,
105,
60,
800,
3726,
3726,
31,
589,
638,
27,
21,
13,
9,
2328,
3010,
30,
9412,
1886,
5158,
9,
51,
3878,
83,
101,
40,
2010,
161,
20,
395,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C Analog To STL
===
Just because I'm curious--is there any C analog to the functionality of the STL in C++? I've seen mention of a [GTK+][1] library called glib that a few people consider fills the bill but are there other libraries that would provide STL functionality in C?
[1]: http://www.gtk.org | 0 | [
2,
272,
11523,
20,
354,
255,
800,
3726,
3726,
114,
185,
31,
22,
79,
7686,
8,
8,
403,
80,
186,
272,
11523,
20,
14,
18548,
16,
14,
354,
255,
19,
272,
20512,
60,
31,
22,
195,
541,
3794,
16,
21,
636,
263,
38,
197,
2430,
500,
255... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
VS2005 + cant select windows service as project type
===
i was just about to finish up my project and install it as a windows service. I have the installer, etc. - everything i need. When i went to choose Application Type, Windows service does not appear as an option.
Here is the kicker. When I dev in VB.NET, i have that option. The project mentioned above is in c#.
Also, if i try to add a new project, i cannot select windows service as a project type. From within the project i can add a windows service and an installer class.
Any ideas or am i just forgetting something stupid? | 0 | [
2,
4611,
2835,
2754,
2973,
5407,
1936,
365,
28,
669,
1001,
800,
3726,
3726,
31,
23,
114,
88,
20,
2106,
71,
51,
669,
17,
16146,
32,
28,
21,
1936,
365,
9,
31,
57,
14,
16146,
106,
15,
2722,
9,
13,
8,
796,
31,
376,
9,
76,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to deploying a self signed SSL certificate to multiple servers
===
I need to create a self signed SSL certificate and the install the same certificate on two different web servers. For this specific scenario I have two web servers (Win2K3 w/ II6) in a network load balanced configuration.
I have installed the IIS resource tool kit and can use the SelfSSL tool to make a certificate. However my confusion comes from that the tool only registers the certificate on the current machine. How do I go about extracting the certificate in a form that I can then register it on the other web server?
I am not partial to the SelfSSL tool at all, so if I am going about this entirely wrong I am open to alternative instructions. I have seen instructions on how to generate .cer files using OpenSSL but I was really trying to hold off on install OpenSSL unless I really had to.
Thanks! | 0 | [
2,
184,
20,
17617,
68,
21,
1119,
908,
13,
18,
18,
255,
6259,
20,
1886,
17595,
800,
3726,
3726,
31,
376,
20,
1600,
21,
1119,
908,
13,
18,
18,
255,
6259,
17,
14,
16146,
14,
205,
6259,
27,
81,
421,
2741,
17595,
9,
26,
48,
1903,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C# FTP with CD Disabled
===
I'm trying to get the following code working:
string url = String.Format(@"SOMEURL");
string user = "SOMEUSER";
string password = "SOMEPASSWORD";
FtpWebRequest ftpclientRequest = (FtpWebRequest)WebRequest.Create(new Uri(url));
ftpclientRequest.Method = WebRequestMethods.Ftp.ListDirectory;
ftpclientRequest.UsePassive = true;
ftpclientRequest.Proxy = null;
ftpclientRequest.Credentials = new NetworkCredential(user, password);
FtpWebResponse response = ftpclientRequest.GetResponse() as FtpWebResponse;
This normally works, but for 1 particular server this gives an Error 500: Syntax not recognized. The Change Directory command is disabled on the problem server, and the site administrator told me that .NET issues a Change Directory command by default with all FTP connections. Is that true? Is there a way to disable that? | 0 | [
2,
272,
5910,
1187,
306,
29,
1745,
10154,
800,
3726,
3726,
31,
22,
79,
749,
20,
164,
14,
249,
1797,
638,
45,
3724,
287,
6362,
800,
3724,
9,
23588,
5,
1,
7,
3220,
911,
255,
7,
6,
73,
3724,
4155,
800,
13,
7,
3220,
16704,
7,
73... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C# Inheritance
===
I had a coworker see this the other day and I'm not quite sure why this happened. Can anyone explain it?
We have class A:
using System;
using System.Data;
public class A
{
protected DataTable _table
public A()
{
}
}
We have class B that inherits from class A (assume there in the same namespace):
using System;
public class B : A
{
public B()
{
}
}
In the constructor of class B, if I try this._table, it doesn't compile? Why does it not?
But to get it to work, I have to add using System.Data; and everything works fine.
**Why does .NET not do this for me? So that when I try to access the protected member, it knows that its a System.Data.DataTable?**
forgive me if the classes are 100% correct... | 0 | [
2,
272,
5910,
13852,
800,
3726,
3726,
31,
41,
21,
326,
22560,
196,
48,
14,
89,
208,
17,
31,
22,
79,
52,
1450,
562,
483,
48,
1190,
9,
92,
1276,
3271,
32,
60,
95,
57,
718,
21,
45,
568,
329,
73,
568,
329,
9,
18768,
73,
317,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Refreshing LinQ2SQL Model in Designer without loosing all Properties
===
so I'm using LinQ2SQL quite heavily in my current application, and although I have most stuff in partial classes, some things have to be adjusted in the VS Designer (like Accessors for fields I wrap). Then, sometimes I like to name Fields differently in the Model than they do in the DB.
So, my problem now is. When going back to changing a already known table I have only two options:
- Introduce new fields through the
designer manually
- Delete the Table from the Model and newly import it from Server Explorer (loosing properties)
Both ways are unsatisfactory. Is there some secret button I missed out that says "just refresh changes?" I mean, the model knows all mappings, it can't be that difficult to just get new things from the DB.
Any ways around this?
| 0 | [
2,
27134,
6294,
1251,
135,
18,
22402,
1061,
19,
4742,
366,
13,
10165,
18,
68,
65,
3704,
800,
3726,
3726,
86,
31,
22,
79,
568,
6294,
1251,
135,
18,
22402,
1450,
2991,
19,
51,
866,
3010,
15,
17,
419,
31,
57,
127,
3217,
19,
7284,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 obtain the id of a workflow created in Sharepoint Designer?
===
I've written an event receiver that programmatically kicks off a workflow, but it needs the id (guid) of the workflow to start. How do I go about obtaining the id of the workflow(s) I just created in Sharepoint Designer? | 0 | [
2,
184,
107,
31,
5545,
14,
4924,
16,
21,
170,
9990,
679,
19,
1891,
3132,
4742,
60,
800,
3726,
3726,
31,
22,
195,
642,
40,
807,
6264,
30,
625,
6732,
1326,
18320,
168,
21,
170,
9990,
15,
47,
32,
2274,
14,
4924,
13,
5,
7215,
43,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Visual Studio debugger tips & tricks for .NET
===
I've been working for years with VS's debugger, but every now and then I come across a feature I have never noticed before, and think "Damn! How could I have missed that? It's **so** useful!"
[Disclaimer: These tips work in VS 2008 on a C# project, no guarantees for older incarnations of VS or other languages]
###Keep track of object instances###
Working with multiple instances of a given class? How can you tell them apart?
In pre-garbage collection programming days, it was easy to keep track of references - just look at the memory address. With .NET, you can't do that - objects can get moved around.
Fortunately, the watches view lets you right-click on a watch and select 'Make Object ID'.
>>![watches view][1]
This appends a {1#}, {2#} etc. after the instance's value, effectively giving the instance a unique label. It looks like this:
>> ![numbered instance][2]
The label is persisted for the lifetime of that object.
### Meaningful values for watched variables ###
By default, a watched variable's value is it's type. If you want to see its fields, you have to expand it, and this could take a long time (or even timeout!) if there are many fields or they do something complicated.
However, some predefined types show more meaningful information :
- strings show their actual contents
- lists and dictionaries show their elements count etc.
![meaningful info][3]
Wouldn't it be nice to have that for my own types?
Hmm...
...some quality time with .NET Reflector shows how easily this can be accomplished with the `DebuggerDisplay` attribute on my custom type:
[System.Diagnostics.DebuggerDisplay("Employee: '{Name}'")]
public class Employee {
public string Name { get { ... } }
...
}
... re-run, and...
![ta da!][4]
There's a lot more info on the subject here: [MSDN][5]
### Break on all exceptions ###
... even the ones that are handled in code!
I know, I'm such a n00b for not knowing about this ever since I was born, but here it goes anyway - maybe this will help someone someday:
You can force a debugged process to break into debug mode each time an exception is thrown. Ever went on a bug hunt for hours only to come across a piece of code like this?
try {
runStrangeContraption();
} catch(Exception ex) {
/* TODO: Will handle this error later */
}
Catching all exceptions is really handy in these cases.
This can be enabled from *Debug > Exceptions... (Ctrl-Alt-E)*. Tick the boxes in the 'Thrown' column for each type of exception you need.
-----
Those were a few forehead-slapping moments for me.
Would you care to share yours?
[1]: http://img403.imageshack.us/img403/461/52518188cq3.jpg
[2]: http://img383.imageshack.us/img383/7351/11732685bl8.jpg
[3]: http://img205.imageshack.us/img205/4808/37220487md1.jpg
[4]: http://img60.imageshack.us/img60/926/79816018ha1.jpg
[5]: http://msdn.microsoft.com/en-us/magazine/cc163974.aspx | 0 | [
2,
3458,
1120,
121,
2345,
11356,
11034,
279,
13747,
26,
13,
9,
2328,
800,
3726,
3726,
31,
22,
195,
74,
638,
26,
122,
29,
4611,
22,
18,
121,
2345,
11356,
15,
47,
352,
130,
17,
94,
31,
340,
464,
21,
1580,
31,
57,
243,
2711,
115,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to implement URL pattern interpreter as used by Django and RoR in PHP
===
What's the best way to implement a URL interpreter / dispatcher, such as found in [Django][1] and RoR, in PHP?
It should be able to interpret a query string as follows:
+ `/users/show/4` maps to
+ *area* = **Users**
+ *action* = **show**
+ *Id* = **4**
+ `/contents/list/20/10` maps to
+ *area* = **Contents**
+ *action* = **list**
+ *Start* = **20**
+ *Count* = **10**
+ `/toggle/projects/10/active` maps to
+ *action* = **toggle**
+ area = **Projects**
+ *id* = **10**
+ *field* = **active**
Where the query string can be a specified GET / POST variable, or a string passed to the interpreter.
[1]: http://docs.djangoproject.com/en/dev/topics/http/urls/?from=olddocs | 0 | [
2,
184,
20,
8713,
287,
6362,
3732,
19336,
28,
147,
34,
3857,
14541,
17,
761,
248,
19,
13,
26120,
800,
3726,
3726,
98,
22,
18,
14,
246,
161,
20,
8713,
21,
287,
6362,
19336,
13,
118,
14226,
106,
15,
145,
28,
216,
19,
636,
14365,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Shortest Sudoku Solver in Python - How does it work?
===
I was playing around with my own Sudoku solver and was looking for some pointers to good and fast design when I came across this:
def r(a):i=a.find('0');~i or exit(a);[m
in[(i-j)%9*(i/9^j/9)*(i/27^j/27|i%9/3^j%9/3)or a[j]for
j in range(81)]or r(a[:i]+m+a[i+1:])for m in'%d'%5**18]
from sys import*;r(argv[1])
My own implementation solves Sudokus the same way I solve them in my head but how does this cryptic algorithm work?
[http://scottkirkwood.blogspot.com/2006/07/shortest-sudoku-solver-in-python.html][1]
[1]: http://scottkirkwood.blogspot.com/2006/07/shortest-sudoku-solver-in-python.html | 0 | [
2,
23576,
9680,
9266,
8402,
139,
19,
20059,
13,
8,
184,
630,
32,
170,
60,
800,
3726,
3726,
31,
23,
791,
140,
29,
51,
258,
9680,
9266,
8402,
139,
17,
23,
699,
26,
109,
454,
445,
20,
254,
17,
1512,
704,
76,
31,
281,
464,
48,
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... |
Are Dynamic Prepared Statements Bad? (with php + mysqli)
===
I like the flexibility of Dynamic SQL and I like the security + improved performance of prepared statements. So what I really want is Dynamic Prepared Statements, which is troublesome to make because bind_param and bind_result accept "fixed" number of arguments. So I made use of an eval() statement to get around this problem. But I get the feeling this is a bad idea. Here's example code of what I mean
// array of WHERE conditions
$param = array('customer_id'=>1, 'qty'=>'2');
$stmt = $mysqli->stmt_init();
$types = ''; $bindParam = array(); $where = ''; $count = 0;
// build the dynamic sql and param bind conditions
foreach($param as $key=>$val)
{
$types .= 'i';
$bindParam[] = '$p'.$count.'=$param["'.$key.'"]';
$where .= "$key = ? AND ";
$count++;
}
// prepare the query -- SELECT * FROM t1 WHERE customer_id = ? AND qty = ?
$sql = "SELECT * FROM t1 WHERE ".substr($where, 0, strlen($where)-4);
$stmt->prepare($sql);
// assemble the bind_param command
$command = '$stmt->bind_param($types, '.implode(', ', $bindParam).');';
// evaluate the command -- $stmt->bind_param($types,$p0=$param["customer_id"],$p1=$param["qty"]);
eval($command);
Is that last eval() statement a bad idea? I tried to avoid code injection by encapsulating values behind the variable name $param. Does anyone have an opinion or other suggestions? | 0 | [
2,
50,
7782,
3268,
9015,
896,
60,
13,
5,
1410,
13,
26120,
2754,
51,
18,
1251,
1210,
6,
800,
3726,
3726,
31,
101,
14,
19401,
16,
7782,
4444,
255,
17,
31,
101,
14,
1221,
2754,
3999,
956,
16,
3268,
9015,
9,
86,
98,
31,
510,
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... |
SQL Reporting Services DataConnection Update
===
Is it possible to change the connection string of a published sql reporting services report? I can see the binary field called DataSource in the ReportServer database, but since it's stored as binary I don't think it's easily updatable.
Do I need to republish the report with the correct data source? I'm hoping not since I do not want to have to install VS2003. | 0 | [
2,
4444,
255,
6670,
687,
1054,
25996,
872,
11100,
800,
3726,
3726,
25,
32,
938,
20,
753,
14,
2760,
3724,
16,
21,
467,
4444,
255,
6670,
687,
1330,
60,
31,
92,
196,
14,
14171,
575,
227,
1054,
12097,
19,
14,
2813,
106,
2304,
6018,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Simple java client code for Web Service - something to do with QName???
===
I am getting the following error when I get to the line that invokes a REALLY BASIC web service I have running on Tomcat/Axis.
Element or attribute do not match QName production: QName::=(NCName':')?NCName
Have I got soemthing wrong with QName??- can't even find any useful information about it.
My client code is below:
import javax.xml.namespace.QName;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
public class TestClient {
public static void main(String [] args)
{
try{
String endpoint = "http://localhost:8080/TestWebService/services/DoesMagic";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName( new QName("http://testPackage.fc.com/, doBasicStuff") );
String ret = (String) call.invoke( new Object[] {"some kind of message"} );
System.out.println(ret);
}catch(Exception e){
System.err.println(e.toString());
}
}
}
----------
My web serice code is really basic - just a simple class that returns your input string with a bit of concat text:
public String doBasicStuff(String message)
{
return "This is your message: " + message;
}
| 0 | [
2,
1935,
8247,
6819,
1797,
26,
2741,
365,
13,
8,
301,
20,
107,
29,
2593,
7259,
60,
60,
60,
800,
3726,
3726,
31,
589,
1017,
14,
249,
7019,
76,
31,
164,
20,
14,
293,
30,
28371,
18,
21,
510,
2125,
2741,
365,
31,
57,
946,
27,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the use of base 64 encoding?
===
I've heard people talking about "base 64 encoding" here and there. What is it used for?
Cheers! | 0 | [
2,
98,
25,
14,
275,
16,
1000,
4384,
19608,
60,
800,
3726,
3726,
31,
22,
195,
752,
148,
1582,
88,
13,
7,
8436,
4384,
19608,
7,
235,
17,
80,
9,
98,
25,
32,
147,
26,
60,
10497,
18,
187,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
SQL procedure running time widely divergent
===
I have an application that runs a huge stored procedure on SQL Server 2000. Usually it takes about 1 minute to complete, but occasionally it will take MUCH longer.
Just now I ran it three times in a row in my test system. It took 1:12, 1:23, and 55:25.
What would cause that behavior? There are other things going on in the database, so I wonder if it has something to do with locks. How can I catch this in the act? | 0 | [
2,
4444,
255,
7004,
946,
85,
2525,
29818,
800,
3726,
3726,
31,
57,
40,
3010,
30,
1461,
21,
2329,
8214,
7004,
27,
4444,
255,
8128,
824,
9,
951,
32,
1384,
88,
137,
2038,
20,
1279,
15,
47,
4533,
32,
129,
247,
212,
1045,
9,
114,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Where is my Object being disposed?
===
I have a strange issue: I am using SPContext.Current.Web in a .aspx page, but at the end, I get a "Trying to use an SPWeb object that has been closed or disposed and is no longer valid." error message.
From what I see, SPContext.Current.Web is Disposed by someone, **but I have no idea where**. I just wonder: With Visual Studio 2005's Debugger, can I somehow see where/who disposed an Object? As I neither create nor have the source code, setting breakpoints is a problem.
What would be a good approach for finding out who disposes a given object where, without just randomly commenting out lines? | 0 | [
2,
113,
25,
51,
3095,
142,
17913,
43,
60,
800,
3726,
3726,
31,
57,
21,
2578,
1513,
45,
31,
589,
568,
3782,
1126,
11969,
9,
17657,
9,
14113,
19,
21,
13,
9,
472,
306,
396,
2478,
15,
47,
35,
14,
241,
15,
31,
164,
21,
13,
7,
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... |
Is it possible to communicate with the Visual Studio debugger programmatically while debugging?
===
I would like to control options on the debugger without using the debugging GUI's, preferably from inside the code being debugged. I would think that would be quite difficult, but maybe my debugged code can request a service from independent code that will communicate with the debugger. | 0 | [
2,
25,
32,
938,
20,
8709,
29,
14,
3458,
1120,
121,
2345,
11356,
625,
6732,
1326,
133,
121,
16254,
2762,
60,
800,
3726,
3726,
31,
83,
101,
20,
569,
6368,
27,
14,
121,
2345,
11356,
366,
568,
14,
121,
16254,
2762,
9457,
22,
18,
15,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best Password Management Software for Development Group - looking for suggestions
===
Our development and consulting teams (about 25 people) are looking for software to manage all of the passwords we have for our organization and for our clients. We looked at Keepass but it is not truly a database system nor does it have support for multiple concurrent updates.
Needs:
-Uses database (versus shared text / XML file)
-Ability to segment passwords by project / role / individuals
Wants (but not required):
-Web based
-Mobile support
Anybody have a good recommendation?
Thanks in advance!
-Sig | 0 | [
2,
246,
20884,
1097,
2306,
26,
522,
214,
13,
8,
699,
26,
18389,
800,
3726,
3726,
318,
522,
17,
11146,
952,
13,
5,
6901,
771,
148,
6,
50,
699,
26,
2306,
20,
4705,
65,
16,
14,
20884,
18,
95,
57,
26,
318,
1165,
17,
26,
318,
742... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
urllib.urlopen works but urllib2.urlopen doesn't
===
I have a simple website I'm testing. It's running on localhost and I can access it in my web browser. The index page is simply the word "running". `urllib.urlopen` will successfully read the page but `urllib2.urlopen` will not. Here's a script which demonstrates the problem (this is the actual script and not a simplification of a different test script):
import urllib, urllib2
print urllib.urlopen("http://127.0.0.1").read() # prints "running"
print urllib2.urlopen("http://127.0.0.1").read() # throws an exception
Here's the stack trace:
Traceback (most recent call last):
File "urltest.py", line 5, in <module>
print urllib2.urlopen("http://127.0.0.1").read()
File "C:\Python25\lib\urllib2.py", line 121, in urlopen
return _opener.open(url, data)
File "C:\Python25\lib\urllib2.py", line 380, in open
response = meth(req, response)
File "C:\Python25\lib\urllib2.py", line 491, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python25\lib\urllib2.py", line 412, in error
result = self._call_chain(*args)
File "C:\Python25\lib\urllib2.py", line 353, in _call_chain
result = func(*args)
File "C:\Python25\lib\urllib2.py", line 575, in http_error_302
return self.parent.open(new)
File "C:\Python25\lib\urllib2.py", line 380, in open
response = meth(req, response)
File "C:\Python25\lib\urllib2.py", line 491, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python25\lib\urllib2.py", line 418, in error
return self._call_chain(*args)
File "C:\Python25\lib\urllib2.py", line 353, in _call_chain
result = func(*args)
File "C:\Python25\lib\urllib2.py", line 499, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 504: Gateway Timeout
Any ideas? I might end up needing some of the more advanced features of `urllib2`, so I don't want to just resort to using `urllib`, plus I want to understand this problem. | 0 | [
2,
13,
911,
211,
4598,
9,
911,
16942,
103,
693,
47,
13,
911,
211,
4598,
135,
9,
911,
16942,
103,
1437,
22,
38,
800,
3726,
3726,
31,
57,
21,
1935,
2271,
31,
22,
79,
4431,
9,
32,
22,
18,
946,
27,
375,
11694,
17,
31,
92,
1381,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Removing CSS Class Attribute From Tag in a Custom Server Control
===
Greetings!
I've created a custom button class to render the following:
<span class="btnOrange">
<input type="submit" id="ctl00_MainContent_m_GoBack" value="Back" name="ctl00$MainContent$m_GoBack"/>
</span>
However, it renders like this instead (note the extraneous "class" attribute in the INPUT tag):
<span class="btnOrange">
<input type="submit" class="btnOrange" id="ctl00_MainContent_m_GoBack" value="Back" name="ctl00$MainContent$m_GoBack"/>
</span>
My custom button class looks like this:
[ToolboxData(@"<{0}:MyButton runat=server></{0}:MyButton>")]
public class MyButton : Button
{
public override void RenderBeginTag(HtmlTextWriter writer)
{
writer.AddAttribute(HtmlTextWriterAttribute.Class, this.CssClass);
writer.RenderBeginTag("span");
base.RenderBeginTag(writer);
}
public override void RenderEndTag(HtmlTextWriter writer)
{
writer.RenderEndTag();
base.RenderEndTag(writer);
}
}
Since I only need to set the class attribute for the SPAN tag, is it possible to not include or "blank out" the class attribute for the INPUT tag? | 0 | [
2,
9096,
272,
18,
18,
718,
35,
14755,
37,
3383,
19,
21,
5816,
8128,
569,
800,
3726,
3726,
13769,
18,
187,
31,
22,
195,
679,
21,
5816,
5167,
718,
20,
16535,
14,
249,
45,
13,
1,
18,
3206,
718,
3726,
7,
220,
38,
251,
8366,
7,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
coding idea for desktop monitoring software
===
All,
I've to develop a tool for monitoring helpdesk agents. I can figure out how to capture keyboard events and mouse events; however I need to capture the control that emitted/consumed the event too. Is it possible to find that out?
thank you, | 0 | [
2,
13,
15458,
882,
26,
17404,
8984,
2306,
800,
3726,
3726,
65,
15,
31,
22,
195,
20,
2803,
21,
5607,
26,
8984,
448,
3196,
197,
5125,
9,
31,
92,
1465,
70,
184,
20,
3683,
8896,
963,
17,
7567,
963,
73,
207,
31,
376,
20,
3683,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to undo a delete oparation in SQL Server 2005?
===
Our Test DB is suddenly missing rows. We want them back.
Is there a way to sift through everything that has happened to the database today? Each SQL statement? I presume this kind of stuff is in the transaction log, but am not sure how to view it.
Is there a way to undo delete operations?
BTW: Yes, we do have a backup, but would prefer to find the cause of the deletion as well... | 0 | [
2,
184,
20,
367,
537,
21,
27448,
13,
11490,
5946,
19,
4444,
255,
8128,
812,
60,
800,
3726,
3726,
318,
1289,
13,
9007,
25,
1605,
2863,
11295,
9,
95,
259,
105,
97,
9,
25,
80,
21,
161,
20,
26865,
120,
796,
30,
63,
1190,
20,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the proper order for installing Microsoft software on a developer workstation?
===
I've done this a **million** times ... setting up a developer work station.
Is there a best practices, or installation checklist for installing Microsoft development software on a work station? What about applying updates and/or service packs? Is there a specific order for doing this, in hopes of minimizing any install issues.
Our current software library consists of:
- Visual Studio 2003
- Visual Studio 2008
- SQL Server 2005
- Microsoft Office 2007
We do use some other tools, but I usually hold off on installing them once I get a **good** build from Microsoft ... whether a **good** build is possible or not is another topic! =)
Also, do you use any software like [Ghost][1] to create images of work station? Some easy way to restore your work station.
[1]: http://www.symantec.com/norton/ghost | 0 | [
2,
98,
25,
14,
4119,
389,
26,
25429,
7099,
2306,
27,
21,
10058,
170,
10839,
60,
800,
3726,
3726,
31,
22,
195,
677,
48,
21,
13,
1409,
14428,
1409,
436,
13,
9,
9,
9,
2697,
71,
21,
10058,
170,
312,
9,
25,
80,
21,
246,
5242,
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... |
best design for a changelog / auditing database table?
===
i need to create a database table to store different change log/auditing
(when something was added,deleted,modified,etc). i dont need to store particularly detailed info, so i was thinking something along the lines of:
- id (for event)
- user that triggered it
- event name
- event description
- timestamp of the event
am i missing something here? obviously i can keep improving the design, although i dont plan on making it complicated (creating other tables for event types or stuff like that is out of the question since it's a complication for my need)
| 0 | [
2,
246,
704,
26,
21,
753,
5567,
13,
118,
13471,
68,
6018,
859,
60,
800,
3726,
3726,
31,
376,
20,
1600,
21,
6018,
859,
20,
1718,
421,
753,
6738,
118,
7150,
242,
68,
13,
5,
3185,
301,
23,
905,
15,
24249,
1427,
15,
13670,
4462,
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... |
Any way to make "find references" work for web methods?
===
I'm looking for a way to find references to a web method in other code that may use it. Right-click and choose find references doesn't make it through the wsdl interface to other classes in my solution that reference those web methods. This is part of a clean-up effort - I'm trying to remove outdated/old/unused methods.
I can search by name but its not the same as searching by signature.
I realize that normally, webmethods/webservices could be called by other applications remotely but that's not the case with this webservice/these webmethods. My app is the only app calling them. I'm not asking to find references existing outside my solution. | 0 | [
2,
186,
161,
20,
233,
13,
7,
19811,
7231,
7,
170,
26,
2741,
3195,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
161,
20,
477,
7231,
20,
21,
2741,
2109,
19,
89,
1797,
30,
123,
275,
32,
9,
193,
8,
150,
10129,
17,
3538,
477,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 should I add multiple identical elements to a div with jQuery
===
I need to add multiple empty divs to a container element using jQuery.
At the moment I am generating a string containing the empty html using a loop
divstr = '<div></div><div></div>...<div></div>';
and then injecting that into my container:
$('#container').html(divstr);
Is there a more elegant way to insert multiple, identical elements? | 0 | [
2,
184,
378,
31,
3547,
1886,
6323,
2065,
20,
21,
13,
12916,
29,
487,
8190,
93,
800,
3726,
3726,
31,
376,
20,
3547,
1886,
2424,
13,
12916,
18,
20,
21,
12147,
4520,
568,
487,
8190,
93,
9,
35,
14,
688,
31,
589,
13500,
21,
3724,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Dow do you set ASP.NET Development Web Server to not cache any content?
===
I use the ASP.NET Development Web server (also known as the Visual Studio Development Web server) to do local web site debugging and testing.
I've pretty much found exact functionality with IIS with the dev web server. However - where can you manage the settings of the dev web server - specifically regarding never caching any content ever.
This of course is useful in a development scenario where I dont want to have to clear my cache... | 0 | [
2,
14103,
107,
42,
309,
28,
306,
9,
2328,
522,
2741,
8128,
20,
52,
16522,
186,
2331,
60,
800,
3726,
3726,
31,
275,
14,
28,
306,
9,
2328,
522,
2741,
8128,
13,
5,
2573,
167,
28,
14,
3458,
1120,
522,
2741,
8128,
6,
20,
107,
375,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Dynamic Table Data disappearing upon ImageButton Click
===
I have a form that searches all rows in a single table (TServices) that occurred between the date range and then populates a dynamic table below the form.
Now I'm adding a delete ImageButton next to each listing in the table. Here's my C# code-behind for adding the ImageButtons to the table cell:
ImageButton btnRemoveService = new ImageButton();
btnRemoveService.EnableViewState = true;
btnRemoveService.ImageUrl = "/images/icons/trash.gif";
btnRemoveService.Click += new ImageClickEventHandler(btnRemoveService_Click);
btnRemoveService.ID = "btnRemoveService-" + row["BillingID"].ToString();
btnRemoveService.CommandArgument = row["BillingID"].ToString();
tblCell.Controls.Add(btnRemoveService);
Even if I put nothing in btnRemoveService_Click(), all my data from the dynamic table disappears. When I put in the code to actually delete the stored procedure, the data disappears from the dynamic table and nothing is changed in the db.
I assume this is something about the flow of .NET actions that I don't understand, because this kind of things happens to me every now and again, and I have no clue what I'm missing. Thanks!
| 0 | [
2,
7782,
859,
1054,
16797,
685,
1961,
811,
444,
10840,
800,
3726,
3726,
31,
57,
21,
505,
30,
19994,
65,
11295,
19,
21,
345,
859,
13,
5,
38,
11449,
18,
6,
30,
2437,
128,
14,
1231,
978,
17,
94,
1675,
12383,
18,
21,
7782,
859,
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... |
.NET inheritance with generic interfaces
===
Hallo i am currently playing around with castle projects ActiveRecord and the remoting facility.
my current problem is that i need the find a way the implement the save sub from IBaseRepository in my address class and i dont know how.
here is my current code, VS tells me on the line "implements IAddress"
that i have to implement Sub Save(obj As IAddress) for [Shared].IBaseRepository(Of [Shared].IAddress)
and on line Public Overrides Sub Save(ByVal obj As Address) Implements IBaseRepository(Of IAddress).Save
that i cant implement Save cause there is no Sub Save in [Shared].IBaseRepository(Of [Shared].IAddress)
i just dont get it :(
please enlighten me.
tia
`Public Interface IBaseRepository(Of T As Class)
Sub Save(ByVal obj As T)
End Interface`
`Public Interface IAddress
Inherits IBaseRepository(Of IAddress)
Property Guid() As Guid
Property CompanyName() As String
Property Surename() As String
Property Christianname() As String
End Interface`
`Public Class BaseRepository(Of T As Class)
Inherits MarshalByRefObject
Implements IBaseRepository(Of T)`
Protected mediator As ActiveRecordMediator(Of T)
Public Overridable Sub Save(ByVal obj As T) Implements IBaseRepository(Of T).Save
ActiveRecordMediator(Of T).Save(obj)
End Sub
`End Class`
`<ActiveRecord("Address")> _
Public Class Address
Inherits BaseRepository(Of Address)
Implements IAddress`
Public Overrides Sub Save(ByVal obj As Address) Implements IBaseRepository(Of IAddress).Save
MyBase.Save(obj)
End Sub
`End Class`
| 0 | [
2,
13,
9,
2328,
13852,
29,
12733,
6573,
18,
800,
3726,
3726,
554,
111,
31,
589,
871,
791,
140,
29,
1339,
2314,
1348,
14953,
17,
14,
302,
7662,
68,
2646,
9,
51,
866,
1448,
25,
30,
31,
376,
14,
477,
21,
161,
14,
8713,
14,
2079,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
finding largest increasing subset of an array (non-contiguous)
===
How can I find the largest increasing (non-contiguous) subset of an array? For example, if A= array(50,1,4,9,2,18,6,3,7,10) the largest increasing non-contiguous subset is either (1,4,6,7,10) or (1,2,6,7,10). I can intuitively see how to find the subset, but I don't know how to design the algorithm.
thanks. | 0 | [
2,
3007,
1075,
3425,
16622,
16,
40,
7718,
13,
5,
3951,
8,
1126,
8407,
9627,
6,
800,
3726,
3726,
184,
92,
31,
477,
14,
1075,
3425,
13,
5,
3951,
8,
1126,
8407,
9627,
6,
16622,
16,
40,
7718,
60,
26,
823,
15,
100,
21,
3726,
7718,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
When would I use XML instead of SQL?
===
I've been working on database-driven web applications for a few years now and recently took on a project involving a CMS that is XML-capable. This has got me to thinking about the usage of XML/XSLT in general and in what situations it would be more useful than the approach I've always used, which is storing all of my data in a (My)SQL database and then using PHP/Python/etc. to work with it on the web as needed.
There's obviously something I'm not "getting" here.. could anyone give me examples of applications where storing the data in XML files instead of in a database would be preferable? | 4 | [
2,
76,
83,
31,
275,
23504,
700,
16,
4444,
255,
60,
800,
3726,
3726,
31,
22,
195,
74,
638,
27,
6018,
8,
14489,
2741,
3767,
26,
21,
310,
122,
130,
17,
1989,
199,
27,
21,
669,
4838,
21,
2390,
18,
30,
25,
23504,
8,
4666,
579,
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... |
JBOSS admin console?
===
I know that JBOSS has the JMX-Console for administration. My question is, is there any command line admin tool which comes with JBOSS using which the status of various services under the control of JBOSS can be tested? | 0 | [
2,
487,
10349,
18,
21,
43,
2160,
8650,
60,
800,
3726,
3726,
31,
143,
30,
487,
10349,
18,
63,
14,
487,
79,
396,
8,
12124,
6069,
26,
1603,
9,
51,
1301,
25,
15,
25,
80,
186,
1202,
293,
21,
43,
2160,
5607,
56,
1624,
29,
487,
103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Identifying COM components in a .NET application
===
I've inherited a .NET application that pulls together about 100 dlls built by two teams or purchased from vendors. I would like to quickly identify whether a given dll is a .NET assembly or a COM component. I realize that I could just invoke ildasm on each dll individually and make a note if the dll does not have a valid CLR header, but this approach seems clumsy and difficult to automate. | 0 | [
2,
13785,
13,
960,
5090,
19,
21,
13,
9,
2328,
3010,
800,
3726,
3726,
31,
22,
195,
7179,
21,
13,
9,
2328,
3010,
30,
8071,
429,
88,
808,
13,
43,
211,
18,
392,
34,
81,
952,
54,
2432,
37,
19787,
9,
31,
83,
101,
20,
976,
5808,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 simple script to convert C++ enum to string?
===
Supose we have some named enums:
enum MyEnum {
FOO,
BAR = 0x50
};
What I googled for is a script (any language) that scans all the headers in my project and generates a header with one function per enum.
char* enum_to_string(MyEnum t);
And a implementation with something like this:
char* enum_to_string(MyEnum t){
switch(t){
case FOO:
return "FOO";
case BAR:
return "BAR";
default:
return "INVALID ENUM";
}
}
The gotcha is really with typedefed enums, and unnamed C style enums. Does anybody now somethig for this? | 0 | [
2,
25,
80,
21,
1935,
3884,
20,
8406,
272,
20512,
1957,
723,
20,
3724,
60,
800,
3726,
3726,
2538,
15690,
95,
57,
109,
377,
1957,
723,
18,
45,
1957,
723,
51,
219,
723,
13,
1,
4310,
111,
15,
748,
800,
713,
396,
2290,
13,
1,
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... |
How can I fix my .htaccess to resolve URLs that don't end in slashes
===
I am using wordpress and use custom permalink structure: /%category%/%postname%/
My problem is that a decent number of people link to the site without including the trailing slash in the URL, so users get a 404 page.
I'm using the default .htaccess file that comes with wordpress because no solution I've tried has worked. I've tried using the Redirection plugin, with no success.
I'd gladly link to the site, but I don't want it to be construed as self-promotion. If you ask, I'll provide a link.
Could anyone help me find a plugin or provide some .htaccess entries to help resolve this?
Thanks very much! | 0 | [
2,
184,
92,
31,
6098,
51,
13,
9,
9020,
20604,
20,
9854,
13,
911,
7532,
30,
221,
22,
38,
241,
19,
14098,
160,
800,
3726,
3726,
31,
589,
568,
833,
5890,
17,
275,
5816,
416,
540,
6258,
1411,
45,
13,
118,
11881,
14375,
93,
11881,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Are there any Ant conventions similar to Maven2 conventions?
===
For the past 2 years-(ish) I've been using [Maven2][1] for my build/continuous integration solution. I used [Ant][2] a bit before that but really didn't get a lot of experience with it. Now I've taken a new job and the team I'm on now uses Ant.
What I'm wondering about is this:
In Maven we had directory conventions for seperating our java source and files and java test files ([JUnit][3] tests). It looked like this:
Project-
-src/main/java
-src/test/java
This way your tests are separate from your source/production code and won't be built/deployed as such.
Going over the Ant documentation I don't really see any convention for this. Am I missing something? Is there a similar convention in Ant?
[1]: http://maven.apache.org
[2]: http://ant.apache.org
[3]: http://junit.org | 0 | [
2,
50,
80,
186,
40,
38,
15117,
835,
20,
1216,
3124,
135,
15117,
60,
800,
3726,
3726,
26,
14,
640,
172,
122,
8,
5,
1595,
6,
31,
22,
195,
74,
568,
636,
540,
3124,
135,
500,
2558,
165,
500,
26,
51,
1895,
118,
13391,
9627,
8078,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 String.Split that returns a generic list?
===
I'd like to do something like this:
Dim Foo as String = "a,b,c,d,e"
Dim Boo as List(of String) = Foo.Split(","c)
Of course `Foo.Split` returns a one-dimensional array of `String`, not a generic `List`. Is there a way to do this without iterating through the array to turn it into a generic `List`?
| 0 | [
2,
25,
80,
40,
4602,
20,
3724,
9,
25603,
30,
4815,
21,
12733,
968,
60,
800,
3726,
3726,
31,
22,
43,
101,
20,
107,
301,
101,
48,
45,
5937,
4310,
111,
28,
3724,
800,
13,
7,
58,
15,
220,
15,
150,
15,
43,
15,
62,
7,
5937,
9827... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 could cause a .NET WinForms app to close suddently without a dialog?
===
Our WinForms application has been reported to occasionally just close on its own. It neither shows our own crash error submit dialog nor Windows' error submit dialog, it just closes and is gone, often when the person was afk and not doing anything with the application. It seems to be a semi-rare occurrence, maybe like 2-3 times a month, and it's happened to more than one person. I have no idea where to start with getting a repro case or where to begin tracking this down.
C#
.NET 2.0
Reported cases are on Win XP
Anyone have any ideas? | 0 | [
2,
98,
110,
1679,
21,
13,
9,
2328,
628,
4190,
18,
4865,
20,
543,
4224,
38,
102,
366,
21,
28223,
60,
800,
3726,
3726,
318,
628,
4190,
18,
3010,
63,
74,
1117,
20,
4533,
114,
543,
27,
82,
258,
9,
32,
3028,
1285,
318,
258,
4597,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
syslog output for log4r example
===
Can some one post an example of using syslog outputter for log4r, I am currently using stdout but want to log to syslog.
mylog = Logger.new 'mylog'
mylog.outputters = Outputter.stdout
mylog.info "Starting up."
raj
| 0 | [
2,
10315,
18,
5567,
5196,
26,
6738,
300,
139,
823,
800,
3726,
3726,
92,
109,
53,
678,
40,
823,
16,
568,
10315,
18,
5567,
5196,
815,
26,
6738,
300,
139,
15,
31,
589,
871,
568,
354,
43,
1320,
47,
259,
20,
6738,
20,
10315,
18,
55... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Linq To SQL - how to have property not from table but from DB
===
We are using Linq To SQL with our own data context logic that executes the one linq query across multiple databases. When we get the results back, we need the database for each of the rows. So...
I want to have a property on my class that will return the database name (SQL Server, so DB_NAME()). How can I do this in Linq To Sql?
**NOTE: We have hundreds of databases and do not want to put views in each db. The return should come back as just another property on each row of the return result set.** | 0 | [
2,
6294,
1251,
20,
4444,
255,
13,
8,
184,
20,
57,
1354,
52,
37,
859,
47,
37,
13,
9007,
800,
3726,
3726,
95,
50,
568,
6294,
1251,
20,
4444,
255,
29,
318,
258,
1054,
4141,
7085,
30,
15644,
18,
14,
53,
6294,
1251,
25597,
464,
188... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 WIN32 API WM_REFLECT message for?
===
I can't find documentation for it, even on MSDN... | 0 | [
2,
98,
25,
14,
628,
3125,
21,
2159,
19312,
1,
27977,
2802,
26,
60,
800,
3726,
3726,
31,
92,
22,
38,
477,
13945,
26,
32,
15,
166,
27,
4235,
43,
103,
9,
9,
9,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Is there a .NET Tool/Add-in available which allows you to easily rearrange the order of Regions, Subs, Functions, and Member Variables in a Class?
===
I'm looking for a .NET Add-in that reads in the contents of the Current Document window, lists the header declaration of all Regions, Subs, Functions, and Module Level Variables, and provides a simple Move Up/Move Down buttons to rearrange their order.
| 0 | [
2,
25,
80,
21,
13,
9,
2328,
5607,
118,
14854,
8,
108,
904,
56,
2965,
42,
20,
2351,
2275,
8366,
14,
389,
16,
3332,
15,
972,
18,
15,
3719,
15,
17,
322,
12157,
19,
21,
718,
60,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
13,
9,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I un-escape XML entities easily in .NET
===
I have some code which returns InnerXML for a XMLNode.
The node can contain just some text (with HTML) or XML.
For example:
<XMLNode>
Here is some <strong>HTML</strong>
<XMLNode>
or
<XMLNode>
<XMLContent>Here is some content</XMLContnet>
</XMLNode>
if I get the InnerXML for `<XmlNode>` the HTML tags are returned as XML entities.
I cannot use InnerText because I need to be able to get the XML contents. So all I really need is a way to un-escape the HTML tags, because I can detect if it's XML or not and act accordingly.
I guess I could use HTMLDecode, but will this decode all the XML encoded entities?
| 0 | [
2,
184,
107,
31,
367,
8,
62,
13109,
23504,
12549,
2351,
19,
13,
9,
2328,
800,
3726,
3726,
31,
57,
109,
1797,
56,
4815,
3754,
396,
8184,
26,
21,
23504,
251,
546,
9,
14,
15421,
92,
3717,
114,
109,
1854,
13,
5,
1410,
13,
15895,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it possible to load two versions of the .NET runtime in the same process?
===
There are two scenarios I need to clarify:
1. An executable compiled with .NET 3.5 needs to use a library compiled with .NET 1.1 and the library must run on the 1.1 runtime.
2. An executable compiled with .NET 1.1 needs to use a library compiled with .NET 3.5.
I cannot find a reliable source stating that it is not possible to load two versions of the .NET runtime and Microsoft's documentation is very vague on this matter. | 0 | [
2,
25,
32,
938,
20,
6305,
81,
3281,
16,
14,
13,
9,
2328,
485,
891,
19,
14,
205,
953,
60,
800,
3726,
3726,
80,
50,
81,
19611,
31,
376,
20,
23116,
45,
137,
9,
40,
1396,
17194,
5924,
9316,
29,
13,
9,
2328,
203,
9,
264,
2274,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.