Call it via:
const flat = flatten( realDeepObject );
Test case:
#!/usr/bin/env zsh | |
# Exit when any command fails | |
set -e | |
# https://docs.docker.com/engine/reference/commandline | |
SCRIPT_NAME=$(basename ${0}) | |
DELETE_BUILDER_CACHE=0 |
abstract struct Any; end | |
record A(T) < Any, this : T | |
class What | |
def hello() | |
puts "Hello!" | |
end | |
end | |
container = {} of String => Any |
Many users when are given server access, do not have root (or sudo) privileges and can not simply do
sudo apt-get install python-pip
.
Here's an easy way you can install and use pip without root (or sudo) access in a local directory.
Note : This works without easy_install
too.
// http://www.2ality.com/2013/09/javascript-unicode.html | |
function toUTF16(codePoint) { | |
var TEN_BITS = parseInt('1111111111', 2); | |
function u(codeUnit) { | |
return '\\u'+codeUnit.toString(16).toUpperCase(); | |
} | |
if (codePoint <= 0xFFFF) { | |
return u(codePoint); | |
} |
_BUCKET_NAME="foo.example.com" | |
_POLICY=$(cat <<EOT | |
{ | |
"Version":"2012-10-17", | |
"Statement":[{ | |
"Sid":"PublicReadForGetBucketObjects", | |
"Effect":"Allow", | |
"Principal": "*", | |
"Action":["s3:GetObject"], |
set nocompatible " We are using Vim | |
syntax on | |
" * PLUGINS | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" let Vundle manage Vundle, required |
# Cult of Vi | |
set -o vi | |
export VISUAL=vim | |
export EDITOR="$VISUAL" | |
# Colors! | |
alias ls='ls -G' | |
# History | |
export HISTFILE=~/.bash_history |
set nocompatible " We are using Vim | |
syntax on | |
set colorcolumn=80 | |
set ruler | |
hi StatusLine ctermfg=0 ctermbg=3 cterm=bold " Window highlighting | |
hi StatusLineNC ctermfg=white ctermbg=4 cterm=none | |
hi Folded ctermfg=244 ctermbg=0 cterm=none " Code folding highlight |
The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.
However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on