In bash shell, when you use a dollar sign
followed by a variable name, shell expands the variable with its value. This
feature of shell is called para...
分类:
其他好文 时间:
2014-05-21 18:32:32
阅读次数:
332
Say you have an array for which theithelement
is the price of a given stock on dayi.Design an algorithm to find the maximum
profit. You may complete a...
分类:
其他好文 时间:
2014-05-21 17:27:55
阅读次数:
252
【题目】
Given an unsorted integer array, find the first missing positive integer.
For example,
Given [1,2,0] return 3,
and [3,4,-1,1] return 2.
Your algorithm should run in O(n) time and uses constant space.
【题意】
给定一个数组,找出第一个缺失的正数。时间复杂度O(n)
...
分类:
其他好文 时间:
2014-05-21 17:13:07
阅读次数:
219
【题目】
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.
Each number in C may only be used once in the combination.
Note:
All numbers (including target) will be ...
分类:
其他好文 时间:
2014-05-21 15:55:25
阅读次数:
259
在命令模式下,可以实现快速替换文本,这在vim编辑过程中非常实用。...
分类:
其他好文 时间:
2014-05-21 15:22:43
阅读次数:
296
【题目】
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.
The same repeated number may be chosen from C unlimited number of times.
Note:
All numbers (including target) w...
分类:
其他好文 时间:
2014-05-21 15:21:28
阅读次数:
292
今天在腾讯云的服务器被攻击后,apache启动报错,查找原因发现是磁盘空间不够no space left on device,
诡异的是df命令磁盘占用仅55%
继续查找原因,发现是iNode已满,即没有索引空间
这就好办了,首先定位哪个目录占用iNode最多,命令如下:
find */ ! -type l | cut -...
分类:
系统相关 时间:
2014-05-21 14:46:09
阅读次数:
363
1.安装squid3
sudo apt-get install squid3
2,配置squid3
sudo cd /etc/squid3
sudo vim squid.conf
/http_access
N为向下查找 找到http_access deny all 把deny改成allow
3启动squid3
Sudo service squid3 start
关闭
S...
分类:
其他好文 时间:
2014-05-21 11:02:53
阅读次数:
270
WebStorm
8 with IdeaVim
plugin
vim, sublime
sublime加上node插件。
nide
Brackets
vim
+ jshint2.vim
eclipse
Visual
Studio 2013 + NTVS(Node.js
Tools for Visual Studio)
notepad++
atom.io
No...
分类:
Web程序 时间:
2014-05-21 09:24:23
阅读次数:
333
题目:
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up t...
分类:
其他好文 时间:
2014-05-21 07:42:18
阅读次数:
230