码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
CheckBox控件
前台代码:1 2 3 4 5 6 后台代码: 1 /// 2 /// Button单击事件 3 /// 4 /// 5 /// 6 protected void Button2_Click(object sender, EventArgs e) 7 { 8 string s = st...
分类:其他好文   时间:2015-01-31 00:08:30    阅读次数:186
JAVA学习--集合的遍历
1 @Test 2 public void testFor3(){ 3 String[] str = new String[]{"AA","BB","DD"}; 4 for(String s : str){ 5 s = "MM";/...
分类:编程语言   时间:2015-01-31 00:05:00    阅读次数:160
利用itextsharp导出pdf
在项目中,客户要求把一些表格导出pdf格式,在网上找了好久终于发现一个完美的解决方案,利用itextsharp可以很方便的导出pdf文件,不说太多了,直接上图,有图有真相 首先是页面图片 然后是导出的pdf图片 导出pdf代码如下:  //导出Mold pdf文档         public void exportpdf_Mold(string quotenum, st...
分类:其他好文   时间:2015-01-30 22:57:12    阅读次数:539
Swift中返回字符串的宽度
最近在用swift 开发软件,但是iOS8要求更加严格,以前获取字符串的宽度的方法,都不能用,自己写了个,虽然很简单,但是希望和大家分享。 // MARK:返回字符串的宽度 func returnWidth(string:NSString) -> CGFloat { let size: CGSize = string.sizeWithAttrib...
分类:编程语言   时间:2015-01-30 22:53:25    阅读次数:889
hdu4821 String 字符串hash(bkdrhash)
题意:给定m,l,一个字符串str。 我们定义一个子串为"recoverable”串 当 1、长度为 M*L 2、把这个好串分成M段,每段长度为L,且每段各不相同。 求“recoverable”串的个数,串相同位置不同也算不同。 思路:预处理数组hash,hash[i]表示从i位置到尾的字符串hash值。这里数组为unsigned long long型,因为可以自动取模。然后枚举 ...
分类:其他好文   时间:2015-01-30 22:48:49    阅读次数:301
acdream 1116 Gao the string!
分析:实际上,我们用next[i]表示 T[i-n] 和T[1-n]的最长公共前缀,那么a[i]=next[i] +next[i+1]...... +next[n];  最长公共前缀(lcp)有3种方法 : 扩展kmp  ,hash 和后缀数组 。 方法一  :扩展kmp  //#pragma comment(linker, "/STACK:102400000,102400000") ...
分类:其他好文   时间:2015-01-30 22:45:56    阅读次数:318
一天一段scala代码(四)
一天一段scala代码(四)        为了更好的驾驭spark,最近在学习scala语言特性,主要看《快学scala》,顺便把一些自己认为有用的代码记下来。 package examples object Example4 { def main(args: Array[String]) { //不可变Map val...
分类:其他好文   时间:2015-01-30 22:45:37    阅读次数:226
HibernateTemplate 查询原生sql及ljava.lang.object cannot be cast to
/** * 使用sql语句进行查询操作 * @param sql * @return */ public List queryWithSql(final String sql){ List list = hibernateTemplate.executeFind(new Hibe...
分类:数据库   时间:2015-01-30 22:45:07    阅读次数:281
LeetCode --- 17. Letter Combinations of a Phone Number
题目链接:Letter Combinations of a Phone Number Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone...
分类:其他好文   时间:2015-01-30 22:43:16    阅读次数:175
LeetCode --- 20. Valid Parentheses
题目链接: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 "...
分类:其他好文   时间:2015-01-30 22:40:16    阅读次数:227
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!