- JRebelを利用すると、アプリケーションの再起動なしで実行中のアプリケーションに加えた変更を即座に反映することができます(ホットリローディング)。まるでPHPのようにサクサク書けるッ!
- Scala開発者にはライセンスが$0で提供されます。Javaで利用する場合は購入してね☆彡
以下がインストールされているものとする。
以下がインストールされているものとする。
原著者: | Adrian Holovaty |
---|---|
原文: | Why I left Heroku, and notes on my new AWS setup |
金曜日、私は Heroku から Amazon Web Services(AWS) を直接使うように Soundslice を移行しました。私はこの変更ができてとても、そうとても嬉しくて、私がどうやったかということと、もし皆さんが同じような立場だったら何故それを検討すべきかということについて広く伝えたいと思います。
The general guidelines to follow the Mediterranean diet that dietitians provided to participants included the following positive recommendations:
(defn points [^BufferedImage image ^BufferedImage screen] | |
(let [width (.getWidth image) | |
height (.getHeight image) | |
xrange (range width) | |
yrange (range height)] | |
(for [points | |
(for [sx (range (- (.getWidth screen) width)) | |
sy (range (- (.getHeight screen) height))] | |
(for [tx xrange | |
ty yrange] |
#プライベートリポジトリ用コンテナを起動 | |
docker run -d -p 5000:5000 samalba/docker-registry | |
#実験のために適当なコンテナを起動 | |
docker run -i -t -d --name cent01 centos /bin/bash | |
#起動したコンテナをコミットしてタグ付け | |
docker commit cent01 test1/centos | |
docker tag test1/centos 192.168.10.60:5000/centos_test |
sealed trait IOOperation[A] { | |
def map[B](f: A => B): IOOperation[B] = | |
this match { | |
case PutChar(c, a) => | |
PutChar(c, f(a)) | |
case GetChar(g) => | |
GetChar(f compose g) | |
} | |
} | |
case class PutChar[A](c: Char, a: A) extends IOOperation[A] |
import Ordering.Implicits._ | |
case class Version(name: String, numbers: (Int, Int, Int, Int)) extends AnyRef with Ordered[Version] { | |
def compare(other: Version) = if (numbers == other.numbers) 0 else if (numbers < other.numbers) -1 else 1 | |
} |
@kuzuha よりネタ投下していただいたので、Scalaで実装してみた。
ネタ元: 裏サンデー | 寿司 虚空編 | 第1話
import scala.annotation.tailrec
package controllers | |
import play.api.mvc._ | |
object Application extends Controller { | |
def upload = Action(parse.multipartFormData) { | |
request => | |
if (request.body.files.isEmpty) BadRequest("Invalid file!") | |
else if (request.body.asFormUrlEncoded.isEmpty) BadRequest("Invalid data!") | |
else Ok("Everything is okay!") |