Browsing 7239 questions and answers with Jon Skeet
Use SynchronizationContext instead, basically. That's the more modern replacement for ISynchronizeInvoke. more 11/3/2015 6:50:19 PM
Reflection in CoreCLR / Windows 10 etc has moved quite a lot of what used to be in Type into TypeInfo. You can use IntrospectionExtensions to get the TypeInfo for a Type. So for example: using System.Reflection; ... var asm =... more 11/3/2015 6:35:07 PM
A GZipStream isn't a zip file, basically - it's a gzip file. That's just compressed data, without any notions of multiple files, file names etc. If you save the file as foo.gz you may find that the zip tool you use knows how to decompress... more 11/3/2015 1:21:23 PM
The Semaphore Java documentation tells you how to do this: Switching between Java versions is done by adding the following command to your build commands: change-java-version <version> Valid values for <version are 1.7... more 11/3/2015 7:06:15 AM
I think this may be the problem: if (interstitial != null && interstitial.isLoaded()) { interstitial.setAdListener(new AdListener(){ public void onAdLoaded(){ interstitial.show(); } }); }... more 11/3/2015 7:02:10 AM
If your list is empty, you never go into the loop, so you'll never call add. If you do have any tokens to start with, you're either adding or removing the new token for each existing token which isn't what you want. I suspect you... more 11/2/2015 1:57:03 PM
The java.time API in general does have nanosecond precision. For example: DateTimeFormatter formatter = DateTimeFormatter .ofPattern("yyyy-MM-dd'T'HH:mm:ss,nnnnnnnnnZ"); OffsetDateTime odt = OffsetDateTime.of(2015, 11, 2, 12, 38, 0,... more 11/2/2015 12:39:39 PM
Well if you're happy getting "midnight at the start of the given date, in UTC" you can use: if (!string.IsNullOrEmpty(fieldData) && DateTime.TryParseExact( fieldData, "yyyy-MM-dd", ... more 11/2/2015 8:20:51 AM
java -version displays the version information on standard error rather than standard output... so you need to redirect that: java -version 2>> test.txt Here the 2>> means "redirect standard error, appending it to the given... more 10/31/2015 4:03:11 PM
Firstly, this is really bad code in my view. It's converting the original ms value into a string (so 35968 would become "35968") and then parsing that into a Date, as if from a format which only specifies a number of milliseconds... which... more 10/31/2015 8:47:43 AM