public String BufferedReaderDemo(String path)
throws IOException...{File file=new
File(path);if(!file.exists()||file.isDirectory())throw new FileNotFo...
分类:
其他好文 时间:
2014-05-14 02:16:11
阅读次数:
199
这道题的思路还是比较清晰的,用栈嘛,麻烦是麻烦在这些层次的细节上。主要有下面几个:
./和/:当前路径,遇到这种,应该将后面的文件夹或文件入栈。
../:上一层路径,遇到这种,应该做一次出栈操作,相当于返回了上一层目录。
//:可以直接简化成‘/’。
还有下面几个要注意的测试用例:
1. linux的路径名可以含有很多特殊字符,比如“_”,".","*"等等,所以要特别注意含有"."的哪...
分类:
其他好文 时间:
2014-05-13 23:32:13
阅读次数:
347
使用unity3D开发的一个客户端,需要导出为Android工程,然后接入一些第三方android
SDK。unity版本操作系统为:OS 名称: Microsoft Windows 7 旗舰版OS 版本: 6.1.7601 Service Pack 1
Buil...
分类:
移动开发 时间:
2014-05-13 22:36:52
阅读次数:
595
TriangleGiven a triangle, find the minimum path
sum from top to bottom. Each step you may move to adjacent numbers on the row
below.For example, given...
分类:
其他好文 时间:
2014-05-13 18:51:44
阅读次数:
297
之前写过一篇文章是介绍windows下搭建Selenium+Eclipse+Python环境,但看着Eclipse总觉得很丑,而且又笨重,不像UliPad那么轻,也不像sublime_text2那么漂亮,其实很多人都是看sublime_text2的主题漂亮才投怀送抱的,我就是其中之一,但一直没解决GUI的调试问题,又跑回来了Eclipse;但实在不能忍受Eclipse默认的主题,看久了,真心觉得丑...
分类:
系统相关 时间:
2014-05-13 11:52:15
阅读次数:
363
从真正接触java到现在,差不多有一年时间了,配置JDK的环境变量也配置过无数次,但是对于这些配置的作用始终有点不太清楚,于是做了一些整理。对于JDK要配置三个环境变量,分别是JAVA_HOME、path、classpath。对于我的电脑来说,配置如下:
JAVA_HOME:E:\Java\...
分类:
其他好文 时间:
2014-05-13 10:52:39
阅读次数:
230
FileSystemObject组件应该实例
read="michael.txt"
'获取文件真实路径
read=LEFT(Server.MapPath(Request.ServerVariables("PATH_INFO")),InstrRev(Server.MapPath(Request.ServerVariables("PATH_INF...
分类:
其他好文 时间:
2014-05-13 07:17:51
阅读次数:
283
#!/usr/bin/envpython#coding:utf8#此脚本为查找递归目录下所有文件匹配的内容importos,sys,tabdefpaths(path):list_path=os.walk(path)all_file=[]forp,d,flinlist_path:forfinfl:pfile=os.path.join(p,f)ifos.path.isdir(pfile):paths(pfile)all_file.append(pfile)returnall..
分类:
编程语言 时间:
2014-05-13 03:49:34
阅读次数:
426
#!/usr/bin/envpython#coding:utf8importos,sys,glob,time,MySQLdb,reDIRNAME=os.path.dirname(__file__)OPSTOOLS_DIR=os.path.abspath(os.path.join(DIRNAME,‘..‘))sys.path.append(OPSTOOLS_DIR)fromlibrary.mysqlconfigimportMySQLDConfig,getMyVariablesfromoptparseimport..
分类:
数据库 时间:
2014-05-13 02:46:59
阅读次数:
809
#!/usr/bin/envpython#coding:utf8importos,sysimportdatetime,shutil,subprocessfromconfig.configimportslow_configclasscut_mysql(object):mysql_user,mysql_pass,date_day,slow_log_name,slow_log_path,mysqlsla_log_name,mysqldumpslow_log_name,new_log_path,new_log_nam..
分类:
数据库 时间:
2014-05-13 02:39:47
阅读次数:
482