安装 Debian 6.0 Squeeze

 0. Install sudo (open users and groups form System-Administrations, check your username under relevant groups)
1. Install  virtualbox:
   -- add the following line to /etc/apt/sources.list
   $ deb http://download.virtualbox.org/virtualbox/debian squeeze contrib non-free
    --nd then add the public key:
   $wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
   -- and install
   $ sudo apt-get update
   $sudo apt-get install virtualbox-4.1
   --finally, install extension pack

Two ways to connect a server through a socket

1. using getaddrinfo()

食物搭配禁忌(转载)

蔬菜类

黄瓜:不能与花生同食。
白萝卜:不能与红萝卜混吃,因红萝卜中所含分解酵素会破坏白萝卜中的维生素C。严禁与桔子同食,如同食会患甲状腺肿。同时也不能与梨、苹果、葡萄等水果同食。忌与何首乌、地黄混食。服人参时禁食萝卜。
胡萝卜:不得与酒同食,因为胡萝卜素与酒精一同进入人体,会在肝脏产生毒素,引起肝病。还不宜与西红柿、萝卜、辣椒、石榴、莴苣、木瓜等一同食用,因胡萝卜中含有分解酶,可使其他果菜中的维生素失去。胡萝卜最好单独食用或与肉类一起食用。

How to connect client and server by socket



The steps to establish a socket on the client side:

1. Create a socket with the socket() system call

int socket(int domain, int type, int protocol);