Browsing 7239 questions and answers with Jon Skeet
You're creating two separate MultiplyTable1 objects. A synchronized instance method is effectively using: synchronized (this) { ... } so if you call that method on two different objects, they can still run in parallel. To see the... more 3/16/2014 7:41:53 AM
You're parsing the elements fine (at least as far as we can see) - it's just what you're doing with the result which is wrong. You've got a NodeList. Calling toString() on that isn't what you want - you're trying to get the name attribute... more 3/15/2014 12:30:28 PM
You're calling toString() on an array - and arrays don't override Object.toString(). So you get the behaviour from Object.toString(): The toString method for class Object returns a string consisting of the name of the class of which... more 3/14/2014 8:44:10 PM
the problem I encounter is: how do I know which e.Result corresponds to what url ? There are various different options for this: UserState You can pass in a second argument to DownloadStringAsync, which is then available via... more 3/14/2014 8:29:31 PM
(Adding a second answer as my wrong one had three upvotes already.) You can declare a class within an initializer block - but its scope is that initializer block, just like if you declared it in a method. So this works: public class Test... more 3/14/2014 7:16:11 PM
Each time you call Sum, you're creating a separate test delegate closing over a new test variable. The difference isn't "whether or not you use Invoke" but "whether you're using the result of a new call to Sum(). To demonstrate this, you... more 3/14/2014 6:16:01 PM
You're creating a new SiteMinder object. That's not the same object that had the property set on it, so the property will have the default value (null). You need to obtain a reference to the original SiteMinder object which set the... more 3/14/2014 4:32:46 PM
The problem is the nullability. You could probably get away with just adding a conversion expression from the value to the type of the property: public Expression<Func<Book, bool>> GreaterThan(string columnName, object... more 3/14/2014 4:01:54 PM
I suspect this is due to the LEAD TIME BUCKET column name, which should either have underscores (like the other column names) or be escaped somehow - the spaces within the column name are causing the error. It would be better to have... more 3/14/2014 10:29:12 AM
You could easily create a boolean array and just offset the index: // Do this once... int minValueInclusive = -15; int maxValueExclusive = 31; boolean[] presence = new boolean[maxValueExclusive - minValueInclusive + 1]; for (int value :... more 3/14/2014 10:02:51 AM