Install the essentials.
$ brew update && brew install elasticsearch && brew install apache-spark
Start ES.
$ elasticsearch
{ | |
type : "map", | |
source: { | |
type:"mesh2", | |
hash:true, | |
mesh: { | |
files:["hydra-input/*"] | |
}, | |
format:{ | |
type:"column", |
package sample | |
import scalacache._ | |
import memoization._ | |
import memcached._ | |
import scala.concurrent.duration._ | |
import scala.language.postfixOps | |
case class User(id: Int, name: String) |
#!/bin/sh | |
if [ $* -n 3 ]; then | |
echo "Usage: $(basename $0) subs.srt in.avi out.avi" | |
exit 1 | |
fi | |
mencoder -oac copy -ovc lavc -sub "$1" -utf8 -subfont-text-scale 3.3 -subpos 96 "$2" -o "$3" |
HAI | |
BTW BrainFuck interpreter in LOLCODE by Chris Birchall | |
I HAS A MEMORY BTW array of size 30,000 | |
I HAS A POINTER | |
POINTER R 0 | |
I HAS A BRACKETS BTW array mapping opening and closing brackets | |
CAN HAS STDIO? | |
PLZ OPEN FILE "LOLCATS.TXT"? | |
AWSUM THX | |
IM IN YR BRACKETSLOOP |
// case class Tweet(userId: Long, country: String, firstName: String, secondName: String) | |
res57: Seq[Tweet] = ArrayBuffer(Tweet(625052628,United States,matt,todorowski), Tweet(625052628,United States,matt,todorowski)) | |
scala> res57(0).id == res57(1).id | |
res59: Boolean = true | |
scala> res57(0).country == res57(1).country | |
res60: Boolean = true |
String concatenation happens before the tree is passed to your macro, | |
so you get passed a Literal(Constant("ab")) | |
scala> reify(() => "a" + "b") | |
res14: res0.universe.Expr[() => String] = Expr[() => java.lang.String]((() => "ab")) | |
This is not the case with other String ops. | |
I guess + is special because it's a Java operator, not a method on StringLike. |
$ $JAVA_HOME/bin/jjs | |
jjs> print([] + {}); | |
[object Object] | |
jjs> print("WAT"); | |
WAT | |
jjs> |
import scalaz.Reader | |
case class User(id: Int, name: String) | |
case class Interest(name: String) | |
trait Database | |
trait Attempt1 { | |
// How every explanation of Reader monad I've seen/read goes: |
Install the essentials.
$ brew update && brew install elasticsearch && brew install apache-spark
Start ES.
$ elasticsearch
import scala.annotation.tailrec | |
class Hello { | |
val foo = "abc" | |
def bar(a: String) = foo + a | |
def fib(n: Int) = { | |
@tailrec |