编程笔记1
2015-07-05 21:52
330 查看
使用了eclipse编了一个小程序放在D:\JavaProject\JOB下,记录下比较重要的代码段:
eclipse生成console运行的exe文件:
Help>Install new Software…>FatJar - http://kurucz-grafika.de/fatjar
然后使用exe4j(E:\Program Files (x86)\exe4j)来生成exe
php:
D:\PHPProj下,安装了tomcat,httpd,php,mysql(E:\Program Files (x86)\MySQL),已经配置了httpd 的虚拟目录,VirtualHost
若Apache服务器软件不想用了,想要卸载,需要先卸载apache服务(切记,若直接删除安装路径的文件夹,会有残余文件在电脑,可能会造成不必要的麻烦)
在CMD命令窗口,输入如下(建议先停止服务再删除):
sc delete apache
apache是Apache服务器的服务名
String encoding="utf-8"; File file=new File(filePath); if(file.isFile()&&file.exists()){ InputStreamReader read=new InputStreamReader( new FileInputStream(file),encoding); BufferedReader buffread=new BufferedReader(read); //txt文件写入
String[] split=lineTxt.split(", "); //字符流的分割
BigDecimal db0 = new BigDecimal(lineArray[row][0]); doubleArray[row][0]=Double.valueOf(db0.toPlainString()); //对1.1e1之类的数值转为double型或float private static void OutPutToFile(StringBuffer stringbuffer,String fn){ File file = new File("output_"+fn+".txt"); try { if (file.exists()) file.delete(); BufferedWriter bw = new BufferedWriter(new FileWriter(file)); bw.write(stringbuffer.toString()); System.out.println("FILE DONE:"+"output_"+fn+".txt"); bw.flush(); bw.close(); }catch (IOException e) { e.printStackTrace(); } //输入txt文件中 StringBuffer out = new StringBuffer(); OutPutToFile(out,fileName);
try { Thread.sleep ( 1000 ) ; } catch (InterruptedException ie){System.out.println("。。。。。。");} //暂停1000ms
eclipse生成console运行的exe文件:
Help>Install new Software…>FatJar - http://kurucz-grafika.de/fatjar
然后使用exe4j(E:\Program Files (x86)\exe4j)来生成exe
php:
D:\PHPProj下,安装了tomcat,httpd,php,mysql(E:\Program Files (x86)\MySQL),已经配置了httpd 的虚拟目录,VirtualHost
#设置虚拟目录,指向D:\PHPProj\PHPWeb #D:\PHPProj\httpd-2.2.25-win32-x86\conf\httpd.conf <IfModule dir_module> DirectoryIndex index.html Index.php Alias /mainWeb "D:\PHPProj\PHPWeb" <Directory "D:\PHPProj\PHPWeb"> AllowOverride None Options Indexes FollowSymLinks Order allow,deny Allow from all </Directory> </IfModule> DocumentRoot "D:\PHPProj\PHPWeb"
#test:Spider #D:\PHPProj\httpd-2.2.25-win32-x86\conf\extra\httpd-vhosts.conf <VirtualHost 127.0.0.1:80> DocumentRoot "D:\PHPProj\PHPWeb\BAIDUSpider" ServerName Spider ErrorLog "logs/Spider-error.log" CustomLog "logs/Spider-access.log" common </VirtualHost>
若Apache服务器软件不想用了,想要卸载,需要先卸载apache服务(切记,若直接删除安装路径的文件夹,会有残余文件在电脑,可能会造成不必要的麻烦)
在CMD命令窗口,输入如下(建议先停止服务再删除):
sc delete apache
apache是Apache服务器的服务名
相关文章推荐
- Qt中mysql程序发布
- php加速器(XCache),php以模块的形式编译
- JAVA面向对象第二天
- Base64编码的vbs实现
- Java核心技术I——基础点拾掇(第六章)
- Java - Thinking in Java 第2章 一切都是对象
- c++ 内存四区简单总结
- VBS版BrainFuck语言解释器
- scala eclipse plugin 插件安装
- 基于C++的string类的大数相加的一种算法
- C# Kinect 2.0 SDK 学习笔记(0)——基本情况介绍
- .net 缩略图代码
- Sublime2编译Python3程序EOFError:EOF when reading a line解决方法
- C++ 程序变量作用域生命周期笔记
- python 关闭 os.popen()
- 你应该更新的 Java 知识之常用程序库【转载】
- VC++的Unicode编程
- 国嵌C++专题3-八剑齐飞
- .whl文件打开方式 Python
- C++ 模板详解(一)(二)