
Java
fan504
这个作者很懒,什么都没留下…
展开
-
java随机访问文件
java随机访问文件原创 2017-01-24 13:42:54 · 488 阅读 · 0 评论 -
java对文件重命名
将目录下文件名中有"_*"的文件名重命名为去掉“_*”后的名字public void renameFiles(String path) { File file = new File(path); File[] files = file.listFiles(); for(File f : files)原创 2017-03-23 22:26:58 · 1558 阅读 · 0 评论 -
linux系统下部署tomcat
环境:Centos6.5 jdk1.7 tomcat81、下载tomcat,地址:http://tomcat.apache.org/download-80.cgi 2、检查系统是否安装了jdk 3、将下载的tomcat拷贝到指定的文件夹下并解压4、启动tomcat如上图则说明tomcat启动成功5、在浏览器中输入http://localh原创 2017-04-30 22:11:36 · 374 阅读 · 0 评论 -
java简单的定时任务
import java.io.File;import java.util.concurrent.Executors;import java.util.concurrent.ScheduledExecutorService;import java.util.concurrent.TimeUnit;public class DeleteFile {public void e原创 2017-05-02 18:44:37 · 285 阅读 · 0 评论 -
java执行bat文件
public static void main(String[] args) { String batName = "C:/Users/fl/Desktop/test.bat"; Runtime rt = Runtime.getRuntime(); Process ps = null; try { ps原创 2017-05-02 18:47:34 · 3746 阅读 · 0 评论 -
NoSuchBeanDefinitionException: No matching bean of type [com.piesat.web.service.SelectItemsService]
ERROR 2017-05-15 16:56:31,355 org.springframework.web.servlet.DispatcherServlet.localhost-startStop-1 Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error crea原创 2017-05-17 08:55:10 · 1167 阅读 · 0 评论 -
Java通过反射获取和设置对象的属性值
/*** @category 利用反射机制通过属性名获取MongodbData对象的属性值* @param fieldName 获取属性值的属性名* @param data 获取对象* @return*/private String getValue(String fieldName, MongodbData data){String result = null;原创 2017-06-21 17:34:22 · 4688 阅读 · 0 评论 -
基数排序算法
package com.suanfa;public class RadixSort {private static String[] month = {"J", "F", "M", "A", "Y", "L", "U", "G", "S", "O", "N", "D"};private static String[] day = {"F", "S", "T", "O", "I"原创 2017-09-08 00:34:31 · 307 阅读 · 0 评论 -
堆排序构建大根堆 java
private static int[] test(int[] a){int total = a.length;for(int i = 2; i >= 0; i--){int k = (int) Math.pow(2, i + 1) -1;int count = (int) Math.pow(2, i) - 1;for(int num = 0, j = k - 1 -原创 2017-09-17 23:48:20 · 721 阅读 · 0 评论