03 2016 档案

利用QMP和QEMU虚拟机交互的几种方式
摘要:QMP是一种基于JSON格式的传输协议,我们能利用它与一个QEMU虚拟机实例进行交互,例如查询,更改虚拟机的状态,获取设备信息等等。下面是几种创建QMP的方法以及对其它的一些基本命令的使用: 1、基于Telnet创建QMP 首先利用如下命令启动一个QEMU虚拟机实例 然后启动Telnet连接loca 阅读全文

posted @ 2016-03-28 10:32 姚灯灯! 阅读(4442) 评论(0) 推荐(0)

LeetCode题解-----Wildcard Matching
摘要:题目描述: 分析:这道题有点类似与简单的正则表达式引擎。我们用两个指针分别标记s和p,若当前位置的元素匹配,则两个指针都向右移动一个数。如果遇到'*',则p的指针指向后面不为'*'的第一个字符,再对s和p当前的指针位置做一个标记,标记为preS,preP,我们可以认为在当前指针之前的s和p是匹配的( 阅读全文

posted @ 2016-03-26 18:51 姚灯灯! 阅读(353) 评论(0) 推荐(0)

LeetCode题解-----Sliding Window Maximum
摘要:题目描述: Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the 阅读全文

posted @ 2016-03-22 20:06 姚灯灯! 阅读(483) 评论(0) 推荐(0)

基于go-ceph创建CEPH块设备及快照
摘要:一、代码执行前准备 1、系统中安装了CEPH集群 2、GOPATH目录下存在src/github.com/noahdesu/go-ceph代码库 3、在ubuntu 14.04下还需apt-get librados-dev和librbd-dev两个包   二、代码示例 三、最终会生成一个名为"tes 阅读全文

posted @ 2016-03-15 10:37 姚灯灯! 阅读(1143) 评论(0) 推荐(0)

LeetCode题解-----Majority Element II 摩尔投票法
摘要:题目描述: Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. The algorithm should run in linear time and in O(1) spa 阅读全文

posted @ 2016-03-14 20:09 姚灯灯! 阅读(1973) 评论(0) 推荐(0)

LeetCode题解-----Maximum Gap
摘要:题目描述: Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Try to solve it in linear time/space. R 阅读全文

posted @ 2016-03-02 10:38 姚灯灯! 阅读(386) 评论(0) 推荐(0)

导航