Spinlock usually used in code that cannot sleep, thus has higher performance than semaphores. Spinlock is implemented as a bit in an integer value. Be ...
分类:
其他好文 时间:
2017-02-22 18:16:51
阅读次数:
296
高阶函数英文叫Higher-order function。什么是高阶函数?我们以实际代码为例子,一步一步深入概念。 变量可以指向函数 以Python内置的求绝对值的函数abs()为例,调用该函数用以下代码: >>> abs(-10) 10 但是,如果只写abs呢? >>> abs <built-in ...
分类:
编程语言 时间:
2017-02-11 00:55:17
阅读次数:
180
最近在分析一潜在内存泄露问题的时候,jmap出来中有很多的FastThreadLocalThread实例,看了下javadoc,如下: A special variant of ThreadLocal that yields higher access performance when access ...
分类:
Web程序 时间:
2017-02-05 16:47:18
阅读次数:
263
原题链接在这里:https://leetcode.com/problems/guess-number-higher-or-lower-ii/ 题目: We are playing the Guess Game. The game is as follows: I pick a number from ...
分类:
其他好文 时间:
2017-01-27 09:26:13
阅读次数:
182
原题链接在这里:https://leetcode.com/problems/guess-number-higher-or-lower/ 题目: We are playing the Guess Game. The game is as follows: I pick a number from 1 ...
分类:
其他好文 时间:
2017-01-26 09:51:53
阅读次数:
164
门面模式的定义 门面模式(Facade Pattern)也叫做外观模式,是一种比较常用的封装模式,其定义如 下: Provide a unified interface to a set of interfaces in a subsystem.Facade defines a higher-lev ...
分类:
其他好文 时间:
2017-01-18 00:43:21
阅读次数:
207
Given a Weather table, write a SQL query to find all dates' Ids with higher temperature compared to its previous (yesterday's) dates. For example, ret ...
分类:
其他好文 时间:
2017-01-16 14:17:49
阅读次数:
160
安装 安装必备 Vim 7.3 or higher. Vundle or Pathogen 下载/更新exVim 注意事项 安装exVim将不会覆盖你已经存在的Vim环境,这个仓库所包含的文件,变化,仅仅运行在它自己 的文件夹。 通过提供的shell脚本osx/mvim.sh,它将会不破坏你现有的v ...
分类:
系统相关 时间:
2017-01-13 23:54:28
阅读次数:
481
4742: [Usaco2016 Dec]Team Building Description Every year, Farmer John brings his NN cows to compete for "best in show" at the state fair. His arch -r ...
分类:
其他好文 时间:
2017-01-05 21:08:06
阅读次数:
231
今天,试着做了一下LeetCode OJ上面的第375道题:Guess Number Higher or Lower II 原题链接:https://leetcode.com/problems/guess-number-higher-or-lower-ii/ 具体题目如下: We are playi ...
分类:
其他好文 时间:
2017-01-05 01:38:35
阅读次数:
238