Skip to content

Instantly share code, notes, and snippets.

View ajermakovics's full-sized avatar
🎯
Focusing

Andrejs Jermakovics ajermakovics

🎯
Focusing
View GitHub Profile
@ajermakovics
ajermakovics / java_web_frameworks.md
Last active June 16, 2023 08:33
A list of Java web frameworks and toolkits
@ajermakovics
ajermakovics / AsyncMapLoader.java
Last active August 29, 2015 14:11
AsyncMapLoader.java
interface Loader<T> {
void add(T element);
boolean isFinished();
}
interface MapLoader<K, V> {
void loadAllKeys(Loader<K> loader);
}
/**
* ```
* Does JDK8's Optional class satisfy the Monad laws?
* =================================================
* 1. Left identity: true
* 2. Right identity: true
* 3. Associativity: true
*
* Yes, it does.
* ```
function functionReplacer(key, value) {
if (typeof(value) === 'function') {
return value.toString();
}
return value;
}
function functionReviver(key, value) {
if (key === "") return value;
Originally:
https://gist.github.com/7565976a89d5da1511ce
Hi Donald (and Martin),
Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I
appreciate the tone. This is a Yegge-long response, but given that you and
Martin are the two people best-situated to do anything about this, I'd rather
err on the side of giving you too much to think about. I realize I'm being very
critical of something in which you've invested a great deal (both financially
package sample.cluster.simple
import scala.concurrent.duration._
import akka.actor._
import akka.cluster.Cluster
import akka.cluster.ClusterEvent._
import akka.routing.FromConfig
import com.typesafe.config.ConfigFactory
object SimpleRouterApp {