
CS551
文章平均质量分 57
Albahaca
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
linux kill all proccess
$ ps -ef | grep PROCESS | grep -v grep | awk '{print $2}' prints the PID in the output of processes which contains PROCESS in their name. $ kill -9 `ps -ef | grep oraxpo | grep -v grep | awk '原创 2013-10-30 08:42:19 · 546 阅读 · 0 评论 -
Create UPD socket (dynamically allocated port number)
http://www.cs.rutgers.edu/~pxk/417/notes/sockets/udp.html Introduction In our discussion of sockets, we covered an example of programming with connection-oriented sockets: sockets that转载 2013-10-24 06:32:22 · 557 阅读 · 0 评论 -
char 与 int 转化(位运算)
int =》char void change(int pNum,char *outPut) { *outPut = pNum & 0x000000ff; *(outPut + 1) = (pNum & 0x0000ff00)/0x000000ff; *(outPut + 2) = (pNum &原创 2013-10-30 14:33:03 · 1420 阅读 · 0 评论 -
waitpid
等待所有子进程结束: pid_t pr; do { pr = waitpid(0, NULL, WNOHANG); printf("pid %d\n",pr); if (pr==0) { printf("I'm the father process, the child p原创 2013-11-01 15:01:28 · 422 阅读 · 0 评论 -
xcode 快捷键
xcode相关: 关于xcode 可设 偏好设置 command+, 清空缓存 可设 隐藏xcode command+h 隐藏其它 command+option+h 显示全部 可设 退出xcode command+q 文件相关: 新建项目 command+shift+n 新建文件 command+n 新建空文件 command+control转载 2013-12-02 15:16:50 · 409 阅读 · 0 评论 -
函数传参:引用类型 vs 指针类型
f (int &a) 引用类型 引用传递 f (int *a) 指针类型 (int *指向int型变量的指针类型)值传递 在函数里面改变函数外面变量的值 1:void f(int &a) { a=4; return; } 主函数中:int x=0; f(x); 结果 x=4 2:void f(int *a) { *a=4; return;原创 2013-10-24 06:57:25 · 523 阅读 · 0 评论