Rodhos Soft

備忘録を兼ねた技術的なメモです。Rofhos SoftではiOSアプリ開発を中心としてAndroid, Webサービス等の開発を承っております。まずはご相談下さい。

2017-01-01から1年間の記事一覧

Codable

参照 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 包括的

XCode9

色々使えそうで感動している。 dev.classmethod.jpqiita.com Swift4 dev.classmethod.jp

デバッグ

面白い。 Dancing in the Debugger — A Waltz with LLDB · objc.io

UIを作ってみる

UIを書いてみた。あっているかどうかは不明。 RXSwiftExample

基本的なこと

DisposeBag Observableの自動開放用袋、追加しておくとDisposeBagがdeinitする際にdisposeしてくれる。 CompositeDisposable Disposableをまとめてられる。まとめて廃棄すればよいものをまとめておく。

参考ページ

blog.okazuki.jp

英単語

elapsed 経過時間(elapseの過去、過去分詞) tense 張り詰めた、緊張した

最初

インストール developer.nvidia.comパスを通す。nvcc hoge.cuでコンパイル。

Matrix

Swiftで行列を作ってみた。一応掛け算できる。 Matrix swift

パーセプトロン

AI

C++で書いてみた。正しい書き方でない可能性が高い..。 Perceptron cpp

パーセプトロン

AI

またパーセプトロンのコードを書いてしまった..。 perceptron code

座標系の変更

以下のようにtargetViewがtargetViewに貼り付けられているビューから(scrViewへ)の変換ができる。 let point = self.scrView.convert(targetView.frame.origin, from: targetView.superview)

メモ

Credential 信任状、証明書

正規表現

正規表現を久しぶりに使ったのでメソッドをはやしてみた。

scoketエラー等

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

PATH

確認 cat $PATH 環境変数確認 env 一時的にパスを通す export PATH=$PATH:追加するパス これを設定に書いておけば良い。

メモ

controversial 論争の余地 impenetrably 見通せない incomprehensible 不可解 adornments 装飾 akin 似ている、同然 brevity 完結 versatile 多面性 arsenal 倉庫、武器庫

hello world

php

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 => …

継続モナドその2

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で継続モナドを書いてみた。ジェネリクスの機能が貧弱なので辛いところが多い。

Shell

チュートリアルを参照した。 コンソールツール、シェルとタスク - 3.xsrc/Shell直下にHelloShell.phpを作る。 out('Hello world.'); } public function heyThere($name = 'Anonymous') { $this->out('Hey there ' . $name); $this->_hoge…

Composer

php

依存ライブラリ管理ツール。ライブラリの依存関係を定義する。ライブラリの依存関係をcomposer.jsonで定義する。プロジェクトの依存関係を作るには composer init で対話的にcomposer.jsonが作れる。cakephpのプロジェクトを作りたいときは composer create-…

画面消えるタイミング

>|swift| if (self.isBeingDismissed || self.isMovingToParentViewController) { ... } |