|>
or ▹
- Pipe
- The Thrush combinator
450x300 embed from Sports-tracker: | |
<iframe style='background-color: transparent;' frameborder='0' marginwidth='0' marginheight='0' scrolling='no' width='450' height='300' src='http://www.sports-tracker.com/widgets/wdgt_workout.html?username=richarddallaway&workout_key=a62erndni0j8joc2'></iframe> | |
import scalaz._ | |
import Scalaz._ | |
trait Tables { | |
val profile: scala.slick.driver.JdbcProfile | |
import profile.simple._ | |
case class Planet(name: String, id: Long=0L) | |
class PlanetTable(tag: Tag) extends Table[Planet](tag, "planet") { |
import shapeless._, poly._ | |
object SYBMain extends App { | |
// Play JSON boils down to: | |
sealed trait JsValue | |
case object JsNull extends JsValue | |
case class JsObject (fields: Seq[(String, JsValue)]) extends JsValue |
import shapeless._, poly._ | |
object SYBMain extends App { | |
// Play JSON boils down to: | |
sealed trait JsValue | |
case object JsNull extends JsValue | |
case class JsObject (fields: Seq[(String, JsValue)]) extends JsValue |
/** | |
* can we get a JDBC connection from JNDI using the default connection name? | |
*/ | |
def jndiJdbcConnAvailable_? : Boolean = jndiJdbcConnAvailable_?(DefaultConnectionIdentifier) | |
/** | |
* Is the named connection available via JNDI? | |
* @param name the connection identifier to check. | |
* @return true if the JNDI name can be resolved. | |
*/ |
import java.io._ | |
import java.nio.file._ | |
import scala.collection.JavaConversions._ | |
object WatchStream { | |
// Watch service can watch multiple paths (as keys) but we're just using one | |
// so we can ws.take and assume whatever comes back is the path we care about. | |
private[this] val ws = FileSystems.getDefault.newWatchService() |
// We don't want to do this: | |
case class Contact(person: String, address: String) | |
// We prefer: | |
class Name(val value: String) extends AnyVal | |
class Email(val value: String) extends AnyVal | |
case class Contact(person: Name, address: Email) |
scalaz (series/7.2.x)$ grep -R 'def [^A-Za-z_]' core effect concurrent iteratee | |
core/src/main/scala/scalaz/Arrow.scala: final def <<<[A, B, C](fbc: (B =>: C), fab: (A =>: B)): =>:[A, C] = | |
core/src/main/scala/scalaz/Arrow.scala: def >>>[A, B, C](fab: (A =>: B), fbc: (B =>: C)): (A =>: C) = | |
core/src/main/scala/scalaz/BijectionT.scala: def ***[C, D](g: Bijection[C, D])(implicit evF: F[B] =:= Id[B], evG: G[A] =:= Id[A]): Bijection[(A, C), (B, D)] = | |
core/src/main/scala/scalaz/BijectionT.scala: def ^^^[C, D](g: Bijection[C, D])(implicit evF: F[B] =:= Id[B], evG: G[A] =:= Id[A]): Bijection[A \/ C, B \/ D] = | |
core/src/main/scala/scalaz/BijectionT.scala: def <=<[C](that: BijectionT[F, G, C, A])(implicit FM: Bind[F], GM: Bind[G]): BijectionT[F, G, C, B] = compose(that) | |
core/src/main/scala/scalaz/BijectionT.scala: def >=>[C](that: BijectionT[F, G, B, C])(implicit M: Bind[F], GM: Bind[G]): BijectionT[F, G, A, C] = andThen(that) | |
core/src/main/scala/scalaz/Cofree.scala: final def =>>[B](f: Cofree[S, A] => B)(implicit |
implicit val pc = PopulationControl( | |
dataSource=postgressDs, | |
...customzation here) | |
"Friends database" should { | |
populate(""" | |
# User |