2013年11月19日

spring path格式

摘要: org.springframework.utilClass AntPathMatcherjava.lang.Object org.springframework.util.AntPathMatcherAll Implemented Interfaces:PathMatcherpublic class AntPathMatcherextends Objectimplements PathMatcherPathMatcher implementation for Ant-style path patterns. Examples are provided below.Part of this m. 阅读全文

posted @ 2013-11-19 18:54 -红尘- 阅读(304) 评论(0) 推荐(0)

2013年11月13日

JAVA实现树结构的深度和广度优先遍历

摘要: 对树形结构数据进行广度优先/深度优先遍历public class Node { String value; List children = new ArrayList(); public Node(String value){ this.value = value; } public static void main(String[] args) { Node root = new Node("A"); root.children.add(new Node("B")); root.children.a... 阅读全文

posted @ 2013-11-13 19:06 -红尘- 阅读(1321) 评论(0) 推荐(0)

2013年7月2日

Android画图并保存图片(转载)

摘要: Canvas是一个画布,你可以建立一个空白的画布,就直接new一个Canvas对象,不需要参数。也可以先使用BitmapFactory创建一个Bitmap对象,作为新的Canvas对象的参数,也就是说这个画布不是空白的,如果你想保存图片的话,最好是Bitmap是一个新的,而不是从某个文件中读入进来的,或者是Drawable对象。然后使用Canvas画第一张图上去,在画第二张图上去,最后使用Canvas.save(int flag)的方法进行保存,注意save方法里面的参数可以保存单个图层,如果是保存全部图层的 话使用 save( Canvas.ALL_SAVE_FLAG )。最后所有的信息都会 阅读全文

posted @ 2013-07-02 14:15 -红尘- 阅读(367) 评论(0) 推荐(0)

导航