随笔分类 -  c

摘要:WebBench源码:https://github.com/EZLippi/WebBench Webbench是一个在linux下使用的非常简单的网站压测工具。它使用fork()模拟多个客户端同时访问我们设定的URL,测试网站在压力下工作的性能,最多可以模拟3万个并发连接去测试网站的负载能力。 参考 阅读全文
posted @ 2019-07-20 08:59 anobscureretreat 阅读(387) 评论(0) 推荐(0)
摘要:可以通过int 或long int存储,16进制整数说到底还是整数,16进制只是一种记数方式。例如,int x=0x16;十六进制(hexadecimal)只是计算机中数据的一种表示方法,规则是“逢十六进一”,并不影响数据的存储。任何数据在计算机中存储的都只是二进制(0/1)数据,只是根据需要输出时 阅读全文
posted @ 2019-07-04 00:16 anobscureretreat 阅读(4687) 评论(0) 推荐(0)
摘要:#include /* puts, printf */ #include /* time_t, struct tm, time, localtime */ struct Position{ double x; double y; double z; }; struct Orientation{ double w; double... 阅读全文
posted @ 2019-06-27 23:36 anobscureretreat 阅读(191) 评论(0) 推荐(0)
摘要://char carray[]="nihao"; char carray[]={'a','b','c','d','\0'}; printf("array=%s",carray); 阅读全文
posted @ 2019-06-23 00:33 anobscureretreat 阅读(525) 评论(0) 推荐(0)
摘要:显示0x 显示6位有效数字 阅读全文
posted @ 2019-06-23 00:29 anobscureretreat 阅读(225) 评论(0) 推荐(0)
摘要:%d,int %ld,long int %lld,long long %hd,short %c,char %f,float %lf,double %u,unsigned %x,十六进制输出int,或者long int 或者 short int %o,八进制输出 %s,字符串 阅读全文
posted @ 2019-06-23 00:17 anobscureretreat 阅读(367) 评论(0) 推荐(0)
摘要:char 1 short 2 int 4 long 4 float 4 double 8 signed 最高位是符号位,有符号数,可以表示负数 unsigned 最高位是数值位,无符号数,不可以表示负数 c没有Boolean,byte,c用0和非0表示false和true 阅读全文
posted @ 2019-06-23 00:11 anobscureretreat 阅读(167) 评论(0) 推荐(0)
摘要:https://github.com/nerososft/MiniNeroEnginehttps://github.com/nerososft/NeroEnginehttps://github.com/nerososft/zombieWar 阅读全文
posted @ 2019-06-22 23:59 anobscureretreat 阅读(141) 评论(0) 推荐(0)
摘要:#include #include #include int main(void) { int stage; int a, b, c; int x; int n; clock_t start, end; srand(t... 阅读全文
posted @ 2019-06-17 01:13 anobscureretreat 阅读(248) 评论(0) 推荐(0)
摘要:demo1 demo2 阅读全文
posted @ 2019-06-17 00:54 anobscureretreat 阅读(282) 评论(0) 推荐(0)
摘要:输出 阅读全文
posted @ 2019-06-17 00:46 anobscureretreat 阅读(273) 评论(0) 推荐(0)
摘要:输出 阅读全文
posted @ 2019-06-17 00:43 anobscureretreat 阅读(211) 评论(0) 推荐(0)
摘要:/*--- 等待x毫秒 ---*/ int sleep(unsigned long x) { clock_t c1 = clock(), c2; do { if ((c2 = clock()) == (clock_t)-1) /* 错误 */ return 0; } while (1000.0 * (c2 - c1) /... 阅读全文
posted @ 2019-06-17 00:39 anobscureretreat 阅读(1980) 评论(0) 推荐(0)
摘要:/* 回车符\r的使用示例:重写行 */ #include #include /*--- 等待x毫秒 ---*/ int sleep(unsigned long x) { clock_t c1 = clock(), c2; do { if ((c2 = clock()) == (clock_t)-1) /* 错误 */ ... 阅读全文
posted @ 2019-06-17 00:38 anobscureretreat 阅读(328) 评论(0) 推荐(0)
摘要:输出 阅读全文
posted @ 2019-06-17 00:31 anobscureretreat 阅读(18836) 评论(0) 推荐(0)
摘要:输出 阅读全文
posted @ 2019-06-17 00:26 anobscureretreat 阅读(570) 评论(1) 推荐(0)
摘要:#include #include #include int sleep(unsigned long x) { clock_t c1 = clock(), c2; do { if ((c2 = clock()) == (clock_t)-1) return 0; } while (1000.0 * (c2 - c... 阅读全文
posted @ 2019-06-17 00:24 anobscureretreat 阅读(376) 评论(0) 推荐(0)
摘要:输出 阅读全文
posted @ 2019-06-17 00:12 anobscureretreat 阅读(262) 评论(0) 推荐(0)
摘要:输出 阅读全文
posted @ 2019-06-17 00:02 anobscureretreat 阅读(353) 评论(0) 推荐(0)
摘要:输出 阅读全文
posted @ 2019-06-16 23:56 anobscureretreat 阅读(328) 评论(0) 推荐(0)