Description约翰的N(1≤N≤1,000,000,000)只奶牛要出发去探索牧场四周的土地.她们将沿着一条路走,一直走到三岔路口(可以认为所有的路口都是这样的).这时候,这一群奶牛可能会分成两群,分别沿着接下来的两条路继续走.如果她们再次走到三岔路口,那么仍有可能继续分裂成两群继续走.奶牛...
分类:
其他好文 时间:
2014-10-29 01:37:42
阅读次数:
200
问题描述:
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, this binary tree is symmetric:
1
/ 2 2
/ \ / 3 4 4 3
But the ...
分类:
其他好文 时间:
2014-10-27 21:19:41
阅读次数:
231
“val” 为 16进制的字符串,想把字符串每4位的数据提取出来,转成 unsigend short类型,数据已经提取出了,但是在函数调用结束时报错: Run-Time Check Failure #2 - Stack around the variable 'usval' was corrupted。
TCHAR* pMacValue = (TCHAR*)(LPCTSTR)val;
TCHA...
分类:
其他好文 时间:
2014-10-27 14:21:13
阅读次数:
295
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:
其他好文 时间:
2014-10-26 15:33:29
阅读次数:
141
资源处理
Java本身自带了垃圾回收(Garbage Collection)功能,但是只有垃圾回收的目标是内部资源(Internal Resource),典型的比如堆上分配的内存区域等。对于外部资源(External Resource),如数据库连接,文件句柄,套接字等资源,还是需要在程序中进行显式回收的。
使用Lambda表达式可以实现一种叫做Execute Around的模式,用来...
分类:
编程语言 时间:
2014-10-26 11:44:13
阅读次数:
305
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:
其他好文 时间:
2014-10-26 11:37:08
阅读次数:
195
Mac OS Yosemite disabled ipfw command, we need use pf rule to work around it. This article is a manual to describe how to address this issue....
分类:
其他好文 时间:
2014-10-25 07:06:51
阅读次数:
234
1. Tasks and Back Stack An application usually contains multiple activities. Each activity should be designed around a specific kind of action the us....
分类:
移动开发 时间:
2014-10-24 14:16:41
阅读次数:
297
package aoptest;import org.aspectj.lang.ProceedingJoinPoint;import org.aspectj.lang.annotation.Around;import org.aspectj.lang.annotation.Aspect;public...
分类:
编程语言 时间:
2014-10-19 21:23:58
阅读次数:
321
package com.zhang.shine.cache;import java.lang.reflect.Method;import org.aspectj.lang.ProceedingJoinPoint;import org.aspectj.lang.annotation.Around;im...
分类:
其他好文 时间:
2014-10-19 01:13:37
阅读次数:
256