<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>欢迎来到iCOLIN的Blog - 编程心得</title><link>http://blog.csdn.net/icolin/category/195501.aspx</link><description>在编程实践中的一点小收获</description><dc:language>zh-CN</dc:language><lastUpdateTime>Thu, 27 Mar 2008 09:49:00 GMT</lastUpdateTime><ttl>60</ttl><item><dc:creator>iCOLIN</dc:creator><title>linux下JAVA开发环境的安装 </title><link>http://blog.csdn.net/icolin/archive/2006/11/05/1367290.aspx</link><pubDate>Sun, 05 Nov 2006 11:59:00 GMT</pubDate><guid>http://blog.csdn.net/icolin/archive/2006/11/05/1367290.aspx</guid><wfw:comment>http://blog.csdn.net/icolin/comments/1367290.aspx</wfw:comment><comments>http://blog.csdn.net/icolin/archive/2006/11/05/1367290.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/icolin/comments/commentRss/1367290.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1367290</trackback:ping><description>linux下JAVA开发环境的安装 &lt;img src ="http://blog.csdn.net/icolin/aggbug/1367290.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>iCOLIN</dc:creator><title>模拟Windows选项卡</title><link>http://blog.csdn.net/icolin/archive/2006/09/29/1304948.aspx</link><pubDate>Fri, 29 Sep 2006 07:45:00 GMT</pubDate><guid>http://blog.csdn.net/icolin/archive/2006/09/29/1304948.aspx</guid><wfw:comment>http://blog.csdn.net/icolin/comments/1304948.aspx</wfw:comment><comments>http://blog.csdn.net/icolin/archive/2006/09/29/1304948.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/icolin/comments/commentRss/1304948.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1304948</trackback:ping><description>模拟Windows选项卡&lt;img src ="http://blog.csdn.net/icolin/aggbug/1304948.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>iCOLIN</dc:creator><title>sed的神奇</title><link>http://blog.csdn.net/icolin/archive/2006/09/19/1247184.aspx</link><pubDate>Tue, 19 Sep 2006 17:43:00 GMT</pubDate><guid>http://blog.csdn.net/icolin/archive/2006/09/19/1247184.aspx</guid><wfw:comment>http://blog.csdn.net/icolin/comments/1247184.aspx</wfw:comment><comments>http://blog.csdn.net/icolin/archive/2006/09/19/1247184.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/icolin/comments/commentRss/1247184.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1247184</trackback:ping><description>最近想自定义一个《蛤蟆背单词》的单词本，不料生成的文本不合标准，使我很伤脑筋。经过N多失败以后(包括使用Excel,利用正则表达式...)，想起了 sed,简单的两句话大功告成，太神奇了！&lt;img src ="http://blog.csdn.net/icolin/aggbug/1247184.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>iCOLIN</dc:creator><title>把java程序作成windows　EXE程序或windows服务－－－经典总结</title><link>http://blog.csdn.net/icolin/archive/2006/09/18/1236844.aspx</link><pubDate>Mon, 18 Sep 2006 12:14:00 GMT</pubDate><guid>http://blog.csdn.net/icolin/archive/2006/09/18/1236844.aspx</guid><wfw:comment>http://blog.csdn.net/icolin/comments/1236844.aspx</wfw:comment><comments>http://blog.csdn.net/icolin/archive/2006/09/18/1236844.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/icolin/comments/commentRss/1236844.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1236844</trackback:ping><description>把java程序作成windows　EXE程序或windows服务－－－经典总结&lt;img src ="http://blog.csdn.net/icolin/aggbug/1236844.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>iCOLIN</dc:creator><title>字符串操作</title><link>http://blog.csdn.net/icolin/archive/2006/08/29/1137599.aspx</link><pubDate>Tue, 29 Aug 2006 15:52:00 GMT</pubDate><guid>http://blog.csdn.net/icolin/archive/2006/08/29/1137599.aspx</guid><wfw:comment>http://blog.csdn.net/icolin/comments/1137599.aspx</wfw:comment><comments>http://blog.csdn.net/icolin/archive/2006/08/29/1137599.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/icolin/comments/commentRss/1137599.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1137599</trackback:ping><description>一、字符串格式
前导0的输出：
int x=5;
string str=x.ToString("D8");
//str="00000005"
二、字符串函数
取子字符串：
string str="123456789";
str=str.Substring(1,2);
//str="23"
查找子字符串的位置：
string str="123456789";
int index=str.IndexOf("3",0,str.Length);
//index=2

三、指定进制字符串转换为数字

string str="FF";

int i=Convert.ToInt32(str,16);

//i=255

string str="00000011";

int i=Convert.ToInt32(str,2);

//i=3

