- visual studio c++ compiler - https://visualstudio.microsoft.com/vs/community/
- strawberry perl - http://strawberryperl.com/
- python with pip - https://www.python.org/downloads/windows/ or conda - https://docs.conda.io
- swig - http://www.swig.org/download.html
- nasm - https://www.nasm.us/
(* ::Package:: *) | |
(*Import like Import["https://gist.githubusercontent.com/Kreijstal/\ | |
2a34158a1cf159b4ddc5ab3460f6efd0/raw/\ | |
6bfc3328d9538844fabbbce9691fb3c63824ed9f/promises.m"]*) | |
Promise::usage="Promise[Function[{accept,reject},CustomLogic[accept[\"Success!\"],reject[\"Oh no! Error!\"]]]]" | |
Promise := | |
Module[{local, success, failure, listen, counter = 0, Promise}, | |
success[x_] := (local["s"] = x;(*Print[{"I've been executed",x, | |
local}];*)Through[local["t"][local["s"]]]; local["t"] = {}; | |
local["resolved"] = True); |
Here are the steps to installing and setting up GDB on Mac OS Sierra/High Sierra.
Run brew install gdb
.
On starting gdb, you will get the following error:
Unable to find Mach task port for process-id 2133: (os/kern) failure (0x5).
(please check gdb is codesigned - see taskgated(8))
To fix this error, follow the following steps:
const avengers = ['Thor', 'The Hulk', 'Captain America']; | |
let guardians = ['Star Lord', 'Gamorra', 'Drax', 'Rocket', 'Groot']; | |
// Spread out arrays in a new array and put a new value in between them | |
const heroes = [...avengers, 'Loki', ...guardians]; | |
// Adding new stuff to an array just got easier too | |
guardians = [...guardians, 'Mantis', 'Yondu', 'Nebula']; | |
// Or simply making a TRUE copy of an array | |
const avengersCopy = [...avengers]; |
This is a simple way of importing MySQL database in Docker.
-
In you Dockerfile you must have a shared folder. Shared folder is a directory in your host machine that is mounted to Docker instance.
-
Put the exported sql file in the shared folder.
-
Login to your Docker instance via
docker exec -it DOCKER_CONTAINER_ID bin/bash
. -
Login to MySQL via
mysql -u USERNAME -p
.
- Download Instant Client:
- instantclient-basic-macos.x64-11.2.0.4.0.zip
- instantclient-sdk-macos.x64-11.2.0.4.0.zip
- instantclient-sqlplus-macos.x64-11.2.0.4.0.zip
-
Unzip and move to /opt
-
Create symlink
Douglas Crockford, author of JavaScript: The Good parts, recently gave a talk called The Better Parts, where he demonstrates how he creates objects in JavaScript nowadays. He doesn't call his approach anything, but I will refer to it as Crockford Classless.
Crockford Classless is completely free of class, new, this, prototype and even Crockfords own invention Object.create.
I think it's really, really sleek, and this is what it looks like:
function dog(spec) {
(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.
# Copyright (c) 2013 Georgios Gousios | |
# MIT-licensed | |
create database stackoverflow DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; | |
use stackoverflow; | |
create table badges ( | |
Id INT NOT NULL PRIMARY KEY, | |
UserId INT, |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
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 |