Id
int64
4
8.51M
PostTypeId
int64
1
7
AcceptedAnswerId
int64
7
75.5M
ParentId
int64
4
41.8M
Score
int64
-208
27.7k
ViewCount
int64
11
12.4M
Body
stringlengths
0
45k
Title
stringlengths
2
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
225
CreationDate
stringdate
2008-07-31 21:42:52
2011-12-14 18:48:47
LastActivityDate
stringdate
2008-08-01 12:19:17
2023-03-05 04:40:26
LastEditDate
stringdate
2008-08-01 13:54:25
2023-03-05 03:12:45
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
-1
21.1M
Tags
listlengths
1
6
24,852
2
null
24,849
194
null
There is the following: ``` setTimeout(function, milliseconds); ``` function which can be passed the time after which the function will be executed. See: [Window setTimeout() Method](https://www.w3schools.com/jsref/met_win_settimeout.asp).
null
CC BY-SA 3.0
null
2008-08-24T05:18:18.467
2017-08-08T18:58:46.620
2017-08-08T18:58:46.620
55,075
2,617
null
24,860
2
null
11,676
0
null
If you're just (re-)starting out in SharePoint development, there's a lot of value in just using WSS 3.0 and not (yet) using MOSS 2007. The basic vocabulary is going to be exactly the same at the development level, and you can accomplish a huge amount without ever feeling like you need MOSS to learn.
null
CC BY-SA 2.5
null
2008-08-24T05:28:13.077
2008-08-24T05:28:13.077
null
null
404
null
24,856
2
null
24,853
53
null
`++i` increments the value, then returns it. `i++` returns the value, and then increments it. It's a subtle difference. For a for loop, use `++i`, as it's slightly faster. `i++` will create an extra copy that just gets thrown away.
null
CC BY-SA 3.0
null
2008-08-24T05:21:21.720
2015-06-26T10:40:58.240
2015-06-26T10:40:58.240
1,480,391
55
null
24,853
1
24,858
null
1,123
1,577,388
In C, what is the difference between using `++i` and `i++`, and which should be used in the incrementation block of a `for` loop?
What is the difference between ++i and i++?
CC BY-SA 4.0
0
2008-08-24T05:19:19.713
2023-01-18T17:46:59.383
2021-03-15T10:32:30.110
107,625
2,128
[ "c", "for-loop", "post-increment", "pre-increment" ]
24,866
1
24,902
null
11
758
I am using Java back end for creating an XML string which is passed to the browser. Currently I am using simple string manipulation to produce this XML. Is it essential that I use some XML library in Java to produce the XML string? I find the libraries very difficult to use compared to what I need.
Is it essential that I use libraries to manipulate XML?
CC BY-SA 2.5
null
2008-08-24T05:48:22.090
2011-03-14T16:32:59.557
2011-03-14T16:32:59.557
505,893
184
[ "java", "xml" ]
24,862
2
null
24,849
14
null
You can also use [window.setInterval()](http://www.devguru.com/Technologies/ecmascript/quickref/win_setinterval.html) to run some code repeatedly at a regular interval.
null
CC BY-SA 2.5
null
2008-08-24T05:29:51.153
2008-08-24T05:29:51.153
null
null
2,662
null
24,867
2
null
24,866
1
null
No - If you can parse it yourself (as you are doing), and it will scale for your needs, you do not need any library. Just ensure that your future needs are going to be met - complex xml creation is better done using libraries - some of which come in very simple flavors too.
null
CC BY-SA 2.5
null
2008-08-24T05:50:46.703
2008-08-24T05:50:46.703
null
null
2,617
null
24,869
2
null
24,866
3
null
I think that custom string manipulation is fine, but you have to keep two things in mind: 1. Your code isn't as mature as the library. Allocate time in your plan to handle the bugs that pop-up. 2. Your approach will probably not scale as well as a 3rd party library when the xml starts to grow (both in terms of perfor...
null
CC BY-SA 2.5
null
2008-08-24T05:54:22.263
2008-08-24T05:54:22.263
null
null
2,150
null
24,871
2
null
24,829
1
null
> Do value types within objects live on the stack or the heap? On the heap. They are part of the allocation of the footprint of the object, just like the pointers to hold references would be. > Is boxing/unboxing value types in an object a concern? There's no boxing here. > Are there any detailed, yet understandabl...
null
CC BY-SA 2.5
null
2008-08-24T05:55:30.937
2008-08-24T05:55:30.937
null
null
1,554
null
24,875
2
null
24,812
13
null
The standard textbook and a great place to start is Russel and Norvig's [Artificial Intelligence: A Modern Approach](https://rads.stackoverflow.com/amzn/click/com/0137903952). You can also get [MIT's Intro AI course](http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-034Spring-2005/CourseHome/) vi...
null
CC BY-SA 2.5
null
2008-08-24T06:03:01.370
2008-08-24T06:03:01.370
null
null
2,363
null
24,874
2
null
24,853
29
null
The reason `++i` be slightly faster than `i++` is that `i++` can require a local copy of the value of i before it gets incremented, while `++i` never does. In some cases, some compilers will optimize it away if possible... but it's not always possible, and not all compilers do this. I try not to rely too much on comp...
null
CC BY-SA 3.0
null
2008-08-24T06:00:53.590
2015-06-26T10:41:58.747
2015-06-26T10:41:58.747
1,480,391
2,638
null
24,872
2
null
24,866
2
null
Yes, use the library. Somebody took the time and effort to create something that is usually better than what you could come up with. String manipulation is for sending back a single node, but once you start needing to manipulate the DOM, or use an XPath query, the library will save you.
null
CC BY-SA 2.5
null
2008-08-24T05:56:11.637
2008-08-24T05:56:11.637
null
null
1,965
null
24,841
2
null
24,408
2
null
WebDAV (basically) takes an existing directory, and shares it over HTTP - which sounds like the opposite of what you want. You need something that speaks SMB/CIFS on one end, and your own code on the other. The easiest way to do that is with a userspace file system. To that end, here's a couple of links: 1. WinFUS...
null
CC BY-SA 2.5
null
2008-08-24T04:31:02.900
2008-08-24T04:31:02.900
null
null
2,199
null
24,858
2
null
24,853
1,373
null
- `++i` will increment the value of `i`, and then return the incremented value.``` i = 1; j = ++i; (i is 2, j is 2) ``` - `i++` will increment the value of `i`, but return the original value that `i` held before being incremented.``` i = 1; j = i++; (i is 2, j is 1) ``` For a `for` loop, either works. `++i` seems...
null
CC BY-SA 4.0
null
2008-08-24T05:23:18.487
2020-02-28T10:40:26.290
2020-02-28T10:40:26.290
8,583,669
116
null
24,876
2
null
24,829
9
null
Value-type values for a class to live together with the object instance in the managed heap. The thread's stack for a method only lives for the duration of a method; how can the value persist if it only exists within that stack? A class' object size in the managed heap is the sum of its value-type fields, reference-t...
null
CC BY-SA 3.0
null
2008-08-24T06:11:55.997
2011-11-10T02:22:30.073
2011-11-10T02:22:30.073
2,663
2,663
null
24,881
1
24,882
null
126
377,343
I'm trying to solve [the 3n+1 problem](http://uva.onlinejudge.org/external/1/100.pdf) and I have a `for` loop that looks like this: ``` for(int i = low; i <= high; ++i) { res = runalg(i); if (res > highestres) { highestres = res; ...
How do I fix "for loop initial declaration used outside C99 mode" GCC error?
CC BY-SA 3.0
0
2008-08-24T06:30:09.760
2019-09-29T13:54:12.940
2013-10-30T19:35:02.323
1,084,554
2,128
[ "c", "gcc", "for-loop" ]
24,829
1
24,876
null
5
3,006
``` public class MyClass { public int Age; public int ID; } public void MyMethod() { MyClass m = new MyClass(); int newID; } ``` To my understanding, the following is true: 1. The reference m lives on the stack and goes out of scope when MyMethod() exits. 2. The value type newID lives on the stack...
How does .net managed memory handle value types inside objects?
CC BY-SA 2.5
0
2008-08-24T03:37:47.490
2014-01-27T20:20:46.070
2008-08-24T15:56:50.943
1,880
1,880
[ ".net", "memory" ]
24,884
2
null
24,881
125
null
There is a compiler switch which enables [C99 mode](http://en.wikipedia.org/wiki/C99), which amongst other things allows declaration of a variable inside the for loop. To turn it on use the compiler switch `-std=c99` Or as @OysterD says, declare the variable outside the loop.
null
CC BY-SA 3.0
null
2008-08-24T06:46:57.647
2013-11-15T09:39:45.767
2013-11-15T09:39:45.767
812,912
1,075
null
24,882
2
null
24,881
159
null
I'd try to declare `i` outside of the loop! Good luck on solving 3n+1 :-) Here's an example: ``` #include <stdio.h> int main() { int i; /* for loop execution */ for (i = 10; i < 20; i++) { printf("i: %d\n", i); } return 0; } ``` Read more on for loops in C [here](https://www.tutorials...
null
CC BY-SA 3.0
null
2008-08-24T06:31:16.480
2017-11-08T07:20:39.920
2017-11-08T07:20:39.920
3,211,932
2,638
null
24,870
2
null
24,816
61
null
If you're escaping for HTML, there are only three that I can think of that would be really necessary: ``` html.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"); ``` Depending on your use case, you might also need to do things like `"` to `&quot;`. If the list got big enough, I'd just use an array:...
null
CC BY-SA 3.0
null
2008-08-24T05:54:49.160
2016-02-08T14:18:19.580
2016-02-08T14:18:19.580
92,701
2,363
null
24,886
1
24,887
null
525
130,335
Is there a performance difference between `i++` and `++i` if the resulting value is not used?
Is there a performance difference between i++ and ++i in C?
CC BY-SA 3.0
0
2008-08-24T06:48:23.243
2023-01-25T03:47:04.607
2023-01-25T03:47:04.607
116
116
[ "c", "performance", "oop", "post-increment", "pre-increment" ]
24,888
2
null
24,881
14
null
I've gotten this error too. ``` for (int i=0;i<10;i++) { .. ``` is not valid in the C89/C90 standard. As OysterD says, you need to do: ``` int i; for (i=0;i<10;i++) { .. ``` Your original code is allowed in C99 and later standards of the C language.
null
CC BY-SA 3.0
null
2008-08-24T06:50:00.430
2013-09-13T01:25:37.490
2013-09-13T01:25:37.490
369
369
null
24,892
2
null
15,015
0
null
I can also recommend WatiN. I've been using it exclusively for my web testing. I've even got it to play nice with VB.Net and HP/Mercury Quality Center(TestDirector).
null
CC BY-SA 2.5
null
2008-08-24T06:51:28.820
2008-08-24T06:51:28.820
null
null
2,665
null
24,894
2
null
24,866
0
null
No - especially for generating (parsing I would be less inclined to as input text can always surprise you). I think its fine - but be prepared to shift to a library should you find yourself spending more then a few minutes maintaining your own code.
null
CC BY-SA 2.5
null
2008-08-24T07:00:29.797
2008-08-24T07:00:29.797
null
null
699
null
24,893
2
null
24,891
10
null
You have to do "memory management" when you want to use memory on the heap rather than the stack. If you don't know how large to make an array until runtime, then you have to use the heap. For example, you might want to store something in a string, but don't know how large its contents will be until the program is run....
null
CC BY-SA 2.5
null
2008-08-24T06:57:26.090
2008-08-24T06:57:26.090
null
null
813
null
24,901
1
24,904
null
407
104,659
We have the question [is there a performance difference between i++ and ++i in C?](/q/24886) What's the answer for C++?
Is there a performance difference between i++ and ++i in C++?
CC BY-SA 3.0
0
2008-08-24T07:14:22.243
2022-10-11T16:24:33.630
2016-09-12T05:41:01.490
116
116
[ "c++", "performance", "oop", "post-increment", "pre-increment" ]
24,891
1
24,922
null
101
50,735
I've always heard that in C you have to really watch how you manage memory. And I'm still beginning to learn C, but thus far, I have not had to do any memory managing related activities at all.. I always imagined having to release variables and do all sorts of ugly things. But this doesn't seem to be the case. Can som...
C Memory Management
CC BY-SA 2.5
0
2008-08-24T06:50:56.497
2021-10-11T07:42:44.630
2008-09-02T01:54:13.190
714
2,128
[ "c", "memory" ]
24,887
2
null
24,886
452
null
Executive summary: No. `i++` could potentially be slower than `++i`, since the old value of `i` might need to be saved for later use, but in practice all modern compilers will optimize this away. We can demonstrate this by looking at the code for this function, both with `++i` and `i++`. ``` $ cat i++.c extern void...
null
CC BY-SA 3.0
null
2008-08-24T06:48:58.827
2015-10-06T19:08:24.777
2015-10-06T19:08:24.777
3,313,438
116
null
24,905
2
null
20,040
1
null
This may be old, but should get your started on the high-level overview of the .NET Framework. [http://news.zdnet.co.uk/software/0,1000000121,2134207,00.htm](http://news.zdnet.co.uk/software/0,1000000121,2134207,00.htm)
null
CC BY-SA 2.5
null
2008-08-24T07:23:49.553
2008-08-24T07:23:49.553
null
null
2,663
null
24,912
2
null
24,891
2
null
Also you might want to use dynamic memory allocation when you need to define a huge array, say int[10000]. You can't just put it in stack because then, hm... you'll get a stack overflow. Another good example would be an implementation of a data structure, say linked list or binary tree. I don't have a sample code to p...
null
CC BY-SA 2.5
null
2008-08-24T07:50:49.473
2008-08-24T07:50:49.473
null
null
1,007
null
24,908
2
null
24,891
21
null
Here's an example. Suppose you have a strdup() function that duplicates a string: ``` char *strdup(char *src) { char * dest; dest = malloc(strlen(src) + 1); if (dest == NULL) abort(); strcpy(dest, src); return dest; } ``` And you call it like this: ``` main() { char *s; s = strd...
null
CC BY-SA 2.5
null
2008-08-24T07:38:05.137
2008-08-24T07:38:05.137
null
null
116
null
24,910
2
null
24,901
72
null
Yes. There is. The ++ operator may or may not be defined as a function. For primitive types (int, double, ...) the operators are built in, so the compiler will probably be able to optimize your code. But in the case of an object that defines the ++ operator things are different. The operator++(int) function must c...
null
CC BY-SA 3.0
null
2008-08-24T07:44:11.017
2013-07-12T10:45:13.637
2013-07-12T10:45:13.637
44,853
456
null
24,904
2
null
24,901
490
null
[Executive Summary: Use `++i` if you don't have a specific reason to use `i++`.] For C++, the answer is a bit more complicated. If `i` is a simple type (not an instance of a C++ class), [then the answer given for C ("No there is no performance difference")](https://stackoverflow.com/a/24887/194894) holds, since the c...
null
CC BY-SA 3.0
null
2008-08-24T07:23:13.033
2018-03-29T20:08:56.390
2018-03-29T20:08:56.390
841,330
116
null
24,916
2
null
22,212
1
null
Which version of Delphi ? I just tried clean D7 application and TAggregateField was added.
null
CC BY-SA 2.5
null
2008-08-24T07:54:56.920
2008-08-24T07:54:56.920
null
null
501
null
24,919
2
null
21,651
7
null
You can find a [JSON parser written in JavaScript here](http://www.JSON.org/js.html) ([source code here](https://github.com/douglascrockford/JSON-js/blob/master/json2.js)). You can also use the as3corelib JSON parser from JavaScript, there's [a description of how to access ActionScript libraries from JavaScript here](h...
null
CC BY-SA 2.5
null
2008-08-24T08:11:29.673
2008-08-24T08:11:29.673
null
null
1,109
null
24,897
2
null
24,866
0
null
I don't think that using the DOM XML API wich comes with the JDK is difficult, it's easy to create Element nodes, attributes, etc... and later is easy convert strings to a DOM document sor DOM documents into a String In the first page google finds from Spain ([spanish XML example](http://soaagenda.com/journal/articulo...
null
CC BY-SA 2.5
null
2008-08-24T07:03:28.510
2008-08-24T07:03:28.510
null
null
518
null
24,920
2
null
10,149
1
null
In general, to define a custom keybinding in Emacs, you'd write ``` (define-key global-map (kbd "C-c C-f") 'function-name) ``` `define-key` is, unsurprisingly, the function to define a new key. `global-map` is the global keymap, as opposed to individual maps for each mode. `(kbd "C-c C-f")` returns a string represen...
null
CC BY-SA 2.5
null
2008-08-24T08:12:16.660
2008-08-24T08:12:16.660
null
null
2,518
null
24,925
2
null
24,915
0
null
I've never used this adapter but myself, so I'm guessing, but maybe it's to do with the account that BizTalk is using to connect or your ports are not configured correctly.
null
CC BY-SA 2.5
null
2008-08-24T08:26:56.407
2008-08-24T08:26:56.407
null
null
2,608
null
24,926
2
null
24,812
2
null
You might find the blog, wiki and forums on [AiGameDev.com](http://aigamedev.com/) useful.
null
CC BY-SA 2.5
null
2008-08-24T08:33:16.283
2008-08-24T08:33:16.283
null
null
616
null
24,902
2
null
24,866
12
null
It's not essential, but advisable. However, if string manipulation works for you, then go for it! There are plenty of cases where small or simple XML text can be safely built by hand. Just be aware that creating XML text is harder than it looks. Here's some criteria I would consider: - The less control you have on ...
null
CC BY-SA 2.5
null
2008-08-24T07:17:49.817
2008-08-24T07:17:49.817
null
null
2,230
null
24,914
2
null
9,033
8
null
I'm pretty sure everyone is familiar with operator overloading, but maybe some aren't. ``` class myClass { private string myClassValue = ""; public myClass(string myString) { myClassValue = myString; } public override string ToString() { return myClassValue; } public ...
null
CC BY-SA 2.5
null
2008-08-24T07:52:19.547
2008-08-24T07:52:19.547
null
null
1,994
null
24,929
1
null
null
498
624,606
What is the difference between the `EXISTS` and `IN` clause in SQL? When should we use `EXISTS`, and when should we use `IN`?
Difference between EXISTS and IN in SQL?
CC BY-SA 3.0
0
2008-08-24T08:42:23.843
2023-02-22T17:04:37.727
2022-02-05T15:58:10.067
74,089
2,528
[ "sql", "exists", "sql-in" ]
24,927
2
null
24,812
6
null
These links might be useful to check out, for a beginning (even if most are mostly game-oriented): [http://www.a-i.com](http://www.a-i.com) [http://www.kynogon.com](http://www.kynogon.com) [http://openai.sourceforge.net](http://openai.sourceforge.net) [http://www.botspot.com](http://www.botspot.com) [http://aigamedev.c...
null
CC BY-SA 2.5
null
2008-08-24T08:36:14.590
2008-08-24T08:36:14.590
null
null
2,452
null
24,930
2
null
24,929
45
null
I'm assuming you know what they do, and thus are used differently, so I'm going to understand your question as: When would it be a good idea to rewrite the SQL to use IN instead of EXISTS, or vice versa. Is that a fair assumption? --- : The reason I'm asking is that in many cases you can rewrite an SQL based on I...
null
CC BY-SA 3.0
null
2008-08-24T08:45:39.717
2016-07-08T13:51:28.713
2016-07-08T13:51:28.713
1,655,398
267
null
24,932
2
null
24,929
152
null
`EXISTS` will tell you whether a query returned any results. e.g.: ``` SELECT * FROM Orders o WHERE EXISTS ( SELECT * FROM Products p WHERE p.ProductNumber = o.ProductNumber) ``` `IN` is used to compare one value to several, and can use literal values, like this: ``` SELECT * FROM Orders WHERE Pro...
null
CC BY-SA 3.0
null
2008-08-24T08:47:45.967
2017-08-19T06:27:09.893
2017-08-19T06:27:09.893
4,519,059
615
null
24,931
1
24,949
null
10
10,469
1. Is it possible to capture Python interpreter's output from a Python script? 2. Is it possible to capture Windows CMD's output from a Python script? If so, which librar(y|ies) should I look into?
How to capture Python interpreter's and/or CMD.EXE's output from a Python script?
CC BY-SA 2.5
0
2008-08-24T08:46:57.293
2016-12-09T17:13:45.070
2008-08-24T10:29:08.517
269
1,670
[ "python", "windows", "cmd" ]
24,922
2
null
24,891
245
null
There are two places where variables can be put in memory. When you create a variable like this: ``` int a; char c; char d[16]; ``` The variables are created in the "". Stack variables are automatically freed when they go out of scope (that is, when the code can't reach them anymore). You might hear them called "auto...
null
CC BY-SA 4.0
null
2008-08-24T08:21:22.927
2021-10-11T07:42:44.630
2021-10-11T07:42:44.630
2,230
2,230
null
24,934
2
null
24,849
39
null
Just to expand a little... You can execute code directly in the `setTimeout` call, but as [@patrick](https://stackoverflow.com/questions/24849/is-there-some-way-to-introduce-a-delay-in-javascript#24850) says, you normally assign a callback function, like this. The time is milliseconds ``` setTimeout(func, 4000); funct...
null
CC BY-SA 3.0
null
2008-08-24T08:53:14.987
2018-01-05T13:25:27.043
2018-01-05T13:25:27.043
92,701
137
null
24,937
2
null
6,607
2
null
As Daniel indicated, storing configuration data in the registry gives you the option to use Admin Templates. That is, you can define an Admin Template, use it in a Group Policy and administer the configuration of your application network-wide. Depending on the nature of the application, this can be a big boon.
null
CC BY-SA 2.5
null
2008-08-24T09:01:31.737
2008-08-24T09:01:31.737
null
null
null
null
24,933
2
null
24,929
5
null
I think, - `EXISTS` is when you need to match the results of query with another subquery. Query#1 results need to be retrieved where SubQuery results match. Kind of a Join.. E.g. select customers table#1 who have placed orders table#2 too- IN is to retrieve if the value of a specific column lies `IN` a list (1,2,3,4,...
null
CC BY-SA 3.0
null
2008-08-24T08:50:31.497
2011-07-26T19:21:45.503
2011-07-26T19:21:45.503
570,191
1,695
null
24,939
2
null
24,931
0
null
In which context are you asking? Are you trying to capture the output from a program you start on the command line? if so, then this is how to execute it: ``` somescript.py | your-capture-program-here ``` and to read the output, just read from standard input. If, on the other hand, you're executing that script or...
null
CC BY-SA 2.5
null
2008-08-24T09:05:20.947
2008-08-24T09:05:20.947
null
null
267
null
24,915
1
217,975
null
2
2,096
My colleagues are attempting to connect BizTalk 2006 R2 via DB2/MVS adapter to a database hosted on z/OS mainframe. When testing the connecting settings, they are getting the following error ``` Could not connect to data source 'New Data Source': The network connection was terminated because the host failed to send an...
BizTalk DB2 adapter connection error
CC BY-SA 2.5
null
2008-08-24T07:53:13.353
2014-12-23T21:22:05.163
2014-12-23T21:22:05.163
2,571,021
2,663
[ "db2", "biztalk", "mainframe", "zos", "biztalk2006r2" ]
24,895
2
null
24,891
-3
null
Sure. If you create an object that exists outside of the scope you use it in. Here is a contrived example (bear in mind my syntax will be off; my C is rusty, but this example will still illustrate the concept): ``` class MyClass { SomeOtherClass *myObject; public MyClass() { //The object is created whe...
null
CC BY-SA 2.5
null
2008-08-24T07:00:35.320
2008-08-24T07:00:35.320
null
null
1,975,282
null
24,942
2
null
24,931
1
null
You want [subprocess](http://docs.python.org/lib/module-subprocess.html). Look specifically at Popen in 17.1.1 and communicate in 17.1.2.
null
CC BY-SA 2.5
null
2008-08-24T09:27:54.140
2008-08-24T09:27:54.140
null
null
429
null
24,941
1
null
null
5
350
I am using [Simpletest](http://www.simpletest.org/) as my unit test framework for the PHP site I am currently working on. I like the fact that it is shipped with a simple HTML reporter, but I would like a bit more advanced reporter. I have read the reporter API documentation, but it would be nice to be able to use an ...
Where can I find extended HTML reporters for Simpletest?
CC BY-SA 4.0
null
2008-08-24T09:10:36.410
2019-06-26T15:41:41.250
2019-06-26T15:41:41.250
1,783,163
276
[ "php", "unit-testing", "user-interface", "simpletest" ]
24,940
2
null
24,812
3
null
I second ["Artificial Intelligence: A modern Approach"](http://aima.cs.berkeley.edu/). It is really good at explaining the items in a basic, understandable manner. It's also a book that is used in [many universities](http://aima.cs.berkeley.edu/adoptions.html) to teach students the basics of artificial intelligence. Ma...
null
CC BY-SA 2.5
null
2008-08-24T09:08:22.860
2008-08-24T09:08:22.860
null
null
46
null
24,943
2
null
15,376
46
null
For me it's Enterprise Architect from Sparx Systems. A very rounded UML tool for a very reasonable price. Very strong feature list including: integrated project management, baselining, export/import (including export to html), documentation generation from the model, various templates (Zachman, TOGAF, etc.), IDE plug...
null
CC BY-SA 2.5
null
2008-08-24T09:28:41.437
2008-08-24T09:28:41.437
null
null
2,608
null
24,938
2
null
20,952
1
null
I think what you're looking for is ConfigurationManager.[OpenMappedExeConfiguration](http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.openmappedexeconfiguration.aspx) It allows you to open a configuration file that you specify with a file path (wrapped inside a [ExeConfigurationFileMap...
null
CC BY-SA 2.5
null
2008-08-24T09:02:25.853
2008-08-24T09:02:25.853
null
null
2,658
null
24,950
2
null
18,803
6
null
UML has worked for me for years. When I started out I read Fowler's [UML Distilled](http://books.google.co.uk/books?id=nHZslSr1gJAC&dq=uml+distilled&pg=PP1&ots=V62_FWLAaB&sig=l2cDHm61Egu4qgUwTXVPYYeeU_g&hl=en&sa=X&oi=book_result&resnum=1&ct=result) where he says "do enough modelling/architecture/etc.". Just use what yo...
null
CC BY-SA 2.5
null
2008-08-24T09:41:45.667
2008-08-24T09:41:45.667
null
null
2,608
null
24,948
2
null
24,929
245
null
The `exists` keyword can be used in that way, but really it's intended as a way to avoid counting: ``` --this statement needs to check the entire table select count(*) from [table] where ... --this statement is true as soon as one match is found exists ( select * from [table] where ... ) ``` This is most useful w...
null
CC BY-SA 3.0
null
2008-08-24T09:37:52.493
2015-08-06T07:21:04.357
2015-08-06T07:21:04.357
905
905
null
24,955
2
null
24,866
7
null
Xml is hard. Parsing yourself is a bad idea, it's even a worse idea to generate content yourself. Have a look at the Xml 1.1 spec. You have to deal with such things as proper encoding, attribute encoding (e.g., produces invalid xml), proper CDATA escaping, UTF encoding, custom DTD entities, and that's without throwin...
null
CC BY-SA 2.5
null
2008-08-24T10:07:37.663
2008-08-24T10:07:37.663
null
null
2,593
null
24,956
2
null
24,954
-1
null
The file type associations are stored in the Windows registry, so you should be able to use the [Microsoft.Win32.Registry class](http://msdn.microsoft.com/en-us/library/microsoft.win32.registry.aspx#Mtps_DropDownFilterText) to read which application is registered for which file format. Here are two articles that might...
null
CC BY-SA 2.5
null
2008-08-24T10:19:58.710
2008-08-24T10:19:58.710
null
null
276
null
24,958
2
null
15,376
18
null
If you're looking to get out the door and working on UML without having to learn a complex new tool I would check out [Violet UML](http://alexdp.free.fr/violetumleditor/page.php). I've used it to some pretty great success in the past.
null
CC BY-SA 2.5
null
2008-08-24T10:27:15.790
2008-08-24T10:27:15.790
null
null
2,594
null
24,954
1
24,974
null
14
10,082
How to determine the applications associated with a particular extension (e.g. .JPG) and then determine where the executable to that application is located so that it can be launched via a call to say System.Diagnostics.Process.Start(...). I already know how to read and write to the registry. It is the layout of the ...
Windows: List and Launch applications associated with an extension
CC BY-SA 2.5
0
2008-08-24T10:05:38.930
2010-11-13T18:49:06.520
2008-08-24T16:33:19.250
2,669
2,669
[ ".net", "windows", "registry" ]
24,918
2
null
24,891
6
null
There are some great answers here about how to allocate and free memory, and in my opinion the more challenging side of using C is ensuring that the only memory you use is memory you've allocated - if this isn't done correctly what you end up with is the cousin of this site - a buffer overflow - and you may be overwrit...
null
CC BY-SA 2.5
null
2008-08-24T07:58:13.387
2008-08-24T07:58:13.387
null
null
1,517
null
24,945
2
null
15,015
2
null
I have used Selenium before and hooked it into [CruiseControl.NET](http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET) and while it has it's quirks worked quite well. Here are some useful links. [http://selenium-ide.openqa.org/](http://selenium-ide.openqa.org/) [http://wiki.openqa.o...
null
CC BY-SA 2.5
null
2008-08-24T09:33:37.963
2008-08-24T09:33:37.963
null
null
2,041
null
24,949
2
null
24,931
10
null
If you are talking about the python interpreter or CMD.exe that is the 'parent' of your script then no, it isn't possible. In every POSIX-like system (now you're running Windows, it seems, and that might have some quirk I don't know about, YMMV) each process has three streams, standard input, standard output and standa...
null
CC BY-SA 2.5
null
2008-08-24T09:39:08.247
2008-08-24T09:39:08.247
2017-05-23T11:45:43.160
-1
2,010
null
24,960
2
null
10,877
5
null
The numbers line up better if you add leading-zeroes to the numbers, by setting [list-style-type](http://www.w3.org/TR/REC-CSS2/generate.html#propdef-list-style-type) to: ``` ol { list-style-type: decimal-leading-zero; } ```
null
CC BY-SA 2.5
null
2008-08-24T10:30:06.393
2008-08-24T10:30:06.393
null
null
2,670
null
24,953
2
null
24,849
243
null
Just to add to what everyone else have said about `setTimeout`: If you want to call a function with a parameter in the future, you need to set up some anonymous function calls. You need to pass the function as an argument for it to be called later. In effect this means without brackets behind the name. The following ...
null
CC BY-SA 3.0
null
2008-08-24T10:01:16.930
2018-01-05T13:25:55.287
2018-01-05T13:25:55.287
92,701
1,585
null
24,962
2
null
22,617
0
null
in python on an integer will print any decimal places. If you have a float that you want to ignore the decimal part, then you can use str(int(floatValue)). Perhaps the following code will demonstrate: ``` >>> str(5) '5' >>> int(8.7) 8 ```
null
CC BY-SA 2.5
null
2008-08-24T10:32:49.317
2008-08-24T10:32:49.317
null
null
188
null
24,959
1
24,982
null
18
10,095
Debugging asp.net websites/web projects in visual studio.net 2005 with Firefox is loads slower than using IE. I've read something somewhere that there is a way of fixing this but i can't for the life of me find it again. Does anyone know what i'm on about and can point me in the right direction please? Cheers John ...
Debugging asp.net with firefox and visual studio.net - very slow compared to IE
CC BY-SA 2.5
0
2008-08-24T10:28:10.373
2010-03-21T03:39:37.207
2009-03-23T09:20:03.197
14,444
2,041
[ "debugging", "firefox", "visual-studio-2005" ]
24,957
2
null
15,376
31
null
As I usually use UML more as a communication tool rather than a modeling tool I sometimes have the need to flex the language a bit, which makes the strict modeling tools quite unwieldy. Also, they tend to have a large overhead for the occasional drawing. This also means I don't give tools that handle round-trip modelin...
null
CC BY-SA 2.5
null
2008-08-24T10:26:49.083
2010-10-03T15:34:24.230
2017-05-23T11:33:26.740
-1
2,010
null
24,909
2
null
24,829
2
null
- > Reference Types(RT) always yield instances that are allocated on the heap. - Ans#2: No. Boxing would occur only when you access a struct via a Object Reference / Interface Pointer. will not box.> RT variables contains the address of the object it refers to. 2 RT var can point to the same object. - Ans#3: Don B...
null
CC BY-SA 2.5
null
2008-08-24T07:43:38.180
2008-08-24T07:43:38.180
null
null
1,695
null
24,964
2
null
24,812
2
null
> Russel and Norvig's Artificial Intelligence: A Modern Approach. Be warned, this book is a bit of a door step. Very detailed and generally very good. I would probably recommend some of the online sites first to get a flavour for the types of algorithms you might need and then selectivly dive into Russel and Norvig t...
null
CC BY-SA 2.5
null
2008-08-24T10:42:11.417
2008-08-24T10:42:11.417
null
null
1,816
null
24,966
2
null
24,959
0
null
Are you serious? One of the main reasons I stick to Firefox is because its so much nicer to develop with.. The live source update is awesome (view source > change code > rebuild > F5 in source)... What is actually "slow".. I mean, the some browsers tend to be slower at rendering, but I dont see how it affects your de...
null
CC BY-SA 2.5
null
2008-08-24T10:48:34.663
2008-08-24T10:48:34.663
null
null
832
null
24,963
1
25,663
null
31
25,331
I am currently learning OLAP & MDX after many years of relational database development. Any tips on getting started in MDX? What are the best books and resources to learn MDX?
How to learn MDX
CC BY-SA 2.5
0
2008-08-24T10:38:17.323
2022-07-21T14:05:33.273
null
null
1,073
[ "ssas", "olap", "mdx" ]
24,969
2
null
24,965
0
null
I am no expert at TDD, by any means, but here is my view: - - - The xUnit testing frameworks are often free to use, so if you are a .Net guy, check out NUnit, and if Java is your thing check out JUnit.
null
CC BY-SA 2.5
null
2008-08-24T10:55:18.640
2008-08-24T10:55:18.640
null
null
276
null
24,981
2
null
24,965
0
null
The above advice is good, and if you want a list of free frameworks you have to look no farther than the [xUnit Frameworks List](http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks) on Wikipedia. Hope this helps :)
null
CC BY-SA 2.5
null
2008-08-24T11:18:12.157
2008-08-24T11:18:12.157
null
null
2,594
null
24,967
2
null
24,965
6
null
From my own experience: 1. Only test your own code, not the underlying framework's code. So if you're using a generic list then there's no need to test Add, Remove etc. 2. There is no 2. Look over there! Monkeys!!! 3. NUnit is the way to go. 4. You definitely can't test every outcome. I test for what I expect to happ...
null
CC BY-SA 2.5
null
2008-08-24T10:49:10.543
2008-08-24T10:49:10.543
null
null
615
null
24,971
2
null
24,812
2
null
Two references of interest should be - - I second the reference to the AI forum at gamedev.net. particularly because some of the key posters on that forum work in the industry (including the writer of AiGameDev.com), or use AI & related techniques like planning and optimisation in practical domains.
null
CC BY-SA 2.5
null
2008-08-24T10:55:25.550
2008-08-24T10:55:25.550
null
null
2,246
null
24,983
2
null
24,959
13
null
"Alternative solution". Do the following in Firefox 1. about:config in the address bar 2. set network.dns.disableIPv6 to true.
null
CC BY-SA 2.5
null
2008-08-24T11:34:57.017
2008-08-24T11:34:57.017
null
null
446
null
24,982
2
null
24,959
30
null
bingo. found the [article](http://dotnetslackers.com/ASP_NET/re-122146_Speeding_Up_FireFox_When_Using_the_ASP_NET_Development_Server_from_Localhost.aspx) i read before. i just changed my network.dns.ipv4OnlyDomains property in about:config to localhost. restarted firefox and now firefox performs the same as IE when d...
null
CC BY-SA 2.5
null
2008-08-24T11:32:03.233
2008-08-24T11:32:03.233
null
null
2,041
null
24,986
1
24,987
null
1
2,792
I've got a project using Maven 2 as the build tool. Now I am using Netbeans 6 as my IDE and really want to be able to use the profiler. Is there any way I can get this to work?
How do I profile a Maven Application in Netbeans?
CC BY-SA 3.0
null
2008-08-24T11:50:08.057
2016-12-20T05:23:34.860
2016-12-20T05:23:34.860
1,380,867
2,455
[ "maven-2", "netbeans", "profiling", "profiler" ]
24,974
2
null
24,954
7
null
Sample code: ``` using System; using Microsoft.Win32; namespace GetAssociatedApp { class Program { static void Main(string[] args) { const string extPathTemplate = @"HKEY_CLASSES_ROOT\{0}"; const string cmdPathTemplate = @"HKEY_CLASSES_ROOT\{0}\shell\open\command"; ...
null
CC BY-SA 2.5
null
2008-08-24T11:01:18.470
2008-08-24T11:01:18.470
null
null
1,196
null
24,987
2
null
24,986
1
null
I thought this might be more complicated. It wasn't. To use the Netbeans profiler with your Maven 2 project you simply need to add a single pair of parameters when running your java app. Call up the project's Properties dialogue, select the "Run" tab and add something like the following to the jvm args: ``` -agentpath...
null
CC BY-SA 2.5
null
2008-08-24T11:51:09.613
2008-08-24T11:51:09.613
null
null
2,455
null
24,978
2
null
24,965
2
null
My take on this is following: - - - [TestNG](http://testng.org)-
null
CC BY-SA 2.5
null
2008-08-24T11:17:45.247
2008-08-24T11:17:45.247
null
null
2,586
null
24,993
1
25,075
null
6
10,647
I have a WCF Web Service which is referenced from a class library. After the project is run, when creating the service client object from inside a class library, I receive an InvalidOperationException with message: > Could not find default endpoint element that references contract 'MyServiceReference.IMyService' in ...
InvalidOperationException while creating wcf web service instance
CC BY-SA 3.0
0
2008-08-24T12:11:01.360
2012-06-25T19:12:57.633
2012-06-25T19:12:57.633
426,671
31,505
[ ".net", "wcf", "web-services" ]
24,965
1
25,203
null
43
21,138
OK, I know there have already been questions about [getting started with TDD](https://stackoverflow.com/questions/4303/why-should-i-practice-test-driven-development-and-how-should-i-start).. However, I guess I kind of know the general concensus is to , However, I seem to have the following problems getting my head int...
Beginning TDD - Challenges? Solutions? Recommendations?
CC BY-SA 2.5
0
2008-08-24T10:43:17.500
2011-08-27T20:33:46.497
2017-05-23T12:34:45.273
-1
832
[ "unit-testing", "language-agnostic", "tdd" ]
24,991
1
25,877
null
32
28,008
I have defined a Java function: ``` static <T> List<T> createEmptyList() { return new ArrayList<T>(); } ``` One way to call it is like so: ``` List<Integer> myList = createEmptyList(); // Compiles ``` Why can't I call it by explicitly passing the generic type argument? : ``` Object myObject = createEmtpyList...
Why can't I explicitly pass the type argument to a generic Java method?
CC BY-SA 3.0
0
2008-08-24T12:03:28.367
2013-07-05T08:58:30.840
2013-07-05T08:58:30.840
1,584,286
755
[ "java", "generics", "syntax" ]
24,989
2
null
24,941
1
null
For SimpleTest I can't say I've ever found any "better" test reporters, so you may have to just buckle down and hack together some quick HTML/PHP for what you need. As for PHPUnit, there's [PHPUnit2_HTML_Runner](http://www.defusion.org.uk/code/phpunit2-html-runner/), but it is far from ideal. However, if you're willi...
null
CC BY-SA 2.5
null
2008-08-24T11:57:09.427
2008-08-24T11:57:09.427
null
null
2,594
null
24,998
2
null
24,995
7
null
C++ doesn't have an ecosystem in the sense of Java or .NET. There's no virtual machine, no runtime environment even, there's only a highly specialized standard library that by design doesn't operate well in a purely functional environment. C++ doesn't even have an [ABI](http://en.wikipedia.org/wiki/Application_binary_i...
null
CC BY-SA 2.5
null
2008-08-24T12:24:32.013
2008-08-24T12:24:32.013
null
null
1,968
null
25,000
2
null
24,995
8
null
Ah, something else. Although this certainly isn't what you meant, [template metaprogramming](http://en.wikipedia.org/wiki/Template_metaprogramming) in C++ is purely functional.
null
CC BY-SA 2.5
null
2008-08-24T12:26:13.197
2008-08-24T12:26:13.197
null
null
1,968
null
24,995
1
null
null
12
3,441
Java has [Scala](http://www.scala-lang.org/) and .NET has [F#](http://research.microsoft.com/fsharp/). Both of these languages are very highly integrated into the respective Java and .NET platforms. Classes can be written in Scala then extended in Java for example. Does there exist an equivalent functional language ...
Is there a functional language for C++ ecosystem?
CC BY-SA 2.5
0
2008-08-24T12:14:14.067
2019-01-10T01:37:35.943
2008-08-31T00:37:56.557
305
755
[ "c++", "functional-programming" ]
24,990
2
null
9,455
1
null
Having never used xinc myself, I can only hint as to how I usually get to chrooting apps. First step would be to gather information on everything the app needs to run; this I usually accomplish by running [systrace(1)](http://www.openbsd.org/cgi-bin/man.cgi?query=systrace&sektion=1) and [ldd(1)](http://www.openbsd.org...
null
CC BY-SA 2.5
null
2008-08-24T11:57:21.160
2008-08-24T11:57:21.160
null
null
2,010
null
24,999
2
null
24,995
3
null
Since Scala compiles into Java bytecode and F# compiles into .NET bytecode, made to run on their respective virtual machines. The correct comparison would be if there is some functional language that compile to machine dependant code, ready to run on a computer, and yes, there are. I don't think that was what you mean...
null
CC BY-SA 2.5
null
2008-08-24T12:25:52.993
2008-08-24T12:25:52.993
null
null
2,010
null
24,997
2
null
24,991
26
null
You can, if you pass in the type as a method parameter. ``` static <T> List<T> createEmptyList( Class<T> type ) { return new ArrayList<T>(); } @Test public void createStringList() { List<String> stringList = createEmptyList( String.class ); } ``` Methods cannot be genericised in the same way that a type can, so...
null
CC BY-SA 2.5
null
2008-08-24T12:21:39.183
2008-08-24T13:34:25.887
2008-08-24T13:34:25.887
1,820
1,820
null
25,003
2
null
23,277
13
null
One thing I hadn't seen really emphasized here is that modern functional languages such as Haskell really more on first class functions for flow control than explicit recursion. You don't need to define factorial recursively in Haskell, as was done above. I think something like ``` fac n = foldr (*) 1 [1..n] ``` ...
null
CC BY-SA 2.5
null
2008-08-24T12:28:00.960
2008-08-24T12:28:00.960
null
null
634
null
25,004
2
null
24,993
0
null
It would probably help if you posted your app.config file, since this kind of error tends to point to a problem in the `<endpoint>` block. Make sure the contract attribute seems right to you. Edit: Try fully qualifying your contract value; use the full namespace. I think that is needed.
null
CC BY-SA 2.5
null
2008-08-24T12:29:30.863
2008-08-24T12:38:34.040
2008-08-24T12:38:34.040
2,258
2,258
null
25,002
2
null
23,190
2
null
This could have applications. Lets say you implemented a 2D Conway's Game of Life (which defines a 2D plane, 1 for 'alive', 0 for 'dead') and you stored the Games history for every iteration (which then defines a 3D cube). If you wanted to know how many bacteria there was alive over history, you would use the above alg...
null
CC BY-SA 2.5
null
2008-08-24T12:27:40.617
2008-08-24T12:52:03.040
2008-08-24T12:52:03.040
199
199
null
25,010
2
null
24,991
0
null
@pauldoo Yes, you are quite right. It is one of the weaknesses with the java generics imho. I response to Cheekysoft I'd like to propose to also look at how it is done by the Java people themselves, such as T[] [AbstractCollection#toArray](http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html)(T[] ...
null
CC BY-SA 2.5
null
2008-08-24T12:37:16.617
2008-08-24T13:02:51.267
2008-08-24T13:02:51.283
2,010
2,010
null