package main
import (
"fmt"
"math/rand"
"time"
)see wiki
if (0 == x) {
...
}To execute sudo command on macOS, use:
$ sudo -senter your password and enjoy
When go get complains about terminal prompts disabled, set environment variable GIT_TERMINAL_PROMPT to 1 to enable it.
# export GIT_TERMINAL_PROMPT=1
$ GIT_TERMINAL_PROMPT=1 go get xxxWhen rustc complains that xxx syntax is experimental, switch to nightly build
$ rustup toolchain install nightly
$ rustup default nightlyIf some feature has to be activated, the compiler usually say which one.
Learn REST API with Python script, slides : http://www.slideshare.net/larrycai/learn-rest-apiwithpython
REST/JSON is perfect match to fetch web data, and python requests module
- Ex1: using command line tool
curland browser to access http://httpbin.org/get - Ex2: Install
requestsmodule and try to access http://httpbin.org/get in python interactive module, print r.json() - Ex3: Use below
restapi.pyas base to implement access data in script - Ex4: continue to access https://api.github.com via GET method
NewerOlder