2017-01-01から1年間の記事一覧
参照 Codableについて色々まとめた[Swift4] - Qiita Codableで色々なJSONに対応する - Qiita Swift4のCodableでフラットなJSONからネストしたオブジェクトにデコードする - Qiita Codableのinit(from:)をどう書くか / 20170621 #wwdc_ebisu // Speaker Deck …
objc++等 Swifty Objective-C | Inside PSPDFKit Even Swiftier Objective-C | Inside PSPDFKit
わかりやすかった。 qiita.com
ビットフラグはOpsionSetを定義すると使える。 struct Hoge : OptionSet { let rawValue : Int static let a = Hoge(rawValue: 0b0001) static let b = Hoge(rawValue: 0b0010) static let c = Hoge(rawValue: 0b0100) static let all:Hoge = [.a, .b, .c] s…
フローチャート代わりに使える。テンプレ的に以下 ```plantuml title <size:18>Sample</size> (*) --> "A" if "State" then partition "PartA" --> [a] "B" as hoge end partition else -> [b] "C" --> "D" endif partition "PartA" { hoge --> ===fork=== ===fork=== --> "E…
作る sqlite3設定 rodhos.hatenadiary.jp 命令群 ./bin/cake bake migration CreateProducts name:string description:text created modified ./bin/cake migrations migrate ./bin/cake bake seed Product ./bin/cake migrations seed ./bin/cake bake mode…
3桁区切り let nf = NumberFormatter() nf.numberStyle = .decimal nf.groupingSeparator = "," nf.groupingSize = 3 let str = nf.string(from: NSNumber(integerLiteral: self))
Comprehensive 包括的
色々使えそうで感動している。 dev.classmethod.jpqiita.com Swift4 dev.classmethod.jp
面白い。 Dancing in the Debugger — A Waltz with LLDB · objc.io
UIを書いてみた。あっているかどうかは不明。 RXSwiftExample
DisposeBag Observableの自動開放用袋、追加しておくとDisposeBagがdeinitする際にdisposeしてくれる。 CompositeDisposable Disposableをまとめてられる。まとめて廃棄すればよいものをまとめておく。
blog.okazuki.jp
elapsed 経過時間(elapseの過去、過去分詞) tense 張り詰めた、緊張した
インストール developer.nvidia.comパスを通す。nvcc hoge.cuでコンパイル。
Swiftで行列を作ってみた。一応掛け算できる。 Matrix swift
C++で書いてみた。正しい書き方でない可能性が高い..。 Perceptron cpp
またパーセプトロンのコードを書いてしまった..。 perceptron code
以下のようにtargetViewがtargetViewに貼り付けられているビューから(scrViewへ)の変換ができる。 let point = self.scrView.convert(targetView.frame.origin, from: targetView.superview)
Credential 信任状、証明書
正規表現を久しぶりに使ったのでメソッドをはやしてみた。
config確認 mysql_config which mysql.server /Applications/MAMP/Library/support-files/mysql.server which mysqld_safe /Applications/MAMP/Library/bin/mysqld_safe エラーログ /Applications/MAMP/db/mysql56/**.err
確認 cat $PATH 環境変数確認 env 一時的にパスを通す export PATH=$PATH:追加するパス これを設定に書いておけば良い。
controversial 論争の余地 impenetrably 見通せない incomprehensible 不可解 adornments 装飾 akin 似ている、同然 brevity 完結 versatile 多面性 arsenal 倉庫、武器庫
phpとjsとhtmlでhello worldしてみた。 \n".wrap("html", $content); } function wrap($title,$content, $options=null) { if ($options == null) { return "<$title>\n"." ".$content."</$title>\n"; } else { $res = ""; foreach($options as $key => …
APIをFutureで返す。bindはとりあえず省略。 @interface Future<V> : NSObject - (void)get:(void(^)(V))cb; @end @interface API<I,O> : NSObject - (Future<O> *)getAPI:(I)input; @end typedef void(^CallBack)(id); typedef void(^CPS)(CallBack); @interface Futur</o></i,o></v>…
Objective-Cで継続モナドを書いてみた。ジェネリクスの機能が貧弱なので辛いところが多い。
チュートリアルを参照した。 コンソールツール、シェルとタスク - 3.xsrc/Shell直下にHelloShell.phpを作る。 out('Hello world.'); } public function heyThere($name = 'Anonymous') { $this->out('Hey there ' . $name); $this->_hoge…
依存ライブラリ管理ツール。ライブラリの依存関係を定義する。ライブラリの依存関係をcomposer.jsonで定義する。プロジェクトの依存関係を作るには composer init で対話的にcomposer.jsonが作れる。cakephpのプロジェクトを作りたいときは composer create-…
>|swift| if (self.isBeingDismissed || self.isMovingToParentViewController) { ... } |