上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 53 下一页
摘要: import httplib,urllib import re import random def Login(userid,password): params=urllib.urlencode({'id':userid,'pw':password}); headers={'Referer':'http://bbs.nju.edu.cn/cache_bb... 阅读全文
posted @ 2016-11-28 21:18 柳下_MBX 阅读(246) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int main( void ) { const double value = 12.3456789; cout << value << endl; // 默认以6精度,所以输出为 12.3457 cout << setprecision(4) << value << endl; // ... 阅读全文
posted @ 2016-11-27 21:32 柳下_MBX 阅读(401) 评论(0) 推荐(0) 编辑
摘要: 1右值引用引入的背景 临时对象的产生和拷贝所带来的效率折损,一直是C++所为人诟病的问题。但是C++标准允许编译器对于临时对象的产生具有完全的自由度,从而发展出了CopyElision、RVO(包括NRVO)等编译器优化技术,它们可以防止某些情况下临时对象产生和拷贝。下面简单地介绍一下CopyEli 阅读全文
posted @ 2016-11-27 18:37 柳下_MBX 阅读(1953) 评论(0) 推荐(0) 编辑
摘要: 粘个代码占位置,以后有时间把指针函数,函数指针都补上 阅读全文
posted @ 2016-11-27 17:03 柳下_MBX 阅读(1382) 评论(0) 推荐(0) 编辑
摘要: arlenmbx@arlenmbx-ThinkPad-X130e:~$ su root 密码: root@arlenmbx-ThinkPad-X130e:/home/arlenmbx# python Python 2.7.10 (default, Oct 14 2015, 16:09:02) [GCC 5.2.1 20151010] on linux2 Type "help", "copyr... 阅读全文
posted @ 2016-11-24 12:20 柳下_MBX 阅读(394) 评论(0) 推荐(0) 编辑
摘要: 可以通过auto关键字将一个变量直接变为函数指针 auto具有自动类型推断功能 上述代码中fun会被直接认为是一个函数指针 我们还可以将函数指针定义为函数指针数组 和定义函数指针唯一不同的地方就是多加了一个[] 数组名是指向第一个元素的指针, 阅读全文
posted @ 2016-11-22 23:49 柳下_MBX 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 1 import easygui as g 2 import sys 3 4 while 1: 5 g.msgbox("我一定要学会编程!","加油!") 6 #choices = ['愿意', '不愿意', '有钱的时候愿意'] 7 #g.choicebox('你愿意购买资源打包支持小甲鱼吗?', choices = choice... 阅读全文
posted @ 2016-11-10 23:32 柳下_MBX 阅读(555) 评论(0) 推荐(0) 编辑
摘要: 1 >>> ls1=["nihia"] 2 >>> ls1 3 ['nihia'] 4 >>> ls1.pop() 5 'nihia' 6 >>> ls1.append("sssss") 7 >>> ls1 8 ['sssss'] 9 >>> assert len(ls1)>0 10 >>> ls1.pop() 11 'sssss' 12 >>> 阅读全文
posted @ 2016-11-10 01:46 柳下_MBX 阅读(564) 评论(0) 推荐(0) 编辑
摘要: 1 >>> import pickle 2 >>> m_list=['1',2,'asa'] 3 >>> m_list 4 ['1', 2, 'asa'] 5 >>> m_file=open('my_file.pkl','wb') 6 >>> pickle.dump(m_list,m_file) 7 >>> pickle.close() 8 9 Traceback (most... 阅读全文
posted @ 2016-11-10 00:53 柳下_MBX 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 1 >>> help(open) 2 Help on built-in function open in module __builtin__: 3 4 open(...) 5 open(name[, mode[, buffering]]) -> file object 6 7 Open a file using the file() type, ... 阅读全文
posted @ 2016-11-09 23:32 柳下_MBX 阅读(401) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 53 下一页