Browsing 7239 questions and answers with Jon Skeet
There's no such thing as "UTF-8 codepoints" - there are UTF-8 code units, or Unicode code points. In the string MenĂ¼, there are 4 code points: U+004D U+0065 U+006E U+00FC For BMP characters (i.e. those in the range U+0000 to U+FFFF)... more 8/10/2016 11:02:20 AM
The only purpose of an import statement is to allow you to use a type (or a method etc, for import static) without fully-specifying the name. It doesn't make the type available - it just makes it available by short name. In this case, the... more 8/10/2016 7:56:13 AM
If your executeQuery method only has a parameter of FormattableString, then you should be fine already - there's no conversion from string to FormattableString. For example: using System; class Program { static void Main(string[]... more 8/10/2016 7:18:39 AM
Basically, your enum isn't suitable for use with bitwise operations. To be appropriate for bitwise operations, each distinct value should be represented by a different bit - whereas you've just got the numbers 0-6. The reason you're... more 8/10/2016 6:40:04 AM
Just use Expression.Constant and pass in typeof(int) as the value: var expression = Expression.Constant(typeof(int), typeof(Type)); That's what happens when you use typeof within a lambda expression,... more 8/9/2016 11:30:30 PM
Your loop is performing the add after it's performing the check. So you probably just want: while (year >= cal.get(Calendar.YEAR)) { System.out.println(sdf.format(cal.getTime())); cal.add(Calendar.DAY_OF_MONTH, 7); } That... more 8/9/2016 10:16:00 PM
(Caveat: I work on the team building the equivalent library for .NET. That means I know a certain amount of the infrastructure involved, but I don't know any Java-specific details.) If you're just trying to use the PubSub v1 API, I... more 8/9/2016 9:48:24 PM
The simplest approach would be to convert the DateTime to a LocalDateTime and take the Date part: var date = LocalDateTime.FromDateTime(dateTime).Date; I'd expect that to be more efficient than obtaining the year, month and day from... more 8/9/2016 9:24:02 PM
Well yes, you can, with your own delegate declaration: delegate SelfReturner<T> SelfReturner<T>(T value, string name); static SelfReturner<T> NotNull<T>(T value, string name) { if (value == null) throw new... more 8/2/2016 9:41:55 PM
It looks like you should be able to just get rid of your Measures class. Instead, put the dictionary straight into your Body class: public class Body { public string _id { get; set; } public Place place { get; set; } public... more 7/31/2016 9:37:58 PM