unified_texts stringlengths 32 30.1k | OpenStatus_id int64 0 4 | input_ids list | token_type_ids list | attention_mask list |
|---|---|---|---|---|
What's the hardest or most misunderstood aspeect of LINQ?
===
Background: Over the next month, I'll be giving three talks about or at least including LINQ in the context of C#. I'd like to know which topics are worth giving a fair amount of attention to, based on what people may find hard to understand, or what they may have a mistaken impression of. I won't be specifically talking about LINQ to SQL or the Entity Framework except as examples of how queries can be executed remotely using expression trees (and usually IQueryable).
So, what have you found hard about LINQ? What have you seen in terms of misunderstandings? Examples might be any of the following, but please don't limit yourself!
- How the C# compiler treats query expressions
- Lambda expressions
- Expression trees
- Extension methods
- Anonymous types
- IQueryable
- Deferred vs immediate execution
- Streaming vs buffered execution (e.g. OrderBy is deferred but buffered)
- Implicitly typed local variables
- Reading complex generic signatures (e.g. [Enumerable.Join][1])
[1]: http://msdn.microsoft.com/en-us/library/bb549267.aspx | 4 | [
2,
98,
22,
18,
14,
20766,
54,
127,
29000,
28,
1664,
11557,
16,
6294,
1251,
60,
800,
3726,
3726,
2395,
45,
84,
14,
328,
1617,
15,
31,
22,
211,
44,
1438,
132,
7837,
88,
54,
35,
639,
215,
6294,
1251,
19,
14,
4141,
16,
272,
5910,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Most elegant way to implement a circular list (FIFO)
===
What is the most elegant and simple way to implement a circular list, FIFO style? I'm looking for a solution that doesn't resort to hacks like catching exceptions.
No, this is not for homework.
For a little background, I want to use a circular list within GWT; so using a 3rd party lib is **not** what I want. | 0 | [
2,
127,
11614,
161,
20,
8713,
21,
8155,
968,
13,
5,
1707,
4120,
6,
800,
3726,
3726,
98,
25,
14,
127,
11614,
17,
1935,
161,
20,
8713,
21,
8155,
968,
15,
6028,
4120,
1034,
60,
31,
22,
79,
699,
26,
21,
4295,
30,
1437,
22,
38,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What's the difference between a parent and a reference property in Google App Engine?
===
From what I understand, the parent attribute of a db.Model (typically defined/passed in the constructor call) allows you to define hierarchies in your data models. As a result, this increases the size of the entity group. However, it's not very clear to me why we would want to do that. Is this strictly for ACID compliance? I would like to see scenarios where each is best suited or more appropriate. | 0 | [
2,
98,
22,
18,
14,
2841,
128,
21,
4766,
17,
21,
2801,
1354,
19,
8144,
4865,
1406,
60,
800,
3726,
3726,
37,
98,
31,
1369,
15,
14,
4766,
35,
14755,
16,
21,
13,
9007,
9,
13998,
13,
5,
26139,
2811,
118,
6201,
69,
19,
14,
6960,
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... |
What is the purpose of the colon before a block in Python?
===
What is the purpose of the colon before a block in Python?
Example:
if n == 0:
print "The end"
| 0 | [
2,
98,
25,
14,
2131,
16,
14,
10766,
115,
21,
1921,
19,
20059,
60,
800,
3726,
3726,
98,
25,
14,
2131,
16,
14,
10766,
115,
21,
1921,
19,
20059,
60,
823,
45,
100,
13,
103,
800,
3726,
713,
45,
4793,
13,
7,
124,
241,
7,
3,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Visual C++: Avoiding overlaping of paint events, arching lines through click and drag?
===
I am currently a student and trying to design a Visual C++ application to allow me to visually insert an oriented graph in order to create a text file with the graph's matrix. At this point I have created an onClick event to create nodes and have used the form's Paint event to draw the nodes. I have also inserted the conditions to avoid nodes from overlaping.<br>
I am currently working on creating the links between nodes. The problem that I have encountered is that the line that unites two nodes crosses another node. I consider that writing an algorithm to detect overlaping and calculate how much the line needs to arch in order to avoid that is too tedious in this situation. Therefore I thought about creating a line that can be arched by the user by clicking and dragging it to the left or right, however I have had problems finding any tutorials on how to do this. So if anyone has ever had to introduce this kind of arching line in a project or has any idea where I could find some information about this I would deeply appreciate it.
Mentions:<br>1) please do not recommend any fancy graphics libraries for doing this, as I am not interested in installing 3rd party stuff for this program. The function I want to insert the code into is named smth like form1_onPaint, so I would like to keep it strictly to the C++ standard libraries.
<br>2) I know I said I am interested in arching a line through click and drag, however if someone could suggest another viable solution to this, such as a function that detects overlaping in onPaint events or anything else that could be of use to solve this it would be of great help. | 0 | [
2,
3458,
272,
20512,
45,
10298,
15406,
68,
16,
5107,
963,
15,
13,
24377,
1560,
120,
10840,
17,
5501,
60,
800,
3726,
3726,
31,
589,
871,
21,
1209,
17,
749,
20,
704,
21,
3458,
272,
20512,
3010,
20,
1655,
55,
20,
20747,
14692,
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 are some recommended programming resources for pre-teens?
===
What are the best places for getting my daughters interested in programming without actually knowing that's what I'm doing? :-)
For example, I presented Alice.org to the older one as a storytelling program. I showed her Logo once, and she drew squares for an afternoon and forgot about it. | 4 | [
2,
98,
50,
109,
5773,
3143,
2566,
26,
782,
8,
11256,
18,
60,
800,
3726,
3726,
98,
50,
14,
246,
1489,
26,
1017,
51,
4909,
3158,
19,
3143,
366,
1121,
2506,
30,
22,
18,
98,
31,
22,
79,
845,
60,
13,
45,
8,
6,
26,
823,
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... |
Why use jQuery?
===
Why should someone use a Javascript library like jQuery versus coding from scratch? Is it better to learn how to code AJAX without the use of one of these libraries? | 0 | [
2,
483,
275,
487,
8190,
93,
60,
800,
3726,
3726,
483,
378,
737,
275,
21,
8247,
8741,
1248,
101,
487,
8190,
93,
5706,
13,
15458,
37,
12395,
60,
25,
32,
574,
20,
2484,
184,
20,
1797,
20624,
366,
14,
275,
16,
53,
16,
158,
8649,
6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
what is a good resource to get started with windows file system driver development for a newbie?
===
what is a good resource to get started with windows file system driver development for a newbie? | 0 | [
2,
98,
25,
21,
254,
6577,
20,
164,
373,
29,
1936,
3893,
329,
2425,
522,
26,
21,
78,
5893,
60,
800,
3726,
3726,
98,
25,
21,
254,
6577,
20,
164,
373,
29,
1936,
3893,
329,
2425,
522,
26,
21,
78,
5893,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Examples of asp.net mvc and authentication
===
I'm looking for some examples for asp.net mvc that use the integrated asp.net forms-authentication based membership providers with edit and post scenarios. I'm looking for best practices here.
Let's say I have a Contacts table in my database with a Name field, and a UserId field which is tied to the aspnet_Users UserId field. I thought of something like this:
public ActionResult Save([Bind(Include="Name")] Contact contact)
{
// if null etc. checks omitted for this example
MembershipUser currentUser = Provider.GetUser(User.Identity.Name, true);
contact.UserId = (Guid)currentUser.ProviderUserKey;
//save etc.
}
Any tips or guides to this one?
| 0 | [
2,
3770,
16,
28,
306,
9,
2328,
307,
8990,
17,
27963,
800,
3726,
3726,
31,
22,
79,
699,
26,
109,
3770,
26,
28,
306,
9,
2328,
307,
8990,
30,
275,
14,
5547,
28,
306,
9,
2328,
1997,
8,
1346,
2504,
1786,
857,
432,
4363,
13488,
29,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Adding nodes dynamically and global_groups in Erlang
===
Erlang support to partition its nodes into groups using the [global_group](http://erlang.org/doc/man/global_group.html) module.
Further, Erlang supports adding nodes on the fly to the node-network. Are these two features usable with each other?
As far as I understand, you have to name every node on startup to use the global groups.
| 0 | [
2,
4721,
16272,
7782,
1326,
17,
2062,
1,
8024,
18,
19,
13,
106,
9949,
800,
3726,
3726,
13,
106,
9949,
555,
20,
10711,
82,
16272,
77,
1170,
568,
14,
636,
26763,
1,
8024,
500,
5,
21127,
6903,
106,
9949,
9,
5583,
118,
13799,
118,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to load MS Word document in C# (.NET)?
===
How do I load MS Word document (.doc and .docx) to memory (variable) without doing this?:
*wordApp.Documents.Open*
I don't want to open MS Word, I just want that text inside. | 0 | [
2,
184,
20,
6305,
4235,
833,
4492,
19,
272,
5910,
13,
5,
9,
2328,
6,
60,
800,
3726,
3726,
184,
107,
31,
6305,
4235,
833,
4492,
13,
5,
9,
13799,
17,
13,
9,
13799,
396,
6,
20,
1912,
13,
5,
8220,
579,
6,
366,
845,
48,
60,
45,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
what is the best free books, tutorials, websites for java?
===
what is the best free of charge books, tutorials, websites for java?
| 4 | [
2,
98,
25,
14,
246,
551,
964,
15,
29724,
18,
15,
13931,
26,
8247,
60,
800,
3726,
3726,
98,
25,
14,
246,
551,
16,
1906,
964,
15,
29724,
18,
15,
13931,
26,
8247,
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,
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... |
Pointer math in C#
===
I am trying to use some pinvoke code to call a C function. The function fills a buffer with data.
The structure is set up as a DWORD for the length, followed by a string. How do I extract the string from the IntPtr?
IntPtr buffer = Marshal.AllocHGlobal(nRequiredSize);
PInvokedFunction(buffer, nRequiredSize);
string s = Marshal.PtrToStringAuto(buffer + 4); //this is an error.
Marshal.FreeHGlobal(buffer);
| 0 | [
2,
454,
106,
5057,
19,
272,
5910,
800,
3726,
3726,
31,
589,
749,
20,
275,
109,
3459,
2625,
1048,
1797,
20,
645,
21,
272,
1990,
9,
14,
1990,
3509,
18,
21,
17497,
29,
1054,
9,
14,
1411,
25,
309,
71,
28,
21,
13,
43,
9587,
26,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why does my JNI code not successfully find a jthrowable's getMessage method?
===
I'm trying to access the message in a jthrowable while handing an exception generated when I fail to find a class. However, I am unable to access the message ID of getMessage() on the jthrowable object, and I don't know why. I've tried changing the signature of getMessage to "()Ljava/lang/String" (without the semicolon at the end, but that's necessary, right?) with no joy. I'm confused as hell about this. I even tried replacing getMessage with toString, and _that_ didn't work. Obviously I'm doing something trivially wrong here.
Here's the code I'm using:
jthrowable java_exception;
jclass java_class;
jmethodID method;
java_exception = (*jEnv)->ExceptionOccurred(jEnv);
assert (java_exception != NULL);
java_class = (*jEnv)->GetObjectClass (jEnv, java_exception);
assert (java_class != NULL);
method = (*jEnv)->GetMethodID (jEnv, java_class, "getMessage", "()Ljava/lang/String;");
if (method == NULL) {
printf ("Seriously, how do I get here?!\n");
(*jEnv)->ExceptionDescribe (jEnv);
return;
}
The output of this code (amongst other things) looks like this:
> Seriously, how do I get here?!
> Exception in thread "main" java.lang.NoClassDefFoundError: com/planet/core360/docgen/Processor
`javap -p -s java.lang.Throwable` gives me this:
> Compiled from "Throwable.java"
> public class java.lang.Throwable extends java.lang.Object implements java.io.Serializable{
> ...
> public java.lang.String getMessage();
> Signature: ()Ljava/lang/String;
> ... | 0 | [
2,
483,
630,
51,
487,
889,
1797,
52,
3673,
477,
21,
487,
21440,
579,
22,
18,
164,
3845,
18,
1303,
2109,
60,
800,
3726,
3726,
31,
22,
79,
749,
20,
1381,
14,
2802,
19,
21,
487,
21440,
579,
133,
15517,
40,
5391,
6756,
76,
31,
747... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
SharpDevelop ebook
===
Does anyone know where I might find the [SharpDevelop][1] ebook?
It is apparently no longer available from Apress.
[1]: http://www.icsharpcode.net/OpenSource/SD/InsideSharpDevelop.aspx | 0 | [
2,
2641,
26051,
26751,
800,
3726,
3726,
630,
1276,
143,
113,
31,
530,
477,
14,
636,
23646,
26051,
500,
2558,
165,
500,
26751,
60,
32,
25,
3083,
90,
1045,
904,
37,
21,
5890,
9,
636,
165,
500,
45,
7775,
6903,
6483,
9,
596,
23646,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How to stress test a javascript-requiring Web App
===
A similar question was already asked (
http://stackoverflow.com/questions/7492/how-do-you-stress-test-a-web-application), but I'd like to test a web application that prevents double-submits and takes some counter-XSRF actions and therefore REQUIRES JavaScripts to be evaluated.
Has anybody done stress tests with web apps that require (and use) JS and any experience to share?
jMeter wouldn't work I guess...
Thanks!
| 0 | [
2,
184,
20,
5384,
1289,
21,
8247,
8741,
8,
99,
3003,
2090,
2741,
4865,
800,
3726,
3726,
21,
835,
1301,
23,
614,
411,
13,
5,
7775,
6903,
25325,
2549,
9990,
9,
960,
118,
24652,
18,
118,
3828,
4327,
118,
1544,
8,
537,
8,
245,
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... |
SQL for the web
===
Does anyone have experience with a query language for the web?
I am looking for project, commercial or not, that does a good job at making a webpage queryable and that even follows links on it to aggregate information from a bunch of pages.
I would prefere a sql or linq like syntax. I could of course download a webpage and start doing some XPATH on it but Im looking for a solution that has a nice abstraction.
I found websql
http://www.cs.utoronto.ca/~websql/
Which looks good but I'm not into Java
SELECT a.label
FROM Anchor a SUCH THAT base = "http://www.SomeDoc.html"
WHERE a.href CONTAINS ".ps.Z";
Are there others out there?
Is there a library that can be used in a .NET language?
| 0 | [
2,
4444,
255,
26,
14,
2741,
800,
3726,
3726,
630,
1276,
57,
1496,
29,
21,
25597,
816,
26,
14,
2741,
60,
31,
589,
699,
26,
669,
15,
1439,
54,
52,
15,
30,
630,
21,
254,
1205,
35,
544,
21,
2741,
6486,
25597,
579,
17,
30,
166,
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... |
Requirement for key in std::multimap
===
I have a std::multimap where key is a custom class. Something like this:
Class X {
public:
std::string s;
int x;
operator <(const X& other) { return s < other.s; }
};
std::multimap<X, int> mymap;
Now, I'd like to use upper_bound and lower_bound to iterate over all elements with the same value of "s". Do I need to implement some other operator for X (for example: ==). Or it will work properly just like this?
Also, what should I supply as argument for *upper_bound* and *lower_bound*? I assume I should create a dummy object with desired value of "s"?
| 0 | [
2,
8981,
26,
1246,
19,
354,
43,
45,
45,
21531,
15022,
800,
3726,
3726,
31,
57,
21,
354,
43,
45,
45,
21531,
15022,
113,
1246,
25,
21,
5816,
718,
9,
301,
101,
48,
45,
718,
993,
13,
1,
317,
45,
354,
43,
45,
45,
11130,
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... |
Do you use particular conventions for naming complementary variables?
===
I often find myself trying to come up with good names for complementary pairs of variables; where two variables denote opposing concepts, two participants in some sort of duologue, and so on.
This might be better explained by a counter-example - I maintain an app that prints two graphics as part of a print advertisement. They're stored in the database as `TopLogo` and `LowerLogo`, which I have to stop and double-check every time I use them because I'm expecting `top` to complement `bottom`, and `lower` should complement `upper`.
There's some obvious examples that I think work well:
`client / server`
`source / target` for copying/moving data or files from one variable to another
`minimum / maximum`
but there's some concepts that just don't lend themselves to such neat naming schemes. For example, when paging through records, does 'last' mean 'final' or 'previous' ? I recently saw some code that used `firstPage`, `previousPage`, `nextPage` and `finalPage` to avoid the ambiuous `lastPage` completely, which I thought was very beat, hence this question.
Do you have any particularly neat variable name pairs you'd care to share with us? (Bonus points if they're the same length, which makes the code so much neater in monospaced fonts.) | 0 | [
2,
107,
42,
275,
1498,
15117,
26,
10929,
24654,
12157,
60,
800,
3726,
3726,
31,
478,
477,
992,
749,
20,
340,
71,
29,
254,
1817,
26,
24654,
7473,
16,
12157,
73,
113,
81,
12157,
21736,
10488,
8700,
15,
81,
5889,
19,
109,
2058,
16,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Why Python decorators rather than closures?
===
I still haven't go my head around decorators in Python.
I've already started using a lot of closures to do things like customize functions and classes in my coding.
Eg.
class Node :
def __init__(self,val,children) :
self.val = val
self.children = children
def makeRunner(f) :
def run(node) :
f(node)
for x in node.children :
run(x)
return run
tree=Node(1,[Node(2,[]),Node(3,[Node(4,[]),Node(5,[])])])
def pp(n) : print "%s," % n.val
printTree = makeRunner(pp)
printTree(tree)
As far as I can see, decorators are just a different syntax for doing something similar.
Instead of
def pp(n) : print "%s," % n.val
printTree = makeRunner(pp)
I would write :
@makeRunner
def printTree(n) : print "%s," % n.val
Is this all there is to decorators? Or is there a more fundamental difference that I've missed? | 0 | [
2,
483,
20059,
17650,
9922,
864,
119,
7790,
18,
60,
800,
3726,
3726,
31,
174,
2933,
22,
38,
162,
51,
157,
140,
17650,
9922,
19,
20059,
9,
31,
22,
195,
614,
373,
568,
21,
865,
16,
7790,
18,
20,
107,
564,
101,
5816,
2952,
3719,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Synchronizing a variable between client and server
===
Say I've got a client-side counter variable. When I send a request to the server, I send this variable's value, then increment it by one (for the next request to the server). The server keeps track of this counter independantly, and checks to make sure that the count sent by the client is 1 more than it's own (server-side) copy of the count. This is all fine and dandy, but consider the following situation:
1. The client sends, say, 23 to the server.
2. The server receives 23, validates it, and increments its own counter to 23.
3. The server returns the All-Okay code to the client
-BUT-
Along the way from the server to the client, the return code gets corrupted. The client thus thinks that the server did not update its counter, and so leaves the client-side counter at 23. From this point onwards, the client and server are out of sync.
Does anybody know any robust schemes that would work in the face of such possible corruption/errors?
Thanks,
Cameron | 0 | [
2,
13,
16023,
3335,
21,
7612,
128,
6819,
17,
8128,
800,
3726,
3726,
395,
31,
22,
195,
330,
21,
6819,
8,
1416,
2105,
7612,
9,
76,
31,
2660,
21,
3772,
20,
14,
8128,
15,
31,
2660,
48,
7612,
22,
18,
1923,
15,
94,
13,
28461,
32,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I reset/revert a specific file to a specific revision using Git?
===
I have made some changes to a file which has been committed in a few times as part of a group of files, but now want to reset/revert the changes on it back to a previous version.
I have done a 'git log' along with a 'git diff' to find the revision I need, but just have no idea how to get the file back to it's former state in the past.
Any help is greatly appreciated. | 0 | [
2,
184,
107,
31,
23422,
118,
99,
8122,
21,
1903,
3893,
20,
21,
1903,
11323,
568,
13,
10404,
60,
800,
3726,
3726,
31,
57,
117,
109,
1693,
20,
21,
3893,
56,
63,
74,
4164,
19,
21,
310,
436,
28,
141,
16,
21,
214,
16,
6488,
15,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ASP.Net MVC error - Bad IL format.
===
I'm following the [ASP.Net "TaskList" example video][1] and on clicking Run in Visual Studio (~14:00 min into the video) I'm getting the following error message in the browser:
Server Error in '/' Application.
Bad IL format.
Description: An unhandled exception occurred during the execution of the
current webrequest. Please review the stack trace for more information
about the error andwhere it originated in the code.
Exception Details: System.BadImageFormatException: Bad IL format.
Source Error:
Line 12: ' (2) URL with parameters
Line 13: ' (3) Parameter defaults
Line 14: routes.MapRoute( _
Line 15: "Default", _
Line 16: "{controller}/{action}/{id}", _
Source File: C:\Users\...\TaskList\TaskList\Global.asax.vb Line: 14
Stack Trace:
[BadImageFormatException: Bad IL format.]
VB$AnonymousType_0`3..ctor(T0 controller, T1 action, T2 id) +0
TaskList.MvcApplication.RegisterRoutes(RouteCollection routes) in
C:\Users\...\TaskList\TaskList\Global.asax.vb:14
TaskList.MvcApplication.Application_Start() in
C:\Users\...\TaskList\TaskList\Global.asax.vb:23
Version Information:
Microsoft .NET Framework Version:2.0.50727.1434;
ASP.NET Version:2.0.50727.1434
I've double-checked the code I've typed in, what am I missing?
Thank you!
Versions:
- ASP.Net MVC Beta (16th October 2008)
- Visual Studion 2008 (9.0.21022.8 RTM)
- Vista Ultimate SP1
- IIS 7.0.6000.16386
[1]: http://www.asp.net/learn/mvc-videos/video-395.aspx | 0 | [
2,
28,
306,
9,
2328,
307,
8990,
7019,
13,
8,
896,
6317,
2595,
9,
800,
3726,
3726,
31,
22,
79,
249,
14,
636,
472,
306,
9,
2328,
13,
7,
38,
20310,
5739,
7,
823,
763,
500,
2558,
165,
500,
17,
27,
25590,
485,
19,
3458,
1120,
13,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What is the state of native SVG support in the most popular browsers?
===
What is the state of native SVG support in the most popular browsers in their latest releases?
- Internet explorer
- Firefox
- Opera
- Safari
- Chrome
- Konqueror
- Camino
| 0 | [
2,
98,
25,
14,
146,
16,
1275,
13,
18,
22955,
555,
19,
14,
127,
844,
16495,
18,
60,
800,
3726,
3726,
98,
25,
14,
146,
16,
1275,
13,
18,
22955,
555,
19,
14,
127,
844,
16495,
18,
19,
66,
5736,
7073,
60,
13,
8,
2620,
8520,
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... |
Error "This command is not available because no document is open" on Server
===
I use this code to send data to a Word Template and send to client.
protected void Button1_Click(object sender, EventArgs e)
{
object missing = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word.Application WordApp = new Microsoft.Office.Interop.Word.Application();
string DocFilePath = "";
//string FilePath = System.Windows.Forms.Application.StartupPath;
object fileName = Server.MapPath(@"~\asset\wordtemplates\Estelam.dot");
DocFilePath = fileName.ToString();
FileInfo fi = new FileInfo(DocFilePath);
if (fi.Exists)
{
object readOnly = false;
object isVisible = true;
object LetterNo = "LetterNo";
object LetterDate = "LetterDate";
object Attachment = "Attachment";
object To = "To";
object From = "From";
object Fname = "Fname";
object Lname = "Lname";
object FatherName = "FatherName";
object IDNumber = "IDNumber";
object BirthDate = "BirthDate";
object BirthLocation = "BirthLocation";
object PersonelID = "PersonelID";
object MembershipDate = "MembershipDate";
object Membership = "Membership";
object Degree = "Degree";
object Level = "Level";
object Guild = "Guild";
object Janbazi = "Janbazi";
object Esarat = "Esarat";
object Education = "Education";
object Field = "Field";
object Education2 = "Education2";
object DocLocation = "DocLocation";
Microsoft.Office.Interop.Word.Document aDoc = WordApp.Documents.Open(ref fileName, ref missing, ref readOnly,
ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing,
ref isVisible, ref isVisible, ref missing, ref missing, ref missing);
//Microsoft.Office.Interop.Word.Document aDoc = WordApp.Documents.Open(ref fileName);
WordApp.ActiveDocument.FormFields.get_Item(ref LetterNo).Result = TextBox_LetterNo.Text;
this code work in local good and correct,but when I publish this site and put to my Server I get this error run time.
This command is not available because no document is open.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: This command is not available because no document is open.
Source Error:An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
why it can't open in server? How to solve this Error?
I use Windows7 , VS2010 , SQLServer2008 and in Server use Windows Server 2008, IIS7.
What I should to do for this error on server? | 0 | [
2,
7019,
13,
7,
1565,
1202,
25,
52,
904,
185,
90,
4492,
25,
368,
7,
27,
8128,
800,
3726,
3726,
31,
275,
48,
1797,
20,
2660,
1054,
20,
21,
833,
22894,
17,
2660,
20,
6819,
9,
3803,
11364,
5167,
165,
1,
150,
10129,
5,
23793,
2660... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 logs out of wireshark pcap files
===
I converted the wireshark pcap file to a windows txt file using TShark's command tshark -V -r {file}
Is the data contained inside the windows txt file converted from the wireshark's pcap file the log data? Or is there a better way to get logs out of the wireshark pcap files?? | 0 | [
2,
1017,
18893,
70,
16,
6511,
28178,
351,
4666,
6488,
800,
3726,
3726,
31,
3494,
14,
6511,
28178,
351,
4666,
3893,
20,
21,
1936,
20225,
38,
3893,
568,
13,
38,
28178,
22,
18,
1202,
13,
38,
28178,
13,
8,
710,
13,
8,
139,
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... |
Eclipse : how to prevent it from loading all the open files on startup?
===
I had 100+ files open in the previous session, then closed eclipse. On a restart, eclipse just hangs with extremely high mem usuage. This problem doesn't happen with only 50 files opened.
How to prevent eclipse from loading all the previously opened files on startup? It would make more sense that the files are loaded on demand, i.e. load when focused.
I am using CDT. | 0 | [
2,
11652,
13,
45,
184,
20,
2501,
32,
37,
12797,
65,
14,
368,
6488,
27,
20205,
60,
800,
3726,
3726,
31,
41,
808,
2430,
6488,
368,
19,
14,
1158,
3723,
15,
94,
827,
11652,
9,
27,
21,
22767,
15,
11652,
114,
4546,
18,
29,
3898,
183... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Upgrading IBM Tivoli Monitoring OS agents remotely
===
Does anyone know if there is a way to upgrade IBM Tvoli Monitoring (ITM) OS level monitoring agents remotely? We have a bunch of Windows and Linux servers which need the OS agent upgrade but for Linux we do not have direct ssh access enabled for root user. I do have admin level user account on those servers though. So I can run any command using sudo once I have logged on to the server. Would this be useful for agent upgrade task? | 0 | [
2,
26939,
10233,
4174,
5847,
49,
8984,
13,
759,
5125,
23288,
800,
3726,
3726,
630,
1276,
143,
100,
80,
25,
21,
161,
20,
9483,
10233,
983,
4614,
8984,
13,
5,
242,
79,
6,
13,
759,
662,
8984,
5125,
23288,
60,
95,
57,
21,
7653,
16,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Google Double Click for iOS
===
Currently iam working with an iPad application.I want to use Google DoubleClick to display Ads in my app.
Could any one tell me how to get iOS sdk for double click and steps to integrate this to my application . Thanks in advance. | 0 | [
2,
8144,
1494,
10840,
26,
13,
7760,
800,
3726,
3726,
871,
31,
765,
638,
29,
40,
31,
8240,
3010,
9,
49,
259,
20,
275,
8144,
1494,
150,
10129,
20,
3042,
16236,
19,
51,
4865,
9,
110,
186,
53,
494,
55,
184,
20,
164,
13,
7760,
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... |
Why does the data type long support a maximum number equal to long long's?
===
So I was doing some testing with the new data type **long long** when I stumbled upon a little "problem" (example came from C++ Primer 6th edition). I was using the climits library to tell me the maximum number supported by **long** and **long long** and both came out to 9223372036854775807. How is that possible?
#include <iostream>
#include <climits>
int main()
{
std::cout << "int size is " << sizeof(int) << " bytes." << std::endl;
std::cout << "short size is " << sizeof(short) << " bytes." << std::endl;
std::cout << "long size is " << sizeof(long) << " bytes." << std::endl;
std::cout << "long long size is " << sizeof(long long) << " bytes." << std::endl;
std::cout << "Maximum values: " << std::endl;
std::cout << "int: " << INT_MAX << std::endl;
std::cout << "short: " << SHRT_MAX << std::endl;
std::cout << "long: " << LONG_MAX << std::endl;
std::cout << "long long: " << LLONG_MAX << std::endl;
return 0;
}
| 0 | [
2,
483,
630,
14,
1054,
1001,
175,
555,
21,
2979,
234,
2747,
20,
175,
175,
22,
18,
60,
800,
3726,
3726,
86,
31,
23,
845,
109,
4431,
29,
14,
78,
1054,
1001,
13,
1409,
2701,
175,
1409,
76,
31,
10282,
685,
21,
265,
13,
7,
2740,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
need security for server after user upload their file
===
i want to allow my user to upload any file
but one problem is that if user will upload php/exe(or any file that can run on server) file it will run on server.
like this
<?php
mysql_connect('localhost','username','password')
?> | 0 | [
2,
376,
1221,
26,
8128,
75,
4155,
71,
8294,
66,
3893,
800,
3726,
3726,
31,
259,
20,
1655,
51,
4155,
20,
71,
8294,
186,
3893,
47,
53,
1448,
25,
30,
100,
4155,
129,
71,
8294,
13,
26120,
118,
1706,
62,
5,
248,
186,
3893,
30,
92,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What the best way to get up to speed on MathML and its usage in the world?
===
What the best way to get up to speed on MathML and its usage in the world? | 0 | [
2,
98,
14,
246,
161,
20,
164,
71,
20,
1362,
27,
5057,
8184,
17,
82,
7514,
19,
14,
126,
60,
800,
3726,
3726,
98,
14,
246,
161,
20,
164,
71,
20,
1362,
27,
5057,
8184,
17,
82,
7514,
19,
14,
126,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Domain Modeling or class diagram for car dealership
===
I am trying to draw a domain model or class diagram in UML for car dealership. I am stuck how to present test drive in the model. One way is to have appointment class and then testdrive as sub class. dealer also offers after sale vehicle service so i could have appointment/ booking class as super class and then vehicle service and test drive as two sub classes.
other way to have customer class direct relationship with test drive class and vehicle service class under appointment class.
dealer also sells new and used cars and their parts.
dealer also offers finance for car sale.
would testdrive class have relationship with vehicle class or there is separate class for display and testdrive class.
another question is how do i show potential customer and their inquiries about sale and service in the model.dealer wants to save details of potenial customers if they allow for marketing purpose. shall i have two classes one for customers and one for potential custommrs or it can be achieved just by usin an attribute in customer class. | 0 | [
2,
4603,
12807,
54,
718,
14161,
26,
349,
26914,
800,
3726,
3726,
31,
589,
749,
20,
2003,
21,
4603,
1061,
54,
718,
14161,
19,
13,
723,
255,
26,
349,
26914,
9,
31,
589,
4549,
184,
20,
734,
1289,
1493,
19,
14,
1061,
9,
53,
161,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How does MTOM work?
===
MTOM is the W3C Message Transmission Optimization Mechanism, a method of efficiently sending binary data to and from web services.
How does it work in general? | 0 | [
2,
184,
630,
307,
6015,
170,
60,
800,
3726,
3726,
307,
6015,
25,
14,
619,
240,
150,
2802,
5213,
21597,
6534,
15,
21,
2109,
16,
20519,
4907,
14171,
1054,
20,
17,
37,
2741,
687,
9,
184,
630,
32,
170,
19,
297,
60,
3,
0,
0,
0,
0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
What problems are best solved with Logic Programming?
===
*By Logic Programming I mean the a sub-paradigm of declarative programming languages. Don't confuse this question with "What problems can you solve with if-then-else?"*
A language like Prolog is very fascinating, and it's worth learning for the sake of learning, but I have to wonder what class of real-world problems is best expressed and solved by such a language. Are there better languages? Does logic programming exist by another name in more trendy programming languages? Is the cynical version of the answer a variant of the [Python Paradox](http://www.paulgraham.com/pypar.html)? | 0 | [
2,
98,
1716,
50,
246,
15091,
29,
7085,
3143,
60,
800,
3726,
3726,
1637,
779,
7085,
3143,
31,
884,
14,
21,
972,
8,
6351,
12158,
79,
16,
121,
12078,
3366,
3143,
2556,
9,
221,
22,
38,
26465,
48,
1301,
29,
13,
7,
608,
1716,
92,
42... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there a good open source search engine including indexing bot which can be used to make up special catalogue by feeding the bot with certain properties?
===
Our application (C#/.NET) needs a lot of queries to search. Google's 50,000 policy per day is not enough. We need something that would crawl Internet websites by specific rules we set (for ex. country domains) and gather URLs, Texts, keywords, name of websites and create our own internal catalogue so we wouldn't be limited to any massive external search engine like Google or Yahoo.
Is there any free open source solution we could use to install it on our server?
No point in re-inventing the wheel. | 0 | [
2,
25,
80,
21,
254,
368,
1267,
2122,
1406,
215,
4348,
68,
11012,
56,
92,
44,
147,
20,
233,
71,
621,
9179,
34,
8524,
14,
11012,
29,
1200,
3704,
60,
800,
3726,
3726,
318,
3010,
13,
5,
150,
5910,
118,
9,
2328,
6,
2274,
21,
865,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Strategies to avoid Hibernate LazyInitializationExceptions
===
Are there any other ways to avoid LazyInitializationExceptions in a Hibernate web application besides using the OpenSessionInView pattern? Are there any downsides to using OpenSessionInView? | 0 | [
2,
10272,
20,
2658,
4148,
2102,
8820,
16792,
27313,
1829,
10066,
5757,
800,
3726,
3726,
50,
80,
186,
89,
2847,
20,
2658,
16792,
27313,
1829,
10066,
5757,
19,
21,
4148,
2102,
8820,
2741,
3010,
3410,
568,
14,
8965,
160,
5991,
108,
4725,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Haskell: Inserting every line from a file into a list
===
I'm currently working on project with Haskell, and have found myself some trouble. I'm supposed to read and insert into a list each line in a "dictionary.txt" file, but I can't seem to do so. I've got this code:
main = do
let list = []
loadNums "dictionary.txt" list
loadNums location list = do
inh <- openFile location ReadMode
mainloop inh list
hClose inh
mainloop inh list = do
ineof <- hIsEOF inh
if ineof
then return ()
else do
inpStr <- hGetLine inh
inpStr:list
mainloop inh list
It is supposed to get every line (I know it does get every line, since replacing the "inpStr:list" with a "putStrLn inpStr" works correctly, displaying all lines), and insert it into a list but I get the following error:
Couldn't match expected type `IO' against inferred type `[]'
Probably because the hGetLine isn't a String, but a IO String, which I have no idea how to handle in order to obtain a proper string I can insert in my list. I have no idea how this could be solved, or what the problem is exactly, but if anyone has any idea of how to properly get every line in a file into a list, I'd appreciate it.
Thanks in advance! | 0 | [
2,
63,
16507,
45,
14692,
68,
352,
293,
37,
21,
3893,
77,
21,
968,
800,
3726,
3726,
31,
22,
79,
871,
638,
27,
669,
29,
63,
16507,
15,
17,
57,
216,
992,
109,
2572,
9,
31,
22,
79,
2293,
20,
1302,
17,
14692,
77,
21,
968,
206,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 embedded in CPP: how to get data back to CPP
===
While working on a C++ project, I was looking for a third party library for something that is not my core business. I found a really good library, doing exactly what's needed, but it is written in Python. I decided to experiment with embedding Python code in C++, using the Boost.Python library.
The C++ code looks something like this:
#include <string>
#include <iostream>
#include <boost/python.hpp>
using namespace boost::python;
int main(int, char **)
{
Py_Initialize();
try
{
object module((handle<>(borrowed(PyImport_AddModule("__main__")))));
object name_space = module.attr("__dict__");
object ignored = exec("from myModule import MyFunc\n"
"MyFunc(\"some_arg\")\n",
name_space);
std::string res = extract<std::string>(name_space["result"]);
}
catch (error_already_set)
{
PyErr_Print();
}
Py_Finalize();
return 0;
}
A (very) simplified version of the Python code looks like this:
import thirdparty
def MyFunc(some_arg):
result = thirdparty.go()
print result
Now the problem is this:
'MyFunc' executes fine, i can see the print of 'result'.
What i cannot do is read 'result' back from the C++ code. The extract command never finds 'result' in any namespace.
I tried defining 'result' as a global, i even tried returning a tuple, but i cannot get it to work.
| 0 | [
2,
20059,
12138,
19,
272,
3421,
45,
184,
20,
164,
1054,
97,
20,
272,
3421,
800,
3726,
3726,
133,
638,
27,
21,
272,
20512,
669,
15,
31,
23,
699,
26,
21,
422,
346,
1248,
26,
301,
30,
25,
52,
51,
2884,
508,
9,
31,
216,
21,
510,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can you create an ASP.NET editing system for a class just by defining it?
===
I was watching a tutorial on Rails and was very impressed that you could so easily create an editing system for a class just by defining it.
Can this be done in ASP.NET?
I know there are ORMs out there, but do they come with an editing system?
To explain what I mean by an editing system, consider a class for defining people
class Person
{
string First_Name;
string Last_Name
}
And then perhaps with one bold stroke something like this:
CreateEditAbleClass(Person)
You would get the functionality below in a browser:
<img src="http://www.yart.com.au/images/orm_editor.jpg"/>
And this functionality would extend to all the UML definitions – inheritance, association, aggregation etc. In addition, there would be a simple way of adding customisable validation and so forth.
I currently use DataGrids and a lot of manual coding to achieve these results.
| 0 | [
2,
92,
42,
1600,
40,
28,
306,
9,
2328,
9510,
329,
26,
21,
718,
114,
34,
14684,
32,
60,
800,
3726,
3726,
31,
23,
1953,
21,
29724,
27,
2240,
18,
17,
23,
253,
7059,
30,
42,
110,
86,
2351,
1600,
40,
9510,
329,
26,
21,
718,
114,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Anyone have a C# example showing an owner drawn tabcontrol with hot-tracking effects?
===
Anyone have a C# example showing an owner drawn tabcontrol with hot-tracking effects?
I've implemented a nice owner drawn tabcontrol using C# and .NET 2.0 but i'm stumped when it comes to implementing hot-tracking effects.
Any Ideas? | 0 | [
2,
1276,
57,
21,
272,
5910,
823,
3187,
40,
2410,
3160,
6523,
12898,
29,
1047,
8,
4792,
68,
2292,
60,
800,
3726,
3726,
1276,
57,
21,
272,
5910,
823,
3187,
40,
2410,
3160,
6523,
12898,
29,
1047,
8,
4792,
68,
2292,
60,
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... |
how to validate the class diagram for a given domain
===
i am working on car dealership business domain model/uml class diagram.
i am new to modelling so how to validate the class diagram. Its very important for me to have an appropriate if not 100 percent correct class diagram to use t further for use cases and other uml classes.
is there something like completely wrong model or its like either appropriate or less appropriate model.
i think when i do customer class in direct relationship with sales team class like customer is served by salesteam, is that wrong? because i have seen in examples customer class having association with order class, order class with item order and ordeitem class with item inventory class. and then salesteam or staff class in relation with order class.
so how to i validate my model and relationships. | 0 | [
2,
184,
20,
7394,
1373,
14,
718,
14161,
26,
21,
504,
4603,
800,
3726,
3726,
31,
589,
638,
27,
349,
26914,
508,
4603,
1061,
118,
723,
255,
718,
14161,
9,
31,
589,
78,
20,
23089,
86,
184,
20,
7394,
1373,
14,
718,
14161,
9,
82,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can you reference code written in another language in the App_Code folder in ASP.Net?
===
Due to legacy issues I have two folders under App_Code directory. One for VB.Net and another for C#. Problem is, I have a service in the C# folder that needs to leverage a class in the VB.Net folder but they dont seem to know about each other. Any ideas are welcome :)
Thanks in advance!
Trev | 0 | [
2,
184,
92,
42,
2801,
1797,
642,
19,
226,
816,
19,
14,
4865,
1,
9375,
19294,
19,
28,
306,
9,
2328,
60,
800,
3726,
3726,
397,
20,
7780,
1549,
31,
57,
81,
19294,
18,
131,
4865,
1,
9375,
16755,
9,
53,
26,
13,
20468,
9,
2328,
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... |
Scala: how to create XML nodes from some collection
===
If you have something like:
val myStuff = Array(Person("joe",40), Person("mary", 35))
How do you create an XML value with that data as nodes? I know how to use { braces } in an XML expression to put a value, but this is a collection of values. Do I need to iterate explicitly or is there something better?
val myXml = <people>{ /* what here?! */ }</people>
The resulting value should be something like:
<people><person><name>joe</name><age>40</age></person>
<person><name>mary</name><age>39</age></person></people>
| 0 | [
2,
25975,
45,
184,
20,
1600,
23504,
16272,
37,
109,
1206,
800,
3726,
3726,
100,
42,
57,
301,
101,
45,
3347,
51,
384,
5386,
800,
7718,
5,
7276,
5,
7,
19838,
7,
15,
2602,
6,
15,
840,
5,
7,
17396,
7,
15,
2694,
6,
6,
184,
107,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Can record field updates in OCaml be generalized?
===
I'm a very novice OCaml programmer so please forgive me if this is a stupid/obvious question. There's *a lot* to absorb and I may have missed this in the documentation.
I have a base of code that's starting to look like this:
let update_x p x =
add_delta p;
p.x <- x;
refresh p
let update_y p y =
add_delta p;
p.y <- y;
refresh p
let update_z p z =
add_delta p;
p.z <- z;
refresh p
The duplication is starting to bug me because I *want* to write something like this:
let update_scalar p scalar value =
add_delta p;
magic_reflection (p, scalar) <- value;
refresh p
This way when I update x I can simply call:
update_scalar p 'x' value
This calls out "macros!" to me but I don't believe OCaml has a macro system. What else can I do? | 0 | [
2,
92,
571,
575,
16779,
19,
13,
14977,
8184,
44,
22173,
60,
800,
3726,
3726,
31,
22,
79,
21,
253,
21999,
13,
14977,
8184,
17968,
86,
2247,
8591,
55,
100,
48,
25,
21,
3553,
118,
4995,
1755,
1291,
1301,
9,
80,
22,
18,
1637,
58,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Emacs JavaFX mode?
===
Does such a major mode exist?
| 0 | [
2,
13,
62,
6893,
18,
8247,
16488,
3740,
60,
800,
3726,
3726,
630,
145,
21,
394,
3740,
3182,
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,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Making money while programming Linux and/or open source for small business?
===
During university, I wanted to start a software business. I didn't know what at the time, but I knew it would have to be Windows and closed source in order to make enough money to support a career.
Was I wrong? What could I have been told that would have changed my mind? I'm looking for arguments about why I could have programmed Linux and/or open source, while being a small business and while still make money.
I do understand that the question relating to programming for Linux and relating to programming open source can have 2 completely different answers. | 2 | [
2,
544,
875,
133,
3143,
13024,
17,
118,
248,
368,
1267,
26,
284,
508,
60,
800,
3726,
3726,
112,
155,
15,
31,
417,
20,
799,
21,
2306,
508,
9,
31,
223,
22,
38,
143,
98,
35,
14,
85,
15,
47,
31,
404,
32,
83,
57,
20,
44,
1936,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is there any reason to use System.Uri?
===
I'm looking it over and it seems to be that it is fundamentally broken.
Only 5 instance methods aren't marked obsolete.
There doesn't appear to be any built-in way to parse query-string variables.
There are no methods to mutate the Uri, for example appending a new query variable.
So is there anything it is good for? Should I really be using this instead of just strings? | 0 | [
2,
25,
80,
186,
1215,
20,
275,
329,
9,
3594,
60,
800,
3726,
3726,
31,
22,
79,
699,
32,
84,
17,
32,
2206,
20,
44,
30,
32,
25,
26420,
2023,
9,
104,
331,
4851,
3195,
4847,
22,
38,
2739,
18562,
9,
80,
1437,
22,
38,
1893,
20,
4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Installing and configuring a barebones email server on Ubuntu
===
I've got an unmanaged Linux VPS running ubuntu that I'm using for the web server for a personal website. I'd like to get a barebones email server up and running. All the installation guides I've found so far are for a full-fledged email server with a webmail interface and everything. That's a lot more than I need. There's only two things I need:
- My web application needs to be able to send email. Specifically, it'll be emailing me when an exception occurs.
- I want all email sent to [anything]@domain.com forwarded to my personal gmail account. The server doesn't even need to retain the email or anything.
I want to reserve resources for the actual web app, so I don't want to install anything I won't need for this. | 0 | [
2,
25429,
17,
1065,
13549,
68,
21,
4856,
8640,
18,
8517,
8128,
27,
287,
12968,
2473,
800,
3726,
3726,
31,
22,
195,
330,
40,
367,
177,
8030,
13024,
13,
10924,
18,
946,
287,
12968,
2473,
30,
31,
22,
79,
568,
26,
14,
2741,
8128,
26... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I create a temporary file with Cocoa?
===
Years ago when I was working with C# I could easily create a temporary file and get its name with this function:
Path.GetTempFileName();
This function would create a file with a unique name in the temporary directory and return the full path to that file.
In the Cocoa API's, the closest thing I can find is:
NSTemporaryDirectory
Am I missing something obvious or is there no built in way to do this?
| 0 | [
2,
184,
107,
31,
1600,
21,
4700,
3893,
29,
24507,
60,
800,
3726,
3726,
122,
1464,
76,
31,
23,
638,
29,
272,
5910,
31,
110,
2351,
1600,
21,
4700,
3893,
17,
164,
82,
204,
29,
48,
1990,
45,
2013,
9,
3060,
9577,
16877,
7259,
5,
6,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to get up to speed on modern Java as a C++ programmer?
===
I program in C++ for a living. My last serious exposure to Java was in 1996.
What's a good self-study way to get up to date on modern Java? (Bonus points if it can be done online.)
| 0 | [
2,
184,
20,
164,
71,
20,
1362,
27,
773,
8247,
28,
21,
272,
20512,
17968,
60,
800,
3726,
3726,
31,
625,
19,
272,
20512,
26,
21,
634,
9,
51,
236,
2055,
6587,
20,
8247,
23,
19,
1371,
9,
98,
22,
18,
21,
254,
1119,
8,
26244,
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... |
Making GRUB automatically boot the kernel
===
I am currently writing a kernel, and in an attempt to actually run it, I've decided to use GRUB. Currently, we have a script to attach GRUB's stage1, stage2, a pad file, and the actual kernel itself together which makes it bootable. The only problem is that when running it, you have to let GRUB know where the kernel is and how long it is manually and then boot it, like this:
<pre>kernel 200+KERNELSIZE
boot</pre>
Where `KERNELSIZE` is the size of the kernel in blocks. This is fine and dandy for a start, but is it possible to get these values in the binary and make GRUB boot the kernel automatically? | 0 | [
2,
544,
8961,
220,
7499,
6801,
14,
17007,
800,
3726,
3726,
31,
589,
871,
1174,
21,
17007,
15,
17,
19,
40,
1735,
20,
1121,
485,
32,
15,
31,
22,
195,
868,
20,
275,
8961,
220,
9,
871,
15,
95,
57,
21,
3884,
20,
19514,
8961,
220,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Prevent DTD download when parsing XML
===
When using XmlDocument.Load , I am finding that if the document refers to a DTD, a connection is made to the provided URI. Is there any way to prevent this from happening? | 0 | [
2,
2501,
13,
43,
38,
43,
7121,
76,
2017,
18,
68,
23504,
800,
3726,
3726,
76,
568,
23504,
28132,
9,
8294,
13,
15,
31,
589,
3007,
30,
100,
14,
4492,
3806,
20,
21,
13,
43,
38,
43,
15,
21,
2760,
25,
117,
20,
14,
1173,
13,
3594,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
Creating a lambda from an s-expression
===
I have an s-expression bound to a variable in Common Lisp:
(defvar x '(+ a 2))
Now I want to create a function that when called, evaluates the expression in the scope in which it was defined. I've tried this:
(let ((a 4))
(lambda () (eval x)))
and
(let ((a 4))
(eval `(lambda () ,x)))
But both of these create a problem: EVAL will evaluate the code at the top level, so I can't capture variables contained in the expression. Note that I cannot put the LET form in the EVAL. Is there any solution? | 0 | [
2,
2936,
21,
13,
24187,
37,
40,
13,
18,
8,
28993,
800,
3726,
3726,
31,
57,
40,
13,
18,
8,
28993,
4138,
20,
21,
7612,
19,
757,
2093,
3401,
45,
13,
5,
13862,
3311,
993,
13,
22,
5,
2430,
21,
172,
6,
6,
130,
31,
259,
20,
1600,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Using the after_save callback to modify the same object without triggering the callback again (recursion)
===
If I add an after\_save callback to an ActiveRecord model, and on that callback I use update\_attribute to change the object, the callback is called again, and so a 'stack overflow' occurs (hehe, couldn't resist).
Is it possible to avoid this behavior, maybe disabling the callback during it's execution? Or is there another approach?
Thanks! | 0 | [
2,
568,
14,
75,
1,
19863,
645,
1958,
20,
17579,
14,
205,
3095,
366,
7286,
68,
14,
645,
1958,
188,
13,
5,
99,
4734,
5991,
6,
800,
3726,
3726,
100,
31,
3547,
40,
75,
1,
19863,
645,
1958,
20,
40,
1348,
14953,
1061,
15,
17,
27,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How to make a custom drawn UITableViewCell resize properly?
===
For performance reasons, I draw the strings for my UITableViewCell in a custom view that overrides its drawRect method to draw strings directly in the view rectangle using NSString:drawInRect. This is similar to Apple's TableViewSuite Example 5-CustomTableViewCell.
However, when I invoke setEditing on the cell to bring up the delete button, the view ends up with a squeezed appearance after the animation completes. To demonstrate this, invoke setEditing:YES on the CustomTableViewCell example mentioned above and observe the distortion. Is there any way around this or should I just revert back to using UILabels for my text? | 0 | [
2,
184,
20,
233,
21,
5816,
3160,
13,
11193,
579,
4725,
9725,
302,
10454,
7428,
60,
800,
3726,
3726,
26,
956,
2932,
15,
31,
2003,
14,
7887,
26,
51,
13,
11193,
579,
4725,
9725,
19,
21,
5816,
1418,
30,
84,
11891,
18,
82,
2003,
1467... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 PHP to delete X number of lines from the beginning of a text file.
===
I'm writing a PHP script and the script outputs a simple text file log of the operations it performs. How would I use PHP to delete the first several lines from this file when it reaches a certain file size?
Ideally, I would like it to keep the first two lines (date/time created and blank) and start deleting from line 3 and delete X amount of lines. I already know about the filesize() function, so I'll be using that to check the file size.
Example log text:
*** LOG FILE CREATED ON 2008-10-18 AT 03:06:29 ***
2008-10-18 @ 03:06:29 CREATED: gallery/thumbs
2008-10-18 @ 03:08:03 RENAMED: gallery/IMG_9423.JPG to gallery/IMG_9423.jpg
2008-10-18 @ 03:08:03 RENAMED: gallery/IMG_9188.JPG to gallery/IMG_9188.jpg
2008-10-18 @ 03:08:03 RENAMED: gallery/IMG_9236.JPG to gallery/IMG_9236.jpg
2008-10-18 @ 03:08:03 RENAMED: gallery/IMG_9228.JPG to gallery/IMG_9228.jpg
2008-10-18 @ 03:08:03 RENAMED: gallery/IMG_3104.JPG to gallery/IMG_3104.jpg
2008-10-18 @ 03:08:03 RENAMED: gallery/First dance02.JPG to gallery/First dance02.jpg
2008-10-18 @ 03:08:03 RENAMED: gallery/BandG02.JPG to gallery/BandG02.jpg
2008-10-18 @ 03:08:03 RENAMED: gallery/official03.JPG to gallery/official03.jpg
2008-10-18 @ 03:08:03 RENAMED: gallery/Wedding32.JPG to gallery/Wedding32.jpg
2008-10-18 @ 03:08:03 RENAMED: gallery/Gettaway car16.JPG to gallery/Gettaway car16.jpg
2008-10-18 @ 03:08:04 CREATED: gallery/thumbs/Afterparty05.jpg
2008-10-18 @ 03:08:04 CREATED: gallery/thumbs/IMG_9254.jpg
2008-10-18 @ 03:08:04 CREATED: gallery/thumbs/IMG_9175.jpg
2008-10-18 @ 03:08:04 CREATED: gallery/thumbs/official05.jpg
2008-10-18 @ 03:08:04 CREATED: gallery/thumbs/First dance01.jpg
2008-10-18 @ 03:08:04 CREATED: gallery/thumbs/Wedding29.jpg
2008-10-18 @ 03:08:04 CREATED: gallery/thumbs/men walking.jpg | 0 | [
2,
184,
20,
275,
13,
26120,
20,
27448,
993,
234,
16,
1560,
37,
14,
997,
16,
21,
1854,
3893,
9,
800,
3726,
3726,
31,
22,
79,
1174,
21,
13,
26120,
3884,
17,
14,
3884,
5196,
18,
21,
1935,
1854,
3893,
6738,
16,
14,
1311,
32,
11563... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What's a good, non-recursive algorithm to calculate a cartesian product?
===
### Background
The [REBOL](http://www.rebol.com) language supports the creation of domain-specific languages known as "dialects" in REBOL *parlance*. I've created such a dialect for list comprehensions, which aren't natively supported in REBOL.
A good cartesian product algorithm is needed for list comprehensions.
### The Problem
I've used meta-programming to solve this, by dynamically creating and then executing a sequence of nested `foreach` statements. It works beautifully. However, because it's dynamic, the code is not very readable. REBOL doesn't do recursion well. It rapidly runs out of stack space and crashes. So a recursive solution is out of the question.
In sum, I want to replace my meta-programming with a readable, non-recursive, "inline" algorithm, if possible. The solution can be in any language, as long as I can reproduce it in REBOL. (I can read just about any programming language: C#, C, C++, Perl, Oz, Haskell, Erlang, whatever.) | 0 | [
2,
98,
22,
18,
21,
254,
15,
538,
8,
99,
24244,
9083,
20,
18469,
21,
349,
3231,
806,
2374,
60,
800,
3726,
3726,
6926,
5910,
5910,
2395,
14,
636,
99,
6966,
500,
5,
21127,
6903,
6483,
9,
99,
6966,
9,
960,
6,
816,
6747,
14,
2502,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How can I show "temporary out of service" page to web-app users while maintenance?
===
I develop and maintain small intranet web apps written in JSP and Java.
They run on Resin web server, without dedicated httpd like Apache.
Before maintenance, I activate a very simple Ajax to urge users to logout.
what I want is, while I do maintenance, a user trying to login to that particular app
see a"Sorry, temporary out of service" page,
while other ther web apps running on the same web server
is available as usual.
What is the best practice in such a situation?
| 0 | [
2,
184,
92,
31,
298,
13,
7,
24635,
70,
16,
365,
7,
2478,
20,
2741,
8,
7753,
3878,
133,
5010,
60,
800,
3726,
3726,
31,
2803,
17,
4027,
284,
14369,
2328,
2741,
4865,
18,
642,
19,
487,
3401,
17,
8247,
9,
59,
485,
27,
22839,
2741,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
ActionLink fails with ViewData parameter in ASP.NET MVC Beta
===
I have ran into an odd problem with the ActionLink method in ASP.NET MVC Beta. When using the Lambda overload from the MVC futures I cannot seem to specify a parameter pulled from ViewData.
When I try this:
<%= Html.ActionLink<PhotoController>(p => p.Upload(((string)ViewData["groupName"])), "upload new photo") %>
The HTML contains a link with an empty URL.
<a href="">upload new photo</a>
However if I hard code the parameter, like this:
<%= Html.ActionLink<PhotoController>(p => p.Upload("groupA"), "upload new photo") %>
The output contains an actual URL.
<a href="/group/groupA/Photo/Upload">upload new photo</a>
I assume this probably has something to do with the visibility and availability of the ViewData, and it not being there when the Lambda gets evaluated by the internals of the framework. But that is just a guess.
Am I doing something incorrect in the first sample to cause this, or is this some short of bug? | 0 | [
2,
1028,
6258,
13614,
29,
1418,
18768,
18906,
19,
28,
306,
9,
2328,
307,
8990,
8434,
800,
3726,
3726,
31,
57,
717,
77,
40,
4210,
1448,
29,
14,
1028,
6258,
2109,
19,
28,
306,
9,
2328,
307,
8990,
8434,
9,
76,
568,
14,
13,
24187,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Firefox: visually flag redirect in address bar
===
I'm wondering if there's any way to have Firefox 3 (or IE 7 or safari 3.1 or Opera) flag that a redirect has occurred (i.e. any deltas between the hyperlink or URL entered into address bar, and the page you land on), whether you've arrived from a hyperlink or entering URL into address bar.
I've googled some, looked at the [linker addon][1], but the rightclick is an additional step I don't want to have to do.
[1]: https://addons.mozilla.org/en-US/firefox/addon/8092 | 0 | [
2,
535,
18219,
45,
20747,
3157,
302,
14706,
19,
3218,
748,
800,
3726,
3726,
31,
22,
79,
5712,
100,
80,
22,
18,
186,
161,
20,
57,
535,
18219,
203,
13,
5,
248,
13,
660,
453,
54,
25055,
203,
9,
165,
54,
1877,
6,
3157,
30,
21,
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... |
Create images of the page when url supplied automatically (Ruby, PHP)
===
I am wondering if there is any good way to create image of page when I have url. If people submit url's, I would like to be able to create an image of that page and store that somewhere.
I am not sure if this can be done easily or not, I have no simple ideas how to do that. I was wondering before I do something really complicated, if you could share ideas, solutions etc that might help me.
Thanks in advance. | 0 | [
2,
1600,
3502,
16,
14,
2478,
76,
287,
6362,
7949,
7499,
13,
5,
1820,
779,
15,
13,
26120,
6,
800,
3726,
3726,
31,
589,
5712,
100,
80,
25,
186,
254,
161,
20,
1600,
1961,
16,
2478,
76,
31,
57,
287,
6362,
9,
100,
148,
12298,
287,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
GCC compiler error on Windows XP
===
I'm getting a totally bizzare error trying to compile a C program using GCC. Here is the batch file I am using:
echo Now compiling, assembling, and linking the core:
nasm -f aout -o start.o start.asm
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o consoleio.o consoleio.c
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o core.o core.c
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o system.o system.c
ld -T link.ld -o core.bin start.o core.o system.o consoleio.o
echo Done!
concat.py
pause
Here are the error messages I am receiving when trying to run this code. All files are in the same directory, yes the PATH variable is set up correctly:
C:\Simple\core>build.bat
C:\Simple\core>echo Now compiling, assembling, and linking the core:
Now compiling, assembling, and linking the core:
C:\Simple\core>nasm -f aout -o start.o start.asm
C:\Simple\core>gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-func
tions -nostdinc -fno-builtin -I./include -c -o consoleio.o consoleio.c
The system cannot execute the specified program.
C:\Simple\core>gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-func
tions -nostdinc -fno-builtin -I./include -c -o core.o core.c
C:\Simple\core>gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-func
tions -nostdinc -fno-builtin -I./include -c -o system.o system.c
The system cannot execute the specified program.
C:\Simple\core>ld -T link.ld -o core.bin start.o core.o system.o consoleio.o
c:/djgpp/bin/ld.exe: system.o: No such file: No such file or directory (ENOENT)
C:\Simple\core>echo Done!
Done!
C:\Simple\core>concat.py
Traceback (most recent call last):
File "C:\Simple\core\concat.py", line 12, in <module>
with open("core.bin", "rb") as core:
IOError: [Errno 2] No such file or directory: 'core.bin'
Now, the interesting thing is the gcc command, which is the issue I'm having. (The other issues seem to be cascading from this.) When compiling core.c, the GCC command works just fine and great, and produces a .o file as expected. When attempting to compile system.c or consoleio.c, GCC fails, but in a very unexpected way: it appears as though windows cannot run the program. This makes **zero** sense to me. I've tried any number of things, including running these commands myself outside the window. Something about core.c is just special, and I can't figure out what the difference is. I literally copied that line and changed the filenames to create the other two lines that are failing.
So, in short, HELP. I'm using DJGPP and GCC on windows XP, along with a python script at the end that should tie everything together. (This all worked when the project was a single source file, but attempting to split the file into separate files has caused this strange error.)
Thanks.
PS: Yes, we *are* using a batch file, and I know that makes some of you cringe. However, I'd really like to understand this error before moving on to a makefile if possible. ^_^ | 0 | [
2,
489,
3384,
21486,
7019,
27,
1936,
23045,
800,
3726,
3726,
31,
22,
79,
1017,
21,
5139,
1732,
5092,
1509,
7019,
749,
20,
26561,
21,
272,
625,
568,
489,
3384,
9,
235,
25,
14,
13064,
3893,
31,
589,
568,
45,
8117,
130,
24378,
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... |
Multiple apps sharing same reference data . .
===
I have multiple winforms applications that download large sets of reference data on startup. I realized that there might be a more efficient way to store this data locally instead of duplicating the memory in everyone one of the applications. This data is used for large drop down pick lists and data mappings. Does anyone have an out of process memory map solution or something that would allow this to avoid the duplication and reduce memory overhead in each applications. | 0 | [
2,
1886,
4865,
18,
6126,
205,
2801,
1054,
13,
9,
13,
9,
800,
3726,
3726,
31,
57,
1886,
628,
4190,
18,
3767,
30,
7121,
370,
3415,
16,
2801,
1054,
27,
20205,
9,
31,
1896,
30,
80,
530,
44,
21,
91,
8243,
161,
20,
1718,
48,
1054,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Did any of the apps you worked on had a "famous error message" among the user base?
===
I remember one of the first applications I worked with, at the beginning of my career was built using Clipper (for those who have not been on the area for long, here's [a pointer to the Clipper language][1], pretty cutting-edge at the time :) ).
Clipper used the same database architecture as dBase did, and databases were stored on regular files on the file system, and for each index you would need an accompanying file, those were the .DBF (database file) and the .NTX (the index file).
Every once in a while the database file and the index lost sync. That could happen for a couple of reasons, one of them being forgetting to open one of all the indexes for a given table (represented by a single file).
When that situation happened, the user was presented with a red screen with yellow text saying: "Corruption Detected". Imagine the user of a financial software presented with the corruption detected message, with a red background :-) Some calls we got at the time were pretty fun.
For another product I worked on, a SMS game that resembles a Tamagochi, where the user interacts with others by taking actions, like dating, going to the gym, going to the club and so on... I remember that when we had an exception in Java (the backend), we just replied with a generic message: "Ok, you got it! What do you want to do now?". For the user, it seemed the game understood his last action, but we obviously had some processing problems.
So, on the mobile operators, most of the users who did UAT for the product would call us and say: "When I attempt to chat with someone else, I am getting that 'Ok, you got it' message" :-)
Now it's your turn: do you remember any known error message among the applications you worked on?
[1]: http://en.wikipedia.org/wiki/Clipper_programming_language | 2 | [
2,
144,
186,
16,
14,
4865,
18,
42,
577,
27,
41,
21,
13,
7,
24373,
7019,
2802,
7,
497,
14,
4155,
1000,
60,
800,
3726,
3726,
31,
1518,
53,
16,
14,
64,
3767,
31,
577,
29,
15,
35,
14,
997,
16,
51,
545,
23,
392,
568,
23229,
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... |
Directories or projects . .
===
On a regular winforms solutions, how do you determine to break classes into different directories / namespaces or seperate projects. Besides binary dependencies should view, controllers, models all be in different projects ? | 0 | [
2,
559,
1596,
54,
2314,
13,
9,
13,
9,
800,
3726,
3726,
27,
21,
1290,
628,
4190,
18,
6776,
15,
184,
107,
42,
3746,
20,
1442,
2684,
77,
421,
559,
1596,
13,
118,
204,
5582,
18,
54,
10332,
106,
1373,
2314,
9,
3410,
14171,
29411,
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,
0,
0,
0,
0... |
PowerPoint - How can I figure out if a presentation has a password progamatically?
===
I'm writing an application that processes PowerPoint presentations and I'm looking into ways of detecting whether or not a PowerPoint presentation has a password if it does then stop processing it. Any thoughts? | 0 | [
2,
414,
3132,
13,
8,
184,
92,
31,
1465,
70,
100,
21,
6364,
63,
21,
20884,
895,
15847,
38,
8438,
60,
800,
3726,
3726,
31,
22,
79,
1174,
40,
3010,
30,
5102,
414,
3132,
6364,
18,
17,
31,
22,
79,
699,
77,
2847,
16,
9092,
68,
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... |
Any Notepad++ plugins to automatically save document versions
===
Does anyone know of any notepad++ plugin that saves a version of whatever I'm working on periodically? Ideally, it would save many versions with the automatic version number and the date in the title, and perhaps store them in a zipped archive to save space.
Does something like this exist already, or shold I attempt to write such a plugin myself?
Thanks,
Cameron
P.S. It should be freeware or (preferably) open-source. | 0 | [
2,
186,
1945,
8240,
20512,
10922,
108,
18,
20,
7499,
2079,
4492,
3281,
800,
3726,
3726,
630,
1276,
143,
16,
186,
1945,
8240,
20512,
10922,
108,
30,
16815,
21,
615,
16,
2099,
31,
22,
79,
638,
27,
19886,
60,
5628,
102,
15,
32,
83,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I get clean URLs without .aspx in them in IIS?
===
What's the best way to get a nice clean URL structure like stack overflow has?
Do I need to use IIS for this? Or is there a way I can do it with asp.net?
The site has hundreds of pages, and is already deployed.
I would like a method that requires the least amount of changes possible. | 0 | [
2,
184,
107,
31,
164,
2745,
13,
911,
7532,
366,
13,
9,
472,
306,
396,
19,
105,
19,
595,
18,
60,
800,
3726,
3726,
98,
22,
18,
14,
246,
161,
20,
164,
21,
2210,
2745,
287,
6362,
1411,
101,
7566,
20285,
63,
60,
107,
31,
376,
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... |
Variable naming schemes for objects in C++?
===
I am implementing a BFS, and what it is going to do is go through an ordered tree to find the shortest solution to a puzzle.
What i will be doing is creating a Snapshot object that holds the current position of each piece in a puzzle. I will add this Snapshot object into the queue and check if it is the solution. However, I am creating these snapshots on the fly. So is there some kind of way that will automatically generate the names of the Snapshot objects when they are put into the queue?
or do i have to keep track of how many declarations i have made and just hard code it by saying...
Snapshot snapshot2;
Snapshot snapshot3;
Snapshot snapshot4;
etc..
| 0 | [
2,
7612,
10929,
13185,
26,
3916,
19,
272,
20512,
60,
800,
3726,
3726,
31,
589,
17333,
21,
13,
12425,
18,
15,
17,
98,
32,
25,
228,
20,
107,
25,
162,
120,
40,
1905,
1541,
20,
477,
14,
23576,
4295,
20,
21,
9164,
9,
98,
31,
129,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do you properly use WideCharToMultiByte
===
I've read the documentation here:
http://msdn.microsoft.com/en-us/library/ms776420(VS.85).aspx
I'm stuck on this parameter:
lpMultiByteStr
[out] Pointer to a buffer that receives the converted string.
I'm not quite sure how to properly initialize the variable and feed it into the function | 0 | [
2,
184,
107,
42,
7428,
275,
1051,
5433,
262,
21531,
23246,
800,
3726,
3726,
31,
22,
195,
1302,
14,
13945,
235,
45,
7775,
6903,
79,
18,
43,
103,
9,
22019,
12980,
9,
960,
118,
219,
8,
267,
118,
1210,
2559,
622,
118,
79,
18,
4536,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 OpenLaszlo apps access AIR APIs?
===
It seems [OpenLaszlo][1] can [run on AIR][2]. What's less obvious is whether OpenLaszlo apps can use the AIR-specific APIs, like file system access. If so, how exactly is this done?
[1]: http://openlaszlo.org/
[2]: http://www.antunkarlovac.com/blog/2008/02/19/writing-an-openlaszlo-air-application/ | 0 | [
2,
92,
368,
4830,
380,
1415,
4865,
18,
1381,
282,
21,
8954,
60,
800,
3726,
3726,
32,
2206,
636,
10157,
4830,
380,
1415,
500,
2558,
165,
500,
92,
636,
3169,
27,
282,
500,
2558,
135,
500,
9,
98,
22,
18,
787,
4674,
25,
1472,
368,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Web Design Process - Planning Stage...
===
What I want to know is when you decide that you need to create a site, maybe for a customer, maybe not, what do you do? What is your process? What do you do in the planning stage to make it easier to create the site. I'm looking at this as in more of a web app... I've only technically created on business site, and it was mostly just a little Javascript functionality. I want to get more into the web application design, and I am going to practice with my own site, but I wonder how everyone else does it. I read Web ReDesign 2.0 for some ideas, would you say that is a good place to start? And, any other advice is appreciated. Thanks in advance for your answers! | 0 | [
2,
2741,
704,
953,
13,
8,
2334,
876,
9,
9,
9,
800,
3726,
3726,
98,
31,
259,
20,
143,
25,
76,
42,
4073,
30,
42,
376,
20,
1600,
21,
689,
15,
913,
26,
21,
7705,
15,
913,
52,
15,
98,
107,
42,
107,
60,
98,
25,
154,
953,
60,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What are the most helpful features of effective 404 File Not Found error pages?
===
When a user comes across your site's 404 File Not Found error page, it is probably not what they were looking for. Here, you have the opportunity to turn a dead end into a resource that can help your visitor find whatever they were looking for.
If you were going to create the perfect 404 File Not Found error page, what would it do? What are the most helpful features of effective 404 File Not Found error pages? Are there any strong examples out there? | 0 | [
2,
98,
50,
14,
127,
15600,
967,
16,
3140,
13,
23397,
3893,
52,
216,
7019,
4434,
60,
800,
3726,
3726,
76,
21,
4155,
1624,
464,
154,
689,
22,
18,
13,
23397,
3893,
52,
216,
7019,
2478,
15,
32,
25,
910,
52,
98,
59,
46,
699,
26,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Determine windows system wide font
===
What is the Win32 API call to determine the system-wide font (in particular the color) for say Menus.
This would be equivalent to going into Appearance Settings - Advanced - and then choosing Menu as the item to look at.
I can use GetSysColor to find the colors of various system-wide window elements, but cannot find the equivalent for fonts. | 0 | [
2,
3746,
1936,
329,
1051,
9978,
800,
3726,
3726,
98,
25,
14,
628,
3125,
21,
2159,
645,
20,
3746,
14,
329,
8,
8077,
9978,
13,
5,
108,
1498,
14,
1665,
6,
26,
395,
11379,
18,
9,
48,
83,
44,
4602,
20,
228,
77,
1468,
12410,
13,
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... |
Best 3rd Party ASP.Net Grid Control
===
One of the project teams in my company is using Infragistics ASP.Net Grid control. I've been brought in to troubleshoot performance issues.
What I found is:
The Infragistics ASP.Net Grid control generates insane amount of viewstate. Disabling viewstate renders the control near unusable. I'm thinking of proposing that they go ahead and replace it with something lightweight, has built-in AJAX support, does not play havoc with the pages' ViewState etc.
I would like to know your expereince with 3rd Party Grid controls.
Thanks in advance | 4 | [
2,
246,
203,
897,
346,
28,
306,
9,
2328,
7354,
569,
800,
3726,
3726,
53,
16,
14,
669,
952,
19,
51,
237,
25,
568,
19,
22133,
3771,
18,
28,
306,
9,
2328,
7354,
569,
9,
31,
22,
195,
74,
809,
19,
20,
2572,
12511,
956,
1549,
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... |
gcc error: wrong ELF class: ELFCLASS64
===
I was trying to compile a program using an external compiled object coreset.o. I wrote the public01.c test file and my functions are in computation.c, both of which compiles. However its failing on linking it together. What might be the problem?
gcc -o public01.x public01.o computation.o coreset.o
ld: fatal: file coreset.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to public01.x
collect2: ld returned 1 exit status
| 0 | [
2,
489,
3384,
7019,
45,
1389,
15704,
718,
45,
15704,
1898,
3470,
800,
3726,
3726,
31,
23,
749,
20,
26561,
21,
625,
568,
40,
4886,
9316,
3095,
2884,
3554,
9,
111,
9,
31,
738,
14,
317,
3026,
9,
150,
1289,
3893,
17,
51,
3719,
50,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
C#: Virtual Function invocation is even faster than a delegate invocation?
===
It just happens to me about one code design question. Say, I have one "template" method that invokes some functions that may "alter". A intuitive design is to follow "Template Design Pattern". Define the altering functions to be "virtual" functions to be overridden in subclasses. Or, I can just use delegate functions without "virtual". The delegate functions is injected so that they can be customized too.
Originally, I thought the second "delegate" way would be faster than "virtual" way, but some coding snippet proves it is not correct.
In below code, the first DoSomething method follows "template pattern". It calls on the virtual method IsTokenChar. The second DoSomthing method doesn't depend on virtual function. Instead, it has a pass-in delegate. In my computer, the first DoSomthing is always faster than the second. The result is like 1645:1780.
"Virtual invocation" is dynamic binding and should be more time-costing than direct delegation invocation, right? but the result shows it is not.
Anybody can explain this?
class Foo
{
public virtual bool IsTokenChar(string word)
{
return String.IsNullOrEmpty(word);
}
// this is a template method
public int DoSomthing(string word)
{
int trueCount = 0;
for (int i = 0; i < repeat; ++i)
{
if (IsTokenChar(word))
{
++trueCount;
}
}
return trueCount;
}
public int DoSomthing(Predicate<string> predicator, string word)
{
int trueCount = 0;
for (int i = 0; i < repeat; ++i)
{
if (predicator(word))
{
++trueCount;
}
}
return trueCount;
}
private int repeat = 200000000;
}
class Program
{
static void Main(string[] args)
{
Foo f = new Foo();
{
Stopwatch sw = Stopwatch.StartNew();
f.DoSomthing(null);
sw.Stop();
Console.WriteLine(sw.ElapsedMilliseconds);
}
{
Stopwatch sw = Stopwatch.StartNew();
f.DoSomthing(str => String.IsNullOrEmpty(str), null);
sw.Stop();
Console.WriteLine(sw.ElapsedMilliseconds);
}
}
}
| 0 | [
2,
272,
5910,
45,
6599,
1990,
19,
2625,
16893,
25,
166,
4233,
119,
21,
11300,
19,
2625,
16893,
60,
800,
3726,
3726,
32,
114,
5531,
20,
55,
88,
53,
1797,
704,
1301,
9,
395,
15,
31,
57,
53,
13,
7,
9577,
6554,
7,
2109,
30,
28371,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 good C++ crash reporting library that works well with Visual Studio 2005?
===
After reading [this previous discussion][1] and [this one][2], it looked as though [Crashrpt][3] was exactly what I was looking for, but it seems it's no longer being maintained and, after playing with it, found it doesn't work well with Visual Studio 2005.
Is anyone using Crashrpt with Visual Studio 2005?
If not, can anyone recommend a good C++ solution for automating the process of...
1. generating a detailed and readable crash dump and
2. zipping it up along with any other specified log files and
3. emailing the zipped up package to the developers
Thanks in advance!
[1]: http://stackoverflow.com/questions/36127/any-recommended-vc-settings-for-better-pdb-analysis-on-release-builds
[2]: http://stackoverflow.com/questions/49224/good-crash-reporting-library-in-c
[3]: http://code.google.com/p/crashrpt/ | 0 | [
2,
25,
80,
21,
254,
272,
20512,
4597,
6670,
1248,
30,
693,
134,
29,
3458,
1120,
812,
60,
800,
3726,
3726,
75,
1876,
636,
1565,
1158,
5460,
500,
2558,
165,
500,
17,
636,
1565,
53,
500,
2558,
135,
500,
15,
32,
292,
28,
362,
636,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Is it safe to deny access to .ini file in .htaccess?
===
I have a .ini file with sensitive information in my php wab app. I denied access to it using a .htaccess file:
<files my.ini>
order deny,allow
deny from all
</files>
I don't have access to folders outside of htdocs, so I can't move the .ini file out of browsable territory.
Is my solution safe?
| 0 | [
2,
25,
32,
1834,
20,
9258,
1381,
20,
13,
9,
2651,
3893,
19,
13,
9,
9020,
20604,
60,
800,
3726,
3726,
31,
57,
21,
13,
9,
2651,
3893,
29,
7830,
676,
19,
51,
13,
26120,
3142,
220,
4865,
9,
31,
5265,
1381,
20,
32,
568,
21,
13,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
GCC with Visual Studio?
===
How hard would it be to use GCC instead of VC++ from within Visual Studio 2008? Obviously, some of the keywords won't match, and some may not get syntax highlighting (unless you made a new language service).
Is this what a 'makefile project' is for, pretty much? | 0 | [
2,
489,
3384,
29,
3458,
1120,
60,
800,
3726,
3726,
184,
552,
83,
32,
44,
20,
275,
489,
3384,
700,
16,
13,
8990,
20512,
37,
363,
3458,
1120,
570,
60,
4409,
15,
109,
16,
14,
1246,
12827,
230,
22,
38,
730,
15,
17,
109,
123,
52,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What are the possible methods to get the key of the last added array value?
===
Is there a better way to do the following:
$array = array('test1', 'test2', 'test3', 'test4', 'test5');
// do a bunch of other stuff, probably a loop
$array[] = 'test6';
end($array);
echo key($array); // gives me 6
This will give the key of the most recently add array element.
Is there a better way to do this? | 0 | [
2,
98,
50,
14,
938,
3195,
20,
164,
14,
1246,
16,
14,
236,
905,
7718,
1923,
60,
800,
3726,
3726,
25,
80,
21,
574,
161,
20,
107,
14,
249,
45,
5579,
8576,
93,
800,
7718,
5,
22,
10543,
165,
22,
15,
13,
22,
10543,
135,
22,
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... |
Options for in-process databases under medium trust
===
I have seen a few different in-process SQL databases for .NET (including one from Microsoft), but either they do not work under medium trust (ASP.NET) or the documentation/websites don't even talk about.
What experiences have you had with in-process databases in general, and do you know of any that work under medium trust for ASP.NET? | 0 | [
2,
6368,
26,
19,
8,
16835,
6018,
18,
131,
4152,
1527,
800,
3726,
3726,
31,
57,
541,
21,
310,
421,
19,
8,
16835,
4444,
255,
6018,
18,
26,
13,
9,
2328,
13,
5,
3970,
53,
37,
7099,
6,
15,
47,
694,
59,
107,
52,
170,
131,
4152,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 tools are there for functional progamming in C?
===
I've been thinking a lot lately about how to go about doing functional programming in C (*not* C++). Obviously, C is a procedural language and doesn't really support functional programming natively.
Are there any compiler/language extensions that add some functional programming constructs to the language? GCC provides <a href="http://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html">nested functions</a> as a language extension; nested functions can access variables from the parent stack frame, but this is still a long way away from mature closures.
For example, one thing that I think could be really useful in C is that anywhere where a function pointer is expected, you could be able to pass a lambda expression, creating a closure which decays into a function pointer. C++0x is going to include lambda expressions (which I think is awesome); however, I'm looking for tools applicable to straight ANSI C. | 0 | [
2,
98,
4672,
50,
80,
26,
7652,
895,
7253,
3863,
19,
272,
60,
800,
3726,
3726,
31,
22,
195,
74,
1440,
21,
865,
10434,
88,
184,
20,
162,
88,
845,
7652,
3143,
19,
272,
13,
5,
2483,
1270,
2483,
272,
20512,
6,
9,
4409,
15,
272,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I get a list of all unversioned files from svn?
===
Sometimes youre developing and you decide to commit, forgetting you created a few files on your project. Then a few days down the line your buddy gets your build out of subversion and complains that some files appear to be missing. You realize, ah crap, I forgot to add those files!
How can I get a list of the files that are not under version control from subversion so I'm sure I've added everything to the repository? | 0 | [
2,
184,
107,
31,
164,
21,
968,
16,
65,
367,
10898,
69,
6488,
37,
13,
18,
16578,
60,
800,
3726,
3726,
1030,
2680,
3561,
17,
42,
4073,
20,
9686,
15,
20183,
42,
679,
21,
310,
6488,
27,
154,
669,
9,
94,
21,
310,
509,
125,
14,
29... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
What exactly causes binary file "gibberish"?
===
I haven't found an answer to this particular question; perhaps there isn't one. But I've been wondering for a while about it.
What exactly causes a binary file to display as "gibberish" when you look at it in a text editor? It's the same thing with encrypted files. Are the binary values of the file trying to be converted into ASCII? Is it possible to convert the view to display raw binary values, i.e. to show the 1s and 0s that make up the file?
Finally, is there a way to determine what program will properly open a data file? Many times, especially with Windows, a file is orphaned or otherwise not associated w/ a particular program. Opening it in a text editor sometimes tells you where it belongs but most of the time doesn't, due to the gibberish. If the extension doesn't provide any information, how can you determine what program it belongs to? | 0 | [
2,
98,
1890,
4047,
14171,
3893,
13,
7,
2234,
17031,
1595,
7,
60,
800,
3726,
3726,
31,
2933,
22,
38,
216,
40,
1623,
20,
48,
1498,
1301,
73,
1774,
80,
2532,
22,
38,
53,
9,
47,
31,
22,
195,
74,
5712,
26,
21,
133,
88,
32,
9,
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... |
Getting integers from a string created by getline() in C++
===
I am parsing an input text file and was wondering if I am grabbing the input one line at a time using getline(). Is there a way that I can search through the string to get an integer. I was thinking something similar to getNextInt() in Java.
The thing is that I know there has to be 2 numbers in that input line, however, these values will be separated by one or more white space characters so I can't just go by a specific position.
Thanks in advance,
Tomek | 0 | [
2,
1017,
13820,
18,
37,
21,
3724,
679,
34,
164,
1143,
5,
6,
19,
272,
20512,
800,
3726,
3726,
31,
589,
2017,
18,
68,
40,
6367,
1854,
3893,
17,
23,
5712,
100,
31,
589,
9910,
14,
6367,
53,
293,
35,
21,
85,
568,
164,
1143,
5,
6,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Security issues when using Amazon S3 file hosting for Flex modules/swfs
===
What kind of security issues am I going to run into when hosting a Flex site (with multiple modules) using Amazon S3's hosting?
Can I even communicate between two different swfs if they're loaded from two different subdomains? (These will be modules)
I know about crossdomain.xml for web servcies - does this apply for cross domain swf communication too? | 0 | [
2,
1221,
1549,
76,
568,
8059,
13,
18,
240,
3893,
10637,
26,
14409,
17113,
118,
18,
15263,
18,
800,
3726,
3726,
98,
825,
16,
1221,
1549,
589,
31,
228,
20,
485,
77,
76,
10637,
21,
14409,
689,
13,
5,
1410,
1886,
17113,
6,
568,
8059... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Problem with Prototype's AJAX.Request function.
===
I'm trying to create a POST request, unfortunately the body of the POST never seems to be sent.
Below is the code that I'm using. The code is invoked when a user clicks on a link, not a form "submit" button. It runs without error, invokes the servlet that is being called but, as I mentioned earlier, the body of the POST never seems to be sent.
I can validate that the request body is never sent since I have access to the servlet being called.
I've tried using "parameters" in replace of "requestBody." I've also tried using a parameter string (x=a?y=b). I've also validated that "ckULK" does contain a valid value.
Any ideas?
new Ajax.Request(sURL,
{
method: 'POST'
, contentType: "text/x-json"
, requestBody: {ulk:ckULK}
, onFailure:
function(transport)
{
vJSONResp = transport.responseText;
var JSON = eval( "(" + vJSONResp + ")" );
updateStatus(JSON.code + ": " + JSON.message);
} // End onFailure
, onSuccess:
function(transport)
{
if (200 == transport.status)
{
vJSONResp = transport.responseText;
}
else
{
log.value += "\n" + transport.status;
}
} // End onSuccess
}); // End Ajax.request | 0 | [
2,
1448,
29,
7063,
22,
18,
20624,
9,
99,
10351,
1990,
9,
800,
3726,
3726,
31,
22,
79,
749,
20,
1600,
21,
678,
3772,
15,
6200,
14,
358,
16,
14,
678,
243,
2206,
20,
44,
795,
9,
1021,
25,
14,
1797,
30,
31,
22,
79,
568,
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... |
UIView scale to 0 using CGAffineTransformMakeScale
===
Is it possible to scale a UIView down to 0 (width and height is 0) using CGAffineTransformMakeScale?
view.transform = CGAffineTransformMakeScale(0.0f, 0.0f);
Why would this throw an error of "`<Error>: CGAffineTransformInvert: singular matrix.`" ? | 0 | [
2,
13,
5661,
4725,
3464,
20,
713,
568,
13,
15123,
19704,
62,
7028,
4190,
11115,
5093,
800,
3726,
3726,
25,
32,
938,
20,
3464,
21,
13,
5661,
4725,
125,
20,
713,
13,
5,
3976,
43,
96,
17,
2947,
25,
713,
6,
568,
13,
15123,
19704,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Csharp accessing memory map file
===
Looking for code samples to access memory map file in csharp | 0 | [
2,
272,
23646,
1381,
68,
1912,
2942,
3893,
800,
3726,
3726,
699,
26,
1797,
7855,
20,
1381,
1912,
2942,
3893,
19,
272,
23646,
3,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Reloading a FastCGI app
===
I'm using FastCGI to expose a C++ binary (written using the [Wt][1] framework) as a web app. However, after I have modified the app and recompiled it, in order for new sessions to see the changes (active sessions keep using the old version until they expire), I have to reload Apache.
Is it possible to configure the system in such a way that doesn't require to reload Apache in order to make the newly compiled FastCGI app available to users? Thanks.
[1]: http://www.webtoolkit.eu/wt | 0 | [
2,
27339,
68,
21,
1512,
150,
2234,
4865,
800,
3726,
3726,
31,
22,
79,
568,
1512,
150,
2234,
20,
13833,
21,
272,
20512,
14171,
13,
5,
6390,
568,
14,
636,
499,
38,
500,
2558,
165,
500,
6596,
6,
28,
21,
2741,
4865,
9,
207,
15,
75... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
How do I coherently organize modules for a PyGTK desktop application?
===
I am working on a desktop application in PyGTK and seem to be bumping up against some limitations of my file organization. Thus far I've structured my project this way:
- application.py - holds the primary application class (most functional routines)
- gui.py - holds a loosely coupled GTK gui implementation. Handles signal callbacks, etc.
- command.py - holds command line automation functions not dependent on data in the application class
- state.py - holds the state data persistence class
This has served fairly well so far, but at this point application.py is starting to get rather long. I have looked at numerous other PyGTK applications and they seem to have similar structural issues. At a certain point the primary module starts to get very long and there is not obvious way of breaking the code out into narrower modules without sacrificing clarity and object orientation.
I have considered making the GUI the primary module and having seperate modules for the toolbar routines, the menus routines, etc, but at that point I believe I will lose most of the benefits of OOP and end up with an everything-references-everything scenario.
Should I just deal with having a very long central module or is there a better way of structuring the project so that I don't have to rely on the class browser so much? | 0 | [
2,
184,
107,
31,
21144,
102,
9213,
17113,
26,
21,
13,
28860,
38,
197,
17404,
3010,
60,
800,
3726,
3726,
31,
589,
638,
27,
21,
17404,
3010,
19,
13,
28860,
38,
197,
17,
2260,
20,
44,
9797,
68,
71,
149,
109,
14070,
16,
51,
3893,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Should an object implement an iterator or contain another object that implements an iterator
===
I'm trying to get my head around SPL iterators and I've come up with 2 ways to handle it. I see the first version to be less complicated but the second version has composition feel to it (I think).
What am I not seeing is which one is preferable over the other? Or am I just over complicating this?
Here are my thoughts:
The object implements an iterator:
class BoxOfChocolates implements Iterator {
private $id
private $name; // e.g. Valentine's Heart Box
private $maker; // e.g. Hersheys
private $items; // array
public function getChocolates() {
$query = ...
foreach($rows as $row) {
$this->_items[] = new Chocolate() ...
}
}
// ... necessary iterator implementation stuff
}
The object contains an iterate-able object:
class BoxOfChocolates {
private $id;
private $name;
private $maker;
private $items; // chocolates object
public function getChocolates() {
$this->items = new Chocolates();
$this->items->getChocolates();
}
}
class Chocolates implements Iterator {
private $items;
public function getChocolates() {
$query = ...
foreach($rows as $row) {
$this->_items[] = new Chocolate() ...
}
}
// ... necessary iterator implementation stuff
}
| 0 | [
2,
378,
40,
3095,
8713,
40,
32,
106,
3457,
54,
3717,
226,
3095,
30,
8713,
18,
40,
32,
106,
3457,
800,
3726,
3726,
31,
22,
79,
749,
20,
164,
51,
157,
140,
11202,
32,
106,
9922,
17,
31,
22,
195,
340,
71,
29,
172,
2847,
20,
305... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Searching for file dependency for nunit unit testing
===
I had a winforms C# class that internally was looking up a file.. to help unit test, i changed it to pass in a file from the outside such as:
string file = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location + "TestXML.xml");
Foo = new Foo(file);
the problem is that the code works fine normally but when run in Nunit it comes us with an error saying "Cant find directory C:\doc & settings\ . . .. testxml.xml
any thoughts?
| 0 | [
2,
5792,
26,
3893,
26835,
26,
10210,
242,
1237,
4431,
800,
3726,
3726,
31,
41,
21,
628,
4190,
18,
272,
5910,
718,
30,
17739,
23,
699,
71,
21,
3893,
9,
9,
20,
448,
1237,
1289,
15,
31,
1015,
32,
20,
1477,
19,
21,
3893,
37,
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... |
Installing GCC 3.4.6 in RHEL4
===
I do the following in command line:
1) wget ftp://mirrors.kernel.org/gnu/gcc/gcc-3.4.6/gcc-3.4.6.tar.bz2
2) tar -jxf gcc-3.4.6.tar.bz2
3) cd gcc-3.4.6
4) cd libstdc++-v3
5) ./configure
And I get the following error:
configure: error: cannot find install-sh or install.sh in ./../..
There is actually an "install-sh" file in the gcc-3.4.6 directory, but that's one directory up the current, not two.
The configure script should look for install-sh in "./.." insted of "./../.." ??
What's wrong??
| 0 | [
2,
25429,
489,
3384,
203,
9,
300,
9,
379,
19,
9940,
255,
300,
800,
3726,
3726,
31,
107,
14,
249,
19,
1202,
293,
45,
137,
6,
619,
3060,
1187,
306,
6903,
8635,
661,
1224,
9,
2429,
7440,
9,
5583,
118,
263,
4215,
118,
263,
3384,
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... |
Cannot find the X.509 Certificate using the following search criteria:
===
I get this message:
Cannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation 'LocalMachine', FindType 'FindBySubjectDistinguishedName', FindValue 'CN=HighBall'.
My web.config setup looks like this;
Authentication is set like...
<authentication mode="Windows" />
The bindings are set for wsHttpBinging
<wsHttpBinding>
<binding name="BindingConfiguration">
<security>
<message clientCredentialType="UserName" />
</security>
</binding>
</wsHttpBinding>
and my Service behavior is set as such...
<behavior name="HighBall.Services.ServiceVerificationBehavior">
<serviceAuthorization principalPermissionMode="UseAspNetRoles"
roleProviderName="HighBallRoleProvider" />
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceCredentials>
<serviceCertificate findValue="CN=HighBall" />
<userNameAuthentication userNamePasswordValidationMode="MembershipProvider"
membershipProviderName="HighBallMembershipProvider" />
</serviceCredentials>
</behavior>
I've tried to figure out a way to verify what, how, and where to certificate is stored but am not sure how to do this. If anyone has any ideas on this error message I'd greatly appreciate the assist.
Thx,
Adron | 0 | [
2,
1967,
477,
14,
993,
9,
264,
2545,
6259,
568,
14,
249,
2122,
9157,
45,
800,
3726,
3726,
31,
164,
48,
2802,
45,
1967,
477,
14,
993,
9,
264,
2545,
6259,
568,
14,
249,
2122,
9157,
45,
1718,
7259,
13,
22,
915,
22,
15,
1718,
1903... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... |
Tool for Viewing X.509 Certificates?
===
Does anyone know of any good tools to view the store name, store location, or values of an X.509 Certificate? | 0 | [
2,
5607,
26,
11244,
993,
9,
264,
2545,
6259,
18,
60,
800,
3726,
3726,
630,
1276,
143,
16,
186,
254,
4672,
20,
1418,
14,
1718,
204,
15,
1718,
1474,
15,
54,
4070,
16,
40,
993,
9,
264,
2545,
6259,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... |
How do I reverse a list using recursion in Python?
===
I want to have a function that will return the reverse of a list that it is given -- using recursion. How can I do that? | 0 | [
2,
184,
107,
31,
7006,
21,
968,
568,
26604,
5991,
19,
20059,
60,
800,
3726,
3726,
31,
259,
20,
57,
21,
1990,
30,
129,
788,
14,
7006,
16,
21,
968,
30,
32,
25,
504,
13,
8,
8,
568,
26604,
5991,
9,
184,
92,
31,
107,
30,
60,
3,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
Question about shallow copy in C++
===
Say I have a struct "s" with an int pointer member variable "i". I allocate memory on the heap for i in the default constructor of s. Later in some other part of the code I pass an instance of s by value to some function. Am I doing a shallow copy here? Assume I didn't implement any copy constructors or assignment operators or anything for s... just the default constructor.
| 0 | [
2,
1301,
88,
7258,
4344,
19,
272,
20512,
800,
3726,
3726,
395,
31,
57,
21,
13,
10346,
13,
7,
18,
7,
29,
40,
19,
38,
454,
106,
322,
7612,
13,
7,
49,
7,
9,
31,
65,
111,
9530,
1912,
27,
14,
15414,
26,
31,
19,
14,
12838,
6960,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.