A little project demonstrating problems with resourceDir.
16:28 λ tree
.
├── Test.scala
└── resources
└── data.txt
1 directory, 2 files
A little project demonstrating problems with resourceDir.
16:28 λ tree
.
├── Test.scala
└── resources
└── data.txt
1 directory, 2 files
I hereby claim:
To claim this, I am signing this object:
| package sam | |
| // scala 2.12.3 | |
| object SonOfSAM { | |
| val long:SonOfSAM[Long] = i => new Foo(i) | |
| } | |
| trait SonOfSAM[A]{ | |
| def foo(a:A):Foo | |
| } |
| package influxdb | |
| import argonaut.Argonaut._ | |
| import shapeless._ | |
| object Main { | |
| def main(args: Array[String]): Unit = { | |
| val one = | |
| """ |
| import argonaut.{EncodeJson, DecodeJson} | |
| import shapeless._ | |
| object Argonautype { | |
| implicit def EncodeHList[A](implicit encode:EncodeJson[A]):EncodeJson[A :: HNil] = | |
| encode.contramap(_.head) | |
| implicit def DecodeHList[A](implicit decode:DecodeJson[A]):DecodeJson[A :: HNil] = | |
| decode.map(a => a :: HNil) |
| scala> import UriString._ | |
| import UriString._ | |
| scala> val a = "world" | |
| a: String = world | |
| scala> uri"hello/$a" | |
| res3: String = hello/world | |
| scala> val b = "http://" |
| package auth | |
| import unfiltered.Cycle | |
| import unfiltered.request.{HttpRequest, BasicAuth, Path} | |
| import unfiltered.response._ | |
| import unfiltered.jetty.Http | |
| import unfiltered.filter.Plan | |
| object Req { | |
| def apply[Req, Res](f:PartialFunction[HttpRequest[Req], HttpRequest[Req] => ResponseFunction[Res]]):Cycle.Intent[Req, Res] = { |
| import validation._ | |
| object Demo extends App { | |
| object validateMaps extends FormValidations[Map[String, String]](_.get) | |
| import validateMaps._ | |
| def int(s:String) = try{ Right(s.toInt) } catch { case _ => Left("required.int") } | |
| def positiveInt(i:Int) = if(i > 0) Right(i) else Left("required.positive") | |
| case class Data(a:Int, b:Int) |
| package com.mongodb.casbah | |
| package commons | |
| object Syntax extends Syntax | |
| trait Syntax { | |
| implicit def name(name: String) = Name(name) | |
| } | |
| case class Name(name: String) { |
| Lens<Person, Address> personAddressLens = new LensApiThatIJustMadeUp<Person, Address>(){ | |
| @Override | |
| public Address get(@Nullable Person person) { | |
| return person.getAddress(); | |
| } | |
| @Override | |
| public Person set(Person person, Address address) { | |
| return new Person(person.getFirstName(), person.getLastName(), address); | |
| } |