#include
void colorReduce(cv::Mat &image, int div=64)
{
int nr= image.rows; // number of rows
int nc= image.cols * image.channels(); // total number of elements per line
if (image.isContinuo...
分类:
移动开发 时间:
2015-03-10 21:36:15
阅读次数:
169
身在天朝。你面临的一个问题就是网络安装好Nodejs 控制台 执行npmconfigsetregistryhttps://registry.npm.taobao.org//配置指向源然后安装 nrm$ npm install -g nrm具体使用看https://github.com/Pana/nr...
分类:
其他好文 时间:
2015-03-10 13:29:35
阅读次数:
120
#include
void colorReduce(cv::Mat &image, int div=64)
{
int nr= image.rows; // number of rows
int nc= image.cols * image.channels(); // total number of elements per line
for (int j=0; j<nr;...
分类:
移动开发 时间:
2015-03-09 20:58:51
阅读次数:
307
# 显示第xx行的第yy列的一个字符sed -n 'xx,xxp' file | awk '{print substr($0,yy,1);}'# 修改第xx行的第yy列的一个字符Chr,并保存为新文件awk -F "" 'BEGIN { OFS="" }{if(NR == xx) for(i=yy;...
分类:
其他好文 时间:
2015-03-08 17:08:17
阅读次数:
273
在Linux中,进程是通过文件描述符(file descriptors,简称fd)而不是文件名来访问文件的,文件描述符实际上是一个整数。Linux中规定每个进程能最多能同时使用NR_OPEN个文件描述符,这个值在fs.h中定义,为1024*1024(2.0版中仅定义为256)。每个文件都有一个32位...
分类:
系统相关 时间:
2015-03-07 16:53:22
阅读次数:
174
awk中NF和NR的意义,其实你已经知道NF和NR的意义了,NF代表的是一个文本文件中一行(一条记录)中的字段个数,NR代表的是这个文本文件的行数(记录数)。在编程时特别是在数据处理时经常用到。建议你看看有关awk编程方面的资料,这可是一个功能非常强大的工具。看个例子:cal 9 2003 Sept...
分类:
其他好文 时间:
2015-03-07 11:22:10
阅读次数:
236
序号 任务 命令组合 1 删除0字节文件 find . -type f -size 0 -exec rm -rf {} \; find . type f -size 0 -delete 2 查看进程,按内存从大到小排列 ps -e -o “%C : %p : %z : %a”|sort -k5 -nr 3 按cpu利用率从...
分类:
系统相关 时间:
2015-03-05 13:09:38
阅读次数:
155
awk [root@localhost~]#awk‘{print$0}‘/etc/passwd root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin [root@localhost~]#awk‘{print""}‘/etc/passwd [root@localhost~]#awk..
分类:
其他好文 时间:
2015-03-03 18:49:33
阅读次数:
130
awk编程语言/数据处理引擎
创造者: Aho weinberger kernighan
基于模式匹配检查输入(逐行读入逐行输出)
将期望的匹配结果print到屏幕
语法格式:
awk '模式 {操作}' 文件1 文件2 。。。。。
常用的内建变量
NR 当前...
分类:
其他好文 时间:
2015-03-02 13:12:51
阅读次数:
151
例子:awk‘{print$0}‘passwd|teehaha#将结果输出在终端,并保存到文件hahaawk‘BEGIN{FS=":";OFS="/t";print"start..."}{sum+=1;printNR}END{print"total:"sum}‘passwd#输出每行行号,并统计行数,显示时以/t分隔awk‘NR==3{print$0}‘passwd#显示第三行awk-F:‘{print$NF}‘passwd#..
分类:
其他好文 时间:
2015-02-28 16:46:26
阅读次数:
139