自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 资源 (1)
  • 收藏
  • 关注

原创 js

function checkAttr() {var res = true;$("span.font-red").each(function(index, element) {if ($(element).text() === '*') {var reqValue = $(element).closest("label").siblings("div").children("inpu

2015-05-05 15:19:47 409

原创 ex_unitTest.py

'''Created on 2014-12-11@author: xWX238932'''import unittestclass Test(unittest.TestCase):    def setUp(self):           print("--- setUp ---")        pass   

2014-12-26 09:02:32 290

原创 s7

#匹配&搜索(正则|re模块)import res = ('xxx', 'abcxxabc', 'xyx', 'abc', 'x.x', 'axxxa', 'axya')a = filter ((lambda s: re.match(r"xxx", s)), s)print(*a)#只会匹配'xxx',不会匹配'axxxa',match()只会从他的开始进行匹配a = fi

2014-12-25 14:08:57 561

原创 s6

#os.walk(top,topdown=True, onerror=None, followlinks=False)参数top表示需要遍历的目录树的路径参数topdown的默认值是"True",表示首先返回目录树下的文件,然后在遍历目录树的子目录;为False时,表示先遍历目录树的子目录,返回子目录下的文件,再返回根目录下的文件参数onerror的默认值是"None",表示忽略文件遍

2014-12-25 14:08:06 507

原创 s5

#文件:import os #os模块open(path, 'w')#打开并写入数据 'a'追加数据 'r'读取(默认参数)f.close()f.readline() 读取一行包含换行符f.read() 读取剩余全部内容f.readlines() 字符串列表os.path.isfile(path) 路径是文件os.path.isdir(path) 路径是目录

2014-12-25 14:05:19 238

原创 com.farmer.gui.ExampleGrid.py

'''Created on 2014-12-11@author: XSD'''from tkinter.constants import E, Wfrom tkinter.tix import Tkfrom tkinter.ttk import Label, Button, Entryfrom tkinter import Menuimport sysi

2014-12-25 13:57:20 284

原创 User.py

'''Created on 2014-10-25@author: XSD'''class User:    '''    example class     '''    def __init__(self, params={}):        '''                初始化对象        '''        i

2014-12-25 13:52:03 295

原创 FileExp.py

'''Created on 2014-10-30@author: XSD'''import osclass FileExp:    '''    example class     '''    def __init__(self):        '''                初始化对象        '''#    

2014-12-25 13:50:48 320

原创 _strategy.py

'''Created on 2014-10-21@author: XSD# strategy #NOTE:Encoding=UTF-8'''#数值类型不同print(1 == 1.00)print('a' == 'a ')#比较两个字符串分片所涵盖的内容print('a' == 'a')print('# 序列包含的值和顺序相等

2014-12-25 13:47:19 290

原创 _seq_example.py

'''Created on 2014-10-20@author: XSD# sequence #NOTE:Encoding=UTF-8'''print("练习 training")print("hello", "ptyon" + "!")print(type(str(1)) == type(str(1.0)))#元

2014-12-25 13:46:35 354

原创 _function.py

com.farmer.sample_function.py'''Created on 2014-10-22@author: XSD# function #NOTE:Encoding=UTF-8'''#!/usr/bin/env python 3.4.2'''def has_record():    """This

2014-12-25 13:42:40 247

原创 s4

# 其他特性:filter函数:res = filter(lambda x: x%2 == 0, list)print(*res)#输出filtermap函数:res = map(lambda x: "read %s" %x, list)print(*res)#遍历list每个元素range迭代器:range生成一个没有任何方法的对象,它只有内置方法ra

2014-12-25 12:28:20 360 1

原创 s3

类:关键字class User: (类名开头大写)以下划线开头是内部方_init_class stu(user): #扩展stu类,继承user类,可以重写父类中方法note:模块名与实例名不能一致完成模块的工作:1.定义模块特定的异常类2.导出哪些内容。通过__all__可以显示指明可以导出哪些类或函数,__all__ = ["DefException", "ma

2014-12-25 12:24:03 357 1

原创 s2

string模块string.ascii_letters 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'string.lettersstring.lowercasestring.uppercasestring.digitsString.capwords(S) #首字母大写 列表(list):成员关

2014-12-25 11:07:12 319 3

转载 sample

推荐

2014-12-25 10:51:13 308 1

开发自己的搜索引擎《lucene2[1].0 heritrix》

开发自己的搜索引擎《lucene2[1].0 heritrix》

2013-02-05

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除