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
// Read inputs from System.in, Write outputs to System.out. | |
// Your class name has to be Solution | |
import java.util.*; | |
import java.io.*; | |
import java.math.*; | |
class Solution { | |
public static void main(String args[]) { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<testsuite name="net.codestory.http.StaticPagesTest" time="1.306" tests="8" errors="0" skipped="0" failures="1"> | |
<properties> | |
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/> | |
<property name="sun.boot.library.path" value="D:\tools\com\sun\java\jdk\1.8.0\jre\bin"/> | |
<property name="java.vm.version" value="25.0-b63"/> | |
<property name="java.vm.vendor" value="Oracle Corporation"/> | |
<property name="java.vendor.url" value="http://java.oracle.com/"/> | |
<property name="path.separator" value=";"/> | |
<property name="guice.disable.misplaced.annotation.check" value="true"/> |
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
----- pid 10319 at 2014-02-05 20:03:55 ----- | |
Cmd line: fr.ybo.transportsrennes | |
JNI: CheckJNI is off; workarounds are off; pins=0; globals=150 | |
DALVIK THREADS: | |
(mutexes: tll=0 tsl=0 tscl=0 ghl=0) | |
"AsyncTask #1" prio=5 tid=10 WAIT | |
| group="main" sCount=1 dsCount=0 obj=0x426aa108 self=0x52497008 |
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.Optional; | |
import java.util.TreeMap; | |
import java.util.function.BinaryOperator; | |
public class TemporelMap<K extends Comparable<K>, V> { | |
private TreeMap<K, V> treeMap = new TreeMap<>(); | |
private BinaryOperator<V> add; | |
public TemporelMap(BinaryOperator<V> add) { |
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.concurrent.TimeUnit; | |
import java.util.function.Supplier; | |
import java.util.stream.IntStream; | |
/** | |
* I tried to compare Java 7 and Java 8 (functional way) syntax on a small problem. | |
* I Also compare performances just for fun. | |
*/ | |
public class Exercice6 { |
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
jsonp("CALLBACK", "/jsonp", (param, routeParams) -> new Response<>("Hello World")); | |
get("/resource", (param, routeParams) -> new Response<>("Hello World")); | |
get("/resource/:name", Void.class, (param, routeParams) -> { | |
if (routeParams.getParam("name").equals("notfound")) { | |
throw new HttpErrorException(404); | |
} | |
return new Response<>("Hello " + routeParams.getParam("name")); | |
}); |
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
var TIMEFRAME = 20; | |
var BRIGHTNESS0 = 25; | |
var BRIGHTNESSSTEPS = 31; // up to 31 on Chrome that has better performance | |
if (navigator.userAgent.indexOf("Firefox")!=-1) | |
BRIGHTNESSSTEPS = 6; | |
var BRIGHTNESSTABLE = []; | |
var BRIGHTNESSTABLERGB = []; | |
var HISTORY = 25; | |
var GRIDWIDTH = 10; | |
var MESSAGESTEP = 30; |
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
public AbstractHandler getHandler() { | |
return new AbstractHandler() { | |
@Override | |
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { | |
if (request.getPathInfo().equals(route + "/nextCommand")) { | |
String nextCommand; | |
synchronized (elevator) { | |
nextCommand = elevator.nextCommand(); | |
} | |
response.getWriter().print(nextCommand); |
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
git clone https://github.com/golo-lang/golo-lang.git | |
find golo-lang -type f -exec wc -l {} \; | grep -v '.git' | grep '\.' | while read a | |
do | |
echo "$a `echo $a | cut -d'.' -f2`" | |
done | awk '{ | |
total += $1; | |
total_by_type[$3] += $1 | |
} | |
END { | |
print "Nombre de lignes totales de golo : "total; |
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
Error during dispatching of java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=org.infinitest.EventNormalizer$1$1@1b9086c,notifier=null,catchExceptions=false,when=1367497227897] on sun.awt.windows.WToolkit@10cbe41: java.lang.reflect.InvocationTargetException | |
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException | |
at org.infinitest.EventNormalizer$1$1.run(EventNormalizer.java:142) | |
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251) | |
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:721) | |
at java.awt.EventQueue.access$200(EventQueue.java:103) | |
at java.awt.EventQueue$3.run(EventQueue.java:682) | |
at java.awt.EventQueue$3.run(EventQueue.java:680) | |
at java.security.AccessController.doPrivileged(Native Method) | |
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) |