そのうち maven とかに登録した
眠い・・・
キーボードを『HHKB Pro 黒 刻印あり』から『HHKB pro Type-S 白 刻印なし』にした、 このタイピングは!!後戻りはできない・・・・、家用が『HHKB Pro 黒』となったが、う、うるさい・・・ 今度は、FILCOとかを試したいと検討中ですね
などなどですが、争点はこれではないので置いておいて、
[管理者]層のリテラシー、体質が追いつてない限り、[現場]の作業フローとか組織構成はなんの意味も持たないため、管理体制と作業フローの間での乖離が発生し、結果的に作業フローで使用している。JIRAなどのツールが使いづらいのでなないだろうか? という仮説があります。(イメージは下図)これを読んだ方どうでしょうか?
[元ネタ] 反復開発/アジャイル/スクラムの作業フロー ↓ [管理者] 経営者?冗長?日本の文化と合わない or 理解(リテラシー)がない ↓ ↓ [現場] JIRA使いづらい 自己組織化されない
[現場]レベルで導入しても、[管理者]が理解レベルが合わないと、かみ合わない歯車がグルグルとなるので、 早急に対応が必要となるが、[現場]から[管理者]に知識や勝手をインストールすることまで、余裕が取れる状況はどれくらいあるのだろうか? また、[管理者]がインストールに対して前向きである必要もあるので、文化の改変まで日本レベルでN十年かかるのだろうか・・・orz
海外での職場は普通に作業フローを実行できているのだろうか? ご存知の方いましたら、コメントをお願いします。 また、そういったフォーラムの掲示板をご存知の方も情報いただけると助かります。 英語ならギリ話せると思うので、海外サイトでも大丈夫です。
そもそも、日本ベースのしょうゆ味作業フローを考えないといけないかもしれませんね。(^^)
mac $ boot2docker init --disksize=50000 --memory=2048 mac $ boot2docker start
確認結果
mac $ boot2docker ssh
docker@boot2docker:~$ df -h
Filesystem Size Used Available Use% Mounted on
rootfs 1.8G 204.8M 1.6G 11% /
tmpfs 1.8G 204.8M 1.6G 11% /
tmpfs 1004.6M 0 1004.6M 0% /dev/shm
/dev/sda1 47.0G 68.9M 44.5G 0% /mnt/sda1
cgroup 1004.6M 0 1004.6M 0% /sys/fs/cgroup
/dev/sda1 47.0G 68.9M 44.5G 0% /mnt/sda1/var/lib/docker/aufs
docker@boot2docker:~$ free
total used free shared buffers
Mem: 2057440 271940 1785500 0 1348
-/+ buffers: 270592 1786848
Swap: 447972 0 447972
docker@boot2docker:~$ cat /proc/meminfo
MemTotal: 2057440 kB
次は、web server, db をセットアップしよう
mac $ boot2docker stop
Google APIs を使うコマンドラインを書いてみました。自分のイベントとか見たい方は適当に改良してください。:-)
** かぶりネタですが興味のある方は読んでください。**
USAGE
gapicalendarlist.sh v2|v3
RESET SETTINGS
remove 'v2.gapi.token' or 'v3.gapi.token'
DEPENDENCIES
lynx, curl
簡単に認証と処理内容を書いてみました
知識の足りなさ等の諸事情で Devices の方法を選択してます。
Installed Applicatoins の方式で、https://accounts.google.com/o/oauth2/auth にリクエストするとHTMLコンテンツがかえって来ます。これはシェルであれこれするのが面倒だったのでやめました。
Devices方式で、https://accounts.google.com/o/oauth2/device/code にリクエストをすると、JSONがかえってpiar毎に改行されているのでシェルで扱いやすいのでこちらを選択しました
*** Google のサイトを見た方がいいと思ったので割愛します。 ***
[ shell ] [ google ]
| |
| |
+----- get user token -----> + URL 1
| |
| <------ user token --------+
| and other params |
| JSON |
| |
+----+ |
| | save token |
|<---+ |
| [ lynx ] |
| | |
+-- verify ->| |
| URL +-- Sign in --> |
| | |
| |<- user code --+
| | form |
| | |
| +- user code -->|
| | |
| |<- allow acces-+
| | confirm page |
| | |
| +-allow submit->|
| | |
| |<- result page-+
| | |
| |
| |
| |
| |
+------ get access token --->+ URL 2
| |
| <------ access token ------+
| and other params |
| JSON |
| |
+----+ |
| | save token |
|<---+ |
| |
| |
+----- get calendar list --->+ URL 3
| |
| <----- calendar list ------+
| JSON |
| |
| |
URL 1 https://accounts.google.com/o/oauth2/device/code
URL 2 https://accounts.google.com/o/oauth2/token
URL 3 https://www.googleapis.com/calendar/v3/users/me/calendarList
結論
QCon 2012 で Warp+Yesod がいいと言っていたので、ベンチをとってみました。いいっぽいです
サーバーサイドのチューニングはデフォなので、スレッド数位は合わせてベンチマークをとりたいと思って下ります。 なんかサーセン
Ubuntu 11.10
Intel(R) Xeon(R) CPU 5160 @ 3.00GHz x 2
Memory 2 GiB
|
|
Mac OS X 10.7.3
2.53 GHz Intel Core i5
Memory 8 GB 1067 MHz DDR3
$ ab -n request_count -c 128 -r -g gnuplot_file_name http://ubuntu.server:port/path >& result.txt This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/
| Apache | Lighttpd |
|---|---|
Server Software: Apache/2.2.20 Server Hostname: xxx.xxx.xxx.xxx Server Port: 80 Document Path: /index.html Document Length: 85 bytes |
Server Software: lighttpd/1.4.30 Server Hostname: xxx.xxx.xxx.xxx Server Port: 8123 Document Path: /index.html Document Length: 85 bytes |
| Node.js | Warp + Yesod |
|
version: 0.6.15 Server Software: Server Hostname: xxx.xxx.xxx.xxx Server Port: 8124 Document Path: / Document Length: 80 bytes |
ghc: 7.0.3 warp: 1.2.0.1 yesod: 1.0.0.2 Server Software: Warp/1.2.0.1 Server Hostname: xxx.xxx.x.160 Server Port: 8123 Document Path: /index Document Length: 99 bytes |
| Tomcat | Jetty |
Server Software: Apache-Coyote/1.1 Server Hostname: xxx.xxx.xxx.xxx Server Port: 8080 Document Path: /sample/index.html Document Length: 85 bytes |
Server Software: Jetty(8.1.2.v20120308) Server Hostname: xxx.xxx.xxx.xxx Server Port: 8080 Document Path: /sample/index.html Document Length: 85 bytes |
30000 request
10000 request
wait time について => Between writing request and reading response
Source らしい(何となく怪しい) から一部抜粋
struct data {
#ifdef USE_SSL
/* XXX insert timings for ssl */
#endif
int read; /* number of bytes read */
long starttime; /* start time of connection in seconds since
* Jan. 1, 1970 */
long waittime; /* Between writing request and reading response */
long ctime; /* time in ms to connect */
long time; /* time in ms for connection */
};
apache, lighttpd はリクエスト数が多いとテストに時間がかかります。
result/apache-time.dat request 1 2 3 4 200 0.028 0.035 0.030 0.031 500 0.081 0.087 0.078 0.069 1500 0.187 0.172 0.187 0.185 10000 90.143 109.438 107.131 104.303 30000 18.995 3.584 32.986 327.660 result/lighttpd-time.dat request 1 2 3 4 200 0.025 0.025 0.027 0.026 500 0.063 0.069 0.055 0.053 1500 2.139 0.561 0.168 0.169 10000 50.097 52.646 2.285 34.739 30000 142.147 5.152 165.114 162.209 result/nodejs-time.dat request 1 2 3 4 200 0.034 0.039 0.034 0.032 500 0.097 0.074 0.073 0.072 1500 0.238 0.235 0.245 0.211 10000 1.560 1.610 5.101 1.505 30000 8.593 24.368 16.838 31.659 result/warp-time.dat request 1 2 3 4 200 0.071 0.093 0.074 0.070 500 0.160 0.309 0.229 0.176 1500 1.264 1.057 1.326 1.048 10000 3.115 10.991 11.347 5.078 30000 33.264 34.866 33.098 34.690 result/tomcat-time.dat request 1 2 3 4 200 0.021 0.024 0.025 0.080 500 0.052 0.050 0.049 0.043 1500 0.151 0.167 0.166 0.153 10000 9.062 10.112 6.957 0.965 30000 21.004 12.324 21.602 18.784 result/jetty-time.dat request 1 2 3 4 200 0.025 0.025 0.026 0.028 500 0.087 0.104 14.926 0.059 1500 1.127 22.815 1.244 14.990 10000 11.779 11.658 11.648 11.617 30000 36.141 36.806 36.773 36.225
# tomcat $ java -cp srv.jar:lib/* web.server.WebServer # jetty $ java -cp srv.jar:lib/* web.server.WebServer -jetty # set port $ java -cp srv.jar:lib/* web.server.WebServer server.port 8123他のパラメータはソースを見てください
ネタが無いので、パクリました。_( TxT)_
Emitting (発光 by Google 翻訳先生) のパクリネタ
本家を読んでくださいね。
UIKit Particle System in iOS 5 Tutorial
CAEmitterLayer and CAEmitterCellアップるぅぅぅの記事ですよね
その他ぽいの
| birthRate | 毎秒どれくらいオブジェクトを作るか |
| lifetime | セルのライフタイム |
| color | tint 色合いを設定 |
| contents | CGImageRef を設定 |
Layer は emitterShape と emitterPosition を設定するくらいでしょうか
| emitterShape | オブジェクトの作成方法を設定 |
使った適当な画像はこれです
ファイルのコメント的にはコピペはOKそうだったのですが。
問題ありましたらご指摘ください
前回の記事が適当すぎたので、少ししっかり調べたーー
参考になると幸いです
SSL周りのリリースノート、仕様書とかきちんとでてますか?
知っている方いたら教えてください
- (void)connection:(NSURLConnection *)connection willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge {
NSURLProtectionSpace * protectionSpace = [challenge protectionSpace];
NSURLCredential* credentail = [NSURLCredential credentialForTrust:[protectionSpace serverTrust]];
[[challenge sender] useCredential:credentail forAuthenticationChallenge:challenge];
}
RSAはOKでDSAはNG
iOS 5.0 は 証明書に MD5 を非サポートになったので、
keytool のデフォルト動作だと MD5withRSA なので
自己証明のSSL通信が軒並み エラーになると思っていた
SHA1withRSA とかkeystoreを作り直すと上のコード動いたと勘違いした。
安心したので,MD5の証明書でもやってみたら案の定動作したので、アレ?と思い
DSA で作成したら軒並みエラーなった。
--- 以上 ----
SHA1withRAS, MD5withRAS
SHA1withDAS
iPad : Safari : RSA
iPad : Safari : DSA
自己証明書だと、通信に失敗するでの軒並みOKにするには下のコードで行ける!!
おすすめはしない!!
※ コマンドラインでしか試してません ※
- (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace {
return YES;
}
- (BOOL)connectionShouldUseCredentialStorage:(NSURLConnection *)connection {
return YES;
}
- (void) connection:(NSURLConnection *)conn didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge {
NSURLProtectionSpace * protectionSpace = [challenge protectionSpace];
NSURLCredential* credentail = [NSURLCredential credentialForTrust:[protectionSpace serverTrust]];
[[challenge sender] useCredential:credentail forAuthenticationChallenge:challenge];
}
$ system_profiler SPUSBDataType
USB:
USB High-Speed Bus:
Host Controller Location: Built-in USB
Host Controller Driver: AppleUSBEHCI
PCI Device ID: 0x3b3c
PCI Revision ID: 0x0006
PCI Vendor ID: 0x8086
Bus Number: 0xfa
Hub:
Product ID: 0x2514
Vendor ID: 0x0424 (SMSC)
^^^^ <- vender id
$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
^^^^ <- vender id
iOSというかllvmでコンパイルするときのARCをソースで管理するときの話です。 この方法はMacでしかできないと思います。
[Target] -> [Build Phase] -> [Compile Sources]
追記2 個人的には混在は嫌いなので、共有ものはライブラリにする方向でその中はARCのON/OFFに依存して統一して書いたのがよいと思う。
ソースで管理するなら、ライブラリを作成してそれを使用するのがいいと思いました。
#if __has_feature(objc_arc)
#if __has_feature(objc_arc) #define AUTORELEASE(A) A #define ARC_ON #else #define AUTORELEASE(A) [A autorelease] #define ARC_OFF #endif
// ARC ON の時は基本的に dealloc 書かないので丸ごと削除
#ifdef ARC_OFF
- (void)dealloc
{
[_window release];
[_viewController release];
[super dealloc];
}
#endif
//
// マクロで autorelease を隠蔽したりしなかったり
//
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = AUTORELEASE([[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] );
// Override point for customization after application launch.
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
self.viewController = AUTORELEASE([[GVViewController alloc] initWithNibName:@"GVViewController_iPhone" bundle:nil]);
} else {
self.viewController = AUTORELEASE([[GVViewController alloc] initWithNibName:@"GVViewController_iPad" bundle:nil]);
}
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
UILabel に ARC ON/OFFでラベルの内容をかえてます
#if __has_feature(objc_arc) #define HELLO @"Hello ARC" #else #define HELLO @"Hello ..." #endifARC ON ARC OFF
現段階での雑感
やっぱりMacはオサレ路線で見せプレイ系で使用して、開発はUbuntu(Linux)がよい
| android | 1.6 〜 (2.x系 未開発)〜 3.2 位 開発してみたことあり |
|---|---|
| iOS | iOS 5 sdk 〜 最近やってる |
| 項目 | Android | iOS | Winner | 備考 |
|---|---|---|---|---|
| Setup | sdk解答、環境変数設定 … | AppStoreからインストール終了 | 引き分け | iOSはデバイスに開発アプリをインストール辺りで、証明書周りでハマるので惜しいところで引き分け |
| SDK | android update だったようなコマンドでおk | AppStoreでxcodeを Updateでおk | 引き分け |
iOSはもうちょっとラップしたクラスを提供した方がいいと思う。CoreData周りでそう思った。ContentProviderはどうよって言われると、まぁまぁまぁって感じだけど... iOSはアップデートの所でappleIDを聞かれるが同じIDでなくてもいけるのわからん |
| IDE | Eclipse? | xcode | Android | 基本的にemacs なのでどっちでもいいけど、xcode4系は駄目な気がする |
| Source & Resources | Java , XML | Objective-C . XML? | Android | xcodeがいろいろ隠蔽しすぎて嫌になります。nibファイルは自分で書くレベルじゃない? |
| API | まぁJavadoc | HeaderDoc? | Android | もうしけないけど...AppleのClass Referenceは肌に合わない... |
| OS | Win,Ubuntu(linux?), Mac | Mac | Android | Macって開発しにくくないですか?やっぱUbuntuかな |
| アプリ | .apk | .app | iOS | 作り手次第だけど、同じレベルならiOSじゃね? |
Ubuntu 11.4 から11.10 にアップグレードをした。
gcc は 4.6 になっていた。
Mac でHHKB のドライバをインストールしたが
環境設定にアイコンが出てこない。
のが正解なのだろうか?
gcc -lobjc -lgnustep-base -fconstant-string-class=NSConstantString \
-I /usr/include/GNUstep -o xxxx ...
って感じなのだが mac では
gcc -framework Foundation -o xxxxx ...となる
sudo apt-get install libgmp3-dev libmpfr-dev libmpc-devビルド
gcc-4.6.1/ ソースディレクトリ build-gcc/ ビルドディレクトリビルドディレクトリにて
../gcc-4.6.1/configure --prefix=your_specified_path \
--exec-prefix=your_specified_path
make -j 3
make install
String showPasswordDialog(Component parentComponent, String message) {
JPasswordField pass = new JPasswordField();
Object[] opts = new Object[]{message , pass};
int opt = JOptionPane.showConfirmDialog(
// 親Frame , 表示するObject, タイトル , ダイアログのオプション ← 文言はほぼAPI1.6からコピペ
parentComponent, opts, null, JOptionPane.OK_CANCEL_OPTION);
if (opt == JOptionPane.OK_OPTION) {
return new String(pass.getPassword());
}
return null;
}
| Resolution | DPI | Drawable,Values |
|---|---|---|
| Normal | 213 | hdpi |
| High | 160 | mdpi |