I hereby claim:
- I am julien-lafont on github.
- I am julienlafont (https://keybase.io/julienlafont) on keybase.
- I have a public key whose fingerprint is BDC2 71A6 6206 523A 46B1 A9A3 AA34 CF63 8009 F841
To claim this, I am signing this object:
import play.api.libs.json.{JsNull, JsValue, Json} | |
trait FooServiceError | |
case object ApiNotFound extends FooServiceError | |
case class BackendNotAvailable(endpoint: String) extends FooServiceError | |
case class ErrorDuringProcessingEvent(payload: JsValue, error: String) extends FooServiceError | |
case class PermissionRefused(providedScopes: Seq[String], missingScopes: Seq[String]) extends FooServiceError | |
def callBackendToGeneratePiValue(decimal: Int): Either[FooServiceError, Double] = { | |
// fake code |
I hereby claim:
To claim this, I am signing this object:
<!-- | |
Exclude all Play-java classes from auto-import (play.libs, play.mvc...) | |
Exclude some generally unused classes from java.awt, javax.swing, sun.security... WIP! Many more can be added | |
Where to configure that? | |
- cat ~/.IntelliJIdea14/config/options/editor.codeinsight.xml | |
- or from Settings/General/editor/Auto Import | |
--> | |
<application> | |
<component name="CodeInsightSettings"> |
sudo apt-get autoremove gnome-contacts gnome-mahjongg gnome-mines gnome-sudoku gnome-orca xterm aisleriot webbrowser-app brasero cheese rhythmbox totem unity-webapps-common unity-lens-photos unity-scope-gdrive empathy thunderbird landscape-client-ui-install |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDX6uNOBrRlzUOkzP2O34dTu/yuHMfzu0XxBJsiN/nP806NvdQWrxOS8mFoSPPo8uvcy0et5U1EgU27L5DqEUwxV2uCPpFZXXY0atcqtueyMO7PQAb12ZslPm89PRwBKtCizUmZTuztnfINUttRZeZxsLZBfkIBqDuCDKR4iw8SImpBFrJZUAFredItc50ut7lEQZs2PYCgke71yuaie7qser208GbanOvCQ0ZUwnCPtMH7JOavAasqWFn7jb5+JhsKZuM8NWDAxJn7Pe2CipfVejfwy18MflEPNam6DfzScs1aSrSnf3WbZrTfZKiHiwa1sRRQPwZTCmPuTV+6xV577+qjWXdiRRqRPgJZq8LZb0+W7mz1zMzEU6giWVBQuZc06cQi7slNQg6Zi9fLocH1a2AwOUGKISJATOikQuneTDljGs5cavNz/No7f2aFGtJdGCBaklosOXFOO9UNboPD9M9XGnXaiNcMsHhE4/LxMAJHSAwHqoddyw1lQ5yaASfAR6o4cPkzSJMk5XViw+iBCP5UYIMwGTVE15hjh34gyrq0PpE4xQ+WA6jTmfr/G5Fb3UIUT8Tm/ULmRyBbHNERjtOyjxPu5KaNxSyARftsZYllOaSr9IfWclySWsnunxvrZa/YMbIgxJM+qmRccCLG1hj9rqz9sQxvhQRlMWKQrQ== [email protected] |
object Monde { | |
def apply() : Monde = { | |
val cells = (1 until 100).toList.map(i => Cellule(i, i+1, 9)) | |
Monde(cells) | |
} | |
def fusion(possibles: List[Cellule]) : List[Cellule] = { | |
possibles./:[List[Cellule]](Nil){ (acc, cell) => | |
acc.partition{ c => c.x == cell.x && c.y == cell.y } match { |
#Play2 : Les Iteratees expliqués aux humains... francophones!
Disclamer : Ce qui suit est la traduction d'un article anglophone paru sur le blog mandubian.com
Vous pouvez retrouver l'article original ici
Vous avez probablement remarqué une nouvelle fonctionnalité intrigante de Play2 nommée Iteratee
(ainsi queb ses compagnons Enumerators
et Enumeratee
).
Le but de cet article est d'essayer de rendre le concept d'Iteratee compréhensible pour le plus grand nombre avec des arguments simples, en évitant l'approche mathématique / fonctionnelle.
Cet article ne prétend pas tout expliquer à propos des Iteratee
/ Enumerator
/ Enumeratee
mais traite plutôt les idées qui se cachent derrière.
// Avant | |
public double calculerCharge(Date date, double qtt) { | |
if (date.before(SUMMER_START) || date.after(SUMMER_END)) | |
// Logique métier | |
else | |
// Logique métier | |
return charge; | |
} |