I hereby claim:
- I am tomasherman on github.
- I am tomasherman (https://keybase.io/tomasherman) on keybase.
- I have a public key ASAZyziR-Ex8X0kdHztFnDjYBIDJJR5Foi0j-njqevn55wo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import java.util.concurrent.Executors | |
import cats.effect.{Effect, IO} | |
import monix.eval.Task | |
import scala.concurrent.Await | |
import scala.concurrent.duration._ | |
import scala.language.{higherKinds, postfixOps} | |
object Paralellism extends App { |
I hereby claim:
To claim this, I am signing this object:
ORDER {'status': 'New', 'clientOrderId': 'f3a8a55f-9bb2-4743-bcc8-3332ee6ecc3e', 'origClientOrderId': '<null>', 'lastPrice': 'Optional.empty', 'totalQuantity': '1', 'instrument': 'cme_M6EM5', 'side': 'Buy'} | |
ER {'clientOrderId': 'f3a8a55f-9bb2-4743-bcc8-3332ee6ecc3e', 'origClientOrderId': '<null>', 'lastPrice': 'Optional.empty', 'totalQuantity': '1', 'orderStatus': 'New', 'side': 'Buy'} | |
ER {'clientOrderId': 'f3a8a55f-9bb2-4743-bcc8-3332ee6ecc3e', 'origClientOrderId': '<null>', 'lastPrice': 'Optional[1.1104]', 'text': 'Fill', 'totalQuantity': '1', 'orderStatus': 'Filled', 'side': 'Buy'} | |
ORDER {'status': 'New', 'clientOrderId': '58f023ac-3dc0-448d-836b-562a78b8fd3c', 'origClientOrderId': '<null>', 'lastPrice': 'Optional.empty', 'totalQuantity': '1', 'instrument': 'cnx_EURUSD', 'side': 'Sell'} | |
ER {'clientOrderId': '58f023ac-3dc0-448d-836b-562a78b8fd3c', 'origClientOrderId': '58f023ac-3dc0-448d-836b-562a78b8fd3c', 'lastPrice': 'Optional.empty', 'totalQuantity': '1.00000', 'orderStatus': 'New', 'side': 'Sell'} | |
O |
I hereby claim:
To claim this, I am signing this object:
import org.eclipse.jetty.server.Server | |
import org.eclipse.jetty.webapp.WebAppContext | |
import org.eclipse.jetty.server.nio._ | |
object RunWebApp extends App { | |
val server = new Server | |
val scc = new SelectChannelConnector | |
scc.setPort(8080) | |
server.setConnectors(Array(scc)) |
//E 3.3.4 | |
def init[A](l: List[A]): List[A] = { | |
l match { | |
case Nil => Nil | |
case Cons(x,Nil) => Nil | |
case Cons(x,xs) => Cons(x,init(xs)) | |
} | |
} |
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package auiproject.alg; | |
import auiproject.AbstractOptAlgInstance; | |
import auiproject.DoubleVectorIndividual; | |
import auiproject.util.RandomNumber; |
package net.tomasherman.replayvault.server.util | |
import org.scalacheck._ | |
import Gen._ | |
import Prop._ | |
import cc.spray.json._ | |
import com.mongodb.casbah.Imports._ | |
import mongo._ | |
trait JsonGen extends DefaultJsonProtocol{ |
def sumOfDigits(x: BigInt, sum: BigInt):BigInt = { //funkce se menuje sumOfDigits, bere dva argumenty, x kterej ma typ BigInt a sum, taky BigInt a vraci BigInt | |
x match { //tohle rika ze se ma porovnavat x s nasledujicim: | |
case xx if xx == 0 => sum //pokud x, ktery prejmenuju na xx == 0, tak to znamena ze sme vsechno secetli a v promenny sum je suma vsech cisel | |
case xx => sumOfDigits(xx / 10, sum + (xx % 10)) //pokud to neni 0, tak tam jeste nejaky cislice zbyvaj...zavolame znova sumOfDigits, ale s upravenejma parametrama tak, ze z x zahodime posledni cislo a k sume to posledni cislo pricteme | |
} | |
} |