因为实验室项目好久没刷题了。从今天开始重新开始刷题。 Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers...
分类:
其他好文 时间:
2014-07-16 23:04:15
阅读次数:
166
方法1:import sched, timeimport oss = sched.scheduler(time.time,time.sleep)#scheduler的两个参数用法复杂,可以不做任何更改defplaymusic(x):os.system(x)def jobtodo():tmlist =...
分类:
编程语言 时间:
2014-07-16 23:01:43
阅读次数:
235
1. 写csv文件# coding: utf-8import csvcsvfile = file('csv_test.csv', 'wb')writer = csv.writer(csvfile)writer.writerow(['姓名', '年龄', '电话']) #写入单行data = [ .....
分类:
编程语言 时间:
2014-07-16 22:57:55
阅读次数:
201
1.工厂模式#encoding=utf-8__author__ = 'kevinlu1010@qq.com'class ADD(): def getResult(self,*args): return args[0]+args[1]class SUB(): def getR...
分类:
编程语言 时间:
2014-07-16 22:56:35
阅读次数:
213
原文:http://www.pythonclub.org/python-basic/threading一、python多线程thread和threading实现python是支持多线程的,并且是native的线程。主要是通过thread和threading这两个模块来实现的。python的threa...
分类:
编程语言 时间:
2014-07-16 22:56:30
阅读次数:
245
在开发过程中,经常会有这种情况,就是一个函数需要返回多个值,这是一个问题!!网上这个问题的解决方法:1、使用map返回值;这个方法问题是,你并不知道如何返回值的key是什么,只能通过doc或者通过源代码来查看。2、传入一个引用进去,修改引用的属性值。问题:不实用。3、通过泛型构造一个类似python...
分类:
编程语言 时间:
2014-07-16 22:53:00
阅读次数:
240
Python支持5种数据类型,包括数字(numbers)、字符串(string)、列表(list)、元组(tuple)和字典(dictionary)。作为一门动态类型语言,不用去声明一个标示符的类型,使用的时候是什么类型会自动判定。对于定义好的变量,若不使用该变量,可以用del删除来释放占有的资源,...
分类:
编程语言 时间:
2014-07-16 22:52:11
阅读次数:
193
ItemsItem objects are simple containers used to collect the scraped data.They provide a dictionary-like api with a convenient syntax for declaring the...
分类:
其他好文 时间:
2014-07-16 22:48:37
阅读次数:
186
You get the idea right! We are going to enumerate all the ROP-Gadgets and then chain them together to craft our API call which will in turn disable DE...
分类:
其他好文 时间:
2014-07-16 21:56:06
阅读次数:
221
新手学python,写了一个抓取网页后自动下载文档的脚本,和大家分享。 首先我们打开三亿文库下载栏目的网址,比如专业资料(IT/计算机/互联网)http://3y.uu456.com/bl-197?od=1&pn=0,可以观察到,链接中pn=后面的数字就是对应的页码,所以一会我们会用iurl =.....
分类:
编程语言 时间:
2014-07-12 13:28:16
阅读次数:
385