2012年10月17日
摘要: ALTER FUNCTION [dbo].[XXX]( @list nvarchar(MAX), @delim nchar(1) = ',') RETURNS TABLE AS RETURN WITH csvtbl(debut, fin) AS ( SELECT debut = convert(bigint, 1), fin = charindex(@delim, @list + convert(nvarchar(MAX), @delim)) UNION ALL SELECT debut = fin + 1, fin = charindex(@deli... 阅读全文
posted @ 2012-10-17 21:25 鱼不爱水 阅读(129) 评论(0) 推荐(0)
  2012年4月20日
摘要: 1) [DataMember] public virtual Nullable<DateTime> DelayedDeliveryDate { get; set; }2)if (order.DelayedDeliveryDateForSaveOrUpdate == "") { createOTCOrder.SetParameter("DelayedDeliveryDate", null, NHibernateUtil.DateTi... 阅读全文
posted @ 2012-04-20 16:45 鱼不爱水 阅读(192) 评论(0) 推荐(0)
  2012年3月27日
摘要: window.document.body.addEventListener("touchstart", Application.Main.touchStart, false);window.document.body.addEventListener("touchmove", Application.Main.touchMove, false);window.document.body.addEventListener("touchend", Application.Main.touchEnd, false);touchStart: 阅读全文
posted @ 2012-03-27 16:22 鱼不爱水 阅读(508) 评论(0) 推荐(0)
  2012年3月1日
摘要: 1】首先从webservice 得到的格式是 "2011-01-03T00:00:00"2】function getNewDateFromString(dateValue) { try { if (isUndefinedOrNull(dateValue)) { return new Date(); } else { if ((typeof dateValue) == 'string') { dateValue = (dateValue).replace(/-/g, '/').replace(/T/g, ' '); } retu 阅读全文
posted @ 2012-03-01 21:15 鱼不爱水 阅读(246) 评论(0) 推荐(0)
  2012年2月28日
摘要: 1】冒泡法排列//Implementing a simple bubble sort:Array.prototype.sort = function () { var tmp; for(var i=0;i<this.length;i++) { for(var j=0;j<this.length;j++) { if(this[i]<this[j]) { tmp = this[i]; this[i] = this[j]; this[j] = tmp; } } } }2】根据一个属性进行排列//Implementing a simple sort by pr... 阅读全文
posted @ 2012-02-28 17:27 鱼不爱水 阅读(378) 评论(0) 推荐(0)
  2012年1月5日
摘要: 第一种例子SELECT ROW_NUMBER() OVER (ORDER BY Id) AS Rowinto #tmpFROM PersonDECLARE @beginNumber intset @beginNumber = 1declare @endNumber intselect @endNumber = COUNT(*) from Personwhile(@beginNumber <= @endNumber)begin select Row from #tmp where Row = @beginNumber set @beginNumber = @beginNumber + 1 阅读全文
posted @ 2012-01-05 18:29 鱼不爱水 阅读(248) 评论(0) 推荐(0)
  2011年11月4日
摘要: Date.parseFunctions['WCF'] = '_parseWCF';Date._parseWCF = function(input) { input = input.replace( new RegExp('/Date\\((-?[0-9]+)(?:[a-zA-Z]|(?:\\+|-)[0-9]{4})?\\)/', 'g'), '(new Date($1))'); return eval(input);};//wcf json 时间转换问题 safari 和 firefoxvar WCFDatePa 阅读全文
posted @ 2011-11-04 00:16 鱼不爱水 阅读(229) 评论(0) 推荐(0)
  2011年10月14日
摘要: 1) DetachedCriteria ICriteria query = this.Session.CreateCriteria(typeof(Person)); DetachedCriteria personIds = DetachedCriteria.For(typeof(ServicePerson)) .SetProjection(Projections.Property("PersonId")) .Add(Restrictions.Eq("IsPrincipal", true)); query.Add(Subqueries.PropertyIn 阅读全文
posted @ 2011-10-14 21:01 鱼不爱水 阅读(192) 评论(0) 推荐(0)
  2011年7月21日
摘要: .netreps_oocss .fieldContainer label{ color:#4E4E4E; line-height:33px; text-align:right; font-weight:bolder; padding:3px 3px 0 0; font-size:11px; font-family:arial; margin-right:2px; overflow:hidden; white-space: nowrap;}.netreps_oocss .fieldContainer { background: none repeat scroll 0 0 #F3F3F3; bo 阅读全文
posted @ 2011-07-21 20:46 鱼不爱水 阅读(158) 评论(0) 推荐(0)
  2011年7月20日
摘要: self.storeChildrenActivities = new Ext.data.ArrayStore({ // store configs autoDestroy: true, storeId: 'myStore', // reader configs idIndex: 0, fields: [ 'company', {name: 'price', type: 'float'}, {name: 'change', type: 'float'}, {name: 'pctChange&# 阅读全文
posted @ 2011-07-20 15:15 鱼不爱水 阅读(163) 评论(0) 推荐(0)