« first day (4490 days earlier)      last day (445 days later) » 

12:00 AM
Too much of everything is just enough. -- Bob Wier (source)
 
 
6 hours later…
6:12 AM
Hi, I'm afraid I need help with AoC 2022.10 ;[
We have this example input and on cycle 220 register is equal 18
I copied this to excel and on cycle 220 I see that register is equal to 19
These are some last rows from excel
during the 20th cycle and every 40 cycles after that (that is, during the 20th, 60th, 100th, 140th, 180th, and 220th cycles
ok, now I see "during" is highlighted... O_o
So register will be 19 on cycle 221, right?
 
 
2 hours later…
8:38 AM
Why do you think this works
```
.sorted(Comparator.comparing(Map.Entry::getValue))
```
but this doesn't
```
.sorted(Comparator.comparing(Map.Entry::getValue).reversed())
```
? For some reason it starts to underline the very same parameter of `comparing()` and says "Non-static method cannot be referenced from a static context". If I add one more element
```
.sorted(Comparator.comparing(Map.Entry::getValue).reversed().thenComparing(e -> e.getKey()))
```
the IDE forgets that it's a stream of `Map.Entri`es altogether and complains that it "cannot resolve method `getKey` in `Object`" 🤷‍♂️
 
 
5 hours later…
1:34 PM
posted on February 07, 2023 by workchronicles

The post Record Profits appeared first on Work Chronicles.

 
1:47 PM
@SergeyZolotarev To get fixed-width font formatting in SO Chat, prefix each line with 4 spaces.
 
 
2 hours later…
3:27 PM
I discovered that if you insert <Map.Entry<String, Integer>, Integer> as the comparing() method's type argument, it works
 
if you dont do .reversed() the compiler can figure out what type parameters it needs
but the compiler doesnt understand how to infer generic types to chained method calls
 
 
6 hours later…
9:55 PM
> On UNIX for example, the path "foo/bar" ends with "foo/bar" and "bar". It does not end with "r" or "/bar".
The docs appear to suggest that only full path segments are taken into account, so the condition does not return true as you appear to have thought and indeed, if the docs are to be believed, it doesn't.
 

« first day (4490 days earlier)      last day (445 days later) »