会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
helloweworld
博客园
首页
新随笔
管理
上一页
1
2
3
4
5
6
7
8
9
···
48
下一页
2014年10月18日
语言c++标准库---fstream文件操作
摘要: #include using namespace std;int main(int argc, char** argv){ // 1 open fstream objTestFile("file_test/tmp_out_app.txt", ios::in); // 2...
阅读全文
posted @ 2014-10-18 17:53 helloweworld
阅读(408)
评论(0)
推荐(0)
2014年10月16日
协议udp---udp编程, 最多发送多少字节?
摘要: 结论: 1. internet 548bytes. 2. 局域网 1472bytes局域网链路层的MTU(最大传输单元) 1500字节, MTU指的是最大传送的数据, 不包括链路层首部和尾部.所以IP首部(20字节) + IP包数据 = 1500字节, IP包数据 = 1480字节UD...
阅读全文
posted @ 2014-10-16 11:34 helloweworld
阅读(2757)
评论(0)
推荐(0)
2014年10月14日
svn--回退到某个版本
摘要: 1、保证我们拿到的是最新代码:svn update假设最新版本号是28。2、然后找出要回滚的确切版本号:svn log假设根据svn log日志查出要回滚的版本号是25,此处的something可以是文件、目录或整个项目如果想要更详细的了解情况,可以使用svn diff -r 28:25 ""3、回...
阅读全文
posted @ 2014-10-14 15:58 helloweworld
阅读(3889)
评论(0)
推荐(0)
2014年9月11日
调试--core
摘要: 一. 何时产生core.当程序接收到以下UNIX信号会产生core文件:名字说明ANSI C POSIX.1SVR4 4.3+BSD缺省动作SIGABRT异常终止(abort) . . . .终止w/coreSIGBUS硬件故障 . . .终止w/coreSIGEMT硬件故障 . .终止w/core...
阅读全文
posted @ 2014-09-11 19:13 helloweworld
阅读(230)
评论(0)
推荐(0)
2014年7月5日
shell--合并两行为一行
摘要: cat tmp.txt | xargs -n2上面命令讲tmp.txt中的两行合并成一行
阅读全文
posted @ 2014-07-05 19:41 helloweworld
阅读(3155)
评论(0)
推荐(0)
2014年7月1日
python--获取list下标和值
摘要: for index, value in enumerate(list): print index, value
阅读全文
posted @ 2014-07-01 22:43 helloweworld
阅读(954)
评论(0)
推荐(0)
2014年6月27日
c--strncpy使用
摘要: 用法: char dst[256] = {0}; char *src = "src"; strncpy(dst, src, sizeof(dst) - 1);
阅读全文
posted @ 2014-06-27 16:22 helloweworld
阅读(181)
评论(0)
推荐(0)
2014年6月24日
python--字符串为空
摘要: str1 = ""str2 = Nonestr3 = "hello"if str2: print "not null"else: print "null"这样,不仅可以判定字符串是否为空,还能判定是否为None
阅读全文
posted @ 2014-06-24 21:38 helloweworld
阅读(1928)
评论(0)
推荐(0)
2014年6月16日
python--中文比较
摘要: 比较中文是否相等:if str1.decode("GB2312").encode("utf-8") ==str2.decode("GB2312").encode("utf-8"): print "=="注: decode中时str1 str2使用的中文编码方式, encode统一用utf-8形式比...
阅读全文
posted @ 2014-06-16 11:54 helloweworld
阅读(2087)
评论(0)
推荐(0)
2014年6月13日
爬虫--用cookie访问任意网页
摘要: #!/usr/bin/env python# -*- coding: utf-8 -*-############################################## File : requestAnyURLWithCookie.py# Author : luc...
阅读全文
posted @ 2014-06-13 16:43 helloweworld
阅读(713)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
···
48
下一页