只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2013-09-02 16:40 楠楠IT 阅读(94) 评论(0) 推荐(0) 编辑
摘要: public static int[] maxMin(int a[]) { int[] res = new int[2]; int len = a.length; if (len a[i + 1]) { int tem... 阅读全文
posted @ 2014-09-27 13:10 楠楠IT 阅读(282) 评论(0) 推荐(0) 编辑
摘要: public class Ziji { public static List> Sets(int a[]) { List> res = new ArrayList>(); int len = a.length; int n = 1 0; i--) {... 阅读全文
posted @ 2014-09-26 17:27 楠楠IT 阅读(556) 评论(1) 推荐(0) 编辑
摘要: package mystudy;import java.io.UnsupportedEncodingException;import java.util.LinkedList;import java.util.Queue;import java.util.Stack;public class Tre... 阅读全文
posted @ 2014-09-23 14:44 楠楠IT 阅读(493) 评论(0) 推荐(0) 编辑
摘要: 1、阿里某个笔试题,两个字符串text,query,找到text中包含的最长的query的字串:public static String subStr(String text, String query) { if (text != null && query != null) { ... 阅读全文
posted @ 2014-08-30 18:24 楠楠IT 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 1、java、android中获取当前时间 this.sdf = new SimpleDateFormat("yyyy/MM/dd-hh:mm:ss", Locale.CHINA); String time = sdf.format(new Date(System.currentTimeMil... 阅读全文
posted @ 2014-07-14 15:21 楠楠IT 阅读(133) 评论(0) 推荐(0) 编辑
摘要: java:public class ArrayStack { private int[] data; private int top; private int size; public ArrayStack(int size) { this.data = new... 阅读全文
posted @ 2014-07-09 10:37 楠楠IT 阅读(510) 评论(0) 推荐(0) 编辑
摘要: 一、BubbleSort and XListview1、BubbleSort(1)analysistraverse、compare、exchange、cycle、optimizestrategyloop outside times n-1loop inside times n-i-1 it redu... 阅读全文
posted @ 2014-07-08 20:27 楠楠IT 阅读(271) 评论(0) 推荐(0) 编辑
摘要: Android中的this、Activity、Context、Application等虽然有相似之处,但是不能乱用,每一个都有自己的特点。用的时候不能太随意了。避免context相关的内存泄露,注意以下几点:1. 不要让生命周期长的对象引用activity context,即保证引用activity... 阅读全文
posted @ 2014-06-01 19:22 楠楠IT 阅读(406) 评论(0) 推荐(0) 编辑
摘要: 昨天和大家分享了我Android上线的第一个应用,大家还是挺支持的,很高兴,虽然作品没有那么高大上,但是很是有了一点小小的成就感,所以打算继续开源我上线的一些应用,和大家一起交流一下。 我这个作品是一款基于地图的移动定位软件,可以用于老婆对老公、父母对孩子、孩子对老人等多种情况的实时位置查询服务。... 阅读全文
posted @ 2014-05-30 20:34 楠楠IT 阅读(1468) 评论(8) 推荐(3) 编辑
摘要: 这是我上线的第一个android应用,在百度、腾讯、豌豆荚等平台测试通过,也有了部分用户,还是可以的啊,哈哈。现在分享给大家,当然,源码我也会分享。1、软件是一个管理wifi的小工具(1)查询、连接周围wifi信号,查看当前使用的wifi信号的基本信息(wifi名称、信号强度等)(2)管理使用过的w... 阅读全文
posted @ 2014-05-29 17:49 楠楠IT 阅读(1923) 评论(37) 推荐(9) 编辑