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
| package fr.ybonnel.codestory; | |
| import com.google.common.primitives.Longs; | |
| import fr.ybonnel.codestory.path.jajascript.Flight; | |
| import fr.ybonnel.codestory.path.jajascript.JajascriptService; | |
| import org.junit.Ignore; | |
| import org.junit.Test; | |
| import java.util.ArrayList; | |
| import java.util.List; |
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
| package fr.ybo.battle | |
| class Hanoi(val pile1: Seq[Int], | |
| val pile2: Seq[Int], | |
| val pile3: Seq[Int], | |
| val history: Seq[Hanoi]) { | |
| def isFinished: Boolean = { | |
| pile1.isEmpty && pile2.isEmpty | |
| } |
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
| package fr.ybo.battle | |
| object Exercice2 { | |
| def specificSepRegExp = "\\[([^\\[\\]]+)]".r | |
| def defaultSep = Seq("\n", ",") | |
| def add(valeur:String):Int = { |
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
| package fr.ybo.battle | |
| object Exercice3 { | |
| def calculate(feuille:String):Int = { | |
| // decomposition en frames | |
| var countFrame = 0 | |
| var inFrame = false |
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
| 16:41:57.799 [qtp0-10 - /data/channel] ERROR org.mortbay.log - EXCEPTION | |
| net.spy.memcached.OperationTimeoutException: Timeout waiting for value | |
| at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1015) ~[ybo-tv-server.jar:na] | |
| at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1030) ~[ybo-tv-server.jar:na] | |
| at fr.ybo.services.ChannelService.getAll(ChannelService.java:22) ~[ybo-tv-server.jar:na] | |
| at fr.ybo.services.ServiceFactory.callService(ServiceFactory.java:22) ~[ybo-tv-server.jar:na] | |
| at fr.ybo.web.DataServer.doGet(DataServer.java:62) ~[ybo-tv-server.jar:na] | |
| at fr.ybo.WebServer.handle(WebServer.java:32) ~[ybo-tv-server.jar:na] | |
| at org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49) ~[ybo-tv-server.jar:na] | |
| at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) ~[ybo-tv-server.jar:na] |
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
| abstract class Tree() { | |
| shared formal Integer evaluate(); | |
| } | |
| class UnaryOperator(Tree branch, Integer f(Integer t)) extends Tree() { | |
| evaluate() => f(branch.evaluate()); | |
| } | |
| class Constant(Integer constantValue) extends Tree() { |
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
| @Test | |
| public void testCalcul1() { | |
| int i; | |
| // Compile pas, on ne peux pas faire un '++' sur un int non-initialisé. | |
| i = i++; | |
| System.out.println(i); | |
| } | |
| @Test | |
| public void testCalcul2() { |
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
| 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) |
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
| 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 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
| 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); |