Browsing 7239 questions and answers with Jon Skeet
It sounds like you just want: String[] outputString = new String[inputString.length]; for (int i = 0; i < inputString.length / 2; i++) { outputString[i * 2] = inputString[i]; outputString[i * 2 + 1] = inputString[i +... more 9/25/2013 10:46:23 PM
This is the problem: while( rs1.next() || rs2.next() || rs3.next() ) If rs1.next() returns true, rs2.next() and rs3.next() won't be called due to short-circuiting. So rs2 and rs3 will both be before the first row. And if rs1.next()... more 9/25/2013 10:03:45 PM
I suspect this is the problem: this.bluePictureBox.Location = this.pictureBox2.Location; You're setting the location of the blue picture box within picture box 2 to be the location of picture box 2 relative to the container. I suspect... more 9/25/2013 9:59:06 PM
The idiomatic approach would be to just use EventHandler. Pass in an appropriate sender if you have one or null otherwise, and EventArgs.Empty. I know it's somewhat crazy, but that's the convention. Bear in mind that plain EventArgs has... more 9/25/2013 9:48:30 PM
How can I create a standard date format like this in Java? Look at the documentation for the r format: The custom format string is "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'". When this standard format specifier is used, the formatting... more 9/25/2013 7:34:32 PM
Why is the value result equal to "Test with an int was called!", instead of "Test with an object was called!"? The conversion to int is "better" than the conversion to object, so the overload taking int is "better" than the one taking... more 9/25/2013 5:55:54 PM
Two options: Specify a "subscription delegate" via a lambda expression. I wouldn't like to guess at what this would look like in VB, but in C# it would be something like: (control, handler) => control.MouseEnter += handler; Then... more 9/25/2013 5:48:35 PM
The problem is that you're using the result of s.charAt(commaSpot) as the second argument - rather than commaSpot itself. You want: head = s.substring(0, commaSpot); tail = s.substring(commaSpot, s.length()); You don't care about the... more 9/25/2013 4:52:21 PM
I strongly suspect that you're running into a compatibility issue with DateFormat. In particular, from the documentation: The format methods in this class implement a subset of Unicode UTS #35 patterns. The subset currently supported... more 9/25/2013 1:59:16 PM
Microsoft.* namespaces are typically .NET namespaces for features which are specific to Windows, e.g. registry access System.* namespaces are "normal" .NET system namespaces Windows.* namespaces are typically part of Windows Runtime aka... more 9/25/2013 1:51:08 PM