- 博客(105)
- 收藏
- 关注
原创 Python file read and wirte
Python 有很好的文本分析和处理能力,所以我想到,Python的文件类型file是内建类型然后就是实例和创建函数楼(构造函数)open函数的两个参数文件位置打开方式r 读文件时使用w写文件时使用a追加内容+ 同时进行读取和写入 r、w一起使用b binary的缩写,不对文件中的回车换行等细节进行平台相关的转换(如windows和linux中对行的理解
2012-11-21 20:09:49
1124
原创 Trie 树的简单实现
Trie tree WikipediaTrie 树, 又称前缀树,是一种高校的动态存储结构查找效率:O(m) m为串的长度空间要优于BST(二叉搜索树),因为Trie 树是前缀复用的。实现了插入、删除、显示加了注释,另外析构函数没有实现,释放树资源的函数也没有实现 :(#define CHARSIZE 26#include#include#incl
2012-11-21 19:35:22
675
1
原创 100000个随机数排序
问题时间要求:1000ms随机数范围:0--100000(8位小数)考虑使用基数排序无空间要求随机数范围较小,不会占用过多的空间(空间过大也会使基数排序的时间变长)思路:生成随机数使用基数排序:将整数部分相同的数看作相等的数,并记录下不同整数对应的随机数的个数和对应的索引起始位置基数排序后:如下所示,按照整数部分是有序的1.65561
2012-11-20 22:06:55
8632
原创 迭代求平方根
#includemain(){ //input int num ; while( 1 ) { scanf("%d", &num ); int i = 1; int temp = 0; for ( ; i<= num ; i++ )//point 1 { temp = i*i ; if ( temp == num ) {
2012-08-09 17:55:58
568
原创 二分查找求平方根
#includemain(){ //input int num ; while( 1 ) { scanf("%d", &num ); int i = 1; int temp = 1; int low = 1; int high = num; for ( ; i = 1 && low <= high; ) { temp = i*i;
2012-08-09 16:46:17
3012
原创 packet
http://www.cyberciti.biz/tips/linux-debian-package-management-cheat-sheet.html
2012-04-08 20:41:56
425
原创 software
jadhttp://www.blackberryseeker.com/blackberry-8310.aspxjadhttp://mobile.brothersoft.com/phone/blackberry/blackberry_8310/
2012-04-03 10:56:26
372
原创 get alx
software herehttp://swdownloads.blackberry.com/Downloads/contactFormPreload.do?code=00EC53C4682D36F5C4359F4AE7BD7BA1&dl=436027483BBB0328FE94B5D05FE2BD70&check1=A#guide herehttp://www.blackberry.
2012-04-03 10:51:49
452
转载 linux-virtualbox-netwrok
http://wenku.baidu.com/view/69c146e9e009581b6bd9eb8f.htmlbridge: ip diff from host others same
2012-03-10 11:02:25
329
原创 ssh-note
最权威和易懂的文档是RFC,但是阅读RFC文档需要有一些基础,因为RFC文档中的内容很全面也很具体,我们需要结合一些常识去理解和获取。我觉得维基百科是个不错的入门选择,里面会提供相关的具有适合广度的知识概述 ,我们需要根据这些线索找到我们最终需要解决的核心问题。但是最好的探索方式是必须要结合实践的,我们增加自己的常识就属于实践的一种,只不过这种实践属于初级的,我们需要根据RFC的描述,在现
2012-03-09 10:27:08
345
原创 libpcap start
installapt-get install libpcap-devgcc 001.c -o 001 lpcapgcc options google
2012-03-04 15:23:18
344
原创 common port number
20&21 File Transfer Protocol22 Secure Shell23 Telnet25 Simple Mail Transfer Protocol53 Domain Name Systeem service80 HyperText Transfer Protocol110 Post Office Protocol POP3119 Network N
2012-02-29 17:09:46
430
原创 protocol-ftp
File transfer ProtocolTransfer files from one host to another host over a TCP-based networkclear-text log-in protocol
2012-02-29 17:03:26
315
原创 protocol-sftp
SSH file transfer protocolnot related to FTP except it also transfer files and havs a similar set of command for usersA program to use Secure Shell to transfer files Encrypt bot
2012-02-29 15:53:44
484
原创 flashget for linux
download binary and installhttp://bbs.flashget.com/en/archiver/?tid-1446.htmlproblem:http://bbs.flashget.com/en/archiver/?tid-3974.html
2012-02-24 11:10:14
778
原创 gdb
gdb only sysbols generated by g++Loadgdb http-client executable filegcc http-client.c -o http-client -g [gdb]list function from the http-client.clist main symbollist 22
2012-02-19 13:21:57
289
原创 vsftp
vsftpservice vsftp start/stop/restart/statustest wether the vsftpd is runningnetstat -a | grep ftpnetstat -awill list all TCP and UDP portsConfig/etc/vsftpd.confsudo su -
2012-02-18 18:11:10
366
原创 main
main(int argc,char* argc[])C语言程序访问命令行参数显示了shell本身就是用exec启动j进程的argc=3 arguments count则argv有4个元素,最后一个为NULL
2012-02-10 15:35:04
295
原创 base-touch
Change all 3 timestampchange must be the current timestampChange access,modify and change to current timestamptouch fileChange access and modifytouch -t 06152300 filetouch -t 02132333
2012-02-04 15:08:02
403
原创 base-paste
Example:paste file1 file2123 liudepeng2 fanyiwei3 liuyanjun5 zhaoweixing3 fengguojing222 hello2235 487 4980 345 3
2012-02-04 13:53:21
385
原创 base-locate
Find file by nameLimit outputlocate filelocate -l 10 -b name-c print number of find entries-b only file name-i ignore case
2012-02-04 12:34:10
357
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人