博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年3月22日

摘要: if (Regex.IsMatch(str,"[0-9]"))//数字 MessageBox.Show("字符串中包含有数字");if (Regex.IsMatch(str,"[a-z]"))//小写字母 MessageBox.Show("字符串中包含有小写字母");if (Regex.IsMatch(str,"[A-Z]"))//大写字母 MessageBox.Show("字符串中包含有小写字母");if (Regex.IsMatch(str,"[a-zA-Z]& 阅读全文

posted @ 2011-03-22 17:24 moss_tan_jun 阅读(271) 评论(0) 推荐(0) 编辑

摘要: /// <summary> /// 最简单的发送邮件实例 /// </summary> /// <param name="title">邮件标题</param> /// <param name="mailReceive">接收有地址</param> /// <param name="content">邮箱内容</param> public void MailSend(string title, string mailReceive,stri 阅读全文

posted @ 2011-03-22 17:08 moss_tan_jun 阅读(217) 评论(0) 推荐(0) 编辑

摘要: 1 static string GetIP()2 {//http://www.ip138.com/ip2city.asp3 Uri uri = new Uri("http://www.ikaka.com/ip/index.asp");4 System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(uri);5 req.Method = "POST";6 req.ContentType = "application/x-www-fo 阅读全文

posted @ 2011-03-22 17:03 moss_tan_jun 阅读(487) 评论(0) 推荐(0) 编辑

摘要: 问题描述: [Excel 源 [1]] 错误: 输出“Excel 源输出”(9) 上的 输出列“Description 3”(546) 出错。返回的列状态是:“文本被截断,或者一个或多个字符在目标代码页中没有匹配项。”。 该列在excel中最长为308个字符,但是excel源中的外部列和输出列最多只能设为Nvarchar(255),如果设定长度超过255,则出现警告,源列属性不匹配,执行也通不过。使用Ntext类型也尝试过,不匹配。 我使用ado.net倒是把它倒入到数据库了,但是发现所有超过255的都被截断了。 原因分析: ADO和SSIS的Excel源对数剧列的长度的判定存在问题。解决方案 阅读全文

posted @ 2011-03-22 16:48 moss_tan_jun 阅读(2332) 评论(0) 推荐(0) 编辑

摘要: 附代码:public class WebContent { public WebContent() { } private string Url { get; set; } private string Content { get; set; } public WebContent(string url) { this.Url = url; } public string GetContent(string url)//使用时调用此方法 { ThreadWebBrowser(url); return this.Content; } private void ThreadWebBrowser(s 阅读全文

posted @ 2011-03-22 16:39 moss_tan_jun 阅读(977) 评论(0) 推荐(0) 编辑