摘要: publicstaticintDateToTimestamp(DateTimedate){DateTimeorigin=newDateTime(1970,1,1,0,0,0,0);TimeSpandiff=date-origin;inttimestamp=(int)Math.Floor(diff.TotalSeconds);returntimestamp;}publicstaticDateTimeTimestampToDate(doubletimestamp){DateTimeorigin=newDateTime(1970,1,1,0,0,0,0);DateTimedate=origin.Ad 阅读全文
posted @ 2012-04-06 14:05 PointNet 阅读(1225) 评论(0) 推荐(0) 编辑
摘要: Html TO Ubb and Ubb TO Htmlfunctionpattern(str){//str=str.replace(/(\r\n|\n|\r)/ig,'');str=str.replace(/<br[^>]*>/ig,'\n');str=str.replace(/<p[^>\/]*\/>/ig,'\n');str=str.replace(/\[code\](.+?)\[\/code\]/ig,function($1,$2){returnphpcode($2);});str=str.replace 阅读全文
posted @ 2012-04-06 12:44 PointNet 阅读(548) 评论(1) 推荐(1) 编辑