This file contains 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 | |
./kafka_2.12-2.3.1/bin/kafka-topics.sh --create --topic foobar --bootstrap-server b-1.demo-cluster-1.8hn95l.c3.kafka.eu-west-1.amazonaws.com:9092 --partitions 4 --replication-factor 2 |
This file contains 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
import java.util.Comparator; | |
import java.util.List; | |
public class Problem { | |
public static int productOfNumbers(List<Integer> numbers) { | |
Number result = numbers.stream() | |
.map(n -> new Number(Math.abs(n), n < 0)) | |
.sorted(Comparator.reverseOrder()) | |
.limit(3) |