那些有趣的命令 这是“那些有趣的指令”的第一部分,希望大家喜欢。xargs 或者 parallel,从标准输入中读取信息作为参数,初始化可执行命令,然后一次或多次运行该指令。可并行执行。sed 和 awk,这两个指令可以说大名鼎鼎,可以说是处理文本文件的万能机器,并且速度还比Ruby或者Pytho....
分类:
其他好文 时间:
2014-06-18 19:38:56
阅读次数:
263
1- 多行注释 ''' ''' 或 """ """'''this is the standard way to include a multiple-line comment in you code'''"""this is the standard way to include a multipl...
分类:
编程语言 时间:
2014-06-18 15:46:56
阅读次数:
264
#include#include#includeint k,h[110],mark;struct M{ int data; struct M *next;}*head[110];void init(){ int i; for(i = 0; i next = NULL; ...
分类:
其他好文 时间:
2014-06-17 00:58:16
阅读次数:
315
Problem DescriptionTeacher HU and his 40 students were trapped by the brigands. To show their power, the head of the brigands want to select one peopl...
分类:
其他好文 时间:
2014-06-17 00:28:32
阅读次数:
362
1.PyListObject对象 --> 变长可变对象,可看作vector
typedef struct{
PyObject_VAR_HEAD //其中的ob_size表示实际被使用的内存的数量
PyObject **ob_item;//ob_item为指向元素列表的指针,实际上,Python中的list[0]就是ob_item[0]
int allocated;//当前列表中可容纳的元素的总数
}
PyList_Type 对象 --> PyListObject的类型对象
ty...
分类:
编程语言 时间:
2014-06-16 22:48:55
阅读次数:
300
继续校赛前的建图任务,当时只写了DFS遍历,今天把BFS也写了一下。
#include
#include
#include
#include
#include
const int maxe = 10001;
using namespace std;
struct node{
int to,w;
node *next;
}*head[maxe];//he...
分类:
其他好文 时间:
2014-06-16 22:25:20
阅读次数:
286
本章主要介绍sed的命令使用sed(StreamEditor)是一种流编辑器,或者叫做行编辑器,以行为单位进行编辑处理,而后续会介绍的vi编辑器是一种全屏编辑器。sed的工作原理:逐行读取文件中的每一行,并将其放在内存空间中,在对内存空间中的数据进行处理,将处理后的结果打印到屏幕..
分类:
系统相关 时间:
2014-06-16 15:53:56
阅读次数:
542
linux查看硬件和系统信息的相关命令简介<转>[root@yufei~]#uname-a#查看内核/操作系统/CPU信息的linux系统信息命令[root@yufei~]#head-n1/etc/issue#查看操作系统版本,是数字1不是字母L[root@yufei~]#cat/proc/cpuinfo#查看CPU信息的linux系统信息命令[root@yufei~]#hos..
分类:
系统相关 时间:
2014-06-16 15:47:51
阅读次数:
339
1. trie树,又名字典树,顾名思义,它是可以用来作字符串查找的数据结构,它的查找效率比散列表还要高。
trie树的建树:
比如有字符串”ab” ,“adb”,“adc” 可以建立字典树如图:
树的根节点head不存储信息,它有26个next指针,分别对应着字符a,b,c等。插入字符串ab时,next[‘a’-‘a’]即next[0]为空,这...
分类:
其他好文 时间:
2014-06-14 14:25:50
阅读次数:
406
以下步骤在MAC下测试通过:
首先是安装CCache,
可以用homebrew
brew install --HEAD ccache
也可以用源码安装
git clone https://github.com/jrosdahl/ccache.git
cd ccache
./autogen.sh
./configure
make
make install
如果提示autohe...
分类:
移动开发 时间:
2014-06-14 12:28:49
阅读次数:
263