I hereby claim:
- I am sdether on github.
- I am sdether (https://keybase.io/sdether) on keybase.
- I have a public key whose fingerprint is 1E83 115C 8C94 D1D8 835A 6D1E 3509 4810 D432 A80B
To claim this, I am signing this object:
| case class Foo(id: Int, name: String) | |
| case class Bar(id: Int, name: String) | |
| case class FooWithBar(foo: Foo, bars: List[Bar]) | |
| // The for-comprehension way | |
| def get1(id: Int): ConnectionIO[Option[FooWithBar]] = for { | |
| fooOpt <- sql"""SELECT id, name FROM foo WHERE id=$id""".query[Foo].option | |
| fooOpt2 <- fooOpt match { |
| trait Rule {} | |
| object ALPHA extends Rule | |
| object DIGIT extends Rule | |
| object OCTET extends Rule | |
| case class Alternative(rules: Rule*) extends Rule |
| * File -> New -> Project ... | |
| * Scala -> SBT | |
| ** next | |
| * Pick name, location, DSK, SBT version (latest) and Scala version | |
| * Check all checkboxes | |
| ** Finish | |
| The Project will open, open build.sbt. Initially all lines will be red, which means | |
| the project hasn't yet imported. Now the waiting game begins. Once the IntelliJ has | |
| no more red marks, the project is fully imported and ready. |
| import akka.actor.{ActorRef, Actor, Stash} | |
| import akka.pattern.pipe | |
| import scala.concurrent.Future | |
| trait AsyncInitializer[DEPENDENCIES] extends Stash { | |
| import context._ | |
| case class Initialized(dependencies: DEPENDENCIES) |
| // --- cheat sheet --- | |
| // | |
| // Enumerator &> -> filters the output of the enumerator through an Enumeratee | |
| // Enumerator >>> -> alias for andThen; adds the output of the second enumerator after the first one is done | |
| // Enumerator |>> -> feeds the output of the enumerator into the given iteratee for processing | |
| // --- end of cheat sheet --- | |
| // Example | |
| // Iteratee that sums up the size of the input: |
| -- single result set (duplicated data, requires de-mux on client) | |
| -- cannot auto-complete (table defined after field use) | |
| SELECT p.person_id, p.fname, p.lname, a.address_id, a.street, a.zip, a.state, a.type | |
| FROM person p | |
| INNER JOIN address a | |
| ON a.person_id = p.person_id | |
| WHERE p.status = 1 | |
| |person_id|fname|lname|address_id|street|zip|state|type| |
I hereby claim:
To claim this, I am signing this object:
| public class Immutable { | |
| public class Person { | |
| public readonly string Firstname; | |
| public readonly string Lastname; | |
| public Person(string firstname, string lastname) { | |
| Firstname = firstname; | |
| Lastname = lastname; |
| GET:/who/joe | |
| { | |
| _sig: '366e58644911fea255c44e7ab6468c6a5ec6b4d9d700a5ed3a810f56527b127e', | |
| id: 'joe@droogindustries.com', | |
| name: 'Joe Smith', | |
| status_uri: 'http://droogindustries.com/status', | |
| feed_uri: 'http:/droogindustries.com/status/feed' | |
| } |
| public class IPageHierarchyTestBase { | |
| protected bool _passed; | |
| protected IPageHierarchyBL _hierarchy; | |
| [Test] | |
| public virtual void Can_get_page_by_id() { | |
| Console.WriteLine("running test"); | |
| Assert.IsNotNull(_hierarchy); | |
| } |