Skip to content

Instantly share code, notes, and snippets.

import java.util.Arrays;
public class ArrayPrintingExamples {
public static void main(String[] args) {
int[][] array2D = new int[][]{
{1,2,3},
{4,5,6},
{7,8,9}
find . -name target -type d -exec rm -rf {} \;
public class AdministrationEmployee extends Employee {
public AdministrationEmployee(String name) {
super(name, Employee.TEMPORARY, 0, "Administration");
}
public double getSalary() {
return 18000;
}

##Reactive System Design Links

#Articles and Papers

import java.security.MessageDigest;
import java.util.Arrays;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import javax.swing.JOptionPane;
import javax.xml.bind.DatatypeConverter;
import javax.crypto.IllegalBlockSizeException;
val n = 5
val ss: Seq[String] = 0 to math.pow(2, n).toInt - 1 map((x: Int) => x.toBinaryString)
ss.map(String.format(s"%${n}s", _).replace(' ', '0')).foreach(println)
@zhelezoglo
zhelezoglo / gist:887bd5cb2a43040f4011
Created February 27, 2016 08:05 — forked from debasishg/gist:8172796
A collection of links for streaming algorithms and data structures
  1. General Background and Overview
@zhelezoglo
zhelezoglo / latency.txt
Created August 7, 2016 11:59 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@zhelezoglo
zhelezoglo / gist:c6078587d733ea24527cfa7cc6196203
Created August 9, 2016 08:50 — forked from sgergely/gist:3793166
Midnight Commander Keyboard Shortcuts for Mac OSX
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name

Advanced Functional Programming with Scala - Notes

Copyright © 2017 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x