2016-01-01から1年間の記事一覧
のチュートリアルから入門してみました。 codepen.io Scene Sceneは3D空間であり、オブジェクトやカメラ、光源を配置できます。 Sceneの空間のは必要に応じて、拡縮できます。 var scene = new THREE.Scene(); Camera Cameraの設定をするときには以下の4つの…
まずはpythonのバージョンを確認 $ python --version Python 2.7.10 Command python2なら $ python -m SimpleHTTPServer [ポート番号(デフォルトは8000)] python3なら $ python3 -m http.server [ポート番号(デフォルトは8000)] 使い方 Rootにしたいディレク…
satomi.hatenablog.jp
全然わからないので、まずは言葉の意味から 補間とは wikipedia引用 内挿(ないそう、英: interpolation、補間とも言う)とは、ある既知の数値データ列を基にして、そのデータ列の各区間の範囲内を埋める数値を求めること、またはそのような関数を与えること…
GET with Custom Header by Alamofire let URL = NSURL(string: "https://dinner.please")! let mutableURLRequest = NSMutableURLRequest(URL: URL) let message = "I want to eat!" mutableURLRequest.HTTPMethod = "GET" mutableURLRequest.setValue(mess…
忘れていたので、復習の意味でメモ。 AlamofireでCustom HeadersでGET let URL = NSURL(string: "https://onedari.please")! let mutableURLRequest = NSMutableURLRequest(URL: URL) let message = "tabetai" mutableURLRequest.HTTPMethod = "GET" mutable…
What I want to do GET http://domain.jp/api/2.1.1/users or GET http://domain.jp/meats/score/21293.02 (You may say URL with parameter including dot is not good....) How I failed config/routes.rb get 'meats/score/:score' => 'meats#score' rout…
やりたいこと GET http://domain.jp/api/2.1.1/users とか GET http://domain.jp/meats/score/21293.02 とか、少数点、というかドットが入った形のURLを使う方法についてです。 (そもそもドットの入った値はURLに入れないほうが良いのかもしれませんが...)…
環境 Xcode 7.3.1 Git 2.7.4 MacOS 10.11.5 Github 共有の仕方 ここをタップ 次にここをタップ こんな画面が出るので、sharedのとろこに、共有したいschemeはチェックを入れる そしたらGitで差分がでるので、それをcommitしてpush
Env Xcode 7.3.1 Git 2.7.4 MacOS 10.11.5 Github How Tap here Next Tap Here You can see screen below, then check-in the checkbox of scheme you want to share Then you can find diff in Git, commit and push it
Environment Xcode 7.3.1 iOS 8+ Situation Implement Incremental Search in TableViewController using SearchBar Input search word Leave by back button of nav bar, not x button or cancel button Search cannot move correctly. Initial View of Sea…
環境 Xcode 7.3.1 iOS 8+ 状況 SearchBarを使ってTableViewControllerで、インクリメンタルサーチを実装 検索ワードを入力 xボタンやcancelボタンではなく、戻るボタンで離脱 再度検索をしようとしたら、正常に動かなかった 検索画面の初期状況 検索バーにFi…
Environment Xcode 7.3.1 iOS 8,9 What's happened? Collapsed layout of SearchBar Search View Input text in SearchBar Search Result Search Target Data can be divided to some layer, so use section and side index list to show them in TableView …
環境 Xcode 7.3.1 iOS 8,9 何が起きたか 検索バーのレイアウトが崩れる 検索画面 検索バーにテキスト入力 検索結果 検索対象のデータが幾つかの階層に分けられるので、sectionで分けたり、サイドにsectionに応じたindexを表示させたりしています。 検索結果…
Environment Xcode 7.3 Situation Using Storyboard, when I tried to connect IBOutlet, error "Could not insert new outlet connection and deleting DerivedData doesnt work" was shown And set automatic in Assistant Editor, No Result was shown, a…
環境 Xcode 7.3 状況 Storyboardで、該当のコードに対してIBOutletを結ぼうとしたら、"Could not insert new outlet connection and deleting DerivedData doesnt work" というエラーがでた そもそもAssistant Editorでautomaticにしたとき、No Resultとなり…
Call NSTimer.scheduledTimerWithTimeInterval( 1, // second target: self, selector: #selector(ThisClass.methodName), userInfo: nil, repeats: true ) Execute func methodName() { print("pikachu!") } In UIViewController override func viewDidLoad…
呼び出し方 NSTimer.scheduledTimerWithTimeInterval( 1, // 単位は秒で間隔を指定 target: self, selector: #selector(ThisClass.methodName), userInfo: nil, repeats: true ) 実行 func methodName() { print("pikachu!") } UIViewControllerでやるなら o…
Easy way class func weekdayFromNSDate(date: NSDate) -> String { let cal = NSCalendar.currentCalendar() let comp = cal.components(NSCalendarUnit.Weekday, fromDate: date) let weekdayIndex = comp.weekday let formatter: NSDateFormatter = NSDat…
割りと楽なやり方 class func weekdayFromNSDate(date: NSDate) -> String { let cal = NSCalendar.currentCalendar() let comp = cal.components(NSCalendarUnit.Weekday, fromDate: date) let weekdayIndex = comp.weekday let formatter: NSDateFormatter…
This is 4th morning study time of Swift! Morning Study, which is "Asakatsu" in Japanese, is my favorite style of studying. But these days I had not able to have enough time to it. This time, relaxing and studying is my most important conce…
実は第4回目になります。 朝活は暫く出来ていなかったので、ちゃんと、ゆる〜くやろうと思います。 以前はスタバでやっていてとっても快適だったのですが、今は自宅で。 今回は↓な感じでログを残しながら進めていきます。 ログ ディレクトリ構成は帰るかも …
Situation Using Wercker for Building and Deploying Rails 4.x application. The Wercker version is Docker. In the build step, Bundler failing with index file .idx too small error error above is occurred so many times. and in the end, Retry e…
状況 普段Rails4系のアプリでWerckerをCIとして使っています。 WerckerはDocker版を使用しています。 そのBuild Stepで Bundler failing with index file .idx too small error といったエラーがたくさんでて、結果的に Retry exceeds max retries といった…
Diff of changed files $ git diff --stat commit-new commit-old $ git diff --stat --name-only commit-new commit-old $ git diff --stat --ignore-blank-lines commit-new commit-old Diff of content of file $ git diff commit-old commit-new -- path…
変更したfileの抽出 $ git diff --stat commit-new commit-old $ git diff --stat --name-only commit-new commit-old $ git diff --stat --ignore-blank-lines commit-new commit-old fileの変更差分 $ git diff commit-old commit-new -- path/to/file 差…
Japanese Here uchinoinu.hatenablog.jp Guideline github.com github.com Platform developer.yahoo.co.jp RESTful Web サービスの基本 Articles qiita.com www.toptal.com 10 Best Practices for Better RESTful API | Thinking Mobile Presentation www.i…
Japanese here uchinoinu.hatenablog.jp Guideline github.com github.com Platform developer.yahoo.co.jp RESTful Web サービスの基本 Articles qiita.com www.toptal.com 10 Best Practices for Better RESTful API | Thinking Mobile Presentation www.i…
Japanese here uchinoinu.hatenablog.jp func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { let tabBar = self.window!.rootViewController as! UITabBarController tabBar.se…
English here uchinoinu.hatenablog.jp func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { let tabBar = self.window!.rootViewController as! UITabBarController tabBar.sel…