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
diff --git a/akka-actor/src/main/scala/akka/actor/ActorRef.scala b/akka-actor/src/main/scala/akka/actor/ActorRef.scala | |
index ce62987..fbe6eef 100644 | |
--- a/akka-actor/src/main/scala/akka/actor/ActorRef.scala | |
+++ b/akka-actor/src/main/scala/akka/actor/ActorRef.scala | |
@@ -949,7 +949,8 @@ class LocalActorRef private[akka] ( | |
failedActor.postRestart(reason) | |
case _ => | |
failedActor.preRestart(reason) | |
- val freshActor = newActor | |
+ val restartFactory = newActor(failedActor.getRestartFactory(reason).getOrElse(actorFactory)) |
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
class NewRouter extends Actor { | |
self.faultHandler = OneForOneStrategy(List(classOf[Throwable]), 5, 5000) | |
var sendCount = 0 | |
def receive = { | |
case Send(tag) => | |
val routeBackTo = self.sender | |
val riskyWorker = actorOf(new Actor { | |
self.lifeCycle = Permanent | |
def receive = { | |
case "go" => |
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 ReqRspActor { | |
object ReqRspProtocol { | |
case class UnknownMessage(msg: String) extends Exception(msg) | |
case class FutureException(exception: Throwable) | |
} | |
object ResendOrNot extends Enumeration { | |
type ResendOrNot = Value | |
val Resend, DoNotResend = Value | |
} |
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._ | |
import akka.actor.Actor._ | |
import akka.dispatch.{Future, CompletableFuture, DefaultCompletableFuture, FutureTimeoutException} | |
/************************************************ | |
* Toolkit stuff | |
************************************************/ | |
// Something to derive from |
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"?> | |
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"> | |
<!-- =============================================================== --> | |
<!-- Configure the Jetty Server --> | |
<!-- --> | |
<!-- Documentation of this file format can be found at: --> | |
<!-- http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax --> | |
<!-- --> | |
<!-- Additional configuration files are available in $JETTY_HOME/etc --> |
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 ReqRspActor { | |
object ReqRspProtocol { | |
case class UnknownMessage(msg: String) extends Exception(msg) | |
case class FutureException(exception: Throwable) | |
} | |
object HandledOrNot extends Enumeration { | |
type HandledOrNot = Value | |
val MessageHandled, MessageNotHandled = Value | |
} |
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
export DIRSTACK_MAX=15 | |
DS=() | |
function eecho | |
{ | |
echo $@ 1>&2 | |
} | |
function shiftStackUp | |
{ |
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
#!/usr/bin/python | |
import socket | |
import re | |
from time import sleep | |
from os import system | |
from threading import Thread | |
from optparse import OptionParser | |
parser = OptionParser() |
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
// This just illustrates some nice aspects of the Option type with List and 'flatten' as well as named parameters | |
// Some "complex" object here | |
val defaultSubField1: SubField = ... | |
val defaultSubField2: SubField = ... | |
val defaultSubField3: SubField = ... | |
def createTestComposite(identifier: String = "default", something: Boolean = true, | |
subField1: Option[SubField] = Some(defaultSubField1), | |
subField2: Option[SubField] = Some(defaultSubField2), |
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
" When I'm editing some LaTeX, I use PDF files to handle any inserted images and | |
" LaTeX has some difficulty lining them up right, so I explicitly state the | |
" viewport. To get the bounding box from the PDF file, I have a script called | |
" 'getbb'. This function is /very/ specific to my needs. It pulls the filename | |
" from the current line, which always looks something like this: | |
" | |
" \includegraphics[scale=0.5, viewport = 40 39 703 153]{target/filename.pdf} | |
" | |
" Pulls out the filename (i.e. target/filename.pdf), runs 'getbb' on that and | |
" inserts the output back overtop of the "viewport = 40 39 703 153". |
OlderNewer