The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
def objectReader[T1,T2,T3,T4,R](t1: String, t2: String, t3: String, t4: String)(f: (T1,T2,T3,T4) => R)(implicit readsT1:Reads[T1], readsT2:Reads[T2], readsT3:Reads[T3], readsT4:Reads[T4]): Reads[R] = { | |
def orElse[A](a:A, default: =>A) = if(a!=null) a else default | |
Reads[R]{ | |
case JsObject(fields) => | |
var t1V:JsResult[T1] = null.asInstanceOf[JsResult[T1]] | |
var t2V:JsResult[T2] = null.asInstanceOf[JsResult[T2]] |
/** | |
* Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com> | |
*/ | |
package akka.contrib.mailbox | |
import scala.concurrent.duration._ | |
import java.util.concurrent.atomic.AtomicInteger | |
import java.util.concurrent.atomic.AtomicLong | |
import com.typesafe.config.Config | |
import akka.actor.{ ActorContext, ActorRef, ActorSystem, ExtendedActorSystem } |
// In a js file | |
disqus_config = function() { | |
this.callbacks.afterRender.push(function() { /* your code */ }); | |
this.callbacks.onNewComment.push(function() { /* your code */ }); | |
/* Available callbacks are afterRender, onInit, onNewComment, onPaginate, onReady, preData, preInit, preReset */ | |
} |