function Start-GPUpdate{param([String[]]$ComputerName)$code = {$rv = 1 |Select-Object -Property ComputerName, ExitCode$null = gpupdate.exe /force$rv.E...
分类:
其他好文 时间:
2014-06-14 22:03:39
阅读次数:
254
$infos = @{}$infos.Path ='c:\Windows'$infos.Recurse =$true$infos.Filter ='*.log'$infos.ErrorAction ='SilentlyContinue'$infos.Remove('Recurse')dir@info...
分类:
其他好文 时间:
2014-06-14 21:49:24
阅读次数:
234
1. PyStringObject --> 变长不可变对象
typedef struct{
PyObject_VAR_HEAD//ob_size变量保存着对象中维护的可变长度内存的大小
longob_shash; //缓存该对象的hash值,用于dict的查询
intob_sstate; //标志该对象是否经过intern机制的处理
char ob_sval[1];// 字符指针,指向一段内存
} PyStri...
分类:
编程语言 时间:
2014-06-14 17:30:48
阅读次数:
309
在linux下的hash_maphash_map本身以前本身不属于标准库,是后来引入的.有两种可能:一种可能它被放在了stdext名空间里,那么你就要使用using namespace stdext 引入该名空间并#include ;.另一种可能就是它被反在了标准库的ext目录底下,仍旧属于std名...
分类:
系统相关 时间:
2014-06-14 16:01:19
阅读次数:
344
表连接方式及使用场合NESTED LOOP对于被连接的数据子集较小的情况,nested loop连接是个较好的选择。nested loop就是扫描一个表,每读到一条记录,就根据索引去另一个表里面查找,没有索引一般就不会是 nested loops。一般在nested loop中, 驱动表满足条件结果...
分类:
其他好文 时间:
2014-06-14 15:22:15
阅读次数:
218
Problem Description
give you a string, please output the result of the following function mod 1000000007
n is the length of the string
f() is the function of fibonacci, f(0) = 0, f(1) = 1...
a...
分类:
其他好文 时间:
2014-06-14 11:45:49
阅读次数:
243
选择出数列中前k个最大的数。
这里因为数据特殊,所以可以使用hash表的方法:
#include
#include
#include
#include
using namespace std;
const int SIZE = 1000005;
const int SMALL = -500000;
bool arr[SIZE];
int main()
{
int n, m, a,...
分类:
其他好文 时间:
2014-06-14 11:03:43
阅读次数:
244
HashMap基于hash表的Map接口实现,它实现了Map接口中的所有操作。HashMap允许存储null键和null值。这是它与Hashtable的区别之一(另外一个区别是Hashtable是线程安全的)。另外,HashMap中的键值对是无序的。下面,我们从HashMap的源代码来分析Has.....
分类:
其他好文 时间:
2014-06-14 09:43:49
阅读次数:
304
这道题想的时候颇费了一些周折,想过把L的所有concatenation组合出来,放到hash或map里,然后遍历S的时候直接看。但是这样如果L的size: Lsize过大的话,可能的组合有Lsize!种,组合数剧增,效率低下,所以不采用这种方法。又考虑在S中从左向右一个word一个word遍历过去,...
分类:
其他好文 时间:
2014-06-14 09:07:00
阅读次数:
252
Bloom filter的实现以及常用的hash函数
bloom filter利用时间换空间的思想,利用多个哈希函数,将一个元素的存在状态映射到多个bit中,特别是在网络环境中,BF具有广泛的用途,关键问题就是要减少false positive rate(可以设置参数来调节),扩展有 counting BF。这里选用的hash函数是表现较好的 BKDRHash , SDBMHash, D...
分类:
其他好文 时间:
2014-06-13 20:42:05
阅读次数:
412