Description
0 s, 1 s and ? Marks
Given a string consisting of 0, 1 and ? only, change all the
? to 0/1, so that the size of the largest group is minimized. A group is a subs...
分类:
其他好文 时间:
2014-08-11 11:57:42
阅读次数:
197
曾经做过的一个Python小程序,读取ACCESS数据库,然后list数据# -*- coding: cp936 -*-import wximport wx.libimport sys,glob,randomimport win32com.clientreload(sys)sys.setdefaul...
分类:
数据库 时间:
2014-08-11 11:49:22
阅读次数:
501
一、简介 RPC是Remote Procedure Call的缩写,翻译成中文为:远程方法调用。它是一种在本地机器上调用远端机器上的一个过程(方法)的技术,这个过程也被大家称为“分布式计算”,是为了提高各个分立机器的“互操作性”而发明出来的技术。 XML-RPC的全称是XML Remote Pr.....
分类:
编程语言 时间:
2014-08-11 11:41:12
阅读次数:
200
public static String getonerow(String allLine,String myfind) { Pattern pattern = Pattern.compile(".*?"); Matcher matcher = pattern.matcher(all...
分类:
编程语言 时间:
2014-08-11 11:38:32
阅读次数:
287
import osimport sysimport structdef enc(path, key): path_ret = "" for i in range(0, len(path)/4): path_ret += struct.pack(">> ===========...
分类:
编程语言 时间:
2014-08-11 11:27:22
阅读次数:
2362
djangmodels1.创建model fromdjango.dbimportmodels classMyObject(models.Model): attribute1=models.CharField(max_length=50)2.创建记录 2.1p=MyObject(attribute=xxxx) p.save() 2.2p=MyObject.objects.create(attribue=xxx)3.更新记录 p=MyObject.objects.all(attribute..
分类:
其他好文 时间:
2014-08-11 10:17:52
阅读次数:
266
在下面这行语句里:MessageBox(None, 'Hello World!', 'Hello World', 0)括号里的就是函数的参数列表。C语言编写的函数时,定义函数的参数是使用C语言的方式来定义,那么在Python里编程是使用Python定义的类型,这两者之间是有差别的,这种差别主要体现在类型定义内存的方式不一样,比如大小不一样,就算大小一样,在Python里还有每个对象的引用计数。比如...
分类:
其他好文 时间:
2014-08-11 10:15:02
阅读次数:
212
HDU 4932 BestcoderProblem DescriptionThere are N point on X-axis . Miaomiao would like to cover them ALL by using segments with same length.There ar.....
分类:
其他好文 时间:
2014-08-11 10:05:42
阅读次数:
203
python的元组、列表、字典数据类型是很python(there python is aadjective)的数据结构。这些结构都是经过足够优化后的,所以如果使用好的话,在某些area会有很大的益处。元组 个人认为就像java的数组,python中的元组有以下特性:任意对象的有序集合,这条没啥说的...
分类:
编程语言 时间:
2014-08-11 10:02:21
阅读次数:
219
Linux/Unix 平台下共享库(Shared Library)文件后缀 .so;在 Windows 平台称为动态链接库(Dynamic Link Library),文件名后缀为 .dll。利用 ctypes 模块调用 C 共享库 ctypes 是 Python 标准库提供的一个模块,Pyt...
分类:
编程语言 时间:
2014-08-11 10:00:32
阅读次数:
375