
随笔
Json1204
这个作者很懒,什么都没留下…
展开
-
js正则
text 中取正则 来用取到的正则判断val() $(function () { $(".pp").blur(function () { var txt = $(this).val(); var reg = /^\d{1}$/;原创 2012-08-03 09:53:57 · 728 阅读 · 0 评论 -
sql统计排名
create table tb(员工姓名 varchar(10),销售金额 int,销售时间 datetime)insert into tb values('员工A', 10 ,'2011-8-3 00:56:01')insert into tb values('员工C', 15 ,'2011-9-1 11:56:01')insert into tb values('员工D', 20原创 2012-08-13 10:40:23 · 3181 阅读 · 0 评论 -
SQL DATEDIFF语法及时间函数 Sql 查询当天、本周、本月记录
--查询当天: select * from info where DateDiff(dd,datetime,getdate())=0 --查询24小时内的: select * from info where DateDiff(hh,datetime,getDate()) --info为表名,datetime为数据库中的字段值 --查询当天原创 2012-08-14 10:59:37 · 3826 阅读 · 0 评论 -
C#的位运算
位运算符:按位与 &按位或 |按位取反 ~左移 右移 >> public static void Main() { int a=6&3; Console.WriteLine("a={0}",a); //6的二进制是00000110,3的二进制是00000011,按位与后等于00000010, 即2。 int b=6原创 2013-07-17 09:43:38 · 666 阅读 · 0 评论 -
通过反射创建实体
Assembly.Load("程序集").CreateInstance("命名空间.类")原创 2013-07-17 09:35:53 · 1265 阅读 · 0 评论 -
页面生命周期
public partial class WebForm1 : System.Web.UI.Page { protected void Page_PreInit(object sender, EventArgs e) { Response.Write("Page_PreInit"); } protect原创 2013-07-03 16:11:12 · 824 阅读 · 0 评论 -
今天有时间戳转换的需求,网上找了半天才找到相关代码,经测试有效,特作此笔记和大家分享
今天有时间戳转换的需求,网上找了半天才找到相关代码,经测试有效,特作此笔记和大家分享!1.时间戳转为C#格式时间 /// /// 时间戳转为C#格式时间 /// /// Unix时间戳格式 /// C#格式时间 public static DateTime GetTime(string原创 2014-04-29 16:29:45 · 975 阅读 · 0 评论 -
字符串表达式计算 (使用DATATABLE)
字符串表达式计算 (使用DATATABLE)原创 2015-02-05 08:35:55 · 760 阅读 · 0 评论