by shigemk2

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

2017-08-23から1日間の記事一覧

vue.js intro

vue.js intro

joda and mockito

jodaとmockitoのコンボ。 beforeのところで DateTimeUtils.setCurrentMillisFixed(10L); みたいなことを書けば、とりあえず時間を弄れるっぽい。 @Test public void test() { DateTimeUtils.setCurrentMillisFixed(10L); // .. your code } @After public vo…

joda DateTimeFormat

DateTimeFormat こんな感じだね。 yyyymmddHHmmss とか。 DateTime dt = new DateTime(); DateTimeFormatter fmt = DateTimeFormat.forPattern("MMMM, yyyy"); String str = fmt.print(dt); http://www.joda.org/joda-time/apidocs/org/joda/time/format/Dat…

apache universal donor

universal donor もとは血液型的な話で誰にでも提供できるO型のはなしだけど、ソースコードもそんな感じで誰にでも提供できるようにしないといけないという話。 今回FacebookBSD+Patentライセンスのくだりで引っかかったのはそこ。条件に引っかかった人間は…

react patent

patent項目のところで問題なところ

play reference.conf

reference.conf The reference.conf files provide defaults; they are overridden by any settings defined in the application.conf file. ってことだから、reference.confが基本なんだね。 ProductionConfiguration - 2.6.x

presto datetime

datetimeまわりのドキュメント 6.10. Date and Time Functions and Operators — Presto 0.183 Documentation

presto map_filter

KとVはArrayっぽい Constructs a map from those entries of map for which function returns true: SELECT map_filter(MAP(ARRAY[], ARRAY[]), (k, v) -> true); -- {} SELECT map_filter(MAP(ARRAY[10, 20, 30], ARRAY['a', NULL, 'c']), (k, v) -> v IS N…

scala find return value

戻り値の型はOption[A]でした def find(p: (A) ⇒ Boolean): Option[A] Finds the first element of the sequence satisfying a predicate, if any. Scala Standard Library 2.12.3 - scala.collection.immutable.List