码迷,mamicode.com
首页 >  
搜索关键字:implement strstr    ( 2381个结果
Socket网络编程--简单Web服务器(4)
上一小节已经实现了对图片的传输,接下来就是判断文件是否为js,css,png等格式。我们增加一个函数用于判断格式 1 int WebServer::get_filetype(char *type,char *path)//用于判断该url指向文件的后缀 2 { 3 if(strstr(p...
分类:Web程序   时间:2014-08-30 03:29:58    阅读次数:432
字符串子串查找strstr
问题:函数名: strstr函数原型:char *strstr(const char *str1, const char *str2);语法:* strstr(str1,str2)str1: 被查找目标 string expression to search.str2: 要查找对象 The stri...
分类:其他好文   时间:2014-08-27 23:25:38    阅读次数:346
LeetCode LRU Cache
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:其他好文   时间:2014-08-27 21:50:28    阅读次数:210
Pow(x, n)
Implement pow( x, n ).思路:利用位运算来求解:当n为正时,其不同位取1,对应乘上x的不同次幂。从低位往高位,按2倍关系增长。该解法需要注意:当n取INT_MIN时,其负值为原值,需要特殊考虑。貌似此处不需要考虑double溢出的情况。另外,网上还有二分递归调用的解法。 1 cl...
分类:其他好文   时间:2014-08-27 12:48:17    阅读次数:186
【Leet Code】String to Integer (atoi) ——常考类型题
String to Integer (atoi)  Total Accepted: 15482 Total Submissions: 106043My Submissions Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases...
分类:其他好文   时间:2014-08-27 01:40:07    阅读次数:293
[LeetCode] Regular Expression Matching(递归)
Implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding element....
分类:其他好文   时间:2014-08-26 22:52:26    阅读次数:203
Regular Expression Matching (LeetCode)
Implement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The...
分类:其他好文   时间:2014-08-25 16:20:54    阅读次数:161
[LeetCode] Implement strStr()
Implement strStr().Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack.class Solution {public: ...
分类:其他好文   时间:2014-08-25 13:11:34    阅读次数:153
[C++]strstr内部实现的不同版本
1.1.Copyright 1990 Software Development Systems, Inc. 1 char*strstr(constchar*s1,constchar*s2) 2 { 3 intlen2; 4 if(!(len2=strlen(s2)))//此种情况下s2不能指向空.....
分类:编程语言   时间:2014-08-24 18:00:42    阅读次数:231
Sdram控制器
/* desctription: this module implement the sdr_sdram timing. the author:lufy yin(wuqingjianke) */`timescale 1ns/1psmodule sdram_io #(parameter DataWid...
分类:其他好文   时间:2014-08-24 12:52:42    阅读次数:208
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!