Browsing 7239 questions and answers with Jon Skeet
It sounds like you want something like: @{Year == 2014 && Month == 4 ? "True" : "False"} more 4/28/2014 6:19:38 PM
This is the problem: this._elements = elements .Distinct() .Select(e => new UseCounter<T>(e)); This is lazy. Every time you iterate over _elements, it will go back to the original source data, find a distinct set, and... more 4/28/2014 5:03:51 PM
If the checkbox is not checked, the request won't contain any subscribe parameter, so checked will be null. You want something like: String checked = request.getParameter("subscribe"); if (checked != null && !checked.isEmpty()) { ... more 4/28/2014 4:47:52 PM
Note: this turned out not to be the issue in this case, but if you're reading this question because you've faced the same symptom, it could be the issue for you... According to my understanding of the Java spec, this means that the... more 4/28/2014 4:08:57 PM
Using TryParseExact is the right way to go about it, but you need to use the right format specifiers. In this case, I think you want: bool valid = DateTime.TryParseExact(strDate, "yyyyMMdd_HHmmssff", ... more 4/28/2014 11:50:44 AM
You're never executing the statement: conn.prepareStatement("" + "UPDATE SEAT" + "SET reserved='1337',booked='1337',booking_time='1337'" + "WHERE plane_no='" + plane_no + "';" ); conn.commit(); You're ignoring... more 4/28/2014 11:07:08 AM
You need to distinguish between variables, objects and references. The values of x and y are not objects - they're just references. The assignment operator just copies the value from the expression on the right to the variable on the... more 4/28/2014 6:10:58 AM
The call to super must be the first statement in the constructor body. From section 8.8.7 of the JLS: The first statement of a constructor body may be an explicit invocation of another constructor of the same class or of the direct... more 4/28/2014 6:06:16 AM
This is the problem: while ((b = stream.read()) != -1) { stringBuilder.append((char) b); } That's effectively using ISO-8859-1. Instead, you should create an InputStreamReader from the InputStream, specifying UTF-8 as the encoding... more 4/27/2014 6:55:42 PM
So will it give me wrong logged time for userId 3 and 4 or not? If wrong, what is solution for it? If you actually record the value with GMT+0 won't give you the wrong answer. It doesn't matter what the local time is for the user -... more 4/27/2014 4:09:37 PM