Browsing 7239 questions and answers with Jon Skeet
Why is this happening? Because that's what it's documented to do: Note: no padding is added. The = characters at the end of a base64 string are called padding. They're used to make sure that the final string's length is a... more 12/23/2017 7:21:30 PM
No, query expressions in LINQ require each selection part etc to be a single expression, not multiple statements. However, you could write a separate method: public IEnumerable<Item> PickItems(Tab tab) { tab.Pick(); return... more 12/23/2017 9:42:02 AM
LINQ to SQL doesn't know what to do when you try to access the session inside the query. Instead of doing that, fetch the value from the session before the query and store the result in a local variable, then use that local variable in... more 12/18/2017 6:21:56 PM
The problem is that you're not using the result of the invokeExact method. I hadn't seen this method before, but it looks like the Java compiler has to handle it in a very special way. From the MethodHandle documentation: As is usual... more 12/16/2017 7:48:42 AM
TL;DR: Update to 2.1.0 when that's out. (Or fetch and build the source before then if you're desperate.) This was a tricky one to fix. The issue is that HttpClient was automatically decompressing the data on the fly, but the hash... more 12/15/2017 11:46:07 AM
Can you please explain why doesn't the memory model does not guarantee that the new value of instance will be seen by other threads? The memory model is complex and not terribly clearly documented at the moment, but fundamentally... more 12/14/2017 3:29:15 PM
You can use SharpCompress for this. Its DeflateStream allows you to read the compressed data on the fly, which is exactly what you want. Here's a complete example based on Sir Rufo's: using System; using System.IO; using... more 12/14/2017 12:29:57 PM
S in SimpleDateFormat specifies a number of milliseconds, not a fraction of a second. You've specified 730555904 milliseconds, which is ~8.45 days - hence the date change. java.util.Date only has a precision of milliseconds. I would... more 12/13/2017 5:20:26 PM
The smallest change to make that work would just be to use a StringBuilder instead - and that would be more efficient: StringBuilder builder = new StringBuilder(); listofObjects.stream().forEach(l -> builder.append(l.text)); String... more 12/13/2017 7:37:03 AM
Date.toString() is formatted in your local time zone, but because you've passed in an ISO-8601 string, the value is parsed as if it's UTC. From the Date.parse() documentation (as the Date(String) constructor is documented to behave like... more 12/11/2017 2:20:01 PM