随笔分类 - Library
some useful codes.
摘要:JavaScript验证正则表达式大全匹配中文字符的正则表达式: [\u4E00-\uFA29]评注:匹配中文还真是个头疼的事,有了这个表达式就好办了匹配双字节字符(包括汉字在内):[^x00-xff]评注:可以用来计算字符串的长度(一个双字节字符长度计2,ASCII字符计1)匹配空白行的正则表达式:ns*r评注:可以用来删除空白行匹配HTML标记的正则表达式:< (S*?)[^>]*>.*?|< .*? />评注:网上流传的版本太糟糕,上面这个也仅仅能匹配部分,对于复杂的嵌套标记依旧无能为力匹配首尾空白字符的正则表达式:^s*|s*$评注:可以用来删除行首行尾的
阅读全文
摘要:1. 刷新F5 location.reload(false);2. 强制刷新Ctrl+F5 location.reload(true);3. 重新加载(相当输入地址回车) location.replace(window.location.href);
阅读全文
摘要:declare@pdtidnvarchar(50)declare@ptypenvarchar(50) declare my_cursor CURSORforselect pdtid,ptype from dbo.Productopen my_cursorfetchnextfrom my_cursorinto@pdtid,@ptypewhile@@fetch_status=0begin fetchnextfrom my_cursorendclose my_cursor
阅读全文
摘要:using System;using System.Data;using System.Data.SqlClient;using System.Configuration;using System.Text;using System.Collections.Generic;using System.Diagnostics;///<summary>/// DBHelper 的摘要说明///</summary>namespace DAL{ publicstaticclass DBHelper { privatestatic SqlConnection conn; //定..
阅读全文

浙公网安备 33010602011771号