&lt;img src ="http://blog.csdn.net/icolin/aggbug/1137599.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>iCOLIN</dc:creator><title>日期时间相关操作</title><link>http://blog.csdn.net/icolin/archive/2006/08/29/1137591.aspx</link><pubDate>Tue, 29 Aug 2006 15:50:00 GMT</pubDate><guid>http://blog.csdn.net/icolin/archive/2006/08/29/1137591.aspx</guid><wfw:comment>http://blog.csdn.net/icolin/comments/1137591.aspx</wfw:comment><comments>http://blog.csdn.net/icolin/archive/2006/08/29/1137591.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/icolin/comments/commentRss/1137591.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1137591</trackback:ping><description>当前日期时间的获取：
　　DateTime  datetime1=DateTime.Now;
　　日期时间的运算：
　　string  str1=(datetime1.AddYears(1)).ToString();//加年份
　　string  str1=(datetime1.AddMonths(1)).ToString();//加月份
　　string  str1=(datetime1.AddDays(1)).ToString();//加日期
　　string  str1=(datetime1.AddHours(1)).ToString();//加小时
　　string  str1=(datetime1.AddMinutes(1)).ToString();//加分
　　string  str1=(datetime1.AddSeconds(1)).ToString();//加秒
　　string  str1=(datetime1.AddMilliseconds(1)).ToString();//加毫秒
　　string  str1=(datetime1.AddYe&lt;img src ="http://blog.csdn.net/icolin/aggbug/1137591.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>iCOLIN</dc:creator><title>常用的正则表达式及符号诠释</title><link>http://blog.csdn.net/icolin/archive/2006/08/29/1137585.aspx</link><pubDate>Tue, 29 Aug 2006 15:49:00 GMT</pubDate><guid>http://blog.csdn.net/icolin/archive/2006/08/29/1137585.aspx</guid><wfw:comment>http://blog.csdn.net/icolin/comments/1137585.aspx</wfw:comment><comments>http://blog.csdn.net/icolin/archive/2006/08/29/1137585.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/icolin/comments/commentRss/1137585.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1137585</trackback:ping><description>常用的正则表达式及符号诠释
在脚本程序的写作中，正则表达式是经常用到的，但是正则表达式书写困难，可读性很差也是大家所知道的，今天写email的正则表达式时，由于经常写不对，后来决定gg一下，看看网上有没有现成的，结果发现网上已经提供了很多的常用的正则表达式了，不需要自己写的，而且应该是验证过的吧。

匹配中文字符的正则表达式： [\u4e00-\u9fa5]
匹配双字节字符(包括汉字在内)：[^\x00-\xff]
匹配空行的正则表达式：\n[\s| ]*\r
匹配HTML标记的正则表达式：/.*|/
匹配首尾空格的正则表达式：(^\s*)|(\s*$)
匹配Email地址的正则表达式：\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
匹配网址URL的正则表达式：^[a-zA-z]+://(\\w+(-\\w+)*)(\\.(\\w+(-\\w+)*))*(\\?\\S*)?$
匹配帐号是否合法(字母开头，允许5-16字节，允许字母数字下划线)：^[a-zA-Z][a-zA-Z0-9_]{4,15}$
匹配国内电话号码：(\d&lt;img src ="http://blog.csdn.net/icolin/aggbug/1137585.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>iCOLIN</dc:creator><title>用asp.net画饼图</title><link>http://blog.csdn.net/icolin/archive/2006/08/13/1058366.aspx</link><pubDate>Sun, 13 Aug 2006 16:18:00 GMT</pubDate><guid>http://blog.csdn.net/icolin/archive/2006/08/13/1058366.aspx</guid><wfw:comment>http://blog.csdn.net/icolin/comments/1058366.aspx</wfw:comment><comments>http://blog.csdn.net/icolin/archive/2006/08/13/1058366.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/icolin/comments/commentRss/1058366.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1058366</trackback:ping><description>用asp.net画饼图&lt;img src ="http://blog.csdn.net/icolin/aggbug/1058366.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>iCOLIN</dc:creator><title>C#小技巧</title><link>http://blog.csdn.net/icolin/archive/2006/08/09/1040333.aspx</link><pubDate>Wed, 09 Aug 2006 08:24:00 GMT</pubDate><guid>http://blog.csdn.net/icolin/archive/2006/08/09/1040333.aspx</guid><wfw:comment>http://blog.csdn.net/icolin/comments/1040333.aspx</wfw:comment><comments>http://blog.csdn.net/icolin/archive/2006/08/09/1040333.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/icolin/comments/commentRss/1040333.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1040333</trackback:ping><description>C#小技巧&lt;img src ="http://blog.csdn.net/icolin/aggbug/1040333.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>iCOLIN</dc:creator><title>DataGrid的修改、删除</title><link>http://blog.csdn.net/icolin/archive/2006/08/07/1031450.aspx</link><pubDate>Mon, 07 Aug 2006 11:08:00 GMT</pubDate><guid>http://blog.csdn.net/icolin/archive/2006/08/07/1031450.aspx</guid><wfw:comment>http://blog.csdn.net/icolin/comments/1031450.aspx</wfw:comment><comments>http://blog.csdn.net/icolin/archive/2006/08/07/1031450.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/icolin/comments/commentRss/1031450.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1031450</trackback:ping><description>DataGrid的修改、删除&lt;img src ="http://blog.csdn.net/icolin/aggbug/1031450.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>iCOLIN</dc:creator><title>如何在动态绑定的DropDownlist的最前面加上一个空白项或“全部”</title><link>http://blog.csdn.net/icolin/archive/2006/07/28/991717.aspx</link><pubDate>Fri, 28 Jul 2006 09:54:00 GMT</pubDate><guid>http://blog.csdn.net/icolin/archive/2006/07/28/991717.aspx</guid><wfw:comment>http://blog.csdn.net/icolin/comments/991717.aspx</wfw:comment><comments>http://blog.csdn.net/icolin/archive/2006/07/28/991717.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/icolin/comments/commentRss/991717.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=991717</trackback:ping><description>如何在动态绑定的DropDownlist的最前面加上一个空白项或“全部”&lt;img src ="http://blog.csdn.net/icolin/aggbug/991717.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>iCOLIN</dc:creator><title>用MASM32编写全屏窗口程序</title><link>http://blog.csdn.net/icolin/archive/2006/07/04/873185.aspx</link><pubDate>Tue, 04 Jul 2006 07:09:00 GMT</pubDate><guid>http://blog.csdn.net/icolin/archive/2006/07/04/873185.aspx</guid><wfw:comment>http://blog.csdn.net/icolin/comments/873185.aspx</wfw:comment><comments>http://blog.csdn.net/icolin/archive/2006/07/04/873185.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/icolin/comments/commentRss/873185.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=873185</trackback:ping><description>用MASM32编写全屏窗口程序&lt;img src ="http://blog.csdn.net/icolin/aggbug/873185.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>iCOLIN</dc:creator><title>精妙SQL语句收集</title><link>http://blog.csdn.net/icolin/archive/2006/06/30/854232.aspx</link><pubDate>Fri, 30 Jun 2006 07:30:00 GMT</pubDate><guid>http://blog.csdn.net/icolin/archive/2006/06/30/854232.aspx</guid><wfw:comment>http://blog.csdn.net/icolin/comments/854232.aspx</wfw:comment><comments>http://blog.csdn.net/icolin/archive/2006/06/30/854232.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/icolin/comments/commentRss/854232.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=854232</trackback:ping><description> SQL语句先前写的时候，很容易把一些特殊的用法忘记，我特此整理了一下SQL语句操作，方便自己写SQL时方便一点，想贴上来，一起看看，同时希望大家能共同多多提意见，也给我留一些更好的佳句，整理一份《精妙SQL速查手册》，不吝赐教！&lt;img src ="http://blog.csdn.net/icolin/aggbug/854232.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>iCOLIN</dc:creator><title>编辑某条符合要求的记录并处理下一条</title><link>http://blog.csdn.net/icolin/archive/2006/06/28/846438.aspx</link><pubDate>Wed, 28 Jun 2006 16:53:00 GMT</pubDate><guid>http://blog.csdn.net/icolin/archive/2006/06/28/846438.aspx</guid><wfw:comment>http://blog.csdn.net/icolin/comments/846438.aspx</wfw:comment><comments>http://blog.csdn.net/icolin/archive/2006/06/28/846438.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/icolin/comments/commentRss/846438.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=846438</trackback:ping><description>编辑某条符合要求的记录并能处理下一条&lt;img src ="http://blog.csdn.net/icolin/aggbug/846438.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>iCOLIN</dc:creator><title>将DataGrid的数据直接导入Excel</title><link>http://blog.csdn.net/icolin/archive/2006/05/27/757392.aspx</link><pubDate>Sat, 27 May 2006 11:22:00 GMT</pubDate><guid>http://blog.csdn.net/icolin/archive/2006/05/27/757392.aspx</guid><wfw:comment>http://blog.csdn.net/icolin/comments/757392.aspx</wfw:comment><comments>http://blog.csdn.net/icolin/archive/2006/05/27/757392.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/icolin/comments/commentRss/757392.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=757392</trackback:ping><description>前几天项目中有个地方需要将DataGrid的数据直接导入Excel里，以提供给用户下载，在网上找了下，好像都是与下面代码类似的实现：
程序代码： 

this.EnableViewState   =   false;         
System.Globalization.CultureInfo   myCItrad   =   new   System.Globalization.CultureInfo("ZH-CN",true);
System.IO.StringWriter   oStringWriter   =   new   System.IO.StringWriter(myCItrad);   
System.Web.UI.HtmlTextWriter   oHtmlTextWriter   =   new   System.Web.UI.HtmlTextWriter(oStringWriter);
this.DataGrid1.RenderControl(oHtmlTextWriter);   
Response.Write(oStringWriter&lt;img src ="http://blog.csdn.net/icolin/aggbug/757392.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>