码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
hdu 1387 Team Queue (链表)
题目大意: 不同的人在不同的队伍里,插入链表的时候如果这个链表里有他的队友,就把它放到最后一个队友的最后,如果没有队友,就把它放到整个链表的最后面。 出链表的时候把第一个人拿出来。 思路分析: 要模拟这个链表就要记录这整个链表中的队伍存在的情况。 所以要再开一个链表的头指针和尾指针,在整个大的链表中再模拟小区域的链表。 然后就是deque部分,也就是注意head的判断以及更新。...
分类:其他好文   时间:2014-06-18 12:31:46    阅读次数:154
asp.net ef5 left join 的实现
最近在网上查找了很多的ef5实现left join的方法,很遗憾没有找到满意的结果,经过自己的研究终于发现了点眉目,所以分享一下 EF5: var x = ef.SYS_MODULE.GroupJoin(ef.SYS_ROLEMODULES, m => m.MKID, n => n.MKID, (w, c) => new { A = c, v = w }); 说明:上...
分类:Web程序   时间:2014-06-18 12:16:35    阅读次数:283
Generate Parentheses
题目 Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: "((()))", "(()())", "(())()", "()...
分类:其他好文   时间:2014-06-17 22:59:06    阅读次数:223
getAttribute for IE7
getAttribute  大部分介绍都说只有一个,包括w3cschool 其实这个方法有两个参数! msdn 上查到的!我就不翻译了,因为看英文是最好的! Syntax object.getAttribute(strAttributeName, lFlags) Parameters strAttributeName [in] Type: String...
分类:其他好文   时间:2014-06-17 22:58:25    阅读次数:215
快排模板
#include #include #include #include #include #include #include using namespace std; int num[9] = {7,10,19,25,12,17,21,30,48}; void quicksort(int sta,int ed){ int i = sta,j = ed,x = num[sta]...
分类:其他好文   时间:2014-06-17 22:54:27    阅读次数:352
Spring DI基础实例解析
1.        在程序中提供需要依赖Spring为其注入属性的属性名和类型 package com.hao947.ioc; public class UserService { private String name; private String year; public void setName(String name) { this.name = name; } pub...
分类:编程语言   时间:2014-06-17 22:29:58    阅读次数:362
JAVA web四种属性范围总结
首先必须要了解客户端跳转和服务器端跳转的区别: 客户端跳转: response.sendRedict(String path),地址栏发生改变。不能传递request属性。 服务器端跳转: 地址栏不发生改变。能传递request属性。 request属性范围: 只有在服务器端跳转以后,所有设置的内容才会停留下来。 session属性范围:  不管是客户端跳转还是服务器端跳转,只要是是属性设...
分类:编程语言   时间:2014-06-17 22:27:29    阅读次数:331
Spring Assert断言 (方法入参检测工具类-断言)
Web 应用在接受表单提交的数据后都需要对其进行合法性检查,如果表单数据不合法,请求将被驳回。类似的,当我们在编写类的方法时,也常常需要对方法入参进行合 法性检查,如果入参不符合要求,方法将通过抛出异常的方式拒绝后续处理。举一个例子:有一个根据文件名获取输入流的方法:InputStream getData(String file),为了使方法能够成功执行,必须保证 file 入参不能为 null 或空白字符,否则根本无须进行后继的处理。这时方法的编写者通常会在方法体的最前面编写一段对入参进行检测的代码,如下...
分类:编程语言   时间:2014-06-17 22:20:55    阅读次数:281
Valid Parentheses
题目 Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" and "()[]{}" ...
分类:其他好文   时间:2014-06-17 21:34:00    阅读次数:189
BASH 文本模版的简单实现 micro_template_compile
具体代码 ############################### # # Funciton: micro_template_compile # # Parameter: # [1] => template :String # [2..n] => values for placeholder as key=value # # Example: # <- micro_tem...
分类:其他好文   时间:2014-06-17 16:23:47    阅读次数:172
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!