上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 33 下一页
  2017年4月1日
摘要: 查询文件并以降序排列:ll -t 查询文件并以升序排列:ll -t | tac 查询目录下文件数:ll|wc -l 阅读全文
posted @ 2017-04-01 11:12 baraka 阅读(876) 评论(0) 推荐(0) 编辑
  2017年3月30日
摘要: 头声明: static void* up(void *p); 实现: void* aaa::up(void *p) { aaa * a=reinterpret_cast<aaa*>(p); } 调用: pthread_create(&ph,NULL,up,(void*)this); 解析: 声明线程 阅读全文
posted @ 2017-03-30 14:03 baraka 阅读(209) 评论(0) 推荐(0) 编辑
摘要: reinterpret_cast <new_type> (expression) reinterpret_cast运算符是用来处理无关类型之间的转换;它会产生一个新的值,这个值会有与原始参数(expressoin)有完全相同的比特位。 什么是无关类型?我没有弄清楚,没有找到好的文档来说明类型之间到底 阅读全文
posted @ 2017-03-30 13:55 baraka 阅读(262) 评论(0) 推荐(0) 编辑
  2017年3月28日
摘要: oracle 用occi编程的时候,批量提交使用绑定变量的方式,主要瓶颈再sql语句解析上,改成merge into后效率没有变化,但是使用绑定变量方法,能加快速度 阅读全文
posted @ 2017-03-28 14:36 baraka 阅读(339) 评论(0) 推荐(0) 编辑
  2017年3月27日
摘要: #include <time.h> time_t timep; struct tm *p; time(&timep); p=localtime(&timep); int logminute = p->tm_min/10*10; int loghour=p->tm_hour; if(logminute 阅读全文
posted @ 2017-03-27 09:41 baraka 阅读(465) 评论(0) 推荐(0) 编辑
  2017年3月26日
摘要: char buf[256]={0}; char cmd[64] ={0}; FILE *fp=NULL; snprintf(cmd,sizeof(cmd),"ls %s","/aaa/"); fp=popen(cmd,"r"); int readlen=fread(buf,1,sizeof[buf] 阅读全文
posted @ 2017-03-26 11:18 baraka 阅读(246) 评论(0) 推荐(0) 编辑
  2017年3月23日
摘要: #!/bin/bash sleep 1 mkdir -p /ceshi/ userdel ceshi useradd -d /ceshi -s /sbin/nologin ceshi echo mima | passwd ceshi --stdin chown -R ceshi:ceshi /ces 阅读全文
posted @ 2017-03-23 21:50 baraka 阅读(326) 评论(0) 推荐(0) 编辑
摘要: c++ xml库相关 要解析内容: <ITEM name="SLSJ"head="SLSJ"/> 代码: GetNodeAttri(subnodes[i],"head"); 函数代码: xmlChar *xstr; string prop,value; xmlAttrPtr p_attr = nod 阅读全文
posted @ 2017-03-23 19:51 baraka 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 一、关于CPU的几个概念 CPU的作用 计算机中的中央处理单元(CPU)执行基本的计算工作 -- 运行程序。但是,一个单核的CPU同一时间只能一次执行一个任务,为了提高计算机的处理能力,也就出现了多CPU,超线程(HT)和多核CPU的技术。 大多数计算机只有一个物理CPU。单个CPU可能具有多个内核 阅读全文
posted @ 2017-03-23 11:02 baraka 阅读(533) 评论(0) 推荐(0) 编辑
  2017年3月18日
摘要: assert宏的原型定义在<assert.h>中,其作用是如果它的条件返回错误,则终止程序执行,原型定义:#include <assert.h>void assert( int expression ); assert的作用是现计算表达式 expression ,如果其值为假(即为0),那么它先向s 阅读全文
posted @ 2017-03-18 10:22 baraka 阅读(14980) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 33 下一页