public void delPic(String path){ File delFile = new File(path); if (delFile.exists()) { delFile.delete(); //delPic(path); } MediaScannerConnection.sca ...
分类:
移动开发 时间:
2017-02-16 10:52:47
阅读次数:
232
$path="ceshi";
//打开指定目录
$dirHandle=opendir($path);
while(($item=readdir($dirHandle))!==false){
//.表示当前目录..表示上级目录
if($item!="."&&$item!=".."){
if(is_file($path."/".$item)){
$arr[‘file‘][]=$item;
}
if(is_dir($path."/".$item)){
$ar..
分类:
Web程序 时间:
2017-02-13 22:21:50
阅读次数:
177
客户端程序:mysql、mysqladmin、mysqldump、mysqlimport、mysqlcheck服务器端程序:mysqld,mysqld_safe,mysqld_multimy.cnf配置文件查找顺序,以最后一个找到的为准/etc/my.cnf-->/etc/mysql/my.cnf-->$MYSQL_HOME/my.cnf-->--default-extra-file=/path/to/somefile-..
分类:
数据库 时间:
2017-02-12 16:14:30
阅读次数:
204
# coding=utf-8 import requests, xlrd, pymysql, random, xlutils, copy, time, openpyxl def readexcel(file_path): try: book=xlrd.open_workbook(file_path)... ...
分类:
其他好文 时间:
2017-02-05 17:54:35
阅读次数:
241
tomcat安装脚本:---
-name:Tomcatinstallandconfiguration
hosts:"{{host}}"
user:root
vars:
tomcat_home:"{{tomcat_home}}"
tasks:
-name:absentoldtomcat
file:path={{item}}state=absent
with_items:
-"{{tomcat_home}}"
-/geelyapp/auto_scripts/tomcat.sh
-name:gettom..
分类:
其他好文 时间:
2017-01-22 21:35:03
阅读次数:
2637
#!/usr/bin/env python #_*_conding:utf-8_*_ import sys,os old_file = sys.argv[1] new_file = sys.argv[2] file_path = sys.argv[3] f = open(file_path,"r") ...
分类:
其他好文 时间:
2017-01-21 09:11:55
阅读次数:
138
logstash.conf的配置文件一、监控日志文件,匹配关键字,输出到指定文件/发送邮件。input{file{path=>["你的日志文件"]}}filter{if([message]!~"你的匹配关键字"){drop{}}if[loglevel]=="debug"{drop{percentage=>40}}}output{stdout{codec=>rubydebug}if([message]=~..
分类:
其他好文 时间:
2017-01-18 14:21:25
阅读次数:
238
import os import shutil from PIL import Image def getAllFiles(dirName, houzhui=' '): results = [] for file in os.listdir(dirName): file_path = os.path... ...
分类:
编程语言 时间:
2017-01-13 15:54:54
阅读次数:
215
使用堆外内存减少Full GC - JVM
大部分主流互联网企业线上Server JVM选用了CMS收集器(如Taobao、LinkedIn、Vdian), 虽然CMS可与用户线程并发GC以降低ST...
分类:
其他好文 时间:
2017-01-13 12:02:54
阅读次数:
429