This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onCreate(Bundle savedInstanceState) | |
{ | |
super.onCreate(savedInstanceState); | |
this.getWindow().setSoftInputMode(LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Android.mkにライブラリ (liblog)追加 | |
LOCAL_SHARED_LIBRARIES := \ | |
liblog \ | |
2. 使いたいソースファイルで適当にdefineする | |
#include "android/log.h" | |
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, "TAG", __VA_ARGS__) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# sqlite3 データベースにエントリをたくさん追加したときのスクリプト | |
# - これはmediatomb.dbに同じビデオコンテンツをたくさん追加している | |
i=106 | |
j=15 | |
while [ $j -le 60 ]; | |
do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* androidで、ダイナミックリンクしているライブラリを調べるには、lddの代わりにreadelfを使う。 | |
rm-eabi-readelf -d libfoo.so | |
[参考] | |
http://stackoverflow.com/questions/1043257/installing-a-prebuilt-binary-on-android-not-found |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TODO:android 4.0時点の情報なので、4.1以降は要調査。 | |
作成:2012/03/30 | |
■メモ | |
・checkCallingPermission() | |
- AndroidManifest.xmlに書くのでユーザーに見えてしまうが、プラットフォーム署名しばり | |
などできる | |
■参考 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
対処法①: | |
アップデートマネージャーの "再チェック"でリストを更新してから "アップデートをインストール"する。 | |
→アップデートマネージャーを起動した時点で再読み込みされていそうだけど、"再チェック"は別みたい。 | |
対処法②: | |
Terminalから "sudo apt-get update" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IEEE Standards associationのサイトで検索する | |
[検索方法] | |
http://standards.ieee.org/develop/regauth/oui/public.html | |
下の方の、"Search the Public OUI/'company_id' Listing" | |
調べたいMACアドレスの先頭の3オクテットを入れて、"Search!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <asm/current.h> | |
pid_t pid = current->tgid; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C言語では、論理否定演算子(!)は「真か偽」ではなく、常に1か0を返すことが保証されているらしい。 | |
なので、以下の文は意味がある。 | |
int value, x, y; | |
int a = !!value; | |
int b = !!(x & y); | |
→aとbは、1か0になる。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* include/asm-generic/errno-base.h | |
#define EPERM 1 /* Operation not permitted */ | |
#define ENOENT 2 /* No such file or directory */ | |
#define ESRCH 3 /* No such process */ | |
#define EINTR 4 /* Interrupted system call */ | |
#define EIO 5 /* I/O error */ | |
#define ENXIO 6 /* No such device or address */ | |
#define E2BIG 7 /* Argument list too long */ | |
#define ENOEXEC 8 /* Exec format error */ |