echo "deb http://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-get update
sudo apt-get install sbt
#include <iostream> | |
#include <vector> | |
using namespace std; | |
int main() { | |
int n; | |
cin >> n; |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
" http://vimdoc.sourceforge.net/htmldoc/starting.html#vimrc | |
set nocompatible " use vim defaults | |
set scrolloff=3 " keep 3 lines when scrolling | |
set ai " set auto-indenting on for programming | |
set showcmd " display incomplete commands | |
set nobackup " do not keep a backup file | |
set number " show line numbers | |
set ruler " show the current row and column |
Extract: jar xf <jar-file>
View contents: jar tf <jar-file>
Create:
jar cf <new-file-name> .
jar cf [input file(s)]
import os, sys, shutil | |
DUP = 10 | |
file = sys.argv[1] | |
path, fileName = os.path.split(file) | |
file_name, file_extension = os.path.splitext(fileName) | |
for i in range(1, DUP+1): | |
shutil.copyfile(file,path+'/'+file_name+'_'+str(i)+file_extension) |
(by @andrestaltz)
So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).
Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:
Rx.Observable.prototype.flatMapLatest(selector, [thisArg])
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
import random | |
import math | |
import numpy as np | |
seed = 1 | |
boost = 20 | |
maxIter = 50 | |
numCities = 15 | |
mu, sigma = 500, 200 | |
demand = np.random.normal(mu,sigma,numCities) |