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 akka.actor.{Props, ActorSystem, Actor} | |
import akka.pattern.ask | |
import akka.util.Timeout | |
import scala.concurrent.duration._ | |
object Testing extends App { | |
case class Inc(n: Int) | |
class CounterActor extends Actor { | |
private var state = 0 |
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
From 58dd78237b3222e73a62e8dd8a4be001ff49785a Mon Sep 17 00:00:00 2001 | |
From: Adam Warski <adam@warski.org> | |
Date: Tue, 2 Feb 2010 11:52:54 +0100 | |
Subject: [PATCH] Localizing display names of fields in ProtoUser | |
Localizing display names of fields in ProtoUser, also making the localForm method protected instead of public | |
--- | |
.../src/main/resources/i18n/lift-core.properties | 10 +++++++--- | |
.../main/resources/i18n/lift-core_pl.properties | 4 ++++ | |
.../main/scala/net/liftweb/mapper/ProtoUser.scala | 16 ++++++++-------- |
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
# In Rails config: config.logger = RubyToSlf4jLogger.new(config.paths.log.first) | |
require "java" | |
class RubyToSlf4jLogger < Logger | |
include_class "org.slf4j.LoggerFactory" | |
def initialize(logdev) | |
super | |
@logger = LoggerFactory.getLogger("ruby") |
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
object Example { | |
// Works | |
sealed trait Command1[R] // R - return type | |
case class IntCommand1() extends Command1[Int] | |
case class StringCommand1() extends Command1[String] | |
def execute[R](cmd: Command1[R]): R = cmd match { | |
case IntCommand1() => 5 | |
case StringCommand1() => "x" | |
} |
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
Dec 04 08:14:57: 04/Dec/15 07:14:56.764 [app-akka.actor.default-dispatcher-6498] ERROR akka.stream.impl.fusing.ActorGraphInterpreter - Error during postStop in [akka.http.impl.engine.server.HttpServerBluePrint$WebsocketMerge@3e3fce20] | |
Dec 04 08:14:57: java.lang.IllegalArgumentException: requirement failed: Value wasn't set yet | |
Dec 04 08:14:57: at scala.Predef$.require(Predef.scala:219) ~[app.jar:0.1-SNAPSHOT] | |
Dec 04 08:14:57: at akka.http.impl.util.StreamUtils$OneTimeWriteCell.value(StreamUtils.scala:240) ~[app.jar:0.1-SNAPSHOT] | |
Dec 04 08:14:57: at akka.http.impl.engine.server.HttpServerBluePrint$$anon$7.installHandler(HttpServerBluePrint.scala:351) ~[app.jar:0.1-SNAPSHOT] | |
Dec 04 08:14:57: at akka.http.impl.engine.server.HttpServerBluePrint$$anonfun$apply$1$$anonfun$17.apply(HttpServerBluePrint.scala:142) ~[app.jar:0.1-SNAPSHOT] | |
Dec 04 08:14:57: at akka.http.impl.engine.server.HttpServerBluePrint$$anonfun$apply$1$$anonfun$17.apply(HttpServerBluePrint.scala:142) ~[app.jar:0.1-SNAPSHOT] | |
Dec 0 |
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
> db.x.find() | |
{ "_id" : ObjectId("518cfe49a04a86d494396a96"), "a" : "20130430" } | |
{ "_id" : ObjectId("518cfe4ba04a86d494396a97"), "a" : "20130431" } | |
{ "_id" : ObjectId("518cfe4fa04a86d494396a98"), "a" : "20130501" } | |
{ "_id" : ObjectId("518cfe57a04a86d494396a99"), "a" : "20131001" } | |
{ "_id" : ObjectId("518cfe81a04a86d494396a9a"), "a" : "20130520" } | |
> db.x.find({"a": {"$lt": "20130501"}}) | |
{ "_id" : ObjectId("518cfe49a04a86d494396a96"), "a" : "20130430" } | |
{ "_id" : ObjectId("518cfe4ba04a86d494396a97"), "a" : "20130431" } | |
> db.x.find({"a": {"$gt": "20130501"}}) |
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
2013-10-04 11:05:03,921 FATAL org.apache.hadoop.mapred.Child (main): Error running child : java.lang.NoSuchMethodError: org.apache.lucene.util.PriorityQueue.<init>(I)V | |
at org.apache.mahout.math.hadoop.similarity.cooccurrence.TopElementsQueue.<init>(TopElementsQueue.java:33) | |
at org.apache.mahout.math.hadoop.similarity.cooccurrence.RowSimilarityJob$UnsymmetrifyMapper.map(RowSimilarityJob.java:405) | |
at org.apache.mahout.math.hadoop.similarity.cooccurrence.RowSimilarityJob$UnsymmetrifyMapper.map(RowSimilarityJob.java:389) | |
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144) | |
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:771) | |
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:375) | |
at org.apache.hadoop.mapred.Child$4.run(Child.java:255) | |
at java.security.AccessController.doPrivileged(Native Method) | |
at javax.security.auth.Subject.doAs(Subject.java:415) |
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
# docker/recipes/setup.rb: | |
package "docker" do | |
package_name "lxc-docker-0.11.1" | |
action :install | |
end | |
# docker/recipes/kill_containers.rb: | |
script "kill_all_containers" do |
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
implicit def readerDistributive[I]: Distributive[({type R[X]=Reader[I, X]})#R] = new Distributive[({type R[X]=Reader[I, X]})#R] { | |
override def distributeImpl[G[_], A, B](fa: G[A])(f: (A) => Reader[I, B])(implicit gf: Functor[G]): Reader[I, G[B]] = | |
Reader { i => | |
fa.map(a => f(a)(i)) | |
} | |
override def map[A, B](fa: Reader[I, A])(f: (A) => B): Reader[I, B] = fa.map(f) | |
} |
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
/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/bin/java -Didea.launcher.port=7532 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/ |