摘要: Lookahead and Lookbehind Zero-Width AssertionsPerl 5 introduced two very powerful constructs: "lookahead" and "lookbehind". Collectively, these are called "lookaround". They are also called "zero-width assertions". They are zero-width just like thestart and en 阅读全文
posted @ 2011-07-03 15:30 cnbwang 阅读(278) 评论(1) 推荐(0) 编辑
摘要: public string CreateJsonParameters(DataTable dt) { /* /**************************************************************************** * Without goingin to the depth of the functioning of this Method, i will try to give an overview * As soon as this method gets a DataTable it starts to convert it into. 阅读全文
posted @ 2011-07-03 15:21 cnbwang 阅读(343) 评论(0) 推荐(0) 编辑
摘要: static void SaveMSIToTxt(string fileNameSoucre, string fileNameDest) { byte[] bytes = System.IO.File.ReadAllBytes(fileNameSoucre); string str = Convert.ToBase64String(bytes); System.IO.File.WriteAllText(fileNameDest, str); } static void ExtractMSIFromTxt(string txtFileName, string msiFileName) { st. 阅读全文
posted @ 2011-07-01 09:53 cnbwang 阅读(197) 评论(3) 推荐(0) 编辑
摘要: This article is about the DI of spring.net.The underlying statement demonstrates how the spring.net works.First:Config your fileApp.config as follows.View Code <?xml version="1.0" encoding="utf-8" ?><configuration> <configSections> <sectionGroup name="sp 阅读全文
posted @ 2011-06-28 08:50 cnbwang 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Method 1.According to the abstract class of ADO.NET,accomplish the core code of ADO.NET,named DBHelper.Then generate a concrete database ADO.NET object using factory,as the below showing.public class DBHelper { //获取数据库类型 private static string strDbType = CommonUtils.GetConfigValueByKey("dbType& 阅读全文
posted @ 2011-06-26 07:44 cnbwang 阅读(431) 评论(0) 推荐(0) 编辑
摘要: If you have been using the new Visual Studio 2005 beta you have noticed a few new files showing up in the "bin" folder with the word "vshost" in the filename. For example, when you create a new WindowsApplication and hit F5, you may notice files named "WindowsApplication1.vs 阅读全文
posted @ 2011-06-08 08:27 cnbwang 阅读(193) 评论(1) 推荐(0) 编辑
摘要: Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); config.AppSettings.Settings["code"].Value = DateTime.Now.ToString(); config.ConnectionStrings.ConnectionStrings["orgcon"].ConnectionString = DateTime.Now.ToString(); config.Save(); Conf 阅读全文
posted @ 2011-06-08 08:14 cnbwang 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Text; 4 using System.Reflection; 5 using System.Data; 6 using System.Data.SqlClient; 7 using System.Data.Common; 8 namespace Attr 9 { 10 class Program 11 { 12 static void Main(string[] args) 13 { 14 15 Inventory inv = new Inventory(. 阅读全文
posted @ 2011-06-06 10:32 cnbwang 阅读(434) 评论(0) 推荐(0) 编辑
摘要: If you are anything like me (and I fear that you are) then this is your experience with JSON so far:Two months ago you'dneverheard of JSONOne month ago you'd heardtheterm but paid no attentionOne week ago you'd heard it mentioned a few times and started to think,right... some more crap t 阅读全文
posted @ 2011-05-27 08:04 cnbwang 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 在ASP.NET的生命周期走到Render阶段,Page.ProcessMain方法会调用Page的RenderControl方法,RenderControl方法会调用RenderControlInternal,RenderControlInternal根据该空间否是有ControlAdapter调用不同的呈现方法。RenderControlInternal的方法原型如下: privatevoidRenderControlInternal(HtmlTextWriterwriter,ControlAdapteradapter){if(adapter!=null){adapter.BeginRen 阅读全文
posted @ 2011-05-20 08:03 cnbwang 阅读(1234) 评论(3) 推荐(0) 编辑