static final int DEFAULT_INITIAL_CAPACITY = 1 [] EMPTY_TABLE = {}; //就比较用的 transient Entry[] table = (Entry[]) EMPTY_TABLE;//Entry数组,存放数据的地方 int...
分类:
其他好文 时间:
2015-01-27 23:11:25
阅读次数:
247
DescriptionYou're in space.You want to get home.There are asteroids.You don't want to hit them.InputInput to this problem will consist of a (non-empty...
分类:
其他好文 时间:
2015-01-27 21:32:29
阅读次数:
217
原题地址基本动态规划题代码: 1 int minPathSum(vector > &grid) { 2 if (grid.empty() || grid[0].empty()) return 0; 3 4 int m = grid.size(); 5 int n = grid[0].s...
分类:
其他好文 时间:
2015-01-27 20:12:28
阅读次数:
165
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.
Below is one possible representation of s1 = "great":
great
/ gr ...
分类:
其他好文 时间:
2015-01-27 16:25:51
阅读次数:
169
public static void LoadPicFromStream(string url) { string content = string.Empty; HttpWebRequest request = (HttpWebR...
分类:
其他好文 时间:
2015-01-27 14:49:25
阅读次数:
169
event loop
事件循环
一旦你向event_base注册了一些event,那你接下来希望Libevent等待事件的发生并且通知你。
接口
#define EVLOOP_ONCE 0x01
#define EVLOOP_NONBLOCK 0x02
#define EVLOOP_NO_EXIT_ON_EMPTY 0x04
int event_b...
分类:
其他好文 时间:
2015-01-27 13:32:52
阅读次数:
286
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space is marked as 1 and 0 respectively in the grid.For e...
分类:
其他好文 时间:
2015-01-27 13:28:19
阅读次数:
149
Given an array of size n, find the majority element. The majority element is the element that appears more than ? n/2 ? times.
You may assume that the array is non-empty and the majority element...
分类:
Web程序 时间:
2015-01-27 13:25:08
阅读次数:
227
1.empty() – jQuery 文档操作 从被选元素移除所有内容,包括所有文本和子节点。 用法:$(selector).empty(); 其中,selector可以是”#id”,”.class”,”标签名”等。 2.html() – jQuery 文档操作 用法: $(selector).ht...
分类:
Web程序 时间:
2015-01-27 13:00:10
阅读次数:
171
public static string LogPath{ get { string path = string.Empty; path = Environment.GetFolderPath(Environment.SpecialFolder.CommonP...
分类:
其他好文 时间:
2015-01-27 10:45:09
阅读次数:
175