摘要:
File[] files = new File(dir).listFiles(); Arrays.sort(files); 使用的时候再注意看看sort的说明,比较的类型需要实现了comparable接口Java数组排序Arrays.sort,以及Comparator接口的用法 有的时候需要对数组里的element进行排序。当然可以自己编写合适的排序方法,但既然java包里有自带的Arrays.sort排序方法,在数组元素比较少的时候为何不用?. F' K, m8 Sj1 fk' ]/ Z Sorting an Array 1. 数字排序 int[] intArray = ne 阅读全文
posted @ 2011-03-26 23:19
拂晓风起-Kenko
阅读(4883)
评论(0)
推荐(0)
摘要:
js中如果无法获取某个html属性,例如自定义了一个dir属性,但获取总是为空,尝试换个词,因为可能什么关键词冲突了。 阅读全文
posted @ 2011-03-26 17:20
拂晓风起-Kenko
阅读(579)
评论(0)
推荐(0)
摘要:
大家会发现,enctype="multipart/form-data"的表单提交后,在后台无法用传统的request.getParameter获取其他参数我个人理解是因为每个参数都用流的形式处理了,需要特别的方式才能获取本文使用commons-fileupload 获取除file外其他参数HTML代码: <form id="uploadFileForm" action="UploadServlet" target="hiddenFrame" method="post" enctype=&q 阅读全文
posted @ 2011-03-26 13:56
拂晓风起-Kenko
阅读(8500)
评论(0)
推荐(0)

浙公网安备 33010602011771号