unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
Is there a formula to convert from Thomas Bros Map page & grid to a latitude/longitude?
===
I'm working on a project that contains Thomas Brothers Map page and grid numbers. Is there a way to programatically convert from this map page to a latitude & longitude? | 0 | [
2,
25,
80,
21,
3729,
20,
8406,
37,
831,
9184,
2942,
2478,
279,
7354,
20,
21,
16337,
118,
2701,
16731,
60,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
669,
30,
1588,
831,
1670,
2942,
2478,
17,
7354,
2116,
9,
25,
80,
21,
161,
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,
0,
0,
0... |
Load multiple external websites into one webpage via re-using ONE IFrame + Ajax
===
I am trying to embed multiple external websites into one web page. Using an IFRAME works ok, but once you get past 10 embedded iframes, the memory fottprint starts to get too big.
So I was thinking, is it possible via ajax/javascript, to re-use the same iframe to load the collection of websites one after enother, and display the results in a div on the main webpage? Or is this explicitly blocked for security reasons? | 0 | [
2,
6305,
1886,
4886,
13931,
77,
53,
2741,
6486,
1197,
302,
8,
12655,
53,
31,
8361,
2754,
20624,
800,
3726,
3726,
31,
589,
749,
20,
11911,
69,
1886,
4886,
13931,
77,
53,
2741,
2478,
9,
568,
40,
31,
8361,
693,
5854,
15,
47,
382,
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... |
Telerik RadEditor Find & Replace in HTML View
===
We use Telerik's RadEditor for our content management system's WYSIWYG editor. We need the find & replace functionality that is in the WYSIWYG editor to also be in the HTML editor. The editor is pretty customizable, anyone know if there is a way to enable this or hack it in? | 0 | [
2,
4338,
6639,
4944,
13401,
477,
279,
3934,
19,
13,
15895,
1418,
800,
3726,
3726,
95,
275,
4338,
6639,
22,
18,
4944,
13401,
26,
318,
2331,
1097,
329,
22,
18,
5809,
18,
49,
7913,
263,
1835,
9,
95,
376,
14,
477,
279,
3934,
18548,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 convert a DTD to a Schema as part of a Maven build?
===
How can I convert a DTD to a Schema as part of a Maven build?
Specifically, I am looking for a plugin to which I can give the URL to a DTD and it will generate an XML Schema Definition file.
Failing a good plugin, perhaps I can embed an ANT task into my build | 0 | [
2,
184,
92,
31,
8406,
21,
13,
43,
38,
43,
20,
21,
23874,
28,
141,
16,
21,
1216,
3124,
1895,
60,
800,
3726,
3726,
184,
92,
31,
8406,
21,
13,
43,
38,
43,
20,
21,
23874,
28,
141,
16,
21,
1216,
3124,
1895,
60,
3524,
15,
31,
58... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Javascript - How do you organize this mess?!?
===
As Javascript Frameworks like jQuery make client side web applications richer and more functional, I've started to notice one problem...
**How in the world do you keep this organized?**
- Put all your handlers in one spot and write functions for all the events?
- Create function/classes to wrap all your functionality?
- Break up scripts into separate files even if they all go together?
- Write like crazy and just hope it works out for the best?
- Give up and get a new career?
I mention jQuery, but it's really any Javascript in general. I'm finding that as lines upon lines begin to pile up, it gets harder to manage the script files or find what you are looking for. Quite possibly the biggest propblems I've found is there is so many ways to do the same thing, it's hard to know which one is best.
Is there any general recommendations on the best way to keep your **.js** files as nice and neat as the rest of your application? Or is this just a matter of IDE? Is there a better option out there? | 4 | [
2,
8247,
8741,
13,
8,
184,
107,
42,
9213,
48,
3957,
60,
187,
60,
800,
3726,
3726,
28,
8247,
8741,
6596,
18,
101,
487,
8190,
93,
233,
6819,
270,
2741,
3767,
2042,
106,
17,
91,
7652,
15,
31,
22,
195,
373,
20,
3551,
53,
1448,
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... |
Do you know a similar program for wc (unix word count command) on Windows ?
===
A quick search gives me [tawbaware wc][1], but it does not accept stdout as input stream, meaning I can not use pipe within a DOS session.
Note: I can not install cygwin or use powershell (which would have allowed a '|foreach-object {(get-content $_).count}')
[unxutils][2] and and [gnuwin32][3] Packages seem to *not* have this feature...
[1]: http://www.tawbaware.com/wc.htm
[2]: http://unxutils.sourceforge.net
[3]: http://gnuwin32.sourceforge.net/ | 0 | [
2,
107,
42,
143,
21,
835,
625,
26,
11801,
13,
5,
1020,
4028,
833,
2468,
1202,
6,
27,
1936,
13,
60,
800,
3726,
3726,
21,
2231,
2122,
2352,
55,
636,
38,
3885,
969,
5011,
11801,
500,
2558,
165,
500,
15,
47,
32,
630,
52,
3440,
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... |
Event signature pattern in .net
===
What's the point in the standard pattern for event delegates in .net? I.e. the EventHandler predefined delegate? Why not just choose the most appropriate signature for the requirment?
| 0 | [
2,
807,
7810,
3732,
19,
13,
9,
2328,
800,
3726,
3726,
98,
22,
18,
14,
454,
19,
14,
1236,
3732,
26,
807,
10845,
19,
13,
9,
2328,
60,
31,
9,
62,
9,
14,
807,
3203,
1252,
782,
13439,
11300,
60,
483,
52,
114,
3538,
14,
127,
4593,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Is it possible to add an HTML link in the body of a MAILTO link
===
I have not had to mess with mailto links much. However I now need to add a link in the body of a mailto if it is possible.
Is there a way to add a link or to change the email opened to an html email vs a text email?
Something like:
<a href="mailto:test@test.test?body=The message's first paragraph.%0A%0aSecond paragraph.%0A%0AThird Paragraph.%0A%0ALink goes here"> | 0 | [
2,
25,
32,
938,
20,
3547,
40,
13,
15895,
3508,
19,
14,
358,
16,
21,
4216,
262,
3508,
800,
3726,
3726,
31,
57,
52,
41,
20,
3957,
29,
4216,
262,
6271,
212,
9,
207,
31,
130,
376,
20,
3547,
21,
3508,
19,
14,
358,
16,
21,
4216,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Should I persist a sqlconnection in my data access layer?
===
It seems like there is a lot of overhead involved in rapidly opening and closing sqlconnections. Should I persist a connection (one, per client, per database), or continue declaring a new sqlconnection object whenever I need one, and making sure I clean up after myself?
What have you done? What worked well and what worked poorly? | 0 | [
2,
378,
31,
22084,
21,
4444,
255,
25996,
872,
19,
51,
1054,
1381,
5385,
60,
800,
3726,
3726,
32,
2206,
101,
80,
25,
21,
865,
16,
8860,
1013,
19,
4805,
1214,
17,
4239,
4444,
255,
25996,
5757,
9,
378,
31,
22084,
21,
2760,
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... |
Accessing data with strored procedures
===
One of the "best practice" is accessing data via stored procedures. I understand why is this scenario good.
My motivation is split database and application logic ( the tables can me changed, if the behaviour of stored procedures are same ), defence for SQL injection ( users can not execute "select * from some_tables", they can only call stored procedures ), and security ( in stored procedure can be "anything" which secure, that user can not select/insert/update/delete data, which is not for them ).
What I don't know is how to access data with dynamic filters.
I'm using MSSQL 2005.
If I have table:
CREATE TABLE tblProduct (
ProductID uniqueidentifier -- PK
, IDProductType uniqueidentifier -- FK to another table
, ProductName nvarchar(255) -- name of product
, ProductCode nvarchar(50) -- code of product for quick search
, Weight decimal(18,4)
, Volume decimal(18,4)
)
then I should create 4 stored procedures ( create / read / update / delete ).
The stored procedure for "create" is easy.
CREATE PROC Insert_Product ( @ProductID uniqueidentifier, @IDProductType uniqueidentifier, ... etc ... ) AS BEGIN
INSERT INTO tblProduct ( ProductID, IDProductType, ... etc .. ) VALUES ( @ProductID, @IDProductType, ... etc ... )
END
The stored procedure for "delete" is easy too.
CREATE PROC Delete_Product ( @ProductID uniqueidentifier, @IDProductType uniqueidentifier, ... etc ... ) AS BEGIN
DELETE tblProduct WHERE ProductID = @ProductID AND IDProductType = @IDProductType AND ... etc ...
END
The stored procedure for "update" is similar as for "delete", but I'm not sure this is the right way, how to do it. I think that updating all columns is not efficient.
CREATE PROC Update_Product( @ProductID uniqueidentifier, @Original_ProductID uniqueidentifier, @IDProductType uniqueidentifier, @Original_IDProductType uniqueidentifier, ... etc ... ) AS BEGIN
UPDATE tblProduct SET ProductID = @ProductID, IDProductType = @IDProductType, ... etc ...
WHERE ProductID = @Original_ProductID AND IDProductType = @Original_IDProductType AND ... etc ...
END
And the last - stored procedure for "read" is littlebit mystery for me. How pass filter values for complex conditions? I have a few suggestion:
Using XML parameter for passing where condition:
CREATE PROC Read_Product ( @WhereCondition XML ) AS BEGIN
DECLARE @SELECT nvarchar(4000)
SET @SELECT = 'SELECT ProductID, IDProductType, ProductName, ProductCode, Weight, Volume FROM tblProduct'
DECLARE @WHERE nvarchar(4000)
SET @WHERE = dbo.CreateSqlWherecondition( @WhereCondition ) --dbo.CreateSqlWherecondition is some function which returns text with WHERE condition from passed XML
DECLARE @LEN_SELECT int
SET @LEN_SELECT = LEN( @SELECT )
DECLARE @LEN_WHERE int
SET @LEN_WHERE = LEN( @WHERE )
DECLARE @LEN_TOTAL int
SET @LEN_TOTAL = @LEN_SELECT + @LEN_WHERE
IF @LEN_TOTAL > 4000 BEGIN
-- RAISE SOME CONCRETE ERROR, BECAUSE DYNAMIC SQL ACCEPTS MAX 4000 chars
END
DECLARE @SQL nvarchar(4000)
SET @SQL = @SELECT + @WHERE
EXEC sp_execsql @SQL
END
But, I think the limitation of "4000" characters for one query is ugly.
The next suggestion is using filter tables for every column. Insert filter values into the filter table and then call stored procedure with ID of filters:
CREATE TABLE tblFilter (
PKID uniqueidentifier -- PK
, IDFilter uniqueidentifier -- identification of filter
, FilterType tinyint -- 0 = ignore, 1 = equals, 2 = not equals, 3 = greater than, etc ...
, BitValue bit , TinyIntValue tinyint , SmallIntValue smallint, IntValue int
, BigIntValue bigint, DecimalValue decimal(19,4), NVarCharValue nvarchar(4000)
, GuidValue uniqueidentifier, etc ... )
CREATE TABLE Read_Product ( @Filter_ProductID uniqueidentifier, @Filter_IDProductType uniqueidentifier, @Filter_ProductName uniqueidentifier, ... etc ... ) AS BEGIN
SELECT ProductID, IDProductType, ProductName, ProductCode, Weight, Volume
FROM tblProduct
WHERE ( @Filter_ProductID IS NULL
OR ( ( ProductID IN ( SELECT GuidValue FROM tblFilter WHERE IDFilter = @Filter_ProductID AND FilterType = 1 ) AND NOT ( ProductID IN ( SELECT GuidValue FROM tblFilter WHERE IDFilter = @Filter_ProductID AND FilterType = 2 ) )
AND ( @Filter_IDProductType IS NULL
OR ( ( IDProductType IN ( SELECT GuidValue FROM tblFilter WHERE IDFilter = @Filter_IDProductType AND FilterType = 1 ) AND NOT ( IDProductType IN ( SELECT GuidValue FROM tblFilter WHERE IDFilter = @Filter_IDProductType AND FilterType = 2 ) )
AND ( @Filter_ProductName IS NULL OR ( ... etc ... ) )
END
But this suggestion is littlebit complicated I think.
Is there some "best practice" to do this type of stored procedures? | 0 | [
2,
1381,
68,
1054,
29,
12160,
2095,
8876,
800,
3726,
3726,
53,
16,
14,
13,
7,
4936,
1345,
7,
25,
1381,
68,
1054,
1197,
8214,
8876,
9,
31,
1369,
483,
25,
48,
12705,
254,
9,
51,
11933,
25,
2132,
6018,
17,
3010,
7085,
13,
5,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What $_POST[] do i need to post to a forum?
===
I am admin on a forum.
Earlier we had phpbb 2.0 and i made a bot that could write to the forum.
Now, we have upgraded the forum to phpbb 3.0, but i can't get my bot to write to the forum anymore.
I have looked for a solution, but now i am out of ideas.
So it would have been great if anyone have a suggestion.
i have btw used CURL and php to make this bot.
Usage of bot:
Users log in on an external website to report results of footballmatches they have played online. The bot will then automatically write a post to the forum.
So basically i need to know what $_POST[] i need to send.
| 0 | [
2,
98,
5579,
1,
6962,
2558,
500,
107,
31,
376,
20,
678,
20,
21,
5691,
60,
800,
3726,
3726,
31,
589,
21,
43,
2160,
27,
21,
5691,
9,
1201,
95,
41,
13,
26120,
3490,
172,
9,
387,
17,
31,
117,
21,
11012,
30,
110,
2757,
20,
14,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to (de)serialise JSON data in Silverlight using a different name to member variable
===
I have the following members defined in a class that I'm trying to deserialise:
[DataMemberAttribute(Name = "cust_title")]
public String Title { get; set; }
[DataMemberAttribute(Name = "cust_description")]
public String Description { get; set; }
For some reason, the deserialisation fails (it seems to ignore the DataMemberAttribute).
Does anyone know how to get this working? | 0 | [
2,
184,
20,
13,
5,
546,
6,
4104,
2815,
2628,
487,
528,
1054,
19,
1172,
3130,
568,
21,
421,
204,
20,
322,
7612,
800,
3726,
3726,
31,
57,
14,
249,
443,
2811,
19,
21,
718,
30,
31,
22,
79,
749,
20,
1746,
106,
2815,
2628,
45,
636... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Modifying form values with beforeSubmit with jQuery ajaxSubmit?
===
I have a form I am submitting using jQuery's ajaxSubmit function from the Forms plugin. I'm trying to add a form name/value pair to the form data just before submission occurs. My plan is to modify the form data in the beforeSubmit event handler.
Given a function that looks like:
function handleActionFormBeforeSubmit(formData, form, options) {
// Add a name/value pair here somehow to formData
}
How do I add a simple pair to formData? It is an array in the form of:
[ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
Thanks,
Brian
| 0 | [
2,
17579,
68,
505,
4070,
29,
115,
7563,
5130,
29,
487,
8190,
93,
20624,
7563,
5130,
60,
800,
3726,
3726,
31,
57,
21,
505,
31,
589,
28848,
568,
487,
8190,
93,
22,
18,
20624,
7563,
5130,
1990,
37,
14,
1997,
10922,
108,
9,
31,
22,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Working with multiple programmers on MS Access
===
Would you recommend working with multiple programmers on an MS Access application?
One of our MS Access application has grown to the point where the number of changes (bug fixes) and new features can no longer be handled by one programmer in the requested time frame.
We are trying to introduce version control using the undocumented SaveAsText and LoadFromText procedures in VBA to make collaboration on this application possible. Unfortunately we have already run into problems loading modified forms and reports back into Access as a checksum is stored in every form text file.
Before putting time into building an import/export application to compile text files into an Access database, we would like to hear your recommendations. | 0 | [
2,
638,
29,
1886,
17968,
18,
27,
4235,
1381,
800,
3726,
3726,
83,
42,
12360,
638,
29,
1886,
17968,
18,
27,
40,
4235,
1381,
3010,
60,
53,
16,
318,
4235,
1381,
3010,
63,
3651,
20,
14,
454,
113,
14,
234,
16,
1693,
13,
5,
16254,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
what are the advantages of using plpgsql in postgresql
===
Besides the syntactic sugar and expressiveness power what are the differences in runtime efficiency. I mean, plpgsql can be faster than, lets say plpythonu or pljava? Or are they all approximately equals? | 0 | [
2,
98,
50,
14,
14683,
16,
568,
12443,
9623,
18,
22402,
19,
678,
6879,
18,
22402,
800,
3726,
3726,
3410,
14,
6063,
6981,
1786,
4200,
17,
25093,
720,
414,
98,
50,
14,
4921,
19,
485,
891,
7836,
9,
31,
884,
15,
12443,
9623,
18,
2240... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MySQL: what data type to use for hashed password field and what length?
===
I'm not sure how password hashing works (will be implementing it later), but need to create database schema now.
I'm thinking of limiting passwords to 4-20 characters, but as I understand after encrypting hash string will be of different length.
So, how to store these passwords in the database? | 0 | [
2,
51,
18,
22402,
45,
98,
1054,
1001,
20,
275,
26,
19170,
69,
20884,
575,
17,
98,
1476,
60,
800,
3726,
3726,
31,
22,
79,
52,
562,
184,
20884,
19170,
68,
693,
13,
5,
5580,
44,
17333,
32,
138,
6,
15,
47,
376,
20,
1600,
6018,
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... |
Using jQuery tableSorter on dynamically modified table
===
I am using the jQuery tableSorter plugin on a page.
Unfortunatley, the table that is being sorted is dynamically modified, and when I sort after adding an element, the element disappears, restoring the table to the state that it was in when the tableSorter was created.
Is there any way that i can force tableSorter to rescan the page so that these new elements are sorted properly? | 0 | [
2,
568,
487,
8190,
93,
7484,
248,
815,
27,
7782,
1326,
5372,
859,
800,
3726,
3726,
31,
589,
568,
14,
487,
8190,
93,
7484,
248,
815,
10922,
108,
27,
21,
2478,
9,
367,
6469,
4140,
38,
631,
15,
14,
859,
30,
25,
142,
22554,
25,
77... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SqlDataReader: In this scenario, will the reader get closed?
===
I am cleaning up the DataReaders in an old .NET 1.1 project that I inherited.
The previous developer coded the data-access-layer in such a way that most of the DAL methods returned SqlDataReaders (thus leaving it up to the caller to properly call the .Close() or .Dispose() methods).
I have come across a situation, though, where a caller is not catching the returned SqlDataReader (and therefore is not disposing of it properly). See the code below:
Data Access Method:
Public Shared Function UpdateData() As SqlDataReader
...
drSQL = cmdSQL.ExecuteReader(CommandBehavior.CloseConnection)
Return drSQL
End Function
Calling code:
...
DataAccessLayer.UpdateData()
...
As you can see, the calling method does not receive/catch the returned SqlDataReader. So what happens? Is that SqlDataReader still out there and open? Or does it automatically get garbage collected since nothing is addressing it?
I couldn't think of a way to debug and test this. If anybody has any ideas or suggestions that would be great.
| 0 | [
2,
4444,
255,
18768,
10647,
106,
45,
19,
48,
12705,
15,
129,
14,
7765,
164,
827,
60,
800,
3726,
3726,
31,
589,
9724,
71,
14,
1054,
10647,
445,
19,
40,
315,
13,
9,
2328,
137,
9,
165,
669,
30,
31,
7179,
9,
14,
1158,
10058,
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 best test-as-you-type online regex testing app?
===
I found a great web app for testing regexes as-you-type, but have lost it in the months since I last use it. Searching through here, I've found http://www.rubular.com/ which is useful, but not what I found originally. Today, I found a few testing tools through google, but most often they are slow, don't allow you to test as-you-type, or just don't work.
What free, online, test-as-you-type regex testing tools do you use? | 0 | [
2,
98,
25,
14,
246,
1289,
8,
472,
8,
245,
8,
4474,
2087,
7953,
1706,
4431,
4865,
60,
800,
3726,
3726,
31,
216,
21,
374,
2741,
4865,
26,
4431,
7953,
1706,
160,
28,
8,
245,
8,
4474,
15,
47,
57,
529,
32,
19,
14,
818,
179,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can I Format A String Like A Number in .NET?
===
If I had a phone number like this
string phone = "6365555796";
Which I store with only numeric characters in my database, is it possible to output the number like this:
"636-555-5796"
Similar to how I could if I were using a number:
long phone = 6365555796;
string output = phone.ToString("000-000-0000");
I've tried searching and all I could find online were numeric formatting documents.
The reason I ask is because I think it would be an interesting idea to be able to store only the numeric values in the DB and allow for different formatting using a Constant string value to dictate how my phone numbers are formatted. Or am I better off using a number for this? | 0 | [
2,
92,
31,
2595,
21,
3724,
101,
21,
234,
19,
13,
9,
2328,
60,
800,
3726,
3726,
100,
31,
41,
21,
1132,
234,
101,
48,
3724,
1132,
800,
13,
7,
379,
19230,
22779,
3399,
379,
7,
73,
56,
31,
1718,
29,
104,
15764,
596,
1766,
19,
51... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Oracle - ODBC connection using MS Access error (ORA-12154)
===
I am trying to use MS access to connect to a Oracle database.
I keep on getting the following error message:
ORA-12154: TSN- could not resolve the connect identifier secified
The Oracle Drivers OracleClient10g can verify that the database server exists.
I have a section in my tsnnames.ora file that looks like this:
UBASEP10G =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = bxxx-xxx.yyyy.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = UBASE)
)
)
per my attempts to get this error resolves I added this to the sqlnet.ora file:
NAMES.DIRECTORY_PATH= (HOSTNAME, ONAMES, TNSNAMES,LDAP,EZCONNECT)
When using the Windows ODBC driver configuration utility it asks for the following
following information
DATA SOURCE NAME : MYSOURCE NAME
TSN SERVICE NAME:UBASEP10G
USERID:MYUSERID
any suggestions ?????
| 0 | [
2,
15759,
13,
8,
12340,
7229,
2760,
568,
4235,
1381,
7019,
13,
5,
6055,
8,
918,
13758,
6,
800,
3726,
3726,
31,
589,
749,
20,
275,
4235,
1381,
20,
6379,
20,
21,
15759,
6018,
9,
31,
643,
27,
1017,
14,
249,
7019,
2802,
45,
54,
58... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
PHP SimpleXML::addChild with empty string - redundant node
===
Calling addChild with an empty string as the value (or even with whitespace) seems to cause a redundant SimpleXml node to be added inside the node instead of adding just the node with no value. Does anyone know of a workaround for this? | 0 | [
2,
13,
26120,
1935,
396,
8184,
45,
45,
14854,
11287,
29,
2424,
3724,
13,
8,
24295,
15421,
800,
3726,
3726,
2555,
3547,
11287,
29,
40,
2424,
3724,
28,
14,
1923,
13,
5,
248,
166,
29,
359,
5582,
6,
2206,
20,
1679,
21,
24295,
1935,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
refactor JavaScript string concatenation
===
Unfortunately on my project, we generate a lot of the HTML code in JavaScript like this:
var html = new StringBuffer();
html.append("<td class=\"gr-my-deals\"><a href=\"").append(deal.url).append("\" target=\"_blank\">").append(deal.description).append("</a></td>");
I have 2 specific complaints about this:
1. The use of escaped double quotes (\”) within the HTML string. These should be replaced by single quotes (‘) to improve readability.
2. The use of .append() instead of the JavaScript string concatentation operator “+”
Applying both of these suggestions, produces the following equivalent line of code, which I consider to be much more readable:
var html = "<td class=’gr-my-deals’><a href=’" + deal.url + "’ target=’_blank’>" + deal.description + "</a></td>";
I'm now looking for a way to automatically transform the first line of code into the second. All I've come up with so far is to run the following find and replace over all our Javascript code:
Find: ).append(
Replace: +
This will convert the line of code shown above to:
html.append("<td class=\"gr-my-deals\"><a href=\"" + deal.url + "\" target=\"_blank\">" + deal.description + "</a></td>)";
This should safely remove all but the first 'append()' statement. Unfortunately, I can't think of any safe way to automatically convert the escaped double-quotes to single quotes. Bear in mind that I can't simply do a find/replace because in some cases (when you have triply-nested strings) you actually do need to use escaped double-quotes. Typically, this is when you're generating HTML that includes nested JS, and that JS contains string parameters
function makeLink(stringParam) {
var sb = new StringBuffer();
sb.append("<a href=\"JavaScript:myFunc('" + stringParam + "');\">");
}
My questions (finally) are:
- Is there a better way to safely replace the calls to 'append()' with '+'
- Is there any way to safely replace the escaped double quotes with single quotes, regex?
Cheers,
Don
| 0 | [
2,
302,
17455,
8247,
8741,
3724,
1065,
9530,
7914,
800,
3726,
3726,
6200,
27,
51,
669,
15,
95,
7920,
21,
865,
16,
14,
13,
15895,
1797,
19,
8247,
8741,
101,
48,
45,
4033,
13,
15895,
800,
78,
3724,
2345,
6866,
5,
6,
73,
13,
15895,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Applying CSS to Text inputs with Classes
===
I'm using jQuery validate on a form I am building and it is working great. What I want to do is when something is invalid to have the text field change colors and the error message to be white. I figured the following CSS would work:
label .error {color: white; font-weight: bold;}
input .error {background-color: pink; border: 1px dashed red; color: white}
When I test the validation the above CSS doesn't seem to apply. I checked using Firebug and the label and input area have the 'error' class applied.
The CSS seems valid as when I leave off the .error clause everything looks like I want it too. What am I doing wrong? | 0 | [
2,
11989,
272,
18,
18,
20,
1854,
6367,
18,
29,
2684,
800,
3726,
3726,
31,
22,
79,
568,
487,
8190,
93,
7394,
1373,
27,
21,
505,
31,
589,
353,
17,
32,
25,
638,
374,
9,
98,
31,
259,
20,
107,
25,
76,
301,
25,
16671,
20,
57,
14... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What data mapping tool is good for mid size projects
===
I need a data(and metadata) mapping tool for mapping one database metadata to other. Are there any cheap tools available for that purpose? | 0 | [
2,
98,
1054,
13305,
5607,
25,
254,
26,
907,
1072,
2314,
800,
3726,
3726,
31,
376,
21,
1054,
5,
290,
28057,
6,
13305,
5607,
26,
13305,
53,
6018,
28057,
20,
89,
9,
50,
80,
186,
9148,
4672,
904,
26,
30,
2131,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How to retrieve maven properties inside a JUnit test?
===
I'm writing a test for a file parser class. The parse method receives a file name as parameter, and must open it in order to parse it ( duh ).
I've writen a test file, that I put into the test/resources directory inside my project directory, and would like to pass this file to test my parse. Since this project is in CVS, and will be manipulated by others, I can't hard code the file path, so I thought about use the maven ${basedir} property to build the file name in my test. Something like:
public void parseTest() {
...
sut.parse( ${basedir} + "src/test/resources/testFile" );
...
}
Does someone knows how could I achieve this? | 0 | [
2,
184,
20,
11917,
1216,
3124,
3704,
572,
21,
7446,
242,
1289,
60,
800,
3726,
3726,
31,
22,
79,
1174,
21,
1289,
26,
21,
3893,
2017,
4104,
718,
9,
14,
2017,
870,
2109,
8359,
21,
3893,
204,
28,
18906,
15,
17,
491,
368,
32,
19,
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... |
Available Build Tools (make, etc)?
===
There's a lot of questions on here regarding various niche build needs (.NET, continuous integration, etc) but, of course, my niche need is different.
Rather than asking a very specific question right now, I'd like a survey of available build tools (such as make, ant, etc) so I can ask a follow up question more intelligently if needed.
In your answer, please include:
- **ONE** build tool
- Link to the main page about that tool
- If you know some pros and cons (ie, runs on windows with cygwin, or .NET specific, etc) then list some (not required - the name and link are required)
If your build tool is already in an answer, comment on it adding pros/cons/limitations/experiences. Feel free to add as many answers as you like as long as they don't already exist - but don't put several build tools into one answer.
Please be aware that if you duplicate answers you may be downvoted - add additional information about a given build in the comments. Ideally these comments will be incorporated into the answer over time.
-Adam | 0 | [
2,
904,
1895,
4672,
13,
5,
11115,
15,
2722,
6,
60,
800,
3726,
3726,
80,
22,
18,
21,
865,
16,
2346,
27,
235,
3467,
617,
16539,
1895,
2274,
13,
5,
9,
2328,
15,
6357,
8078,
15,
2722,
6,
47,
15,
16,
674,
15,
51,
16539,
376,
25,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ASP.NET : Binding textbox maxlength to Class constant in HTML
===
I am attempting to allow my web designers to use the metadata we have about database fields in the asp.net pages they are creating. The most obvious one is as follows:
<asp:TextBox runat="server" id="txTextBox" MaxLength="<Value From Metadata here>" ... />
All the required metadata is stored in our class objects and is accessible due to its public static nature.
The benefit of this would be that they can set values which
**a)** might change without them being aware or caring
**b)** improve the user experience with very little coding effort
and all without having them need worry about what the value is or where it has come from. This will primarily be used for automatically bound controls - i.e. ones which are added with little or no developer interaction.
This question is very similar to [One of my previous questions](http://stackoverflow.com/questions/232986/xaml-binding-textbox-maxlength-to-class-constant) which now works wonderfully (but that was in WPF / XAML ).
The main point of this question is that I want as little developer requirement on this as possible - Ideally there would be some `<%# Constant.Value %>` type syntax which could be used directly within the `Maxlength=""` attribute of the asp:Textbox control meaning that no code needs to be added to a page/usercontrol at all.
I have a feeling it isn't possible, but I would love someone to prove me wrong.
Ta | 0 | [
2,
28,
306,
9,
2328,
13,
45,
8728,
1854,
5309,
2049,
6325,
20,
718,
3587,
19,
13,
15895,
800,
3726,
3726,
31,
589,
6314,
20,
1655,
51,
2741,
12760,
20,
275,
14,
28057,
95,
57,
88,
6018,
2861,
19,
14,
28,
306,
9,
2328,
4434,
59... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What time format is this? (not UNIX, not UTC, nothing)
===
I'm importing data from another system to MySQL, its a CSV file. The "Date" field however contains cryptic of 3-digit time entries, here's a random sample set:
> 540
> 780
> 620
> 965
What's this? obviously its not 5:40 and 6:20. But it's not UNIX either (I tried 1225295**XXX** before I realized the time range this represents is about 16 minutes)
Anyone recognize these?
Cheers,
/mp | 0 | [
2,
98,
85,
2595,
25,
48,
60,
13,
5,
1270,
22540,
15,
52,
13,
11440,
15,
626,
6,
800,
3726,
3726,
31,
22,
79,
9010,
68,
1054,
37,
226,
329,
20,
51,
18,
22402,
15,
82,
21,
272,
18,
710,
3893,
9,
14,
13,
7,
8209,
7,
575,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to force NHibernate to recognize db changes not made through NHibernate
===
I am implementing NHibernate into an existing web application. However, we have some other processes that do bulk inserting and updating on the database. How can I make NHibernate aware that changes are occurring on the backend db that were not initiated through NHibernate? | 0 | [
2,
184,
20,
558,
12109,
15191,
8820,
20,
5844,
13,
9007,
1693,
52,
117,
120,
12109,
15191,
8820,
800,
3726,
3726,
31,
589,
17333,
12109,
15191,
8820,
77,
40,
3149,
2741,
3010,
9,
207,
15,
95,
57,
109,
89,
5102,
30,
107,
7238,
1469... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Please help me understand the specifics of the GPL
===
I would like to find out more about the GNU GPL, and in particular how it pertains to a particular commercial project I wish to undertake. I have just read the licence, and have obviously heard about GPL for many years, but I have some specific questions that I hope learned people here can answer:
1. If I want to add additional, proprietary functionality to a piece of GPL sofware. What am I required to distribute/make available? Must I make my functionality available to the public?
2. If I write commercial software that contains the GPL software (e.g., it contains a pointer to an instance of the GPL software, but within the same runtime executable) do I have to make all of my commercial code available to the public?
3. If I write commercial software that interacts with the GPL software (e.g., it sends and receives messages via, say, a network adapter but in a separate runtime executable) do I have to make all of my commercial code available to the public?
Apologies if my questions are ignorant, I look forward to hearing your responses. | 0 | [
2,
2247,
448,
55,
1369,
14,
1903,
18,
16,
14,
489,
5727,
800,
3726,
3726,
31,
83,
101,
20,
477,
70,
91,
88,
14,
26092,
489,
5727,
15,
17,
19,
1498,
184,
32,
416,
5851,
18,
20,
21,
1498,
1439,
669,
31,
2536,
20,
16960,
9,
31,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
WPF ComboBox SelectedValue not updating from binding source.
===
Here's my binding source object:
Public Class MyListObject
Private _mylist As New ObservableCollection(Of String)
Private _selectedName As String
Public Sub New(ByVal nameList As List(Of String), ByVal defaultName As String)
For Each name In nameList
_mylist.Add(name)
Next
_selectedName = defaultName
End Sub
Public ReadOnly Property MyList() As ObservableCollection(Of String)
Get
Return _mylist
End Get
End Property
Public ReadOnly Property SelectedName() As String
Get
Return _selectedName
End Get
End Property
End Class
Here is my XAML:
<Window x:Class="Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300"
xmlns:local="clr-namespace:WpfApplication1"
>
<Window.Resources>
<ObjectDataProvider x:Key="MyListObject" ObjectInstance="" />
</Window.Resources>
<Grid>
<ComboBox Height="23"
Margin="24,91,53,0"
Name="ComboBox1"
VerticalAlignment="Top"
SelectedValue="{Binding Path=SelectedName, Source={StaticResource MyListObject}, Mode=OneWay}"
ItemsSource="{Binding Path=MyList, Source={StaticResource MyListObject}, Mode=OneWay}"
/>
<Button Height="23"
HorizontalAlignment="Left"
Margin="47,0,0,87"
Name="btn_List1"
VerticalAlignment="Bottom"
Width="75">List 1</Button>
<Button Height="23"
Margin="0,0,75,87"
Name="btn_List2"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
Width="75">List 2</Button>
</Grid>
</Window>
Here's the code-behind:
Class Window1
Private obj1 As MyListObject
Private obj2 As MyListObject
Private odp As ObjectDataProvider
Public Sub New()
InitializeComponent()
Dim namelist1 As New List(Of String)
namelist1.Add("Joe")
namelist1.Add("Steve")
obj1 = New MyListObject(namelist1, "Steve")
.
Dim namelist2 As New List(Of String)
namelist2.Add("Bob")
namelist2.Add("Tim")
obj2 = New MyListObject(namelist2, "Tim")
odp = DirectCast(Me.FindResource("MyListObject"), ObjectDataProvider)
odp.ObjectInstance = obj1
End Sub
Private Sub btn_List1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btn_List1.Click
odp.ObjectInstance = obj1
End Sub
Private Sub btn_List2_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btn_List2.Click
odp.ObjectInstance = obj2
End Sub
End Class
When the Window first loads, the bindings hook up fine. The ComboBox contains the names "Joe" and "Steve" and "Steve" is selected by default. However, when I click a button to switch the ObjectInstance to obj2, the ComboBox ItemsSource gets populated correctly in the dropdown, but the SelectedValue is set to Nothing instead of being equal to obj2.SelectedName.
Thanks in advance!
| 0 | [
2,
619,
7721,
22621,
5309,
1704,
15165,
52,
71,
43,
1880,
37,
8728,
1267,
9,
800,
3726,
3726,
235,
22,
18,
51,
8728,
1267,
3095,
45,
317,
718,
51,
5739,
23793,
932,
13,
1,
915,
5739,
28,
78,
5122,
10321,
579,
15015,
872,
5,
1041... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ASP.Net Validator Default Style
===
I'm using several variants of the Validator controls (RequiredFieldValidator, CompareValidator, etc) and am using the CssClass property of the validator. I can see (via Firebug) that the class is being applied, but the validator control itself is adding a style element to it, namely color: red. But I don't want that. I want the control to use the cssclass only.
I know I can override the Forecolor attribute, but I'll have to do that on every validator in the project. And I'd really like to be able to just change my CSS Class in my stylesheet in case we have to change all the error message appearances in the future.
Anyone have any clues how to tell the Validator controls to NOT use their default styles? | 0 | [
2,
28,
306,
9,
2328,
7394,
3457,
12838,
1034,
800,
3726,
3726,
31,
22,
79,
568,
238,
11070,
16,
14,
7394,
3457,
8671,
13,
5,
99,
3003,
2095,
1109,
18506,
43,
3457,
15,
11590,
18506,
43,
3457,
15,
2722,
6,
17,
589,
568,
14,
272,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Programmer Calculator for iPhone
===
What is the best programmer's calculator application for the iPhone? | 2 | [
2,
246,
17968,
28539,
26,
21024,
800,
3726,
3726,
98,
25,
14,
246,
17968,
22,
18,
28539,
3010,
26,
14,
21024,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How to I attach to a VSTO Excel Application Process to Debug?
===
I've got a Excel VSTO 2005 application I need to debug, I've tried attaching to the process EXCEL.EXE in Visual Studio 2005 to no avail.
Does anyone know what to do in order to debug managed code running in a VSTO Excel Application?
| 0 | [
2,
184,
20,
31,
19514,
20,
21,
4611,
262,
20700,
3010,
953,
20,
121,
16254,
60,
800,
3726,
3726,
31,
22,
195,
330,
21,
20700,
4611,
262,
812,
3010,
31,
376,
20,
121,
16254,
15,
31,
22,
195,
794,
19514,
68,
20,
14,
953,
20700,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Matlab copy constructor
===
Is there a better way to implement copy construcor for matlab for a handle derived class other than adding a constructor with one input and explicitly copying its properties?
obj.property1 = from.property1;
obj.property2 = from.property2;
etc.
Thanks,
Dani | 0 | [
2,
4277,
9086,
4344,
6960,
248,
800,
3726,
3726,
25,
80,
21,
574,
161,
20,
8713,
4344,
1065,
11602,
4966,
26,
4277,
9086,
26,
21,
3053,
3981,
718,
89,
119,
4721,
21,
6960,
248,
29,
53,
6367,
17,
13108,
4344,
68,
82,
3704,
60,
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... |
ASP.NET Forms Authentication - Logging off
===
How exactly can one implement a Log off function when using ASP.NET Forms Authentication on an intranet application?
How will this work if I am an administrator and want to log in "as someone else" into the application?
Please share your ideas
| 0 | [
2,
28,
306,
9,
2328,
1997,
27963,
13,
8,
13,
13919,
168,
800,
3726,
3726,
184,
1890,
92,
53,
8713,
21,
6738,
168,
1990,
76,
568,
28,
306,
9,
2328,
1997,
27963,
27,
40,
14369,
2328,
3010,
60,
184,
129,
48,
170,
100,
31,
589,
40... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Listbox Alternative UI control for large data lists
===
I am using C# and ASP.NET with version 2.0 of the .NET Framework library on this particular project. We are also using the AjaxControlToolkit. The AjaxControlToolkit should have the controls available to make a descent User Interface solution to the problem I'm facing.
I have run into this in a few projects in the last year, and used different solutions in the past. The current design of the project I just picked up, is that there is an <asp:DropDownList> control and on page load a Database call is made to get a list of values. This is then bound using DropDownList's datasource. The problem is that there is 25k items returned from the database. First thing, that's not acceptable for a user to have to scroll through tens of thousands of items. But, even more importantly, is that in every browser that it is tested on (IE 7, FF 3, Safari, and Chrome) the browser completely hangs as it is propagating the dropdownlist items.
What I'm thinking is using a [Modal Popup][1] form, which an [Autocomplete Extender][2] that allows the user to drill down to a specific company. So, in the field where they have to choose a company, they click on a "select company" icon, the modal form comes up, letting them use the autocomplete extender to select an existing company. They click "Ok" and it save the value to the field.
However, I'm an old school command line/shell/terminal guy, and my ideas of acceptable UI design might be skewed (give me a command prompt on any system, and I'm good to go). I would like the advice of those in the community here as to what they think would be an acceptable solution, or if they have faced other issues like this.
[1]: http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ModalPopup/ModalPopup.aspx
[2]: http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete.aspx | 0 | [
2,
968,
5309,
2676,
13,
5661,
569,
26,
370,
1054,
7227,
800,
3726,
3726,
31,
589,
568,
272,
5910,
17,
28,
306,
9,
2328,
29,
615,
172,
9,
387,
16,
14,
13,
9,
2328,
6596,
1248,
27,
48,
1498,
669,
9,
95,
50,
67,
568,
14,
20624,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Polymorphism in JAX-RPC web services
===
I have a JAX-RPC (Java) web service that needs to return a complex polymorphic value. To be more specific, the class structure is something like this:
abstract class Child {
}
class Question extends Child {
private String name;
// other fields, getters, and setters
}
class Section extends Child {
private String label;
private Child[] children;
// getters and setters
}
class Quiz {
private Child[] elements;
// getter and setter
}
My web service has a method that returns a Quiz, which of course may contain Questions and Sections which may contain Questions and other Sections, and so on and so forth. However, when I generate the WSDL, only Child and Quiz make it in. When I call the web service, I get back a Quiz element with the right number of children, but they're all Child elements, and they're all empty.
Is there a good way to make this work, short of just returning XML as a String?
Before anyone asks, due to circumstances beyond my control, I cannot use JAX-WS. | 0 | [
2,
3446,
13348,
19,
11712,
8,
139,
5779,
2741,
687,
800,
3726,
3726,
31,
57,
21,
11712,
8,
139,
5779,
13,
5,
1004,
1385,
6,
2741,
365,
30,
2274,
20,
788,
21,
1502,
3446,
12498,
596,
1923,
9,
20,
44,
91,
1903,
15,
14,
718,
1411... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 launch an application after install in a Visual Studio Setup Project
===
I have created a setup project using Visual Studio 2008. After the application is finished installing, I would like to have it start up immediately. Any thoughts on how this can be done? | 0 | [
2,
184,
107,
31,
3394,
40,
3010,
75,
16146,
19,
21,
3458,
1120,
18161,
669,
800,
3726,
3726,
31,
57,
679,
21,
18161,
669,
568,
3458,
1120,
570,
9,
75,
14,
3010,
25,
842,
25429,
15,
31,
83,
101,
20,
57,
32,
799,
71,
1375,
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,
0,
0,
0,
0,
0,
0,
0,
0... |
Stopping a Thread in Java?
===
I'm in the process of writing a piece of code that connects to a server spawns a bunch of threads using that connection and does a bunch of "stuff".
There are certain instances where the connection fails and I need to stop everything and start from scratch with a new object.
I wanted to clean up after the object but calling thread.stop on the threads, but this method is seemingly deprecated.
What is the recommended alternative to doing this? Should I write my own cleanup and exit method for each of the threads? Set the thread to null? or something else? | 0 | [
2,
7048,
21,
9322,
19,
8247,
60,
800,
3726,
3726,
31,
22,
79,
19,
14,
953,
16,
1174,
21,
1855,
16,
1797,
30,
8534,
20,
21,
8128,
13,
22860,
18,
21,
7653,
16,
20396,
568,
30,
2760,
17,
630,
21,
7653,
16,
13,
7,
384,
5386,
7,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MD5 hash of a file in ABAP
===
I want to generate a MD5 hash of a text file in ABAP. I have not found any standard solution for generating it for a very big file. Function module `CALCULATE_HASH_FOR_CHAR` does not meet my requirements because it takes a string as an input parameter. Although it works for a smaller files, in case of a for example 4 GB file one cannot construct such a big string.
Does anybody know whether there is a standard piece of coding for doing that (my google efforts did not bring me anything) or maybe someone has an MD5 algorithm in ABAP that calculates the hash of a file? | 0 | [
2,
8138,
264,
19170,
16,
21,
3893,
19,
5941,
2552,
800,
3726,
3726,
31,
259,
20,
7920,
21,
8138,
264,
19170,
16,
21,
1854,
3893,
19,
5941,
2552,
9,
31,
57,
52,
216,
186,
1236,
4295,
26,
13500,
32,
26,
21,
253,
580,
3893,
9,
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... |
How to make Django's DateTimeField optional?
===
I am trying to implement a to-do-list website to practice using Django. In models.py, I have a class called `Item` to represent a to-do item. In it, I have the following line:
due_date = models.DateTimeField(required=False)
due_date is meant to be an optional field in case the user has a deadline for some to-do item. The problem is that the line above gives me a TypeError due to unexpected keyword argument 'required'.
So, it seems that I cannot use the keyword argument 'required' for DateTimeField. Is there any way I can make a DateTimeField optional? Or is there a standard implementation for the problem I am having? | 0 | [
2,
184,
20,
233,
3857,
14541,
22,
18,
1231,
891,
1109,
12832,
60,
800,
3726,
3726,
31,
589,
749,
20,
8713,
21,
20,
8,
537,
8,
5739,
2271,
20,
1345,
568,
3857,
14541,
9,
19,
2761,
9,
6448,
15,
31,
57,
21,
718,
227,
13,
1,
211... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Making 1 page pdfs from a multipage pdf using itextsharp
===
I have a pdf that I want to make into several 1 page pdfs where each page in the original pdf is now its own pdf document. I am trying to do this using itextsharp, but am having some difficulty even getting started.
Am I going about this the wrong way? Anyone know how I would go about doing this?
Thanks a ton! | 0 | [
2,
544,
137,
2478,
13,
11124,
18,
37,
21,
1889,
6486,
13,
11124,
568,
31,
11969,
23646,
800,
3726,
3726,
31,
57,
21,
13,
11124,
30,
31,
259,
20,
233,
77,
238,
137,
2478,
13,
11124,
18,
113,
206,
2478,
19,
14,
501,
13,
11124,
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... |
Visual Studio 2010 Model First Entity Key Property Name Duplication
===
I'm taking a stab at the model first approach and I am running into an annoyance. If I have an entity named Building with a key property named BuildingID, for example, and I create an association to a Room entity, the foreign key property in the Room entity ends up being named BuildingBuildingID.
How can I stop this madness! | 0 | [
2,
3458,
1120,
498,
1061,
64,
9252,
1246,
1354,
204,
1052,
20669,
800,
3726,
3726,
31,
22,
79,
741,
21,
13179,
35,
14,
1061,
64,
2141,
17,
31,
589,
946,
77,
40,
20106,
9,
100,
31,
57,
40,
9252,
377,
353,
29,
21,
1246,
1354,
37... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Round unsigned int up to the multiple of 4 in C++
===
How would you implement the function `unsigned round_up_to_multiple_of_4(unsigned x)`? Let's assume performance is not an issue, so the shortest code is welcome. My solution is:
return x+(4-x%4)%4;
11 bytes between `return` and `;`. I believe one can do better :) | 4 | [
2,
560,
28839,
19,
38,
71,
20,
14,
1886,
16,
268,
19,
272,
20512,
800,
3726,
3726,
184,
83,
42,
8713,
14,
1990,
13,
1,
1020,
13472,
560,
1,
576,
1,
262,
1,
21531,
5106,
1,
1041,
1,
300,
5,
1020,
13472,
993,
6,
1,
60,
408,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
AWS S3 NoSuchBucket Exception Not Caugh in Rescue Clause
===
I'm trying to get a bucket in Ruby using the AWS SDK, and trying to catch a NoSuchBucket error. Problem is, my rescue block is not catching the error, and so my app crashes. Here is the relevant code:
begin
b = s3.buckets[bucket_name]
rescue AWS::S3::Errors::NoSuchBucket
puts Invalid bucket name.
exit 1
end
and the error message is:
C:/Ruby193/lib/ruby/gems/1.9.1/gems/aws-sdk-1.5.6/lib/aws/core/client.rb:277:in
`return_or_raise': The specified bucket does not exist (AWS::S3::Errors::NoSuchBucket)
Am I just making a stupid beginner syntax error, or is there a bug in the AWS code that's not actually throwing the error? I've also tried catching all errors and still no dice. | 0 | [
2,
21,
10268,
13,
18,
240,
90,
4289,
11925,
1198,
5391,
52,
272,
17750,
19,
3655,
9040,
800,
3726,
3726,
31,
22,
79,
749,
20,
164,
21,
12433,
19,
10811,
568,
14,
21,
10268,
13,
18,
43,
197,
15,
17,
749,
20,
2949,
21,
90,
4289,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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/scala shutdown hook -noclassdeffounderror
===
I have a multithreaded scala application and I have a shutdown hook that calls a shutdown() method on an object. Unfortuantely this desnt seem to be reliable . Many times it fails to handle SIGINT and throws a NoClassDefFoundError on an anonymous fuunction.
How do I make this shutdown handler more robust ? | 0 | [
2,
8247,
118,
18,
3430,
58,
28450,
5559,
13,
8,
251,
1898,
13862,
12235,
29992,
800,
3726,
3726,
31,
57,
21,
1889,
96,
10647,
69,
25975,
3010,
17,
31,
57,
21,
28450,
5559,
30,
3029,
21,
28450,
5,
6,
2109,
27,
40,
3095,
9,
367,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 I control which symbols a windows DLL imports from the application?
===
I'm trying to build a shared library (DLL) on Windows, using MSVC 6 (retro!) and I have a peculiar link issue I need to resolve. My shared library must access some global state, controlled by the loading application.
Broadly, what I have is this:
application.c:
static int g_private_value;
int use_private_value() {
/* do something with g_private_value */
}
int main (...) {
return shared_library_method ();
}
shared_library.c:
int shared_library_method() {
use_private_value();
}
How do I set up shared_library.dll so that it exports `shared_library_method` and imports `use_private_value`?
Please remember that A) I'm a unix programmer, generally, and B) that I'm doing this without Visual Studio; our automated build infrastructure drives MSVC with makefiles. If I'm omitting something that will make it easier to answer the question, please comment and I'll update it ASAP.
| 0 | [
2,
184,
20,
31,
569,
56,
9794,
21,
1936,
13,
43,
211,
20617,
37,
14,
3010,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
1895,
21,
2592,
1248,
13,
5,
43,
211,
6,
27,
1936,
15,
568,
4235,
8990,
400,
13,
5,
99,
3996,
187,
6,
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... |
Perforce branching from a Perforce branch
===
A path in Perforce contains files a.txt and b.txt. I'll refer to the main path as mainline.
I've create a branch (called initialbranch) from there which contains just a.txt. I make lots of changes to a.txt, and am very happy with it. However, it's not yet ready for submitting back to mainline. I can easily integrate any changes to a.txt that occur in mainline.
Another project comes along, which needs the changes from initialbranch. Now, say I want to make changes to b.txt, and want to be able to integrate changes that happen both in initialbranch and in mainline. At present, I'm branching from initialbranch (call this new branch secondbranch). Previously I've been adding b.txt to initialbranch, and then integrating my changes across to secondbranch. Is there a nicer way to do this?
Sorry if this question seems somewhat convoluted, I've expressed it as best I can!
Thanks,
Dom | 0 | [
2,
416,
8774,
1686,
68,
37,
21,
416,
8774,
1686,
800,
3726,
3726,
21,
2013,
19,
416,
8774,
1588,
6488,
21,
9,
38,
396,
38,
17,
334,
9,
38,
396,
38,
9,
31,
22,
211,
5017,
20,
14,
407,
2013,
28,
22848,
9,
31,
22,
195,
1600,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Team City problem with unstopped instance of IE during watin test
===
We are using Team City and I noticed problem during running Watin test. Sometimes some instance of IE randomly just don't stop in task manager on build server, even if test closes all opened instances. This causes failure of all tests that follows.
We tried with script that kills all instances of ie before this test starts runing, but that can't prevent random unstopped instances of ie that crashes all tests. | 0 | [
2,
173,
136,
1448,
29,
367,
7318,
3631,
4851,
16,
13,
660,
112,
15553,
108,
1289,
800,
3726,
3726,
95,
50,
568,
173,
136,
17,
31,
2711,
1448,
112,
946,
15553,
108,
1289,
9,
1030,
109,
4851,
16,
13,
660,
21324,
114,
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... |
jQuery Text to Link Script?
===
Does anyone know of a script that can select all text references to URLs and automatically replace them with anchor tags pointing to those locations?
For example:
http://www.google.com
would automatically turn into
<a href="http://www.google.com">http://www.google.com</a>
Note: I am wanting this because I don't want to go through all my content and wrap them with anchor tags. | 0 | [
2,
487,
8190,
93,
1854,
20,
3508,
3884,
60,
800,
3726,
3726,
630,
1276,
143,
16,
21,
3884,
30,
92,
5407,
65,
1854,
7231,
20,
13,
911,
7532,
17,
7499,
3934,
105,
29,
6265,
3383,
18,
6832,
20,
273,
4095,
60,
26,
823,
45,
7775,
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... |
HTTP GET request in Javascript?
===
I need to do an HTTP GET request in JS, what's the best way to do that?
Thanks | 0 | [
2,
7775,
164,
3772,
19,
8247,
8741,
60,
800,
3726,
3726,
31,
376,
20,
107,
40,
7775,
164,
3772,
19,
487,
18,
15,
98,
22,
18,
14,
246,
161,
20,
107,
30,
60,
3669,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How to specify the namespace when referencing a table in a dataset
===
I'm loading data into a DataSet from an XML file using the ReadXml method. This results in two tables with the same name. One of the tables has a namespace and the other doesn't. I'm trying to reference the table with the namespace. Can anyone tell me how to do this?
Dim reader As XmlTextReader = New XmlTextReader(strURL)
Dim city as string = ""
Dim ds As DataSet = New DataSet()
ds.Namespace = "HomeAddress"
ds.ReadXml(reader)
city = ds.Tables("Address").Rows(0).Item(2).ToString()
| 0 | [
2,
184,
20,
19077,
14,
204,
5582,
76,
13,
29254,
21,
859,
19,
21,
1054,
3554,
800,
3726,
3726,
31,
22,
79,
12797,
1054,
77,
21,
1054,
3554,
37,
40,
23504,
3893,
568,
14,
1302,
396,
8184,
2109,
9,
48,
1736,
19,
81,
7484,
29,
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... |
Images & Hyperlink Borders - Ghost 1px x 1px Border
===
I've an image that is wrapped in an anchor tag that, through jQuery, triggers an action somewhere else on the page. When I click on the image, two tiny 1px by 1px boxes show up in the upper and lower left corners of the image.
My CSS styles explicitly state no borders for images: <code>a,img { border: 0; }</code>
It also seems to only happen in Firefox 3. Anyone else had this issue? | 0 | [
2,
3502,
279,
5443,
6258,
5878,
13,
8,
3995,
137,
306,
396,
993,
137,
306,
396,
1862,
800,
3726,
3726,
31,
22,
195,
40,
1961,
30,
25,
3684,
19,
40,
6265,
3383,
30,
15,
120,
487,
8190,
93,
15,
7286,
18,
40,
1028,
3493,
962,
27,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Which standard c++ classes cannot be reimplemented in c++?
===
I was looking through the plans for C++0x and came upon `std::initializer_list` for implementing initializer lists in user classes. This class could not be implemented in C++
without using itself, or else using some "compiler magic".
What other classes require some form of "compiler magic" to work? Which classes are in the Standard Library that could not be implemented by a third-party library? | 0 | [
2,
56,
1236,
272,
20512,
2684,
1967,
44,
302,
8983,
413,
1130,
69,
19,
272,
20512,
60,
800,
3726,
3726,
31,
23,
699,
120,
14,
1753,
26,
272,
20512,
387,
396,
17,
281,
685,
13,
1,
384,
43,
45,
45,
27313,
11907,
1,
5739,
1,
26,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
using MVC view page + $(document).ready
===
I have a View page that is inheriting from a masterpage in my MVC site.
I want to make use of $(document).ready(function() within my View page but cannot seem to get it to work.
I created a ContentPlaceHolder within the Head section of my masterpage and tried implementing this in my View page but it errors with Object Expected.
Any ideas?
Thanks
Nick | 0 | [
2,
568,
307,
8990,
1418,
2478,
2754,
5579,
5,
28132,
6,
9,
15193,
800,
3726,
3726,
31,
57,
21,
1418,
2478,
30,
25,
17569,
68,
37,
21,
1129,
6486,
19,
51,
307,
8990,
689,
9,
31,
259,
20,
233,
275,
16,
5579,
5,
28132,
6,
9,
15... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best Mercurial mode for Emacs?
===
The [Emacs Wiki][1] lists several modes for supporting mercurial inside of Emacs, including the built-in VC mode. Is it work exploring any of the other modes, such as the one distributed with mercurial itself?
[1]: http://www.emacswiki.org/emacs/MercurialMode | 4 | [
2,
246,
9046,
3594,
192,
3740,
26,
13,
62,
6893,
18,
60,
800,
3726,
3726,
14,
636,
62,
6893,
18,
13,
17375,
500,
2558,
165,
500,
7227,
238,
12770,
26,
3134,
9046,
3594,
192,
572,
16,
13,
62,
6893,
18,
15,
215,
14,
392,
8,
108,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Outlook autocleaning my line breaks and screwing up my email format
===
I'm sending an email using the dotnot framework. Here is the template that I'm using to create the message:
Date of Hire: %HireDate%
Annual Salary: %AnnualIncome%
Reason for Request: %ReasonForRequest%
Name of Voluntary Employee: %FirstName% %LastName%
Total Coverage Applied For: %EECoverageAmount%
Guaranteed Coverage Portion: %GICoveragePortion%
Amount Subject to Medical Evident: %GIOverage%
When the messages is received in outlook, outlook tells me "Extra line breaks in this message were removed". And the message displays like this:
Date of Hire: 9/28/2001
Annual Salary: $100,000
Reason for Request: New Hire
Name of Voluntary Employee: Ronald Weasley Total Coverage Applied For: $500,000 Guaranteed Coverage Portion: $300,000.00 Amount Subject to Medical Evident: $200,000
Note how Outlook incorrectly removes needed line breaks after the name, EECoverageAmount, etc...
It's important for the email recepients to get a correctly formatted email, and I have to assume that some of them use outlook 2003. I also can't assume they will know enough to shutoff the autoclean feature to get the message to format properly.
I have viewed these messages in other mail clients and they display correctly
some more information:
* I am using UTF-8 BodyEncoding (msg.BodyEncoding = System.Text.Encoding.UTF8)
* The msg.Body is being read from a UTF-8 encoded text file, and each line is terminated with a crlf.
Question:
How do I change the format of the message to avoid this problem? | 0 | [
2,
19837,
3108,
20254,
68,
51,
293,
7947,
17,
8513,
68,
71,
51,
8517,
2595,
800,
3726,
3726,
31,
22,
79,
4907,
40,
8517,
568,
14,
14123,
1270,
6596,
9,
235,
25,
14,
22894,
30,
31,
22,
79,
568,
20,
1600,
14,
2802,
45,
1231,
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... |
ASP.NET aspx page code runs impersonated though impersonation is disabled
===
I have a blank test app created in VS 2005 as ASP.NET application. [MSDN says](http://msdn.microsoft.com/en-us/library/ms998351.aspx) that
> By default, ASP.NET does not use impersonation, and your code runs using the ASP.NET application's process identity.
And I have the following web.config
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true" defaultLanguage="c#" />
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<identity impersonate="false"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
</configuration>
So it seem impersonation is disabled just like [the article](http://msdn.microsoft.com/en-us/library/ms998351.aspx) is suggesting.
My aspx is blank default and the codebehind is
namespace TestWebapp
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
System.Diagnostics.Debug.WriteLine(String.Format("Before1: Current Princupal = {0}", Thread.CurrentPrincipal.Identity.Name));
WindowsImpersonationContext ctx = WindowsIdentity.Impersonate(IntPtr.Zero);
try
{
int a = 0;
System.Diagnostics.Debug.WriteLine(String.Format("After: Current Princupal = {0}", Thread.CurrentPrincipal.Identity.Name));
} finally
{
ctx.Undo();
}
}
}
}
When I reload the page I get the following debug output:
> [5288] Before1: Current Princupal =
> ITRANSITION\a.kudryavtsev [5288]
> After: Current Princupal =
> ITRANSITION\a.kudryavtsev
Output is the same with
<identity impersonate="false"/>
The web site uses Default Application Pool and the pool is set up to use NETWORK SERVICE account for its worker processes.
I'm sure the application uses the web.config it should use and the w3p.exe worker process is running under NETWORK SERVICE.
What can be wrong in this case?
Thanks!
| 0 | [
2,
28,
306,
9,
2328,
28,
306,
396,
2478,
1797,
1461,
797,
7276,
1669,
362,
797,
7276,
857,
25,
10154,
800,
3726,
3726,
31,
57,
21,
6463,
1289,
4865,
679,
19,
4611,
812,
28,
28,
306,
9,
2328,
3010,
9,
636,
79,
18,
43,
103,
898,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Textmate: Undo More Than a Singe Character?
===
Textmate is maybe the best editor out there.
But is has a big disadvantage: It undoes each character typed instead of grouping characters. This makes a large undo tedious!
Do you now any hacks, plugins or workarounds to fix this issue? | 0 | [
2,
1854,
5281,
45,
367,
537,
91,
119,
21,
4481,
62,
925,
60,
800,
3726,
3726,
1854,
5281,
25,
913,
14,
246,
1835,
70,
80,
9,
47,
25,
63,
21,
580,
13387,
45,
32,
367,
10739,
206,
925,
1001,
43,
700,
16,
19288,
1766,
9,
48,
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... |
Replacing typelibs for imports
===
I am working on a project which uses an import
#import "progid:Blah.blah.retrieve" rename_namespace("Blah")
but I would really perfer not to register the dll which is I believe what is missing to allow this to work. I don't want to register the dll because our build system will not be able to build multiple instances at a time. Is there some easy way to convert this import into some other form? I have the source for the progid it is importing.
As you can probably tell I don't understand this #import function very well, does anybody know of a good primer on it? | 0 | [
2,
5496,
1001,
8326,
18,
26,
20617,
800,
3726,
3726,
31,
589,
638,
27,
21,
669,
56,
2027,
40,
9010,
6926,
1660,
1993,
13,
7,
2740,
2234,
43,
45,
220,
9396,
9,
220,
9396,
9,
6239,
3272,
195,
7,
302,
7259,
1,
7259,
5582,
5,
7,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can web form content be preserved for the back button
===
When a web form is submitted and takes the user to another page, it is quite often the case that the user will click the Back button in order to submit the form again (the form is an advanced search in my case.)
How can I reliably preserve the form options selected by the user when they click Back (so they don't have to start from scratch with filling the form in again if they are only changing one of many form elements?)
Do I have to go down the route of storing the form options in session data (cookies or server-side) or is there a way to get the browser to handle this for me?
(Environment is PHP/JavaScript - and the site must work on IE6+ and Firefox2+) | 0 | [
2,
184,
92,
2741,
505,
2331,
44,
6190,
26,
14,
97,
5167,
800,
3726,
3726,
76,
21,
2741,
505,
25,
7368,
17,
1384,
14,
4155,
20,
226,
2478,
15,
32,
25,
1450,
478,
14,
610,
30,
14,
4155,
129,
10840,
14,
97,
5167,
19,
389,
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... |
Access to svg's scripts
===
svg is an xml based graphics and you can add JavaScripts to it. I have tried to access to the script functions defined in a svg. The script in my svg is something like this:
<svg ... onload="RunScript(evt);"...>
<script type="text/javascript">
...
function RunScript(loadEvent) {
// Get object in my html by id
var objElement = top.document.getElementById('objid1');
if (objElement)
{
// Extend object tag object's methods
objElement.SVGsetDimension = setDimension;
...
}
function setDimention(w, h) {...}
In my main html file, the svg is embedded in an object tag like this:
<object id="objid1" data="mygrahic.svg" ... >
<a href="#" onclick="document.getElementById('objid1').SVGsetDimention(10, 10);
return false;"
...>Set new dimention</a>...
This one works fine. However if the svg xml file is referenced by a full URL (on another site) like this:
<object id="objid1" data="http://www.artlibrary.net/myaccount/mygrahic.svg" ... >
the codes do not work any more. It looks like that I cannot attach the method defined in my svg script to a method in my main html object tag element, or the top or document is not available in this case, or getElementById(..) just cannot find my object element in my svg script. Is there any way I can do in the svg xml script to find my html element?
Not sure if this problem is caused by the different DOMs, and there is no way for my svg script codes to figure out another DOM's object or element. It would be nice if there is any solution.
| 0 | [
2,
1381,
20,
13,
18,
22955,
22,
18,
17505,
800,
3726,
3726,
13,
18,
22955,
25,
40,
23504,
432,
8351,
17,
42,
92,
3547,
8247,
8741,
18,
20,
32,
9,
31,
57,
794,
20,
1381,
20,
14,
3884,
3719,
2811,
19,
21,
13,
18,
22955,
9,
14,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I trap OCUnit test pass/failure messages/events.
===
I'm trying to use xcodebuild & OCUnit with my Continuous Integration server (TeamCity).
JetBrains offer test observer implementations for boost::test and CppUnit that format test output in a way that TeamCity can interpret. I need to do something similar for OCUnit if I want to use it.
There appears to be a SenTestObserver class in OCUnit but I'm ignorant of how exactly it should be used and the OCUnit homepage doesn't seem to provide any documentation on the matter. | 0 | [
2,
184,
107,
31,
5585,
13,
2499,
15464,
1289,
1477,
118,
24910,
4221,
7561,
118,
4943,
38,
18,
9,
800,
3726,
3726,
31,
22,
79,
749,
20,
275,
993,
9375,
29361,
279,
13,
2499,
15464,
29,
51,
6357,
8078,
8128,
13,
5,
6575,
5788,
6,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What are the correct version numbers for C#?
===
What are the correct version numbers for C#? What came out when? Why can't I find any answers about C# 3.5?
[This question is primarily to aid those who are searching for an answer using an incorrect version number, e.g. "C# 3.5". At the time of this writing, there are several questions tagged with "c#3.5". I'm shortly going to correct this, as recommended by the answer to this question about terminology. The hope is that anyone failing to find an answer with the wrong version number will find *this* answer and then search again with the right version number.] | 0 | [
2,
98,
50,
14,
4456,
615,
2116,
26,
272,
5910,
60,
800,
3726,
3726,
98,
50,
14,
4456,
615,
2116,
26,
272,
5910,
60,
98,
281,
70,
76,
60,
483,
92,
22,
38,
31,
477,
186,
6709,
88,
272,
5910,
203,
9,
264,
60,
636,
1565,
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... |
Set cron expression to one and half hour
===
Hwo to set cron exp ression such that it will run the certain commands every one and half hour?
| 0 | [
2,
309,
13,
19587,
1803,
20,
53,
17,
519,
1671,
800,
3726,
3726,
746,
6374,
20,
309,
13,
19587,
13,
6899,
10719,
5991,
145,
30,
32,
129,
485,
14,
1200,
14294,
352,
53,
17,
519,
1671,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
T-SQL fuzzy lookup without SSIS?
===
SSIS 2005/2008 does fuzzy lookups and groupings. Is there a feature that does the same in T-SQL? | 0 | [
2,
13,
38,
8,
18,
22402,
20631,
361,
576,
366,
13,
18,
4557,
60,
800,
3726,
3726,
13,
18,
4557,
812,
118,
2753,
630,
20631,
361,
15699,
17,
19288,
18,
9,
25,
80,
21,
1580,
30,
630,
14,
205,
19,
13,
38,
8,
18,
22402,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
What is the Performance, Safety, and Alignment of a Data member hidden in an embedded char array in a C++ Class?
===
I have seen a codebase recently that I fear is violating alignment constraints. I've scrubbed it to produce a minimal example, given below. Briefly, the players are:
- *Pool*. This is a class which allocates memory efficiently, for some definition of 'efficient'. *Pool* is guaranteed to return a chunk of memory that is aligned for the requested size.
- *Obj_list*. This class stores homogeneous collections of objects. Once the number of objects exceeds a certain threshold, it changes it's internal representation from a list to a tree. The size of *Obj_list* is one pointer (8 bytes on a 64-bit platform). It's populated store will of course exceed that.
- *Aggregate*. This class represents a very common object in the system. It's history goes back to the early 32-bit workstation era, and it was 'optimized' (in that same 32-bit era) to use as little space as possible as a result. *Aggregate*s can be empty, or manage an arbitrary number of objects.
In this example, *Aggregate* items are always allocated from *Pool*s, so they are always aligned. The only occurrences of *Obj_list* in this example are the 'hidden' members in *Aggregate* objects, and therefore they are always allocated using *placement new*. Here are the support classes:
class Pool
{
public:
Pool();
virtual ~Pool();
void *allocate(size_t size);
static Pool *default_pool(); // returns a global pool
};
class Obj_list
{
public:
inline void *operator new(size_t s, void * p) { return p; }
Obj_list(const Args *args);
// when constructed, Obj_list will allocate representation_p, which
// can take up much more space.
~Obj_list();
private:
Obj_list_store *representation_p;
};
And here is Aggregate. Note that member declaration *member_list_store_d*:
// Aggregate is derived from Lesser, which is twelve bytes in size
class Aggregate : public Lesser
{
public:
inline void *operator new(size_t s) {
return Pool::default_pool->allocate(s);
}
inline void *operator new(size_t s, Pool *h) {
return h->allocate(s);
}
public:
Aggregate(const Args *args = NULL);
virtual ~Aggregate() {};
inline const Obj_list *member_list_store_p() const;
protected:
char member_list_store_d[sizeof(Obj_list)];
};
It is that data member that I'm most concerned about. Here is the pseudocode for initialization and access:
Aggregate::Aggregate(const Args *args)
{
if (args) {
new (static_cast<void *>(member_list_store_d)) Obj_list(args);
}
else {
zero_out(member_list_store_d);
}
}
inline const Obj_list *Aggregate::member_list_store_p() const
{
return initialized(member_list_store_d) ? (Obj_list *) &member_list_store_d : 0;
}
You may be tempted to suggest that we replace the char array with a pointer to the *Obj_list* type, initialized to NULL or an instance of the class. This gives the proper semantics, but just shifts the memory cost around. If memory were still at a premium (and it might be, this is an EDA database representation), replacing the char array with a pointer to an *Obj_list* would cost one more pointer in the case when *Aggregate* objects *do* have members.
Besides that, I don't really want to get distracted from the main question here, which is alignment. I *think* the above construct is problematic, but can't really find more in the standard than some vague discussion of the alignment behavior of the 'system/library' *new*.
So, does the above construct do anything more than cause an occasional pipe stall?
| 0 | [
2,
98,
25,
14,
956,
15,
2108,
15,
17,
12448,
16,
21,
1054,
322,
3689,
19,
40,
12138,
4892,
7718,
19,
21,
272,
20512,
718,
60,
800,
3726,
3726,
31,
57,
541,
21,
1797,
8436,
1989,
30,
31,
1719,
25,
23255,
12448,
16747,
9,
31,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Message delivery when user is offline
===
I have a plugin for OpenFire that creates and delivers a message to a user using
XMPPServer.getInstance().getMessageRouter().route(message)
What I would like to know is what happens to that message if the user is not online.
My goal is to only have the message delivered if the user is online, and fail or be routed to the bit bucket otherwise. | 0 | [
2,
2802,
6010,
76,
4155,
25,
168,
1143,
800,
3726,
3726,
31,
57,
21,
10922,
108,
26,
368,
5929,
30,
9695,
17,
5879,
18,
21,
2802,
20,
21,
4155,
568,
993,
79,
3421,
10321,
106,
9,
3060,
108,
384,
2416,
5,
6,
9,
3060,
3845,
18,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to use JEDI TJCLHashMap classes?
===
I'm trying to use TJCLHashMap family of classes, but apparently this class has no useful public methods. All methods are "protected". How to use this class? Although JCL comes with some samples, I seem to miss something. A basic example would be great. | 0 | [
2,
184,
20,
275,
12671,
49,
13,
38,
728,
5316,
25436,
15022,
2684,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
275,
13,
38,
728,
5316,
25436,
15022,
190,
16,
2684,
15,
47,
3083,
48,
718,
63,
90,
4811,
317,
3195,
9,
65,
3195,
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... |
Creating a Backpack-like Calendar in Rails
===
What are the current best practices in the Rails world for displaying a calendar month view with event items bound to the days in the month (like in Backpack or Google Calendar, for example)?
I don't need anything like fancy stuff like drag and drop support. I'm just looking for code to let me get a list of events in my controller and somehow expose them as entries in a monthly calendar display view (maybe with class names on the HTML elements to allow me to display different types of events differently, or maybe to display events from multiple calendars).
There's the [Dynamic Calendar Helper][1] that was created a few years ago, which very well might still work just fine for me, but I'm just wondering if I should be looking at other plugins, too.
Other possibilities I've found so far:
- [A few possible contenders][2]
(judging from their descriptions) on
GitHub
- [Joyent Connector][3], which is now
open source, has calendar
capabilities
So, can you point me in the right direction as to what folks are using to output monthly calendars with data these days?
[1]: http://wiki.rubyonrails.org/rails/pages/DynamicCalendarHelper
[2]: http://github.com/search?q=rails+calendar
[3]: http://joyent.com/connector/ | 0 | [
2,
2936,
21,
12672,
8,
1403,
7036,
19,
2240,
18,
800,
3726,
3726,
98,
50,
14,
866,
246,
5242,
19,
14,
2240,
18,
126,
26,
17418,
21,
7036,
1617,
1418,
29,
807,
3755,
4138,
20,
14,
509,
19,
14,
1617,
13,
5,
1403,
19,
12672,
54,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I prevent two OSes from clobbering grub files?
===
I want to install Linux and OpenSolaris on the same hard disk in different partitions. I'm worried because OpenSolaris seems to actively manage the grub data when updating the OS (part of the "boot environment" feature). Is there anything I should prepare for to prevent my grub data from getting clobbered. If I later want to add another version of linux to the same system, what are the considerations? Should I choose one OS and always do grub updates from that one OS? If so, then how do I use the installation iso for a new version of Linux? Won't it go ahead and modify the grub data on its own? Once I've already booted into Linux, and I want to udpate my grub files, should I run a grub command that reads the data from the boot section of the drive, and puts it into the local filesystem I'm currently booted into? | 0 | [
2,
184,
107,
31,
2501,
81,
13,
6641,
18,
37,
7383,
17031,
68,
8961,
220,
6488,
60,
800,
3726,
3726,
31,
259,
20,
16146,
13024,
17,
368,
5594,
14688,
27,
14,
205,
552,
8582,
19,
421,
10711,
18,
9,
31,
22,
79,
3681,
185,
368,
55... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I programatically use C# to append multiple DOCX files together?
===
I need to use C# programatically to append several preexisting DOCX files into a single, long DOCX file - including special markups like bullets and images. Header and footer information will be stripped out, so those won't be around to cause any problems.
I can find plenty of information about manipulating an individual DOCX file with .NET Framework 3, but nothing easy or obvious about how you would merge files. There is also a third-party program (Acronis.Words) that will do it, but it is prohibitively expensive.
Thank you for any and all help! | 0 | [
2,
184,
92,
31,
625,
721,
8438,
275,
272,
5910,
20,
4865,
2451,
1886,
9765,
396,
6488,
429,
60,
800,
3726,
3726,
31,
376,
20,
275,
272,
5910,
625,
721,
8438,
20,
4865,
2451,
238,
782,
21341,
9765,
396,
6488,
77,
21,
345,
15,
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... |
Running Command line from an ASPX page, and returning output to page
===
I'm trying to access the command line and execute a command, and then return the output to my aspx page. A good example would be running dir on page load of an aspx page and returning the output via Response.Write(). I have tried using the code below. When I try debugging this it runs but never finishes loading and no output is rendered.
I am using C# and .NET Framework 3.5sp1. Any help much appreciated.
Thanks,
Bryan
public partial class CommandLine : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
System.Diagnostics.Process si = new System.Diagnostics.Process();
si.StartInfo.WorkingDirectory = @"c:\";
si.StartInfo.UseShellExecute = false;
si.StartInfo.FileName = "cmd.exe";
si.StartInfo.Arguments = "dir";
si.StartInfo.CreateNoWindow = true;
si.StartInfo.RedirectStandardInput = true;
si.StartInfo.RedirectStandardOutput = true;
si.StartInfo.RedirectStandardError = true;
si.Start();
string output = si.StandardOutput.ReadToEnd();
si.Close();
Response.Write(output);
}
} | 0 | [
2,
946,
1202,
293,
37,
40,
28,
306,
396,
2478,
15,
17,
2485,
5196,
20,
2478,
800,
3726,
3726,
31,
22,
79,
749,
20,
1381,
14,
1202,
293,
17,
15644,
21,
1202,
15,
17,
94,
788,
14,
5196,
20,
51,
28,
306,
396,
2478,
9,
21,
254,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
MediaWiki: How are the image paths calculated?
===
I have a Perl app. that parses MediaWiki sql tables and displays data from multiple wiki pages. I need to be able to re-create the absolute image path to display the images, eg: [.../f/fc/Herbs.jpg/300px-Herbs.jpg]
From MediaWiki Manual:Image_Authorisation: "the [image] path can be calculated easily from the file name and..." How is the path calculated? | 0 | [
2,
941,
17375,
45,
184,
50,
14,
1961,
12074,
10785,
60,
800,
3726,
3726,
31,
57,
21,
416,
255,
4865,
9,
30,
2017,
7202,
941,
17375,
4444,
255,
7484,
17,
9412,
1054,
37,
1886,
13,
17375,
4434,
9,
31,
376,
20,
44,
777,
20,
302,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 correct way to include license information on an element within a microformated block of xhtml?
===
Seems like rel-license only applies to pages not to specific elements... anyone spotted usage for page elements in the wild? | 0 | [
2,
98,
25,
14,
4456,
161,
20,
468,
3962,
676,
27,
40,
4520,
363,
21,
2899,
23588,
69,
1921,
16,
993,
15895,
60,
800,
3726,
3726,
2206,
101,
13,
7256,
8,
4663,
6498,
104,
13169,
20,
4434,
52,
20,
1903,
2065,
9,
9,
9,
1276,
6821... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Getting the name of the current method in c++
===
Is there a (standardized) way to get the name of the current method using c++?
Using GNU GCC you can do this by using the macro __FUNCTION__ and __PRETTY_FUNCTION__ (surrounded by 2 underscores), however, this is of course non portable. Is there a way to do this in standard c++ or a way to make it portable? | 0 | [
2,
1017,
14,
204,
16,
14,
866,
2109,
19,
272,
20512,
800,
3726,
3726,
25,
80,
21,
13,
5,
15566,
1333,
6,
161,
20,
164,
14,
204,
16,
14,
866,
2109,
568,
272,
20512,
60,
568,
26092,
489,
3384,
42,
92,
107,
48,
34,
568,
14,
906... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Detecting failure of a Bash "export" value
===
In Bash I'm executing a command and putting the result in a variable like this:
<pre>export var=`svn ls`</pre>
But if SVN fails for some reason--say it returns a non-zero error code--export still returns status code 0. How do I detect if the executed command fails? | 0 | [
2,
9092,
68,
2990,
16,
21,
13158,
13,
7,
1706,
1993,
7,
1923,
800,
3726,
3726,
19,
13158,
31,
22,
79,
25836,
21,
1202,
17,
3873,
14,
829,
19,
21,
7612,
101,
48,
45,
13,
1,
3515,
1,
1706,
1993,
4033,
3726,
1,
18,
16578,
644,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SharePoint 2007 Analytics Package.
===
While the built-in analytics of MOSS2007 are nice to have - they are inadequate at the same time. Any ideas where I can look for a more comprehensive package? Am I missing something?
Thanks,
Carl | 0 | [
2,
1891,
3132,
624,
26320,
6030,
9,
800,
3726,
3726,
133,
14,
392,
8,
108,
26320,
16,
8188,
2727,
50,
2210,
20,
57,
13,
8,
59,
50,
16296,
35,
14,
205,
85,
9,
186,
3478,
113,
31,
92,
361,
26,
21,
91,
7041,
6030,
60,
589,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Output Parameter not Returned from Stored Proc.
===
I am calling a SQL proc that has 3 OUTPUT params. After the call to the proc one of the params does not return a value when the other two do. Profiler shows that all 3 values are being returned.
The params are declared as follows in the proc...
@UsrVariableID INT OUTPUT,
@OrganisationName NVARCHAR(256) OUTPUT,
@Visible bit OUTPUT
and the code that calls the proc is like this...
cm.Parameters.AddWithValue("@OrganisationName", name);
cm.Parameters["@OrganisationName"].Direction = ParameterDirection.Output;
cm.Parameters.AddWithValue("@Visible", visible);
cm.Parameters["@Visible"].Direction = ParameterDirection.Output;
cm.ExecuteNonQuery();
name = cm.Parameters["@OrganisationName"].Value.ToString();
visible = bool.Parse(cm.Parameters["@Visible"].Value.ToString());
id = int.Parse(cm.Parameters["@UsrVariableID"].Value.ToString());
The param that fails is @OrganisationName.
I'm wondering if its because the param is of type string in the code but NVARCHAR in the proc.
Anyone got any ideas?
| 0 | [
2,
5196,
18906,
52,
587,
37,
8214,
13,
15617,
9,
800,
3726,
3726,
31,
589,
2555,
21,
4444,
255,
13,
15617,
30,
63,
203,
5196,
2258,
79,
18,
9,
75,
14,
645,
20,
14,
13,
15617,
53,
16,
14,
2258,
79,
18,
630,
52,
788,
21,
1923,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 launch an instance of an application using Python?
===
I am creating a Python script where it does a bunch of tasks and one of those tasks is to launch and open an instance of Excel. What is the ideal way of accomplishing that in my script? | 0 | [
2,
184,
92,
31,
3394,
40,
4851,
16,
40,
3010,
568,
20059,
60,
800,
3726,
3726,
31,
589,
2936,
21,
20059,
3884,
113,
32,
630,
21,
7653,
16,
8674,
17,
53,
16,
273,
8674,
25,
20,
3394,
17,
368,
40,
4851,
16,
20700,
9,
98,
25,
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,
0,
0,
0,
0,
0,
0... |
Is it safe to assume that STL vector storage is always contiguous?
===
If you have an STL vector which has been resized, is it safe to take the address of element 0 and assume the rest of the vector will follow in memory?
e.g.
vector<char> vc(100);
// do some stuff with vc
vc.resize(200);
char* p = &vc[0];
// do stuff with *p
| 0 | [
2,
25,
32,
1834,
20,
7158,
30,
354,
255,
7497,
4326,
25,
550,
1065,
8407,
9627,
60,
800,
3726,
3726,
100,
42,
57,
40,
354,
255,
7497,
56,
63,
74,
302,
6560,
15,
25,
32,
1834,
20,
247,
14,
3218,
16,
4520,
713,
17,
7158,
14,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Evaluate a css expression only in IE<7 w/out using conditional comments?
===
I already know: "Don't use css expressions!" My question is not about whether I should be using an expression or if there is an alternative; my question is simply: **Can I get a css expression to only be evaluated in versions of IE prior to version 7 without using conditional comments?**
I occasionally use an underscore hack to hide a rule from IE7 but IE7 seems to evaluate expressions anyway. For example, `_width:700px;` is ignored by IE7 but `_width:expression('700px');` is still evaluated.
I know that someone will try to tell me to just use a conditional comment to include the rule, but I am looking for a way to do this without placing a single style rule into a separate file.
A note for those of you who still don't want to let it go: I've chosen to use a css expression, but I didn't do so lightly. I understand the implications and I am using an expression that only evaluates once. Stop worrying about my bad decisions and just answer the question already... ;-) | 0 | [
2,
13,
15599,
21,
272,
18,
18,
1803,
104,
19,
13,
660,
1,
465,
619,
118,
1320,
568,
21206,
7534,
60,
800,
3726,
3726,
31,
614,
143,
45,
13,
7,
804,
22,
38,
275,
272,
18,
18,
13832,
187,
7,
51,
1301,
25,
52,
88,
1472,
31,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a standard keyboard shortcut to build the current project in Visual Studio?
===
I know that Ctrl+Shift+B launches a solution build, but I would like a shortcut that just builds the current project. Is a custom shortcut my only option? | 0 | [
2,
25,
80,
21,
1236,
8896,
502,
4118,
20,
1895,
14,
866,
669,
19,
3458,
1120,
60,
800,
3726,
3726,
31,
143,
30,
13,
4812,
6362,
2430,
14157,
2430,
220,
22933,
21,
4295,
1895,
15,
47,
31,
83,
101,
21,
502,
4118,
30,
114,
1895,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Escaping spaces in mod_rewrite
===
I have the following Apache mod_rewrite rule:
RewriteRule ^(.*) http://127.0.0.1:4321/$1 [proxy]
This works great; Apache forwards all requests to the CherryPy server I have running on the same machine.
Unfortunately, I'm having some problems with paths which have a space. If I make a request for `/Sites/some%20site/image.png` then Apache makes a request to CherryPy for `/Sites/some site/image.png` which messes up CherryPy.
Is there a way to specify in my RewriteRule that I'd like to re-escape spaces in the URL before forwarding the request to CherryPy? | 0 | [
2,
14700,
7644,
19,
7226,
1,
99,
23716,
800,
3726,
3726,
31,
57,
14,
249,
17140,
7226,
1,
99,
23716,
1828,
45,
27891,
16154,
13,
1,
5,
9,
2483,
6,
7775,
6903,
11595,
9,
387,
9,
387,
9,
165,
21231,
1941,
118,
11019,
636,
4899,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 a gridview bound to a custom object (CSV file) be sorted?
===
I have a Datagrid which is getting its data from CSV. No file is sorted in any order, but I want to order the gridview by Username (a field). How could this be done? My XML/gridview code looks like the following:
Streamwriter for writing to csv and populating gridview:
string filename = @"D:\www\isolated\LocalUser\cc-suppressions\generatedsuppressions\surpressions.csv";
StreamWriter sWriter = new StreamWriter(Server.MapPath("Surpression.csv"));
string Str = string.Empty;
string headertext = "";
sWriter.WriteLine(headertext);
int cellLimit = GridView3.Rows[1].Cells.Count;
for (int i = 0; i <= (this.GridView3.Rows.Count - 1); i++)
{
for (int j = 0; j <= (this.GridView3.Rows[i].Cells.Count - 1); j++)
{
Str = this.GridView3.Rows[i].Cells[j].Text.ToString();
if (Str == " ")
Str = "";
Str = (Str + ",");
sWriter.Write(Str);
}
sWriter.WriteLine();
}
sWriter.Close();
sWriter.Dispose();
}
this.GridView3.DataBind(); | 0 | [
2,
92,
21,
7354,
4725,
4138,
20,
21,
5816,
3095,
13,
5,
6824,
710,
3893,
6,
44,
22554,
60,
800,
3726,
3726,
31,
57,
21,
1054,
16375,
56,
25,
1017,
82,
1054,
37,
272,
18,
710,
9,
90,
3893,
25,
22554,
19,
186,
389,
15,
47,
31,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Recommendations for how to do OOP design
===
I find that whenever I begin writing an app in Java/C#, things start off good, but over time, as the app becomes more complex, it just gets more and more complicated. I've become aware of the fact that I'm not very good at design and high level architecture. All my classes become fairly strongly coupled and the design isn't "elegant" at all. I'm fairly competent at "low level" programming. That is, I can get just about anything done within a function or a class, but my high level design is weak and I'd really like to improve it. Does anyone have pointers to techniques, books, etc. that would be helpful in making me a better software engineer? | 0 | [
2,
12121,
26,
184,
20,
107,
13,
21709,
704,
800,
3726,
3726,
31,
477,
30,
6634,
31,
2348,
1174,
40,
4865,
19,
8247,
118,
150,
5910,
15,
564,
799,
168,
254,
15,
47,
84,
85,
15,
28,
14,
4865,
2633,
91,
1502,
15,
32,
114,
3049,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Monitoring whether a python module has changed in development mode
===
I think I can detect whether a directory has changed with pyinotify -module, but this is a bit trickier problem.
I'd want to write a tool that'd allow me to check whether a contents of a module in development mode(python setup.py develop) has changed, then restart a routine it was running.
I'd either need to hook pyinotify to python's setuptools or then I'd need to find out the directory my python module lies in. Is this possible and how?
(also small help to restarting the routine would be appreciated. I don't always have control to that routine and what it does) | 0 | [
2,
8984,
1472,
21,
20059,
12613,
63,
1015,
19,
522,
3740,
800,
3726,
3726,
31,
277,
31,
92,
9092,
1472,
21,
16755,
63,
1015,
29,
7103,
49,
1270,
8612,
13,
8,
19673,
62,
15,
47,
48,
25,
21,
1142,
5514,
1944,
1448,
9,
31,
22,
43... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
I'm somewhat confused about the serialization of a PHP associative array.
===
`a:3:{i:0;i:4;i:1;i:3;i:2;i:2;}`
Am I right to say that this is an array of size 3 where the key value pairs are 0->4, 1->3, and 2->2? If so, I find this representation awfully confusing. At first, I thought it was a listing of values (or the array contained {0, 4, 1, 3, 2, 2}), but I figured that the a:3: was the size of the array. And if 3 was the size, then both the keys AND values appeared in the brackets with no way of clearly identifying a key/value pair without counting off. | 0 | [
2,
31,
22,
79,
4131,
4230,
88,
14,
5956,
1829,
16,
21,
13,
26120,
28,
18,
16325,
3366,
7718,
9,
800,
3726,
3726,
13,
1,
58,
45,
240,
45,
1,
49,
45,
387,
73,
49,
45,
300,
73,
49,
45,
165,
73,
49,
45,
240,
73,
49,
45,
135,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Boolean logic rule evaluator
===
I have essentially a survey that is shown, and people answer questions a lot like a test,
and there are different paths, it is pretty easy so far, but i wanted to make it more dynamic, so that i can have a generic rule that is for the test with all the paths, to make the evaluator easier to work with currently i just allow AND's, and each OR essentially becomes another Rule in the set,
QuestionID, then i form a bunch of AND rules like so
<code><pre>
<rule id="1">
<true>
<question ID=123>
<question ID=124>
</true>
<false>
<question ID=127>
<question ID=128>
</false>
</rule>
<rule id="2"><true>
<question ID=123>
<question ID=125>
</true>
<false>
<question ID=127>
</false>
</rule>
</pre></code>
this rule 1 says if question 123, and 124 are answered true, and 127, 128 are false, they pass. OR (rule 2) is if 123 and 125 are true and 127 is false, they pass as well.
This gets tedious if there are many combinations, so i want to implement OR in the logic, I am just not sure what best approach is for this problem.
I think rules engine is too complicated, there must be an easier way, perhaps constructing a graph like in LINQ and then evaluating to see if they pass,
thanks!
--not an compsci major.
| 0 | [
2,
9827,
413,
210,
7085,
1828,
6805,
2377,
3457,
800,
3726,
3726,
31,
57,
7398,
21,
3431,
30,
25,
1721,
15,
17,
148,
1623,
2346,
21,
865,
101,
21,
1289,
15,
17,
80,
50,
421,
12074,
15,
32,
25,
1772,
2010,
86,
463,
15,
47,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Delphi 2009 and Firebird 2.1 = Full Unicode?
===
Has anyone started making Unicode Apps or converting Existing Apps into Unicode?
How are you tweaking Firebird to have the least problems, especially the CHARSET attribute?
Is there any problem encountered? Any thing else that I should be aware of?
I'm just preparing myself so that I get less surprises, before jumping onto the Unicode train. | 0 | [
2,
23030,
588,
17,
535,
8490,
172,
9,
165,
800,
503,
28010,
60,
800,
3726,
3726,
63,
1276,
373,
544,
28010,
4865,
18,
54,
19583,
3149,
4865,
18,
77,
28010,
60,
184,
50,
42,
28769,
68,
535,
8490,
20,
57,
14,
639,
1716,
15,
1118,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Splitting log files by date or file size in Lighttpd.
===
So far the only way I've found to do this is by telling Lighty to pipe its logs through an app called "vlogger". Is there a way to break out log files by date without introducing any external dependencies or cron jobs? I feel like there might be a way to do it with config file variables, but my Lighty-fu just isn't strong enough. | 0 | [
2,
17282,
6738,
6488,
34,
1231,
54,
3893,
1072,
19,
471,
38,
9251,
9,
800,
3726,
3726,
86,
463,
14,
104,
161,
31,
22,
195,
216,
20,
107,
48,
25,
34,
2497,
471,
93,
20,
7642,
82,
18893,
120,
40,
4865,
227,
13,
7,
710,
29480,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Override Default Constructor of Partial Class with Another Partial Class
===
I don't think this is possible, but if is then I need it :)
I have a auto-generated proxy file from the wsdl.exe command line tool by Visual Studio 2008.
The proxy output is partial classes. I want to override the default constructor that is generated. I would rather not modify the code since it is auto-generated.
I tried making another partial class and redefining the default constructor, but that doesn't work. I then tried using the override and new keywords, but that doesn't work.
I know I could inherit from the partial class, but that would mean I'd have to change all of our source code to point to the new parent class. I would rather not have to do this.
Any ideas, work arounds, or hacks?
//Auto-generated class
namespace MyNamespace {
public partial class MyWebService : System.Web.Services.Protocols.SoapHttpClientProtocol {
public MyWebService() {
string myString = "auto-generated constructor";
//other code...
}
}
}
//Manually created class in order to override the default constructor
namespace MyNamespace {
public partial class MyWebService : System.Web.Services.Protocols.SoapHttpClientProtocol {
public override MyWebService() { //this doesn't work
string myString = "overridden constructor";
//other code...
}
}
}
| 0 | [
2,
84,
11891,
12838,
6960,
248,
16,
7284,
718,
29,
226,
7284,
718,
800,
3726,
3726,
31,
221,
22,
38,
277,
48,
25,
938,
15,
47,
100,
25,
94,
31,
376,
32,
13,
45,
6,
31,
57,
21,
3108,
8,
25314,
27188,
3893,
37,
14,
619,
18,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
how can i make a "Surround" type Delphi Template?
===
i'm migrating my app to delphi 2009. my app must still use a lot of AnsiString. during migration, i find myself always converting:
abc := def;
into:
abc := string(def);
or
abc := TDeviceAnsiString(def);
i know i should be able to do this with templates but i find templates--although powerful--are not so easy to get working. here's what i've been trying:
<?xml version="1.0" encoding="utf-8" ?>
<codetemplate xmlns="http://schemas.borland.com/Delphi/2005/codetemplates"
version="1.0.0">
<template name="das" invoke="auto">
<point name="expr">
<script language="Delphi">
InvokeCodeCompletion;
</script>
<hint>
MP: TDeviceAnsiString
</hint>
<text>
True
</text>
</point>
<description>
MP: TDeviceAnsiString
</description>
<author>
Mike
</author>
<code language="Delphi" context="any" delimiter="|"><![CDATA[TDeviceAnsiString(|selected|)|end|]]>
</code>
</template>
</codetemplate>
it doesn't appear in the Surround menu and it doesn't activate whenever i want. i'd like to be able to
abc := **das***[tab]*def;
or select the "def" and use "surround" to get:
abc := TDeviceAnsiString(def);
thank you for your help! | 0 | [
2,
184,
92,
31,
233,
21,
13,
7,
4082,
5000,
7,
1001,
23030,
22894,
60,
800,
3726,
3726,
31,
22,
79,
28749,
51,
4865,
20,
23030,
588,
9,
51,
4865,
491,
174,
275,
21,
865,
16,
40,
18,
49,
11130,
9,
112,
8443,
15,
31,
477,
992,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
mysql_connect VS mysql_pconnect
===
I have this doubt, I've searched the web and the answers seem to be diversified. Is it better to use mysql_pconnect over mysql_connect when connecting to a database via PHP? I read that pconnect scales much better, but on the other hand, being a persistent connection... having 10 000 connections at the same time, all persistent, doesn't seem scalable to me.
Thanks in advance. | 0 | [
2,
51,
18,
22402,
1,
25996,
4611,
51,
18,
22402,
1,
306,
25996,
800,
3726,
3726,
31,
57,
48,
3063,
15,
31,
22,
195,
9036,
14,
2741,
17,
14,
6709,
2260,
20,
44,
26929,
9,
25,
32,
574,
20,
275,
51,
18,
22402,
1,
306,
25996,
84... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
stl::multimap - how do i get groups of data ?
===
Multimap essentially has groups of data sorted by the key. I want a method by which I could access these individual groups and get their aggregate values.
For example, in a std::multimap< string, int > I store
{"Group1", 1},
{"Group1", 2},
{"Group1", 3},
{"Group2", 10},
{"Group2", 11},
{"Group2", 12}
Having stored these values, I should be able to iterate this multimap and get the aggregate values of each "group". Problem is there aren't any functions defined in STL to access MultiMaps in such a way. I could use lower_bound, upper_bound to manually iterate the multimap and total the group's contents, but I am hopng there could be better ways already defined in STL ? Can anyone propose a solution as to how I could get the aggregate values for a group in the above example. | 0 | [
2,
354,
255,
45,
45,
21531,
15022,
13,
8,
184,
107,
31,
164,
1170,
16,
1054,
13,
60,
800,
3726,
3726,
1889,
15022,
7398,
63,
1170,
16,
1054,
22554,
34,
14,
1246,
9,
31,
259,
21,
2109,
34,
56,
31,
110,
1381,
158,
1359,
1170,
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... |
open source cms
===
did anyone ever use any java based open soure cms tools. I am asked to evaluate jackrabbit right, Does anyone have any thought on that or you might know something that is better. thanks | 0 | [
2,
368,
1267,
2390,
18,
800,
3726,
3726,
144,
1276,
462,
275,
186,
8247,
432,
368,
86,
4221,
2390,
18,
4672,
9,
31,
589,
411,
20,
13,
15599,
1040,
13585,
3326,
193,
15,
630,
1276,
57,
186,
289,
27,
30,
54,
42,
530,
143,
301,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Excel 2007 Hangs When Closing via .NET
===
I have a Visual Basic .NET program which needs to open and close an Excel spreadsheet. Opening and reading the spreadsheet work fine, but trying to close the Excel 2007 application causes it to hang. It seems to close, but if you look in the task manager the application is still running. The code that I'm using to close it is
wbkData.Close(saveChanges:=False)
appExcel.Quit()
wbkData = Nothing
appExcel = Nothing
How can I get Excel to close properly?
| 0 | [
2,
20700,
624,
4546,
18,
76,
4239,
1197,
13,
9,
2328,
800,
3726,
3726,
31,
57,
21,
3458,
2125,
13,
9,
2328,
625,
56,
2274,
20,
368,
17,
543,
40,
20700,
1789,
17627,
9,
1214,
17,
1876,
14,
1789,
17627,
170,
1123,
15,
47,
749,
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... |
making a link toggle between SlideDown and SlideUp (scriptaculous)
===
The scriptaculous wiki has a demo (http://github.com/madrobby/scriptaculous/wikis/effect-slidedown) that shows the SlideDown effect in use. However I need to have the same link to slide down if a certain DIV is hidden and SlideUp if that DIV is showing.
How do I achieve this?
Thanks. | 0 | [
2,
544,
21,
3508,
20,
263,
4875,
128,
6464,
2968,
17,
6464,
576,
13,
5,
8741,
1738,
22717,
6,
800,
3726,
3726,
14,
3884,
1738,
22717,
13,
17375,
63,
21,
8376,
13,
5,
21127,
6903,
10404,
20926,
9,
960,
118,
6817,
12417,
779,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.