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 httpclient | |
import akka.actor.ActorSystem | |
import akka.http.scaladsl.Http | |
import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport | |
import akka.http.scaladsl.model.StatusCodes._ | |
import akka.http.scaladsl.model.{HttpRequest, HttpResponse} | |
import akka.http.scaladsl.unmarshalling.Unmarshal | |
import akka.stream.ActorMaterializer | |
import akka.stream.scaladsl._ |
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
name := "scalajs root project" | |
scalaVersion := "2.11.7" | |
lazy val root = project.in(file(".")). | |
aggregate(crossedJVM, crossedJS). | |
settings( | |
publish := {}, | |
publishLocal := {} | |
) |
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
trait Database[S, T] { | |
def objectsFrom[U <: Option[Seq[S]]](action: U)(implicit toDTO: S => T) : Option[Seq[T]] = { | |
action match { | |
case Some(result) => Some(result.map(toDTO)) | |
case None => Some(Seq.empty) | |
} | |
} | |
def rowsFrom[V <: Option[Seq[T]]](action: V)(implicit toDAO: T => S) : Option[Seq[S]] = { |
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 org.apache.flink.api.scala._ | |
object BerkeleyData { | |
def main(args: Array[String]) { | |
val env: ExecutionEnvironment = ExecutionEnvironment.getExecutionEnvironment | |
val path = "/path/to/Berkeley.csv" | |
case class Admission(status: String, gender: String, dept: String, number: Double = 0.0) | |
val data = env.readCsvFile[Admission]( |
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
Company[] companies; | |
PFont font; | |
void setup() | |
{ | |
String[] company = loadStrings("Testdata.csv"); | |
size(800,800); | |
background(255); | |
noStroke(); | |
smooth(); |
NewerOlder