Browsing 7239 questions and answers with Jon Skeet
You don't use ISO_OFFSET_DATE_TIME, basically :) If you follow the documentation for that, you end up in the docs of ISO_LOCAL_TIME which has: This returns an immutable formatter capable of formatting and parsing the ISO-8601 extended... more 2/3/2016 6:18:13 PM
The problem is your CLASSPATH environment variable. It exists, but doesn't include the current directory. Unless you really need the CLASSPATH environment variable for some reason, I would remove it - then it will default to just the... more 2/3/2016 4:11:45 PM
This is the problem: public static int Jobs = valueN(), inp = 4; ... public static int valueN(){ ... int[] MN = new int [inp]; ... n=MN[0]; } When you run valueN(), inp is still 0. The initialization which will set inp... more 2/3/2016 1:52:19 PM
You just need to call the Json method, inherited from the controller base class: return Json(selectedradio, JsonRequestBehavior.AllowGet); more 2/3/2016 11:47:16 AM
Just don't await the task. That's then mostly-equivalent to running all of that code on the thread-pool to start with, assuming it doesn't internally await anything without calling ConfigureAwait(false). (You'll want to check that, if it's... more 2/3/2016 11:39:43 AM
You're currently selecting the whole row, rather than just the perm_id. You're also calling ToArray twice, and trying to return an array despite your method's return type being List<int>. I'd just use: public List<int>... more 2/3/2016 11:11:34 AM
You're using ==, which isn't overloaded for Tuple<,>, so it's using a reference identity check... and as you've constructed a new tuple, that will never be true. This would be correct, but undesirable: // Don't do... more 2/3/2016 9:02:13 AM
It looks like this is the problem: FileUpload1.PostedFile.SaveAs(Server.MapPath("~/SiteImages/") + fileName); That's saving the first file multiple times - you're trying to save the file you're currently referring to as uploadedfiles... more 2/3/2016 8:01:05 AM
It's not a bug anywhere IMO, in that the code is behaving as the implementor expected - but this is a known result of an unusual Comparable implementation. From the Comparable documentation: It is strongly recommended (though not... more 2/2/2016 10:16:39 PM
It sounds like you just want something like: var differences = aList.Zip(bList, (a, b) => new { a.Name, Difference = a.Grade - b.Grade }); foreach (var result in differences) { if (result.Difference != 0) { ... more 2/2/2016 10:01:21 PM