码迷,mamicode.com
首页 >  
搜索关键字:str    ( 67828个结果
iOS开发中提交带有中文或特殊字符串的参数
iOS开发中,与后台进行数据交换是一个很常见的场景。在web开发中,对于我们提交的地址,浏览器会负责进行decode,但是在ios中,必须要自己手动来实现。否则我们拼接出的网址在包括中文、特殊字符串时就会出错。在iOS中的处理方式为: NSString *urlStr = [NSString str...
分类:移动开发   时间:2014-11-05 16:52:34    阅读次数:158
Attribute特性
[AttributeUsage(AttributeTargets.All)]//指定Attribute的使用范围,比如只能在class级别使用public class Column : Attribute{ public Column(string str) { this....
分类:其他好文   时间:2014-11-05 16:44:01    阅读次数:128
gson 的简单使用
生成Json字符串Gson gson = new Gson();List persons = new ArrayList();for (int i = 0; i ps = gson.fromJson(str, new TypeToken>(){}.getType());for(int i = 0;....
分类:其他好文   时间:2014-11-05 14:35:17    阅读次数:112
【原创】取文本中间内容
CString GetMidStr(CString str,CString strL,CString strR){ CString strs; int len; int len2; len = str.Find(strL) + strL.GetLength(); len2 = str.Find(st...
分类:其他好文   时间:2014-11-05 14:20:22    阅读次数:177
Spring MVC 的请求参数获取的几种方法
通过@PathVariabl注解获取路径中传递参数 JAVA1 @RequestMapping(value = "/{id}/{str}")2 public ModelAndView helloWorld(@PathVariable String id,3 @PathVariable String ...
分类:编程语言   时间:2014-11-05 12:56:55    阅读次数:158
hdu-1004
很简单的一道题,就是要我们求出最受大家欢迎的题所对应的气球颜色....... 代码如下: #include #include #include #include using namespace std; char str[1314][20]; int n,cnt[1314]; int main() { while(cin>>n) { if(!n)...
分类:其他好文   时间:2014-11-04 21:12:27    阅读次数:139
net.sf.json.JSONObject 和org.json.JSONObject 的差别
net.sf.json.JSONObject 和org.json.JSONObject ?的差别。 一、创建json对象 String str = "{\"code\":\"0000\", \"msg\":{\"availableBalance\":31503079.02}} org.json.JSONObject: JSONObject json = new JS...
分类:Web程序   时间:2014-11-04 20:00:34    阅读次数:167
POJ-3450 Corporate Identity
枚举一个串的所有子串,和其余的串匹配,裸kmp的题。 #include #include #include using namespace std; const int maxn = 222; const int maxd = 4010; int f[maxn]; char str[maxn]; char t_str[maxn]; char c_str[maxd][maxn]; void ini...
分类:其他好文   时间:2014-11-04 19:39:40    阅读次数:234
miniproject black jack--Fail
第一部分下载这个小项目的程序模板并回顾card类的定义。这个类已经执行了所以你的任务是自己熟悉下代码。开始,通过粘贴card类定义到程序模板中并验证我们的代码如预期那样工作。实现“__init__,__str__,add_card方法在Hand类里面。我们建议建模hand作card列表对象,啥呢,存...
分类:其他好文   时间:2014-11-04 19:17:49    阅读次数:265
常用笔记: 与VBS当中的Mid()类似的substr()小记
VBS当中有Mid函数,一般形式为:Mid(str,start,len) 对应于JS就类似于:str.substr(start,len)不过区别的是:VBS中start从1开始,而JS从0开始. 如果要精简点调用,那么:统一一下形式,删除以上的代码,将其替换为如下:调用:一般使用Delete扩展函数...
分类:其他好文   时间:2014-11-04 19:10:31    阅读次数:142
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!