Objective-Cで非同期通信を行なってAPIを叩くなどする場合はどうやるのか。
まず2つ変数を用意する。
@implementation Hogeee {
NSMutableData *hogeData;
NSURLConnection connection;
}| 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" |
| 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' |
| [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 |
| # OS | |
| *~ | |
| .DS_Store | |
| Thumbs.db | |
| # Sass | |
| .sass-cache | |
| # Xcode | |
| UserInterfaceState.xcuserstate |
| @mixin all-retina-sprites($map, $dimensions: false){ | |
| $base-class: sprite-map-name($map); | |
| .#{$base-class}-retina-sprite{ | |
| background: sprite-url($map) no-repeat; | |
| @include background-size(ceil(image-width(sprite-path($map)) / 2) auto); | |
| } | |
| @each $sprite in sprite-names($map){ | |
| .#{$base-class}-#{$sprite}{ |
| //FindWithTag | |
| GameObject xxx = GameObject.FindWithTag("xxx");//single object, InspectorのTagに表示されている名称 | |
| xxx.SendMessage("action"); | |
| xxx.BroadcastMessage("action"); | |
| //FindGameObjectsWithTag | |
| GameObject[] xxxs = GameObject.FindGameObjectsWithTag("xxx");//any objects, InspectorのTagに表示されている名称 | |
| foreach(GameObject xxx in xxxs) | |
| Debug.Log(xxx); |
| // Amazonの注文履歴をCSV形式にして出力するスクリプト | |
| // | |
| // 以下のスクリプトを参考に作成されました。 | |
| // http://moroya.hatenablog.jp/entry/2013/06/03/225935 | |
| // | |
| // 使い方は以下のURLに書いてあります。 | |
| // https://junkato.jp/ja/blog/2014/11/13/amazon-payment-history-as-csv/ | |
| // | |
| // CSVに成型しているのは14行目から定義されているformatEntryという関数なので、これを書き換えれば自由な書式で出力できます。 | |
| (function(){ |