码迷,mamicode.com
首页 >  
搜索关键字:hash    ( 10449个结果
php字符串常用算法--字符串加密解密
/** * 加密、解密字符串 * * @global string $db_hash * @global array $pwServer * @param $string 待处理字符串 * @param $action 操作,ENCODE|DECODE * @return string */fun....
分类:编程语言   时间:2014-11-25 18:15:48    阅读次数:179
php 中foreach比for快之原因
这里首先要谈到php 的hashtabletypedef struct _hashtable { uint nTableSize; // hash Bucket的大小,最小为8,以2x增长。 uint nTableMask; // nTableSize-1 ...
分类:Web程序   时间:2014-11-25 15:54:28    阅读次数:158
Codeforces Round #276 div1 B. Maximum Value Hash 乱搞
#include #include #include #include #include #include #include #include #include #include #include #include typedef long long ll;using namespace std;/...
分类:其他好文   时间:2014-11-25 15:48:16    阅读次数:180
哈希(hash) 之插入和查找(链地址法)
一:学些心得 1 getHash函数的设计最牛的是Unix中处理字符串的ELFHash();当然也可以自己写一个比较简单的getHash函数关键在于去mod M的M值,使器均匀的分布(一般是不大于hash_size的某一个素数,接近于2的某次幂);但是有一点需要注意就是返回的hash值必须是正值。 2 处理冲突的方法:链地址法是比较好的方法了(静态动态都可以的);二次哈希(一般是加key值)再...
分类:其他好文   时间:2014-11-25 14:28:57    阅读次数:332
LeetCode[Hash Table]: Two Sum
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 to the target, where...
分类:其他好文   时间:2014-11-24 15:28:13    阅读次数:136
Memcached 集群部署
Memcached 是一个高性能的分布式内存对象缓存系统,Memcached的高性能源于两阶段哈希(two-stage hash)结构,Memcached基于一个存储键/值对的HashMap,减轻数据库负载,它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提供动态、数据库驱动网站的速度。当内存容量达到指定设定的值时,LRU算法自动删除不使用的缓存。...
分类:系统相关   时间:2014-11-24 13:35:09    阅读次数:321
LeetCode[Hash Table]: Valid Sudoku
Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells are filled with the character '.'. A partially filled su...
分类:其他好文   时间:2014-11-24 10:09:21    阅读次数:208
JavaScript 上万关键字瞬间匹配——借助Hash表快速匹配算法
来源:http://www.cnblogs.com/index-html/archive/2013/04/17/js_keyword_match.htmlhttp://www.etherdream.com/funnyscript/Keyword/Keyword.html适用于多关键字、大文本匹配,若...
分类:编程语言   时间:2014-11-23 22:56:40    阅读次数:272
sql优化
1. 常用的数据建视图,尽量减少group by,order by,update等查法; 2. 建立合理的索引; 3. 先做选择和投影,最后再连接操作(投影就是从所给的表中,选出需要的列;选择就是选出所需的行); 4. in换成exists,in是把外表和内表作hash连接,而exists是对外表作loop循环,每次loop循环再对内表进行查询,也就是子查询表大的用exists,子查询表小的...
分类:数据库   时间:2014-11-23 09:25:06    阅读次数:197
memcache原理及安装
Memcached是一个高性能的分布式的内存对象缓存系统,目前全世界不少人使用这个缓存项目来构建自己大负载的网站,来分担数据库的压力,通过在内存里维护一个统一的巨大的hash表,它能够用来存储各种格式的数据,包括图像、视频、文件以及数据库检索的结果等。简单的说就是将数据调用到内存中,然后从内存中读取,从而大大提高读取速度。(注: 摘自百度全科)...
分类:系统相关   时间:2014-11-22 18:53:39    阅读次数:203
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!