自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 资源 (11)
  • 收藏
  • 关注

原创 APUE2e之Exercise 16.3 Solution B

Code for client side is in Figure 16.14 in APUE2e, Page 568.To compile the program, check this post: posix thread相关函数的编译(undefined reference to `pthread_create’)/** * apue-chap16: ex

2012-09-28 04:50:05 996

原创 APUE2e之Exercise 16.3 Solution A

Below is the code for the server side. Code for client side is in Figure 16.14 in APUE2e, Page 568.To compile the program, check this post: posix thread相关函数的编译(undefined reference to `pthread_crea

2012-09-28 04:49:12 273

原创 APUE2e之Exercise 10.11

/** * apue-chap10: exercise10-11.c * * Description: TODO * * Created On: Mar 1, 2012 * * @author: Huang Zhu * * @email: zhuhuang.zp@gmail.com */ //Run under Ubuntu 10.04. sig_intr is n

2012-09-28 04:48:03 433

原创 APUE2e之Exercise 10.6 Solution C

Using Standard I/O Library to read and write the file. Rather than using signal function, I used sigaction. Thus don’t need to call TELL_WAIT in the for body./** * apue-chap10: exercise10-

2012-09-28 04:46:51 542

原创 APUE2e之Exercise 10.6 Solution B

Using Standard I/O Library to read and write the file./** * apue-chap10: exercise10-6b.c * * Description: Standard I/O Library * * Created On: Feb 16, 2012 * * @author: Huang Zhu *

2012-09-28 04:45:53 851

原创 APUE2e之Exercise 10.6 Solution A

Using File I/O to read and write the file./** * apue-chap10: exercise10-6a.c * * Description: FILE I/O * * Created On: Feb 15, 2012 * * @author: Huang Zhu * * @email: zhuhuang.zp@gm

2012-09-28 04:45:00 345

原创 APUE2e之signal function, signal handler, and signal mask on Ubuntu

When I was trying to run the program in Figure 10.23 in APUE2e using Ubuntu command line, after I typed Ctrl+C twice, the program terminated, which meant that the second SIGINT signal generated was no

2012-09-28 04:42:24 353

原创 APUE2e之Exercise 8.7

close-on-exec flag/* * exercise8-7.c * * Created on: Nov 11, 2011 * Author: zhuhuang */ #include #include #include #include int main(void){ DIR *dir; int filedes1, filede

2012-09-28 04:40:22 246

原创 APUE2e之Exercise 8.2

vfork v.s. fork/* * exercise8-2.c * * Created on: Nov 10, 2011 * Author: zhuhuang */ #include int glob = 6; int callvfork(void){ int var=88; pid_t pid; //compare the ru

2012-09-28 04:39:12 230

原创 APUE2e之Exercise 3.6

I was working exercise3.6 of APUE2e and the code was simple. But when I tried to use fgets and fputs to print out the file content, I got problems. Then I tried to figure out the reason. It turned out

2012-09-28 04:37:26 252

原创 APUE2e之Exercise 3.2

My implementation for APUE2e Exercise3.2: implement my own dup2 function that performs the same service as the dup2 function. Based on a little testing, it seems to work and behave as the provided d

2012-09-28 04:36:09 280

原创 C++之Access Label, Inheritance, and Friend

************Inheritance************Three modes of inheritance in C++: public, protected, private. For example: class D: public A, protected B, private C. (A, B, C, D are all class types)class

2012-09-28 04:07:25 275

原创 C语言之数组与指针

*******数组首元素的地址 vs 数组首地址*******/*a: bff0660ca+1: bff06610&a: bff0660c&a+1: bff06620*/int a[5] = {1,2,3,4,5};printf("a: %x\n", a); //address of first element in the arrayprintf("a+1

2012-09-28 03:57:19 725

原创 C语言之大小端模式

//little endian: the least significant byte at lowest address.//big-endian: the most significant byte at lowest address.int checkSystem(){ //union size is the largest size of its fields. And all

2012-09-28 03:56:20 789

原创 C语言之预处理

ANSI C预处理命令:#define, #undef, #include, #if, #else, #elif, #endif, #ifdef, #ifndef, #line, #error, #pragmaANSI C宏:_LINE_:表示正在编译的文件的行号_FILE_:表示在横在编译的文件的名字_DATE_:表示编译时刻的日期字符串,例如“25 De

2012-09-28 03:54:26 772

原创 C语言之各种符号

*****comment*****/**/这种习惯的注释不能嵌套。编译器会将注释部分剔除,但不是简单的删除,而是用空格代替原来的注释,比如int/*...*/i是合法的,但in/*...*/t i不合法。y = x/*p编译出错,编译器把/*当成一段注释的开始。y = x/ *p或y = x/(*p)正确。*****back slash***

2012-09-28 03:53:27 1188

原创 C语言之各种关键字

C语言32个关键字:auto, int, double, long, char, float, short, signed, unsigned, struct, union, enum, static, switch, case, default, break, register, const, volatile, typedef, extern, return, void, continue,

2012-09-28 03:50:38 763

Types and Programming Languages

Introduction about the principles of programming languages

2009-01-18

Spin Model Checker - The-Primer and Reference Manual

A primer and reference manual for spin

2009-01-18

Principles of Spin Model Checker

Introduce the concepts and principles of Spin

2009-01-18

93分钟学会Latex2

一份不太简短的Latex介绍或93分钟学会Latex

2008-11-22

Perl语言编程详解

介绍Perl语言编程的相关知识,帮助你快速上手

2008-11-22

跟我一起写Makefile

介绍Linux编程中Makefile的书写规则

2008-11-22

Types and Programming Languages

Introduce principles of programming languages

2008-11-22

Software Engineering - A Practioner's Approach 5th edition

Introduce Software Engineering and its major concepts and techniques.

2008-11-22

Ubuntu8.04速成手册

介绍Ubuntu的一些入门知识,快速上手

2008-11-22

Algorithms - A Top-Down Approach

Introduce Top-Down Approach algorithms

2008-11-22

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除