- 博客(15)
- 收藏
- 关注
转载 排序
排序算法整理选择排序插入排序选择排序实现步骤:找到数组中最小的元素,并将它和第一个元素进行交换位置,接着找到剩余数组中最小的元素和第二个位置的元素进行位置交换,依次类推,直到整个数组都被排序选择排序每次都是选择是最小的元素,所以被称为选择排序代码实现public class Selection{ public static void sort(Comparab...
2018-04-18 23:56:00
110
转载 SpringMVC笔记3--annotation
SpringMVC使用annotation可以减少配置文件的书写。要启动annotation的功能,首先需要在SpringMVC的配置文件中配置下面的标签。<mvc:annotation-driven /><context:component-scan base-package="com.my.webstore" />annotation主要有以下这些:@...
2015-07-11 17:07:00
128
转载 SpringMVC笔记2--ViewResolver
Springmvc中一个比较重要的组件ViewResolver。功能:ViewResolver帮助dispatcher servlet识别哪个视图将被渲染。Springmvc可以支持多种类型的ViewResolver实现。InternalResourceViewResolver就是其中的一个实现类。在DefaultServlet-servlet.xml文件中它是这样定义的。 ...
2015-07-11 16:53:00
108
转载 SpringMVC笔记1--开始使用(maven配置)
SpringMVC是类似于struts的一款强大的MVC web开发框架。使用方便,和struts有的一比。下面记录初次使用SpringMVC框架的maven配置过程。1 创建maven工程创建过程中需要注意的环节这一步选择packaging为war,这样项目的结构就默认是web结构的项目。运行的时候就可以直接用run as->run on server方式来运行项目而...
2015-07-11 15:02:00
93
转载 apache commons-io相关介绍-IOUtils类
IOUtils类IOUtils类普通的IO流(InputStream, OutputStream)/读写器(Reader、Writer)操作函数,该类提供下列静态函数用于输入输出操作。closeQuietly these methods close a stream ignoring nulls and exceptionstoXxx/read these methods rea...
2015-06-06 02:09:00
106
转载 apache commons-io相关介绍-DirectoryWalker类
DirectoryWalker类DirectoryWalker类主要用于处理遍历文件目录操作的类,在遍历文件目录的过程中可以对文件或文件夹做相应处理(添加钩子)。DirectoryWalker类是一个抽象类,使用的需要创建这个类的子类。这个类需要制定一个泛型参数,作为返回结果的类型。类中的一些主要的函数:handleStart 遍历处理开始时触发的函数handleEnd 遍历处...
2015-06-06 01:35:00
273
转载 apache commons-io相关介绍-FileUtils类
FileUtils类FileUtils类这个工具类提供了下列功能:+ writing to a file+ reading from a file+ make a directory including parent directories+ copying files and directories+ deleting files and directories+ con...
2015-06-06 01:32:00
180
转载 apache commons-io相关介绍-monitor包
apache commons-io相关介绍-monitor包org.apache.commons.io.monitor 文件状态监控org.apache.commons.io.monitor包的作用监控指定目录下的文件状态。它使用观察者设计模式设计这些类的关系。当文件创建,文件修改和文件删除事件发生时会调用相应的回调函数。基本使用方法:package com.demo.monit...
2015-06-05 20:50:00
439
转载 android笔记--AsyncTask例子
代码:package com.test.handler; import com.test.demo.R; import android.app.Activity;import android.app.ProgressDialog;import android.os.AsyncTask;import android.os.Bundle;import ...
2015-05-13 23:53:00
96
转载 Java Swing中的SwingWorker
Swing中的SwingWorker主要是用来执行比较耗时的任务。Java doc文档中中包含了一些简单的例子。An abstract class to perform lengthy GUI-interaction tasks in a background thread. Several background threads can be used to execu...
2015-05-12 22:46:00
317
转载 Java Swing中有关事件机制
看到过两种方式启动主窗体的代码:方式1: java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new MainJFrame().setVisible(true); } });...
2015-05-12 22:10:00
103
转载 android笔记--Cannot execute task: the task has already been executed (a task can be executed only once...
这个解决思路:每次执行任务的时候重新创建一个新的AsyncTask子类的对象,然后调用它的excute方法就行。转载于:https://www.cnblogs.com/xiaozu/p/4492300.html...
2015-05-10 15:26:00
252
转载 android笔记--解决SkImageDecoder::Factory returned null
使用HttpClient方式从网络上下载一张大的图片的Bitmap对象,用ImageView显示出来,运行下面的代码会下面的错误:05-10 13:42:57.206: D/skia(2250): --- SkImageDecoder::Factory returned null代码:package com.test.demo;import java...
2015-05-10 14:09:00
407
转载 android笔记--Sqlite使用
package com.example.storedate;import android.content.Context;import android.database.sqlite.SQLiteDatabase;import android.database.sqlite.SQLiteDatabase.CursorFactory;import android.d...
2015-05-10 12:55:00
94
转载 Markdown使用
Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HT...
2015-05-10 10:31:00
68
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人