Monday, April 29, 2013

Windows7のパーティショニング

Windows7のパーティションを変更したいとき。

今回の例だと、CドライブをCとDドライブに分けたい場合、
Windowsデフォルトのパーティション管理ツールだと、
Cドライブを半分までしか縮小できなかったので、以下のツールを使用。

http://www.partitionwizard.com/


参考

Thursday, April 25, 2013

cvs で svn status

CVSで変更したファイルを参照したい場合
$ cvs diff --brief | & grep 'Index\|is not in file'

Indexが無駄にhitしてしまうのでちょっと修正
$ cvs diff --brief | & grep '^Index\|is not in file'

Tuesday, April 23, 2013

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Please contact your system administrator.
Add correct host key in /home/user/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/user/.ssh/known_hosts:8
RSA host key for hostname has changed and you have requested strict checking.
Host key verification failed

ssh実行時に上記のメッセーが表示された場合
/home/user/.ssh/known_hosts の8行目を削除する

Friday, April 12, 2013

git addの取り消し

$ git reset HEAD [filename]

initial commit してない場合
$ git rm --cached [filename]


参考

shellの正規表現

ワイルドカード
$ ls *.txt
abc111.txt abc121.txt abc122.txt abc123.txt
$ ls abc12?.txt
abc121.txt abc122.txt abc123.txt

任意の文字
$ ls abc12[12].txt
abc121.txt abc122.txt

任意の文字列
$ ls abc{111,122}.txt
abc111.txt abc122.txt

任意の文字を除いた文字
$ ls abc12[^1].txt
abc122.txt abc123.txt


参考

Sunday, April 7, 2013

Unused VariableのWarningを無視

__unused を頭につける
__unused NSInteger i;

よほど変なことしない限り必要なさそうですけど


参考

nested push animation can result in corrupted navigation bar

storyboardでUITableViewからpushするUIViewControllerへsegueを繋げて、
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
 [self performSegueWithIdentifier:@"TestView" sender:nil];
}
で、pushした場合に、下のエラーが出た
2013-04-07 23:35:39.020 TestApp[24121:907] nested push animation can result in corrupted navigation bar
2013-04-07 23:35:39.395 TestApp[24121:907] Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.
2013-04-07 23:35:39.399 TestApp[24121:907] Unbalanced calls to begin/end appearance transitions for .
push、popの動作もおかしくなってしまう模様

原因としては、UITableViewCellのSelection Segue(push)からUIViewControllerに繋げてしまっていたので、
UITableViewのManual Segue(push)から繋げるようにして解決
Cellから繋げる場合は明示的に、performSegueWithIdentifier: しなくていいのね


参考