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
| private <V> V findMostFrequentItem(final Collection<V> items) | |
| { | |
| return items.stream() | |
| .filter(Objects::nonNull) | |
| .collect(Collectors.groupingBy(Functions.identity(), Collectors.counting())).entrySet().stream() | |
| .max(Comparator.comparing(Entry::getValue)) | |
| .map(Entry::getKey) | |
| .orElse(null); | |
| } |
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
| #!/bin/bash | |
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
| usage="usage: $(basename "$0") [-h] [-r] [-s] [-t] -n name | |
| options: | |
| -n name Name of JAR (including .jar extension) | |
| -r restart Restart jar once deployed | |
| -t target Set target, for instance demo1 | |
| -s SSH target Set SSH target, for instance -s usr@my_host -t /home/usr/remote/dir/path | |
| -h [help] |
NewerOlder