This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| myList.forEach(System.out::println); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Arrays.sort(words, | |
| (String w1, String w2) -> { w2.length() - w1.length() }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Type cast | |
| mustExist = (@NotNull Integer) choice; | |
| // Object creation | |
| new @NoSQLInjection LittleBobbyTables(String input); | |
| // Adding interfaces | |
| class MySetWrapper<T> implements @Immutable Set<@Immutable T> | |
| // Declaring exception |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Optional<String> opt = toBeOrNotToBe(); | |
| if(opt.isPresent()) | |
| return opt.get(); | |
| else | |
| return ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Clock.systemDefaultZone(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LocalTime current = LocalTime.now(); | |
| LocalTime CoB = current.plus(9, HOURS); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for (var i = 0; i < collection.length; i++) { } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| splitLoop( $(".items").toArray(), function (item) { | |
| $(item) .processItem(); | |
| }, this ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function splitLoop(items, process, context, callback) { | |
| var todo = items.concat(); | |
| setTimeout(function () { | |
| var start = +new Date(); | |
| do { | |
| process.call(context, todo.shift()); | |
| } while (todo.length > 0); | |
| if (todo.length > 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function todo(item) { | |
| console.log(item); | |
| }; | |
| function done() { | |
| console.log('done'); | |
| } | |
| var items = []; | |
| for (var i = 0; i < 1000; i++) |