unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
OpenQuery to DB2/AS400 from SQL Server 2000 causing locks
===
Every morning we have a process that issues numerous queries (~10000) to DB2 on an AS400/iSeries/i6 (whatever IBM calls it nowadays), in the last 2 months, the operators have been complaining that our query locks a couple of files preventing them from completing their nightly processing. The queries are very simplisitic, e.g
Select [FieldName] from OpenQuery('<LinkedServerName>', 'Select [FieldName] from [LibraryName].[FieldName] where [SomeField]=[SomeParameter]')
I am not an expert on the iSeries side of the house and was wondering if anyone had any insight on lock escalation from an AS400/Db2 perspective. The ID that is causing the lock has been confirmed to be the ID we registered our linked server as and we know its most likely us because the [Library] and [FileName] are consistent with the query we are issuing.
This has just started happening recently. Is it possible that our select statements which are causing the AS400 to escalate locks? The problem is they are not being released without manual intervention. | 0 | [
2,
368,
8190,
93,
20,
13,
9007,
9298,
472,
7114,
37,
4444,
255,
8128,
824,
3242,
12941,
800,
3726,
3726,
352,
959,
95,
57,
21,
953,
30,
1549,
1548,
9386,
2829,
13,
5,
1,
1036,
3993,
6,
20,
13,
9007,
135,
27,
40,
28,
7114,
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... |
overflows in size_t additions
===
I like to have my code warning free for VS.NET and GCC, and I like to have my code 64 bit ready.
Today I wrote a little module that deals with in memory buffers and provides access to the data via a file-style interface (e.g. you can read bytes, write bytes, seek around ect.).
As the data-type for current read position and size I used size_t since that seemes to be the most natural choice. I get around the warnings and it ought to work in 64 bit as well.
Just in case: My structure looks like this:
typedef struct
{
unsigned char * m_Data;
size_t m_CurrentReadPosition;
size_t m_DataSize;
} MyMemoryFile;
The sign-ness (is this the correct word btw?) of size_t seems not to be defined in practice. A Google code-search proved that.
Now I'm in a dilemma: I want to check additions with size_t for overflows because I have to deal with user supplied data and third party libraries will use my code. However, for the overflow check I have to know the sign-ness. It makes a huge difference in the implementation.
So - how the heck should I write such a code in a platform and compiler independent way?
Can I check the sign-ness of size_t at run or compile-time? That would solve my problem. Or maybe size_t wasn't the best idea at the first place?
Any ideas? | 0 | [
2,
20285,
18,
19,
1072,
1,
38,
848,
18,
800,
3726,
3726,
31,
101,
20,
57,
51,
1797,
3590,
551,
26,
4611,
9,
2328,
17,
489,
3384,
15,
17,
31,
101,
20,
57,
51,
1797,
4384,
1142,
1451,
9,
786,
31,
738,
21,
265,
12613,
30,
10342... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 does the standard 404 page appear?
===
I am building a simple HTTP server for a project.
Most websites have custom 404 error pages. Sometimes though, you'll see Firefox spitting a generic 404 page (or 405, etc...).
How does it decide what to do?
What should the HTTP response be?
Is "HTTP/1.0 404 NOT FOUND" enough?
Thanks | 0 | [
2,
76,
630,
14,
1236,
13,
23397,
2478,
1893,
60,
800,
3726,
3726,
31,
589,
353,
21,
1935,
7775,
8128,
26,
21,
669,
9,
127,
13931,
57,
5816,
13,
23397,
7019,
4434,
9,
1030,
362,
15,
42,
22,
211,
196,
535,
18219,
26535,
21,
12733,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Has a system that incorporated a rule engine ever been TRULY successful?
===
Our system (exotic commodity derivative trade capture and risk management) is being redeveloped shortly. One proposal that I have heard is that a rule engine will be incorporated to make it easier for the end-users (commodities traders, so fairly sophisticated) to make certain changes to the business logic.
I am a little skeptical of rules engines. The agilist in me wonders if they are just a technical solution to a process problem... ie. it takes too long for our developers to respond to the business's need for change. The solution to that problem should be a more collaborative approach to development, better test coverage, more agile practices all around.
Hearing about situations where a rule engine was truly a boon (especially in a trading environment) would be certainly helpful. | 0 | [
2,
63,
21,
329,
30,
3678,
21,
1828,
1406,
462,
74,
4574,
1300,
60,
800,
3726,
3726,
318,
329,
13,
5,
1706,
9440,
22845,
15776,
1238,
3683,
17,
2029,
1097,
6,
25,
142,
28433,
2100,
9,
53,
5149,
30,
31,
57,
752,
25,
30,
21,
1828... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Storing credit card details
===
I have a business requirement that forces me to store a customer's full credit card details (number, name, expiry date, CVV2) for a short period of time.
Rationale: If a customer calls to order a product and their credit card is declined on the spot you are likely to lose the sale. If you take their details, thank them for the transaction and then find that the card is declined, you can phone them back and they are more likely to find another way of paying for the product. If the credit card is accepted you clear the details from the order.
I cannot change this. The existing system stores the credit card details in clear text, and in the new system I am building to replace this I am clearly _not_ going to replicate this!
My question, then, is how I can securely store a credit card for a short period of time. I obviously want some kind of encryption, but what's the best way to do this?
Environment: C#, WinForms, SQL-Server. | 0 | [
2,
25615,
3251,
2056,
3289,
800,
3726,
3726,
31,
57,
21,
508,
8981,
30,
879,
55,
20,
1718,
21,
7705,
22,
18,
503,
3251,
2056,
3289,
13,
5,
16299,
15,
204,
15,
1396,
2159,
622,
1231,
15,
272,
20492,
135,
6,
26,
21,
502,
620,
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... |
Best way to check when a specified date occurs
===
Are there any classes in the .NET framework I can use to throw an event if time has caught up with a specified DateTime object?
If there isn't, what are the best practices when checking this? Create a new thread constantly checking? A timer (heaven forbid ;) )? | 0 | [
2,
246,
161,
20,
2631,
76,
21,
9931,
1231,
3690,
800,
3726,
3726,
50,
80,
186,
2684,
19,
14,
13,
9,
2328,
6596,
31,
92,
275,
20,
3814,
40,
807,
100,
85,
63,
1383,
71,
29,
21,
9931,
1231,
891,
3095,
60,
100,
80,
2532,
22,
38,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Online Code Beautifier And Formatter
===
What are the best online Code Beautifier And Formatter out there? | 0 | [
2,
2087,
1797,
7821,
38,
16292,
17,
26,
24700,
800,
3726,
3726,
98,
50,
14,
246,
2087,
1797,
7821,
38,
16292,
17,
26,
24700,
70,
80,
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... | [
1,
1,
1,
1,
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... |
Ambiguous class members in vb.net
===
I am trying to use a class from a C# assembly in vb.net. The class has ambiguous members because vb.net is case insensitive. The class is something like this:
<pre>
public class Foo {
public enum FORMAT {ONE, TWO, THREE};
public FORMAT Format {
get {...}
set {...}
}
}
</pre>
I try to access the enum: Foo.FORMAT.ONE
This is not possible because there is also a property named 'format'.
I can not change the C# assembly. How can I get around this and reference the enum from vb.net?
| 0 | [
2,
22154,
718,
443,
19,
13,
20468,
9,
2328,
800,
3726,
3726,
31,
589,
749,
20,
275,
21,
718,
37,
21,
272,
5910,
1475,
19,
13,
20468,
9,
2328,
9,
14,
718,
63,
22154,
443,
185,
13,
20468,
9,
2328,
25,
610,
19,
19435,
9,
14,
71... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Build Eclipse Java Project from Command Line
===
Is there a way to compile an Eclipse-based Java project from the command line?
I'm trying to automate my build (using FinalBuilder not ant), and I'm neither a Java nor Eclipse expert. I can probably figure out how to do this with straight java command line options, but then the Eclipse project feels like a lot of wasted effort.
In the event that there is no way to compile and Eclipse project via the command line, is there a way to generate the required java command line from within Eclipse? Or are there some files I can poke around to find the compile steps it is doing behind the scenes? | 0 | [
2,
1895,
11652,
8247,
669,
37,
1202,
293,
800,
3726,
3726,
25,
80,
21,
161,
20,
26561,
40,
11652,
8,
1281,
8247,
669,
37,
14,
1202,
293,
60,
31,
22,
79,
749,
20,
3108,
5281,
51,
1895,
13,
5,
12655,
426,
20904,
52,
40,
38,
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... |
SQL Switch/Case in where clause
===
I tried searching around but couldn't find anything that would help me out.
I'm trying to do this in SQL:
declare @locationType varchar(50);
declare @locationID int;
SELECT column1, column2
FROM viewWhatever
WHERE
CASE @locationType
WHEN 'location' THEN account_location = @locationID
WHEN 'area' THEN xxx_location_area = @locationID
WHEN 'division' THEN xxx_location_division = @locationID
I know that I shouldn't have to put '= @locationID' at the end of each one but I can't get the syntax even close to being correct. SQL keeps complaining about my '=' on the first WHEN line...
Help!
Thanks in advance | 0 | [
2,
4444,
255,
5521,
118,
10325,
19,
113,
9040,
800,
3726,
3726,
31,
794,
5792,
140,
47,
711,
22,
38,
477,
602,
30,
83,
448,
55,
70,
9,
31,
22,
79,
749,
20,
107,
48,
19,
4444,
255,
45,
10123,
13,
1,
19032,
4474,
4033,
5433,
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... |
Index varchar on MS SQL 2005
===
I need to index a varchar field on my table in MS SQL 2005, but it's not clear to me how to do so. If I try to add a non-clustered index on the field, it says "Column 'xxxx' in table 'mytable' is of a type that is invalid for use as a key column in an index"
My table has an auto-increment int ID that is set as the primary key on the table. If I set this property as the index, and then add my varchar column as an "included column", the index goes through. But I'm not sure that's what I want - I want to be able to search the table based on the varchar field alone, and my understanding of indexes was that all indexed elements had to be provided to actually see a speedup in the query, but I don't want to have to included the int ID (because I don't know what it is, at the time of this given query).
Am I trying to do this incorrectly? Would the ID + my varchar as an included column accomplish what I am looking for? | 0 | [
2,
4348,
4033,
5433,
27,
4235,
4444,
255,
812,
800,
3726,
3726,
31,
376,
20,
4348,
21,
4033,
5433,
575,
27,
51,
859,
19,
4235,
4444,
255,
812,
15,
47,
32,
22,
18,
52,
1207,
20,
55,
184,
20,
107,
86,
9,
100,
31,
1131,
20,
354... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
need access to Class Object via Function Pointer - Binary Search Tree Class Creation Related
===
Creating Traversals for Binary Search Tree with Recursion.
void inOrder(void (*inOrderPtr)(T&))
{
if(this->left != NULL)
inOrder((*inOrderPtr)(this->left));
inOrderPtr(this->data);
if(this->right != NULL)
inOrder((*inOrderPtr)(this->right));
}
Here is the function. Now this is obviously wrong. This function is called like this:
first.inOrder(print_vals);
first is the object, and print vals is simply a function that prints what is the data in the object. There are three values for each object, data, left, and right. How do I actually access those items with the function?
| 0 | [
2,
376,
1381,
20,
718,
3095,
1197,
1990,
454,
106,
13,
8,
14171,
2122,
1541,
718,
2502,
1597,
800,
3726,
3726,
2936,
19501,
192,
18,
26,
14171,
2122,
1541,
29,
26604,
5991,
9,
11364,
19,
7861,
5,
2625,
1340,
13,
5,
2483,
108,
7861... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Visual Studio 2008 Object Test Bench to work?
===
I'd like to use the Object Test Bench in VS2008. The docs - and even the helpful text in the test bench window - say to right click on class in the Class View. Further reading indicates that this class must be in the startup project or referenced assembly. I've tried this on numerous classes - public, private, static, you name it - in several assemblies (either the startup project or a referenced project), and the context menu item "Create Instance" never appears.
Has anyone had any luck with this? Is this a bug, or am I doing something wrong? | 0 | [
2,
184,
20,
164,
3458,
1120,
570,
3095,
1289,
5689,
20,
170,
60,
800,
3726,
3726,
31,
22,
43,
101,
20,
275,
14,
3095,
1289,
5689,
19,
4611,
2753,
9,
14,
9765,
18,
13,
8,
17,
166,
14,
15600,
1854,
19,
14,
1289,
5689,
1463,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Replacement for XML to represent Data structures in C++
===
At work we have a testing tool that is used to send queries to a data source. The tool takes in input as XML files. The XML files were simple and easy to parse as long as the data structures we tried to represent were one layer deep. But now these data structures are more complex and representing them in XML is getting to be highly confusing. Any thoughts on what I can use to represent the data structures instead of XML ?
Example:
Before,
class Foo {
int userId;
string name;
string address;
string eMail;
}
Now,
class Foo {
int userId,
string name,
vector<Location> loc,
map<string, string> attributes;
}
class Location {
Address addr; //class Address
vector<LocatedTime> lcTime; //class LocatedTime
Position ps; //class Position
}
... and so on to have any number of nested structures.
I was tilting towards JSON but am open to any representation formats.
| 0 | [
2,
4610,
26,
23504,
20,
3501,
1054,
3815,
19,
272,
20512,
800,
3726,
3726,
35,
170,
95,
57,
21,
4431,
5607,
30,
25,
147,
20,
2660,
9386,
2829,
20,
21,
1054,
1267,
9,
14,
5607,
1384,
19,
6367,
28,
23504,
6488,
9,
14,
23504,
6488,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Inconsistent JavaScript Function Results
===
I have this function in my Javascript Code that updates html fields with their new values whenever it is called. The problem cannot be with the function itself because it works brilliantly in every section except for one. Here is the JS function:
function updateFields() {
document.getElementById('bf').innerHTML = bill.time[breakfast][bill.pointPartOfWeek];
document.getElementById('ln').innerHTML = bill.time[lunch][bill.pointPartOfWeek];
document.getElementById('dn').innerHTML = bill.time[dinner][bill.pointPartOfWeek];
document.getElementById('se').innerHTML = bill.time[special][bill.pointPartOfWeek];
document.getElementById('fdr').innerHTML = bill.time[full][bill.pointPartOfWeek];
document.getElementById('cost').innerHTML = bill.cost;
}
And it executes fine in the following instance:
<select onchange='if(this.selectedIndex == 0) {bill.unholiday();updateFields()} else { bill.holiday();updateFields()}' id='date' name='date'>
<option value='else'>Jan. 02 - Nov. 20</option>
<option value='christmas'>Nov. 20 - Jan. 01</option>
</select>
but in this very similar code, the last line of the function doesn't seem to execute (it doesn't update the cost field, but updates everything else)
<select onchange='if(this.selectedIndex == 0) {bill.pointPartOfWeek = 1;} else { bill.pointPartOfWeek = 2;}updateFields();alert(updateFields());' id='day' name='day'>
<option value='0'>Monday thru Thursday</option>
<option value='1'>Friday, Saturday, or Sunday</option>
</select>
<br />
Strangely enough, the total cost variable itself is updated, but the field that represents the variable is not. If you use another section of the page that wouldn't change the value of the total cost but calls the updateFields function again, the cost field then updates correctly. It must be an issue with the function called.
Note: we know that the function executes because it does 5 out of 6 of the things it is supposed to do. This is a strange issue. | 0 | [
2,
22380,
8247,
8741,
1990,
1736,
800,
3726,
3726,
31,
57,
48,
1990,
19,
51,
8247,
8741,
1797,
30,
16779,
13,
15895,
2861,
29,
66,
78,
4070,
6634,
32,
25,
227,
9,
14,
1448,
1967,
44,
29,
14,
1990,
1145,
185,
32,
693,
7472,
102,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 not updating on .SubmitChanges()
===
Is there any reason something like this would not work?
This is the logic I have used many times to update a record in a table with LINQ
DataClasses1DataContext db = new DataClasses1DataContext();
User updateUser = db.Users.Single(e => e.user == user);
updateUser.InUse = !updateUser.InUse;
db.Log = new System.IO.StreamWriter(@"c:\temp\linq.log") { AutoFlush = true };
db.SubmitChanges();
(updateUser.InUse is a bit field)
For some reason it isn't working?
If I check the linq.log it is completely blank?
Could there be a problem with my .dbml? Other tables seem to work fine but I've compared properties in the .dbml and they all match.
Its as if the db.SubmitChanges(); does nto detect any updates being required. | 0 | [
2,
6294,
1251,
52,
71,
43,
1880,
27,
13,
9,
7563,
5130,
16229,
18,
5,
6,
800,
3726,
3726,
25,
80,
186,
1215,
301,
101,
48,
83,
52,
170,
60,
48,
25,
14,
7085,
31,
57,
147,
151,
436,
20,
11100,
21,
571,
19,
21,
859,
29,
6294... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is a 'multi-part identifier' and why can't it be bound?
===
I continually get these errors when I try I update tables based on another table. I end up rewriting the query, change the order of joins, change some groupings and then it eventually works, but I just don't quite get it.
What is a 'multi-part identifier'?
When is a 'multi-part identifier' not able to be bound?
What is it being bound to anyway?
In what cases will this error occur?
What are the best ways to prevent it?
| 0 | [
2,
98,
25,
21,
13,
22,
21531,
8,
3091,
25570,
22,
17,
483,
92,
22,
38,
32,
44,
4138,
60,
800,
3726,
3726,
31,
16609,
164,
158,
11908,
76,
31,
1131,
31,
11100,
7484,
432,
27,
226,
859,
9,
31,
241,
71,
302,
12646,
14,
25597,
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... |
TCP connection quality in .NET
===
I have a mission-critical real-time data application that uses a TCP connection between the client and server. In some cases, the connection periodically dies (SocketException). No problem - just reconnect and move on. However, the customers aren't thrilled with these intermittent drops in connectivity.
I'd like to know where to point the finger. Is it the client or server? Hardware or software? Is it something about the ethernet link? The end result would be to show the user an indicator of connection health, so that a bad link can be investigated and remedied.
**Are there any metrics I can pull from the TcpClient, Socket, or anything else that will tell me about the health of the connection?** Perhaps average time to ack, number of retries, etc?
I specifically want to know about a TCP connection - not just the ethernet connection as a whole (your LAN connection might be dandy, but there could be an issue going to an outside server).
Of course I could ping the remote host, but I don't think that would really give me the kind of stats I'm looking for. For one thing, I could be pinging a router if the server is hiding behind NAT. | 0 | [
2,
13,
38,
7439,
2760,
2190,
19,
13,
9,
2328,
800,
3726,
3726,
31,
57,
21,
1408,
8,
21522,
683,
8,
891,
1054,
3010,
30,
2027,
21,
13,
38,
7439,
2760,
128,
14,
6819,
17,
8128,
9,
19,
109,
1871,
15,
14,
2760,
19886,
8972,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the performance implication of converting to bool in C++?
===
*[This question is related to but not the same as [this one][1].]*
My compiler warns about implicitly converting or casting certain types to bool whereas explicit conversions do not produce a warning:
long t = 0;
bool b = false;
b = t; // performance warning: forcing long to bool
b = (bool)t; // performance warning
b = bool( t ); // performance warning
b = static_cast< bool >( t ); // performance warning
b = t ? true : false; // ok, no warning
b = t != 0; // ok
b = !!t; // ok
This is with Visual C++ 2008 but I suspect other compilers may have similar warnings.
So my question is: what is the performance implication of casting/converting to `bool`? Does explicit conversion have better performance in some circumstance (e.g., for certain target architectures or processors)? Does implicit conversion somehow confuse the optimizer?
Microsoft's [explanation][2] of their warning is not particularly helpful. They imply that there is a good reason but they don't explain it.
[1]: http://stackoverflow.com/questions/206106/is-a-safe-way-to-convert-to-bool-in-c
[2]: http://msdn.microsoft.com/en-us/library/b6801kcy.aspx
| 0 | [
2,
98,
25,
14,
956,
26273,
16,
19583,
20,
1607,
1823,
19,
272,
20512,
60,
800,
3726,
3726,
1637,
2558,
1565,
1301,
25,
1597,
20,
47,
52,
14,
205,
28,
636,
1565,
53,
500,
2558,
165,
500,
9,
500,
2483,
51,
21486,
9296,
18,
88,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I profile how long a piece of code takes to execute in Objective-C/Cocoa for optimization purposes
===
Lets say I've got two interchangeable pieces of code and I want to figure out which one of them takes less processor time to execute. How would I do this?
To get a very rough estimation I could just put NSLog() calls on either side of the code I wanted to profile, but it seems like the processor being otherwise very busy could skew the results. | 0 | [
2,
184,
107,
31,
5296,
184,
175,
21,
1855,
16,
1797,
1384,
20,
15644,
19,
7038,
8,
150,
118,
716,
716,
58,
26,
21597,
4612,
800,
3726,
3726,
6884,
395,
31,
22,
195,
330,
81,
6617,
579,
2491,
16,
1797,
17,
31,
259,
20,
1465,
70... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
VB6 support for SQL SMO and .Net 2.0
===
We are trying to move from using SQL DMO to SMO in our COM+ based application, as we are dropping support for SQL Server 2000 and adding support for SQL Server 2008 in addition to SQL Server 2005.
I have been reading around on this, and found this particular quip on <a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=289491&SiteID=1">this microsoft forum:</a>
<blockquote>"SMO is only supported in VB/C#.Net 2005. It requires the .Net 2.0 Framework, which isn't available in VB/VC 6."</blockquote>
Is it true? Googling in general and googling stackoverflow did not throw up and definitive answers.
Is it possible to implement SQL SMO using VB6? | 0 | [
2,
13,
20468,
379,
555,
26,
4444,
255,
13,
18,
1293,
17,
13,
9,
2328,
172,
9,
387,
800,
3726,
3726,
95,
50,
749,
20,
780,
37,
568,
4444,
255,
13,
43,
1293,
20,
13,
18,
1293,
19,
318,
13,
960,
2430,
432,
3010,
15,
28,
95,
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... |
IE6 problem with postback in asp.net
===
Ok I gave up, I've been struggling with this problem the whole day. I would appreciate any kind of help
I have a page that contains a user control that is just a personalized dropdown list . I assign to each item the attribute "onClick=__doPostBack('actrl',0).
when I click the page postback fine and I got the expected results. However in IE6 my page doesnt' change to the new values loaded from the server.
The weird thing is that when I shift + click on the link The page reload fine with all changes.
I tried to disable caching on the page but no luck.
using all this code
Response.CacheControl = "no-cache"
Response.AddHeader("Pragma", "no-cache")
Response.Expires = -1
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1))
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Page.Response.Cache.SetExpires(DateTime.Now.AddDays(-30))
Page.Response.Cache.SetCacheability(HttpCacheability.NoCache)
Page.Response.Cache.SetNoServerCaching()
Page.Response.Cache.SetNoStore()
Response.Cache.SetNoStore()
Also when I debug the application I can see that the generated html to be rendred is correct, but it is not rendered.
This problem happens only in IE6.
I would appreciate any help .
Thanks
| 0 | [
2,
13,
660,
379,
1448,
29,
678,
1958,
19,
28,
306,
9,
2328,
800,
3726,
3726,
5854,
31,
492,
71,
15,
31,
22,
195,
74,
7587,
29,
48,
1448,
14,
979,
208,
9,
31,
83,
8831,
186,
825,
16,
448,
31,
57,
21,
2478,
30,
1588,
21,
415... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SetLimitText() in a CEdit in Vista does not work
===
This is happening on Vista.
I created a new dialog based MFC project to test this. I added a CEdit control to my dialog. I called SetLimitText to let my CEdit receive 100000 characters. I tried both:
this->m_cedit1.SetLimitText(100000);
UpdateData(FALSE);
and
static_cast<CEdit*>(GetDlgItem(IDC_EDIT1))->LimitText(100000);
I placed these calls on InitDialog.
after I paste 6000 characters into my CEdit, it becomes empty and unresponsive. Any ideas as to what is causing this and workarounds to be able to paste long strings of text in a CEdit or any other control? | 0 | [
2,
309,
20565,
11969,
5,
6,
19,
21,
13,
11014,
242,
19,
13520,
630,
52,
170,
800,
3726,
3726,
48,
25,
4942,
27,
13520,
9,
31,
679,
21,
78,
28223,
432,
307,
7061,
669,
20,
1289,
48,
9,
31,
905,
21,
13,
11014,
242,
569,
20,
51... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to set a default value using "short style" properties (VS2008)?
===
How can I setup a default value to a property defined as follow:
public int MyProperty { get; set; }
That is using "prop" [tab][tab] in VS2008 (code snippet).
Is it possible without falling back in the "old way"?:
private int myProperty = 0; // default value
public int MyProperty
{
get { return myProperty; }
set { myProperty = value; }
}
Thanks for your time.
Best regards. | 0 | [
2,
184,
20,
309,
21,
12838,
1923,
568,
13,
7,
10849,
1034,
7,
3704,
13,
5,
710,
18,
2753,
6,
60,
800,
3726,
3726,
184,
92,
31,
18161,
21,
12838,
1923,
20,
21,
1354,
2811,
28,
1740,
45,
317,
19,
38,
51,
10890,
106,
1084,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
copyItemAtURL in Cocoa
===
I'm am trying to make a very simple rsync program with a user interface. All I need is the ability to drag and drop two file paths so one will copy to the other. For now I'm just trying to copy one file on my desktop to a folder on the desktop and that won't even work. I'm using text fields titled "source" and "destination" to take away the file paths I drag into them. I have the following code:
#import "AppController.h"
@implementation AppController
@synthesize source = _source, destination = _destination;
-(IBAction)sync:(id)sender
{
NSFileManager *manager = [[NSFileManager alloc] init];
//NSURL *source = [NSURL fileURLWithPath:@"/Users/crashprophet/Desktop/Time Out Tot Schedule.doc"];
// NSURL *destination = [NSURL fileURLWithPath:@"/Users/crashprophet/Desktop/untitled f older 2"];
NSURL *source = [NSURL URLWithString:self.source.stringValue];
NSURL *destination = [NSURL URLWithString:self.destination.stringValue];
[manager copyItemAtURL:source toURL:destination error:nil];
NSLog(@"The source path is %@ and the destation path is %@",source, destination);
NSLog(@"Got here!");
}
@end
Any ideas? | 0 | [
2,
4344,
2119,
540,
2517,
255,
19,
24507,
800,
3726,
3726,
31,
22,
79,
589,
749,
20,
233,
21,
253,
1935,
761,
9507,
150,
625,
29,
21,
4155,
6573,
9,
65,
31,
376,
25,
14,
2165,
20,
5501,
17,
2804,
81,
3893,
12074,
86,
53,
129,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
requesting date from a multi-dimensional php array
===
I have an array like this:
$tmb = Array(
[xThis] => 12400
[fThat] => 7
[cMore] => Array(
[236] => Array(
[acting_person] => "Test info"
[tThings] => "history"
)
)
)
)
I know how to call xThis(like $tmb['xThis']
but how do I call [acting_person] in a statement like this?
$new = $tmb['xThis'] . $tmb['fThat'] . ??????????????????
Sorry If this is elementary I am really new to PHP. Thanks.
- Tim
| 0 | [
2,
20033,
1231,
37,
21,
1889,
8,
7865,
13,
26120,
7718,
800,
3726,
3726,
31,
57,
40,
7718,
101,
48,
45,
5579,
38,
5024,
800,
7718,
5,
636,
396,
1565,
500,
800,
1,
390,
7114,
636,
410,
887,
500,
800,
1,
453,
636,
150,
1995,
500... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Twitter Bootstrap: Extra 2px padding when I give btn-group a background?
===
I'm trying to give a gradiented border to a button group (that has exactly 4 elements and should fill up the width of its container) but it gets an extra padding of 2 pixels when I add a background/padding to it.
Example: http://jsfiddle.net/wjA2U/
Any recommendations how I can work around this? Would I have to resort to not using those classes at all? | 0 | [
2,
10623,
5894,
16514,
45,
2230,
172,
306,
396,
4432,
3258,
76,
31,
590,
334,
38,
103,
8,
8024,
21,
2395,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
590,
21,
17442,
69,
1862,
20,
21,
5167,
214,
13,
5,
887,
63,
1890,
268,
2065,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Securing Grails plugin controllers
===
Using Grails 2.0.x and the spring security plugin with the default @Secured annotations how can I apply these to secure controllers and actions in a plugin such as the Groovy console plugin?
Given that you can't mix the methods for securing, (i.e. I cannot mix annotations with the interceptUrlMap in Config.groovy) the only way I can think of is to somehow metaProgram the annotation but I don't think this will work either?
Thanks | 0 | [
2,
13498,
489,
7301,
18,
10922,
108,
9919,
18,
800,
3726,
3726,
568,
489,
7301,
18,
172,
9,
387,
9,
396,
17,
14,
1573,
1221,
10922,
108,
29,
14,
12838,
13,
1,
22917,
43,
40,
1270,
7504,
184,
92,
31,
5645,
158,
20,
4315,
9919,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Returning Json data from Orchard Controller using Jquery Ajax
===
I have been trying to get a jquery ajax function to return data from an orchard controller but so far I have not been successful. I have a break point set on the Controller but the code never reaches the controller.
Here is the JQuery function
<table id="tblResults" class="tablesorter">
<thead>
...
</thead>
<tbody>
@foreach (dynamic item in Result)
{
<tr>...</tr>
</tbody>
</table>
<input id="__requesttoken" type="hidden" value="@Html.AntiForgeryTokenValueOrchard()" />
}
@using (Script.Foot())
{
<script type="text/javascript">
//<![CDATA[
$(function () {
$("#tblResults").tablesorter();
setInterval(update, 20000);
});
function update() {
$.ajax({
type: 'POST',
url: '@Url.Action("GetResults", "ResultsController", new { area = "Orchard.App" })',
data: { token: $("#__requesttoken").val() },
success: function (response) {
alert(response);
},
error: function () {
alert('error');
}
});
}
//]]>
</script>
}
And For the ResultsController I just have this
[OutputCache(Duration = 0)]
public JsonResult GetResults()
{
var json = DateTime.Now.ToString();
return Json(json, JsonRequestBehavior.AllowGet);
}
NOTE: The Ajax call executes just fine however what I get for the response is the entire HTML Page.
Thanks in advance | 0 | [
2,
2485,
487,
528,
1054,
37,
12635,
9919,
568,
487,
8190,
93,
20624,
800,
3726,
3726,
31,
57,
74,
749,
20,
164,
21,
487,
8190,
93,
20624,
1990,
20,
788,
1054,
37,
40,
12635,
9919,
47,
86,
463,
31,
57,
52,
74,
1300,
9,
31,
57,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to create div to fill all space between header and footer div
===
I'm working on moving from using tables for layout purposes to using divs (yes, yes the great debate). I've got 3 divs, a header, content and footer. Thea header and footer are 50px each. How do I get the footer div to stay at the bottom of the page, and the content div to fill the space in between? I don't want to hard code the content divs height because the screen resolution can change. | 0 | [
2,
184,
20,
1600,
13,
12916,
20,
3509,
65,
726,
128,
157,
106,
17,
1749,
106,
13,
12916,
800,
3726,
3726,
31,
22,
79,
638,
27,
1219,
37,
568,
7484,
26,
9106,
4612,
20,
568,
13,
12916,
18,
13,
5,
1714,
15,
1643,
14,
374,
4503,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
In ASP.NET is there a differnt way that a file must be transmited in FireFox?
===
I am using APS.NET to transmist a .jar file. This code works perfectly on IE. However on FireFox the file downloads,
corrupt. What is the best way to fix it? Below is the code I am using.
private void TransferFile()
{
try
{
string filePath = Server.MapPath("SomeJarFIle.jar");
FileInfo file = new FileInfo(filePath);
if (file.Exists)
{
// Clear the content of the response
//Response.ClearContent();
Response.Clear();
// LINE1: Add the file name and attachment, which will force the open/cance/save dialog to show, to the header
Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);
// Add the file size into the response header
Response.AddHeader("Content-Length", file.Length.ToString());
// Set the ContentType
Response.ContentType = ReturnExtension(file.Extension.ToLower());
// Write the file into the response
Response.TransmitFile(file.FullName);
// End the response
Response.End();
}
else
{
this.Response.Write("Error in finding file. Please try again.");
this.Response.Flush();
}
}
catch (Exception ex)
{
this.Response.Write(string.Format("Error: {0}", ex.Message));
}
}
private string ReturnExtension(string fileExtension)
{
switch (fileExtension)
{
case ".htm":
case ".html":
case ".log":
return "text/HTML";
case ".txt":
return "text/plain";
case ".doc":
return "application/ms-word";
case ".tiff":
case ".tif":
return "image/tiff";
case ".asf":
return "video/x-ms-asf";
case ".avi":
return "video/avi";
case ".zip":
return "application/zip";
case ".xls":
case ".csv":
return "application/vnd.ms-excel";
case ".gif":
return "image/gif";
case ".jpg":
case "jpeg":
return "image/jpeg";
case ".bmp":
return "image/bmp";
case ".wav":
return "audio/wav";
case ".mp3":
return "audio/mpeg3";
case ".mpg":
case "mpeg":
return "video/mpeg";
case ".rtf":
return "application/rtf";
case ".asp":
return "text/asp";
case ".pdf":
return "application/pdf";
case ".fdf":
return "application/vnd.fdf";
case ".ppt":
return "application/mspowerpoint";
case ".dwg":
return "image/vnd.dwg";
case ".msg":
return "application/msoutlook";
case ".xml":
case ".sdxl":
return "application/xml";
case ".xdp":
return "application/vnd.adobe.xdp+xml";
default:
return "application/octet-stream";
}
}
| 0 | [
2,
19,
28,
306,
9,
2328,
25,
80,
21,
11394,
2877,
161,
30,
21,
3893,
491,
44,
18745,
69,
19,
535,
18219,
60,
800,
3726,
3726,
31,
589,
568,
21,
1919,
9,
2328,
20,
2982,
79,
702,
21,
13,
9,
6300,
3893,
9,
48,
1797,
693,
5759,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
The best way to slurp a file into a string in perl.
===
Yes, There's More Than One Way To Do It (tm), but there must be a canonical or most efficient or most concise way. I'll add answers I know of and see what percolates to the top... | 0 | [
2,
14,
246,
161,
20,
19665,
306,
21,
3893,
77,
21,
3724,
19,
416,
255,
9,
800,
3726,
3726,
1643,
15,
80,
22,
18,
91,
119,
53,
161,
20,
107,
32,
13,
5,
38,
79,
6,
15,
47,
80,
491,
44,
21,
5742,
4272,
54,
127,
8243,
54,
12... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ActiveX control with multiple classes
===
Currently I have an activex control and I registered it to my computer with regsvr32 foo.dll.
(NOTE: This is a third party activex control so I do not actually have the source code for it, just a dll)
When I pull up regedit under the classes I see my dll registered, however it has multiple classes. Foo.class1, Foo.class2 and each one of these classes has there own clsid. When I try and embed this activex control into an html page there is no clsid for the entire control only the clsids for each class. What is the best way to embed this control to have use of its functions.
The company told me to create an activex control and put there activex control inside it. I have been searching the internet but have no idea on how to do that.
Any help would be greatly appreciated!!!
Thanks | 0 | [
2,
1348,
396,
569,
29,
1886,
2684,
800,
3726,
3726,
871,
31,
57,
40,
1348,
396,
569,
17,
31,
3801,
32,
20,
51,
1428,
29,
7953,
18,
6938,
3125,
4310,
111,
9,
43,
211,
9,
13,
5,
10280,
45,
48,
25,
21,
422,
346,
1348,
396,
569,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
building a new site and i'll include podcasts... what to use?
===
I'm going to build a **Classic Music** website and the client already has several podcasts for about 3 min each, and I want to know if **should I just add as QT / WMP file** to listen and a ZIP to download, **or should I use a web podcast hosting** solution and just add the link to them?
...having full cross browser and os system (mac, windows, *nix, mobiles) in mind.
Thanks. | 0 | [
2,
353,
21,
78,
689,
17,
31,
22,
211,
468,
15124,
18,
9,
9,
9,
98,
20,
275,
60,
800,
3726,
3726,
31,
22,
79,
228,
20,
1895,
21,
13,
1409,
19824,
232,
1409,
2271,
17,
14,
6819,
614,
63,
238,
15124,
18,
26,
88,
203,
4232,
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... |
Remove multiple space to normal space
===
How can I remove multiple splace in a string by onlye one space.
Example "1 2 3 4 5" would be : "1 2 3 4 5"? | 0 | [
2,
4681,
1886,
726,
20,
1826,
726,
800,
3726,
3726,
184,
92,
31,
4681,
1886,
13,
18,
5119,
19,
21,
3724,
34,
104,
62,
53,
726,
9,
823,
13,
7,
165,
172,
203,
268,
331,
7,
83,
44,
13,
45,
13,
7,
165,
172,
203,
268,
331,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Using Session[] with Page Load.
===
I want to load the data into session so that when the next button is clicked in crystal report viewer then in should load the data from the datatable instead retrieving the data again from the database. Here goes my code...
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
if (Request.QueryString.Get("id") == "5")
{
string publication = Request.QueryString.Get("pub");
DateTime date = DateTime.Parse(Request.QueryString.Get("date"));
int pages = int.Parse(Request.QueryString.Get("pages"));
int sort = int.Parse(Request.QueryString.Get("sort"));
if (sort == 0)
{
reportpath = Server.MapPath("IssuesReport.rpt");
rpt.Load(reportpath);
DataTable resultSet1 = RetrievalProcedures.IssuesReport(date, publication, pages);
Session["Record"] = resultSet1;
}
DataTable report = (DataTable)Session["Record"];
rpt.SetDataSource(report);
CrystalReportViewer1.ReportSource = rpt;
I am trying this code but when i clicked the next button it gives me the error that invalid report source..i guess the session is null thats why its giving me this error.
Any sugesstions how can I solve this... | 0 | [
2,
568,
3723,
2558,
500,
29,
2478,
6305,
9,
800,
3726,
3726,
31,
259,
20,
6305,
14,
1054,
77,
3723,
86,
30,
76,
14,
328,
5167,
25,
15802,
19,
4282,
1330,
16812,
94,
19,
378,
6305,
14,
1054,
37,
14,
1054,
5924,
700,
13,
6239,
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 to purge my junk mail folder of messages in the Cyrillic alphabet (Outlook 2007)?
===
Recently, my junk mail folder has been filling up with messages composed in what appears (to me) to be the Cyrillic alphabet. If a message body or a message subject is in Cryillic, I want to permanently delete it.
On my screen I see Cyrillic characters, but when I iterate through the messages in VBA within Outlook, the "Subject" property of the message returns a bunch of question marks.
How can I determine if the subject if the message is in Cyrillic characters?
(Note: I have examined the "InternetCodepage" property - it's usually Western European so that doesn't help me)
![Junk Mail Folder with Cyrillic Characters][1]
[1]: http://img360.imageshack.us/img360/5504/screencap20081015175006xi9.jpg | 0 | [
2,
184,
20,
20722,
51,
12096,
4216,
19294,
16,
7561,
19,
14,
18671,
11844,
13,
5,
1320,
5810,
624,
6,
60,
800,
3726,
3726,
1989,
15,
51,
12096,
4216,
19294,
63,
74,
7702,
71,
29,
7561,
1869,
19,
98,
1780,
13,
5,
262,
55,
6,
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... |
Flex alert with TextInput as well as buttons
===
Does anyone know if it is possible to add other controls to a Flex 3 Alert? What I need is a modal dialoge that allows the user to type in a filename before clicking OK or CANCEL. This seems like it would be best achieved with an Alert but in the documentation I don't see an obvious way to add a TextInput (or any other control except a Button). I'd rather not have to reinvent the wheel but if I have to then hey, I'll do it! | 0 | [
2,
14409,
7863,
29,
1854,
108,
4881,
28,
134,
28,
12861,
800,
3726,
3726,
630,
1276,
143,
100,
32,
25,
938,
20,
3547,
89,
8671,
20,
21,
14409,
203,
7863,
60,
98,
31,
376,
25,
21,
13,
20756,
28223,
62,
30,
2965,
14,
4155,
20,
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... |
Why do attribute references act like this with Python inheritance?
===
The following seems strange.. Basically, the somedata attribute seems shared between all the classes that inherited from `the_base_class`.
class the_base_class:
somedata = {}
somedata['was_false_in_base'] = False
class subclassthing(the_base_class):
def __init__(self):
print self.somedata
first = subclassthing()
{'was_false_in_base': False}
first.somedata['was_false_in_base'] = True
second = subclassthing()
{'was_false_in_base': True}
>>> del first
>>> del second
>>> third = subclassthing()
{'was_false_in_base': True}
Defining `self.somedata` in the `__init__` function is obviously the correct way to get around this (so each class has it's own `somedata` dict) - but when is such behavior desirable? | 0 | [
2,
483,
107,
35,
14755,
7231,
601,
101,
48,
29,
20059,
13852,
60,
800,
3726,
3726,
14,
249,
2206,
2578,
9,
9,
11374,
15,
14,
109,
18768,
35,
14755,
2206,
2592,
128,
65,
14,
2684,
30,
7179,
37,
13,
1,
124,
1,
8436,
1,
1898,
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... |
A SQL query that replaces null values.
===
I need a SQL query that returns ContactDate, SortName, City, ContactType, and Summary from the tables below. If any value is null, I need it to return the text “No Entry”.
**ContactTable**
- *ContactID*
- ContactDate
- UserID
- Summary
- ContactType
- SortName
**UserTable**
- *UserID*
- FirstName
- LastName
- AddressID
**AddressTable**
- *AddressID*
- City
- Street
- State
- Zip | 0 | [
2,
21,
4444,
255,
25597,
30,
3934,
18,
16203,
4070,
9,
800,
3726,
3726,
31,
376,
21,
4444,
255,
25597,
30,
4815,
2203,
8209,
15,
2058,
7259,
15,
136,
15,
2203,
4474,
15,
17,
14740,
37,
14,
7484,
1021,
9,
100,
186,
1923,
25,
1620... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 any way I can get .net stack traces in Sql Profiler, or a similar tool?
===
In my previous job I designed and helped build a run-time(production) [Profiler tool][1] that among other cool features was able to give me .Net stack traces for every SQL statement that executed. Think of it as SQL-Server Profiler on steroids. So instead of just seeing SQL statements and duration, you also got the context in which the SQL executed. When developing DB centric apps I find this information a god-send.
The problem is that since this was developed my previous company has been acquired by Symantec, though the tool is still downloadable , it is very unclear what the licensing is and it is not SKU Symnatec is selling.
I was wondering if anyone knows of any similar tools that will give me Stack Traces with my SQL statement executions?
![alt screenshot][2]
[1]: http://www.samsaffron.com/blog/archive/2007/05/11/15.aspx
[2]: http://img151.imageshack.us/img151/4357/profiler1jz3.gif | 0 | [
2,
25,
80,
186,
161,
31,
92,
164,
13,
9,
2328,
7566,
10738,
19,
4444,
255,
5296,
139,
15,
54,
21,
835,
5607,
60,
800,
3726,
3726,
19,
51,
1158,
1205,
31,
1006,
17,
1456,
1895,
21,
485,
8,
891,
5,
11386,
6,
636,
14503,
139,
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 FxCop's CollectionPropertiesShouldBeReadOnly rule incompatible with the spring framework?
===
FxCop has the [CollectionPropertiesShouldBeReadOnly rule][1] that complains if your class has some kind of collection property that clients can set. Instead, it suggests making the property read-only and supplying a Clear() method and Add() or AddRange() methods for changing the contents of the collection.
I agree that makes for a cleaner and more controlled interface, but I'm struggling to make that interface work with the Spring framework. If I want to configure an object with a collection of collaborators, I have to expose some collection property to inject the collaborators into. I've looked through [the Spring documentation][2], and I can't see any way to tell Spring to call the AddRange() method, am I missing something?
For now, I'm going to exclude the warning with a note that it's necessary for Spring configuration.
[1]: http://msdn.microsoft.com/en-ca/ms182327.aspx
[2]: http://springframework.net/docs/1.1.2/reference/html/index.html | 0 | [
2,
25,
13,
16488,
9734,
22,
18,
1206,
10890,
106,
3915,
14941,
863,
10647,
4965,
1828,
19,
20049,
29,
14,
1573,
6596,
60,
800,
3726,
3726,
13,
16488,
9734,
63,
14,
636,
15015,
872,
10890,
106,
3915,
14941,
863,
10647,
4965,
1828,
50... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
WYSIWYG web page editor to use in php web development
===
I'm making a small php website. I find it useful to prototype or layout the pages in a WYSIWYG web page editor.
I'd like to get suggestions on WYSIWIG web page editors that work well in a php development pipeline. Please share your favorites and describe why you like them.
| 0 | [
2,
5809,
18,
49,
7913,
263,
2741,
2478,
1835,
20,
275,
19,
13,
26120,
2741,
522,
800,
3726,
3726,
31,
22,
79,
544,
21,
284,
13,
26120,
2271,
9,
31,
477,
32,
4811,
20,
7063,
54,
9106,
14,
4434,
19,
21,
5809,
18,
49,
7913,
263,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Popular MySQL rss feeds
===
Are there any popular Mysql rss feeds you guys can recommend? IBM has random articles but those are usually not enough | 0 | [
2,
844,
51,
18,
22402,
13,
1224,
18,
17058,
800,
3726,
3726,
50,
80,
186,
844,
51,
18,
22402,
13,
1224,
18,
17058,
42,
2776,
92,
12360,
60,
10233,
63,
5477,
3376,
47,
273,
50,
951,
52,
511,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
What is the best way to implement mixed asp.net forms auth (AD + DB)?
===
I want to implement forms authentication on a asp.net website, the site should seek the user on the database to get some data and then authenticate against LDAP (Active directory) to validate the user-password combo.
After that i need to keep a instance of class that represents the user to use it in various forms.
I tried to do it before with a login control, that checks the previous conditions and do an AuthenticateEventArgs.Authenticated = true and placed the object inside de session: Session ["user"] = authenticatedUser; but i had problem syncronizing both of them (The session expired before the auth cookie and i got NullReferenceExceptions when the pages tried to use the now defunct session object.
Which is the best way to acomplish this? Is there some way to sync the session timeout with the cookie lifespan? The user object should be saved in any other way? did i miss the point?
Thank you. | 0 | [
2,
98,
25,
14,
246,
161,
20,
8713,
2198,
28,
306,
9,
2328,
1997,
10343,
96,
13,
5,
1283,
2754,
13,
9007,
6,
60,
800,
3726,
3726,
31,
259,
20,
8713,
1997,
27963,
27,
21,
28,
306,
9,
2328,
2271,
15,
14,
689,
378,
5048,
14,
415... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
centering content between a header and footer div
===
In a previous question, I learned how to keep a footer div at the bottom of the page. ([see other question][1])
Now I'm trying to virtically center content between the header and footer divs.
so what I've got is:
#divHeader
{
height: 50px;
}
#divContent
{
position:absolute;
}
#divFooter
{
height: 50px;
position:absolute;
bottom:0;
width:100%;
}
<div id="divHeader">
Header
</div>
<div id="divContent">
Content
</div>
<div id="divFooter">
Footer
</div>
I've tried creating a parent div to house the existing 3 divs and giving that div a vertical-align:middle; but that gets me nowhere.
[1]: http://stackoverflow.com/questions/206652/how-to-create-div-to-fill-all-space-between-header-and-footer-div
| 0 | [
2,
459,
68,
2331,
128,
21,
157,
106,
17,
1749,
106,
13,
12916,
800,
3726,
3726,
19,
21,
1158,
1301,
15,
31,
2691,
184,
20,
643,
21,
1749,
106,
13,
12916,
35,
14,
2129,
16,
14,
2478,
9,
13,
5,
2558,
1798,
89,
1301,
500,
2558,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I get the URLs from any tab in any open browser
===
I am trying to detect which web in sharepoint that the user is looking at right now. One approach could be to read the URls from the browser and try to compare them to a reference URL to the sharepoint solution. I have not yet been able to locate any solution that works in both IE and Firefox.
TIA | 0 | [
2,
184,
107,
31,
164,
14,
13,
911,
7532,
37,
186,
6523,
19,
186,
368,
16495,
800,
3726,
3726,
31,
589,
749,
20,
9092,
56,
2741,
19,
1891,
3132,
30,
14,
4155,
25,
699,
35,
193,
130,
9,
53,
2141,
110,
44,
20,
1302,
14,
13,
911... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Does Browser Automatically Clear JavaScript Cache?
===
I have a JavaScript resource that has the possibility of being edited at any time. Once it is edited I would want it to be propagated to the user's browser relatively quickly (like maybe 15 minutes or so), however, the frequency of this resource being editing is few and far between (maybe 2 a month).
I'd rather the resource to be cached in the browser, since it will be retrieved frequently, but I'd also like the cache to get reset on the browser at a semi-regular interval.
I know I can pass a no-cache header when I request for the resource, but I was wondering when the cache would automatically reset itself on the browser if I did not pass no-cache.
I imagine this would be independent for each browser, but I'm not sure.
I tried to Google this, but most of the hits I found were about clearing the browser's cache... which isn't what I'm looking for. | 0 | [
2,
76,
630,
16495,
7499,
1207,
8247,
8741,
16522,
60,
800,
3726,
3726,
31,
57,
21,
8247,
8741,
6577,
30,
63,
14,
4813,
16,
142,
4802,
35,
186,
85,
9,
382,
32,
25,
4802,
31,
83,
259,
32,
20,
44,
24618,
43,
20,
14,
4155,
22,
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... |
Is there any way of performing a logical dump of a Sybase database?
===
When I dump a Sybase database, it doesn't seem to matter whether there's data in the tables or not, the file size is the same. I've been told that this is down to the fact that my dumpfile is binary and not logical. I know that Oracle can use logical dump files, but can I get Sybase to do the same? | 0 | [
2,
25,
80,
186,
161,
16,
2955,
21,
11545,
11424,
16,
21,
10315,
8436,
6018,
60,
800,
3726,
3726,
76,
31,
11424,
21,
10315,
8436,
6018,
15,
32,
1437,
22,
38,
2260,
20,
1161,
1472,
80,
22,
18,
1054,
19,
14,
7484,
54,
52,
15,
14,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best JavaScript Date Parser & Formatter?
===
Since I've started to use jQuery, I have been doing a lot more JavaScript development.
I have the need to parse different date formats and then to display them into another format.
Do you know of any good tool to do this?
Which one would you recommend? | 4 | [
2,
246,
8247,
8741,
1231,
2017,
4104,
279,
26,
24700,
60,
800,
3726,
3726,
179,
31,
22,
195,
373,
20,
275,
487,
8190,
93,
15,
31,
57,
74,
845,
21,
865,
91,
8247,
8741,
522,
9,
31,
57,
14,
376,
20,
2017,
870,
421,
1231,
13767,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
H.264 Streaming Requirements
===
I am looking for more information about the minimum requirements needed for a visitor to successfully stream a 1 Mbps 640x360 H.264-encoded video. I know that the user needs the latest Flash 9 version. I am looking for the minimum requirements for their computers.
We want to switch to this codec for our videos, but do not want to ruin our site for people with slower computers. The question is: how slow is too slow? Will we alienate 1%, 5%, 50%? I really have no idea.
The best information I've found is on Microsoft's site regarding the requirements for 720p playback: http://www.microsoft.com/windows/windowsmedia/content_provider/film/ChoosingPC.aspx
The difference here is that true "high definition" 720p (!280x720) is between 5-10 Mbps. We are streaming half the resolution size and only 1 Mbps.
Any further information would be greatly appreciated. | 0 | [
2,
746,
9,
20470,
11920,
4786,
800,
3726,
3726,
31,
589,
699,
26,
91,
676,
88,
14,
5187,
4786,
851,
26,
21,
10875,
20,
3673,
3766,
21,
137,
14023,
1919,
13,
19780,
396,
19454,
746,
9,
20470,
8,
219,
22254,
763,
9,
31,
143,
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... |
tasklist cpu usage.
===
I'm trying to use tasklist to find out wich process is consuming more than X percent of my CPU ( to later kill it with taskkill )
My question is: How to I know what percent does a time format represents?
The documentations says:
TASKLIST options
/FI filter
And one filter may be:
CPUTIME eq, ne, gt, lt, ge, le CPU time in the format: hh:mm:ss.
hh - number of hours,
mm - minutes, ss - seconds
If I try:
tasklist /FI "CPUTIME gt 00:00:10"
It works
but if I
tasklist /FI "CPUTIME gt 90"
It doesn't
How can I know that time format represent 90%? Or 80?
| 0 | [
2,
3005,
5739,
17578,
7514,
9,
800,
3726,
3726,
31,
22,
79,
749,
20,
275,
3005,
5739,
20,
477,
70,
13,
13583,
953,
25,
13,
17601,
91,
119,
993,
2091,
16,
51,
17578,
13,
5,
20,
138,
1177,
32,
29,
3005,
7577,
13,
6,
51,
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,
1,
1,
1,
1,
1,
1,
1,
1... |
Filtering text through a shell command in emacs
===
In vi[m] there is the [! command which lets me pipe text][1] through a shell command -- like sort or indent -- and get the filtered text back into the buffer. Is there an equivalent in emacs?
Thanks,
Rohit
[1]: http://www.softpanorama.org/Editors/Vimorama/vim_piping.shtml | 0 | [
2,
25272,
1854,
120,
21,
3593,
1202,
19,
13,
62,
6893,
18,
800,
3726,
3726,
19,
1790,
2558,
79,
500,
80,
25,
14,
636,
187,
1202,
56,
6884,
55,
7642,
1854,
500,
2558,
165,
500,
120,
21,
3593,
1202,
13,
8,
8,
101,
2058,
54,
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... |
Code standard refactoring on large codebase
===
My studio has a large codebase that has been developed over 10+ years. The coding standards that we started with were developed with few developers in house and long before we had to worry about any kind of standards related to C++.
Recently, we started a small R&D project in house and we updated our coding conventions to be more suitable for our environment. The R&D work is going to be integrated into existing project code. One major problem facing us is that we now have two standards for the two areas of work, and now the code bases will cross. I don't want two standards at the studio, and I'm actually quite happy to move forward with a single standard. (The 'how' of how we got into this situation isn't important -- just that we are and I had hoped that we wouldn't be.)
The problem is refactoring existing code. I'm not very keen on having two code bases (one relatively small and one very large) looking different. I am interested in doing some refactoring of one of the existing codebases to make it conform to the other standard. The problem is, the smaller code base is (IMO) the more desireable standard.
I started looking around for a tool that could do large scale refactoring for me. I'm not interested in rearranging and tightening code. I'm interested in changing things like
class my_class {}
....
class my_class A;
to
class MyClass {}
....
class MyClass A;
Basically doing function/variable level renaming. I'd prefer not to use something like Visual Assist because that will take a long time. I have upwards of 10000 source/header files with hundreds of thousands of lines of code. Using VA one class at a time would be a time killer and not worth the effort.
I did run across [Vera][1] in another post on SO. That seems like it might do the job and do it well. I'd like to know if anyone has specific experience using Vera for the situation that I'm in, or has any other recommendations for tools that might get the job done. I think that it's important that this tool actually understand code structure so that we don't wind up just renaming variables in a search/replace manner because that will lead to subtle bugs if not done carefully.
Thanks.
[1]: http://www.inspirel.com/vera/ | 0 | [
2,
1797,
1236,
302,
17455,
68,
27,
370,
1797,
8436,
800,
3726,
3726,
51,
1120,
63,
21,
370,
1797,
8436,
30,
63,
74,
885,
84,
332,
2430,
122,
9,
14,
13,
15458,
3364,
30,
95,
373,
29,
46,
885,
29,
310,
10168,
19,
191,
17,
175,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I prevent and/or handle a StackOverflowException? (C#)
===
I would like to either prevent or handle a StackOverflowException that I am getting from a call to the XslCompiledTransform.Transform method within an Xsl Editor I am writing. The problem seems to be that the user can write an Xsl script that is infinitely recursive, and it just blows up on the call to the Transform method. (That is, the problem is not just the typical programmatic error, which is usually the cause of such an exception.)
Is there a way to detect and/or limit how many recursions are allowed? Or any other ideas to keep this code from just blowing up on me?
Thanks. | 0 | [
2,
184,
107,
31,
2501,
17,
118,
248,
3053,
21,
7566,
2549,
9990,
10066,
872,
60,
13,
5,
150,
5910,
6,
800,
3726,
3726,
31,
83,
101,
20,
694,
2501,
54,
3053,
21,
7566,
2549,
9990,
10066,
872,
30,
31,
589,
1017,
37,
21,
645,
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... |
Ruby to Python bridge
===
I am interested in getting some Python code talking to some Ruby code on Windows, Linux and possibly other platforms. Specificlly I would like to access classes in Ruby from Python and call their methods, access their data, create new instances and so on.
An obvious way to do this is via something like XML-RPC or maybe CORBA but I would be interested in any other approaches.
What have other people done to get code from Python and Ruby communicating with one another, either locally on the same system or remotely accross a network?
Thanks in advance. | 0 | [
2,
10811,
20,
20059,
955,
800,
3726,
3726,
31,
589,
3158,
19,
1017,
109,
20059,
1797,
1582,
20,
109,
10811,
1797,
27,
1936,
15,
13024,
17,
2879,
89,
6843,
9,
1903,
211,
93,
31,
83,
101,
20,
1381,
2684,
19,
10811,
37,
20059,
17,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Java IDE market share?
===
Is there an **up-to-date** survey of Java IDE market share published on the web? I found stats from five years ago when I searched.
NB This question is **not designed to be a poll** of the stackoverflow community for favorite Java IDE. However, [that poll does exist](http://stackoverflow.com/questions/152691/is-eclipse-the-best-ide-for-java). | 0 | [
2,
8247,
13,
3448,
1135,
1891,
60,
800,
3726,
3726,
25,
80,
40,
13,
1409,
576,
8,
262,
8,
8209,
1409,
3431,
16,
8247,
13,
3448,
1135,
1891,
467,
27,
14,
2741,
60,
31,
216,
12819,
18,
37,
355,
122,
1464,
76,
31,
9036,
9,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Exact state of committed memory in java
===
Im curious what the exact meaning of "committed" memory is when the value is queried from the MemoryUsage class. That class explains it as "committed represents the amount of memory (in bytes) that is guaranteed to be available for use by the Java virtual machine." Does this mean that the memory is in use by the jvm process and NOT available to other processes until it is released by the java process, or does it mean that the java process will be successful if it tries to allocate up to that amount of memory? I realize this might be implementation specific but i am only interested in hotspot. | 0 | [
2,
5340,
146,
16,
4164,
1912,
19,
8247,
800,
3726,
3726,
797,
7686,
98,
14,
5340,
1813,
16,
13,
7,
960,
18568,
43,
7,
1912,
25,
76,
14,
1923,
25,
9386,
11942,
37,
14,
1912,
267,
1303,
718,
9,
30,
718,
7346,
32,
28,
13,
7,
96... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Redirecting ConsoleOutput containing pseudo-loc (unicode) strings in C#
===
I'm running a console app (myApp.exe) which outputs a pseudo localized (unicode) string to the standard output.
If I run this in a regular command prompt(cmd.exe), the unicode data gets lost.
If I run this in a unicode command prompt(cmd.exe /u) or set the properties of the console to "Lucida Console" then the unicode string is maintained.
I'd like to run this app in C# and redirect the unicode string into a local variable. I'm using a Process object with RedirectStandardOutput = true, but the unicode string is always lost.
How can I specify to persist this unicode info?
private static int RunDISM(string Args, out string ConsoleOutput)
{
Process process = new Process();
process.StartInfo.FileName = "myApp.exe";
process.StartInfo.Arguments = Args;
try
{
process.StartInfo.CreateNoWindow = true;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.WorkingDirectory = Environment.CurrentDirectory;
process.Start();
process.WaitForExit(Int32.MaxValue);
}
catch (Exception e)
{
WEX.Logging.Interop.Log.Assert("Failure while starting or running process.\nERROR: " + e.Message);
ConsoleOutput = null;
return EXITCODE_ERROR;
}
ConsoleOutput = process.StandardOutput.ReadToEnd();
return process.ExitCode;
}
| 0 | [
2,
302,
14706,
68,
8650,
1320,
4881,
3503,
8452,
8,
10799,
13,
5,
8843,
9375,
6,
7887,
19,
272,
5910,
800,
3726,
3726,
31,
22,
79,
946,
21,
8650,
4865,
13,
5,
915,
7753,
9,
1706,
62,
6,
56,
5196,
18,
21,
8452,
24821,
13,
5,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Scrape a dynamic website
===
What is the best method to scrape a dynamic website where most of the content is generated by what appears to be ajax requests? I have previous experience with a Mechanize, BeautifulSoup, and python combo, but Ii am up for something new. | 0 | [
2,
23855,
21,
7782,
2271,
800,
3726,
3726,
98,
25,
14,
246,
2109,
20,
23855,
21,
7782,
2271,
113,
127,
16,
14,
2331,
25,
6756,
34,
98,
1780,
20,
44,
20624,
12279,
60,
31,
57,
1158,
1496,
29,
21,
55,
3606,
2952,
15,
1632,
656,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How to implement producer/consumer using POSIX threads
===
I would like to implement a producer/consumer scenario that obeys interfaces that are roughly:
class Consumer {
private:
vector<char> read(size_t n) {
// If the internal buffer has `n` elements, then dequeue them
// Otherwise wait for more data and try again
}
public:
void run() {
read(10);
read(4839);
// etc
}
void feed(const vector<char> &more) {
// Safely queue the data
// Notify `read` that there is now more data
}
};
In this case, `feed` and `run` will run on separate threads. I will need some kind of mutual exclusion on my deque, and I will need some kind of notification system to inform `read` to try again.
I here **condition variables** are the way to go, but all my multithreading experience lies with Windows and am having a hard time wrapping my head around them.
Thanks for any help!
(Yes, I know it's inefficient to return vectors. Let's not get into that.)
| 0 | [
2,
184,
20,
8713,
1421,
118,
12124,
723,
106,
568,
2353,
6742,
20396,
800,
3726,
3726,
31,
83,
101,
20,
8713,
21,
1421,
118,
12124,
723,
106,
12705,
30,
15410,
18,
6573,
18,
30,
50,
4457,
45,
718,
6461,
13,
1,
932,
45,
7497,
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... |
Is there an equivalent to Java's "kill -3" for a .NET CLR thread dump?
===
Java has the thread dump which is triggered by a signal 3 sent to the process (e.g. "kill -3 PID"). The equivalent I've found for .NET is to use ADPlus (http://support.microsoft.com/kb/286350). This basically attaches a debugger, takes a mini dump, and executes a few commands. I find .NET's approach to be a very brute force, cludgy approach, and it appears to be slower, too.
Does anyone know of any alternatives?
(BTW, I recently found the following URL but haven't tried it: http://www.interact-sw.co.uk/iangblog/2004/11/16/stackdump)
Thanks. | 0 | [
2,
25,
80,
40,
4602,
20,
8247,
22,
18,
13,
7,
7577,
13,
8,
240,
7,
26,
21,
13,
9,
2328,
10842,
139,
9322,
11424,
60,
800,
3726,
3726,
8247,
63,
14,
9322,
11424,
56,
25,
15164,
34,
21,
2800,
203,
795,
20,
14,
953,
13,
5,
62... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is a good book or tutorial on Standard ML?
===
What is a good book or tutorial on Standard ML? | 0 | [
2,
98,
25,
21,
254,
360,
54,
29724,
27,
1236,
13,
8184,
60,
800,
3726,
3726,
98,
25,
21,
254,
360,
54,
29724,
27,
1236,
13,
8184,
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... | [
1,
1,
1,
1,
1,
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... |
What is the best way to update form controls from a worker thread?
===
I've done some research and I can't really find a preferred way to do updating of form controls from a worker thread in C#. I know about the BackgroundWorker component, but what is the best way to do it without using the BackgroundWorker component? | 0 | [
2,
98,
25,
14,
246,
161,
20,
11100,
505,
8671,
37,
21,
7444,
9322,
60,
800,
3726,
3726,
31,
22,
195,
677,
109,
527,
17,
31,
92,
22,
38,
510,
477,
21,
5981,
161,
20,
107,
71,
43,
1880,
16,
505,
8671,
37,
21,
7444,
9322,
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... |
Printing to a specific printer from a web app
===
If I have a printer hooked directly to a pc (a kiosk with a printer), how would I go about creating the ability for a web page (.net web app) to print a jpg to the kiosks printer with no user intervention other than clicking a button on the page? | 0 | [
2,
7312,
20,
21,
1903,
12925,
37,
21,
2741,
4865,
800,
3726,
3726,
100,
31,
57,
21,
12925,
14988,
1703,
20,
21,
5168,
13,
5,
58,
28092,
29,
21,
12925,
6,
15,
184,
83,
31,
162,
88,
2936,
14,
2165,
26,
21,
2741,
2478,
13,
5,
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... |
Defining SLAs for WCF Services
===
I have to performance/load test a bunch of interdependant services. They all use net.tcp and most use duplex contracts and internal queueing. [handrolled POCO queue class using lock(syncRoot) { if(queue.Empty) Thread.Wait(); }]
Here's the approach I've come up with:
1. Identify WCF Services to be performance tested
2. Identify the relavant Performance counters for each of the Services
3. Identify the logical startpoint that would take the execution through the services being tested
4. Auto Generate Unit Tests using VS.Net for each of the services
5. Write specific Functional Tests (For example, I can take a use case - "Place an Order" - and write tests that make all the calls to the relevant services and generally excercise pretty much all the functionality needed)
6. Use the trace files from running #5 to generate Unit Tests [using WCF Load Test from CodePlex] (This somehow seems to me an ideal tool for recreating user errors in production/field in a debug environment. Disclaimer: Not used the tool. Impressions from reading the project desc)
7. The tests above could be tweaked to make the calls with auto generated input data
8. Introduce variations to input so different code paths are excercised
9. Log data from performance counters
10. Analyze and identify bottlenecks
Questions:
1. Is there a better approach?
2. In case of services that use internal queues, measuring performance using std performance counters, an issue. I may need custom counters?
3. If #1 is true, is there a way to introduce customer counters without changing code of the services being tested?
4. Should I care about the results of my functional tests?
5. Is there a way to [non-intrusively] implement SLAs for WCF services? (I think if I have enough data from my counters such as requests served, exceptions occurred , response time etc., I should be able to validate my SLA - serve 200,000 requests within 5 mins with a response time of 2 seconds for each request - against these figures. My question perhaps is whether I can just specify my SLA and a product / tool could do all of the plumbing behind the scene and get me a tabulated answer? I know... I know... I was day dreaming :))
6. Aside: What's the best method to queue requests internally in a WCF Service?
| 0 | [
2,
14684,
13,
18,
4830,
26,
11801,
410,
687,
800,
3726,
3726,
31,
57,
20,
956,
118,
8294,
1289,
21,
7653,
16,
1480,
19038,
1830,
687,
9,
59,
65,
275,
4275,
9,
38,
7439,
17,
127,
275,
1052,
11326,
8712,
17,
3117,
22521,
68,
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... |
Change to 64 bits not allowed when trying to edit in debug, why?
===
I receive this message (see image below) when I try to edit in debugging. This occur only in my Vista64bits OS, not in my XP computer. Why and what should I do?
**Update**
I found that I need to compile in x86 to be able to change value when debugging. So my question is WHY that I can't do it in x64?
![alt text][1]
[1]: http://img183.imageshack.us/img183/8523/changetohe5.png | 0 | [
2,
753,
20,
4384,
10181,
52,
1159,
76,
749,
20,
9392,
19,
121,
16254,
15,
483,
60,
800,
3726,
3726,
31,
2588,
48,
2802,
13,
5,
1798,
1961,
1021,
6,
76,
31,
1131,
20,
9392,
19,
121,
16254,
2762,
9,
48,
3744,
104,
19,
51,
13520,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 truncate a URL so that it fits within a layout
===
What is the best way to truncate a URL when displaying it within a web page? I don't mean a link but literally displaying the URL as a value to the user, assuming that the text might be in a container of fixed width and you don't want to wrap or run outside of the container?
Is it better to truncate from the end, favouring the early part of the url:
eg. http/really.long/urlthaticantf...ere.html
Or place the '...' in the middle to favour the start and end of the link as the most value in terms of giving context:
eg. http/really.long/ur...aticantfithere.html
Also what is a good rule of thumb when choosing how long to make the truncated url? Should you be pessimistic and pick a likely wide character such as capital 'M' and see how many of these fit in the layout? This tends to give really short URLs in general as most characters are much narrower than 'M'.
Or should you be optimistic and use a truncation that generally gives a good length but risk overrunning when the URL contains many large characters? | 0 | [
2,
98,
22,
18,
14,
246,
161,
20,
22328,
62,
21,
287,
6362,
86,
30,
32,
2742,
18,
363,
21,
9106,
800,
3726,
3726,
98,
25,
14,
246,
161,
20,
22328,
62,
21,
287,
6362,
76,
17418,
32,
363,
21,
2741,
2478,
60,
31,
221,
22,
38,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Tools for sparse least squares regression
===
I want to do sparse high dimensional (a few thousand features) least squares regression with a few hundred thousands of examples. I'm happy to use non fancy optimisation - stochastic gradient descent is fine.
Does anyone know of any software already implemented for doing this, so I don't have to write to my own?
Kind regards. | 0 | [
2,
4672,
26,
23162,
639,
735,
18,
27369,
800,
3726,
3726,
31,
259,
20,
107,
23162,
183,
13,
7865,
13,
5,
58,
310,
2996,
967,
6,
639,
735,
18,
27369,
29,
21,
310,
1874,
3805,
16,
3770,
9,
31,
22,
79,
1700,
20,
275,
538,
12251,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 map sorted index back to original index for collection I'm sorting.
===
I've got a collection (List<Rectangle>) which I need to sort left-right. That part's easy. Then I want to iterate through the Rectangles in their *original* order, but easily find their index in the sorted collection. indexOf() won't work, since I may have a number of equal objects. I can't help feeling there should be an easy way to do this. | 0 | [
2,
184,
20,
2942,
22554,
4348,
97,
20,
501,
4348,
26,
1206,
31,
22,
79,
2058,
68,
9,
800,
3726,
3726,
31,
22,
195,
330,
21,
1206,
13,
5,
5739,
1569,
255,
38,
73,
14673,
38,
15427,
1569,
263,
38,
73,
6,
56,
31,
376,
20,
2058,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 serialize nullable DateTime in a .net web service?
===
I am trying to pass some Subsonic collections to a client via a veb service. When I reference the web service the IDE complains with:
Cannot serialize member 'EndDate' of type System.Nullable`1[System.DateTime]. XmlAttribute/XmlText cannot be used to encode complex types.
Is there any way of serializing nullable complex types in a .net web service? | 0 | [
2,
184,
20,
5956,
2952,
16203,
579,
1231,
891,
19,
21,
13,
9,
2328,
2741,
365,
60,
800,
3726,
3726,
31,
589,
749,
20,
1477,
109,
972,
17766,
5721,
20,
21,
6819,
1197,
21,
13,
195,
220,
365,
9,
76,
31,
2801,
14,
2741,
365,
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... |
Where should I put "ugliness"?
===
Scenario: I have a function that I need to tweak in some way (example; make it work slightly different in different places). For some reason I end up having to add something ugly to the code, either in the function or at existing call sites. Assume that the sum total "ugly" is the same in both cases.
The question is which choice should I pick and why?
Should I encapsulate it so I don't need to look at it or should I extract it so that it doesn't add semantic trash to the function?
What would effect your choice? What about if:
- The function will "never" be called except from the current locations.
- New calls to the function won't need the "ugliness".
- The function is really clean and generic right now
- The function is already a hack job.
- you wrote the function
- you didn't wright the function
- etc. | 0 | [
2,
113,
378,
31,
442,
13,
7,
5127,
7939,
18,
7,
60,
800,
3726,
3726,
12705,
45,
31,
57,
21,
1990,
30,
31,
376,
20,
28769,
19,
109,
161,
13,
5,
29041,
73,
233,
32,
170,
1847,
421,
19,
421,
1489,
6,
9,
26,
109,
1215,
31,
241... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best Way To Store Multiple Flags In Database
===
I have a web-based application that notifies users of activity on the site via email. Users can choose which kinds of notifcations they want to receive. So far there are about 10 different options (each one is a true/false).
I'm currently storing this in one varchar field as a 0 or 1 separated by commas. For example:
1,0,0,0,1,1,1,1,0,0
This works but it's difficult to add new notification flags and keep track of which flag belongs to which notification. Is there an accepted standard for doing this? I was thinking of adding another table with a column for each notification type. Then I can add new columns if I need, but I'm not sure how efficient this is.
Thanks in advance! | 0 | [
2,
246,
161,
20,
1718,
1886,
9318,
19,
6018,
800,
3726,
3726,
31,
57,
21,
2741,
8,
1281,
3010,
30,
52,
12970,
3878,
16,
2358,
27,
14,
689,
1197,
8517,
9,
3878,
92,
3538,
56,
8623,
16,
52,
821,
16893,
18,
59,
259,
20,
2588,
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... |
Generic Functions in VB.NET
===
I'm not too familiar with generics (concept or the syntax) in general (short of using them in collections and what not), but I was wondering if the following is the best way of accomplishing what I want. Actually, I'm not entirely positive generics will solve my problem in this case.
I've modelled and mapped a few dozen objects in NHibernate, and need some sort of universal class for my CRUD operations instead of creating a seperate persister class for each type.. such as
Sub Update(someObject as Object, objectType as String)
Dim session As ISession = NHibernateHelper.OpenSession
Dim transaction As ITransaction = session.BeginTransaction
session.Update(ctype(someObject, objectType))
transaction.Commit()
End Sub
where someObject can be different types. I know this isn't the best way of doing this (or if it'll even work) but I'm hoping someone can steer me in the right direction. | 0 | [
2,
12733,
3719,
19,
13,
20468,
9,
2328,
800,
3726,
3726,
31,
22,
79,
52,
266,
3694,
29,
12733,
18,
13,
5,
27724,
54,
14,
22649,
6,
19,
297,
13,
5,
10849,
16,
568,
105,
19,
5721,
17,
98,
52,
6,
15,
47,
31,
23,
5712,
100,
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... |
Putting a gridview row in edit mode programmatically
===
How do I put a gridview row in edit mode programmatically? | 0 | [
2,
3873,
21,
7354,
4725,
3131,
19,
9392,
3740,
625,
6732,
1326,
800,
3726,
3726,
184,
107,
31,
442,
21,
7354,
4725,
3131,
19,
9392,
3740,
625,
6732,
1326,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
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 unset an element in an array in javascript?
===
How do I remove the key 'bar' from an array foo so that 'bar' won't show up in
for(key in foo){alert(key);}
| 0 | [
2,
184,
107,
31,
367,
3554,
40,
4520,
19,
40,
7718,
19,
8247,
8741,
60,
800,
3726,
3726,
184,
107,
31,
4681,
14,
1246,
13,
22,
1850,
22,
37,
40,
7718,
4310,
111,
86,
30,
13,
22,
1850,
22,
230,
22,
38,
298,
71,
19,
26,
5,
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,
0,
0,
0... |
Python: Difference between class and instance attributes
===
Is there any meaningful distinction between:
class A(object):
foo = 5 # some default value
vs.
class B(object):
def __init__(self, foo=5):
self.foo = foo
If you're creating a lot of instances, is there any difference in performance or space requirements for the two styles? When you read the code, do you consider the meaning of the two styles to be significantly different? | 0 | [
2,
20059,
45,
2841,
128,
718,
17,
4851,
13422,
800,
3726,
3726,
25,
80,
186,
16912,
6519,
128,
45,
718,
21,
5,
23793,
6,
45,
4310,
111,
800,
331,
6926,
109,
12838,
1923,
4611,
9,
718,
334,
5,
23793,
6,
45,
6312,
13,
1,
108,
24... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What's a tcpdump one-liner to dump a TCP stream that matches a given substring?
===
Is there a quick tcpdump one-liner to print out a TCP stream that matches a particular substring -- or, if that's not easy, how about printing out just the single TCP *packet* that matches the substring?
| 0 | [
2,
98,
22,
18,
21,
13,
6668,
9251,
11134,
53,
8,
14813,
20,
11424,
21,
13,
38,
7439,
3766,
30,
1717,
21,
504,
972,
11130,
60,
800,
3726,
3726,
25,
80,
21,
2231,
13,
6668,
9251,
11134,
53,
8,
14813,
20,
4793,
70,
21,
13,
38,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Scanned Questionnaire Processing component for .Net
===
I am looking to incorporate scanning as a way of collecting feedback from paper questionnaires in my desktop application (feedback management).
Questionnaires are completed using tick or cross marks as well as free text. The questionnaires are designed using the applications' designer.
I am looking for a components that will pick out the responses and allow me to tie them back to question numbers so I can save the feedback to the database, aggregate and analyse it.
Looking at some survey software companies, they appear to offer scanning capability with off the shelf scanning software like Remark http://www.gravic.com/remark/officeomr/. Outside of the question of cost, is there a reason to prefer something like Remark to (kind of) rolling your own here?
Would appreciate your ideas as to your experience with .Net componets for this as well as Remark type software.
Many thanks
AbsFabs | 0 | [
2,
12752,
29499,
5511,
5912,
26,
13,
9,
2328,
800,
3726,
3726,
31,
589,
699,
20,
14710,
15863,
28,
21,
161,
16,
10079,
13111,
37,
1397,
29499,
18,
19,
51,
17404,
3010,
13,
5,
20954,
1958,
1097,
6,
9,
29499,
18,
50,
1066,
568,
88... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 open a google chome window (only the page) using c#
===
I want to use google chrome as a control.
I think Enso does this because they have a dir in their folder called chrome...
Maybe there is a google chrome toolkit, SDK | 0 | [
2,
184,
92,
31,
368,
21,
8144,
272,
8167,
1463,
13,
5,
4965,
14,
2478,
6,
568,
272,
5910,
800,
3726,
3726,
31,
259,
20,
275,
8144,
13,
12985,
28,
21,
569,
9,
31,
277,
1957,
656,
630,
48,
185,
59,
57,
21,
13,
9035,
19,
66,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 fade out volume naturally?
===
I have experimented with a sigmoid and logarithmic fade out for volume over a period of about half a second to cushion pause and stop and prevent popping noises in my music applications.
However neither of these sound "natural". And by this I mean, they sound botched. Like an amateur engineer was in charge of the sound decks.
I know the ear is logarithmic when it comes to volumes, or at least, twice as much power does not mean twice as loud. Is there a magic formula for volume fading? Thanks. | 0 | [
2,
184,
20,
11381,
70,
2310,
8000,
60,
800,
3726,
3726,
31,
57,
23418,
29,
21,
8858,
79,
6516,
17,
13,
29452,
596,
11381,
70,
26,
2310,
84,
21,
620,
16,
88,
519,
21,
153,
20,
272,
9996,
218,
6911,
17,
747,
17,
2501,
24157,
187... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
export to csv
===
I know this question has been asked before, but I ran into a problem.
Oddly enough, when I execute this function, it includes the html of the page that the link you select to execute the function.
function exportCSV($table) {
$result = mysql_query("SHOW COLUMNS FROM ".$table."");
$i = 0;
if (mysql_num_rows($result) > 0) {
while ($row = mysql_fetch_assoc($result)) {
$csv_output .= $row['Field']."; ";
$i++;
}
}
$csv_output .= "\n";
$values = mysql_query("SELECT * FROM ".$table."");
while ($rowr = mysql_fetch_row($values)) {
for ($j=0;$j<$i;$j++) {
$csv_output .= $rowr[$j]."; ";
}
$csv_output .= "\n";
}
$filename = $file."_".date("Y-m-d_H-i",time());
header("Content-type: application/vnd.ms-excel");
header("Content-disposition: csv" . date("Y-m-d") . ".csv");
header( "Content-disposition: filename=".$filename.".csv");
print $csv_output;
exit;
}
Does anyone know why it would include the HTML in the csv file?
![alt text][1]
[1]: http://i36.tinypic.com/akkhz6.jpg | 0 | [
2,
7487,
20,
272,
18,
710,
800,
3726,
3726,
31,
143,
48,
1301,
63,
74,
411,
115,
15,
47,
31,
717,
77,
21,
1448,
9,
17459,
511,
15,
76,
31,
15644,
48,
1990,
15,
32,
1103,
14,
13,
15895,
16,
14,
2478,
30,
14,
3508,
42,
5407,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
OnKillFocus() override in MFC triggering at odd times.
===
I need to know when my Window goes out of input focus, so I overloaded the OnKillFocus() method of the CWnd.
However it doesn't invoke this method when I focus another application (alt+tab), or even minimize the window. But it DOES invoke the method when I restore it from being minimized. Are these the intended times for it to trigger this method? | 0 | [
2,
27,
7577,
23371,
5,
6,
84,
11891,
19,
307,
7061,
7286,
68,
35,
4210,
436,
9,
800,
3726,
3726,
31,
376,
20,
143,
76,
51,
1463,
1852,
70,
16,
6367,
1776,
15,
86,
31,
84,
22546,
14,
27,
7577,
23371,
5,
6,
2109,
16,
14,
15739... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
UIImageView not displaying in UITableView header
===
My problem is that I can't seem to get the image from my bundle to display properly. This method is in the view controller that controls the tableview. <em>headerView</em> is loaded with the tableview in the .nib file and contains a few UILabels (not shown) that load just fine. Any ideas?
- (void)viewDidLoad {
[super viewDidLoad];
[[self view] setTableHeaderView:headerView];
NSBundle *bundle = [NSBundle mainBundle];
NSString *imagePath = [bundle pathForResource:@"awesome_lolcat" ofType:@"jpeg"];
UIImage *image = [UIImage imageWithContentsOfFile:imagePath];
imageView = [[UIImageView alloc] initWithImage:image];
} | 0 | [
2,
13,
5661,
22039,
4725,
52,
17418,
19,
13,
11193,
579,
4725,
157,
106,
800,
3726,
3726,
51,
1448,
25,
30,
31,
92,
22,
38,
2260,
20,
164,
14,
1961,
37,
51,
10194,
20,
3042,
7428,
9,
48,
2109,
25,
19,
14,
1418,
9919,
30,
8671,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
"Rename control" in Delphi 7?
===
Following up on [this][1] question, I'm working on a large Delphi 7 codebase which was not written very nicely.
I'm looking at code like this, as a small example:
if FMode=mdCredit then begin
Panel8.Caption:='Credit';
SpeedButton3.Enabled:=false;
SpeedButton4.Enabled:=false;
SpeedButton5.Enabled:=false;
SpeedButton5.Enabled:=false;
SpeedButton6.Visible:=False;
SpeedButton10.Visible:=False;
end;
Followed by another 6 very similar blocks. The whole thing is in this style.
So I'm thinking that this would be much easier to read if the controls were named sensibly.
I could just use a global search and replace, but I'll run into problems when multiple forms use the same names, and also I'd have to be careful to change (eg) SpeedButton10 before SpeedButton1.
Is there some plugin which has the ability to perform a "smart" rename for me?
[1]: http://stackoverflow.com/questions/189893/is-there-any-way-to-get-code-folding-in-delphi-7 | 0 | [
2,
13,
7,
99,
7259,
569,
7,
19,
23030,
453,
60,
800,
3726,
3726,
249,
71,
27,
636,
1565,
500,
2558,
165,
500,
1301,
15,
31,
22,
79,
638,
27,
21,
370,
23030,
453,
1797,
8436,
56,
23,
52,
642,
253,
24050,
9,
31,
22,
79,
699,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Oracle 10gr2: enforce a date range
===
I want to enforce a date range such that all dates in column BIRTH_DATE are less than tomorrow and greater than or equal to 100 years ago. I tried this expression in a CHECK constraint:
BIRTH_DATE >= (sysdate - numtoyminterval(100, 'YEAR')) AND BIRTH_DATE < sysdate + 1
But I received the error "ORA-02436: date or system variable specified in CHECK constraint"
Help. | 0 | [
2,
15759,
332,
8807,
135,
45,
16525,
21,
1231,
978,
800,
3726,
3726,
31,
259,
20,
16525,
21,
1231,
978,
145,
30,
65,
4076,
19,
4698,
2208,
1,
8209,
50,
787,
119,
3450,
17,
1894,
119,
54,
2747,
20,
808,
122,
1464,
9,
31,
794,
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... |
Best way to remove items from a collection
===
What is the best way to approach removing items from a collection in C#, once the item is known, but not it's index. This is one way to do it, but it seems inelegant at best.
//Remove the existing role assignment for the user.
int cnt = 0;
int assToDelete = 0;
foreach (SPRoleAssignment spAssignment in workspace.RoleAssignments)
{
if (spAssignment.Member.Name == shortName)
{
assToDelete = cnt;
}
cnt++;
}
workspace.RoleAssignments.Remove(assToDelete);
What I would really like to do is find the item to remove by property (in this case, name) without looping through the entire collection and using 2 additional variables. | 0 | [
2,
246,
161,
20,
4681,
3755,
37,
21,
1206,
800,
3726,
3726,
98,
25,
14,
246,
161,
20,
2141,
9096,
3755,
37,
21,
1206,
19,
272,
5910,
15,
382,
14,
9101,
25,
167,
15,
47,
52,
32,
22,
18,
4348,
9,
48,
25,
53,
161,
20,
107,
32... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can an ArrayList of Node contain non-Node type?
===
Can an ArrayList of Node contain a non-Node type?
Is there a very dirty method of doing this with type casting? | 0 | [
2,
92,
40,
7718,
5739,
16,
15421,
3717,
538,
8,
251,
546,
1001,
60,
800,
3726,
3726,
92,
40,
7718,
5739,
16,
15421,
3717,
21,
538,
8,
251,
546,
1001,
60,
25,
80,
21,
253,
6121,
2109,
16,
845,
48,
29,
1001,
9087,
60,
3,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Deprecated linux commands.
===
Today I discovered you can make **less** act like **tail -f**.
**less *filename***, then press Shift-F to start follow mode.
Just like tail, but you have all the added features of less - like scrolling, searching, and the highlighting of search hits.
I've been watching log files with tail for years.
This just made me ponder: are there other commands that are outdated and have powerful alternatives?
Please share the bliss - a single command per post. | 2 | [
2,
121,
3515,
150,
1669,
13024,
14294,
9,
800,
3726,
3726,
786,
31,
1848,
42,
92,
233,
13,
1409,
923,
1409,
601,
101,
13,
1409,
8682,
13,
8,
410,
1409,
9,
13,
1409,
923,
1637,
16877,
7259,
2483,
1409,
15,
94,
901,
4471,
8,
410,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 link using GCC without -l and without hardcoding path
===
I have a shared library that I wish to link an executable against using GCC. The shared library has a nonstandard name not of the form libNAME.so, so I can not use the usual -l option. (It happens to also be a Python extension, and so has no 'lib' prefix.) I am able to pass the path to the library file directly to the link command line, but this causes the library path to be hardcoded into the executable.
For example:
g++ -o build/bin/myapp build/bin/_mylib.so
Is there a way to link to this library without causing the path to be hardcoded into the executable?
| 0 | [
2,
184,
20,
3508,
568,
489,
3384,
366,
13,
8,
255,
17,
366,
552,
15458,
2013,
800,
3726,
3726,
31,
57,
21,
2592,
1248,
30,
31,
2536,
20,
3508,
40,
1396,
17194,
5924,
149,
568,
489,
3384,
9,
14,
2592,
1248,
63,
21,
538,
15566,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 deploy Windows Media Foundation without Windows Media Player [10|11] - needed for multimedia support within WPF
===
I'm wondering if it is possible to deploy Windows Media Foundation without Windows media player 10 or 11?
Here's the context. I have a WPF application running in a corporate enterprise setting. WPF requires Windows Media Foundation for rich media support. Windows Media Foundation is distributed via Windows media player 10 and 11. The corporate release schedule for WMP 10/11 is too far in the future for me to wait. But because I don't need the entire player infrastructure, just media foundation I'm wondering if there is a way to deploy just that component.
| 0 | [
2,
25,
32,
938,
20,
17617,
1936,
941,
1304,
366,
1936,
941,
517,
636,
1036,
1,
1306,
500,
13,
8,
851,
26,
17090,
555,
363,
619,
7721,
800,
3726,
3726,
31,
22,
79,
5712,
100,
32,
25,
938,
20,
17617,
1936,
941,
1304,
366,
1936,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Image processing reference
===
Can you recommend a good textbook on image processing? A friend of mine asked for references, and that made me realize that my image processing library from my college days is probably very outdated.
I'm looking for something that is a good introductory book for someone with a decent programming and math background, but who's not an imaging expert. | 0 | [
2,
1961,
5511,
2801,
800,
3726,
3726,
92,
42,
12360,
21,
254,
19059,
27,
1961,
5511,
60,
21,
860,
16,
1114,
411,
26,
7231,
15,
17,
30,
117,
55,
4007,
30,
51,
1961,
5511,
1248,
37,
51,
314,
509,
25,
910,
253,
70,
43,
1669,
9,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I make IIS6 default to .Net 2.0 when creating a new web site?
===
When I create a web site on IIS6 it defaults the ASP.NET version to 1.1. Is there a way to make the version default to 2.0? | 0 | [
2,
184,
92,
31,
233,
595,
18,
379,
12838,
20,
13,
9,
2328,
172,
9,
387,
76,
2936,
21,
78,
2741,
689,
60,
800,
3726,
3726,
76,
31,
1600,
21,
2741,
689,
27,
595,
18,
379,
32,
12838,
18,
14,
28,
306,
9,
2328,
615,
20,
137,
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... |
Database record reverting after manual change
===
I have a website running in Tomcat 5.5 hooked up to a MySQL5 database using Hibernate3.
One record simply refuses to keep any changes performed on it. If I change the record programmatically, the values revert back to what they were previously.
If I manually modify the record in the database, the values will revert (seemingly once the webapp accesses them).
I have tried stopping Tomcat and changing the values manually then starting Tomcat again. Checking the database, the values remain changed after Tomcat has started the webapp but will revert back again once I load the site.
I have only noticed it on this one particular record. | 0 | [
2,
6018,
571,
24156,
68,
75,
5132,
753,
800,
3726,
3726,
31,
57,
21,
2271,
946,
19,
2067,
5782,
331,
9,
264,
14988,
71,
20,
21,
51,
18,
22402,
264,
6018,
568,
4148,
2102,
8820,
240,
9,
53,
571,
1659,
10864,
20,
643,
186,
1693,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Setting the Body's OnLoad attribute in an Asp.net MVC Master Page
===
I have a view using a master page that contains some javascript that needs to be executed using the OnLoad of the Body. What is the best way to set the OnLoad on my MasterPage only for certain views?
On idea I tried was to pass the name of the javascript function as ViewData. But I dont really want my Controllers to have to know about the javascript on the page. I really don't like this approach...
<body onload="<%=ViewData["Body_OnLoad"]%>">
<asp:ContentPlaceHolder ID="MainContent" runat="server" />
Any other ideas?
| 0 | [
2,
2697,
14,
358,
22,
18,
27,
8294,
35,
14755,
19,
40,
28,
306,
9,
2328,
307,
8990,
1129,
2478,
800,
3726,
3726,
31,
57,
21,
1418,
568,
21,
1129,
2478,
30,
1588,
109,
8247,
8741,
30,
2274,
20,
44,
5557,
568,
14,
27,
8294,
16,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I access the XML data in my column using LINQ to XML?
===
I have this XML in a column in my table:
<keywords>
<keyword name="First Name" value="|FIRSTNAME|" display="Jack" />
<keyword name="Last Name" value="|LASTNAME|" display="Jones" />
<keyword name="City" value="|CITY|" display="Anytown" />
<keyword name="State" value="|STATE|" display="MD" />
</keywords>
I'm getting a record out of that table using LINQ to SQL via this:
GeneratedArticle ga = db.GeneratedArticles.Single(p => p.GeneratedArticleId == generatedArticleId);
That works, I get my GeneratedArticle object just fine.
I'd like to walk through the data in the ArticleKeywords field, which is XML. I started doing this:
var keywords = from k in ga.ArticleKeywords.Elements("Keywords")
select k;
foreach (var keyword in keywords)
{
//what goes here?
}
I'm not 100% sure that I'm getting that data correctly. I need help with the proper syntax to get the value and display out of my XML field. | 0 | [
2,
184,
107,
31,
1381,
14,
23504,
1054,
19,
51,
4698,
568,
6294,
1251,
20,
23504,
60,
800,
3726,
3726,
31,
57,
48,
23504,
19,
21,
4698,
19,
51,
859,
45,
13,
1,
4237,
12827,
1,
13,
1,
4237,
9587,
204,
3726,
7,
3552,
204,
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... |
Can I transform object properties during output with Select-Object/Export-CSV?
===
I'm using the Quest AD cmdlets, particularly Get-QADUser, to pull a list of users from AD and return just a few attributes. No problems, easy enough, but I want to transform one of the properties (parentContainerDN) before exporting to CSV.
Get-QADUser -name "Froosh" | Select-Object logonName,homeDrive,parentContainerDN | Export-CSV C:\Temp\File.csv
This works of course, but the parentContainerDN is long and untidy. Is there an easy way to replace that with parentContainerDN.Name before passing that to Export-CSV?
I'd be happy with a commandline solution, or a script snippet.
Thanks! | 0 | [
2,
92,
31,
8007,
3095,
3704,
112,
5196,
29,
5407,
8,
23793,
118,
1706,
1993,
8,
6824,
710,
60,
800,
3726,
3726,
31,
22,
79,
568,
14,
7769,
21,
43,
2390,
43,
11045,
15,
1653,
164,
8,
8681,
43,
16704,
15,
20,
2201,
21,
968,
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... |
Migrating a Delphi 7 application to .NET
===
Any advice on how to migrate an existing Delphi 7 business application to .NET 2.0 in Visual Studio 2005?
Visual Studio 2005 has already been purchased, the company want to move away from the Borland/Codegear tools.
The application is a single client server executable, utilitising a number of 3rd party UI controls and Crystal reports 10 for reporting.
There is extensive business logic spread across Delphi types in the UI as well as many SQL Server 2000 stored procedures. Moving much of the stored proc logic into .NET classes is another goal.
To reduce impact on customers, a piece by piece approach rather then a complete re-write/conversion would be preferred, if possible. Thanks in advance.
| 0 | [
2,
28749,
21,
23030,
453,
3010,
20,
13,
9,
2328,
800,
3726,
3726,
186,
4978,
27,
184,
20,
22985,
40,
3149,
23030,
453,
508,
3010,
20,
13,
9,
2328,
172,
9,
387,
19,
3458,
1120,
812,
60,
3458,
1120,
812,
63,
614,
74,
2432,
15,
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... |
SQL Server 2008 Geospatial queries
===
SQL Server 2008 has new geo data types. One thing I am wondering though is that if I have a table with geocoded addresses in it, can I write a query to display all records within a certain distance. For example, many websites have the option to search for items within a certain distance such as 50 miles and would like it if SQL 2008 provided this out of the box. | 0 | [
2,
4444,
255,
8128,
570,
6389,
18,
10563,
192,
9386,
2829,
800,
3726,
3726,
4444,
255,
8128,
570,
63,
78,
6389,
1054,
2551,
9,
53,
584,
31,
589,
5712,
362,
25,
30,
100,
31,
57,
21,
859,
29,
6389,
22254,
12636,
19,
32,
15,
92,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Sql Server string to date conversion
===
I want to convert a string like this:
'10/15/2008 10:06:32 PM'
into the equivalent DATETIME value in Sql Server.
In Oracle, I would say this:
TO_DATE('10/15/2008 10:06:32 PM','MM/DD/YYYY HH:MI:SS AM')
[This question][1] implies that I must parse the string into one of the [standard formats][2], and then convert using one of those codes. That seems ludicrous for such a mundane operation. Is there an easier way?
[1]: http://stackoverflow.com/questions/202243/custom-datetime-formatting-in-sql-server
[2]: http://msdn.microsoft.com/en-us/library/aa226054(SQL.80).aspx | 0 | [
2,
4444,
255,
8128,
3724,
20,
1231,
6263,
800,
3726,
3726,
31,
259,
20,
8406,
21,
3724,
101,
48,
45,
13,
22,
1036,
11698,
10551,
2753,
332,
23163,
22783,
6736,
22,
77,
14,
4602,
1231,
891,
1923,
19,
4444,
255,
8128,
9,
19,
15759,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.