Browsing 7239 questions and answers with Jon Skeet
Your articles variable is using the non-generic type IQueryable, which supports very little indeed. You want IQueryable<T> for a suitable <T>. For example: IQueryable<Article> articles; // Initialize as before I'd... more 3/31/2014 4:46:58 PM
Your program will work eventually - but it's got to perform 263 iterations (in each direction) first. That's going to take a very long time. Long.MAX_VALUE and Long.MIN_VALUE are rather simpler ways of finding this out. Or just look at JLS... more 3/31/2014 10:39:40 AM
That's absolutely fine, and is often used for delegation, e.g. in the decorator pattern. While it's not actually using interfaces (instead using an abstract base class, Stream), BufferedStream is an example of this. Or for example you... more 3/31/2014 9:18:16 AM
Obtaining a remote time of day... If you're trying to talk to machines with multiple cultures - and if the culture of the system on which you're running may vary as well - I would strongly advise that you avoid this text-based... more 3/31/2014 8:47:16 AM
The whole point of an interface is that it represents a level of abstraction - you're saying "All types that implement this interface support these operations." It sounds like the operations of "change the fuel field" simply don't belong... more 3/30/2014 8:59:10 PM
Well, it's somewhat implementation-specific, but I'd expect a JVM implementation to initialize arrays by allocating one contiguous block of memory. I don't think it's absolutely required, but it's going to be by far the most efficient... more 3/30/2014 7:49:58 PM
Yes, you're currently creating a deadlock. You're using async/await, which means that when the task returned by DownloadStringTaskAsync completes, a continuation will be scheduled to continue loadAsync from where it left off, and back in... more 3/30/2014 7:39:49 PM
It's not clear what you meant by "I tested forcing usage of ; even on Mac OS" but basically you should use the right path separator for the platform when you run the new Java process. So on Windows you'd want: java -cp... more 3/30/2014 5:39:26 PM
Your "AI" consists of this line: int num = rNum.nextInt(8); That's just picking one of 8 (why not 9?) squares at random, with no checking whether or not the space is already taken. If you really want to just pick a random space, you... more 3/30/2014 5:26:11 PM
my problem is when sometimes the client send 2 messages one after another, the server doesn't receive the second message I think it's much more likely that it does receive the second message, but in a single Receive call. Don't... more 3/30/2014 4:42:07 PM