字典树的应用 单词意义查找-C语言实现 代码段

实现根据单词快速找到对应的解释 /* 字典树应用,快速单词查找 */ const int M = 1000000; char word[1000000][11]; int wp; // 单词列表的下标 struct node{ int

jopen 2015-07-16   1615   0
算法  

Python实现的hash加密小工具 代码段

output file:") while 1: word = raw_input("Enter string: ") hashob.update(word) hashword = hashob.hexdigest()

傻无尽 2016-02-29   6375   0
Python  

PHP敏感词过滤 代码段

$value) { if($value['word']) { $value['word'] = preg_split('/(?word']); $point = & $wordTree;

cp5m 2015-04-23   2277   0
PHP  

通过php的 similar_text函数比较两个字符串的相似性 代码段

通过php的 similar_text函数比较两个字符串的相似性 $word2compare = "stupid"; $words = array( 'stupid', 'stu and pid', 'hello'

cf46d 2015-01-31   1788   0
PHP  

python实现马耳可夫链算法 代码段

split() for word in words: statetab.setdefault((w1, w2),[]).append(word) w1, w2 = w2, word # add tail

ex7n 2015-09-13   770   0
Python  

php实现简单的源码语法高亮函数 代码段

indicates a word boundary, so only the distinct ** word "web" is matched, and not a word partial like

cf46d 2015-01-31   1212   0
PHP  

php实现简单的语法高亮函数 代码段

indicates a word boundary, so only the distinct ** word "web" is matched, and not a word partial like

jphp1 2015-05-11   1173   0
PHP  

jpeg转bmp实现c代码 代码段

typedef unsigned char BYTE; typedef unsigned short WORD; typedef int HFILE; typedef CHAR *LPSTR, *PSTR;

e2ex 2015-05-14   2044   0
C/C++  

Apache Commons Lang包的常用方法总结 代码段

import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java

fpy7 2015-01-06   6813   0
Java  

android 文件浏览器实现 代码段

import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io

cd33 2015-03-28   5427   0
Android  

ApachePOI 动态列表生成excel 代码段

先创建导出Excel的工具类,并带泛型,实体一定要生成属性的get方法,就是普通的Javabean,后面的就是个人发挥了,废话不多说,直接上代码: public class ExportExcel

xg48 2015-04-12   2675   0

PHP搜索和高亮字符串中的关键字 代码段

foreach($split_words as $word) { $color = "#4285F4"; $text = preg_replace("|($word)|Ui" , "

mf6w 2015-08-09   887   0
PHP  

C++从文件中按照单词读取内容 代码段

"就停止读取,返回的内容存取在vector中 //read data from the file, Word By Word //when used in this manner, we'll get space-delimited

bcf2 2015-05-18   1303   0
C/C++  

iOS之数据请求NSURLConnection 代码段

168.1.1:8080/lcsUrl"; //如果网址中有汉字,需要先转码 NSString *word = [NSString stringWithUTF8String:"汉字"];//注意此处到字符串要求传一个c的字符串,没有@

ngmm 2015-06-07   1768   0
IOS  

101个LINQ示例,包含几乎全部操作 代码段

(var d in shortDigits) { Console.WriteLine("The word {0} is shorter than its value.", d); } } Projection

ggkwk 2015-07-09   1163   0
C#  

C++ 简单SOCKET 通信 代码段

//监听端: void WINAPI StartToListen(void (*p)()) { WORD wVersionRequested; WSADATA wsaData; int err; wVersionRequested

m47c 2015-09-20   4211   0
C#  

VC++实现获取进程端口检测木马 代码段

GetIP(TCPExTable->table[i].dwLocalAddr), htons( (WORD) TCPExTable->table[i].dwLocalPort)); sprintf( szRemoteAddress

jopen 2015-06-30   995   0
C/C++  

一个很好的PHP验证类 代码段

chr(191)."]{1}[".chr(128)."-".chr(191)."]{1}){1}/",$word) == true || preg_match("/([".chr(228)."-".chr(233)

mmxn 2015-05-20   1163   0
PHP  

python在线抓取百度词典的翻译结果翻译单词 代码段

_get_html_sourse(self): word=argv[1] if len(argv)>1 else '' url="http://dict.baidu.com/s?wd=%s&tn=dict" % word self.h

pycct 2015-06-09   2092   0
Python  

python 多线程优先队列Queue 代码段

the queue queueLock.acquire() for word in nameList: workQueue.put(word) queueLock.release() # Wait for

pythopen 2015-05-14   4285   0
Python  
1 2 3 4 5 6 7 8 9 10