open/文件操作f=open('/tmp/hello','w')#open(路径+文件名,读写模式)#读写模式:r只读,r+读写,w新建(会覆盖原有文件),a追加,b二进制文件.常用模式如:'rb','wb','r+b'等等 读写模式的类型有: rU 或 Ua 以读方式打开, 同时提供通用换行符支 ...
分类:
编程语言 时间:
2016-03-26 18:40:45
阅读次数:
164
交叉编译:tar xjf freetype-2.4.10.tar.bz2 ./configure --host=arm-linuxmakemake DESTDIR=$PWD/tmp install find -name stdio.h 平时使用#include路径 ./arm-linux/inclu... ...
分类:
其他好文 时间:
2016-03-26 16:53:52
阅读次数:
110
#include<iostream>
usingnamespacestd;
classString
{
public:
String(char*str="")//不能strlen(NULL)
:_str(newchar[strlen(str)+1])
{
strcpy(_str,str);
}
String(constString&s)
:_str(NULL)
{
Stringtmp(s._str);
swap(_str,tmp._str);
}
//String&ope..
分类:
其他好文 时间:
2016-03-26 08:39:43
阅读次数:
140
#!/bin/sh
mkdir/home/zhengyk/Desktop/tmp#创建临时文件夹,用来存放解压后的文件
#mkdir/home/zhengyk/Desktop/local#创建临时文件夹,用来存放过滤结果
list_alldir(){
forfilein$1/*
do
if[-d$file];then
list_alldir$file
else
filename=${file##*/}#从路径中取出文件..
分类:
系统相关 时间:
2016-03-26 08:28:45
阅读次数:
255
首先查看steam日志,在/tmp/dumps/下,以“用户名_output.txt”命名。 原因是steam用的lib文件太老,找到的结局办法是删掉即可,我个人是建议备份。 参考: 1.https://bbs.archlinux.org/viewtopic.php?id=183659 见一楼,“F ...
分类:
系统相关 时间:
2016-03-26 06:41:47
阅读次数:
1117
In[105]:f1=open(‘/tmp/passwd‘,‘r+‘)读写方式打开In[106]:f1.next()读一行,next陆续往下读,不会移动行指标Out[106]:‘root:x:0:0:root:/root:/bin/bash\n‘In[107]:f1.seek(0,2)从文件末尾行(2)偏移位置0(0),f1.seek(0)回到开始处In[109]:f1.tell()查看文件位置(字节)Ou..
分类:
编程语言 时间:
2016-03-24 13:25:31
阅读次数:
192
抓eth1的包 tcpdump -i eth1 -w /tmp/xxx.cap 抓 192.168.1.123的包 tcpdump -i eth1 host 192.168.1.123 -w /tmp/xxx.cap 抓192.168.1.123的80端口的包 tcpdump -i eth1 hos ...
分类:
系统相关 时间:
2016-03-24 08:45:36
阅读次数:
283
一、Android模拟器每次运行时会临时生成几个tmp后缀的临时文件,需要定时的清理:C:\Documents and Settings \"用户名"\Local Settings\Temp\AndroidEmulator; 二、如果使用Eclipse开发工具进行调试,那么第一次运行程序,并启动模拟 ...
分类:
其他好文 时间:
2016-03-24 01:13:49
阅读次数:
194
stack smashing aborted 堆 猛烈撞击 流失 我在使用数据时写了 tmp_row = row + pos[num1][[0]; tmp_col = col + pos[num1][1]; if(map[tmp_row][tmp_col] != -1)map[tmp_row][tm ...
分类:
其他好文 时间:
2016-03-24 00:57:49
阅读次数:
220
集群中的每个节点必须有位置名称,默认情况下consul使用主机名作为名称,我们也可以使用-node命令指定构建集群启动首个节点[root@consul-1~]#consulagent-server-bootstrap-expect1-data-dir/tmp/consul-node=agent-one-bind=192.168.0.149-config-dir/etc/consul.d/
==>WARNI..
分类:
其他好文 时间:
2016-03-23 23:52:36
阅读次数:
1163