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
/** | |
* Generated by Scrooge | |
* version: 3.16.3 | |
* rev: b8593c83072d94fc44feaa8d97940b9266d84ed0 | |
* built at: 20140806-054445 | |
*/ | |
package com.mycorp | |
import com.twitter.scrooge.{ | |
TFieldBlob, ThriftException, ThriftStruct, ThriftStructCodec3, ThriftStructFieldInfo, ThriftUtil} |
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
{ | |
type : "map", | |
source: { | |
type:"mesh2", | |
hash:true, | |
mesh: { | |
files:["hydra-input/*"] | |
}, | |
format:{ | |
type:"column", |
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
package sample | |
import scalacache._ | |
import memoization._ | |
import memcached._ | |
import scala.concurrent.duration._ | |
import scala.language.postfixOps | |
case class User(id: Int, name: String) |
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
#!/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" |
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
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 |
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
// 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 |
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
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. |
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
$ $JAVA_HOME/bin/jjs | |
jjs> print([] + {}); | |
[object Object] | |
jjs> print("WAT"); | |
WAT | |
jjs> |
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 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: |
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 scala.annotation.tailrec | |
class Hello { | |
val foo = "abc" | |
def bar(a: String) = foo + a | |
def fib(n: Int) = { | |
@tailrec |
OlderNewer