Browsing 7239 questions and answers with Jon Skeet
It's not entirely clear, but I suspect you actually want to treat these two tables as equivalents - so you can project to a common form and then use Concat, then call ToLookup: var projectedSource1 = context.Source1.Select(x => new {... more 5/13/2015 10:09:33 AM
Why is it happening Because the overload resolution happens at compile-time, and the compile-time type of the aClass variable is SuperClass How do i achieve my wanted result? Either change the compile-time type of aClass to... more 5/13/2015 9:39:02 AM
Parameters aren't substituted into queries textually. I believe the simplest way to do what you want is to just use the ? on its own for the parameter, but add any leading or trailing values to the parameter itself. For example: String... more 5/13/2015 6:27:23 AM
The simplest approach is to just build the whole document up to start with in-memory, and then only write it at the very end. That will almost certainly lead to simpler code even leaving aside the "don't write invalid date" side of things.... more 5/13/2015 6:04:57 AM
With multiple threads, although you have to do work to make sure you read the "most recent" value of a variable, you expect there to be effectively one variable per instance (assuming we're talking about instance fields here). You might... more 5/12/2015 5:41:31 PM
If you look at the syntax for type parameter bounds in JLS 8.1.2 you'll see: TypeBound: extends TypeVariable extends ClassOrInterfaceType {AdditionalBound} AdditionalBound: & InterfaceType In other words, only the... more 5/12/2015 3:01:41 PM
The question now is, if anyone can access every field in my classes, this is kind of insecure, isn't it? Not everyone can. Only code with sufficient permissions - trusted code. Untrusted code is restricted quite a bit. On the other... more 5/12/2015 12:49:54 PM
The JSON you've got doesn't include the actual attachment - just metadata about it. From the documentation: To retrieve an attachment, make a GET request to https://$USERNAME.cloudant.com/$DATABASE/$DOCUMENT_ID/$ATTACHMENT. The body... more 5/12/2015 9:18:53 AM
These seem to work because the consuming class is static. No, that's incorrect. Extension methods definitely don't have to be consumed from static classes or static methods. However, they do have to be declared in a class which... more 5/12/2015 8:54:02 AM
That looks like it's a bug in JSON-simple to me. Using the org.json parser, it works fine. The problem is that it's trying to parse the value as an integer and it's outside the range of normal Java primitive integer types. It could parse... more 5/12/2015 6:22:34 AM