码迷,mamicode.com
首页 >  
搜索关键字:str    ( 67828个结果
The practice program of C on point
//字符反向排列 //vision 1.2 #include void reverse_string( char *str ) { char *string;//第一个字符位置 char *last_char;//最后一个字符位置 //for( last_char = str; ; last_char++ ) // if( *last_char == '\...
分类:其他好文   时间:2014-10-29 22:24:08    阅读次数:254
一个我经常用到的采集网页数据抓取网页获取数据的PHP函数类
//使用方法 $url = 'http://www.xiaodoubi.com'; $data = file_get_contents($url); $get_c_str = new get_c_str; $content = $get_c_str -> get_str($data,'','...
分类:Web程序   时间:2014-10-29 21:24:00    阅读次数:203
jquery中一些常用方法总结
1、EL表达式: EL表达式最常用的场景是前后台传递数据,数据格式通常是字符串和list,范围一般是request,用法如下: 后台java代码: 1 String str = "hello world"; 2 request.setAttribute("str",str); 3 4 List...
分类:Web程序   时间:2014-10-29 21:23:32    阅读次数:180
PHP截取中文字符串方法
方法一:/***截取utf8字符串*@paramstring$str字符串*@paramint$from起始位*@paramint$len结束们*@returnstring*/publicstaticfunctionutf8Substr($str,$from,$len){returnpreg_replace(‘#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,‘.$from.‘}‘.‘((?:[\x00-\x7F]|[\xC0-\xFF..
分类:Web程序   时间:2014-10-29 19:40:22    阅读次数:185
C# string byte转换
C# string byte数组转换之string类型转成byte[]:byte[] byteArray = System.Text.Encoding.Default.GetBytes ( str ); 反过来,byte[]转成string:string str = System.Text.Enco...
分类:Windows程序   时间:2014-10-29 19:20:04    阅读次数:224
c#字符串MD5加密GetMD5Hash
/// /// 把字符转换成MD5 /// /// /// public static string GetMD5Hash(String str) { //把字符串转换成字...
分类:Windows程序   时间:2014-10-29 19:13:17    阅读次数:280
php中接收参数,不论是来自GET还是POST方法
不多说,直接上代码,其实也就是先用GET的方法去获取,如果值为空,在用POST方法去获取写下来是为了方便和备忘function getParam($str){ if ( isset($_GET[$str]) ) $t_Val = trim($_GET[$str]); else i...
分类:Web程序   时间:2014-10-29 19:11:10    阅读次数:185
python中eval, exec, execfile,和compile
eval(str [,globals [,locals ]])函数将字符串str当成有效Python表达式来求值,并返回计算结果。同样地, exec语句将字符串str当成有效Python代码来执行.提供给exec的代码的名称空间和exec语句的名称空间相同.最后,execfile(filename ...
分类:编程语言   时间:2014-10-29 19:06:05    阅读次数:177
简单的ajax请求
今天没啥事,像弄一下ajax请求struts2的小demo,结果遇到一些麻烦,最后发现是一个小问题,先看看我的代码吧(很简单,有什么错误欢迎指出,大家一起学习)首先看一下目录结构struts2包自己在网上能下载到的,web.xml配置: index.jsp str...
分类:Web程序   时间:2014-10-29 18:25:36    阅读次数:188
UVa 455 - Periodic Strings
题目:求一个串的最小循环节。 分析:暴力,字符串。数据量较小,直接使用枚举法。             枚举循环节的长度,匹配判断,找到第一组解即为最小。 说明:(⊙_⊙)。 #include #include #include #include using namespace std; char str[104]; int main() { int n; while (...
分类:其他好文   时间:2014-10-29 17:12:47    阅读次数:161
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!