by shigemk2

当面は技術的なことしか書かない

git logのauthor dateを変更

$ git commit --amend --date="Sat, 14 Dec 2013 12:40:00 +0000" # only author

authorだけで、committerは知らない

eddmann.com

author とはその作業をもともと行った人、committer とはその作業を適用した人のことを指します。あなたがとあるプロジェクトにパッチを送り、コアメンバーのだれかがそのパッチを適用した

Git - コミット履歴の閲覧

忘れかけていたので、思い出しました。

Map[K,V]ってどういうことなの

本当にどういうことなのっていう。

Map[K, V]って書くと、Map(key -> value)って言う感じで、KeyとValueの型を指定してあげている。 こういう風に書くとわかりやすいけども、Map[String, String]ってのを見ると、どういうことなのか一瞬わからなかったりするんだ。

scala> Map("abc" => "def")
<console>:1: error: not a legal formal parameter.
Note: Tuples cannot be directly destructured in method or function parameters.
      Either create a single parameter accepting the Tuple1,
      or consider a pattern matching anonymous function: `{ case (param1, param1) => ... }
Map("abc" => "def")
    ^

scala> Map("abc" -> "def")
res0: scala.collection.immutable.Map[String,String] = Map(abc -> def)