#!/usr/bin/pythonimporttracebacktry:1/0#exceptException,e:#printtraceback.format_exc()exceptExceptionase:printe#!/usr/bin/pythonimporttracebacktry:1/0#exceptException,e:#printtraceback.format_exc()exceptException,e:printePython的异常处理能力是很强大的,可向..
分类:
编程语言 时间:
2017-10-05 22:39:23
阅读次数:
292
一、主要使用类 1. ExecutorService java线程池类 申明方式:ExecutorService exc = Executors.newFixedThreadPool(requestParameterArray.length()); 参数:requestParameterArray. ...
分类:
编程语言 时间:
2017-10-02 22:18:00
阅读次数:
509
import jieba a=open('C:/1.txt','r',encoding='utf-8').read() for i in '\n,.\()。,123"?': a=a.replace(i,' ') b=jieba.cut(a) d=list(b) exc={' ','和','你','使... ...
分类:
其他好文 时间:
2017-09-29 21:19:41
阅读次数:
117
1.读入待分析的字符串 2.分解提取单词 3.计数字典 4.排除语法型词汇 5.排序 6.输出TOP(20) fo=open('xiaoliang.txt','r') song=fo.read() exc={'the','a','to','of','and','in','that','on',''} ...
分类:
其他好文 时间:
2017-09-26 22:29:22
阅读次数:
151
OpenFileDialog对话框的Filter属性说明: 首先说明一个示例,分析一下Filter属性的构成:“ Excel文件|*.xls ”,前面的“Excel文件”成为标签,是一个可读的字符串,可以自定定义,“|*.xls”是筛选器,表示筛选文件夹中后缀名为.xls的文件,“*”表示匹配Exc ...
分类:
其他好文 时间:
2017-09-24 00:36:11
阅读次数:
128
tar 打包排除指定目录 tar -zcvf afish.tar.gz * --exclude=file1 --exclude=dir1 排除目录注意: 1、--exclude=file1 而不是 --exclude file1 2、要排除一个目录是 --exclude=dir1,而不是 --exc ...
分类:
系统相关 时间:
2017-09-23 20:21:01
阅读次数:
187
我们知道,maven的依赖关系是有传递性的。如:A-->B,B-->C。但有时候,项目A可能不是必需依赖C,因此需要在项目A中排除对A的依赖。在maven的依赖管理中,有两种方式可以对依赖关系进行,分别是可选依赖(Optional Dependencies)以及依赖排除(Dependency Exc ...
分类:
其他好文 时间:
2017-09-13 00:19:00
阅读次数:
1455
一、安装xlrd模块 到python官网下载http://pypi.python.org/pypi/xlrd模块安装,前提是已经安装了python 环境。 二、使用介绍 1、导入模块 import xlrd 2、打开Excel文件读取数据 data = xlrd.open_workbook('exc ...
分类:
编程语言 时间:
2017-09-10 19:49:31
阅读次数:
240
Properties props=new Properties(); try { props.load(new InputStreamReader(getClass().getResourceAsStream("/config.properties"), "UTF-8")); } catch(Exc ...
分类:
其他好文 时间:
2017-09-07 23:05:44
阅读次数:
187
2017-09-06 23:28:26 注意事项: charset='utf8' : 在有中文字符时必须写上 使用excutemany(sql,list),可以一次处理大量的数据,且效率颇高。文件中的NULL目前采用的方式是手动替换成None list中的数据可以是list也可以是tuple exc ...
分类:
数据库 时间:
2017-09-07 00:59:38
阅读次数:
328