会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
nanqiang
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
23
24
25
26
27
28
29
下一页
2017年10月11日
UTF8编码
摘要: UTF-8是Unicode的实现方式之一。 UTF-8最大的一个特点,就是它是一种变长的编码方式。它可以使用1~4个字节表示一个符号,根据不同的符号而变化字节长度。 UTF-8的编码规则很简单,只有二条: 1)对于单字节的符号,字节的第一位设为0,后面7位为这个符号的unicode码。因此对于英语字
阅读全文
posted @ 2017-10-11 13:55 cicero
阅读(752)
评论(0)
推荐(0)
2017年9月14日
Linux共享库LD_LIBRARY_PATH与ld.so.conf
摘要: 1. 往/lib和/usr/lib里面加东西,是不用修改/etc/ld.so.conf的,但是完了之后要调一下ldconfig,不然这个library会找不到 2. 想往上面两个目录以外加东西的时候,一定要修改/etc/ld.so.conf,然后再调用ldconfig,不然也会找不到 比如安装了一个
阅读全文
posted @ 2017-09-14 16:26 cicero
阅读(595)
评论(0)
推荐(0)
2017年9月7日
git 安装使用
摘要: 系统ubuntu14.04 1.安装:sudo apt-get install git 2.设置name and Email: git config --global user.name "Your Name" git config --global user.email "email@exampl
阅读全文
posted @ 2017-09-07 19:38 cicero
阅读(248)
评论(0)
推荐(0)
libev-4.20编译安装及简单使用
摘要: 1.源码下载地址: 链接:https://pan.baidu.com/s/1fxotILo3oTMC65z4qFAh9Q 密码:oc31 2.库的编译与安装 解压文件,进入文件目录 编译的时候需要首先切换为管理员(root)账户,然后执行以下命令: ./configure make make ins
阅读全文
posted @ 2017-09-07 15:35 cicero
阅读(2929)
评论(0)
推荐(0)
2017年8月28日
c++ 单例模式
摘要: 饿汉实现: 懒汉实现: 参考: https://www.cnblogs.com/TenosDoIt/p/3639395.html
阅读全文
posted @ 2017-08-28 17:21 cicero
阅读(358)
评论(0)
推荐(0)
2017年8月14日
test for python socket
摘要: server: client:
阅读全文
posted @ 2017-08-14 09:55 cicero
阅读(277)
评论(0)
推荐(0)
test for python thread
摘要: 1 #!/usr/bin/python 2 # -*- coding: UTF-8 -*- 3 4 import thread 5 import time 6 7 8 # 为线程定义一个函数 9 def print_time(threadName, delay): 10 count = 0 11 while count < 5: 12 ti...
阅读全文
posted @ 2017-08-14 09:53 cicero
阅读(158)
评论(0)
推荐(0)
test for python urllib
摘要: 1 #!/usr/bin/python 2 3 import urllib2 4 import time 5 import logging 6 import threading 7 8 succCount = 0 9 failCount = 0 10 IP = '127.0.0.1' 11 port = '9997' 12 postUrl = "http://%s:%s/"...
阅读全文
posted @ 2017-08-14 09:50 cicero
阅读(178)
评论(0)
推荐(0)
2017年8月11日
python logging 模块
摘要: 1.默认情况下,logging将日志打印到屏幕,日志级别为WARNING;日志级别大小关系为:CRITICAL > ERROR > WARNING > INFO > DEBUG > NOTSET,当然也可以自己定义日志级别。 2.通过logging.basicConfig函数对日志的输出格式及方式做
阅读全文
posted @ 2017-08-11 15:56 cicero
阅读(138)
评论(0)
推荐(0)
python urllib2与urllib
摘要: 1.urllib2可以接受一个Request对象,并以此可以来设置一个URL的headers,但是urllib只接收一个URL。 2.urllib模块可以提供进行urlencode的方法,该方法用于GET查询字符串的生成,urllib2的不具有这样的功能。 1) urllib2.urlopen(ur
阅读全文
posted @ 2017-08-11 10:08 cicero
阅读(279)
评论(0)
推荐(0)
上一页
1
···
23
24
25
26
27
28
29
下一页
公告