Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
#!/bin/bash | |
# Install Monaco font in Linux | |
# Version from nullvideo https://gist.github.com/rogerleite/99819#gistcomment-2799386 | |
sudo mkdir -p /usr/share/fonts/truetype/ttf-monaco && \ | |
sudo wget https://gist.github.com/rogerleite/b50866eb7f7b5950da01ae8927c5bd61/raw/862b6c9437f534d5899e4e68d60f9bf22f356312/mfont.ttf -O - > \ | |
/usr/share/fonts/truetype/ttf-monaco/Monaco_Linux.ttf && \ | |
sudo fc-cache |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
def index(id:String) = Action { | |
getFirstData(id) | |
} | |
private def getFirstData(id:String) = { | |
Cache.get(id) match { | |
case Some(id2) => getSecondData(id2) | |
case None => NotFound | |
} | |
} | |
private def getSecondData(id2:String) = { |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
package com.example.core.application | |
import com.mongodb.casbah.Imports._ | |
import java.util.UUID | |
import com.example.domain.{User, Address, Customer} | |
/** | |
* Contains type classes that deserialize records from Casbah into "our" types. | |
*/ | |
trait CasbahDeserializers { |
import spark.streaming.StreamingContext._ | |
import spark.streaming.{Seconds, StreamingContext} | |
import spark.SparkContext._ | |
import spark.storage.StorageLevel | |
import spark.streaming.examples.twitter.TwitterInputDStream | |
import com.twitter.algebird.HyperLogLog._ | |
import com.twitter.algebird._ | |
/** | |
* Example of using HyperLogLog monoid from Twitter's Algebird together with Spark Streaming's |
MessagePackが文字列とバイナリをわけないのは問題?
Objective Cの実装使ってるとある問題にぶちあたった.なので,文字列をちゃんとバイナリ(Raw)と分けるべき,という提案
(*) 俺は熟読したわけではないので,中身が気になる人はちゃんと本スレを読みましょう
この記事はScala Advent Calendar 2013の7日目の記事です。
昨日は @shogogg さんのScala + sbt-android + IntelliJ で快適Androidアプリ開発でした。
明日は @takezoux2 さんのScalaのParserCombinator実践入門+です。
継続モナドを調べていたら、@terazzo さんのJavaで継続モナドという記事が非常に判りやすかったんですが、サンプルコードがJavaのボイラープレートの嵐でちょっと読むのが辛い感じだったのでScalaで翻訳してみました、というのがこの記事です。
import scalaz._ | |
import Scalaz._ | |
object StateTLearning extends App with StateTFunctions { | |
case class DB(v: Int) | |
val initial = DB(1) | |