I hereby claim:
- I am channingwalton on github.
- I am channingwalton (https://keybase.io/channingwalton) on keybase.
- I have a public key ASAzN6zGSraBz_wTqUhbQLqzT4wmAjuy3zGojAOeYGo2Uwo
To claim this, I am signing this object:
| package example | |
| import scala.util.Random | |
| object Hello extends App { | |
| val items = (0 to 10).toList.map(i => s"Item $i") | |
| val numberOfBuckets = 10 | |
| val working: Map[String, Double] = items.map(i => (i, Random.nextDouble())).toMap | |
| val bucketSize = 1.0 / numberOfBuckets |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <!-- Popperjs --> | |
| <script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha256-BRqBN7dYgABqtY9Hd4ynE+1slnEw+roEPFzQ7TRRfcg=" crossorigin="anonymous"></script> | |
| <!-- Tempus Dominus JavaScript --> | |
| <script src="https://cdn.jsdelivr.net/npm/@eonasdan/[email protected]/dist/js/tempus-dominus.min.js" crossorigin="anonymous"></script> | |
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@eonasdan/[email protected]/dist/css/tempus-dominus.min.css" crossorigin="anonymous"> |
| val scalacOptions ++= Seq( | |
| "-encoding", | |
| "utf-8", // Specify character encoding used by source files. | |
| "-deprecation", // Emit warning and location for usages of deprecated APIs. | |
| "-explaintypes", // Explain type errors in more detail. | |
| "-feature", // Emit warning and location for usages of features that should be imported explicitly. | |
| "-language:existentials", // Existential types (besides wildcard types) can be written and inferred | |
| "-language:experimental.macros", // Allow macro definition (besides implementation and application) | |
| "-language:higherKinds", // Allow higher-kinded types | |
| "-language:implicitConversions", // Allow definition of implicit functions called views |
| import cats.data.NonEmptyList | |
| import cats.Eq | |
| import scala.collection.GenTraversableOnce | |
| sealed trait NonEmptySet[T] extends (T => Boolean) { | |
| def head: T | |
| def set: Set[T] | |
| def +(t: T): NonEmptySet[T] | |
| def ++(ts: NonEmptySet[T]): NonEmptySet[T] |
I hereby claim:
To claim this, I am signing this object:
| package set.performance | |
| import java.util.concurrent.TimeUnit | |
| import scala.concurrent.duration.FiniteDuration | |
| /** | |
| * On my machine the fast method takes < 2 ms, the slow one 2.2s | |
| */ | |
| object SetPerformance { |
I hereby claim:
To claim this, I am signing this object:
| <SCRIPT language=Javascript> | |
| <!-- | |
| function isNumberKey(evt) | |
| { | |
| var charCode = (evt.which) ? evt.which : event.keyCode | |
| return charCode > 47 && charCode < 58; | |
| } | |
| //--> | |
| </SCRIPT> | |
| </HEAD> |
| package reactive | |
| import java.util.concurrent.TimeUnit | |
| import rx.lang.scala.{Observable, Subject} | |
| import scala.concurrent.duration.Duration | |
| /** | |
| * The problem: can two threads banging away from two sources be merged and have predictable results? |