- 博客(8)
- 资源 (1)
- 收藏
- 关注
原创 maven basics
create new projectmvn archetype:generate -DartifactId=weather -DgroupId=org.liuf.weather -Dversion=1.0 buildmvn install build jar with dependencypom.xmlbuild plugins pluginartifact
2010-01-23 22:50:00
314
原创 Perl using references
References to scalarvariables$wordref = /”the”;$$wordref = “the”;Print $$wordref; References toArrays@sentence = qw(this is a book);$sentenceref = /@sentence;$s
2009-08-05 13:29:00
343
原创 Perl using Hashes
初始化%hash1 = (the, 200, of, 149);%hash2 = ("the", 200, "of", 149);%hash3 = (the => 200, of =>149);%hash4 = ("the" => 200, "of" =>149);%hash5 = (1..9)存取++$counts{ $word }
2009-08-05 13:26:00
289
原创 Perl using Arrays
初始化@title = ("the", "black", "cat");@title = qw(the black cat);@letters = (A..Z)@numbers = (1..9)增加、删除$last = pop (@title); //删除最右侧$first = shift(@title);
2009-08-05 13:20:00
287
原创 Linux IPC - Shared memory
1. Create shared memory int shmget(key_t key, int size, int shmflg); if ((shm_id = shmget (mykey, sizeof (struct sharedbuf), 0600 | IFLAGS)) perror ("shmget");2. Attach shared mem
2007-03-09 14:41:00
934
原创 Linux IPC - Message Queue
1. Create IPC Facility Key key_t mykey;mykey = ftok(".", a); 2. Create Message Queue qid = msgget(mykey, 0600 | IPC_CREATE); 3. Receive/Send Message msgrcv(qid, buf, len
2007-03-09 12:07:00
1143
原创 Linux IPC - FIFO
1. Create a FIFO umask (0); mknod("/tmp/MYFIFO", S_IFIFO|0666, 0);2. Open a FIFO fd = open ("/tmp/MYFIFO", O_WRONLY); fd = open ("tmp/MYFIFO", O_RDONLY|O_NDELAY);3. Read/Write FIF
2007-03-09 11:38:00
528
原创 Linux IPC - PIPE
1. Create PIPE int handle[2]; int ret; ret = pipe(handle); /*handle[0] : read descriptor, handle[1]: write descriptor*/ if (ret { fprintf(stderr, "pipe error"); }2. Set PI
2007-03-09 11:01:00
916
non-blocking socket
2007-05-20
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人