编程语言
1. abs(x)     abs()函数返回数字(可为普通型、长整型或浮点型)的绝对值。如果给出复数,返回值就是该复数的模。例如:   >>>print abs(-2,4) 2.4 >>>print abs(4+2j) 4.472135955   2. apply(function,args[,keywords])     apply()函数将args参数应用到function...
分类:编程语言 时间:2014-02-27 21:46:17 收藏:0 阅读:617
今天写一个unit test, 需要在子线程跑一个tcp客户端,来验证服务端功能: ConsoleUploadFile::ConsoleUploadFile() {    ... ...         std::thread( &ConsoleUploadFile::uploadFile, this); } 很奇怪的是,代码运行到std::thread(...)...
分类:编程语言 时间:2014-02-27 21:30:11 收藏:0 阅读:524
以前学过C++,但是感觉很多东西还是不清不楚,很多问题解决起来啃吧啃吧的。。。。即使c++的东西看过,但是这本书
分类:编程语言 时间:2014-02-27 20:56:23 收藏:0 阅读:526
http://jingyan.baidu.com/article/a3761b2b8ed03c1577f9aa60.htmlhttp://msdn.microsoft.com/zh-cn/library/ff194352(v=office.15).aspxhttp://stackoverflow.c...
分类:编程语言 时间:2014-02-27 20:48:30 收藏:0 阅读:470
在项目下新建两个筛选器,添加TUIO中的文件如下,头文件包TUIO官网可下载,这也能下载#include "TuioDump.h"//#include //Tuio全局变量int port = 3333;TuioDump dump;TuioClient client(port);float Kine...
分类:编程语言 时间:2014-02-27 19:16:39 收藏:0 阅读:819
【Python 之执行 py 文件】1、在 cmd/shell 中输入命令 python a.py2、在解释器中,通过函数 execfile("a.py")3、在解释器中,直接输入程序语句立即执行【Python 之退出解释器】1、>>> import sys >>> sys.exit()2、通过引发...
分类:编程语言 时间:2014-02-27 19:08:48 收藏:0 阅读:461
easymc是一个C语言开发的简易的消息通道库,目前提供请求/回应、订阅/发布两种通信模式,同机器的通信采取IPC方式,跨机的通信采取TCP方式,源码包含开源项目jemalloc库。项目主页:http://www.easymc.org代码地址:https://github.com/easymc/easymclocal端使用例子:structpa..
分类:编程语言 时间:2014-02-27 19:44:22 收藏:0 阅读:505
Python的os.listdir()可以获取当前目录下的所有文件和目录,但不支持递归。有时候希望获取以递归方式指定目录下所有文件列表,为此可以调用下面的get_recursive_file_list()函数。...
分类:编程语言 时间:2014-02-27 19:38:04 收藏:0 阅读:534
#!/usr/bin/python #coding:utf-8 import time import threading #product product = None #condition con = threading.Condition() def produce(): global product if con.acquire(): while T...
分类:编程语言 时间:2014-02-27 17:46:40 收藏:0 阅读:531
输入输出流采用引用调用可以事先不用传文件名 #include using namespace std; void print_row(ofstream& out, char c, int n); int main() { ofstream outfile; outfile.open("out2.txt"); print_row(outfile, 'c', 10); outfile....
分类:编程语言 时间:2014-02-27 16:50:23 收藏:0 阅读:575
151144511455114651284
上一页512833下一页
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!