Java
fan504
这个作者很懒,什么都没留下…
展开
-
java随机访问文件
java随机访问文件原创 2017-01-24 13:42:54 · 460 阅读 · 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 · 1521 阅读 · 0 评论 -
linux系统下部署tomcat
环境:Centos6.5 jdk1.7 tomcat8 1、下载tomcat,地址:http://tomcat.apache.org/download-80.cgi 2、检查系统是否安装了jdk 3、将下载的tomcat拷贝到指定的文件夹下并解压 4、启动tomcat 如上图则说明tomcat启动成功 5、在浏览器中输入http://localh原创 2017-04-30 22:11:36 · 330 阅读 · 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 · 257 阅读 · 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 · 3708 阅读 · 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 failed org.springframework.beans.factory.BeanCreationException: Error crea原创 2017-05-17 08:55:10 · 1133 阅读 · 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 · 4613 阅读 · 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 · 279 阅读 · 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 · 682 阅读 · 0 评论