java.lang.ThreadLocalThreadLocal会封装T类型的对象,每一个线程使用该对象时,各自拥有不同的T实例。原理最开始以为其中封装了一个Map。每次操作时,根据线程取出T。但是后来发现,这是因为ThreadLocal利用了线程的底层实现机制,在每一个线程里面封装了一个T的实例实例 private ThreadLocal thread...
分类:
其他好文 时间:
2015-04-16 10:25:21
阅读次数:
101
problem:
Given a binary tree, return the inorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [1,3,2].
Note: Rec...
分类:
其他好文 时间:
2015-04-16 10:27:18
阅读次数:
119
软件环境:Win7,Keil MDK 4.72a, IAR EWARM 7.2, GCC 4.2,Python 2.7 ,SCons 2.3.2
硬件环境:Armfly STM32F103ZE-EK v3.0开发板
参考文章:RT-Thread编程指南
RT-Thread_1.2.0+lwip+rtgui0.8.0 移植心得
RT-Thread RTOS组件:RTGUI...
分类:
其他好文 时间:
2015-04-16 10:24:32
阅读次数:
293
题目链接:Binary Tree Zigzag Level
Order Traversal
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and a...
分类:
其他好文 时间:
2015-04-16 10:24:56
阅读次数:
116
题目链接:Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
这道题...
分类:
其他好文 时间:
2015-04-16 10:25:57
阅读次数:
123
用途session保存有服务器和客户端之间的会话。你浏览网页的时候,如果网页需要登录,当你输入账号登进去的时候,就会在客户端和服务器端各自生成一个session,表示连接已经建立,当连接断开时,session也死掉了。
session属于长连接
在网络层、传输层、应用层都可能存在会话
每一个session都有一个ID,用于标识该session,这样在连接建立后,可以根据session ID表示身份,...
分类:
其他好文 时间:
2015-04-16 10:25:52
阅读次数:
132
题目链接:Construct
Binary Tree from Preorder and Inorder Traversal
Given preorder and inorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the ...
分类:
其他好文 时间:
2015-04-16 10:24:42
阅读次数:
137
仿QQ空间图片放缩查看,点击图片从原位置放大到全屏,后退从全屏缩小到原位置,效果非常好。...
分类:
其他好文 时间:
2015-04-16 10:25:53
阅读次数:
105
常见的抓包分析工具有:微软的Network Monitor和Message Analyzer、Sniff、WSExplorer、SpyNet、iptools、WinNetCap.WinSock
Expert、Wireshark和linux的tcpdump等工具
今天,做了实验测试就对比分析其中的两款,其他的大家可以百度谷歌测试一哈^_^
Wireshark与tcpdump介绍...
分类:
其他好文 时间:
2015-04-16 10:22:39
阅读次数:
274
通过@dynamic和objc_setAssociatedObject,实现给类别添加属性,前者是说明程序员自己实现setter和getter,后者是动态给对象添加属性。两个配合使用可以实现给对象添加属性。下面代码以scrollview为例:
头文件
@interface UIScrollView (Refresh)
@property (nonatomic) RefreshView * refreshView;
@end
源文件
#import
static cha...
分类:
其他好文 时间:
2015-04-16 10:23:03
阅读次数:
648
AESpackage com.sondon.NettyDemo;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;import org.apache.log4j.Logger;import sun.misc.BASE64Decode...
分类:
其他好文 时间:
2015-04-16 10:22:07
阅读次数:
253
首先说一点,PCL之OpenCV,两者之间是很相通的,就如各个编程语言,你若精通一门,则让你去学另外一种编程语言,我想你会很快上手的。
Text detection and recognition by Lluis Gomez
HDR by Fedor Morozov and Alexander ShishkovKAZE/A-KAZE by Eugene Khvedcheny...
分类:
其他好文 时间:
2015-04-16 10:23:04
阅读次数:
154
题目链接:Codeforces 492E Vanya and Field
通过拓展欧几里得算法求出每个位置在移动过程中,在x为0时,y的位置。统计相应y坐标最多的即为答案。
#include
#include
#include
using namespace std;
const int maxn = 1e6 + 5;
const int maxm = 1e5 + 5;
typedef...
分类:
其他好文 时间:
2015-04-16 10:21:14
阅读次数:
119
题目描述:
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacen...
分类:
其他好文 时间:
2015-04-16 10:22:38
阅读次数:
141
我们知道,在QML应用中,有时我们需要来读写一些文件,但是在我们的QML语言中并没有相应的API接口来供我们做(虽然有API接口来存储设置文件等)。那么我们怎么来做这个事情呢?我们可以通过Qt C++的方法来实现这个功能。...
分类:
其他好文 时间:
2015-04-16 10:20:06
阅读次数:
182
很多seo人员很喜欢heimao技术啊,毕竟那是快速排名的方。但是小编在这里告诫大家:如果你不是专业的heike,你还是放弃这种想法吧,因为那不是一般人能玩的转的。那么今天小编就来分享一下那些常见的heimao技术的手法和解决办法,分享的目的希望大家明白别有事没事痴人做梦,想通过去学习heimao来快速做站,然后被忽悠了都不知道;同时也希望站长在做站的时候,多多关注安全方面的问题,别被真正的高手黑...
分类:
其他好文 时间:
2015-04-16 10:19:45
阅读次数:
116
Hangover
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 107377
Accepted: 52375
Description
How far can you make a stack of cards overhang a table? If you ...
分类:
其他好文 时间:
2015-04-16 10:20:29
阅读次数:
130