(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
import it.unimi.dsi.fastutil.longs.Long2ObjectMap; | |
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; | |
import net.openhft.hashing.LongHashFunction; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.net.URL; | |
/** |
static Map<String, String[]> words = new HashMap<>(); | |
static int largestWordLength = 0; | |
public static void loadConfigs() { | |
try { | |
BufferedReader reader = new BufferedReader(new InputStreamReader(new URL("https://docs.google.com/spreadsheets/d/1hIEi2YG3ydav1E06Bzf2mQbGZ12kh2fe4ISgLg_UBuM/export?format=csv").openConnection().getInputStream())); | |
String line = ""; | |
int counter = 0; | |
while((line = reader.readLine()) != null) { |
var cryptedFileAdapter = require('./lokiCryptedFileAdapter'); | |
cryptedFileAdapter.setSecret('mySecret'); | |
var loki=require('lokijs'); | |
var db = new loki('loki.json.crypted',{ adapter: cryptedFileAdapter }); | |
db.loadDatabase({},function(){ | |
var children = db.addCollection('children'); | |
children.insert({name:'Bleep', legs: 2}); | |
db.save(); |
package com.netflix.experiments.rx; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import rx.Observable; | |
import rx.Observable.OnSubscribe; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""launch small http server | |
""" | |
import sys | |
try: | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
except ImportError: |