В основном проекте своя таблица: public.tbl_order: (тут 16 млн заказов) id | status 1 | deliverd 2 | intransit
This file contains hidden or 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
| class Expr(expr: String) { | |
| override def toString = expr | |
| } | |
| object Expr { | |
| def apply(expr:String) = new Expr(expr) | |
| } | |
| object Select { | |
| val WITH = "with" |
This file contains hidden or 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 scala.annotation.implicitNotFound | |
| import scala.languageFeature.implicitConversions | |
| sealed trait HHList | |
| case class HHCons[A, B <: HHList](head: A, tail: B) extends HHList { | |
| def ::[X](x:X): X :: A :: B = HHCons(x, this) | |
| override def toString: String = s"$head :: $tail" | |
| } |
This file contains hidden or 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
| СЕЙЧАС: | |
| ======= | |
| В основном проекте своя таблица: | |
| public.tbl_order: (тут 16 млн заказов) | |
| id | status | |
| 1 | deliverd | |
| 2 | intransit | |
This file contains hidden or 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 java.io.{File, FileWriter} | |
| import scala.concurrent.{Await, Future} | |
| import akka.actor._ | |
| import akka.stream._ | |
| import akka.stream.scaladsl._ | |
| import scala.concurrent.duration.Duration | |
| val pw = new FileWriter(new File("C:\\temp\\hello.txt")) |
This file contains hidden or 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 LUB[L <: HList, B] { | |
| def apply(value:L):Boolean | |
| } | |
| object LUB { | |
| def apply[L <: HList, B](implicit inst: LUB[L, B]): LUB[L, B] = inst | |
| implicit def hlistLub[L <: HList, B, S0 <: HList, F0 <: HList, N <: Nat](implicit | |
| subtype: SubtypeUnifier.Aux[L, B, S0], | |
| filter: FilterNot.Aux[S0, B, F0], | |
| len: Length.Aux[F0, N], |
This file contains hidden or 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 curry[A,B,C](f: (A, B) => C): A => (B => C) = a => f(a, _) | |
| def uncurry[A,B,C](f: A => B => C): (A, B) => C = f(_)(_) | |
| def compose[A,B,C](f: B => C, g: A => B): A => C = a => f(g(a)) | |
| def mul(a:Int, b:Int) = a * b | |
| val mulC = curry(mul) | |
| mulC(5)(10) |
This file contains hidden or 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 curry[A,B,C](f: (A, B) => C): A => (B => C) = a => f(a, _) | |
| def uncurry[A,B,C](f: A => B => C): (A, B) => C = f(_)(_) | |
| def compose[A,B,C](f: B => C, g: A => B): A => C = a => f(g(a)) | |
| def mul(a:Int, b:Int) = a * b | |
| val mulC = curry(mul) | |
| mulC(5)(10) |
This file contains hidden or 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
| --- | |
| # SEE: http://schemas.xmlsoap.org/wsdl/ | |
| title: PimPay Platform Api Manifest | |
| version: 2.7 | |
| uversion: v2_7 | |
| directory: v2_7 # лежит в soap/v2_7 | |
| date: 02.09.2016 | |
| wsdl: | |
| schemaLocation: http://platform.api.%fqdn%/v2_7/soap/wsdl | |
| invokeLocation: http://platform.api.%fqdn%/v2_7/soap/invoke |
This file contains hidden or 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
| abstract class Expr | |
| case class Var(name: String) extends Expr { | |
| override def toString:String = s"$name" | |
| } | |
| case class Number(num: Double) extends Expr { | |
| override def toString = num.toString | |
| } | |
| case class UnOp(operator: String, arg: Expr) extends Expr { |
OlderNewer