08 2011 档案

摘要:public static class ByteHexHelper{ private static char[] _buffedChars = null; private static byte[] _buffedBytes = null; static ByteHexHelper() { _buffedChars = new char[(byte.MaxValue - byte.MinValue + 1) * 2]; int idx = 0; byte b = byte.MinValue; while (true... 阅读全文
posted @ 2011-08-29 00:46 ahui 阅读(7067) 评论(0) 推荐(0)
摘要:function resizeImage(image, max) { if (Math.max(image.width, image.height) > max) { if (image.width > image.height) image.width = max; else image.height = max; } return true;} <img onload="var max=64;if(Math.max(this.width,this.height)>max){if(this.width>this.height)this.width=ma 阅读全文
posted @ 2011-08-18 14:46 ahui 阅读(835) 评论(0) 推荐(0)
摘要:EF通用的分页实现:/// <summary>/// 根据条件分页获得记录/// </summary>/// <param name="where">条件</param>/// <param name="orderBy">排序</param>/// <param name="ascending">是否升序</param>/// <param name="pageIndex">当前页码</param> 阅读全文
posted @ 2011-08-04 14:03 ahui 阅读(23297) 评论(19) 推荐(6)