Browsing 7239 questions and answers with Jon Skeet
What is the difference between two declaration? Nothing, as this is C#. In general, if you declare anything in C# without using access modifiers, it's equivalent to using the most private valid access modifier for that place1. So... more 5/1/2017 6:42:28 PM
Your machine has an old version of time zone data, in which Egypt would have put the clocks forward at midnight local time at the start of April 28th 2017. Therefore 12:31am wouldn't have existed, and Java is skipping forward by an hour... more 4/28/2017 3:53:08 PM
The static Handlebars.RegisterTemplate(string, string) method was added in this commit on January 31st 2017. The last NuGet release of Handlebars.Net was in October 2016 - so you don't have access to it yet. Options: Wait for it to be... more 4/27/2017 5:39:29 PM
It sounds like you should write a method that retrieves "the part of the string which isn't in brackets" (e.g. using regular expressions). Then you can use: var ordered = collection.OrderBy(RemoveTextInBrackets); Your... more 4/26/2017 10:30:23 AM
Construction a type would be a workaround but inacceptable for me, since it would get too complicated. That's the only way of getting values that will behave normally. You can get at the fields of an open type, and the bizarre thing... more 4/26/2017 10:27:48 AM
Can someone explain to me what is going on? Yes, you're misusing your data. The result of BigDecimal.toByteArray() is not a UTF-8-encoded representation of a string, so you shouldn't try to convert it to a string that way. Some... more 4/26/2017 7:14:38 AM
As you're using .NET 3.5, there are no particularly easier ways of simplifying this - although if you find yourself needing it frequently, you could always write your own static methods to emulate the new overloads of string.Join. It's... more 4/25/2017 3:59:35 PM
The oddity isn't in getDeclaredMethods() - it's in the class file for B, with a body that just calls super.foo(). I don't fully understand it, but it appears to be related to foo() being a public method declared in a package-private... more 4/25/2017 10:22:48 AM
Firstly, code like this is almost always a mistake. Java provides quite a lot of options when it comes to text formatting for date/time types... I'd recommend using java.time as far as possible. However, in terms of how this code takes... more 4/25/2017 5:56:15 AM
I'm not 100% sure whether this link is still relevant or not, but the Adobe Flash ActionScript documentation still has Math.pow: Computes and returns base to the power of pow. more 4/25/2017 5:48:00 AM