1.表:人事档案HrgeneralCREATETABLE[dbo].[Hrgeneral]([hrcode][varchar](50)NOTNULL,--员工工号[hrname][varchar](16)NULL,--员工姓名[oldName][varchar](50)NULL,--曾用名[CardNo][varchar](50)NULL,--考虑对应的IC卡号码[ID][varchar](22)NULL,--身份证号码[birthday][datetim
系统 2019-08-12 01:32:06 2400
字体染色我是黑体字我是微软雅黑我是华文彩云color=#0099ffsize=72face="黑体"color=#00ffffcolor=gray
系统 2019-09-27 17:56:41 2399
importhashlibimportosimporttimeimportconfigparserimportuuiddeftest_file_md5(file_path):test=hashlib.md5()ifos.path.isfile(file_path):withopen(file_path,"rb")asf:whileTrue:data=f.read(8096)ifnotdata:breakelse:test.update(data)ret=t
系统 2019-09-27 17:55:47 2399
一:使用Python中的urllib类中的urlretrieve()函数,直接从网上下载资源到本地,具体代码:importos,statimporturllib.requestimg_url="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1516371301&di=d99af0828bb301fea27c2149a7070"\"d44&imgtype=jpg&er=
系统 2019-09-27 17:55:44 2399
一、安装python31.下载python安装包(python3.6)wgethttps://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz2.将安装包移动到/usr/local文件夹下mvPython-3.6.5.tgz/usr/local/3.在local目录下创建python3目录mkdir/usr/local/python34.进入到Python-3.6.5.tgz所在的目录下cd/usr/loca
系统 2019-09-27 17:55:20 2399
场景:经常会遇到下述问题:很多iobusy的应用采取多线程的方式来解决,但这时候会发现python命令行不响应ctrl-c了,而对应的java代码则没有问题:复制代码代码如下:publicclassTest{publicstaticvoidmain(String[]args)throwsException{newThread(newRunnable(){publicvoidrun(){longstart=System.currentTimeMillis()
系统 2019-09-27 17:55:04 2399
python引用变量的顺序:当前作用域局部变量->外层作用域变量->当前模块中的全局变量->python内置变量一、globalglobal关键字用来在函数或其他局部作用域中使用全局变量。但是如果不修改全局变量也可以不使用global关键字。复制代码代码如下:gcount=0defglobal_test():print(gcount)defglobal_counter():globalgcountgcount+=1returngcountdefglobal
系统 2019-09-27 17:54:09 2399
代码:(使用os.listdir)复制代码代码如下:importosdefListFilesToTxt(dir,file,wildcard,recursion):exts=wildcard.split("")files=os.listdir(dir)fornameinfiles:fullname=os.path.join(dir,name)if(os.path.isdir(fullname)&recursion):ListFilesToTxt(fullna
系统 2019-09-27 17:53:59 2399
转载自我自己的github博客——>半天钟的博客这篇博文讲述的python协程是不正式的、宽泛的协程,即通过客户调用.send(…)方法发送数据或使用yieldfrom结构驱动的生成器函数,而不是asyncio库采用的定义更为严格的协程。前言在事件驱动型编程中,协程常用于离散事件的仿真(在单个线程中使用一个主循环驱动协程执行并发活动)。协程通过显式自主地把控制权让步给中央调度程序从而实现了协作式多任务。所以,协程是python事件驱动型框架和协作式多任务的
系统 2019-09-27 17:53:36 2399
安装pyserialpipinstallpyserial查看可用的端口#coding:utf-8importserial.tools.list_portsplist=list(serial.tools.list_ports.comports())iflen(plist)<=0:print("没有发现端口!")else:plist_0=list(plist[0])serialName=plist_0[0]serialFd=serial.Serial(seri
系统 2019-09-27 17:50:55 2399