Browsing 7239 questions and answers with Jon Skeet
It sounds like you just need to convert the results into double before the division: // This will work double differenceMillis = currentMillis - oldMillis; double differenceSeconds = differenceMillis / 1000; // This will *not*... more 6/11/2014 4:59:32 PM
If you want to return an empty result, you can use the EmptyResult class: public ActionResult SomeAction() { UserManager.MyVoid(); return new EmptyResult(); } more 6/11/2014 4:23:14 PM
-D[...] is just a flag to set a "system property". Unless anything looks at that system property, it will have no effect at all. For example: System.out.println(System.getProperty("XX:MaxPermSize")); ... will print out "4096M" in your... more 6/11/2014 12:17:50 PM
There's no such thing as an object of type Optional<String>. Type erasure means that there's just Optional at execution time. If you have a field or parameter of type Optional<String>, that information can be retrieved at... more 6/11/2014 9:15:27 AM
Every time you get any PingCompleted event, you're updating all the nodes in your tree the same way. Instead, you should only update the node corresponding to the IP address that the particular PingCompletedEventArgs corresponds with. You... more 6/11/2014 9:10:55 AM
Yes, this is the documented behaviour: The byte array will be in big-endian byte-order: the most significant byte is in the zeroth element. The array will contain the minimum number of bytes required to represent this BigInteger,... more 6/11/2014 8:59:30 AM
Those aren't methods on ObservableCollection or List themselves. They're extension methods provided by the System.Linq.Enumerable class. You probably just need an added using directive in your source code to make them available: using... more 6/11/2014 8:50:24 AM
It sounds like you want a version of Math.Ceiling, but which takes a number of decimal places. You could just multiply, use Math.Ceiling, then divide again: public static double CeilingWithPlaces(double input, int places) { double... more 6/11/2014 8:43:01 AM
I suspect the reason it's failing has nothing to do with the attribute part - it's failing to find the elements at all, as you've asked for just Compile elements, whereas there are only actually Compile elements in the namespace with the... more 6/11/2014 8:39:40 AM
I've worked out what the difference is, but not why it's different. In the first form, you have an xmlns attribute. In the second form, you don't - not in terms of what Attributes() returns. If you explicitly construct an XAttribute,... more 6/11/2014 7:15:57 AM