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
| angular.module('Plite', []).directive('panel', () -> | |
| { | |
| restrict: 'E', | |
| replace: true, | |
| transclude:true, | |
| templateUrl: 'partials/main/panel', | |
| scope: true, | |
| controller : [ | |
| '$scope', '$element', '$attrs', | |
| ($scope, $element, $attrs) -> |
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 com.vidal.bo.test.webapp; | |
| import org.eclipse.jetty.server.Server; | |
| import org.eclipse.jetty.webapp.WebAppContext; | |
| /** | |
| * Created with IntelliJ IDEA. | |
| * User: jcheype | |
| * Date: 18/06/13 | |
| * Time: 13:24 |
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
| class KryoInjection2(val output: Output) extends Injection[AnyRef, Array[Byte]] { | |
| val input: Input = new Input() | |
| val kryo = KryoBijection.getKryo | |
| def register(clazz: Class[_]) { | |
| kryo.register(clazz) | |
| } | |
| def apply(obj: AnyRef): Array[Byte] = { | |
| output.clear() |
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
| def main(args: Array[String]) { | |
| val kryo = new KryoInjection2(new Output(1024 * 4)) | |
| kryo.register(classOf[String]) | |
| for (_ <- 1 to 100000) { | |
| kryo("toto") | |
| } | |
| Thread.sleep(1000) |
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
| object Main { | |
| def main(args: Array[String]) { | |
| // javafx.application.Application.launch(classOf[Main]) | |
| val system = ActorSystem("MySystem") | |
| val greeter = system.actorOf(Props[GreetingActor], name = "greeter") | |
| greeter ! Greeting("Charlie Parker") | |
| } | |
| } |
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
| @Override | |
| public void messageReceived(ChannelHandlerContext ctx, MessageEvent event) { | |
| HttpRequest httpRequest = (HttpRequest) event.getMessage(); | |
| logger.debug("Request: {}", httpRequest); | |
| QueryStringDecoder qs = new QueryStringDecoder(httpRequest.getUri()); | |
| final Request request = new Request(ctx, httpRequest, qs); | |
| final Response response = new Response(ctx, httpRequest); |
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 com.jcheype.neoTest; | |
| import com.google.common.base.Predicates; | |
| import com.google.common.collect.Maps; | |
| import com.jcheype.neoTest.manager.MonographieManager; | |
| import com.mongodb.DBCursor; | |
| import com.mongodb.DBObject; | |
| import com.mongodb.Mongo; | |
| import org.bson.types.ObjectId; | |
| import org.neo4j.cypher.javacompat.ExecutionEngine; |
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
| select docid from ovp_monographie (all) where " + FOLDER + " and subject like '%ASAP%' GROUP BY (docid) having count(docid) > 1 |
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 com.jcheype.webServer.scala | |
| import org.scalatest.{BeforeAndAfter, FunSuite} | |
| import org.apache.http.client.methods.HttpGet | |
| import org.apache.http.HttpResponse | |
| import org.apache.http.impl.client.DefaultHttpClient | |
| import org.scalatest.matchers.ShouldMatchers | |
| /** | |
| * Created with IntelliJ IDEA. |
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 com.jcheype.codeStory | |
| import scala.util.DynamicVariable | |
| import com.jcheype.webServer._ | |
| import org.scalatra._ | |
| import org.jboss.netty.bootstrap.ServerBootstrap | |
| import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory | |
| import java.util.concurrent.Executors | |
| import com.jcheype.webServer.Route | |
| import java.net.InetSocketAddress |