Browsing 7239 questions and answers with Jon Skeet
In order to cast to int, you'll need to cast the result to object first, potentially boxing. It's annoying, but unfortunately it's a limitation of C# generics - for good reasons that escape me right now, unfortunately. So you want: public... more 5/20/2017 8:32:31 PM
Look at what your enregistre method does: BufferedOutputStream stream; stream = new BufferedOutputStream(new FileOutputStream(new File("ben1"))); stream.write(imgFile); stream.close(); If you call that method multiple times, it will... more 5/20/2017 5:00:11 PM
First, stop building SQL like that - use parameterized SQL and a PreparedStatement. Your current code is vulnerable to SQL injection attacks. Basically, don't call rs.next() twice in a row (first in the if then in the while)... you can... more 5/20/2017 4:18:16 PM
.NET Core is an implementation of .NET Standard. It's available on multiple operating systems, but that's not the same thing - there are other implementations of .NET Standard as well. So if you create a .NET Core library, it will have... more 5/20/2017 11:41:26 AM
You want new ArrayList<>(); so that you use the right generic type. At the moment you're using the raw type on the right hand side of =. So you want: private ArrayList<LocoList> myLocations = new ArrayList<>(); Or just... more 5/19/2017 8:00:08 PM
You can't, at the moment. It isn't supported by the API. (I was researching this just yesterday.) There's a feature request to support it which you might like to support and subscribe to, but I don't believe there's any way of doing this... more 5/19/2017 7:45:36 PM
It had occurred to me that the struct was being passed into the RenderFontGlyph function by-value rather than by-ref but this also makes no difference! Well yes, it does. You're creating a copy of the struct, and passing that into... more 5/19/2017 7:08:28 PM
The only constructor you've currently got requires a string to be passed in - but all the enum values (FOOD, BEVERAGE, DEFAULT) don't specify strings, so they can't call the constructor. Two options: Add a parameterless... more 5/19/2017 5:18:51 PM
1463925582232864000 is the nearest 64-bit IEEE-754 floating point number to 1463925582232863984. Numbers in Javascript are (at the moment - I believe this is changing) always 64-bit IEEE-754 floating point numbers. Basically, in order to... more 5/18/2017 4:03:51 PM
"More accurate" requires a specification of how you want to compute the difference. There's no single right answer here. As documented, Noda Time works element-wise. So if you add 1 year, 6 months and 4 days to 28th July 2015 you... more 5/18/2017 5:57:24 AM