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
23,184
2
null
23,166
4
null
I found [The Little Schemer](https://rads.stackoverflow.com/amzn/click/com/0262560992) a great, great introduction to functional programming. It's entirely based on simple, bite sized examples which are built up upon as the book goes on.
null
CC BY-SA 2.5
null
2008-08-22T18:54:53.683
2008-08-22T18:54:53.683
null
null
156
null
23,187
2
null
23,176
2
null
[Aptana](http://www.aptana.com/) is supposedly a decent IDE for Javascript development. I myself just use Eclipse and a decent javascript framework like [jQuery](http://jquery.com/) that has an easy syntax.
null
CC BY-SA 2.5
null
2008-08-22T18:55:21.407
2008-08-22T18:55:21.407
null
null
204
null
23,185
2
null
23,166
2
null
Haskell is a very good functional programming language for beginners. Someone had asked about good resources for Haskell, so I will point you [there](https://stackoverflow.com/questions/16918/beginners-guide-to-haskell#16951). If you are looking for a good book on Functional Programming, I would recommend "Functional ...
null
CC BY-SA 2.5
null
2008-08-22T18:55:08.927
2008-08-22T18:55:08.927
2017-05-23T10:30:55.627
-1
1,311
null
23,192
2
null
23,176
0
null
[Sajax](http://www.modernmethod.com/sajax/) is another good toolkit with PHP support. Mostly though I prefer to use a Javascript framework like [Jquery](http://jquery.com/) or [Prototype](http://www.prototypejs.org/)
null
CC BY-SA 2.5
null
2008-08-22T18:56:54.723
2008-08-22T18:56:54.723
null
null
305
null
23,178
1
23,194
null
1
1,282
Is there a .NET variable that returns the "All Users" directory?
"All Users" Folder
CC BY-SA 3.0
null
2008-08-22T18:52:14.690
2015-03-29T13:38:51.563
2012-08-11T16:14:27.213
1,477,076
1,632
[ ".net", "io" ]
23,143
2
null
22,211
1
null
Once you find some good guide, here's something to remember: Django is a bit special with its terminology. It uses "MTV" for Model, Template and View (and can mention also a URL Dispatcher somewhere along the way), whereas a more standard set of terms is "MVC" for Model, View and Controller. Model is the same in both...
null
CC BY-SA 2.5
null
2008-08-22T18:37:17.470
2008-08-22T18:37:17.470
null
null
2,238
null
23,188
2
null
23,166
1
null
If you have experience with .NET, [Expert #F](http://www.apress.com/book/view/9781590598504) is good. F# is derived from OCaml. Lisp is more pure as functional languages go.
null
CC BY-SA 2.5
null
2008-08-22T18:55:31.653
2008-08-22T18:55:31.653
null
null
580
null
23,158
2
null
2,658
0
null
From personal experience, svn would be my recommendation. You can even use a service like [Beanstalk](http://beanstalkapp.com/) that offers free accounts (with limits obviously, but sufficient for any smallish project) to test the waters. But as others have said, git is superior and is likely worth looking into.
null
CC BY-SA 2.5
null
2008-08-22T18:42:50.937
2008-08-22T18:42:50.937
null
null
2,272
null
23,168
2
null
23,031
1
null
A good key to remember is > "Test early, test often and test again, when you think you are done"
null
CC BY-SA 2.5
null
2008-08-22T18:46:55.387
2008-08-22T18:46:55.387
null
null
1,311
null
23,177
2
null
23,176
2
null
If you want an IDE, try [Aptana Studio](http://www.aptana.com/). It supports HTML, CSS, JavaScript, PHP, XML, Ruby, Ruby on Rails, and more....
null
CC BY-SA 2.5
null
2008-08-22T18:51:50.680
2008-08-22T18:51:50.680
null
null
572
null
23,190
1
25,002
null
4
1,251
I am working on a function to establish the entropy of a distribution. It uses a copula, if any are familiar with that. I need to sum up the values in the array based on which dimensions are "cared about." Example: Consider the following example... I need to do this with an array of 'n' dimensions, which could feas...
How Does One Sum Dimensions of an Array Specified at Run-Time?
CC BY-SA 3.0
null
2008-08-22T18:56:04.850
2013-07-23T14:41:49.443
2020-06-20T09:12:55.060
-1
522
[ "c++", "c", "arrays", "microsoft-dynamics" ]
23,196
2
null
23,190
0
null
Actually, by colllapsing the colums you already summed them, so the dimension doesn't matter at all for your example. Did I miss something or did you?
null
CC BY-SA 2.5
null
2008-08-22T18:58:07.967
2008-08-22T18:58:07.967
null
null
1,968
null
23,193
2
null
23,166
17
null
SICP is a great book. This is probably my bias, but I thought ocaml was pretty easy to get into. You have the option of programming in a few different styles until you're completely comfortable. I [posted a bunch of links](https://stackoverflow.com/questions/22873/language-referencestutorials-for-popular-languages#22...
null
CC BY-SA 3.0
null
2008-08-22T18:56:54.897
2011-12-05T20:50:49.573
2017-05-23T12:34:51.097
-1
157
null
23,201
2
null
23,031
0
null
We don't do TDD here (though some have advocated it), but our rule is that you're supposed to check your unit tests in with your changes. It doesn't always happen, but it's easy to go back and look at a specific changeset and see whether or not tests were written.
null
CC BY-SA 2.5
null
2008-08-22T19:00:10.020
2008-08-22T19:00:10.020
null
null
517
null
23,194
2
null
23,178
7
null
You'll want to use the `system.environment` variables. Most of the predefined ones are [shown here](http://msdn.microsoft.com/en-us/library/system.environment.getenvironmentvariable.aspx). For the "" you would use: ``` System.Environment.GetEnvironmentVariable("ALLUSERSPROFILE") ``` I know I got a lot of upmods a...
null
CC BY-SA 3.0
null
2008-08-22T18:57:25.753
2015-03-29T13:38:51.563
2015-03-29T13:38:51.563
3,187,989
1,862
null
23,198
2
null
23,166
0
null
I have heard good things about [Haskell Functional Programming](https://rads.stackoverflow.com/amzn/click/com/0201342758), but I also found this [list](http://www.amazon.com/LISP-Functional-Programming-Books/lm/36GEU8N3B2JPW) of functional programming books at amazon that might be helpful to you.
null
CC BY-SA 2.5
null
2008-08-22T18:58:47.903
2008-08-22T18:58:47.903
null
null
2,328
null
23,203
2
null
23,166
5
null
I really like Thompson’s “Haskell: The Craft of Functional Programming” because it’s well written and Haskell allows an easier start than other functional languages while being completely pure (unlike Lisp or Scheme).
null
CC BY-SA 2.5
null
2008-08-22T19:00:50.720
2008-08-22T19:00:50.720
null
null
1,968
null
23,202
2
null
23,178
1
null
Or, ``` Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) ``` You can then pass this result to System.IO.Directory.GetParent() to get the root "All Users" folder.
null
CC BY-SA 2.5
null
2008-08-22T19:00:15.777
2008-08-22T19:00:15.777
null
null
1,875
null
23,199
2
null
23,124
1
null
[YUI Connection Manager](http://developer.yahoo.com/yui/connection/) allows you to introduce slowdown in your Javascript to test AJAX against latency.
null
CC BY-SA 2.5
null
2008-08-22T18:59:28.523
2008-08-22T18:59:28.523
null
null
204
null
23,206
2
null
23,102
29
null
[OWASP](http://www.owasp.org/index.php/Main_Page) keeps a list of the [Top 10](http://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project) web attacks to watch our for, in addition to a ton of other useful security information for web development.
null
CC BY-SA 2.5
null
2008-08-22T19:03:40.027
2008-08-22T19:03:40.027
null
null
204
null
23,210
2
null
23,190
0
null
I think the best thing to do here would be one/both of two things: 1. Rethink the design, if its too complex, find a less-complex way. 2. Stop trying to visualise it.. :P Just store the dimensions in question that you need to sum, then do them one at a time. Once you have the base code, then look at improving the eff...
null
CC BY-SA 2.5
null
2008-08-22T19:04:34.940
2008-08-22T19:04:34.940
null
null
832
null
23,197
1
null
null
7
12,501
I have a library that reads/writes to a USB-device using CreateFile() API. The device happens to implement the HID-device profile, such that it's compatible with Microsoft's HID class driver. Some other application installed on the system is opening the device in read/write mode with no share mode. Which prevents my l...
Find out which process has an exclusive lock on a USB device handle
CC BY-SA 2.5
0
2008-08-22T18:58:28.573
2009-04-09T18:48:39.570
2008-08-22T19:14:40.063
1,219
2,146
[ "c++", "winapi", "usb", "hid", "device" ]
23,205
1
null
null
2
131
Besides "no connection", what other failure modes should I test for? How do I simulate a high-latency link, an unreliable link, or all the other sorts of crazy stuff that will undoubtedly happen "in the wild"? How about wireless applications? How do I test the performance in a less-than-ideal WL environment?
Boundary Tests For a Networked App
CC BY-SA 3.0
null
2008-08-22T19:02:09.297
2017-08-04T14:12:40.643
2017-08-04T14:12:40.643
1,836,618
1,490
[ "testing", "networking", "wireless" ]
23,208
2
null
19,173
10
null
Downside? It's fairly limited - you trigger a "GET" request and get back some script that's executed. You don't get error handling if your server throws an error, so you need to wrap all errors in JSON as well. You can't really cancel or retry the request. You're at the mercy of the various browser author opinions of "...
null
CC BY-SA 2.5
null
2008-08-22T19:03:51.183
2008-08-22T19:03:51.183
null
null
811
null
23,213
2
null
23,175
1
null
All you'll ever need to know (and then some): [http://msdn.microsoft.com/en-us/library/ee817645.aspx](http://msdn.microsoft.com/en-us/library/ee817645.aspx) Oh, and GC.Collect() forces a collect.
null
CC BY-SA 2.5
null
2008-08-22T19:09:13.417
2010-01-21T12:02:24.660
2010-01-21T12:02:24.660
55,408
414
null
23,212
2
null
23,209
4
null
These are standard library references. Make sure that all libraries (including the standard library) are using the linkage. E.g. you can't link statically while linking the standard lib dynamically. The same goes for the threading model used. Take special care that you and the 3rd party library use the same linkage op...
null
CC BY-SA 2.5
null
2008-08-22T19:06:53.623
2008-08-22T19:06:53.623
null
null
1,968
null
23,207
2
null
22,976
8
null
Javascript doesn't really have namespace or packages like other languages. Instead it has closures. If you have an application that consists of multiple functions, variables and objects, then you should put them inside a single global object. This will have the same effect as a namespace. For example: ``` var namesp...
null
CC BY-SA 3.0
null
2008-08-22T19:03:43.320
2017-04-21T10:19:05.777
2017-04-21T10:19:05.777
3,641,067
1,585
null
23,216
1
23,229
null
8
4,096
I can never remember the differences in regular expression syntax used by tools like [grep](http://en.wikipedia.org/wiki/Grep) and [AWK](http://en.wikipedia.org/wiki/AWK), or languages like Python and PHP. Generally, Perl has the most expansive syntax, but I'm often hamstrung by the limitations of even `egrep` ("extend...
Summary of differences in regular expression syntax for various tools and languages?
CC BY-SA 3.0
null
2008-08-22T19:10:51.150
2012-07-10T14:53:29.620
2012-07-10T14:53:29.620
63,550
726
[ "regex", "grep" ]
23,209
1
26,180
null
1
9,864
I'm building an application against some legacy, third party libraries, and having problems with the linking stage. I'm trying to compile with Visual Studio 9. My compile command is: ``` cl -DNT40 -DPOMDLL -DCRTAPI1=_cdecl -DCRTAPI2=cdecl -D_WIN32 -DWIN32 -DWIN32_LEAN_AND_MEAN -DWNT -DBYPASS_FLEX -D_INTEL=1 -DIPLIB=...
C++ linker unresolved external symbols
CC BY-SA 3.0
null
2008-08-22T19:03:52.507
2017-11-07T17:02:02.300
2017-11-07T17:02:02.300
6,761,181
1,322
[ "c++" ]
23,223
2
null
23,216
5
null
I find this site helpful: [http://www.regular-expressions.info/](http://www.regular-expressions.info/) Other than that, I use the corresponding documentation extensively and I believe, all said and done, there's no way around that.
null
CC BY-SA 2.5
null
2008-08-22T19:13:06.900
2008-08-22T19:13:06.900
null
null
1,968
null
23,220
2
null
23,016
4
null
Try and break your own site before someone else does. Your web site is basically a publicly accessible API that allows access to a database and other backend systems. Test the URLs as if they were any other API. I like to start by cataloging all URLs that have some sort of permenant affect on the state of the system -...
null
CC BY-SA 2.5
null
2008-08-22T19:11:46.203
2008-08-22T19:11:46.203
null
null
1,486
null
23,224
2
null
23,178
1
null
Is this any use? Oops: [http://msdn.microsoft.com/en-us/library/bb774096(VS.85).aspx](http://msdn.microsoft.com/en-us/library/bb774096(VS.85).aspx)
null
CC BY-SA 2.5
null
2008-08-22T19:13:09.210
2008-08-22T20:03:48.167
2008-08-22T20:03:48.167
2,548
2,548
null
23,217
1
23,222
null
18
1,798
I've been making a concerted effort to improve my javascript skills lately by reading as much javascript code as I can. In doing this I've sometimes seen the `javascript:` prefix appended to the front of event handler attributes in HTML element tags. What's the purpose of this prefix? Basically, is there any appreciabl...
What's the purpose (if any) of "javascript:" in event handler tags?
CC BY-SA 3.0
0
2008-08-22T19:10:56.250
2016-02-10T16:28:11.743
2011-12-09T17:17:52.443
146,792
1,680
[ "javascript" ]
23,225
2
null
23,190
0
null
I beg to differ, there is ALWAYS another way.. And if you really refactor, then you need to break the problem down into smaller parts.. Like I said, establish which dimensions you need to sum, then hit them one at a time.. Also, stop changing the edits, they are correcting your spelling errors, they are trying to he...
null
CC BY-SA 2.5
null
2008-08-22T19:13:10.347
2008-08-22T19:13:10.347
null
null
832
null
23,226
2
null
23,190
0
null
When you say you don't know how many dimensions there are, how exactly are you defining the data structures? At some point, someone needs to create this array, and to do that, they need to know the dimensions of the array. You can force the creator to pass in this data along with the array. Unless the question is to ...
null
CC BY-SA 3.0
null
2008-08-22T19:13:50.860
2012-07-03T15:02:20.720
2012-07-03T15:02:20.720
142,162
1,799
null
23,222
2
null
23,217
19
null
Probably nothing in your example. My understanding is that `javascript:` is for anchor tags (in place of an actual `href`). You'd use it so that your script can execute when the user clicks the link, but without initiating a navigation back to the page (which a blank `href` coupled with an `onclick` will do). For exam...
null
CC BY-SA 3.0
null
2008-08-22T19:12:17.213
2016-02-10T16:23:32.163
2016-02-10T16:23:32.163
92,701
1,975,282
null
23,219
2
null
23,197
1
null
This is what I use to read from a Magtek card reader: ``` //Open file on the device deviceHandle = CreateFile (deviceDetail->DevicePath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); ``` Try those options and see if you can at least read from the device. I understan...
null
CC BY-SA 2.5
null
2008-08-22T19:11:44.750
2008-08-22T19:47:56.223
2008-08-22T19:47:56.223
1,219
1,219
null
23,234
2
null
23,228
5
null
I think it's because it's a creator method (not sure if there's a better name). All it does is take what you give it and return a single string object. It doesn't operate on an existing object. If it was non-static, you would need a string to begin with.
null
CC BY-SA 2.5
null
2008-08-22T19:17:18.920
2008-08-22T19:17:18.920
null
null
572
null
23,229
2
null
23,216
7
null
[Mastering Regular Expressions](https://rads.stackoverflow.com/amzn/click/com/0596528124), devotes the last four chapters to Java, PHP, Perl, and [.NET](http://en.wikipedia.org/wiki/.NET_Framework). One chapter for each. From what I know, the [pocket edition](https://rads.stackoverflow.com/amzn/click/com/0596514271) c...
null
CC BY-SA 3.0
null
2008-08-22T19:15:44.633
2012-07-03T10:47:42.243
2012-07-03T10:47:42.243
63,550
1,862
null
23,236
2
null
23,228
3
null
Because the Format method has nothing to do with a string's current value. The value of the string isn't used. It takes a string and returns one.
null
CC BY-SA 2.5
null
2008-08-22T19:17:26.530
2008-08-22T19:17:26.530
null
null
1,627
null
23,228
1
24,143
null
40
5,658
Compare ``` String.Format("Hello {0}", "World"); ``` with ``` "Hello {0}".Format("World"); ``` Why did the .Net designers choose a static method over an instance method? What do you think?
Why is String.Format static?
CC BY-SA 2.5
0
2008-08-22T19:15:08.533
2015-04-08T03:15:52.487
2008-08-23T04:21:57.907
234
2,361
[ ".net", "string" ]
23,227
2
null
23,124
2
null
First off, I think you need to be clearer in your question - what technology are you using and where is this process that is timing out - server-side or client-side? If you want to have the server-side code take a long time and you are using .NET, place this line in the method you call server-side: ``` System.Threadi...
null
CC BY-SA 2.5
null
2008-08-22T19:14:36.600
2008-08-22T19:14:36.600
null
null
1,790
null
23,232
2
null
23,216
11
null
For my own future reference, I'll offer the [Regexp Syntax Summary](http://www.greenend.org.uk/rjk/2002/06/regexp.html) page which contrasts the syntax for `grep`, `egrep`, Emacs, Perl, Python, and Tcl. As expected, Perl supports the greatest variety of operators, but Python looks equally capable, if not more so.
null
CC BY-SA 2.5
null
2008-08-22T19:16:14.117
2008-08-22T19:16:14.117
null
null
726
null
23,240
2
null
23,228
1
null
I see nothing wrong with it being static.. The semantics of the static method seem to make a lot more sense to me. Perhaps it is because it is a primitive. Where primitives are used to often, you want to make the utility code for working with them as light as possible.. Also, I think the semantics are a lot better wit...
null
CC BY-SA 2.5
null
2008-08-22T19:19:10.443
2008-08-22T19:19:10.443
null
null
832
null
23,237
2
null
23,217
1
null
I am no authority in JavaScript, and perhaps more of a dunce than the asker, but AFAIK, the difference is that the `javascript:` prefix is preferred/required in URI-contexts, where the argument may be as well a traditional HTTP URL as a JavaScript trigger. So, my intuitive answer would be that, since `onChange` expect...
null
CC BY-SA 3.0
null
2008-08-22T19:17:53.583
2016-02-10T16:28:11.743
2016-02-10T16:28:11.743
92,701
2,238
null
23,243
2
null
23,228
2
null
Instance methods are good when you have an object that maintains some state; the process of formatting a string does not affect the string you are operating on (read: does not modify its state), it creates a new string. With extension methods, you can now have your cake and eat it too (i.e. you can use the latter synt...
null
CC BY-SA 2.5
null
2008-08-22T19:19:32.330
2008-08-22T19:19:32.330
null
null
1,790
null
23,239
2
null
23,217
0
null
I don't know if the `javascript:` prefix means anything within the `onevent` attributes but I know they are annoying in anchor tags when trying to open the link in a new tab. The `href` should be used as a fall back and to attach javascript to links.
null
CC BY-SA 3.0
null
2008-08-22T19:18:22.240
2016-02-10T16:26:48.443
2016-02-10T16:26:48.443
92,701
2,118
null
23,248
2
null
23,228
1
null
I haven't tried it yet but you could make an extension method for what you want. I wouldn't do it, but I think it would work. Also I find `String.Format()` more in line with other patterned static methods like `Int32.Parse()`, `long.TryParse()`, etc. You cloud also just use a `StringBuilder` if you want a non static...
null
CC BY-SA 2.5
null
2008-08-22T19:21:06.803
2008-08-24T21:03:28.040
2008-08-24T21:03:28.040
234
1,327
null
23,242
2
null
23,217
5
null
> It should only be used in the href tag. That's ridiculous. The accepted way is this: ``` <a href="/non-js-version/" onclick="someFunction(); return false">Blah</a> ``` But to answer the OP, there is generally no reason to use `javascript:` anymore. In fact, you should attach the javascript event from your script...
null
CC BY-SA 3.0
null
2008-08-22T19:19:31.800
2016-02-10T16:26:15.553
2016-02-10T16:26:15.553
92,701
1,951
null
23,250
1
23,502
null
248
221,627
I was curious about how other people use the keyword. I tend to use it in constructors, but I may also use it throughout the class in other methods. Some examples: In a constructor: ``` public Light(Vector v) { this.dir = new Vector(v); } ``` Elsewhere ``` public void SomeMethod() { Vector vec = new Vecto...
When do you use the "this" keyword?
CC BY-SA 3.0
0
2008-08-22T19:21:25.227
2018-10-12T05:12:46.400
2018-10-12T05:12:46.400
5,395,773
2,016
[ "c#", "coding-style", "this" ]
23,244
2
null
23,217
13
null
It should not be used in event handlers (though most browsers work defensively, and will not punish you). I would also argue that it should not be used in the href attribute of an anchor. If a browser supports javascript, it will use the properly defined event handler. If a browser does not, a javascript: link will ...
null
CC BY-SA 2.5
null
2008-08-22T19:20:02.500
2008-08-22T19:48:06.443
2008-08-22T19:48:06.443
96
96
null
23,258
2
null
23,250
5
null
I use it anywhere there might be ambiguity (obviously). Not just compiler ambiguity (it would be required in that case), but also ambiguity for someone looking at the code.
null
CC BY-SA 2.5
null
2008-08-22T19:23:02.120
2008-08-22T19:23:02.120
null
null
1,975,282
null
23,246
2
null
23,197
0
null
Cool - I'll try those options, as they're probably better defaults given my intentions. Unfortunately, I know my device is there and I'll eventually need read/write access later on (once I inspect the descriptors and have verifed it is infact my device). Which means that my real goal IS to know what's using it, so I ca...
null
CC BY-SA 2.5
null
2008-08-22T19:20:33.140
2008-08-22T20:06:51.640
2020-06-20T09:12:55.060
-1
2,146
null
23,256
2
null
23,228
50
null
> Because the Format method has nothing to do with a string's current value. That's true for string methods because .NET strings are immutable. > If it was non-static, you would need a string to begin with. It does: the format string. I believe this is just another example of the many design flaws in the .NET plat...
null
CC BY-SA 2.5
null
2008-08-22T19:22:33.320
2008-08-22T19:22:33.320
null
null
1,968
null
23,257
2
null
23,250
38
null
I use it every time I refer to an instance variable, even if I don't need to. I think it makes the code more clear.
null
CC BY-SA 2.5
null
2008-08-22T19:22:48.623
2008-08-22T19:22:48.623
null
null
572
null
23,241
2
null
5,727
5
null
I think that what makes pointers tricky to learn is that until pointers you're comfortable with the idea that "at this memory location is a set of bits that represent an int, a double, a character, whatever". When you first see a pointer, you don't really get what's at that memory location. "What do you mean, it hold...
null
CC BY-SA 2.5
null
2008-08-22T19:19:11.050
2008-08-22T19:19:11.050
null
null
1,179
null
23,259
2
null
23,250
1
null
I tend to underscore fields with _ so don't really ever need to use this. Also R# tends to refactor them away anyway...
null
CC BY-SA 2.5
null
2008-08-22T19:23:16.847
2008-08-22T19:23:16.847
null
null
1,075
null
23,260
2
null
23,250
3
null
You should always use it, I use it to diferantiate private fields and parameters (because our naming conventions state that we don't use prefixes for member and parameter names (and they are based on information found on the internet, so I consider that a best practice))
null
CC BY-SA 2.5
null
2008-08-22T19:23:34.253
2008-08-22T19:23:34.253
null
null
1,782
null
23,267
2
null
23,250
11
null
Any time you need a reference to the current object. One particularly handy scenario is when your object is calling a function and wants to pass itself into it. Example: ``` void onChange() { screen.draw(this); } ```
null
CC BY-SA 2.5
null
2008-08-22T19:26:37.430
2008-08-22T19:26:37.430
null
null
55
null
23,253
2
null
23,228
-1
null
`String.Format` takes at least one String and returns a different String. It doesn't need to modify the format string in order to return another string, so it makes little sense to do that (ignoring your formatting of it). On the other hand, it wouldn't be that much of a stretch to make `String.Format` be a member func...
null
CC BY-SA 3.0
null
2008-08-22T19:22:23.663
2012-07-03T14:54:51.347
2012-07-03T14:54:51.347
142,162
1,799
null
23,271
2
null
23,016
2
null
Turn off javascript and make sure your site can still be navigated. Even if you want to ignore the small but significant number of people who have it disabled, this will impact search engines as well.
null
CC BY-SA 2.5
null
2008-08-22T19:28:03.323
2008-08-22T19:28:03.323
null
null
1,990
null
23,255
2
null
23,228
2
null
I think it looks better in general to use String.Format, but I could see a point in wanting to have a non-static function for when you already have a string stored in a variable that you want to "format". As an aside, all functions of the string class don't act on the string, but return a new string object, because ...
null
CC BY-SA 2.5
null
2008-08-22T19:22:32.103
2008-08-22T19:22:32.103
null
null
1,862
null
23,273
2
null
23,166
4
null
I learned from Jeffrey Ullman's , which is pretty good. It loses points for being about Standard ML, when OCaml, F#, and Haskell are (seemingly) more popular.
null
CC BY-SA 2.5
null
2008-08-22T19:28:49.187
2008-08-22T19:28:49.187
null
null
1,412
null
23,270
1
36,667
null
4
1,511
Does anyone know how IE7 determines what Security Zone to use for a site? I see the basics for IE6 [here](http://www.microsoft.com/technet/prodtechnol/ie/reskit/6/default.mspx?mfr=true), but I can't find the equivalent for IE7.
How IE7 determines a site's Security Zone
CC BY-SA 2.5
0
2008-08-22T19:28:00.140
2008-12-03T17:30:02.460
2008-08-25T12:29:21.887
123
466
[ "security", "internet-explorer-7", "security-zone" ]
23,278
2
null
23,250
1
null
I pretty much only use when referencing a type property from inside the same type. As another user mentioned, I also underscore local fields so they are noticeable without needing .
null
CC BY-SA 2.5
null
2008-08-22T19:29:51.620
2008-08-22T19:29:51.620
null
null
1,314
null
23,268
2
null
4,689
5
null
[DejaVu](https://dejavu-fonts.github.io/) Sans Mono (sometimes known as Panic Sans), size 11, anti-alised. Previously I only used fonts that weren't anti-aliased, but it just seems to work for this font. ![Screenshot of Panic Sans in Sublime Text](https://i.stack.imgur.com/5ziku.png)
null
CC BY-SA 3.0
null
2008-08-22T19:26:55.150
2017-02-03T15:43:43.503
2017-02-03T15:43:43.503
1,114
1,114
null
23,276
2
null
23,270
-2
null
Not sure what the confusion is. Sites on your intranet are in the intranet zone, web sites are in the internet zone, and sites on your computer are in the local zone, unless you've specifically overridden something in the browser's preferences.
null
CC BY-SA 2.5
null
2008-08-22T19:29:29.123
2008-08-22T19:29:29.123
null
null
1,975,282
null
23,275
2
null
23,190
0
null
You're doing this in c/c++... so you have an array of array of array... you don't have to visualize 20 dimensions since that isn't how the data is laid out in memory, for a 2 dimensional: ``` [1] --> [1,2,3,4,5,6,...] [2] --> [1,2,3,4,5,6,...] [3] --> [1,2,3,4,5,6,...] [4] --> [1,2,3,4,5,6,...] [5] --> [1,2,3,4,5,6,.....
null
CC BY-SA 2.5
null
2008-08-22T19:29:03.460
2008-08-22T19:29:03.460
null
null
157
null
23,274
2
null
16,991
4
null
[NetBeans](http://en.wikipedia.org/wiki/NetBeans) is good because you can use it on Windows and Mac OS X.
null
CC BY-SA 2.5
null
2008-08-22T19:28:51.653
2011-02-06T16:05:39.637
2011-02-06T16:05:39.637
63,550
453,046
null
23,277
1
23,290
null
312
165,106
I've read the Wikipedia articles for both [procedural programming](http://en.wikipedia.org/wiki/Procedural_programming) and [functional programming](http://en.wikipedia.org/wiki/Functional_programming), but I'm still slightly confused. Could someone boil it down to the core?
What is the difference between procedural programming and functional programming?
CC BY-SA 2.5
0
2008-08-22T19:29:45.253
2021-02-03T15:56:10.820
2008-08-25T11:41:13.653
1,693
572
[ "functional-programming", "glossary", "paradigms", "procedural-programming" ]
23,269
2
null
23,166
5
null
Since there are a bunch of different functional programming languages, it's hard to recommend books. But if you're interested in Common Lisp, recently I've been reading ["Practical Common Lisp"](https://rads.stackoverflow.com/amzn/click/com/1590592395) by Peter Seibel, which you can [check out online for free](http://g...
null
CC BY-SA 2.5
null
2008-08-22T19:27:18.007
2008-08-22T19:27:18.007
null
null
null
null
23,264
2
null
23,250
96
null
I only use it when absolutely necessary, ie, when another variable is shadowing another. Such as here: ``` class Vector3 { float x; float y; float z; public Vector3(float x, float y, float z) { this.x = x; this.y = y; this.z = z; } } ``` Or as Ryan Fox points out, w...
null
CC BY-SA 4.0
null
2008-08-22T19:26:06.900
2018-05-16T06:29:40.347
2018-05-16T06:29:40.347
5,060,420
1,595
null
23,279
2
null
23,250
0
null
It depends on the coding standard I'm working under. If we are using _ to denote an instance variable then "this" becomes redundant. If we are not using _ then I tend to use this to denote instance variable.
null
CC BY-SA 2.5
null
2008-08-22T19:30:42.880
2008-08-22T19:30:42.880
null
null
1,327
null
23,281
2
null
23,250
7
null
I tend to use it everywhere as well, just to make sure that it is clear that it is instance members that we are dealing with.
null
CC BY-SA 2.5
null
2008-08-22T19:31:26.560
2008-08-22T19:31:26.560
null
null
920
null
23,286
2
null
23,277
54
null
In computer science, functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions, in contrast with the procedural programming style that emphasizes changes in state.
null
CC BY-SA 2.5
null
2008-08-22T19:34:42.480
2008-08-22T19:34:42.480
null
null
1,782
null
23,285
2
null
21,987
6
null
Behaviour is the same when a window finishes flashing for as long as it's supposed to: the taskbar button stays coloured. I don't think this is a bug. If you think about it, when you use `FLASHW_STOP`, the flashing does in fact stop, but the point of the flashing is to get the user's attention. The button stays coloure...
null
CC BY-SA 4.0
null
2008-08-22T19:33:47.320
2022-03-31T14:08:16.707
2022-03-31T14:08:16.707
850,848
1,975,282
null
23,287
1
242,189
null
197
230,940
What is the best approach to calculating the largest prime factor of a number? I'm thinking the most efficient would be the following: 1. Find lowest prime number that divides cleanly 2. Check if result of division is prime 3. If not, find next lowest 4. Go to 2. I'm basing this assumption on it being easier to c...
Algorithm to find Largest prime factor of a number
CC BY-SA 4.0
0
2008-08-22T19:35:50.513
2022-07-31T04:29:42.707
2018-09-09T07:10:12.420
202,229
1,951
[ "algorithm", "math", "prime-factoring" ]
23,300
2
null
23,106
6
null
I would use [Stax](http://jcp.org/en/jsr/detail?id=173) to parse XML, it's fast and easy to use. I've been using it on my last project to parse XML files up to 24MB. There's a nice introduction on [java.net](http://today.java.net/pub/a/today/2006/07/20/introduction-to-stax.html), which tells you everything you need to ...
null
CC BY-SA 2.5
null
2008-08-22T19:45:47.540
2008-08-22T19:45:47.540
null
null
198
null
23,288
1
23,292
null
36
131,987
Where can I get some decent looking free ASP.Net or CSS themes?
Free ASP.Net and/or CSS Themes
CC BY-SA 2.5
0
2008-08-22T19:36:06.033
2015-01-01T00:16:15.567
2015-01-01T00:16:15.567
1,505,120
1,287
[ "css", "asp.net", "themes" ]
23,292
2
null
23,288
33
null
I wouldn't bother looking for ASP.NET stuff specifically (probably won't find any anyways). Finding a good CSS theme easily can be used in ASP.NET. Here's some sites that I love for CSS goodness: [http://www.freecsstemplates.org/](http://www.freecsstemplates.org/) [http://www.oswd.org/](http://www.oswd.org/) [http...
null
CC BY-SA 2.5
null
2008-08-22T19:39:11.143
2008-08-22T19:39:11.143
null
null
1,627
null
23,307
2
null
23,190
0
null
``` x = number_of_dimensions; while (x > 1) { switch (x) { case 20: reduce20DimensionArray(); x--; break; case 19: ..... } } ``` (Sorry, couldn't resist.)
null
CC BY-SA 2.5
null
2008-08-22T19:46:57.863
2008-08-22T20:13:51.700
2008-08-22T20:13:51.700
517
517
null
23,306
2
null
23,250
36
null
I can't believe all of the people that say using it always is a "best practice" and such. Use "this" when there is ambiguity, as in [Corey's example](https://stackoverflow.com/a/23264/282110) or when you need to pass the object as a parameter, as in [Ryan's example](https://stackoverflow.com/a/23267/282110). There is ...
null
CC BY-SA 3.0
null
2008-08-22T19:46:46.383
2012-04-25T20:09:38.907
2017-05-23T12:02:53.007
-1
1,790
null
23,310
1
23,353
null
6
2,547
What would be the best version control system to learn as a beginner to source control?
Source Control Beginners
CC BY-SA 2.5
0
2008-08-22T19:49:05.457
2011-04-12T08:17:48.870
2008-10-10T19:04:26.893
5,058
453,046
[ "version-control" ]
23,312
2
null
23,288
3
null
As always, [http://www.csszengarden.com/](http://www.csszengarden.com/). Note that the images aren't public domain.
null
CC BY-SA 2.5
null
2008-08-22T19:49:46.437
2008-08-22T19:49:46.437
null
null
414
null
23,295
2
null
22,697
11
null
We are heavily using [EasyMock](http://easymock.org) and EasyMock Class Extension at work and are pretty happy with it. It basically gives you everything you need. Take a look at the documentation, there's a very nice example which shows you all the features of EasyMock.
null
CC BY-SA 2.5
null
2008-08-22T19:42:40.060
2008-08-22T19:42:40.060
null
null
198
null
23,314
2
null
23,310
0
null
Anything, but I would learn a modern system like git or subversion myself. My first VCS was RCS, but I got the basics down.
null
CC BY-SA 2.5
null
2008-08-22T19:50:14.067
2008-08-22T19:50:14.067
null
null
572
null
23,308
2
null
18,533
3
null
I've been using the [Data Transfer Objects](http://en.wikipedia.org/wiki/Data_Transfer_Object) pattern (originally from the Java world, I believe), with a SqDataReader to populate collections of DTOs from the data layer for use in other layers of the application. The DTOs themselves are very lightweight and simple clas...
null
CC BY-SA 2.5
null
2008-08-22T19:47:15.790
2008-08-22T19:47:15.790
null
null
1,680
null
23,316
2
null
23,310
0
null
Well, if you are just wanting to learn on your own, I would say you should go with something free, like subversion. If you are a company who has never used source control before, then it really depends on your needs.
null
CC BY-SA 2.5
null
2008-08-22T19:51:03.440
2008-08-22T19:51:03.440
null
null
2,328
null
23,297
2
null
23,175
1
null
While I obviously cannot speak to the specifics of your application, in most instances you should not tie your caching implementation to some perceived expectation for how the GC will work. As Stu mentions, calling GC.Collect() will force a collection (with overloads for a specific generation) but more often than not ...
null
CC BY-SA 2.5
null
2008-08-22T19:44:11.367
2008-08-22T19:44:11.367
null
null
1,314
null
23,294
2
null
23,288
5
null
I have used [Open source Web Design](http://www.oswd.org/) in the past. They have quite a few css themes, don't know about ASP.Net
null
CC BY-SA 3.0
null
2008-08-22T19:39:56.073
2013-03-07T18:42:47.013
2013-03-07T18:42:47.013
437,301
2,328
null
23,322
2
null
23,310
0
null
My first exposure was CVS with WinCVS as a client. it was horrid. Next was Subversion, with TortoiseSVN and Eclipse's integration. It was intuitive, and heavenly. I think that using CVS with TortoiseCVS and Eclipse's would be nice as well, though I prefer the way SVN handles revisioning. The entire repository is ve...
null
CC BY-SA 2.5
null
2008-08-22T19:53:17.523
2008-08-22T19:53:17.523
null
null
96
null
23,324
2
null
23,277
13
null
To expand on Konrad's comment: > As a consequence, a purely functional program always yields the same value for an input, and the order of evaluation is not well-defined; Because of this, functional code is generally easier to parallelize. Since there are (generally) no side effects of the functions, and they (gener...
null
CC BY-SA 2.5
null
2008-08-22T19:53:55.163
2008-08-22T19:53:55.163
null
null
1,409
null
23,321
2
null
23,310
8
null
I'd suggest you try Subversion, for example with the [1-click SVN installer](http://svn1clicksetup.tigris.org/). Try searching SO for "Subversion", and you'll find loads of questions with answers that point to good tutorials. Good luck!
null
CC BY-SA 2.5
null
2008-08-22T19:53:08.567
2008-08-22T19:53:08.567
null
null
1,037
null
23,323
2
null
23,250
-8
null
Never. Ever. If you have variable shadowing, your naming conventions are on crack. I mean, really, no distinguishing naming for member variables?
null
CC BY-SA 2.5
null
2008-08-22T19:53:31.173
2008-08-22T19:53:31.173
null
null
414
null
23,335
2
null
23,277
26
null
I believe that procedural/functional/objective programming are about how to approach a problem. The first style would plan everything in to steps, and solves the problem by implementing one step (a procedure) at a time. On the other hand, functional programming would emphasize the divide-and-conquer approach, where t...
null
CC BY-SA 3.0
null
2008-08-22T19:57:34.877
2015-04-10T03:07:14.550
2015-04-10T03:07:14.550
541,136
null
null
23,339
2
null
20,910
6
null
Silverlight programmer's don't know what they're missing out on, when it comes to Flex. Silverlight lacks the component model and event triggering capabilites that Flex has. Using XNA, and C#, a friend of mine has to jump through all kinds of hoops to get his Silverlight application to work. Then, it has to be hande...
null
CC BY-SA 2.5
null
2008-08-22T19:59:58.833
2008-08-22T19:59:58.833
null
null
1,935
null
23,333
2
null
23,287
-5
null
I think it would be good to store somewhere all possible primes smaller then n and just iterate through them to find the biggest divisior. You can get primes from [prime-numbers.org](http://www.prime-numbers.org/). Of course I assume that your number isn't too big :)
null
CC BY-SA 2.5
null
2008-08-22T19:57:15.860
2008-08-22T19:57:15.860
null
null
1,516
null
23,340
2
null
23,250
27
null
I use it whenever [StyleCop](http://code.msdn.microsoft.com/sourceanalysis) tells me to. [StyleCop](http://code.msdn.microsoft.com/sourceanalysis) must be obeyed. Oh yes.
null
CC BY-SA 2.5
null
2008-08-22T20:00:47.333
2008-08-22T20:00:47.333
null
null
2,084
null
23,342
2
null
23,217
1
null
javascript: in JS code (like in an onclick attribute) is just a label for use with continue/goto label statements that may or may not be supported by the browser (probably not anywhere). It could be zipzambam: instead. Even if the label can't be used, browsers still accept it so it doesn't cause an error. This means t...
null
CC BY-SA 2.5
null
2008-08-22T20:01:21.747
2008-08-22T20:37:51.300
2008-08-22T20:37:51.300
1,697
1,697
null
23,348
2
null
23,228
-1
null
Making it an instance method would imply you could use it to "format" or modify the value of an existing string. This you can't do, and making it an instance method that returned a new string would make no sense. Hence, it's a static method.
null
CC BY-SA 2.5
null
2008-08-22T20:02:37.220
2010-02-23T17:20:56.927
2010-02-23T17:20:56.927
null
null
null