>>> import psutil获取cpu信息>>> psutil.cpu_times()scputimes(user=128258.38, nice=12.29, system=88369.31, idle=6713420.33, iowait=3290.63, irq=1069.04, sof...
分类:
编程语言 时间:
2014-07-16 23:11:20
阅读次数:
365
Step 1: Convert any text into uint8 type in matlab : Step 2: Add models in matlab : copy the uint8 numbers and put them in Repeating Sequence Stair mo...
分类:
其他好文 时间:
2014-07-10 13:47:42
阅读次数:
327
http://poj.org/problem?id=3709 给定一个长度为n的非严格单调递增数列a1,...,an.每一次操作可以使数列中的任何一项的值减小1。现在要使数列中的每一项都满足其他项中至少有k-1项和它相等。求最少要对这个数列操作的次数。输入:第一行为测试数据的组数T(1 ≤ T ≤ ...
分类:
其他好文 时间:
2014-07-10 10:43:41
阅读次数:
201
QEMU Networking QEMU has a number of really nice ways to set up networking for its guests. It can be a little bewildering to figure out how each of th...
分类:
Web程序 时间:
2014-07-10 00:32:27
阅读次数:
499
使用resetlogs选项,会把当前的日志序号(log sequence number)重设为1,并抛弃所有日志信息。在以下条件时需要使用resetlogs选项:在不完全恢复(介质恢复);使用备份控制文件。使用resetlogs打开数据库后,务必要完整地进行一次数据库备份。不完全恢复只能做一次吗?采...
分类:
数据库 时间:
2014-07-07 22:21:21
阅读次数:
430
Problem Description:Given a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more diction...
分类:
其他好文 时间:
2014-07-07 16:02:11
阅读次数:
219
【题目】
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.
For example, given
s = "leetcode",
dict = ["leet", "code"].
Return true because "leetcode" can be segm...
分类:
其他好文 时间:
2014-06-30 09:02:26
阅读次数:
276
题目链接:http://poj.org/problem?id=2442
题目大意:给出一个m*n的矩阵,从每一行中取出一个数相加,能得到n^m个不同的结果,要求输出其中前n项。
建立一个以n元数组为底层数组的堆,在这里,利用stl中的make_heap,pop_heap,push_heap等函数解决。
1.将第一组数据输入arr1数组,升序排序。
2.将接下来的数据输入到arr2数组中,并...
分类:
其他好文 时间:
2014-06-29 23:25:31
阅读次数:
259
题目
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.
For example,
Given [100, 4, 200, 1, 3, 2],
The longest consecutive elements sequence...
分类:
其他好文 时间:
2014-06-29 22:16:48
阅读次数:
239
Description
The Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0
F2 = {1/2}
F3 = {1/3, 1/2, 2/3}
F4 = {1/4, 1/3, 1/2, 2/3, 3/4}
F5 = {1/...
分类:
其他好文 时间:
2014-06-29 20:35:09
阅读次数:
209