其實這一年來實在太忙,寫文章也是斷斷續續的,心血來潮就寫一篇,忙的時候停筆一兩個月也是常有的事,從開始寫 Blog 到現在也只累積了不到百篇文章。這幾天到上海出差,下班後回到飯店,想說連上自己的 Blog 看看有沒有被「和諧」掉(還好沒有),突然發現 PageRank 升到 5 了。今年三月的時候,PageRank 還是只有 3 而已,大約四月底升到 4,然後到現在八月中左右就升到 5 了.. 不曉得 Google 怎麼算的
不過雖然 PageRank 升到 5 了,但是我發現原來在無名小站的舊 Blog 每日訪問數都還是比新的這邊高,而且其實舊的 Blog 內的文章大部分已經被我拿掉了,但是每日訪問數還是較多。更重要的是,從 Bloglines 的訂閱數目來看,新的 Blog 還是沒有超越原來我無名小站 Blog 的訂閱數 (其實都很少 XD)
但是呢,在大陸這邊,訪問我新的 Blog 是沒問題的,而無名小站的 Blog 卻被和諧掉了… 必須要 VPN 連回台灣才看得到 🙄
#!/usr/bin/perl# pre-commit hook to reject commit with empty log# remember to chmod 755 on this filedie"Usage: $0 [REPOS] [TXN]\n"unless@ARGV>1;$REPOS=$ARGV[0];$TXN=$ARGV[1];$svnlook='/usr/local/bin/svnlook';chomp($author=`$svnlook author -t $TXN $REPOS`);chomp($log=`$svnlook log -t $TXN $REPOS`);if($logeq''||$log=~/^\W+$/){die"\nHello, $author. Empty commit log is not permitted!\n";}exit(0);
#!/usr/bin/perl
# pre-commit hook to reject commit with empty log
# remember to chmod 755 on this file
die "Usage: $0 [REPOS] [TXN]\n" unless @ARGV > 1;
$REPOS=$ARGV[0];
$TXN=$ARGV[1];
$svnlook = '/usr/local/bin/svnlook';
chomp($author=`$svnlook author -t $TXN $REPOS`);
chomp($log=`$svnlook log -t $TXN $REPOS`);
if( $log eq '' || $log =~ /^\W+$/ ) {
die "\nHello, $author. Empty commit log is not permitted!\n";
}
exit(0);
#!/usr/bin/perl# pre-commit hook to reject empty commit log and cross-branch commit# remember to chmod 755 on this filedie"Usage: $0 [REPOS] [TXN]\n"unless@ARGV>1;$REPOS=$ARGV[0];$TXN=$ARGV[1];$svnlook='/usr/local/bin/svnlook';chomp($author=`$svnlook author -t $TXN $REPOS`);chomp($log=`$svnlook log -t $TXN $REPOS`);if($logeq''||$log=~/^\W+$/){die"\nHello, $author. Empty commit log is not permitted!\n";}open(DIRS,"$svnlook dirs-changed -t $TXN $REPOS|");while(<DIRS>){if(/^(trunk)\//){$branches{$1}++;}elsif(/^branches\/([^\/]+)/){$branches{$1}++;}}close(DIRS);$c=%branches;if($c>1){die"\nHello, $author. You can't commit to $c branches at the same time!\n";}exit(0);
#!/usr/bin/perl
# pre-commit hook to reject empty commit log and cross-branch commit
# remember to chmod 755 on this file
die "Usage: $0 [REPOS] [TXN]\n" unless @ARGV > 1;
$REPOS=$ARGV[0];
$TXN=$ARGV[1];
$svnlook = '/usr/local/bin/svnlook';
chomp($author=`$svnlook author -t $TXN $REPOS`);
chomp($log=`$svnlook log -t $TXN $REPOS`);
if( $log eq '' || $log =~ /^\W+$/ ) {
die "\nHello, $author. Empty commit log is not permitted!\n";
}
open(DIRS,"$svnlook dirs-changed -t $TXN $REPOS|");
while(<DIRS>) {
if( /^(trunk)\// ) {
$branches{$1}++;
}
elsif( /^branches\/([^\/]+)/ ) {
$branches{$1}++;
}
}
close(DIRS);
$c = %branches;
if( $c > 1 ) {
die "\nHello, $author. You can't commit to $c branches at the same time!\n";
}
exit(0);
絕大多數的 UNIX 系統在 64-bit 下面採用 LP64 這種 data model,這時候 long 就不再是固定為 4 bytes 大小,而是變成 8 bytes 的大小了!
然而,Win64 卻不是使用 LP64,而是採用 LLP64 這個 data model,這時候 long 的大小仍然還是 4 bytes
Many 64-bit compilers today use the LP64 model (including Solaris, AIX, HP, Linux, Mac OS X, and IBM z/OS native compilers). Microsoft’s VC++ compiler uses the LLP64 model.
兩種 data model 的最大差異點就是 long 這個資料型態的大小,LP64 是 64-bit,而 LLP64 則是 32-bit
LLP64 data model 基本上可以說跟 32-bit 的系統一樣,唯一差別只有位址(pointer)改成了 64-bit 而已。資料物件(class, structure) 等如果沒有包含 pointer 的成員的話,整個物件的大小是與 32-bit 系統一樣的!