Get the distinct values of an array in Javascript ES6

let arr = [3, 5, 2, 2, 5, 5];
let unique = [...new Set(arr)]; // [3, 5, 2]
let arr = [3, 5, 2, 2, 5, 5];
let unique = [...new Set(arr)]; // [3, 5, 2]
Integer i1 = Integer.valueOf(1);
Integer i2 = Integer.valueOf(1);
boolean b1 = i1 == i2; // true
i1 = Integer.valueOf(1000);
i2 = Integer.valueOf(1000);
boolean b2 = i1 == i2; // false
i1=1;
i2=1;
boolean b3 = i1 == i2; // true
i1=1000;
i2=1000;
boolean b4 = i1 == i2; // false
i1=126;
i2=126;
boolean b5 = i1 == i2; // true
i1++;
i2++;
boolean b6 = i1 == i2; // true
i1++;
i2++;
boolean b7 = i1 == i2; // false
i1 = 2000;
i2 = i1;
boolean b8 = i1 == i2; // true
i1++;
i1--;
boolean b9 = i1 == i2; // false
Tonight I went to an ADCES presentation about SQL table partitioning, a concept that allows for a lot of flexibility while preserving the same basic interface for a table one would use for a simpler and less scalable application. The talk was very professionally held by Bogdan Sahlean and you should have been there to see it :)
He talked about how one can create filegroups on which a table can be split into as many partitions as needed. He then demonstrated the concept of partition switching, which means swapping two tables without overhead, just via metadata, and, used in the context of partitions, the possibility to create a staging table, do stuff on it, then just swap it with a partition with no downtime. The SQL scripts used in the demo can be found on Sahlean's blog. This technology exists since SQL Server 2005, it's not something terribly new, and features with similar but limited functionality existed since SQL Server 2000. Basically the data in a table can be organized in separate buckets and one can even put each partition on a different drive for extra speed.
Things I've found interesting, in no particular order:
The prohibition against using null as a switch label prevents one from writing code that can never be executed. If the switch expression is of a reference type, that is, String or a boxed primitive type or an enum type, then a run-time error will occur if the expression evaluates to null at run time.
The only fantastical element in this book, except for a ghost that makes a short appearance, is a change in location. The rest is historical fiction in some place that feels exactly like Renaissance Europe, only it has another name and other gods. Worst than that, the story is boring and the writing mediocre. I couldn't finish it.
The story in Children of Earth and Sky follows a few chosen characters while they navigate the treacherous waters lying between warring (and spying) nations. I mean this both metaphorically and literally, since it is also about ships crossing the sea. Guy Gavriel Kay has been writing published works since 1984 which is why I was surprised to see such an amateurish writing style. He uses several tools again and again and again, without much effect. The worse, for me, was describing the same scene from different viewpoints, one after another, even if it did nothing to enrich the story or develop characters. Another is a certain repetition of a phrase for emphasis, something like "He didn't like the book. He didn't." OK, emphasized enough! Also I felt that the author coddled his characters too much. Instead of making them suffer in interesting situations, he just lets them off easy with crises that they can easily handle or at least manage with heroic skill. In one of the most important scenes, one of a battle, he kills off a major character, at which point I was thinking "OK, it's getting started", only to resurrect them immediately after. Ugh!
So beside being a boring historical drama (I mean boring even for a historical drama!), it really nagged me that it was marketed as fantasy. Maybe I am just getting fed up, considering I've just read a western and a heist story, both included in the fantasy and sci-fi genre because they happened in the future or in spaaaaaace. Bottom line: I can't in good conscience recommend this book and I am quite amazed that it has such a high rating.