摘要: public class StackByQueue { private LinkedList<String> queue1; private LinkedList<String> queue2; public StackByQueue() { queue1 = new LinkedList<Stri 阅读全文
posted @ 2016-02-29 19:06 笨狗毒毒毒 阅读(169) 评论(0) 推荐(0) 编辑
摘要: public class QueueByStack { private Stack<Integer> stack1; private Stack<Integer> stack2; public QueueByStack() { // TODO Auto-generated constructor s 阅读全文
posted @ 2016-02-29 19:05 笨狗毒毒毒 阅读(130) 评论(0) 推荐(0) 编辑
摘要: public class MinNumberInRotatedArray { public int getMinNumInRotatedArray(int[] array) { if(array == null) { return -1; } int leftIndex = 0; int right 阅读全文
posted @ 2016-02-29 19:04 笨狗毒毒毒 阅读(349) 评论(0) 推荐(0) 编辑
摘要: 1.currentThread()public class Thread14 extends Thread{ static { System.out.println("静态块的打印:" + Thread.currentThread().getName()); } pu... 阅读全文
posted @ 2015-11-18 10:55 笨狗毒毒毒 阅读(178) 评论(0) 推荐(0) 编辑
摘要: (转自:http://www.cnblogs.com/xrq730/p/4851233.html)Thread类中的方法调用方式:1.this.XXX这种调用方式表示的线程是:线程实例本身2.Thread.currentThread.XXX() 或者Thread.XXX()上面这两种写法一样,表示的... 阅读全文
posted @ 2015-11-17 17:55 笨狗毒毒毒 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 进程:进程可以理解为操作系统管理的基本运行单元。ie浏览器是一个进程,word是一个进程,正在操作系统中运行的“.exe"也可以理解为一个进程。线程:进程中独立运行的子任务就是一个线程。像qq.exe运行的时候有很多子任务比如聊天线程、好友视频线程、下载文件线程等等。使用多线程的优势:1.发挥多处理... 阅读全文
posted @ 2015-11-17 17:10 笨狗毒毒毒 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 本文为原创,未经许可禁止转载。关于Tprotocol层都是一些通信协议,个人感觉内容较大,很难分类描述清楚。故打算以TBinaryProtocol为例,分析客户端发请求以及接收服务端返回数据的整个过程。先将客户端的测试用例贴上。 1 public class DemoClient { 2 p... 阅读全文
posted @ 2015-11-12 17:45 笨狗毒毒毒 阅读(6122) 评论(2) 推荐(2) 编辑
摘要: 1 public class test1 { 2 /** 3 * 思路:如果A与某人有共同好友,则该人必出现在二度好友中 4 * 不在二度好友中的,则与A的共同好友数必然为0 5 * 故只需遍历所有的二度好友即可,但是不要将那些无共同好友的一度... 阅读全文
posted @ 2015-11-11 21:39 笨狗毒毒毒 阅读(4000) 评论(0) 推荐(0) 编辑
摘要: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ... 阅读全文
posted @ 2015-11-10 10:27 笨狗毒毒毒 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 2015-11-06使用eclipse 打断点debug,其实是使用的本地代码。你只要修改了eclipse中的代码,尽管测试服务端的代码没有更新,请求后还是执行的是本地代码。resume可以重新启动debug服务(当重新选择断点以后可以执行)breakpoints控制断点 阅读全文
posted @ 2015-11-06 19:18 笨狗毒毒毒 阅读(110) 评论(0) 推荐(0) 编辑