apk のメタ情報を取得する
apk がどの versionCode か判らなくなったときのために。
$ aapt dump badging example.com.apk package: name='example.com' versionCode='2' versionName='1.0.0' sdkVersion:'15' maxSdkVersion:'15' targetSdkVersion:'15'
Linux コマンドラインでの ADT のバージョンアップ
android update sdk -a -f --no-ui --proxy-port 8080 --proxy-host proxy.example.com
Rdmine のチケット番号は int(11)
なので、99999999999 までだね。
ver. 2.3.1
Android でインストールされている apk を取得する。
パッケージがインストールされているフルパスを検索
$ adb shell pm list packages -f | grep com.example package:/data/app/com.example.apk=com.example
パッケージファイルを取得(取得するファイル名は適時変更してください)
$ adb pull /data/app/com.example.apk
Install Ruby via RVM, Rails, thin on CentOS6
Ruby は RVM のマルチユーザモードでインストール。
$ \curl -L https://get.rvm.io | sudo bash -s stable $ rvmsudo rvm $ rvmsudo rvm requirement $ rvmsudo rvm get head && rvm reinstall $ rvmsudo rvm autolibs 3 $ rvmsudo rvm requirements $ rvmsudo rvm pkg install libyaml $ rvmsudo rvm reinstall 1.9.3 --with-libyaml-dir=/usr/local/rvm/usr --force
Rails のインストールはアプリケーションをデプロイして、カレントディレクトリで bundle install
$ cd /foo/bar/redmine-2.3 $ bundle install --without development test postgresql sqlite
thin のインストールと設定
$ gem install thin $ thin install $ rvm wrapper ruby-1.9.3-p392 bootup thin
git behind authentication proxy
git config --global http.proxy http://username:password@proxy.example.com:8080 git config --global https.proxy http://username:password@proxy.example.com:8080
via http://stackoverflow.com/questions/783811/getting-git-to-work-with-a-proxy-server
PPTP
Point-to-Point Tunneling Protocol
MPLS
Multi-Protocol Label Switching
SQLiteDatabase#rawQuery
馬鹿すぎる。
文字列で渡してるため、SQL 上でも文字列で扱ってみるみたい。 数値項目を検索する値をパラメータとして渡すとどうも検索できない。
https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#rawQuery%28java.lang.String,%20java.lang.String[],%20android.os.CancellationSignal%29
その結果、算出項目が数値の場合、数値で比較ができないよ。
- Android の SQLiteDatabase#rawQuery は文字列だけ扱っているので、どうも SQLite3 側の暗黙変換を期待してる感じ。
- 通常のカラムの場合、項目型定義があるため、暗黙変換が SQlite3 上で行われる。
- 対象項目が算出項目の場合、項目型が不明確なため、文字列で渡されている物をそのまま文字列として使用している。
SQLite3 でのクエリパラメータの制限
The second argument is the index of the SQL parameter to be set. The leftmost SQL parameter has an index of 1. When the same named SQL parameter is used more than once, second and subsequent occurrences have the same index as the first occurrence. The index for named parameters can be looked up using the sqlite3_bind_parameter_index() API if desired. The index for "?NNN" parameters is the value of NNN. The NNN value must be between 1 and the sqlite3_limit() parameter SQLITE_LIMIT_VARIABLE_NUMBER (default value: 999).
らしいので、多分 Android は 999 なんでしょうね。