摘要:
1. 自定义类型布尔值自定义的类如果定义了__nonzero__()或者__len__()且值为0,那么它们的布尔值就是Flase。2. 对象比较a is b# equivalent toid(a) == id(b)3. 标准类型内建函数type()cmp()str()repr()i... 阅读全文
posted @ 2017-10-22 15:50
枫竹梦
阅读(158)
评论(0)
推荐(0)
摘要:
1. 开始使用Python1.1 print使用str()函数显示对象,而交互式解释器调用repr()函数来显示对象。 1.2 在解释器中_表示最后一个表达式的值。 1.3 >>用来重定向输出。import sysprint >> sys.stderr, 'Fatal error: ... 阅读全文
posted @ 2017-10-22 15:50
枫竹梦
阅读(137)
评论(0)
推荐(0)
摘要:
类似/usr/bin/ld: cannot find -xxxx的错误有很多, 首先我们可以最简单的判断一下:这类情况一般是由于缺乏某某库文件, 又或者可能是由于已存在的库问题版本不对造成的一般都是解决的办法就是安装缺乏的devel包就可以解决, 当然还有其他的未知因素, 我们看一个... 阅读全文
posted @ 2017-10-22 15:50
枫竹梦
阅读(1776)
评论(0)
推荐(0)
摘要:
directoryopendir#include #include DIR *opendir(const char *name);/* * On success, a pointer to the directory stream is returned. * On error, ... 阅读全文
posted @ 2017-10-22 15:50
枫竹梦
阅读(172)
评论(0)
推荐(0)
摘要:
/proc/sys/fs/file-max = 65536/proc/sys/net/ipv4/tcp_fin_timeout = 15/proc/sys/net/ipv4/tcp_tw_recycle = 1# ulimit -n 65536(未完待续) 阅读全文
posted @ 2017-10-22 15:50
枫竹梦
阅读(230)
评论(0)
推荐(0)
摘要:
要使用C++中的标准模板库中的容器,其元素要满足以下三个条件:元素必须可以通过copy构造函数进行复制,且二者进行相等测试返回true。元素必须可以通过赋值操作符完成赋值操作。元素必须可以通过析构函数完成销毁操作。当然下面几种操作在需要时也必须满足:序列容器构建非空容器时,默认构造函... 阅读全文
posted @ 2017-10-22 15:50
枫竹梦
阅读(213)
评论(0)
推荐(0)
摘要:
启用默认的颜色设置可以使用如下命令git config --global color.ui true如果不喜欢花花绿绿的颜色,可以将其关闭:git config --global color.ui false可以针对具体的内容进行设置如:color.branchcolor.diffc... 阅读全文
posted @ 2017-10-22 15:50
枫竹梦
阅读(4578)
评论(0)
推荐(1)
摘要:
could not read symbols: Archive has no index; run ranlib to add one collect2: ld returned 1 exit status运行ranlib后仍然无效,这时该怎么办呢?第1步首先,运行ar进行测... 阅读全文
posted @ 2017-10-22 15:50
枫竹梦
阅读(3142)
评论(0)
推荐(0)
摘要:
Linux创建线程使用int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)Linux... 阅读全文
posted @ 2017-10-22 15:50
枫竹梦
阅读(1506)
评论(0)
推荐(0)
摘要:
问题今天在安装测试websockets服务端时,运行时提示 ……error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or directory……Oh,... 阅读全文
posted @ 2017-10-22 15:50
枫竹梦
阅读(364)
评论(0)
推荐(0)

浙公网安备 33010602011771号