Objective-Cで非同期通信を行なってAPIを叩くなどする場合はどうやるのか。
まず2つ変数を用意する。
@implementation Hogeee {
NSMutableData *hogeData;
NSURLConnection connection;
}
[alias] | |
st = status | |
co = checkout | |
di = diff | |
br = branch | |
ci = commit -a | |
cancel = reset --soft HEAD^ #直前のコミットを取り消す | |
zip = archive --format=zip --prefix=archive/ HEAD^ -o archive.zip #直前のコミットの差分ファイルをzipで抽出 | |
ad = add . | |
cm = commit -m |
alias g='git' | |
alias gi='git init && git add . && git commit -m "first commit"' | |
alias gc='g add -A && git commit -a' | |
alias r='rails' | |
alias rs='rails s' | |
alias rgs='rails g scaffold' | |
alias bi="bundle install" | |
alias be="bundle exec rackup" | |
alias sq="mysql.server" | |
alias sqrs='mysql.server start && rails s' |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |