https://github.com/project-ethea/After_the_Storm
https://github.com/project-ethea/Invasion_from_the_Unknown
https://github.com/Dugy/Legend_of_the_Invincibles
class ExampleTest { | |
@ParameterizedTest | |
@NaughtyStringSource | |
void myTest( String ex) { | |
Assertions.assertNotNull(ex); | |
} | |
} |
import org.junit.jupiter.api.extension.ExtensionContext; | |
import org.junit.jupiter.params.provider.Arguments; | |
import org.junit.jupiter.params.provider.ArgumentsProvider; | |
import org.junit.jupiter.params.support.AnnotationConsumer; | |
import java.util.stream.Stream; | |
public class BooleanArgumentsProvider implements ArgumentsProvider, AnnotationConsumer<BooleanSource> { | |
BooleanArgumentsProvider() { |
I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.
I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real
import org.redisson.Redisson; | |
import org.redisson.api.RLock; | |
import org.redisson.api.RedissonClient; | |
import org.redisson.config.Config; | |
import java.util.concurrent.TimeUnit; | |
class RedissonManualLock { | |
// a simple way to lock key in Redis using Redisson |
import java.util.Optional; | |
public class FunIsOptional { | |
public static void main(String[] args) { | |
Integer i = 0; | |
System.out.println(Optional.of(i).map(v -> v++).orElse(i--)); | |
// => res = 0 (orElse is evaluated even when not empty) | |
} |
import java.text.DateFormat; | |
import java.text.ParseException; | |
import java.text.SimpleDateFormat; | |
import java.time.Duration; | |
import java.util.Date; | |
import java.util.TimeZone; | |
class TimeChange { | |
public static void main(String[] args) throws ParseException { | |
timeForward("Europe/Paris", "2019-03-31 01:59:59", Duration.ofSeconds(2).toMillis()); // FRANCE +1 |
import java.time.LocalDate; | |
import java.time.LocalDateTime; | |
import java.util.Random; | |
import java.util.UUID; | |
import java.util.concurrent.ThreadLocalRandom; | |
import java.time.Instant; | |
class JavaRandom { | |
public static void main(String[] args) { |
Search Engine | Key word | url |
---|---|---|
Wikipedia | wpd | https://fr.wikipedia.org/w/index.php?search=%s |
GitHub | gh | https://github.com/search?q=%s&ref=opensearch |
Github Gist | gist | https://gist.github.com/search?q=%s&ref=opensearch |
Google Map | gm | https://www.google.com/maps/search/%s?hl=en&source=opensearch |
Maven Central | mc | https://search.maven.org/search?q=%s |
twt | https://twitter.com/search?q=%s | |
Stackoverflow | so | https://stackoverflow.com/search?q=%s |
OpenStreetMap | osm | https://www.openstreetmap.org/search?query=%s |
// See https://issues.apache.org/jira/browse/KAFKA-6987 for ongoing work on KafkaFuture implementation of CompletableFuture | |
private <T> CompletableFuture<T> toCompletableFuture(final KafkaFuture<T> kafkaFuture) { | |
final CompletableFuture<T> wrappingFuture = new CompletableFuture<>(); | |
kafkaFuture.whenComplete((value, throwable) -> { | |
if (throwable != null) { | |
wrappingFuture.completeExceptionally(throwable); | |
} else { | |
wrappingFuture.complete(value); | |
} | |
}); |