Browsing 7239 questions and answers with Jon Skeet
Each time you call menuCaller, you're creating a new list. Perhaps you should create it in the main method and pass the reference into menuCaller: public static void main(String[] args) { String con; List<String> names =... more 6/22/2015 12:51:18 PM
If you're happy to convert it into LINQ to XML, it's really simple: XDocument original = ...; // However you load the original document // Separated out for clarity - could be inlined, of course string xpath = "//Person[not(PersonID =... more 6/22/2015 9:04:51 AM
For a single event, knowing the UTC instant on which it occurs is usually enough, so long as you have the right UTC instant (see later). For repeated events, you need to know the time zone in which it repeats... not just the UTC offset,... more 6/22/2015 8:23:50 AM
You have a 2D array which is 6x2 - not one which is 2x6. Each "subarray" you're specifying in the initialization is one "row", if you think of accessing the array by array[row, column]. So for example, myArray[0, 1] is 375 - the second... more 6/22/2015 5:46:14 AM
Just because the declared type is OutputStream, that doesn't mean the implementation doesn't create an instance of a concrete subclass of OutputStream. You see this all the time with interfaces. For example: public List<String>... more 6/21/2015 7:32:43 PM
Just remove :string. You're not really constraining the value of the id anyway - it's already a string in the URL. This fairly old blog post lists the available constraints - and you can see there's no :string constraint, because you... more 6/20/2015 7:55:23 AM
If a type wrapper is immutable, why then is the value increased between line "1. inc" and "2. inc" Because you're not actually mutating the existing Integer object - you're creating a new one (well, effectively - actually it'll use... more 6/19/2015 3:29:37 PM
Just subtract 31 days. For example: LocalDate current = new LocalDate(2015, 6, 19); LocalDate x = current.minusDays(31); // 2015-05-19 To get the current date, you could use: LocalDate current = new LocalDate(); // Default time... more 6/19/2015 8:00:52 AM
U+FEFF is the byte order mark. It's used to indicate the character encoding/endianness (to you can easily tell the difference between big and little-endian UTF-16, for example). If it's causing you a problem, the simplest thing is just to... more 6/19/2015 7:48:17 AM
A memory stream isn't a file. It's just data. The concept of setting a filename and extension on a memory stream simply doesn't make sense - any more than it would for a byte[]. more 6/19/2015 6:26:44 AM