代码改变世界

阅读排行榜

js之string.format()

2011-02-25 10:49 by 小sa, 790 阅读, 收藏,
摘要: 1 function stringFormat() { 2 if (arguments.length == 0) 3 return null; 4 var str = arguments[0]; 5 for (var i = 1; i < arguments.length; i++) { 6 var re = new RegExp('\\{' + (i - 1) + '\\}', 'gm'); 7 str = str.replace(re, arguments[i]); 8 } 9 return str;10 } 11 12 StringF 阅读全文

掩码转换为正则表达式

2012-06-19 10:44 by 小sa, 715 阅读, 收藏,
摘要: bool MatchCheck(string sn,string pattern) { return Regex.IsMatch(sn, pattern, RegexOptions.None); } /// <summary> /// 掩码转换为正则表达式 /// </summary> /// <param name="msk">掩码 CTH********F2GV**</param> /// <param name="token">掩码符号* #</... 阅读全文

读/写byte[] 类型 MS SQL数据库

2012-03-07 13:20 by 小sa, 693 阅读, 收藏,
摘要: //写入流 public void Write(byte[] val) { using (SqlConnection con = new SqlConnection(connectionString)) { con.Open(); using (SqlCommand cmd = new SqlCommand("INSERT INTO Temp_Compress( BinData ) VALUES (@binaryValue)", con)) ... 阅读全文

vsto outlook 检查附件大小

2012-01-12 10:22 by 小sa, 680 阅读, 收藏,
摘要: 1 private Outlook.Explorer _Explorers; 2 3 private Outlook.Inspector _Inspectors; 4 5 double TotalAttachSize; 6 7 private void ThisAddIn_Startup(object sender, System.EventArgs e) 8 9 { 10 11 Outlook.Inspectors inspectors = this.Application.I... 阅读全文

使用VS2010 自定义Web Developer Server

2011-02-16 09:30 by 小sa, 656 阅读, 收藏,
摘要: 使用VS2010 自定义Developer Server服务器调试,每次只需Ctrl+F5 Build without Debug.1.Tool->External ToolsDevelop ServerCommand:C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\WebDev.WebServer40.EXEArguments:/port:9999 /path:$(ProjectDir) 2.自定义bat文件cd \echo offcd C:\Program Files\Common Files\Microso 阅读全文
上一页 1 2 3 4 5 6 7 8 ··· 13 下一页