This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type S=Seq[_] | |
def o(a:Seq[(_,_)],? :S):(Map[_,_],S)= ?match{case'}'+:r=>a.toMap->r | |
case','+:r=>o(a,r)case? =>val m=""""(.+?)":(.+)""".r | |
val m(k,t)= ?mkString | |
val(v,r)=p()(t.toSeq) | |
o(a:+(k->v),r)} | |
def y(a:S):S=>(S,S)={case']'+:r=>a->r | |
case','+:r=>y(a)(r)case s=>val(v,r)=p()(s) | |
y(a:+v)(r)} | |
def u(a:S,b:S):(S,S)=b match{case c+:r=>c match{case'}'|']'=>a->b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md | |
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192 | |
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB. | |
------------ | |
-- Basics -- | |
------------ | |
-- Get indexes of tables |
原文はこちら: https://www.playframework.com/documentation/2.6.x/Highlights26
アプリケーションではplay.api.Play.current
/ play.Play.application()
でグローバルアプリケーションにアクセスできるけど非推奨。以下のようにして禁止することもできる。
play.allowGlobalApplication=false
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Our goal is to create a type describing a list of events. This is our | |
-- type-level DSL. | |
-- We will then use typeclass resolution to "interpret" this type-level DSL | |
-- into two things: | |
-- 1. A comma-separated list of events | |
-- 2. A method that, when given an event name and a payload, will try to parse | |
-- that event type with the payload. A form of dynamic dispatching | |
-- | |
-- To model a list of types we will use tuples. You can imagine the list of | |
-- types "Int, String, Char" to look like: |
シーケンス図とかフローチャートをしごとで描画することになった場合、 テキストから生成できたら楽なので、それ系のツールまとめ
- C製
- Doxygen, Moinmoinなどと連携可能
- ブロック図、クラス図、ネットワーク図など
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Validation[E, A] represents either: | |
// - Success[A] | |
// - Failure[E] | |
// | |
// Isomporphic to scala.Either[E, A] and scalaz.\/[E, A] | |
// | |
// Unlike \/[E, A], Validation is not a Monad, but an Applicative | |
// Functor. So if you want to use it as a Monad you can convert back | |
// and forth using the `validation` and `disjunction` method |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Disjunction - aka Scalaz Either | |
// \/[A, B] is an alternative to Either[A, B] | |
// -\/ is Left (usually represents failure by convention) | |
// \/- is Right (usually represents success by convention) | |
// Left or Right - which side of the Disjunction does the "-" appear? | |
// | |
// Prefer infix notation to express Disjunction Type v: String \/ Double | |
// | |
// References |
NewerOlder