Skip to content

Instantly share code, notes, and snippets.

View vietj's full-sized avatar
🤖
Coding the Future

Julien Viet vietj

🤖
Coding the Future
View GitHub Profile
shared VertxOptions toVertxOptions(JsonObject json) {
Integer? blockedThreadCheckInterval = json.getIntegerOrNull("blockedThreadCheckInterval");
String? clusterHost = json.getStringOrNull("clusterHost");
Integer? clusterPingInterval = json.getIntegerOrNull("clusterPingInterval");
Integer? clusterPingReplyInterval = json.getIntegerOrNull("clusterPingReplyInterval");
Integer? clusterPort = json.getIntegerOrNull("clusterPort");
Boolean? clustered = json.getBooleanOrNull("clustered");
Integer? eventLoopPoolSize = json.getIntegerOrNull("eventLoopPoolSize");
Boolean? haEnabled = json.getBooleanOrNull("haEnabled");
String? haGroup = json.getStringOrNull("haGroup");
# Handlers
handlers = java.util.logging.FileHandler
# File logging
java.util.logging.FileHandler.level=ALL
java.util.logging.FileHandler.pattern=%h/crash%u.log
java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
java.util.logging.FileHandler.append=true
java.util.logging.FileHandler.count=1
Pour 4 pain polaire:
- 500 g de farine ou 400 gr de farine de blé + 100 gr de farine de seigle
- 2 sachets de levure de boulangerie déshydratée
- 240 cl d'eau
- 80 gr de creme fraîche
- 15 gr de sel
- 20 gr de sucre semoule
1/ pétrir tous les ingrédients
% man thread ls
NAME
thread ls - list the vm threads
SYNOPSIS
thread [-h | --help] ls [-n | --name] [-g | --group] [-s | --state]
STREAM
thread ls <java.lang.Void, java.lang.Thread>
% ls
-rwx 1525   May 27 16:45 crash.bat
-rw- 155277 May 27 16:37 crash.cli-1.3.0-beta22.jar
-rwx 3211   May 27 16:45 crash.sh
public interface Handler<T> {}
public interface AsyncResult<T> {}
public class Adapter<J> implements Handler<AsyncResult<J>> {}
@CompileStatic
public class Foo {
public Foo() {
Handler<AsyncResult<Integer>> adapted = new Adapter<Integer>();
}
}
else if (obj instanceof CharSequence) {
converted.put(entry.getKey(), obj.toString());
} else if (obj == null || obj instanceof Number || obj instanceof Boolean) {
// OK
converted.put(entry.getKey(), obj);
}
Tests in error:
APITest.testMethodWithHandlerAsyncResultListJsonObject:155->JSTestBase.runTest:15 » Script
APITest.testMethodWithHandlerListVertxGen:115->JSTestBase.runTest:15 » Script ...
APITest.testMethodWithHandlerAsyncResultSetJsonObject:160->JSTestBase.runTest:15 » Script
APITest.testMethodWithHandlerSetJsonArray:140->JSTestBase.runTest:15 » Script ...
APITest.testMethodWithHandlerListJsonObject:125->JSTestBase.runTest:15 » Script
APITest.testMethodWithHandlerAsyncResultListVertxGen:145->JSTestBase.runTest:15 » Script
APITest.testMethodWithHandlerSetJsonObject:130->JSTestBase.runTest:15 » Script
APITest.testMethodWithHandlerAsyncResultListJsonArray:165->JSTestBase.runTest:15 » Script
APITest.testMethodWithHandlerSetVertxGen:120->JSTestBase.runTest:15 » Script T...
public void methodWithHandlerAsyncResultListJsonArray(Handler<AsyncResult<List<List<Object>>>> listHandler) {
delegate.methodWithHandlerAsyncResultListJsonArray(
new Handler<AsyncResult<List<JsonArray>>>() {
public void handle(AsyncResult<List<JsonArray>> event) {
listHandler.handle(event.succeeded() ?
new io.vertx.core.impl.FutureResultImpl<List<List<Object>>>(
event.result().collect({ io.vertx.core.json.JsonArray element -> element.toList() }) as List) :
new io.vertx.core.impl.FutureResultImpl<List<List<Object>>>(event.cause()))
}
});
ceylon.collection
ceylon.json
ceylon.language
com.fasterxml.jackson.annotations
com.fasterxml.jackson.core
com.fasterxml.jackson.databind
com.github.rjeschke.txtmark
com.googlecode.sardine
com.redhat.ceylon.common
com.redhat.ceylon.compiler.java