function setCookie(name,value){ document.cookie = name + "=" + encodeURI(value);}function getCookie(name){ var str = document.cookie; if(!str || str.i...
分类:
其他好文 时间:
2014-12-26 21:41:30
阅读次数:
180
在这篇链接http://blog.csdn.net/while0/article/details/26291855? 里看到这样的代码 const?char*?file_path?=?FileUtils::getInstance()->fullPathForFilename("hello.json").c_str();
log("external?fil...
分类:
其他好文 时间:
2014-12-26 20:26:44
阅读次数:
191
效果:
C#语法整型转字符串
C#转换有如下方法:
1. int num = Convert.ToInt32(字符串); string str= Convert.ToString(数字);
(没有必要,不要用这种方法)
2.intnum = (int)字符串; string str = (string)数字;
3.就是你自己写的方法!
inti=01232456...
原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=1033
#include
#include
using namespace std;
const int MAX = 300;
typedef struct
{
int x,y;
}point;
int main()
{
char str[MAX]=" ";
while(c...
分类:
其他好文 时间:
2014-12-26 18:44:09
阅读次数:
190
输入一个字符串,判断有多少个子串。
输入: asdg ds dga
输出:3
#include
#include
using namespace std;
int num_of_sub(char *str)
{
int len = strlen(str);
int count = 0;
for(i...
分类:
其他好文 时间:
2014-12-26 18:39:50
阅读次数:
185
//将NSData转化为NSString NSString* str = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];//将NSString 转化为NSData(NSString.h)- (NSDat....
分类:
移动开发 时间:
2014-12-26 18:18:11
阅读次数:
190
util=function(){return{$:function(id){returndocument.getElementById(id);},trim:function(str){returnstr.replace(/(^\s+)|(\s+$)/g,"");},len:function(str...
分类:
编程语言 时间:
2014-12-26 18:18:08
阅读次数:
189
写于2014-01-10 。 关键字:字符串比较,结构化编程,单入口/单出口http://acm.hnust.edu.cn/JudgeOnline/problem.php?cid=1081&pid=3问题 D: 大小写不敏感之字符串比较给定两个字符串,判定其是否相等。字符串相等的意义基于类似于str...
分类:
其他好文 时间:
2014-12-26 16:23:29
阅读次数:
145
用jquery编写的分页插件源码function _pager_go(total_page) { var page_str = $("#_pager_textbox").val(); var int_expr = /^(\+|-)?\d+$/; if (!int_expr.test...
分类:
Web程序 时间:
2014-12-26 16:15:05
阅读次数:
147
indexOf 返回字符串中指定字符首次出现的位置 var str="hello, I am Miss bean!"; str.indexOf("l")//结果为2indexOf('l',2) //表示从第2位开始查找l元素首次出现的位置1 var str="hello, I am Miss b.....
分类:
Web程序 时间:
2014-12-26 12:38:44
阅读次数:
170