2015年1月16日

SQL 查询结果按参数顺序排列

摘要: SELECT * FROM Project_Business_Type WHERE Id in (10,25,5,4,15,46,74,500)order by charindex(','+ltrim(Id)+',', ',10,25,5,4,15,46,74,500,') 这里查询出来的结果就是... 阅读全文

posted @ 2015-01-16 13:34 战马 阅读(492) 评论(0) 推荐(0)

2014年11月20日

JS 时间戳转化为时间格式

摘要: function getLocalTime(nS) { return new Date(parseInt(nS)).toLocaleString().replace(/:\d{1,2}$/, ' ').replace("年", '-').replace("月", '-').... 阅读全文

posted @ 2014-11-20 10:56 战马 阅读(212) 评论(0) 推荐(0)

2014年10月9日

angular 测试

摘要: describe('Controllers: CheckListOverCtrl', function () { var $scope, ctrl, $httpBackend; var data = []; data.d = [{ name: 'name1', ProjectNam... 阅读全文

posted @ 2014-10-09 14:57 战马 阅读(318) 评论(0) 推荐(0)

2014年8月6日

拼接字符串 去除所有可能的重复

摘要: 比如拼接2个页面的某信息A页面 : 1、2、3、4、5B页面: 2、3、4、5、6、拼接后 只需要 1、2、3、4、5、6 不需要 1、2、2、3、3、4、4、5、5、6 var geoCoords = worldfoot.Replace(" ", "").Rep... 阅读全文

posted @ 2014-08-06 16:15 战马 阅读(271) 评论(0) 推荐(0)

2014年8月5日

npoi

摘要: NPOI可以很方便的读取写入EXCEL,且对客户机没有要求读取excel的实例代码 1 using (FileStream file = new FileStream("可约医院列表(网址).xls", FileMode.Open, FileAccess.Read))//参数为地址和打开方式操作方... 阅读全文

posted @ 2014-08-05 10:46 战马 阅读(504) 评论(2) 推荐(0)

2014年8月4日

爬虫

摘要: 爬虫,该实例 从挂号网按医院->科室->医生列表->医生详细获取医生的详细信息。 WebClient rootpage = new WebClient(); rootpage.Encoding = Encoding.UTF8; rootpage.BaseA... 阅读全文

posted @ 2014-08-04 14:32 战马 阅读(222) 评论(0) 推荐(0)

2014年6月27日

sql server 2008 评估期已过

摘要: 开始-->所有程序-->Microsoft SQL Server 2008-->配置工具-->SQL Server 安装中心-->维护-->版本升级,接着按照提示一直点下一步,到产品密钥的时候输入-----开发版: PTTFM-X467G-P7RH2-3Q6CG-4DMYB -----企业版: JD... 阅读全文

posted @ 2014-06-27 16:49 战马 阅读(131) 评论(0) 推荐(0)

2014年6月19日

Log4Net

摘要: //参数化 //日志格式 阅读全文

posted @ 2014-06-19 15:34 战马 阅读(126) 评论(0) 推荐(0)

开发各类小技巧

摘要: //此方法能得到你想要的小数点后位数double percent=Convert.ToDouble(2)/Convert.ToDouble(34);string result=string.Format("{0:0.00%}",percent);//得到5.88%string result=stri... 阅读全文

posted @ 2014-06-19 14:07 战马 阅读(207) 评论(0) 推荐(0)

导航