unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
How do you handle code promotion in a Sharepoint environment?
===
In a typical enterprise scenario with in-house development, you might have dev, staging, and production environments. You might use SVN to contain ongoing development work in a trunk, with patches being stored in branches, and your released code going into appropriately named tags. Migrating binaries from one environment to the next may be as simple as copying them to middle-ware servers, GAC'ing things that need to be GAC'ed, etc. In coordination with new revisions of binaries, databases are updated, usually by adding stored procedures, views, and adding/adjusting table schema.
In a Sharepoint environment, you might use a similar version control scheme. Custom code (assemblies) ends up in features that get installed either manually or via various setup programs. However, some of what needs to be promoted from dev to staging, and then onto production might be database content that supports the custom code bits.
If you've managed an enterprise Sharepoint environment, please share thoughts on how you manage promotion of code and content changes between environments, while protecting your work and your users, and keeping your sanity. | 0 | [
2,
184,
107,
42,
3053,
1797,
2733,
19,
21,
1891,
3132,
2307,
60,
800,
3726,
3726,
19,
21,
3874,
6002,
12705,
29,
19,
8,
1682,
522,
15,
42,
530,
57,
9664,
15,
16824,
15,
17,
637,
11246,
9,
42,
530,
275,
13,
18,
16578,
20,
3717,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SVN Client integrated with OS X's Finder
===
Is there a TortoiseSVN equivalent for OS X? I'm looking for an SVN client that will integrate with OS X's Finder and be added as Context menu items.
| 0 | [
2,
13,
18,
16578,
6819,
5547,
29,
13,
759,
993,
22,
18,
13,
18639,
800,
3726,
3726,
25,
80,
21,
25691,
18,
16578,
4602,
26,
13,
759,
993,
60,
31,
22,
79,
699,
26,
40,
13,
18,
16578,
6819,
30,
129,
18399,
29,
13,
759,
993,
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,
0,
0,
0,
0,
0... |
open solaris code vs solaris code
===
How compatible is code written under Solaris with Open Solaris ? I would be interested specifically in some kernel modules . | 0 | [
2,
368,
4535,
403,
1797,
4611,
4535,
403,
1797,
800,
3726,
3726,
184,
14961,
25,
1797,
642,
131,
4535,
403,
29,
368,
4535,
403,
13,
60,
31,
83,
44,
3158,
3524,
19,
109,
17007,
17113,
13,
9,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Crystal Reports .Net Guidance
===
We have been using .Net and Visual Studio for the last six years, and early on developed a number of web based reporting applications using the .Net version of Crystal Reports that was bundled with Visual Studio. My overall opinion of that product has been, to say the least, rather unimpressed. It seemed to be incredibly difficult and convoluted to use, we had to make security changes, install various extra software, and so on.
Now, we are moving to VS2008 and version 3.5 of the .Net framework, and the time has come to redevelop some of these old applications. The developers who used (and somehow mastered) Crystal .Net have long gone, and I am facing a decision - do we stick with Crystal Reports or move to something else. We also have the "full" version of Crystal Reports XI at our disposal.
The way we use the product is to product pdf versions of data extracted from various databases. While some apps use the inbuilt Crystal Reports viewer as well, this seems to be redundant now with the flexibility of grid views - but there is still the need to produce a pdf version of the data in teh grid for printing, or in Excel format to download.
What is the concensus? Is Crystal Reports .Net worth persisting with, or should we work out how to use version XI? Alternatively, is there a simple and low cost way to generate pdf reports without using Crystal? What good sources of "how to" information have others found and recommend? Are there suitable books, designed for VS2008 / .Net 3.5 development that you have used and found of benefit?
Thanks in advance. | 0 | [
2,
4282,
2813,
13,
9,
2328,
8193,
800,
3726,
3726,
95,
57,
74,
568,
13,
9,
2328,
17,
3458,
1120,
26,
14,
236,
490,
122,
15,
17,
274,
27,
885,
21,
234,
16,
2741,
432,
6670,
3767,
568,
14,
13,
9,
2328,
615,
16,
4282,
2813,
30,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Dragging HTML cells over the table using Javascript
===
Folks,
I need a solution that allows drag-and-drop cell over the table.
The cells can be of different colspans, so when the cell is dropped into the middle of another cell, which is bigger, the following steps should be performed:
1. Another td element is created, which is equal in width to the draggable element.
2. Cells on left and right of new td element automatically adjust their width.
Now I use JQuery drag-and-drop plug-in. It allows to drag elements, but becomes a bit awkward when it comes to manipulating DOM elements on the part of droppable element.
Could anybody propose some library where this kind of behaviour is implemented? | 0 | [
2,
13052,
13,
15895,
2934,
84,
14,
859,
568,
8247,
8741,
800,
3726,
3726,
14563,
15,
31,
376,
21,
4295,
30,
2965,
5501,
8,
290,
8,
12361,
1667,
84,
14,
859,
9,
14,
2934,
92,
44,
16,
421,
3313,
18,
3206,
18,
15,
86,
76,
14,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the difference between vmalloc and kmalloc?
===
I've googled around and found most people advocating the use of `kmalloc`, as you're guaranteed to get contiguous physical blocks of memory. However, it also seems as though `kmalloc` can fail if a contiguous __physical__ block that you want can't be found.
What are the advantages of having a contiguous block of memory? Specifically, why would I need to have a contiguous __physical__ block of memory in a *system call*? Is there any reason I couldn't just use `vmalloc`?
Finally, if I __did__ use `kmalloc`, since this is for a system call, should I specify `GFP_ATOMIC` since, technically, a system call is called as part of an interrupt handler, and I [read][1] the following:
> GFP_ATOMIC
> The allocation is high-priority and
> does not sleep. This is the flag to
> use in interrupt handlers, bottom
> halves and other situations where you
> cannot sleep.
[1]: http://www.linuxjournal.com/article/6930 | 0 | [
2,
98,
25,
14,
2841,
128,
566,
3482,
10799,
17,
401,
192,
10799,
60,
800,
3726,
3726,
31,
22,
195,
8144,
43,
140,
17,
216,
127,
148,
23411,
14,
275,
16,
13,
1,
2939,
192,
10799,
1,
15,
28,
42,
22,
99,
13572,
20,
164,
1065,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Uploading files in Ruby on Rails
===
I have a web application that needs to take a file upload from the user and upload it to a remote server. I can take input from user to server fine via file_field, but can't seem to work out the next step of uploading from server to remote. Net::HTTP doesn't do multipart forms out of the box, and I haven't been able to find another good solution. I need something that will allow me to go from user -> server -> remote instead of going user -> remote. Anyone succeeded in doing this before? | 0 | [
2,
71,
16866,
6488,
19,
10811,
27,
2240,
18,
800,
3726,
3726,
31,
57,
21,
2741,
3010,
30,
2274,
20,
247,
21,
3893,
71,
8294,
37,
14,
4155,
17,
71,
8294,
32,
20,
21,
5388,
8128,
9,
31,
92,
247,
6367,
37,
4155,
20,
8128,
1123,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
c compiler for windows
===
i know c is not a very popular language but i need it for school. I'm fine working on linux using gcc as my c compiler but would like a windows solution. Any ideas? I've looked the one from bloodshed but looking for more options. thanks | 0 | [
2,
272,
21486,
26,
1936,
800,
3726,
3726,
31,
143,
272,
25,
52,
21,
253,
844,
816,
47,
31,
376,
32,
26,
116,
9,
31,
22,
79,
1123,
638,
27,
13024,
568,
489,
3384,
28,
51,
272,
21486,
47,
83,
101,
21,
1936,
4295,
9,
186,
3478,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SQL Server 2000 Function for record created datetime
===
I was given a task to display when a record in the database was added, however, the previous developers never made a field for this, and I can't go back and make up dates for all the existing records. Is there an easy way to extract out a record Creation date from a SQL server 2000 query.
SELECT RECORD_CREATED_DATE FROM tblSomething WHERE idField = 1
The RECORD_CREATED_DATE isn't a field in the existing table. Is there some sort of SQL Function to get this information?
| 0 | [
2,
4444,
255,
8128,
824,
1990,
26,
571,
679,
1231,
891,
800,
3726,
3726,
31,
23,
504,
21,
3005,
20,
3042,
76,
21,
571,
19,
14,
6018,
23,
905,
15,
207,
15,
14,
1158,
10168,
243,
117,
21,
575,
26,
48,
15,
17,
31,
92,
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... |
I'm looking for a regular expression to remove a given (x)HTML tag from a string
===
Let's say I have a string holding a mess of text and (x)HTML tags. I want to remove all instances of a given tag (and any attributes of that tab=g), leaving all other tags and text along. What's the best Regex to get this done? | 0 | [
2,
31,
22,
79,
699,
26,
21,
1290,
1803,
20,
4681,
21,
504,
13,
5,
396,
6,
15895,
3383,
37,
21,
3724,
800,
3726,
3726,
408,
22,
18,
395,
31,
57,
21,
3724,
1337,
21,
3957,
16,
1854,
17,
13,
5,
396,
6,
15895,
3383,
18,
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... |
Find potential SQL inject problems in Java/JSP code.
===
I'm working for a customer with a huge legacy codebase consisting of various Java en JSP based applications.
Most querying is done using the home-build 'orm' system. Some applications use Plain Old JDBC. Some applications are based on Hibernate (yes HQL build with plus signs is a potential problem as well). Some of the older applications are entirely writen in JSP.
I've found a couple of SQL inject bugs manually. But I could really use some sort of tool to search for potential weak spots.
Any ideas? | 0 | [
2,
477,
2222,
4444,
255,
20316,
1716,
19,
8247,
118,
728,
3401,
1797,
9,
800,
3726,
3726,
31,
22,
79,
638,
26,
21,
7705,
29,
21,
2329,
7780,
1797,
8436,
4160,
16,
617,
8247,
1957,
487,
3401,
432,
3767,
9,
127,
25597,
68,
25,
677... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 my application benefit from temporary tables?
===
I've been reading a little about temporary tables in MySQL but I'm an admitted newbie when it comes to databases in general and MySQL in particular. I've looked at some examples and the MySQL documentation on how to create a temporary table, but I'm trying to determine just how temporary tables might benefit my applications and I guess secondly what sorts of issues I can run into. Granted, each situation is different, but I guess what I'm looking for is some general advice on the topic.
I did a little googling but didn't find exactly what I was looking for on the topic. If you have any experience with this, I'd love to hear about it.
Thanks,
Matt | 0 | [
2,
184,
92,
51,
3010,
4234,
37,
4700,
7484,
60,
800,
3726,
3726,
31,
22,
195,
74,
1876,
21,
265,
88,
4700,
7484,
19,
51,
18,
22402,
47,
31,
22,
79,
40,
3297,
78,
5893,
76,
32,
1624,
20,
6018,
18,
19,
297,
17,
51,
18,
22402,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to change the location of the netbeans settings directory (~/.netbeans)
===
By default netbeans stores it's settings in a directory called .netbeans under the user's home directory. Is it possible to change the location of this directory (especially under Windows)?
| 0 | [
2,
184,
20,
753,
14,
1474,
16,
14,
4275,
863,
5950,
12410,
16755,
13,
5,
1,
118,
9,
2328,
863,
5950,
6,
800,
3726,
3726,
34,
12838,
4275,
863,
5950,
4134,
32,
22,
18,
12410,
19,
21,
16755,
227,
13,
9,
2328,
863,
5950,
131,
14,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best back button jQuery plugin?
===
I have found two plug ins that enable the browser's back button to work across ajax interactions, but I can't determine which is better and why. The two plug ins are [history_remote][1] and the [history][2].
The history plug in is simpler and seems to provide all the functionality I need, but I'm not sure I understand enough about them to make an intelligent decision. For my application, I need the plug in to allow the back button to work through ajax interactions, and I need to be able to bookmark the page at any point through the interactions.
Which plug in is best in this scenario and why? Are there any other plug ins that I missed that might be better? Are there any limitations to these plug ins that I'm missing (do they not work in certain situations etc)? Any information would be greatly appreciated.
[1]: http://stilbuero.de/jquery/history/
[2]: http://www.mikage.to/jquery/jquery_history.html | 0 | [
2,
98,
25,
14,
246,
97,
5167,
487,
8190,
93,
10922,
108,
60,
800,
3726,
3726,
31,
57,
216,
81,
10922,
19,
18,
30,
9240,
14,
16495,
22,
18,
97,
5167,
20,
170,
464,
20624,
11224,
15,
47,
31,
92,
22,
38,
3746,
56,
25,
574,
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... |
Winforms for Mono on Mac, Linux and PC (Redux)
===
(I asked this question [in another way][1], and got some interesting responses but I'm not too convinced.)
Is Mono's GtkSharp truly cross-platform? It seems to be Gnome based... how can that work with PC and Mac?
Can someone give me examples of a working Mac/PC/Linux app that is written with a single codebase in Microsoft .Net?
[1]: http://stackoverflow.com/questions/72580/making-a-cwinform-application-cross-platform-should-i-use-air-mono-or-something | 0 | [
2,
628,
4190,
18,
26,
4129,
27,
1572,
15,
13024,
17,
5168,
13,
5,
2095,
7147,
6,
800,
3726,
3726,
13,
5,
49,
411,
48,
1301,
636,
108,
226,
161,
500,
2558,
165,
500,
15,
17,
330,
109,
4883,
13231,
47,
31,
22,
79,
52,
266,
532... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Cleaning a string of punctuation in C++
===
Ok so before I even ask my question I want to make one thing clear. I am currently a student at NIU for Computer Science and this does relate to one of my assignments for a class there. So if anyone has a problem read no further and just go on about your business.
Now for anyone who is willing to help heres the situation. For my current assignment we have to read a file that is just a block of text. For each word in the file we are to clear any punctuation in the word (ex : "can't" would end up as "can" and "that--to" would end up as "that" obviously with out the quotes, quotes were used just to specify what the example was).
The problem I've run into is that I can clean the string fine and then insert it into the map that we are using but for some reason with the code I have written it is allowing an empty string to be inserted into the map. Now I've tried everything that I can come up with to stop this from happening and the only thing I've come up with is to use the erase method within the map structure itself.
So what I am looking for is two things, any suggestions about how I could a) fix this with out simply just erasing it and b) any improvements that I could make on the code I already have written.
Here are the functions I have written to read in from the file and then the one that cleans it.
Note: the function that reads in from the file calls the clean_entry function to get rid of punctuation before anything is inserted into the map.
int get_words(map<string, int>& mapz)
{
int cnt = 0; //set out counter to zero
map<string, int>::const_iterator mapzIter;
ifstream input; //declare instream
input.open( "prog2.d" ); //open instream
assert( input ); //assure it is open
string s; //temp strings to read into
string not_s;
input >> s;
while(!input.eof()) //read in until EOF
{
not_s = "";
clean_entry(s, not_s);
if((int)not_s.length() == 0)
{
input >> s;
clean_entry(s, not_s);
}
mapz[not_s]++; //increment occurence
input >>s;
}
input.close(); //close instream
for(mapzIter = mapz.begin(); mapzIter != mapz.end(); mapzIter++)
cnt = cnt + mapzIter->second;
return cnt; //return number of words in instream
}
void clean_entry(const string& non_clean, string& clean)
{
int i, j, begin, end;
for(i = 0; isalnum(non_clean[i]) == 0 && non_clean[i] != '\0'; i++);
begin = i;
if(begin ==(int)non_clean.length())
return;
for(j = begin; isalnum(non_clean[j]) != 0 && non_clean[j] != '\0'; j++);
end = j;
clean = non_clean.substr(begin, (end-begin));
for(i = 0; i < (int)clean.size(); i++)
clean[i] = tolower(clean[i]);
}
| 0 | [
2,
9724,
21,
3724,
16,
13,
17359,
291,
857,
19,
272,
20512,
800,
3726,
3726,
5854,
86,
115,
31,
166,
1349,
51,
1301,
31,
259,
20,
233,
53,
584,
1207,
9,
31,
589,
871,
21,
1209,
35,
1781,
291,
26,
1428,
762,
17,
48,
630,
16464,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 return a strongly typed dataset from a webservice?
===
Should I expose a strongly typed dataset from a webservice and bind it directly in a client? or are there more sensible ways for asmx web services? I am doing CRUD operations (Create, Read, Update, Delete). Should I be converting to objects and use objects over the webservice?
I find working with datasets to be frustrating and difficult to work with when for example when inserting into a table within it for instance. It doesn't seem logical to ship a whole dataset to and forth when only inserting one record or when only getting one record from a particular table within the dataset.
Is there a better way? | 0 | [
2,
378,
31,
788,
21,
5020,
1001,
43,
1054,
3554,
37,
21,
2741,
11449,
60,
800,
3726,
3726,
378,
31,
13833,
21,
5020,
1001,
43,
1054,
3554,
37,
21,
2741,
11449,
17,
10193,
32,
1703,
19,
21,
6819,
60,
54,
50,
80,
91,
24599,
2847,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Fastest way to see how many bytes are equal between fixed length arrays.
===
I have 2 16-byte array that I need to "compare" and see how many elements are equal between the two.
This routine is going to be used millions of times (a usual run is about 60 or 70 million times), so I need it to be as fast as possible. I'm working on C++ (C++Builder 2007, for the record)
Right now, I have a simple:
matches += array1[0] == array2[0];
repeated 16 times (as profiling it appears to be 30% faster than doing it with a for loop)
Is there any other way that could work faster? | 0 | [
2,
7518,
161,
20,
196,
184,
151,
34,
3231,
50,
2747,
128,
3535,
1476,
7718,
18,
9,
800,
3726,
3726,
31,
57,
172,
347,
8,
23246,
7718,
30,
31,
376,
20,
13,
7,
18415,
99,
7,
17,
196,
184,
151,
2065,
50,
2747,
128,
14,
81,
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... |
Mapping to Dictionary with iBATIS
===
Given a simple statement, such as:
<statement id="SelectProducts" resultMap="???">
SELECT * FROM Products
</statement>
Is it possible to get a list of dictionary objects where the keys are the column names?
ie.
var list = Mapper.QueryForList<IDictionary<string,string>>("SelectProducts", null);
IDictionary<string, string> dict = list[0];
// dict["id"] == "1"
// dict["name"] == "Some Product Name"
// dict["price"] == "$9.99"
// etc.
I'd like to generalize the result of a query to handle any number of columns/column names without mapping to specific properties on some class.
I realize the example here would fail since a result set may have duplicate (or null) column names. I've thought about a result class that holds an indexed list of key-value pairs. The key thing here is retaining the column information somewhere.
| 0 | [
2,
13305,
20,
9186,
29,
13,
9747,
3409,
800,
3726,
3726,
504,
21,
1935,
3331,
15,
145,
28,
45,
13,
1,
3859,
1130,
4924,
3726,
7,
18,
16964,
14086,
18,
7,
829,
15022,
3726,
7,
60,
60,
60,
7,
1,
5407,
1637,
37,
1985,
13,
1,
11... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
python regular expression to split paragraphs.
===
How would one write a regular expression to use in python to split paragraphs?
A paragraph is defined by 2 linebreaks (\n). But one can have any ammount of spaces/tabs together with the line breaks, and it still should be considered as a paragraph.
I am using python so the solution can use python's [regular expression syntax][1] which is extended. (can make use of `(?P...)` stuff)
Examples to make clear:
the_str = 'paragraph1\n\nparagraph2'
# splitting should yield ['paragraph1', 'paragraph2']
the_str = 'p1\n\t\np2\t\n\tstill p2\t \n \n\tp3'
# should yield ['p1', 'p2\t\n\tstill p2', 'p3']
the_str = 'p1\n\n\n\tp2'
# should yield ['p1', '\n\tp2']
The best I could come with is: `r'[ \t\r\f\v]*\n[ \t\r\f\v]*\n[ \t\r\f\v]*'` but that is ugly. Anything better?
[1]: http://docs.python.org/lib/re-syntax.html "Python re syntax"
| 0 | [
2,
20059,
1290,
1803,
20,
2132,
20599,
18,
9,
800,
3726,
3726,
184,
83,
53,
2757,
21,
1290,
1803,
20,
275,
19,
20059,
20,
2132,
20599,
18,
60,
21,
20599,
25,
2811,
34,
172,
293,
12008,
18,
13,
5,
1,
103,
6,
9,
47,
53,
92,
57... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to get a quick status from the emacs compilation buffer?
===
By default, emacs 22.1.1 only shows the top of the compilation buffer when you first issue the compile command. I would like it to scroll to the bottom automatically when I use the compile command in order to save keystrokes. This way I can easily get a status of the current compilation by just looking at the compile buffer and seeing which files are currently being compiled instead of having to switch windows and scroll to the bottom of the buffer. Any ideas? | 0 | [
2,
184,
20,
164,
21,
2231,
1782,
37,
14,
13,
62,
6893,
18,
4868,
17497,
60,
800,
3726,
3726,
34,
12838,
15,
13,
62,
6893,
18,
1024,
9,
165,
9,
165,
104,
1285,
14,
371,
16,
14,
4868,
17497,
76,
42,
64,
1513,
14,
26561,
1202,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 restrict NULL input parameters into oracle stored procedure
===
I have writtent some Oracle storedprocedures in these there are more then 20 input parameters and from them morethen 10 parameters are required , I want all with some value and do not want to accept null values for that , Is there anything that I can declare in the Procedure defination itself which can restrict null input parameter or Will I have to check for each value and Raise the exception if the required value is null ? | 0 | [
2,
184,
20,
15436,
16203,
6367,
12905,
77,
15759,
8214,
7004,
800,
3726,
3726,
31,
57,
642,
38,
109,
15759,
8214,
15617,
69,
4221,
18,
19,
158,
80,
50,
91,
94,
434,
6367,
12905,
17,
37,
105,
91,
2504,
332,
12905,
50,
1390,
13,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a way to dump the objects in memory from a running ruby process?
===
Killing the processs while obtaining this information would be fine. | 0 | [
2,
25,
80,
21,
161,
20,
11424,
14,
3916,
19,
1912,
37,
21,
946,
10811,
953,
60,
800,
3726,
3726,
2389,
14,
953,
18,
133,
12114,
48,
676,
83,
44,
1123,
9,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
What browser is best for testing web standards?
===
When I build a site, I'd like to have at least one browser I can show it off in without any hacks or workarounds, and yet still retain maximum functionality. Knowing that none of the browsers have perfect standards adherence, which one comes closest?
Also, are there any standards areas in which a single browser seems to specialize? Opera, for instance, seems to be bent on adhering to all voice-related CSS standards. | 0 | [
2,
98,
16495,
25,
246,
26,
4431,
2741,
3364,
60,
800,
3726,
3726,
76,
31,
1895,
21,
689,
15,
31,
22,
43,
101,
20,
57,
35,
639,
53,
16495,
31,
92,
298,
32,
168,
19,
366,
186,
11835,
18,
54,
170,
10037,
18,
15,
17,
768,
174,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best way to only include certain libraries on certain operating systems in c/c++?
===
When writing an app that one wants to have compile on mac, linux and windows, what is the best way of managing the different libraries that will need to be included on the various operating systems. For example, using the glut opengl toolkit requires different includes on each operating system. | 0 | [
2,
98,
25,
14,
246,
161,
20,
104,
468,
1200,
8649,
27,
1200,
2455,
1242,
19,
272,
118,
150,
20512,
60,
800,
3726,
3726,
76,
1174,
40,
4865,
30,
53,
2846,
20,
57,
26561,
27,
1572,
15,
13024,
17,
1936,
15,
98,
25,
14,
246,
161,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Open an Emacs buffer when a command tries to open an editor in shell-mode
===
I like to use Emacs' shell mode, but it has a few deficiencies. One of those is that it's not smart enough to open a new buffer when a shell command tries to invoke an editor. For example with the environment variable `VISUAL` set to `vim` I get the following from `svn propedit`:
<pre>
$ svn propedit svn:externals .
"svn-prop.tmp" 2L, 149C[1;1H
~ [4;1H~ [5;1H~ [6;1H~ [7;1H~
...
</pre>
(It may be hard to tell from the representation, but it's a horrible, ugly mess.)
With `VISUAL` set to `"emacs -nw"`, I get
<pre>
$ svn propedit svn:externals .
emacs: Terminal type "dumb" is not powerful enough to run Emacs.
It lacks the ability to position the cursor.
If that is not the actual type of terminal you have,
use the Bourne shell command `TERM=... export TERM' (C-shell:
`setenv TERM ...') to specify the correct type. It may be necessary
to do `unset TERMINFO' (C-shell: `unsetenv TERMINFO') as well.svn: system('emacs -nw svn-prop.tmp') returned 256
</pre>
(It works with `VISUAL` set to just `emacs`, but only from inside an Emacs X window, not inside a terminal session.)
Is there a way to get shell mode to do the right thing here and open up a new buffer on behalf of the command line process? | 0 | [
2,
368,
40,
13,
62,
6893,
18,
17497,
76,
21,
1202,
3919,
20,
368,
40,
1835,
19,
3593,
8,
15570,
800,
3726,
3726,
31,
101,
20,
275,
13,
62,
6893,
18,
22,
3593,
3740,
15,
47,
32,
63,
21,
310,
29998,
9,
53,
16,
273,
25,
30,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you reset ASP.Net AJAX cascading dropdown control (client side)
===
The cascading dropdown control works great except that I am unable to figure out a way to reset the dropdown client-side (in Javascript)
My set up is something like this
DD1
DD2
DD3
DD4
each DD is dependent on the previous DD and uses webservice to load them.
On change of DD3 I need to reset DD4 but the previous selection stays.
Can this be done? I tried clearing the value in the supporting hidden input control (cddTest_ClientState) in vain
TIA | 0 | [
2,
184,
107,
42,
23422,
28,
306,
9,
2328,
20624,
7167,
13489,
68,
2804,
2968,
569,
13,
5,
150,
18513,
38,
270,
6,
800,
3726,
3726,
14,
7167,
13489,
68,
2804,
2968,
569,
693,
374,
1613,
30,
31,
589,
2343,
20,
1465,
70,
21,
161,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Denormalize an XML schema programmatically
===
I need to take any given valid XML schema (XSD) and denormalize it to a simple form containing no refs, no includes, etc. All simple type definitions should be inline, such that when looking at any given element, all declarations are visible without performing another lookup.
I've found some tools that have this built-in, but I need to do it "on the fly." Platform of choice is Java, but I'd be willing to port the code from another language if necessary. I just really don't want to reinvent the wheel here. Searching for OSS libraries from Apache/etc have yielded nothing. The closest I've found is XSOM which supports traversing a schema as an object model, but you still have to handle every possible form that a schema could take to represent a given structure.
The output doesn't have to be actual XML, as it will actually be used in a object model in its final form. | 0 | [
2,
121,
17462,
2952,
40,
23504,
23874,
625,
6732,
1326,
800,
3726,
3726,
31,
376,
20,
247,
186,
504,
7394,
23504,
23874,
13,
5,
396,
18,
43,
6,
17,
121,
17462,
2952,
32,
20,
21,
1935,
505,
3503,
90,
13,
14057,
18,
15,
90,
1103,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 get file size efficiently
===
While googling, I see that using java.io.File.length() can be slow.
FileChannel has a size() method that is available as well.
Is there an efficient way in java to get the file size? | 0 | [
2,
8247,
164,
3893,
1072,
20519,
800,
3726,
3726,
133,
162,
5598,
802,
15,
31,
196,
30,
568,
8247,
9,
1963,
9,
16877,
9,
6325,
5,
6,
92,
44,
2276,
9,
3893,
10928,
63,
21,
1072,
5,
6,
2109,
30,
25,
904,
28,
134,
9,
25,
80,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... |
Debugging Websites in Internet Explorer
===
I have a Website that is really slow and "feels" really bad when using it. The server is fine, it's a clientside issue, I assume because too much JavaScript or Image Requests, but since it's not my own Website, I wonder if there is a way to show and profile the Page from within IE.
In Firefox, I would use Firebug, Y!Slow and the Web Developer extention to see all JavaScript, CSS, Images and other Requests, AJAX Requests etc., but on IE I did not see any problem. I know I could use Firefox, but the page works better in FF than in IE, so i wonder if there is some Development Addon specifically in IE. | 0 | [
2,
121,
16254,
2762,
13931,
19,
2620,
8520,
800,
3726,
3726,
31,
57,
21,
2271,
30,
25,
510,
2276,
17,
13,
7,
16963,
18,
7,
510,
896,
76,
568,
32,
9,
14,
8128,
25,
1123,
15,
32,
22,
18,
21,
6819,
1416,
1513,
15,
31,
7158,
185... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
File System Management Tools
===
Looking for suggestions on file system management tools. We have several terabytes of images, pdfs, excel sheets, etc.
We're looking at some sort of software that will help us to manage, archive, etc the images.
We don't store all the files information in a database but some are and we were hoping to maybe find an app that could help us integrate the archive process into the database.
Thank you! | 0 | [
2,
3893,
329,
1097,
4672,
800,
3726,
3726,
699,
26,
18389,
27,
3893,
329,
1097,
4672,
9,
95,
57,
238,
20796,
23246,
18,
16,
3502,
15,
13,
11124,
18,
15,
20700,
8801,
15,
2722,
9,
95,
22,
99,
699,
35,
109,
2058,
16,
2306,
30,
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... |
Opening more than one of the same Mac Application at once.
===
I'm developing a Mac App in Java that logs into any one of our client's databases. My users want to have several copies of this program running so they can log into a couple clients at the same time, rather than logging out and logging back in.
How can I allow a user to open several copies of my App at once?
I'm using Eclipse to develop, and Jarbundler to make the app. | 0 | [
2,
1214,
91,
119,
53,
16,
14,
205,
1572,
3010,
35,
382,
9,
800,
3726,
3726,
31,
22,
79,
3561,
21,
1572,
4865,
19,
8247,
30,
18893,
77,
186,
53,
16,
318,
6819,
22,
18,
6018,
18,
9,
51,
3878,
259,
20,
57,
238,
3298,
16,
48,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Determining the extended itnerfaces of a Class
===
I need to determine if a Class object representing an interface extends another interface, ie:
package a.b.c.d;
public Interface IMyInterface extends a.b.d.c.ISomeOtherInterface{
}
according to [the spec][1] Class.getSuperClass() will return null for an Interface.
> If this Class represents either the
> Object class, an interface, a
> primitive type, or void, then null is
> returned.
Therefore the following won't work.
Class interface = Class.ForName("a.b.c.d.IMyInterface")
Class extendedInterface = interface.getSuperClass();
if(extendedInterface.getName().equals("a.b.d.c.ISomeOtherInterface")){
//do whatever here
}
any ideas?
[1]: http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Class.html#getSuperclass() | 0 | [
2,
13521,
14,
1984,
32,
1031,
6413,
18,
16,
21,
718,
800,
3726,
3726,
31,
376,
20,
3746,
100,
21,
718,
3095,
3793,
40,
6573,
9073,
226,
6573,
15,
13,
660,
45,
6030,
21,
9,
220,
9,
150,
9,
43,
73,
317,
6573,
31,
915,
6280,
64... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How Do You Clear The IRB Console?
===
How do you clear the IRB console screen? | 0 | [
2,
184,
107,
42,
1207,
14,
31,
7549,
8650,
60,
800,
3726,
3726,
184,
107,
42,
1207,
14,
31,
7549,
8650,
2324,
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,
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... |
MySpace DOM?
===
I've been given the task of doing some work customizing an artist's space in MySpace. It seems that you sort of hack the HTML you want into your edit profile page (which has several empty boxes). The MySpace page, it seems, is already HTML so you can only hack into that. Suggested "tweaks" include incomplete HTML code (e.g., a `<DIV>` tag without a `</DIV>` tag to supress certain sections) and stylesheet pieces that you can "place anywhere" (meaning somewhere on your edit profile page). And the best one is that sites that offer layouts say, "Layout Code - Copy and Paste the code at the bottom of your 'I'd Like to Meet' Section!"
This cannot possibly be this lame, can it?
Is there any coherent guide to customizing MySpace pages for programmers/HTML designers? Is there a coherent DOM (including things like `.contactTable` etc.)? Could it be that all the tweaks are just hacks people have figured out from looking at the generated HTML?
Thanks! | 0 | [
2,
51,
5582,
11859,
60,
800,
3726,
3726,
31,
22,
195,
74,
504,
14,
3005,
16,
845,
109,
170,
5816,
3335,
40,
1169,
22,
18,
726,
19,
51,
5582,
9,
32,
2206,
30,
42,
2058,
16,
11835,
14,
13,
15895,
42,
259,
77,
154,
9392,
5296,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why am I getting a "wrong number of arguments (0 for 2)" exception in my Ruby Code?
===
I'm trying to polish up my Ruby by re writing Kent Beck's xUnit Python example from "Test Driven Development: By Example". I've got quite far but now I get the following error when I run which I don't grok.
C:\Documents and Settings\aharmel\My Documents\My Workspace\TDD_Book\TDDBook_xUnit_RubyVersion\lib\main.rb:21:in `test_running': wrong number of arguments (0 for 2) (ArgumentError)
from C:\Documents and Settings\aharmel\My Documents\My Workspace\TDD_Book\TDDBook_xUnit_RubyVersion\lib\main.rb:21:in `run'
from C:\Documents and Settings\aharmel\My Documents\My Workspace\TDD_Book\TDDBook_xUnit_RubyVersion\lib\main.rb:85
My code looks like this:
class TestCase
def initialize(name)
puts "1. inside TestCase.initialise: @name: #{name}"
@name = name
end
def set_up
# No implementation (but present to be overridden in WasRun)
end
def run
self.set_up
self.send @name # <<<<<<<<<<<<<<<<<<<<<<<<<= ERROR HERE!!!!!!
end
end
class WasRun < TestCase
attr_accessor :wasRun
attr_accessor :wasSetUp
def initialize(name)
super(name)
end
def set_up
@wasRun = false
@wasSetUp = true
end
def test_method
@wasRun = true
end
end
class TestCaseTest < TestCase
def set_up
@test = WasRun.new("test_method")
end
def test_running
@test.run
puts "test was run? (true expected): #{test.wasRun}"
end
def test_set_up
@test.run
puts "test was set up? (true expected): #{test.wasSetUp}"
end
end
TestCaseTest.new("test_running").run
Can anyone point out my obvious mistake? | 0 | [
2,
483,
589,
31,
1017,
21,
13,
7,
499,
14271,
234,
16,
10553,
13,
5,
387,
26,
172,
6,
7,
5391,
19,
51,
10811,
1797,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
2283,
71,
51,
10811,
34,
302,
1174,
4422,
6846,
22,
18,
993,
15464... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Drools project idea needed
===
I was asked to make some drools traning for my teammates. Just to show them how it can be used and how usefull it may be. To do this training I first have to learn Drools, and I figured that the best way to learn it will be small project centered around drools.
Any interesting ideas?
My idea for this project was to do some webMethods flow files validation (just some example validations). I'd do validation only - we have in-house parser of that file format.
But something that actually does some work would be nice. | 4 | [
2,
27008,
18,
669,
882,
851,
800,
3726,
3726,
31,
23,
411,
20,
233,
109,
27008,
18,
12748,
68,
26,
51,
15354,
9,
114,
20,
298,
105,
184,
32,
92,
44,
147,
17,
184,
4811,
255,
32,
123,
44,
9,
20,
107,
48,
838,
31,
64,
57,
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... |
Hiding Subreports in SQL Report (RDL)
===
I have a bunch a reports that are printed out and mailed to clients. At the top of the report is the return address, left aligned. I was asked to add an optional logo to the report. This logo should be left of the return address. (The logo and all other info is stored in the database). So if the logo exists, you SHOULD see:
<someimage> <Return Address>
And if no logo exists, you SHOULD see:
<Return Address>
There are many different logos possible placed in many different reports, so to make life easier, the logo was implemented as a subreport. The subreport just grabs the correct logo image, and then it automatically displays in the report.
The problem I'm having is this. If the log DOES NOT exist, then we want the return address left aligned, as shown above. But what is happening is that while the subreport shows nothing, it still takes up the space where the logo WOULD be, and the return address is floating a few inches to the right of the left side of the page.
<Return Address>
SO... is there a setting I can use/set to get the subreport to either not show, or not take up any space, if there is no logo to be displayed?
Sorry, hope I made this clear enough. I'm totally new to RDL's.
| 0 | [
2,
5314,
972,
17437,
18,
19,
4444,
255,
1330,
13,
5,
897,
255,
6,
800,
3726,
3726,
31,
57,
21,
7653,
21,
2813,
30,
50,
5317,
70,
17,
4216,
69,
20,
7421,
9,
35,
14,
371,
16,
14,
1330,
25,
14,
788,
3218,
15,
225,
13,
12740,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
"SocketException: Unconnected sockets not implemented" with self-signed SSL certificate
===
(I've asked the same question of the jmeter-user mailing list, but I wanted to try here as well - so at the least I can update this with the answer once I find it).
I'm having trouble using [JMeter][1] to test a Tomcat webapp using a self-signed SSL cert. JMeter throws a SocketException with message `Unconnected sockets not implemented`. [According to JMeter's docs][2], the application is designed and written to accept any certificate, self-signed or CA signed or whatever.
Has anyone run into this specific exception before?
I've attempted to export this certificate from the server and import it into my local keystore (with *keytool -import -alias tomcat -file <filename>*), but the result is the same.
I've also tried setting javax.net.debug=all as a JVM arg ([the JSSE reference guide][3] lists this as a debugging step); however, I don't see any debugging output anywhere - should I expect this somewhere other than standard out/error?
[1]: http://jakarta.apache.org/jmeter/
[2]: http://jakarta.apache.org/jmeter/usermanual/get-started.html#opt_ssl
[3]: http://java.sun.com/j2se/1.5.0/docs/guide/security/jsse/ReadDebug.html | 0 | [
2,
13,
7,
18,
5668,
1198,
10066,
872,
45,
367,
23520,
18482,
18,
52,
6807,
7,
29,
1119,
8,
13472,
13,
18,
18,
255,
6259,
800,
3726,
3726,
13,
5,
49,
22,
195,
411,
14,
205,
1301,
16,
14,
487,
7307,
8,
16704,
4216,
68,
968,
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... |
Low single process thread limit in Red Hat Linux
===
I'm experiencing an issue on a test machine running Red Hat Linux (kernel version is 2.4.21-37.ELsmp). The problem is, once a certain number of threads are created in a single thread group, the operating system is unwilling or unable to create any more.
In this case, the number of threads it's cutting off at is a mere 29 threads. This is testable with a simple Java program that just creates threads until it gets an error and then prints the number of threads it created. The error is a <pre>java.lang.OutOfMemoryError: unable to create new native thread</pre>
This seems to be unaffected by things such as the number of threads in use by other processes or users or the total amount of memory the system is using at the time. JVM settings like Xms, Xmx, and Xss don't seem to change anything either (which is expected, considering the issue seems to be with native OS thread creation).
The output of "ulimit -a" is as follows:
<pre>
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) 4
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 7168
virtual memory (kbytes, -v) unlimited
</pre>
The user process limit does not seem to be the issue. Searching for information on what could be wrong has not turned up much, but [this post](http://blogs.oracle.com/gverma/2008/03/redhat_linux_kernels_and_proce_1.html) seems to indicate that at least some Red Hat kernels limit a process to 300 MB of memory allocated for stack, and at 10 MB per thread for stack, it seems like the issue could be there (though it seems strange and unlikely as well).
I've tried changing the stack size with "ulimit -s" to test this, but any value other than 10240 and the JVM does not start with an error of:
<pre>Error occurred during initialization of VM
Cannot create VM thread. Out of system resources.</pre>
I can generally get around Linux, but I really don't know much about system configuration, and I haven't been able to find anything specifically addressing this kind of situation. Any ideas on what system or JVM settings could be causing this would be appreciated. | 0 | [
2,
708,
345,
953,
9322,
4496,
19,
402,
2970,
13024,
800,
3726,
3726,
31,
22,
79,
15138,
40,
1513,
27,
21,
1289,
1940,
946,
402,
2970,
13024,
13,
5,
2429,
7440,
615,
25,
172,
9,
300,
9,
1941,
8,
3555,
9,
6798,
2554,
6,
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... |
Project Management software
===
i'm interested in project management software similar to MS Project. the project is a serious rebuild of my software. we have a bug management system already but i need to track project progress.
i don't like web-based apps so much because the data is either hosted off-site or i need to set up my own server.
i like MS Project but it doesn't seem to compare estimated time with actual time and use it to pro-rate the future work estimates.
i'd like a gantt chart & calendar view.
thank you for your help! | 2 | [
2,
669,
1097,
2306,
800,
3726,
3726,
31,
22,
79,
3158,
19,
669,
1097,
2306,
835,
20,
4235,
669,
9,
14,
669,
25,
21,
2055,
16128,
16,
51,
2306,
9,
95,
57,
21,
6256,
1097,
329,
614,
47,
31,
376,
20,
792,
669,
3455,
9,
31,
221,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
data access object pattern implementation
===
I would like to implement a data access object pattern in C++, but preferably without using multiple inheritance and/or boost (which my client does not like).
Do you have any suggestions? | 0 | [
2,
1054,
1381,
3095,
3732,
6123,
800,
3726,
3726,
31,
83,
101,
20,
8713,
21,
1054,
1381,
3095,
3732,
19,
272,
20512,
15,
47,
6369,
4801,
366,
568,
1886,
13852,
17,
118,
248,
10419,
13,
5,
2140,
51,
6819,
630,
52,
101,
6,
9,
107,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
cURL equivalent in JAVA
===
I am tasked with writing an authentication component for an open source JAVA app. We have an in-house authentication widget that uses https. I have some example php code that accesses the widget which uses cURL to handle the transfer.
My question is whether or not there is a port of cURL to JAVA, or better yet, what base package will get me close enough to handle the task? | 0 | [
2,
14320,
4602,
19,
8247,
800,
3726,
3726,
31,
589,
14605,
29,
1174,
40,
27963,
5912,
26,
40,
368,
1267,
8247,
4865,
9,
95,
57,
40,
19,
8,
1682,
27963,
4807,
43,
3060,
30,
2027,
7775,
18,
9,
31,
57,
109,
823,
13,
26120,
1797,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 non-C++ language for metaprogramming?
===
C++ is probably the most popular language for [static metaprogramming][1] and [Java doesn't support it][2].
Are there any other languages besides C++ that support static metaprogramming? Which ones are the best (for learning, for efficiency, for maintenance, for embedded systems, whatever)?
[1]: http://stackoverflow.com/questions/112277/best-intro-to-c-static-metaprogramming
[2]: http://stackoverflow.com/questions/112320/is-static-metaprogramming-possible-in-java | 4 | [
2,
246,
538,
8,
150,
20512,
816,
26,
7618,
19746,
3863,
60,
800,
3726,
3726,
272,
20512,
25,
910,
14,
127,
844,
816,
26,
636,
18077,
7618,
19746,
3863,
500,
2558,
165,
500,
17,
636,
1004,
1385,
1437,
22,
38,
555,
32,
500,
2558,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you create an osx application/dmg from a python package?
===
I want to create an osx application from python package and then put it in a dmg. Because I load some resources out of the package, the package should not reside in a zipfile. The resulting dmg should display the background picture to "drag here -> applications" for installation. | 0 | [
2,
184,
107,
42,
1600,
40,
13,
759,
396,
3010,
118,
43,
11984,
37,
21,
20059,
6030,
60,
800,
3726,
3726,
31,
259,
20,
1600,
40,
13,
759,
396,
3010,
37,
20059,
6030,
17,
94,
442,
32,
19,
21,
13,
43,
11984,
9,
185,
31,
6305,
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... |
Maximum Number of characters with FCKeditor
===
Have you determined a maximum number of characters allowed in [FCKEditor][1]?
I seem to have hit a wall. It will display the text to be edited, but changes don't get posted back to the server - only the original text gets posted back to the server. I am assuming that the changed text is not copied back to the hidden input field.
This problem only occurs with large amounts of text. Smaller lengths of text work just fine.
This may be a limitation of the editor, of javascript or the browser itself.
I realize this may be more suited for a bug report to the FCKEditor project, but the stack overflow community seems really responsive and willing to help.
[1]: http://www.fckeditor.net/ | 0 | [
2,
2979,
234,
16,
1766,
29,
2644,
197,
13401,
800,
3726,
3726,
57,
42,
2734,
21,
2979,
234,
16,
1766,
1159,
19,
636,
410,
2601,
13401,
500,
2558,
165,
500,
60,
31,
2260,
20,
57,
770,
21,
769,
9,
32,
129,
3042,
14,
1854,
20,
44... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 algorithm should I use to hash passwords into my database?
===
Is there *anything* available that isn't trivially breakable? | 0 | [
2,
98,
9083,
378,
31,
275,
20,
19170,
20884,
18,
77,
51,
6018,
60,
800,
3726,
3726,
25,
80,
1637,
20938,
2483,
904,
30,
2532,
22,
38,
13,
19712,
102,
1442,
579,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Problem Linking "static" Methods in C++
===
I want to call a few "static" methods of a CPP class defined in a different file but I'm having linking problems. I created a test-case that recreates my problem and the code for it is below.
(I'm completely new to C++, I come from a Java background and I'm a little familiar with C.)
<pre>
// CppClass.cpp
#include <iostream>
#include <pthread.h>
static pthread_t thread;
static pthread_mutex_t mutex;
static pthread_cond_t cond;
static int shutdown;
using namespace std;
class CppClass
{
public:
static void Start()
{
cout << "Testing start function." << endl;
shutdown = 0;
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
pthread_mutex_init(&mutex, NULL);
pthread_cond_init(&cond, NULL);
pthread_create(&thread, &attr, run_thread, NULL);
}
static void Stop()
{
pthread_mutex_lock(&mutex);
shutdown = 1;
pthread_cond_broadcast(&cond);
pthread_mutex_unlock(&mutex);
}
static void Join()
{
pthread_join(thread, NULL);
}
private:
static void *run_thread(void *pthread_args)
{
CppClass *obj = new CppClass();
pthread_mutex_lock(&mutex);
while (shutdown == 0)
{
struct timespec ts;
ts.tv_sec = time(NULL) + 3;
pthread_cond_timedwait(&cond, &mutex, &ts);
if (shutdown)
{
break;
}
obj->display();
}
pthread_mutex_unlock(&mutex);
pthread_mutex_destroy(&mutex);
pthread_cond_destroy(&cond);
pthread_exit(NULL);
return NULL;
}
void display()
{
cout << " Inside display() " << endl;
}
};
// main.cpp
#include <iostream>
/*
* If I remove the comment below and delete the
* the class declaration part, it works.
*/
// #include "CppClass.cpp"
using namespace std;
class CppClass
{
public:
static void Start();
static void Stop();
static void Join();
};
int main()
{
CppClass::Start();
while (1)
{
int quit;
cout << "Do you want to end?: (0 = stay, 1 = quit) ";
cin >> quit;
cout << "Input: " << quit << endl;
if (quit)
{
CppClass::Stop();
cout << "Joining CppClass..." << endl;
CppClass::Join();
break;
}
}
}
</pre>
When I tried to compile, I get the following error:
<pre>
$ g++ -o go main.cpp CppClass.cpp -l pthread
/tmp/cclhBttM.o(.text+0x119): In function `main':
: undefined reference to `CppClass::Start()'
/tmp/cclhBttM.o(.text+0x182): In function `main':
: undefined reference to `CppClass::Stop()'
/tmp/cclhBttM.o(.text+0x1ad): In function `main':
: undefined reference to `CppClass::Join()'
collect2: ld returned 1 exit status
</pre>
But if I remove the class declaration in main.cpp and replace it with #include "CppClass.cpp", it works fine. Basically, I want to put these declarations in a separate .h file and use it. Am I missing something?
Thanks for the help. | 0 | [
2,
1448,
12585,
13,
7,
18077,
7,
3195,
19,
272,
20512,
800,
3726,
3726,
31,
259,
20,
645,
21,
310,
13,
7,
18077,
7,
3195,
16,
21,
272,
3421,
718,
2811,
19,
21,
421,
3893,
47,
31,
22,
79,
452,
12585,
1716,
9,
31,
679,
21,
128... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Javascript to extract author/date from SVN keyword substitution
===
SVN keyword substition gives is not pretty. E.g.,
> Last updated: $Date$ by $Author$
yields
> Last updated: $Date: 2008-09-22
> 14:38:43 -0400 (Mon, 22 Sep 2008) $ by
> $Author: cconway $"
Does anybody have a Javascript snippet that prettifies things and outputs some HTML? The result should be more like:
> Last update: 22 Sep 2008 by cconway
P.S. Is there a way to replace "cconway" with a display name? | 0 | [
2,
8247,
8741,
20,
10962,
1314,
118,
8209,
37,
13,
18,
16578,
1246,
9587,
19910,
800,
3726,
3726,
13,
18,
16578,
1246,
9587,
972,
384,
9861,
2352,
25,
52,
1772,
9,
13,
62,
9,
263,
9,
15,
13,
1,
236,
6372,
45,
5579,
8209,
4403,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Security
===
We have a SharePoint site on it's own domain and are debating using Forms Authentication or Active Directory. Really we would like the power of kerberos with the flexibility and transparancy of a forms authentication (like storing the users in sqlserver using sqlmembershipprovider in asp.net). Is there any way to force Active Directory to authenticate against our user store, or can we set up a kerberos authentication server that isn't active directory?
Thanks! | 0 | [
2,
1891,
3132,
1221,
800,
3726,
3726,
95,
57,
21,
1891,
3132,
689,
27,
32,
22,
18,
258,
4603,
17,
50,
23086,
568,
1997,
27963,
54,
1348,
16755,
9,
510,
95,
83,
101,
14,
414,
16,
7002,
2102,
759,
29,
14,
19401,
17,
2982,
3574,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can a C/C++ program put itself into background?
===
What's the best way for a running C or C++ program that's been launched from the command line to put itself into the background, equivalent to if the user had launched from the unix shell with '&' at the end of the command? (But the user didn't.) It's a GUI app and doesn't need any shell I/O, so there's no reason to tie up the shell after launch. But I want a shell command launch to be auto-backgrounded without the '&' (or on Windows).
Ideally, I want a solution that would work on any of Linux, OS X, and Windows. (Or separate solutions that I can select with #ifdef.) It's ok to assume that this should be done right at the beginning of execution, as opposed to somewhere in the middle.
One solution is to have the main program be a script that launches the real binary, carefully putting it into the background. But it seems unsatisfying to need these coupled shell/binary pairs.
Another solution is to immediately launch *another* executed version (with 'system' or CreateProcess), with the same command line arguments, but putting the child in the background and then having the parent exit. But this seems clunky compared to the process putting *itself* into background.
| 0 | [
2,
184,
92,
21,
272,
118,
150,
20512,
625,
442,
1145,
77,
2395,
60,
800,
3726,
3726,
98,
22,
18,
14,
246,
161,
26,
21,
946,
272,
54,
272,
20512,
625,
30,
22,
18,
74,
1601,
37,
14,
1202,
293,
20,
442,
1145,
77,
14,
2395,
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... |
Can ClickOnce deploymet be used with windows mobile and compact framework?
===
Can I use the ClickOnce deployment method to deploy and auto update applications targeted for the windows mobile platform eg smartphone or pocket pc? | 0 | [
2,
92,
10840,
13120,
17617,
5909,
44,
147,
29,
1936,
3241,
17,
8285,
6596,
60,
800,
3726,
3726,
92,
31,
275,
14,
10840,
13120,
10475,
2109,
20,
17617,
17,
3108,
11100,
3767,
9536,
26,
14,
1936,
3241,
2452,
12369,
21421,
54,
3397,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do I programmatically create a TIF from a PDF in .NET?
===
Is there a library (preferably open source - similar to PDFSharp) that can be used to programmaticly convert a PDF to a TIF (using .net)? | 0 | [
2,
184,
107,
31,
625,
6732,
1326,
1600,
21,
13,
38,
821,
37,
21,
13,
11124,
19,
13,
9,
2328,
60,
800,
3726,
3726,
25,
80,
21,
1248,
13,
5,
3515,
2407,
4801,
368,
1267,
13,
8,
835,
20,
13,
11124,
23646,
6,
30,
92,
44,
147,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Event to Trigger Javascript Form Field Validation and Formatting?
===
Let me first say, we validate every field on the server side, so this a question
about client-side usability.
What is the conventional wisdom on *exactly when* to validate and format html form input fields using javascript?
As an example, we have a phone number field. We allow numbers, spaces, parentheses, and hyphens. We want the field to have ten digits. Also, we want the field to look like (123) 456-7890, even if the user doesn't type it that way.
It seems like we can
- Validate and format it when the user
exits the field.
- Validate and format
on every character entered.
- Intercept keystrokes and prevent the
user from entering characters that are wrong.
- Some combination of the above (e.g.
format on entry and validate on exit, prevent on entry and format on exit, etc.)
- [**Added**] Wait and do all the validation and formatting when the user clicks submit.
I've seen it done all of these ways, but I can't find information about what
is best (or even generally accepted) from a usability perspective, and more importantly, why.
--
bmb
| 0 | [
2,
98,
807,
20,
7286,
8247,
8741,
505,
575,
27999,
17,
2595,
1203,
60,
800,
3726,
3726,
408,
55,
64,
395,
15,
95,
7394,
1373,
352,
575,
27,
14,
8128,
270,
15,
86,
48,
21,
1301,
88,
6819,
8,
1416,
182,
4091,
9,
98,
25,
14,
65... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 css reset
===
I'm looking for a css reset kit, but I never used one before.
So which kits its out there, and whats your experiences regarding these kits?
And, is its any different between these kits, something you need to think about? | 4 | [
2,
246,
272,
18,
18,
23422,
800,
3726,
3726,
31,
22,
79,
699,
26,
21,
272,
18,
18,
23422,
6346,
15,
47,
31,
243,
147,
53,
115,
9,
86,
56,
18003,
82,
70,
80,
15,
17,
98,
18,
154,
5513,
3467,
158,
18003,
60,
17,
15,
25,
82,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Oracle: Is there a simple way to say "if null keep the current value" in merge/update statements?
===
I have a rather weak understanding of any of oracle's more advanced functionality but this should I think be possible.
Say I have a table with the following schema:
MyTable
Id INTEGER,
Col1 VARCHAR2(100),
Col2 VARCHAR2(100)
I would like to write an sproc with the following
PROCEDURE InsertOrUpdateMyTable(p_id in integer, p_col1 in varcahr2, p_col2 in varchar2)
Which, in the case of an update will, if the value in p_col1, p_col2 is null will not overwrite Col1, Col2 respectively
So If I have a record:
id=123, Col1='ABC', Col2='DEF'
exec InsertOrUpdateMyTable(123, 'XYZ', '098'); --results in id=123, Col1='XYZ', Col2='098'
exec InsertOrUpdateMyTable(123, NULL, '098'); --results in id=123, Col1='ABC', Col2='098'
exec InsertOrUpdateMyTable(123, NULL, NULL); --results in id=123, Col1='ABC', Col2='DEF'
Is there any simple way of doing this without having multiple SQL statements?
I am thinking there might be a way to do this with the Merge statement though I am only mildly familiar with it. | 0 | [
2,
15759,
45,
25,
80,
21,
1935,
161,
20,
395,
13,
7,
821,
16203,
643,
14,
866,
1923,
7,
19,
12666,
118,
576,
8209,
9015,
60,
800,
3726,
3726,
31,
57,
21,
864,
3910,
3260,
16,
186,
16,
15759,
22,
18,
91,
2255,
18548,
47,
48,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Practices: Storing a workflow state of an item in a database?
===
I have a question about best practices regarding how one should approach storing complex workflow states for processing tasks in a database. I've been looking online to no avail, so I figured I'd ask the community what they thought was best.
This question comes out of the same "BoxItem" example I gave in a prior question. This "BoxItem" is being tracked in my system as various tasks are performed on it. The task may take place over several days and with human interaction, so the state of the BoxItem must be persisted. Who did the task (if applicable), and when the task was done must also be tracked.
At first, I approached this by adding three fields to the "BoxItems" table for every human-interactive task that needed to be done:
Is*TaskName*Complete
Date*TaskName*Complete
User*TaskName*Complete
This worked when the workflow was simple... but now that it has grown to a complex process (> 10 possible human interactions in the flow... about half of which are optional, and may or may not be done for the BoxItem, which resulted in me beginning to add "Do*TaskName*" fields as well for those optional tasks), I've found that what should've been a simple table now has 40 or so field devoted entirely to the retaining of this state information.
I find myself asking if there isn't a better way to do it... but I'm at a loss.
My first thought was to make a generic "BoxItemTasks" table which defined the tasks that may be done on a given box, but I still would need to save the Date and User information individually, so it didn't really help.
My second thought was that perhaps it didn't matter, and I shouldn't worry if this table has 40 or more fields devoted to state retaining... and maybe I'm just being paranoid. But it feels like that's a lot of information to retain.
Anyways, I'm at a loss as far as what a third option might be, or if one of the two options above is actually reasonable. I can see this workflow potentially getting even more complex in the future, and for each new task I'm going to need to add 3-4 fields just to support the tracking of it... it feels like it's spiraling out of control.
What would you do in this situation?
I should note that this is maintenance of an existing system, one that was built without an ORM, so I can't just leave it up to the ORM to take care of it. | 0 | [
2,
246,
5242,
45,
25615,
21,
170,
9990,
146,
16,
40,
9101,
19,
21,
6018,
60,
800,
3726,
3726,
31,
57,
21,
1301,
88,
246,
5242,
3467,
184,
53,
378,
2141,
25615,
1502,
170,
9990,
202,
26,
5511,
8674,
19,
21,
6018,
9,
31,
22,
195... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 some good resources for the document/view or composite application architecture?
===
Lately I've been working on applications that are relatively data-oriented. In general, they tend to be editors for data represented by classes that are related in odd ways. I've been handling it by having a <code>UserControl</code> for each type of object and as the selection changes the program displays the appropriate editor for the object.
The "framework" I have made for this feels clunky and messy. In general, I have a two-pane interface with an "item selection" control on the left and the "work area" on the right. The UI has to do most of the work of responding to item selections by determining what <code>UserControl</code> to display, and implementing behaviors like undo and asking if the user wants to save data before changing items can get messy. The inspiration for this post is a nice "make our build process easier" application I'm working on with a colleague but it's really out of hand to the extent that a well-designed rewrite will probably arrive faster than the current code will be completed.
I've got a passing familiarity with the document/view architecture from reading a little bit of some C++ books. I understand the more modern counterpart to it in .NET might be the Composite UI Application block. The problem is I've never seen anything but quick walkthroughs or howtos on these topics. It's never from the viewpoint of "how you should design an application for this" but more from the viewpoint of "paste this into the application and you'll understand!" I've spent an hour or two digging through the CAB documentation but it's somewhat confusing to me. I don't like the CAB mainly because I'm curious how things work under the hood and I think I'd appreciate it more if I were able to implement a simple version of a similar pattern before I dive into using a framework.
What I really think I need is a website or book focused on this issue. The big part I don't seem to get is how to separate concerns into the appropriate places; I'm used to designing my data classes with several methods to work with the data, and it seems like maybe that's the job of a controller object? What sources do you find useful for an introduction to this subject? I've seen lots of articles that draw nice diagrams like <a href="http://upload.wikimedia.org/wikipedia/commons/2/2e/ModelViewControllerDiagram.svg">this</a> and I get the high-level idea of how these architectures work. I don't think I've ever found the right source to teach me the low-level "how to implement it" part. | 0 | [
2,
98,
50,
109,
254,
2566,
26,
14,
4492,
118,
4725,
54,
12639,
3010,
2607,
60,
800,
3726,
3726,
10434,
31,
22,
195,
74,
638,
27,
3767,
30,
50,
3109,
1054,
8,
6800,
9,
19,
297,
15,
59,
5480,
20,
44,
12149,
26,
1054,
1622,
34,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best way to sort controls inside of a flowlayout panel?
===
I am adding custom controls to a FlowLayoutPanel. Each control has a date property. I would like to sort the controls in the flowlayoutpanel based on the date property. I can't presort the controls before I add them because it is possible for the user to add more.
My current thought is when the ControlAdded event for the FlowLayoutPanel is triggered I loop through the controls and use the BringToFront function to order the controls based on the date.
What is the best way to do this? | 0 | [
2,
98,
25,
14,
246,
161,
20,
2058,
8671,
572,
16,
21,
3312,
4414,
1320,
4113,
60,
800,
3726,
3726,
31,
589,
4721,
5816,
8671,
20,
21,
3312,
4414,
1320,
3206,
532,
9,
206,
569,
63,
21,
1231,
1354,
9,
31,
83,
101,
20,
2058,
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's the best way to set up data access for an ASP.NET MVC project?
===
I am starting a new ASP.NET MVC project to learn with, and am wondering what's the optimal way to set up the project(s) to connect to a SQL server for the data. For example lets pretend we have a Product table and a product object I want to use to populate data in my view.
I know somewhere in here I should have an interface that gets implemented, etc but I can't wrap my mind around it today :-( | 0 | [
2,
98,
22,
18,
14,
246,
161,
20,
309,
71,
1054,
1381,
26,
40,
28,
306,
9,
2328,
307,
8990,
669,
60,
800,
3726,
3726,
31,
589,
1422,
21,
78,
28,
306,
9,
2328,
307,
8990,
669,
20,
2484,
29,
15,
17,
589,
5712,
98,
22,
18,
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... |
Passing int array as parameter in web user control
===
I have an int array as a property of a Web User Control. I'd like to set that property inline if possible using the following syntax:
<uc1:mycontrol runat="server" myintarray="1,2,3" />
This will fail at runtime because it will be expecting an actual int array, but a string is being passed instead. I can make `myintarray` a string and parse it in the setter, but I was wondering if there was a more elegant solution. | 0 | [
2,
2848,
19,
38,
7718,
28,
18906,
19,
2741,
4155,
569,
800,
3726,
3726,
31,
57,
40,
19,
38,
7718,
28,
21,
1354,
16,
21,
2741,
4155,
569,
9,
31,
22,
43,
101,
20,
309,
30,
1354,
19,
1143,
100,
938,
568,
14,
249,
22649,
45,
13,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Scrape multi-frame website
===
I'm auditing our existing web application, which makes heavy use of [HTML frames][1]. I would like to download all of the HTML in each frame, is there a method of doing this with [wget][2] or a little bit of scripting?
[1]: http://www.w3schools.com/HTML/html_frames.asp
[2]: http://www.gnu.org/software/wget/ | 0 | [
2,
23855,
1889,
8,
8361,
2271,
800,
3726,
3726,
31,
22,
79,
13471,
68,
318,
3149,
2741,
3010,
15,
56,
1364,
1278,
275,
16,
636,
15895,
12809,
500,
2558,
165,
500,
9,
31,
83,
101,
20,
7121,
65,
16,
14,
13,
15895,
19,
206,
3523,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Regular Expression to exclude set of Keywords
===
I want an expression that will fail when it encounters words such as "boon.ini" and "http". The goal would be to take this expression and be able to construct for any set of keywords. | 0 | [
2,
1290,
1803,
20,
21077,
309,
16,
1246,
12827,
800,
3726,
3726,
31,
259,
40,
1803,
30,
129,
7476,
76,
32,
12550,
715,
145,
28,
13,
7,
1192,
218,
9,
2651,
7,
17,
13,
7,
21127,
7,
9,
14,
1195,
83,
44,
20,
247,
48,
1803,
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,
0,
0,
0,
0,
0... |
Whats the best way to get total # of records in a mysql table with php?
===
Whats the most efficient way of selecting total number of records from a large table? Currently, Im simply doing
$result = mysql_query("SELECT id FROM table");
$total = mysql_num_rows($result)
I was told this was not very efficient or fast, if you have a lot of records in the table. | 0 | [
2,
98,
18,
14,
246,
161,
20,
164,
600,
6926,
16,
742,
19,
21,
51,
18,
22402,
859,
29,
13,
26120,
60,
800,
3726,
3726,
98,
18,
14,
127,
8243,
161,
16,
20764,
600,
234,
16,
742,
37,
21,
370,
859,
60,
871,
15,
797,
1659,
845,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there an "anonymous" generic tag in C#, like '?' in Java?
===
In Java, one can declare a variable parameterised by an "unknown" generic type, which looks like this:
Foo<?> x;
Is there an equivalent construct to this question-mark, in C#? | 0 | [
2,
25,
80,
40,
13,
7,
210,
14016,
1291,
7,
12733,
3383,
19,
272,
5910,
15,
101,
13,
22,
5663,
19,
8247,
60,
800,
3726,
3726,
19,
8247,
15,
53,
92,
10123,
21,
7612,
18906,
2541,
34,
40,
13,
7,
1020,
2929,
7,
12733,
1001,
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... |
Is there a way from preventing other ReportViewers on the same webpage from refreshing?
===
Currently I am working on a web page that has six [ReportViewer][1] controls that are using remote processing and that allow for drill-down. When a user clicks on one control the entire page refreshes and the other five reports all refresh as well. Users are currently requesting that the refreshing of the other controls be removed in favor of only the one they click on refreshing. Is there a way of doing this, I've noticed that in Sharepoint that clicking a drill-down report does not require the entire entire page to be reloaded and I'm wondering if I can provide the same functionality.
[1]: http://msdn.microsoft.com/en-us/library/microsoft.reporting.webforms.reportviewer(VS.80).aspx | 0 | [
2,
25,
80,
21,
161,
37,
11520,
89,
1330,
4725,
445,
27,
14,
205,
2741,
6486,
37,
27134,
60,
800,
3726,
3726,
871,
31,
589,
638,
27,
21,
2741,
2478,
30,
63,
490,
636,
17437,
4725,
106,
500,
2558,
165,
500,
8671,
30,
50,
568,
53... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Getting started with rails? Must have gems?
===
I'm starting work on a project using Rails, but I'm waiting for the 3rd edition of the pragmatic rails book to come out before I purchase a book.
Anyway, my question is a bit more pointed than how do I get started...
What are some of the must have gems that everyone uses?
I need basic authentication, so I have the restful authentication gem, but beyond that, I don't know what I don't know. Is there a run down of this information somewhere? Some basic setup that 99% of the people start with when starting a new rails application?
Thanks in advance. | 0 | [
2,
1017,
373,
29,
2240,
18,
60,
491,
57,
8551,
18,
60,
800,
3726,
3726,
31,
22,
79,
1422,
170,
27,
21,
669,
568,
2240,
18,
15,
47,
31,
22,
79,
1672,
26,
14,
203,
897,
1322,
16,
14,
28443,
2240,
18,
360,
20,
340,
70,
115,
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... |
What’s the current state of closures in Java?
===
Does anybody know, if closures will be in Java 7? | 0 | [
2,
98,
1,
18,
14,
866,
146,
16,
7790,
18,
19,
8247,
60,
800,
3726,
3726,
630,
11181,
143,
15,
100,
7790,
18,
129,
44,
19,
8247,
453,
60,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Pulling in a dynamic image in a control based on a url using C# and ASP.net
===
I know this is a dumb question. For some reason my mind is blank on this. Any ideas? | 0 | [
2,
3303,
19,
21,
7782,
1961,
19,
21,
569,
432,
27,
21,
287,
6362,
568,
272,
5910,
17,
28,
306,
9,
2328,
800,
3726,
3726,
31,
143,
48,
25,
21,
9317,
1301,
9,
26,
109,
1215,
51,
594,
25,
6463,
27,
48,
9,
186,
3478,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
How do you set directory permissions in NSIS?
===
I'm trying to build a Windows installer using Nullsoft Install System that requires installation by an Administrator. The installer makes a "logs" directory. Since regular users can run this application, that directory needs to be writable by regular users. How do I specify that all users should have permission to have write access to that directory in the NSIS script language?
I admit that this sounds a like a sort of bad idea, but the application is just an internal app used by only a few people on a private network. I just need the log files saved so that I can see why the app is broken if something bad happens. The users can't be made administrator. | 0 | [
2,
184,
107,
42,
309,
16755,
5572,
18,
19,
13,
103,
4557,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
1895,
21,
1936,
16146,
106,
568,
16203,
12980,
16146,
329,
30,
4781,
7758,
34,
40,
8890,
9,
14,
16146,
106,
1364,
21,
13,
7,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Rails Tests Fail With Sqlite3
===
I seem to be getting a strange error when I run my tests in rails, they are all failing for the same reason and none of the online documentation seems particularly helpful in regards to this particular error:
SQLite3::SQLException: cannot rollback - no transaction is active
This error is crippling my ability to test my application and seems to have appeared suddenly. I have the latest version of sqlite3 (3.6.2), the latest sqlite3-ruby (1.2.4) gem and the latest rails (2.1.1). Thanks in advance for any help. | 0 | [
2,
2240,
18,
4894,
7476,
29,
4444,
10601,
240,
800,
3726,
3726,
31,
2260,
20,
44,
1017,
21,
2578,
7019,
76,
31,
485,
51,
4894,
19,
2240,
18,
15,
59,
50,
65,
7250,
26,
14,
205,
1215,
17,
2369,
16,
14,
2087,
13945,
2206,
1653,
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... |
Like in CASE statement no evaluating as expected
===
Given this data:
CREATE TABLE tmpTable(
fldField varchar(10) null);
INSERT INTO tmpTable
SELECT 'XXX'
UNION ALL
SELECT 'XXX'
UNION ALL
SELECT 'ZZZ'
UNION ALL
SELECT 'ZZZ'
UNION ALL
SELECT 'YYY'
SELECT
CASE WHEN fldField like 'YYY' THEN 'OTH' ELSE 'XXX' END AS newField
FROM tmpTable
The expected resultset is:
XXX
XXX
XXX
XXX
OTH
What situation would casue SQL server 2000 to NOT find 'YYY'? And return the following as the resultset:
XXX
XXX
XXX
XXX
XXX
The problem is with the like 'YYY', I have found other ways to write this to get it to work, but I want to know why this exact method doesn't work. Another difficulty is that it works in most of my SQL Server 2000 environments. I need to find out what is different between them to cause this. Thanks for your help.
| 0 | [
2,
101,
19,
610,
3331,
90,
26764,
28,
1727,
800,
3726,
3726,
504,
48,
1054,
45,
1600,
859,
13,
38,
2554,
5924,
5,
8631,
43,
1109,
4033,
5433,
5,
1036,
6,
16203,
6,
73,
14692,
77,
13,
38,
2554,
5924,
5407,
13,
22,
13290,
22,
66... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Best practices for manipulating database result sets in Python?
===
I am writing a simple Python web application that consists of several pages of business data formatted for the iPhone. I'm comfortable programming Python, but I'm not very familiar with Python "idiom," especially regarding classes and objects. Python's object oriented design differs somewhat from other languages I've worked with. So, even though my application is working, I'm curious whether there is a better way to accomplish my goals.
Specifics: How does one typically implement the request-transform-render database workflow in Python? Currently, I am using pyodbc to fetch data, copying the results into attributes on an object, performing some calculations and merges using a list of these objects, then rendering the output from the list of objects. (Sample code below, SQL queries redacted.) Is this sane? Is there a better way? Are there any specific "gotchas" I've stumbled into in my relative ignorance of Python? I'm particularly concerned about how I've implemented the list of rows using the empty "Record" class.
class Record(object):
pass
def calculate_pnl(records, node_prices):
for record in records:
try:
# fill RT and DA prices from the hash retrieved above
if hasattr(record, 'sink') and record.sink:
record.da = node_prices[record.sink][0] - node_prices[record.id][0]
record.rt = node_prices[record.sink][1] - node_prices[record.id][1]
else:
record.da = node_prices[record.id][0]
record.rt = node_prices[record.id][1]
# calculate dependent values: RT-DA and PNL
record.rtda = record.rt - record.da
record.pnl = record.rtda * record.mw
except:
print sys.exc_info()
def map_rows(cursor, mappings, callback=None):
records = []
for row in cursor:
record = Record()
for field, attr in mappings.iteritems():
setattr(record, attr, getattr(row, field, None))
if not callback or callback(record):
records.append(record)
return records
def get_positions(cursor):
# get the latest position time
cursor.execute("SELECT latest data time")
time = cursor.fetchone().time
hour = eelib.util.get_hour_ending(time)
# fetch the current positions
cursor.execute("SELECT stuff FROM atable", (hour))
# read the rows
nodes = {}
def record_callback(record):
if abs(record.mw) > 0:
if record.id: nodes[record.id] = None
return True
else:
return False
records = util.map_rows(cursor, {
'id': 'id',
'name': 'name',
'mw': 'mw'
}, record_callback)
# query prices
for node_id in nodes:
# RT price
row = cursor.execute("SELECT price WHERE ? ? ?", (node_id, time, time)).fetchone()
rt5 = row.lmp if row else None
# DA price
row = cursor.execute("SELECT price WHERE ? ? ?", (node_id, hour, hour)).fetchone()
da = row.da_lmp if row else None
# update the hash value
nodes[node_id] = (da, rt5)
# calculate the position pricing
calculate_pnl(records, nodes)
# sort
records.sort(key=lambda r: r.name)
# return the records
return records
| 0 | [
2,
246,
5242,
26,
27799,
6018,
829,
3415,
19,
20059,
60,
800,
3726,
3726,
31,
589,
1174,
21,
1935,
20059,
2741,
3010,
30,
2043,
16,
238,
4434,
16,
508,
1054,
13,
29850,
26,
14,
21024,
9,
31,
22,
79,
5733,
3143,
20059,
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... |
Visual Studio: How to break on handled exceptions?
===
i would like Visual Studio to break when a handled exception happens (i.e. i don't just want to see a "First chance" message, i want to debug the actual exception).
e.g. i want the debugger to break at the exception:
try
{
System.IO.File.Delete(someFilename);
}
catch (Exception)
{
//we really don't care at runtime if the file couldn't be deleted
}
i came across [these][1] notes for Visual Studio.NET:
> 1) In VS.NET go to the Debug Menu >>
> "Exceptions..." >> "Common Language
> Runtime Exceptions" >> "System" and
> select "System.NullReferenceException"
>
>
> 2) In the bottom of that dialog there
> is a "When the exception is thrown:"
> group box, select "Break into the
> debugger"
>
> 3) Run your scenario. When the
> exception is thrown, the debugger will
> stop and notify you with a dialog that
> says something like:
> "An exception of type "System.NullReferenceException" has
> been thrown.
> [Break] [Continue]"
>
> Hit [Break]. This will put you on the
> line of code that's causing the
> problem.
But they do not apply to Visual Studio 2005 (there is no **Exceptions** option on the **Debug** menu.)
Does anyone know where the find this options dialog in Visual Studio that the "*When the exception is thrown*" group box, with the option to "*Break into the debugger*"?
[1]: http://www.syncfusion.com/faq/windowsforms/faq_c60c.aspx#q583q | 0 | [
2,
3458,
1120,
45,
184,
20,
1442,
27,
9006,
13392,
60,
800,
3726,
3726,
31,
83,
101,
3458,
1120,
20,
1442,
76,
21,
9006,
5391,
5531,
13,
5,
49,
9,
62,
9,
31,
221,
22,
38,
114,
259,
20,
196,
21,
13,
7,
3552,
1504,
7,
2802,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 must I do to ensure that a web server (Apache) running on a machine is not accessible to the outside world?
===
I would like to use my laptop as a web development (PHP, Python, etc.) machine, but I'm hesitant to do this unless I can ensure that it can not be accessed by the outside world.
I'm guessing that something more than a firewall is necessary, such as configurations to the Apache configuration files, but I'm not sure what else I would need to be 100% sure it's locked down tightly. | 0 | [
2,
98,
491,
31,
107,
20,
4062,
30,
21,
2741,
8128,
13,
5,
7738,
2569,
6,
946,
27,
21,
1940,
25,
52,
7342,
20,
14,
719,
126,
60,
800,
3726,
3726,
31,
83,
101,
20,
275,
51,
12294,
28,
21,
2741,
522,
13,
5,
26120,
15,
20059,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Decision Tables to help your application
===
I learned some time ago about Decision Trees and Decision tables. I feel that Decision Tables can help with conditional If-Then-Else statements. In particular, I feel that Decision Tables have no side-effects, for example, if you didn't notice that you need one more "else if" statement.
But I am not sure how I can implement it. Arrays? Database Tables?
Does anyone even use Decision Tables in their code, nowadays?
| 0 | [
2,
184,
20,
275,
1401,
7484,
20,
448,
154,
3010,
800,
3726,
3726,
31,
2691,
109,
85,
1464,
88,
1401,
1913,
17,
1401,
7484,
9,
31,
583,
30,
1401,
7484,
92,
448,
29,
21206,
100,
8,
2504,
8,
6798,
62,
9015,
9,
19,
1498,
15,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Performance implications of computed columns in SQL Server 2005 database?
===
The situation: we have a large database with a number of denormalized tables. We frequently have to resummarize the data to keep the summary tables in synch. We've talked on and off about using computed columns to keep the data fresh. We've also talked about triggers, but that's a separate discussion.
In our summary tables, we denormalized the table such that the Standard ID as well as the Standard Description is stored in the table. This inherently assumes that the table will be resummarized often enough so that if they change the standard description, it will also change it in the summary table.
A bad assumption.
Question:
What if we made the Standard Description in the summary table a derived/computed column which selects the standard description from the standard table?
Is there a tremendous performance hit by dropping a computed column on a table with 100,000-500,000 rows?
| 0 | [
2,
956,
14747,
16,
26331,
7498,
19,
4444,
255,
8128,
812,
6018,
60,
800,
3726,
3726,
14,
1858,
45,
95,
57,
21,
370,
6018,
29,
21,
234,
16,
121,
17462,
1333,
7484,
9,
95,
3086,
57,
20,
10719,
723,
1615,
2952,
14,
1054,
20,
643,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Trouble running insert queries with varray variables
===
I'm using sql*plus 9.2 on Oracle 10g enterprise. I have created some scripts that do basic inserts using parameters that I pass through the command prompt. It seemed logical that I should be able to run a bunch of inserts in a loop. So I tried the following:
--begin
DECLARE
TYPE va_orgs IS TABLE OF nbr.lien_item.lien_item_name%type;
org va_orgs := va_orgs('RTA','RTB','RTE','RTI','RTM','RTT');
BEGIN
FOR i in org.FIRST .. org.LAST
LOOP
INSERT INTO nbr.lien_item (lien_item_sid, excel_row, include_in_calcs, indent, header_level, sort_order, unit, lien_item_status, lien_item_name) VALUES (nbr.lien_item_seq.nextval, 0, 'Y', 1, 0, 1, 'FTE', 'A', 'org(i)');
COMMIT;
END LOOP;
END;
/
--end
When I run the script, I get a message that the pl/sql completed successfully. I tried debugging and using dbms_output to diplay the values of org(i). Everything looks fine. But the rows never get entered into the database. As soon as I do a select, the new rows aren't there. Is there some trick about looping and doing inserts??
(I also tried "IS VARRAY(6) OF" in place of "IS TABLE OF". Same non-result)
Thanks,
arcster | 0 | [
2,
2572,
946,
14692,
9386,
2829,
29,
4033,
2787,
12157,
800,
3726,
3726,
31,
22,
79,
568,
4444,
255,
2483,
13349,
561,
9,
135,
27,
15759,
332,
263,
6002,
9,
31,
57,
679,
109,
17505,
30,
107,
2125,
14692,
18,
568,
12905,
30,
31,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What happens to my app when my Mac goes to sleep?
===
When Mac OS X goes to sleep, due to closing a laptop or selecting "Sleep" from the Apple menu, how does it suspend an executing process?
I suppose non-windowed processes are simply suspended at an arbitrary point of execution. Is that also true for Cocoa apps, or does the OS wait until control returns to the run loop dispatcher, and goes to sleep in a "known" location? Does any modern OS do that, or is it usually safe enough to simply suspend an app no matter what it is doing?
I'm curious, because allowing sleep to occur at any moment means, from the app's perspective, the system clock could suddenly leap forward by a significant amount. That's a possibility I don't usually consider while coding. | 0 | [
2,
98,
5531,
20,
51,
4865,
76,
51,
1572,
1852,
20,
1742,
60,
800,
3726,
3726,
76,
1572,
13,
759,
993,
1852,
20,
1742,
15,
397,
20,
4239,
21,
12294,
54,
20764,
13,
7,
21092,
7,
37,
14,
4037,
11379,
15,
184,
630,
32,
25082,
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... |
What is the semantic web, and why would I want to use it?
===
Just like it reads. | 0 | [
2,
98,
25,
14,
17220,
2741,
15,
17,
483,
83,
31,
259,
20,
275,
32,
60,
800,
3726,
3726,
114,
101,
32,
11137,
9,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
What is your preferred tool stack for PHP development in the Windows Environment?
===
I have been developing _basic_ web sites for awhile now with some PHP thrown in for getting dynamic stuff done. However, I recently decided that it was time I got my hands a little dirtier so I wanted to start to play with the underpinnings of Wordpress and other such apps. I work on a Mac at home and have been using [Coda](http://www.panic.com/coda/) for most of my editing needs and I love it. Also, to manage the services stack I use [MAMP](http://www.mamp.info/en/index.php) at home. However, I've begun to realize that for _heavy_ PHP and Web work (AJAX, etc.), more is needed.
I'm very interested to hear the kinds of tools more experienced web developers use on a day to day basis to manage the entire work flow. I found [this article](http://www.developertutorials.com/blog/php/the-ultimate-php-web-development-environment-part-2-98/) over on developer tutorials and decided to go with XAMPP (for the moment) for managing the services. However, IDE, Source Control, Debugger, etc. are all up for grabs.
Anyway, your thoughts are _much appreciated_. | 0 | [
2,
98,
25,
154,
5981,
5607,
7566,
26,
13,
26120,
522,
19,
14,
1936,
2307,
60,
800,
3726,
3726,
31,
57,
74,
3561,
13,
1,
26467,
1,
2741,
3259,
26,
21,
10144,
130,
29,
109,
13,
26120,
6027,
19,
26,
1017,
7782,
3217,
677,
9,
207,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Are there any online user group meetings?
===
I must admit that I am incredibly jealous of those developers who happen to live near active user groups (e.g. the ALT.NET guys in Austin). I often read blog posts and listen to podcasts that reference these in-person meetings and find myself wishing that I could sit in and participate as well. But it just isn't realistic to fly across the country to meet a few guys for a couple hours in a pub to talk about patterns and practices.
So I was wondering if there was a similar discussion forum for those who don't happen to live near an active user group. After all, blogs and books only go so far, and for the most part are a one-way avenue of communication. True, you can use comments, e-mails, tweets, and IM to get some interaction, but there is something to be said about face-to-face real-time interaction that will get lost in all of these mediums.
I guess what I'm looking for is some sort of video-conferencing deal where people who share an interest in a specific field of software development can get together to talk and interact without having to live right next door to each other. Does anything like this exist? | 0 | [
2,
50,
80,
186,
2087,
4155,
214,
5637,
60,
800,
3726,
3726,
31,
491,
5251,
30,
31,
589,
13003,
10153,
16,
273,
10168,
72,
2384,
20,
515,
424,
1348,
4155,
1170,
13,
5,
62,
9,
263,
9,
14,
7051,
9,
2328,
2776,
19,
4665,
6,
9,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 show that you understand the requirements of the project
===
How do you show your clients/employers that you understood their requirements?
What do you recommend to use? Use-Case diagrams? Flow-Charts? Data-Flow-Diagrams?
I'm not really asking for a very detailed answer. Just something simple to help me communicate with the person who wrote the requirements and to see if both of you are on the same page.
| 0 | [
2,
184,
20,
298,
30,
42,
1369,
14,
4786,
16,
14,
669,
800,
3726,
3726,
184,
107,
42,
298,
154,
7421,
118,
1503,
13221,
4366,
18,
30,
42,
4014,
66,
4786,
60,
98,
107,
42,
12360,
20,
275,
60,
275,
8,
10325,
14161,
18,
60,
3312,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
IMG SRC tags and JavaScript
===
Is it possible to call a JavaScript function from the IMG SRC tag to get an image url?
Like this:
<IMG SRC="GetImage()" />
<script language="javascript">
function GetImage() {return "imageName/imagePath.jpg"}
</script>
This is using .NET 2.0.
| 0 | [
2,
797,
263,
13,
18,
5453,
3383,
18,
17,
8247,
8741,
800,
3726,
3726,
25,
32,
938,
20,
645,
21,
8247,
8741,
1990,
37,
14,
797,
263,
13,
18,
5453,
3383,
20,
164,
40,
1961,
287,
6362,
60,
101,
48,
45,
13,
1,
1660,
263,
13,
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... |
In SQL Server 2005, can I do a cascade delete without setting the property on my tables?
===
I have a database full of customer data. It's so big that it's really cumbersome to operate on, and I'd rather just slim it down to 10% of the customers, which is plenty for development. I have an awful lot of tables and I don't want to alter them all with "ON DELETE CASCADE", especially because this is a one-time deal.
Can I do a delete operation that cascades through all my tables without setting them up first? If not, what is my best option? | 0 | [
2,
19,
4444,
255,
8128,
812,
15,
92,
31,
107,
21,
13542,
27448,
366,
2697,
14,
1354,
27,
51,
7484,
60,
800,
3726,
3726,
31,
57,
21,
6018,
503,
16,
7705,
1054,
9,
32,
22,
18,
86,
580,
30,
32,
22,
18,
510,
10611,
2102,
3220,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can anyone recommend a simple Java web-app framework?
===
I'm trying to get started on what I'm hoping will be a relatively quick web application in Java, yet most of the frameworks I've tried (Apache Wicket, Liftweb) require so much set-up, configuration, and trying to wrap my head around Maven while getting the whole thing to play nice with Eclipse, that I spent the whole weekend just trying to get to the point where I write my first line of code!
Can anyone recommend a simple Java webapp framework that doesn't involve Maven, hideously complicated directory structures, or countless XML files that must be manually edited? | 0 | [
2,
92,
1276,
12360,
21,
1935,
8247,
2741,
8,
7753,
6596,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
164,
373,
27,
98,
31,
22,
79,
3935,
129,
44,
21,
3109,
2231,
2741,
3010,
19,
8247,
15,
768,
127,
16,
14,
6596,
18,
31,
22,
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... |
Do C# Generics Have a Perfomance Benifit?
===
I have a number of data classes representing various entities.
Which is better: Writing a generic class ( to say, print or output XML) using generics and interfaces, or writing a seperate class to deal with each data class?
Is there a perfaormance benifit/ or any other benifit (other than it saving me the time of writing seperate classes)?
Thanks. | 0 | [
2,
107,
272,
5910,
12733,
18,
57,
21,
416,
4120,
79,
2416,
1519,
821,
242,
60,
800,
3726,
3726,
31,
57,
21,
234,
16,
1054,
2684,
3793,
617,
12549,
9,
56,
25,
574,
45,
1174,
21,
12733,
718,
13,
5,
20,
395,
15,
4793,
54,
5196,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there an equivalent to the XNA framework for consoles other than XBox360?
===
It's gotta be free. It's hobby, after all, not a business!. | 0 | [
2,
25,
80,
40,
4602,
20,
14,
993,
325,
6596,
26,
8650,
18,
89,
119,
13800,
19454,
60,
800,
3726,
3726,
32,
22,
18,
12185,
44,
551,
9,
32,
22,
18,
18229,
15,
75,
65,
15,
52,
21,
508,
187,
9,
3,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Prevent people from pushing a git commit with a different author name?
===
In git, it is up to each user to specify the correct author in their local git config file. When they push to a centralized bare repository, the commit messages on the repository will have the author names that they used when committing to their own repository.
Is there a way enforce that a set of known authors for commits are used? The "central" repository will be accessible via ssh.
I know that this is complicated by the fact that some people may be pushing commits that were made by others. Of course, you should also only allow people you trust to push to your repositories, but it would be great if there was a way to prevent user error here.
Is there a simple solution to this problem in git? | 0 | [
2,
2501,
148,
37,
5076,
21,
13,
10404,
9686,
29,
21,
421,
1314,
204,
60,
800,
3726,
3726,
19,
13,
10404,
15,
32,
25,
71,
20,
206,
4155,
20,
19077,
14,
4456,
1314,
19,
66,
375,
13,
10404,
13,
14093,
2816,
3893,
9,
76,
59,
3250,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 best to test the validity of XML from a method?
===
I have some WCF methods that are used to transmit information from a server application to a website frontend for use in binding. I'm sending the result as an XElement that is a root of an XML tree containing the data I want to bind against.
I'd like to create some tests that examine the data and ensure it comes across as expected.
My current thinking is this: Every method that returns an XElement tree has a corresponding schema (.XSD) file. This file is included within the assembly that contains my WCF classes as an embedded resource.
Tests call the method on these methods and compares the result against these embedded schemas.
Is this a good idea? If not, what other ways can I use to provide a "guarantee" of what kind of XML a method will return?
If it is, how do you validate an XElement against a schema? And how can I get that schema from the assembly it's embedded in? | 0 | [
2,
184,
246,
20,
1289,
14,
19058,
16,
23504,
37,
21,
2109,
60,
800,
3726,
3726,
31,
57,
109,
11801,
410,
3195,
30,
50,
147,
20,
18745,
676,
37,
21,
8128,
3010,
20,
21,
2271,
431,
2451,
26,
275,
19,
8728,
9,
31,
22,
79,
4907,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the best way for a Java program to monitor system health?
===
I would like to be able to monitor my major system health indicators from inside our Java-based system. Major points of interest include CPU temperature, motherboard temperature, fan speed, etc.
Is there a package available that:
1. Makes this sort of data available to Java?
2. Works on Windows or Linux or both?
3. Is open / free / cheap?
| 0 | [
2,
98,
25,
14,
246,
161,
26,
21,
8247,
625,
20,
7626,
329,
853,
60,
800,
3726,
3726,
31,
83,
101,
20,
44,
777,
20,
7626,
51,
394,
329,
853,
13310,
18,
37,
572,
318,
8247,
8,
1281,
329,
9,
394,
819,
16,
1163,
468,
17578,
3348... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Licensing and using the Linux kernel
===
I would like to write my own OS, and would like to temporarily jump over the complicated task of writing the kernel and come back to it later by using the Linux kernel in the mean time. However, I would like to provide the OS as closed source for now. What license is the Linux kernel under and is it possible to use it for release with a closed source OS?
**Edit:** I am not interested in closing the source of the Linux kernel, I would still provide that as open sourced. I am wondering if I could use a closed source OS with an open source kernel. | 0 | [
2,
15038,
17,
568,
14,
13024,
17007,
800,
3726,
3726,
31,
83,
101,
20,
2757,
51,
258,
13,
759,
15,
17,
83,
101,
20,
7866,
3936,
84,
14,
8343,
3005,
16,
1174,
14,
17007,
17,
340,
97,
20,
32,
138,
34,
568,
14,
13024,
17007,
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... |
ASP.NET Masterpage in separate assembly
===
I have some ASP.NET Master pages located in one assembly. I need to use these masterpages for my webform pages located in other asseblies that have a reference to the first assembly. I cannot seem to figure out a way to do this.
Is there a nice way that I can do this?
If you do not have a pretty solution I would also like to hear about possible hacks?
Thanks | 0 | [
2,
28,
306,
9,
2328,
1129,
6486,
19,
1725,
1475,
800,
3726,
3726,
31,
57,
109,
28,
306,
9,
2328,
1129,
4434,
335,
19,
53,
1475,
9,
31,
376,
20,
275,
158,
1129,
6486,
18,
26,
51,
2741,
4190,
4434,
335,
19,
89,
28,
18,
7665,
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... |
What is the standard format for documenting functions in php?
===
I've written a fair few php apps in the past, but tonight is my first foray into SVN so I figured I'd also document my code properly. What's the adopted format for documenting php functions?
Obviously I could adopt my own format, but, looking forward, if there's one which can be used by documentation tools then all the better.
Cheers! | 0 | [
2,
98,
25,
14,
1236,
2595,
26,
4492,
68,
3719,
19,
13,
26120,
60,
800,
3726,
3726,
31,
22,
195,
642,
21,
1768,
310,
13,
26120,
4865,
18,
19,
14,
640,
15,
47,
2251,
25,
51,
64,
26,
3707,
77,
13,
18,
16578,
86,
31,
5700,
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... |
Error Message Text - Best Practices
===
We are changing some of the text for our old, badly written error messages. What are some resources for best practices on writing good error messages (specifically for Windows XP/Vista). | 0 | [
2,
7019,
2802,
1854,
13,
8,
246,
5242,
800,
3726,
3726,
95,
50,
4226,
109,
16,
14,
1854,
26,
318,
315,
15,
5730,
642,
7019,
7561,
9,
98,
50,
109,
2566,
26,
246,
5242,
27,
1174,
254,
7019,
7561,
13,
5,
9219,
1326,
26,
1936,
230... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
What is the Best Way to Dynamically Create an MSMQ Listener?
===
I was using Spring.NET to create a message listener at application startup. I now need the ability to create 0-n listeners, some of which could be listening to different queues. I will need to be able to create/destroy them at run-time. What would be the best way to go about doing this? My previous spring configuration was something like:
<objects xmlns="http://www.springframework.net">
<object id='inputQueue' type='Spring.Messaging.Support.MessageQueueFactoryObject, Spring.Messaging'>
<property name='Path' value='.\Private$\inputQueue'/>
</object>
<!-- MSMQ Transaction Manager -->
<object id="messageQueueTransactionManager" type="Spring.Messaging.Core.MessageQueueTransactionManager, Spring.Messaging"/>
<!-- Message Listener Container that uses MSMQ transactional for receives -->
<object id="transactionalMessageListenerContainer" type="Spring.Messaging.Listener.TransactionalMessageListenerContainer, Spring.Messaging">
<property name="MessageQueueObjectName" value="inputQueue"/>
<property name="PlatformTransactionManager" ref="messageQueueTransactionManager"/>
<property name="MaxConcurrentListeners" value="10"/>
<property name="MessageListener" ref="messageListenerAdapter"/>
</object>
<!-- Adapter to call a PONO as a messaging callback -->
<object id="messageListenerAdapter" type="Spring.Messaging.Listener.MessageListenerAdapter, Spring.Messaging">
<property name="HandlerObject" ref="messageListener"/>
</object>
<!-- The PONO class that you write -->
<object id="messageListener" type="Com.MyCompany.Listener, Com.MyCompany">
<property name="Container" ref="transactionalMessageListenerContainer"/>
</object>
</objects>
Should I just programmatically do what this file is doing each time I need a new listener? Should I not use Spring.NET's messaging framework for this? | 0 | [
2,
98,
25,
14,
246,
161,
20,
7782,
1326,
1600,
40,
4235,
79,
1251,
21772,
60,
800,
3726,
3726,
31,
23,
568,
1573,
9,
2328,
20,
1600,
21,
2802,
21772,
35,
3010,
20205,
9,
31,
130,
376,
14,
2165,
20,
1600,
713,
8,
103,
15672,
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... |
What is the best way to generate and print invoices in a .NET application?
===
I'm working on a billing system for a utility company, and we have the following requirements:
- Batch-generate and print approximately 1,500 bills per day that we then mail to customers
- Save the bill in a format that can emailed to the customer and also archived (probably PDF)
- Built with .NET
I'd like some advice about the best way to accomplish this. I'm thinking about building a WPF application that would have the bill template that we bind the bill data to and print from. But I haven't used WPF before so I'm not sure if that's the best technology to use, and I can't get my head around how the batching and PDF conversion would work.
Any thoughts? Would WPF work, or is there a better solution?
| 0 | [
2,
98,
25,
14,
246,
161,
20,
7920,
17,
4793,
19,
13379,
18,
19,
21,
13,
9,
2328,
3010,
60,
800,
3726,
3726,
31,
22,
79,
638,
27,
21,
1071,
68,
329,
26,
21,
10082,
237,
15,
17,
95,
57,
14,
249,
4786,
45,
13,
8,
13064,
8,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Writing to the DB slowness
===
We log values and we only log them once in a table. When we add values to the table we have to do a look up everytime to see if it needs to insert the value or just grab the id. We have an index on the table but there are about 350,000 rows (so it is taking 10 seconds to do 10 of these values). So either a) we figure out a way to optimize it b) strip it this feature out or c) do something completely different when logging these values.
.NET 2.0, SQL Server 2005. | 0 | [
2,
1174,
20,
14,
13,
9007,
2276,
720,
800,
3726,
3726,
95,
6738,
4070,
17,
95,
104,
6738,
105,
382,
19,
21,
859,
9,
76,
95,
3547,
4070,
20,
14,
859,
95,
57,
20,
107,
21,
361,
71,
352,
891,
20,
196,
100,
32,
2274,
20,
14692,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
When have we any practical use for hierarchical namespaces in c++?
===
I can understand the use for one level of namespaces. But 3 levels of namespaces. Looks insane. Is there any practical use for that? Or is it just a misconception?
| 0 | [
2,
76,
57,
95,
186,
5713,
275,
26,
21376,
4272,
204,
5582,
18,
19,
272,
20512,
60,
800,
3726,
3726,
31,
92,
1369,
14,
275,
26,
53,
662,
16,
204,
5582,
18,
9,
47,
203,
2216,
16,
204,
5582,
18,
9,
1879,
9405,
9,
25,
80,
186,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... |
What is the scope for imported classes in python?
===
Please excuse the vague title. If anyone has a suggestion, please let me know! Also please retag with more appropriate tags!
**The Problem**
I want to have an instance of an imported class be able to view things in the scope (globals, locals) of the importer. Since I'm not sure of the exact mechanism at work here, I can describe it much better with snippets than words.
## File 1
def f1(): print "go f1!"
class C1(object):
def do_eval(self,x): # maybe this should be do_evil, given what happens
print "evaling"
eval(x)
eval(x,globals(),locals())
Then run this code from an iteractive session, there there will be lots of `NameErrors`
## interactive
class C2(object):
def do_eval(self,x): # maybe this should be do_evil, given what happens
print "evaling"
eval(x)
eval(x,globals(),locals())
def f2():
print "go f2!"
from file1 import C1
import file1
C1().do_eval('file1.f1()')
C1().do_eval('f1()')
C1().do_eval('f2()')
file1.C1().do_eval('file1.f1()')
file1.C1().do_eval('f1()')
file1.C1().do_eval('f2()')
C2().do_eval('f2()')
C2().do_eval('file1.f1()')
C2().do_eval('f1()')
Is there a common idiom / pattern for this sort of task? Am I barking up the wrong tree entirely?
| 0 | [
2,
98,
25,
14,
9914,
26,
11808,
2684,
19,
20059,
60,
800,
3726,
3726,
2247,
6658,
14,
14800,
581,
9,
100,
1276,
63,
21,
10910,
15,
2247,
408,
55,
143,
187,
67,
2247,
302,
8628,
29,
91,
4593,
3383,
18,
187,
13,
1409,
124,
1448,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.