05 2011 档案

摘要:#! /bin/bsh#查找文件中是否有eee如果没有在最后加入 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/gamesexport PATH#echo "`grep -n -e eee lxtest`"#输入要匹配的字符串 查询的文件if [ $# -ne 2 ] then echo "the string and file" exit 1fin1=$1n2=$2n3=`grep -n -e $n1 $n2`n4="eee"echo $ 阅读全文
posted @ 2011-05-30 21:28 lxgeek 阅读(198) 评论(0) 推荐(0) 编辑
摘要:pthread_key_tThread local storage key (opaque)DeclarationSource position: ptypes.inc line 233typepthread_key_t=cuint;cuintC type: unsigned integer (natural size)DeclarationSource position: ctypes.inc line 40typecuint=cuint32;--------------------------------------------------------------------------- 阅读全文
posted @ 2011-05-15 16:43 lxgeek 阅读(505) 评论(0) 推荐(0) 编辑
摘要:实现: int s, con; struct sockaddr_in cliaddr, servaddr; if ( argc != 3 ) { printf( "uasage: httpd <IPaddress> <Port>"); exit( 0 ); } s = socket(AF_INET, SOCK_STREAM, 0); bzero(&servaddr, sizeof(servaddr)); servaddr.sin_family = AF_INET; inet_pton( AF_INET, argv[1], &(serv 阅读全文
posted @ 2011-05-12 22:14 lxgeek 阅读(3186) 评论(0) 推荐(0) 编辑
摘要:In many situations when designing statistical software, the number of variables a dis-crete distribution will have is not known in advance (at compilation time). There existsa need to generate discrete multidimensional distributions on the fly.Multi-way arraysOne obvious way to store these multidime 阅读全文
posted @ 2011-05-12 09:40 lxgeek 阅读(341) 评论(0) 推荐(0) 编辑
摘要:#include <iostream>#include <fstream>#include <string>#include <vector>#include <string.h>#include <stdlib.h>#include <stdio.h>using namespace std;typedef struct ring{ char a; struct ring *flink; struct ring *slink;} ring;ring* sring = NULL;ring* hring = NUL 阅读全文
posted @ 2011-05-08 19:00 lxgeek 阅读(177) 评论(0) 推荐(0) 编辑
摘要:Is Friday the 13th really an unusual event?That is, does the 13th of the month land on a Friday less often than on any other day of the week? To answer this question, write a program that will compute the frequency that the 13th of each month lands on Sunday, Monday, Tuesday, Wednesday, Thursday, Fr 阅读全文
posted @ 2011-05-03 17:23 lxgeek 阅读(628) 评论(0) 推荐(0) 编辑
摘要:A group of NP (2 ≤ NP ≤ 10) uniquely named friends has decided to exchange gifts of money. Each of these friends might or might not give some money to any or all of the other friends. Likewise, each friend might or might not receive money from any or all of the other friends. Your goal in this probl 阅读全文
posted @ 2011-05-01 22:45 lxgeek 阅读(699) 评论(0) 推荐(0) 编辑