Not my work, source: r/copperking on reddit
We have 2 colors of balls on the table that we want to separate.
We get a stick and put it on the table, this works pretty well right?
| package testing; | |
| import java.math.BigInteger; | |
| import java.util.List; | |
| import java.util.stream.Collectors; | |
| import java.util.stream.Stream; | |
| public class IsAnagramDemo | |
| { | |
| /* Get the primes we need */ |
| sealed trait Decidable[+Proof] | |
| final case class Yes[Proof](proof: Proof) extends Decidable[Proof] | |
| final case object No extends Decidable[Nothing] | |
| sealed trait List[+A] { | |
| def nonEmpty: Decidable[this.type <:< ::[A]] | |
| def ::[AA >: A](value: AA): ::[AA] = new ::[AA](value, this) | |
| } | |
| final case object Nil extends List[Nothing] { | |
| def nonEmpty: Decidable[this.type <:< ::[Nothing]] = No |
We have 2 colors of balls on the table that we want to separate.
We get a stick and put it on the table, this works pretty well right?
| { | |
| "AUTHENTICATE": { | |
| "TYPE": "POST", | |
| "URI": "oauth/token", | |
| "AUTH": false | |
| }, | |
| "REVOKE_AUTH_TOKEN": { | |
| "TYPE": "POST", | |
| "URI": "oauth/revoke", | |
| "AUTH": true |
| //Gist note this is snippet from root build.gradle in project with subprojects | |
| checkstyle { | |
| // use one common config file for all subprojects | |
| configFile = project(':').file('config/checkstyle/checkstyle.xml') | |
| configProperties = [ "suppressionFile" : project(':').file('config/checkstyle/suppressions.xml')] | |
| } |