Browsing 7239 questions and answers with Jon Skeet
All of the anonymous inner classes appear to include the generated code, as if you'd decompiled an existing class file (which I suspect you have). Each time you have something like this: jmenuitem1.addActionListener(new ActionListener()... more 12/3/2014 7:11:00 AM
Now that we know that the value is stored as a DateTime (in UTC), you just need to find the UTC time of midnight at the start of today, and the UTC time of midnight at the end of today. If you're happy to use the system time zone, you... more 12/2/2014 2:15:08 PM
Well it's easy to build such a method, but that would use a lambda expression for the implementation: public Func<TResult> Bind<T, TResult>(Func<T, TResult> func, T arg) { return () => func(arg); } And likewise... more 12/2/2014 1:48:18 PM
There are three problems here: You're using four parameters, but only specifying 3 of them. (Comments suggest that you're specifying the other one outside the loop) On any one iteration you're only populating at most one of the... more 12/2/2014 11:53:27 AM
The two values you're getting are very similar - it's just that the representations are different. That's primarily because in the Java version you're multiplying by 1e6 which is a floating-point literal, so the result is a double, which... more 12/2/2014 11:04:54 AM
It's not entirely clear, but I suspect the problem may well be how you're formatting the date. This: old.ToString("yyyy-mm-dd hh:mm:ss") should almost certainly be this: old.ToString("yyyy-MM-dd HH:mm:ss") or... more 12/2/2014 9:48:10 AM
System.Web.HttpContext.Current.Server isn't a namespace. Let's break it down: System.Web is a namespace HttpContext is a type (in the System.Web assembly) Current is a static property within HttpContext, returning an HttpContext... more 12/2/2014 7:00:57 AM
Even though type erasure means that at execution time the VM can't distinguish between an ArrayList<String> and an ArrayList<Integer> (they're both just instances of ArrayList) the compiler does know about the type argument,... more 12/2/2014 6:54:31 AM
Firstly, you clearly need to remove the using (_stream) as that will dispose of the stream directly. Secondly, the StreamWriter will also dispose of the stream as well, with your current code. Options for this are: Don't have a using... more 12/1/2014 5:25:51 PM
The values of obj1 and obj2 refer to different objects - when you use == in Java and both operands are references, the result is to compare whether those references refer to the exact same object. In this case you've got two different... more 12/1/2014 4:27:57 PM