DataTable dt = new DataTable(); int n = 3; //用来进行排序的字符串 string myDictionary = "HERABMWSUG"; //...
分类:
其他好文 时间:
2014-07-16 19:25:16
阅读次数:
210
1.冒泡冒泡就是 1 2 3 4 5 6 7 8 9 2 1 3 4 5 6 7 8 9 2 3 1 4 5 6 7 8 9 2 3 4 1 5 6 7 8 9 2 3 4 5 1 6 7 8 9 。。。。。。。。。 ...
分类:
其他好文 时间:
2014-07-15 23:27:38
阅读次数:
247
When you assign an object to a variable, Python copies the reference to the object. In this case a and b refer to the same list.If you want ...
分类:
其他好文 时间:
2014-07-15 23:18:08
阅读次数:
278
用python语言获得图片的Base64编码。#!/usr/bin/env python# -*- coding: utf-8 -*-# www.jbxue.comimport os, base64icon = open('ya.png','rb')iconData = icon.read()ico...
分类:
编程语言 时间:
2014-07-15 08:49:08
阅读次数:
321
lambda表达式返回一个函数对象例子:func = lambda x,y:x+yfunc相当于下面这个函数def func(x,y): return x+y 注意def是语句而lambda是表达式下面这种情况下就只能用lambda而不能用def[(lambda x:x*x)(x) for x...
分类:
编程语言 时间:
2014-07-15 08:42:41
阅读次数:
341
filter(function, sequence):对sequence中的item依次执行function(item),将执行结果为True的item组成一个List/String/Tuple(取决于sequence的类型)返回:>>> def f(x): return x % 2 != 0 an...
分类:
编程语言 时间:
2014-07-15 08:41:24
阅读次数:
292
1、将"(332、21)luck李。"中(332、21)抽取出来同时能够 将”(23)luck李。“中的(23)抽取出来pp = re.compile('(\(\d*(、\d*)?\))')mm = pp.match(line)print mm.groups()[0]2、
分类:
编程语言 时间:
2014-07-15 08:36:10
阅读次数:
293
sort 命令范例原文地址基础常用命令sort命令可以对一个文件中的文本行进行排序. 以下几个例子来演示如何使用sort命令, 样例文本是雇员数据,格式如下: employee_name:employee_id:department_name.[root@hexu.org ~]# cat names...
分类:
其他好文 时间:
2014-07-15 08:34:20
阅读次数:
290
分享下Python库urllib与urllib2用法区别,初学python的同学常有此困惑,今天一揭谜底。学习Python,一直不明白urllib和urllib2的区别,以为2是1的升级版。今天看到老外写的一篇《Python: difference between urllib and urllib...
分类:
编程语言 时间:
2014-07-15 08:31:38
阅读次数:
232
好吧,没想到居然这么快,才两天我就把入门看完了,当然只是入门,以后如果用到,会把那些各个类型的细化都总结一下例如数学函数,或者总结一下一些框架的应用如Scarpy(爬虫框架,听着就很兴奋呢,很多人都是了解有,但是没用过......),笔者写完这段暂时先开心的看电影去,回学校再说。Python的屏幕I...
分类:
编程语言 时间:
2014-07-15 08:26:59
阅读次数:
204