自己写了用来压缩DC照片的,批量处理整目录文件,非常方便。需要安装PIL#!/usr/bin/envpythonimportImageimportosimportos.pathimportsyspath=sys.argv[1]small_path=(path[:-1]ifpath[-1]==/elsepath)+_smallifnotos.path.exists(small_path):os.mkdir(small_path)forroot,dirs,fi
系统 2019-08-29 22:21:26 2201
这次使用Pair实现一个简单的SimplePairListPopupWindow,还是为了快速迭代,谅解importjava.util.ArrayList;importandroid.content.Context;importandroid.util.Pair;importandroid.view.View;importandroid.widget.AdapterView;importandroid.widget.LinearLayout.La
系统 2019-08-29 22:17:43 2201
CU上的问题5:这条语句有什么作用?sed-if/script/scr.sedcctest.txt这题看似简单但没仔细看过man的人估计都会答错这题出的让我佩服的五体投地..题解:-i是参数f是-i的子参数意为rename的追加拓展名不写则rename源文件名即为覆盖/script/正则匹配即含有script的行s是替换函数(sed内部命令)c是替换分隔符即相当于“/”sed-if/script/scr.sedcctest.txt解析为sed-iABC'/
系统 2019-08-29 22:14:18 2201
publicActionForwarddownload(ActionMappingmapping,ActionFormform,HttpServletRequestrequest,HttpServletResponseresponse)throwsException...{this.initActionAttributes(request);//System.out.println(uploadForm.getFile().getFileName()+"-
系统 2019-08-29 22:13:58 2201
Trie树,又称字典树,单词查找树。它来源于retrieval(检索)中取中间四个字符构成(读音同try)。用于存储大量的字符串以便支持快速模式匹配。主要应用在信息检索领域。Trie有三种结构:标准trie(standardtrie)、压缩trie、后缀trie(suffixtrie)。最后一种将在《字符串处理4:后缀树》中详细讲,这里只将前两种。1.标准Trie(standardtrie)标准Trie树的结构:所有含有公共前缀的字符串将挂在树中同一个结点
系统 2019-08-29 21:59:51 2201
提到代理,我们可以使用ProxyBeanFactory,并配置proxyInterfaces,target和interceptorNames实现,但如果需要代理的bean很多,无疑会对spring配置文件的编写带来繁重的工作Spring为我们提供了,根据beanName匹配后进行自动代理的解决方法业务接口packageAutoProxyOne;publicinterfaceShopping...{publicStringbuySomething(Strin
系统 2019-08-12 09:30:00 2201
#includeusingnamespacestd;charc1,c2,c3,c4,blank;doubled1,d2,d3,d4;boolcheck(charc){if(c1!=c&&c2!=c&&c3!=c)returntrue;returnfalse;}intmain(){doubleval[300]={0.0},R=8.314;cin>>c1>>blank;cin>>val[c1];cin>>c2>>blank;cin>>val
系统 2019-08-12 09:27:40 2201
1.TimeoutJustretry2.Someunmetdependenciesafter'npminstall'JustnpminstallXXX#(XXXmeanslibpackagename)3.Thepackageversionislowerordeprecatedinpackage.jsonModifytheversioninpackage.json:e.x.makechangesfrom"zmq":"1.0.1"to"zmq":">=1.0.
系统 2019-08-12 09:27:36 2201
https://github.com/201303014069/Test打补丁一.方法一比较通用Gitcommit比如在PATH分支提交后Gitdiffmaster>patch创建补丁文件Gitcheckoutmaster回到主分支Gitapplypatch通过patch打补丁二.Gitconmmit先在一个分支提交Gitformat_patch–Mmaster生成.patch补丁文件Gitcheckoutmaster回到需要打补丁的分支Gitam***.
系统 2019-08-12 09:26:53 2201
usingSystem;usingSystem.Collections.Generic;usingSystem.Text;usingSystem.Data;usingSystem.Data.SqlClient;usingSystem.Collections;namespaceSystemDAO{//////数据库的通用访问代码苏飞修改//////此类为抽象类,///不允许实例化,在应用时直接调用即可///publica
系统 2019-08-12 01:55:37 2201