if (condition)
{
}
如果隔很遠才看到 else
會發生意外
所以我的 else 一定跟 "}" 要接在一起
沒有人可以把他們分開
說的是,我的 code style :
if (condition)
{
# do sth
} else
{
# do sth
}
不過同事說, else 接在 "}" 後面,會讓他忽視掉 else 的存在。
靠,正好跟我相反....
if (condition)
{
}
if (condition)
{
# do sth
} else
{
# do sth
}
[user]
name = Anton Yu
email = xxxx@gmail.com
[color]
diff = auto
status = auto
branch = auto
[alias]
st = status
rb = svn rebase
ci = commit -a
co = checkout
$ mkdir gtalkbot
先找個地方來放 codehttps://gtalkbot.googlecode.com/svn/trunk/
$ git-svn init https://gtalkbot.googlecode.com/svn/trunk/ gtalkbot/
$ git-svn fetch
echo -n 8 > /proc/acpi/video/VGA/LCDD/brightness
rm /etc/ssh/ssh_host*
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
為了使用SSH加密傳輸且不需要輸入密碼
1.#cd /root/.ssh (進入到/root/.ssh/ 目錄下)
2.#ssh-keygen -d (產生ssh的公鑰和私鑰)
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa): (產生到何處.按Enter 就可以了)
Enter passphrase (empty for no passphrase): (要不要設定passwd.避免問我們按Enter 就可以了)
Enter same passphrase again: (再按一次Enter)
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
此時目錄下會產生公鑰id_dsa.pub和私鑰id_dsa
現在要把id_dsa.pub丟到192.168.0.2 並且更名為 authorized_keys
3.#scp id_dsa.pub 192.168.0.2:/root/.ssh/authorized_keys
root@192.168.0.2's password:
id_dsa.pub 100% |*****************************| 613 00:00
試試看 ssh 到server 應該就不用輸入密碼了
4.#ssh 192.168.0.2
#exit (記得離開)
test = 1;
if (!test)
{
printf("1 is false\n");
} else
{
printf("1 is true\n");
}
./test
NULL is false
-1 is true
0 is false
1 is true
/tmp/vmware-config0/vmmon-only/linux/driver.c:1659: error: ‘struct mm_struct’ has no member named ‘dumpable’
make[2]: *** [/tmp/vmware-config0/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-config0/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-16-generic'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config0/vmmon-only'
Unable to build the vmmon module.
wget http://vmkernelnewbies.googlegroups.com/web/vmware-any-any-update-116.tgz
tar -zxf vmware-any-any-update-116.tgz
cd vmware-any-any-update-116
sudo ./runme.pl
sudo vmware-config.pl
cp /lib/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1
test -x "$DAEMON" || exit 0
*)
echo "Usage: /etc/init.d/xinetd {start|stop|reload|force-reload|restart}"
exit 1
;;
# [略]
esac
exit 0
因為工作轉到 Windows 平台上的關係,所以很多工具改到 Windows 上面運作,跟著在 TortoiseGit 底下使用 git-bash 來維護自己的專案原始碼。結果就是裝了前面提過的 auto-hotkey 使用熱鍵來提昇自己的平台操作速度; 但除了 hotkey...