Browsing 7239 questions and answers with Jon Skeet
1416594600000 corresponds to 2014-11-21T18:30:00Z. In other words, 6.30pm on November 21st 2014 in UTC. Epoch Converter is a great resource for checking things like that. Now, a Date object doesn't have any time zone information itself.... more 7/18/2014 5:07:49 AM
Either using IOUtils.toInputStream("") or new ByteArrayInputStream(new byte[0]) may work. The latter would certainly provide an empty stream, but it may make your code fail because there isn't an empty line to read - there's no line... more 7/18/2014 4:57:51 AM
You're not including a line break after the PING or USER messages. From RFC 2812: IRC messages are always lines of characters terminated with a CR-LF (Carriage Return - Line Feed) pair So you should have: this.writer.Write("PASS... more 7/17/2014 5:47:50 AM
Either you need to supply a mood to the constructor in the superclass (possibly as a constant), or you need to add a constructor to the superclass which doesn't take a mood. You need to ask yourself whether every Question/People really... more 7/17/2014 4:46:38 AM
If you've got a timer updating every 1000ms, then if it happens to take a bit more than 1000ms between calls and you're unlucky enough to be close to a second boundary, then you would see it "skip" a second sometimes. For example, suppose... more 7/17/2014 4:35:23 AM
It's telling me that the type should be IOperatingSystem, but if T implements IOperatingSystem, shouldn't that be sufficient? No. That's just not the way C# works. In order to implement an interface, or override a method, the... more 7/16/2014 7:48:32 PM
When I run linq's Distinct method on the array, nothing is filtered out. Anyone know why? Yes - Equals is going to return false for any two distinct objects. Within your Equals implementation, you're calling the... more 7/16/2014 1:47:02 PM
You only need one lambda expression - the || goes within that: MyList.RemoveAll(t => t.Name == "ABS" || t.Name == "XYZ" || t.Name == "APO"); In other words, "Given a t, I want to remove the element if t.Name is ABS, or if t.Name is... more 7/16/2014 12:23:07 PM
LinkedList has a listIterator(int) method. So you can use: // Start at the end... ListIterator<Foo> iterator = list.listIterator(list.size()); while (iterator.hasPrevious()) { Foo foo = iterator.previous(); } That doesn't... more 7/16/2014 7:17:33 AM
If you just need to do this once, you can let R# do it for you with a Code Cleanup action. Right-click on the project (or solution, or single source file), select "Cleanup code..." and then use profile which includes "Use auto-property,... more 7/15/2014 4:26:29 PM