Skip to content

Instantly share code, notes, and snippets.

View j5ik2o's full-sized avatar

Junichi Kato j5ik2o

View GitHub Profile
case class Administrators(userId: Long, userIds: Seq[Long])
case class Member(userId: Long, byAdministratorId: Option[Long] = None)
case class Memebers(userIds: Seq[Member])
case class Message(id: Long, value: String, senderId: Long)
case class Messages(values: Seq[Message])
val childProps = Props(classOf[EchoActor])
val stopBackOffOptions = Backoff.onStop(childProps, "c1", 100.millis, 3.seconds, 0.2)
val failureBackOffOptions = Backoff.onFailure(childProps, "c1", 100.millis, 3.seconds, 0.2)
val stopBackOffSupervisor = system.actorOf(BackoffSupervisor.props(stopBackOffOptions))
val failureBackOffSupervisor = system.actorOf(BackoffSupervisor.props(failureBackOffOptions))
case class Item(
id: Option[Long],
code: String,
name: String,
url: String,
imageUrl: String,
price: Int,
createAt: DateTime,
updateAt: DateTime,
users: Seq[User] = Seq.empty
@j5ik2o
j5ik2o / for.scala
Last active February 22, 2017 13:03
case class User(id: Long, name: Option[String])
object UserDao {
def findById(id: Long): Option[User] = {
if (id % 3 == 0)
Some(User(id, Some("Kaneko")))
else if (id % 5 == 0)
Some(User(id, None))
else
@j5ik2o
j5ik2o / index.md
Last active February 6, 2017 08:19
OAuth2/OpenID Connect OSSライブラリ & サービス 調査
package models
import org.joda.time.DateTime
import scalikejdbc.WrappedResultSet
import skinny.orm.{ Alias, SkinnyCRUDMapper }
case class User(
id: Option[Long] = None,
name: String,
email: String,
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: ArrayTest.scala
import scala.Predef$;
import scala.collection.mutable.ArrayOps;
import scala.runtime.BoxesRunTime;
public final class Main$
@j5ik2o
j5ik2o / angular2-bindings.md
Last active November 20, 2016 11:11
Bindings, obervables, and pipes - Angular2 Development with TypeScript

Bindings, obervables, and pipes

バインディングとオブザーバブルとパイプ

The goal of the the first four chapters was to jump-start application development with Angular.

最初の4つの章の目標は、Angularを使用してアプリケーション開発を開始することでした。

In those chapters we used property bindings, handled events, and applied directives without providing detailed explanations.