A variation of Elisenlebkuchen, which contain no flour. Makes ca 45-60 Lebkuchen, 7cm.
Vegan, gluten-free (with the right kind of oblaten), certainly not low-fat or low-sugar.
- 900g nuts or similar. Preferred mixture:
class LineAggregator extends Actor { | |
var v = "" | |
override def receive = { | |
case Exit => context.stop(self) | |
case Put(line) => v = v + line + "\n" | |
case Get => sender ! v | |
} |
class IntegrationSuite extends FunSuite with ShouldMatchers { | |
test("infinit actor") { | |
val actor= ActorSystem("tail").actorOf(Props[MrActor]) | |
Thread.sleep(10000) | |
actor ! Interrupt | |
Thread.sleep(40054) | |
} | |
def sleepForTimes(ms: Long, times: Long) = { | |
var n = 0 | |
() => { | |
n+=1 | |
if (n <= times) { | |
Thread.sleep(ms) | |
true | |
} else { | |
false | |
} |
object Attribute { | |
case class Attributed[Thing, Attribute](val thing: Thing, val attributes: Set[Attribute] = Set[Attribute]()) { | |
/** Add an attribute. */ | |
def +(a: Attribute) = copy(attributes = attributes+a) | |
/** Change attributes for which the partial function is defined. */ | |
def change(pf: PartialFunction[Attribute,Attribute]) = |
import Mouse | |
import Keyboard | |
import Window | |
{-- | |
Click to stamp! | |
Keys: | |
3-9 stamp shape (corners) | |
r red stamp! | |
t green stamp! |
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
type Body s = { pos:(Int,Int), shape : s } | |
data Shape = Box {w:Int, h:Int} | Bubble {radius:Int} | |
mv: (Int,Int) -> Body a -> Body a | |
mv (x,y) body = | |
let (x0,y0)= body.pos | |
in { body | pos <- (x0+x, y0+y)} | |
myBubble = Body (0,0) <| Bubble {radius=10} |
-- based roughly on http://gamedevelopment.tutsplus.com/tutorials/gamedev-6331 | |
module BubblePhysics where | |
-- plain old pair for coordinates, vectors | |
type Vec2 = (Float,Float) | |
type Body b = { b | | |
velocity: Vec2, -- direction and speed | |
inverseMass: Float, -- we usually use only inverse mass for calculations | |
restitution: Float -- bounciness factor |
type Thing t = { t | a:Int, b: String } | |
type Tag = { c: Int, d: String } | |
type Tagged = Thing Tag | |
thing = { a=3, b="foo" } | |
tagged = { thing | d = "derp" } | |
write: Tagged -> Element | |
write {a,b,c,d} = asText <| join " " [show c, d] |