Browsing 7239 questions and answers with Jon Skeet
I suspect your JVM happens to have generated code where count++ is JIT-compiled into an atomic operation... even though it's not guaranteed to... and your computer's memory model isn't as lax as it could be. It's still unsafe - it's just... more 10/14/2014 9:11:06 PM
You seem to be assuming that the change to the rs parameter will be propagated to the calling code. It won't. Everything in Java is passed by value - including references. Instead, you should probably do something like: public static... more 10/14/2014 3:03:50 PM
You basically just need to update the version of NuGet installed with Visual Studio. Go to the Tools menu and select "Extensions and updates", then find "NuGet Package Manager" (at least that's what I assume it's called, based on what I... more 10/14/2014 1:58:37 PM
Everything beyond the # is the fragment identifier. It's not sent to the server as part of the request - in this case it would be used by the Javascript on the page to perform extra filtering. When fetching the page programmatically, you... more 10/14/2014 1:46:06 PM
It sounds like you just want a shallow clone, e.g. List<String> referencedStrings = new ArrayList<>(referencedStrings); That will take a copy of the existing list - but as the list only contains references, any changes to... more 10/14/2014 1:27:20 PM
You're setting the minutes not the month. It sounds like it's parsing this as 2014-01-14T00:10:00, and that January 14th 2014 is in the third week. You want MM for months, not mm. (I'd also encourage you to use yyyy-MM-dd if you get a... more 10/14/2014 12:06:59 PM
This is due to type erasure. Basically, the types of K and V aren't known at execution time. The cast to V is unchecked - and you should have received a warning for this at compile-time (possibly suggesting that you compile with... more 10/14/2014 11:06:44 AM
Your question is far from clear, but I suspect you may want something like: // I would strongly discourage you from using global variables... var issues = doc.Descendants("Issue") .Select(x => new IssueModel((string)... more 10/14/2014 6:14:41 AM
If you're interested in whether the current time is "after or equal to 2pm, or before 1am" then don't need to use string parsing at all. You could use: TimeZone zone = TimeZone.getTimeZone("America/New_York"); Calendar calendar = new... more 10/13/2014 4:46:07 PM
This is the problem, which has nothing to do with the fact that you're using .NET 4: Task.WaitAll(tasks, -1); That will block until everything in tasks completes. At that point, your UI thread can't do any more work... but it has to do... more 10/13/2014 1:16:48 PM