Browsing 7239 questions and answers with Jon Skeet
The call isn't being skipped - the problem is that Console.Read() will only return after the user has hit return - although it will only consume the first character it reads. So suppose that (when prompted about skipping) the user... more 10/17/2014 12:38:03 PM
There are multiple problems here. In general, you need to use Base64.decode in order to reverse the result of Base64.encode: byte[] data = android.util.Base64.decode(to_decode, DEFAULT); In general, you should always ask yourself "How... more 10/17/2014 12:23:05 PM
It's yyyy-mm-dd, in order to comply with ISO-8601 and general sanity. From the W3C proposed recommendation: Note: While the formats described here are intended to be subsets of the corresponding ISO8601 formats, this specification... more 10/17/2014 11:52:58 AM
I suspect the problem is due to the order of the calls. Your last line is effectively: KeyValueImpl tmp = verify(keyValue); String value = expectationManager.getExpectedValue(); tmp.setValue(value); If Mockito is effectively using the... more 10/17/2014 11:02:11 AM
This looks like a very bad idea to me: parameters.append(URLEncoder.encode(new String(regMin1),"UTF-8")); ... parameters.append(URLEncoder.encode(new String(regMin2),"UTF-8")); If regMin1 and regMin2 aren't actually UTF-8 text (and my... more 10/17/2014 10:18:50 AM
In a query expression, you can use let for this: return from DataRow row in table.Rows let preComputed = HeavyComputation(row["ID"]) select new Beep { // Use row and preComputed here }; To have the... more 10/17/2014 8:36:07 AM
No, there's nothing in the language that does this. There are some grotty hacks that would allow you to keep track of the caller file/line/member, and auto-increment based on that (if you're using C# 5) - but it wouldn't really be the... more 10/17/2014 8:28:12 AM
Yes, the problem is here: byte[] barrImg = (byte[])(row["StudImage"].ToString()); You're calling ToString() on row["StudImage"]. That will result in a String. You're then casting that string to byte[] - but that doesn't work, because... more 10/17/2014 6:27:19 AM
I suspect the problem is simply that your Unix environment isn't running in an English locale - so when it tries to parse the month name, it's not recognizing "OCT" as a valid value. I would suggest using code like this: SimpleDateFormat... more 10/17/2014 6:17:35 AM
The problem lies with the code you've got that's serializing the data. In your original question, you have this code when you're going to deserialize (retrieveGlobalDataFromStorage): final GsonBuilder builder = new GsonBuilder() ... more 10/16/2014 8:47:00 PM