IntelliJ IDEA
Ctrl+Shift+Z: Redo
Ctrhl+Shift+S: Sbt Shell
Scala
コマンドラインアプリの引数チェック https://github.com/scopt/scopt
jarにまとめるライブラリ
- sbt-assembly: Fat jar. ライブラリなどすべてのクラスファイルを含むjar.
- sbt-pack: https://github.com/xerial/sbt-pack
- https://stackoverflow.com/questions/22556499/what-are-key-differences-between-sbt-pack-and-sbt-assembly
Saclaの横田さん
https://twitter.com/eed3si9n_ja正規表現の抽出: ワイルドカードがないとscala.MatchErrorが発生する。
\d{6}
ではだめで(\d{6})
ならOK。
Play JSON
Json.prettyPrint : JsValue を整形された文字列にします (改行、インデントあり)
Json.toJsonT(implicit writes: Writes[T]) : 解決された暗黙の Writes[T] を使った Scala オブジェクトから JsValue への変換を試みます
play json sampleの意味 : https://qiita.com/miyatin0212/items/fdfe3c6141323ae281c3
定義の順番を変えて対応した
Error:(14, 42) No instance of play.api.libs.json.Writes is available for jp.co.yahoo.tool.PropDataExtractor.ImageInfo in the implicit scope (Hint: if declared in the same file, make sure it's declared before) implicit def jsonWrites = Json.writes[Props]
- 正規表現の抽出が便利
val Decimal = """(-)?(\d+)(\.\d*)?""".r val Decimal(sign, integerpart, decimalpart) = "-1.23"
その他
Win+Ctrl+C
で、グレースケールになる
http://snow-white.cocolog-nifty.com/first/2017/12/windows-10-fe1d.htmlWindows10でフォーカス部分が青枠になるのは、ナレータ機能が有効になっているから。
http://ascii.jp/elem/000/001/146/1146883/