码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
Manacher算法--O(n)内求回文子串
昨天做了leetcode里的     Longest Palindromic Substring ,一开始用动态规划O(N^2),不管怎么改都超时了。。。于是在大神的帮助下,找到了传说中的Manacher算法,居然能在O(n)内求出来,瞬间给跪了。 本屌认为,这个算法主要是充分的利用了以前的匹配的结果,来起到了降低时间复杂度的作用,这点跟KMP算是有点类似。在预处理时有个小技巧就是将第0,1为设...
分类:其他好文   时间:2014-06-20 12:15:22    阅读次数:305
NSDate NSTimerZone 时区转换
timeZoneAbbreviation = @“America/New_York”;#pragma mark - 转换时区- (NSDate *) convertDate:(NSDate *) date toTimeZone:(NSString *) timeZoneAbbreviation { ...
分类:其他好文   时间:2014-06-07 07:46:59    阅读次数:183
使用SqlBulkCopy, 插入整个DataTable中的所有数据到指定数据库中
string sql="";dbhelper.ExecuteNonQuery(sql);DataTable dt = dbhelper.GetDataTable(sql);if (dt != null && dt.Rows.Count > 0){ SqlBulkCopy bcp = new SqlB...
分类:数据库   时间:2014-06-07 07:17:20    阅读次数:229
C#中简单的写日志的方法
public static void WriteLog(string msg) { string appPath = AppDomain.CurrentDomain.BaseDirectory; string ServerPath = appPath + @"\Log" + DateTime.No....
分类:其他好文   时间:2014-06-07 07:15:18    阅读次数:292
spring3+mybatis3+mysql
玩了一下mybatis,网上源码说的不太清楚。自己写了一下。希望对大家有用(spring3+mybatis3+mysql)实体类:package org.my.entity;public class User { private Integer id; private String na...
分类:数据库   时间:2014-06-07 07:14:07    阅读次数:318
Flex的自定义事件(组件)的那些事儿
Demo:Login1.创建一个UserLogin类。package com{ [Bindable] public class UserLogin { public var logUserNam:String=""; //用户名 public va...
分类:其他好文   时间:2014-06-07 06:57:42    阅读次数:235
页面的打开一个新的网页 popus.js界面
StringBuilder s = new StringBuilder(); s.Append(""); Type cstype = this.GetType(); ClientScriptManager cs = Page.ClientScript; string sname = "lt"; if...
分类:Web程序   时间:2014-06-07 06:54:53    阅读次数:318
Format string is not a string literal (potentially insecure)
Warning: Format string is not a string literal (potentially insecure)[objc]view plaincopyNSString*str=nil;str=[NSStringstringWithFormat:@"---%d---",18...
分类:其他好文   时间:2014-06-07 06:52:53    阅读次数:263
RSA加密(跨平台通用的)
1 /// 2 /// RSA加密 3 /// 4 /// 5 /// 6 /// 7 public string RsaEncrypt(string strPublickey, s...
分类:其他好文   时间:2014-06-07 06:50:15    阅读次数:192
[转].net 缩略图方法
本文转自:http://www.cnblogs.com/promic/archive/2010/04/21/1717190.htmlprivate static string strConnect = System.Configuration.ConfigurationManager.AppSett...
分类:Web程序   时间:2014-06-07 06:26:52    阅读次数:241
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!