环境:Centos6.5今天遇到一个怪事,就是df-h查看磁盘空间时,显示使用空间为100%,无法写入文件到磁盘,但是用du-sh/home/*查看时,总和加起来使用空间约为20%左右最后发现是之前有一个大文件虽然使用了rm-rf删除了,但是由于该文件还存在其他进程调用,所以相当于没有被删除。..
分类:
其他好文 时间:
2016-04-03 07:25:31
阅读次数:
164
redis:保存在内存中,周期的将内存写到磁盘中,数据冗余。单线程,不如memcache。主从架构(通过哨兵),3.0已经支持cluster.redies:内存缓存和磁盘存储。数据结构存储服务器KVcacheandstore冗余;持久化主从(借助于sentinel实现一定意义上的HA)Clustering(分布式)队列数据结构..
分类:
其他好文 时间:
2016-04-03 07:24:30
阅读次数:
290
hadoop在遇到unknownhostexception时,按如下解决方案:1.$hostnamesample_host2.goto/etc/hostsaddsample_hostbehind127.0.0.1没问题了。
分类:
其他好文 时间:
2016-04-03 07:24:27
阅读次数:
131
本文分析全球最低功耗蓝牙单芯片DA14580的硬件架构和睡眠、唤醒技术。...
分类:
其他好文 时间:
2016-04-03 07:23:16
阅读次数:
250
一、创建一个版本库非常简单,首先,选择一个合适的地方,创建一个空目录
$ mkdir learngit
$ cd learngit
$ pwd
/Users/michael/learngit
二、通过git
init命令把这个目录变成Git可以管理的仓库,当前目录下多了一个.git的目录
如果你没有看到.git目录,那是因为这个目录默认是隐藏的,用ls
-ah命令就可以看见。...
分类:
其他好文 时间:
2016-04-03 07:23:37
阅读次数:
122
一个矩阵,求最长连续的序列长度 [1 2 3 4 5 6 7 8 9] 我的解法时用dfs遍历矩阵,如果便利过的元素就标记为false,不再遍历。 邻居 就是上下左右 e.g. 1 2 3 6 5 4 -> 7 7 9 8 =================== 5 7 9 1 2 3 -> 3 4 ...
分类:
其他好文 时间:
2016-04-03 07:20:25
阅读次数:
120
和1相比就是多了一个可能,就是截断以后两头一样,所以如果两头是一样的,就往前移动到不一样的地方就好了 读了23,24两行 ...
分类:
其他好文 时间:
2016-04-03 07:20:57
阅读次数:
104
Write a SQL query to get the second highest salary from the Employee table. For example, given the above Employee table, the second highest salary is ...
分类:
其他好文 时间:
2016-04-03 07:20:40
阅读次数:
135
http://blog.sina.com.cn/s/blog_74a459380101r0yx.html opencv2 矩阵方式 resize图像缩放代码(转载) (2014-05-16 09:55:35) 转载▼ opencv2 矩阵方式 resize图像缩放代码(转载) 转载▼ 分类: Ope ...
分类:
其他好文 时间:
2016-04-03 07:21:39
阅读次数:
163
Write a SQL query to get the nth highest salary from the Employee table. For example, given the above Employee table, the nth highest salary where n = ...
分类:
其他好文 时间:
2016-04-03 07:13:20
阅读次数:
127
三个指针,一个pre,一个cur,一个next(下一个不同的数字) 如果不遇到重复数字,那么三个都往前移一格 如果遇到重复数字,那么pre.next = next,这个时候pre并没有改变 ...
分类:
其他好文 时间:
2016-04-03 07:13:31
阅读次数:
129
Table: Person Table: Address Write a SQL query for a report that provides the following information for each person in the Person table, regardless if ...
分类:
其他好文 时间:
2016-04-03 07:10:34
阅读次数:
153
ubantu环境配置lamp比较简单 我用的14.0.4. 用xshell连接服务器 如果不是root用户,则在命令指令前加sudo,root用户则不需要 1.安装Apache apt-get install apache2 这是安装Apache服务器的指令,中间选择依次[y/n],选择y来确认 如 ...
分类:
其他好文 时间:
2016-04-03 07:12:06
阅读次数:
138
本来的Iterator类里面是自带next()和hasNext()的,但是现在加了peek()之后会调用一次iterator.next(),然后iterator的顺序就乱了。 所以一旦被peek过我们就需要把这个被next()弹出的元素记录下来,如果再调用next就返回这个临时的元素,再调用peek ...
分类:
其他好文 时间:
2016-04-03 07:06:55
阅读次数:
102
就是比之前的多一个flag记录有没有重复过一次 ...
分类:
其他好文 时间:
2016-04-03 07:08:02
阅读次数:
101
虽然是hard难度,其实也没有很难 分为三种情况: 1. 如果nums[mid] == target 那么返回mid 2. 如果nums[mid] < nums[right] 那么说明在nums里面,从mid到right的顺序是正确的,所以: 1)如果target值范围介于nums[mid]和num ...
分类:
其他好文 时间:
2016-04-03 07:08:08
阅读次数:
160
先搬一下(戳)维基百科的康托展开(戳): 康托展开是一个全排列到一个自然数的双射,常用于构建哈希表时的空间压缩。 康托展开的实质是计算当前排列在所有由小到大全排列中的顺序,因此是可逆的。 由于是双射 所以可以求n的全排列里第k大的排列(逆康托展开) (伪)计算原理: 从某个元素找后面比这个元素小的数 ...
分类:
其他好文 时间:
2016-04-03 07:01:25
阅读次数:
130