Browsing 7239 questions and answers with Jon Skeet
You're multiplying a timestamp which is already in milliseconds since the Unix epoch by 1000. You just want: Date date = new Date(timestamp); If you look at all of the date, not just the time, you'll see it's currently in 46886! more 12/1/2014 12:57:28 PM
It looks to me like you've just got the arguments the wrong way round. This: Expression.Call(method, property, value) means that you're calling: Enumerable.Contains(x.Col_id, ids) whereas you want Enumerable.Contains(ids,... more 12/1/2014 11:40:18 AM
This is the problem: randomTable[t-1][i+1] When t is 0, that will be accessing randomTable[-1][i + 1] - which can never be valid. Likewise you later go on to t - 3. Additionally, your loop is starting at 0 but then going backwards...... more 11/30/2014 8:35:35 PM
There's nothing being passed here at all (in terms of the variables that the compiler complains about) - and everything is passed by value in Java anyway, whether that's a reference or primitive value. The problem is that you're trying to... more 11/30/2014 5:55:43 PM
This is the problem: public void calcNetWasteReduction(){ netWasteReduction = grossWasteEmission = wasteReduction; } That's equivalent to: public void calcNetWasteReduction(){ grossWasteEmission = wasteReduction; ... more 11/30/2014 3:35:22 PM
The problem is that multi-dimensional (rectangular) arrays implement IEnumerable, but not IEnumerable<T>. Fortunately, you can use Cast to fix that - and Cast gets called automatically if you explicitly specify the type of the range... more 11/29/2014 6:38:20 PM
I believe it's just that type inference is failing, basically - because the reverse() call gets in the way of the expected argument type of sorted() and the lambda expression. You can do it if you specify the type to comparingInt... more 11/29/2014 6:14:14 PM
I would keep the score for the player within the Player object itself. Then you can just create a list of the players, and order it with a Comparator<Player> implementation that orders by scores - either deliberately making it... more 11/29/2014 5:42:12 PM
For Java 7, you can call entrySet() to get a Set<Map.Entry<String,ArrayList<Integer>>> - which you can then use to populate something like an ArrayList<Map.Entry<String,ArrayList<Integer>>> which you can... more 11/29/2014 5:20:56 PM
The error describes exactly what is required - your sequence needs to be ordered before skip/take many any sense. You already know what ordering you want - you've just got to make it happen earlier in the logical pipeline than the paging.... more 11/29/2014 10:11:53 AM