This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.http4s | |
package rho | |
import cats.effect.IO | |
import org.specs2.mutable.Specification | |
class RhoServicePrioritiesSpec extends Specification with RequestRunner { | |
def construct(method: Method, s: String, h: Header*): Request[IO] = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sample | |
import org.json4s.jackson.Serialization | |
/** | |
* | |
* Created by Paul Lysak on 03.08.16. | |
*/ | |
object EnumDemo { | |
def main(args: Array[String]): Unit = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SomeData.scala: | |
case class SomeData(a: Int, b: Int) | |
AdditionExtensions.scala: | |
object AdditionExtensions { | |
implicit class SomeDataConversion(d: SomeData) { | |
def add = d.a + d.b | |
def add1 = d.a + d.b +1 | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Test { | |
def main(args: Array[String]): Unit = { | |
println("hi there") | |
val threads = 1 to 3 map {new MyRunner(_)} | |
// val threads = 1 to 1 map {new MyRunner(_)} | |
threads.foreach(_.start) | |
val ts1 = System.currentTimeMillis() | |
threads.foreach(_.join) | |
val ts2 = System.currentTimeMillis() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.typesafe.scalalogging.slf4j.Logging | |
import org.slf4j.LoggerFactory | |
class SuperClassA extends Logging { | |
def doSuper { | |
logger.info("Hi, SuperClassA") | |
} | |
} | |
class SubClassA extends SuperClassA { |