Browsing 7239 questions and answers with Jon Skeet
You're calling Task.Wait() - which will throw an exception if the task is faulted. If you don't call Task.Wait(), you won't get the exception in your thread... but of course you won't spot when it's finished, either. There are various ways... more 3/20/2014 3:17:00 PM
It works for me in Eclipse. For example: public class Foo { private static final Runnable r1 = () -> { System.out.println("r1a"); System.out.println("r1b"); }; public static void main(String[] args) { ... more 3/20/2014 12:00:24 PM
Disclaimer: I'm not an Android developer. I've never written code like this. It's just my interpretation of the documentation... I suspect you actually want to set the bitmap to draw onto much earlier, and then draw the other bitmap into... more 3/20/2014 11:49:03 AM
You can't, basically. You need three separate SimpleDateFormat objects: new SimpleDateFormat("dd'st' MMM, yyyy") new SimpleDateFormat("dd'nd' MMM, yyyy") new SimpleDateFormat("dd'th' MMM, yyyy") ... then try parsing with each of them.... more 3/20/2014 10:47:02 AM
There are three separate transformations here: Unencrypted text to unencrypted bytes Unencrypted bytes to encrypted bytes Encrypted bytes to hex ... and the reverse, of course. I suspect the problem is in the first step. Currently... more 3/20/2014 10:39:31 AM
Let's look at a massively reduced version of this: public class Huffman<K> { public class Node<T> where T : K { } public Node<T> front, rear; } What is the type of front and rear here? It refers to T,... more 3/20/2014 10:12:08 AM
Basically the C# type system isn't geared up for this. It's not often a problem, but when it does come up it's a pain :( Some options you might want to think about, all of which start off by removing the existing property: Create a... more 3/20/2014 7:09:15 AM
Your proposed scheme is less efficient than the current surrogate pair scheme, which is one problem. Currently, only 0xD800-0xDFFF (2048 code units) are "out of bounds" as normal characters, leaving 63488 code units mapping to single... more 3/19/2014 6:34:12 PM
The problem is your text pattern. "mm" means "minutes" not "months". If you change your pattern to "yyyy-MM" you'll find it works fine. As a guiding principle the first thing I would do in a situation like this is try to isolate this to... more 3/19/2014 2:19:08 PM
Where does the C# compiler store comments in assembly? It doesn't. If IntelliSence can use comments, I also want. In that case, you need to turn on XML documentation generation in your build. (Assuming you're using Visual... more 3/19/2014 2:06:31 PM