摘要: 一.sql分页:先分页后多表连接查询 declare @row int; select @row=COUNT(*) from BS_Subject where 1=1; SELECT TOP 10 @row as Record, a.*,c.ClassName FROM BS_Subject a l 阅读全文
posted @ 2014-01-08 21:00 阿猫小覃 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 1 List<Exam_Q> listObj = list.Where(n => n.QID == 1).ToList(); 2 if (listObj.Count > 0) 3 { 4 Exam_Q obj = listObj.First(); 5 } 之前一直这样获取集合中的对象,我没想到不符合 阅读全文
posted @ 2013-12-27 17:27 阿猫小覃 阅读(185) 评论(0) 推荐(0) 编辑
摘要: TopSdk.dll(这个在解析用双引号的json的时候,好像有点问题。)Exam_QuesContent[] quest = (Exam_QuesContent[])Jayrock.Json.Conversion.JsonConvert.Import(typeof(Exam_QuesContent[]), json);//json字符串转对象LitJson.dllNewtonsoft.Json.dll 阅读全文
posted @ 2013-11-25 17:37 阿猫小覃 阅读(333) 评论(0) 推荐(0) 编辑
摘要: 需要一个jquery.ajaxfileupload.js,这个文件经过修改,经测试可以在大部分浏览器使用。$.ajaxFileUpload( { url: '/Service/ajaxUpload.aspx?random=' + Math.random() + "&ClassID=" + questionClassId + "&ChapterID=" + questionChapterId + "&AID=" + AIDQuestion, secureuri: false, file... 阅读全文
posted @ 2013-11-11 10:05 阿猫小覃 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 解决办法:1.(适用于.NET)1).通过webconfig中增加模拟,加入管理员权限,2).这样就能够启动Application进程,操作EXCEL了,能够新建EXCEL,导出EXCEL,但是还是不能打开服务器端的EXCEL文件2.(以下适用于所有语言) 在组件服务,DOCM设置 Microsoft Excel Application的属性, 因为是在64位系统上面操作,组件服务中DOCOM中默认是没有的,因为Microsoft Excel Application是32的DCOM配置,所以通过如下方式解决(参考第三步)3.(在64bit系统中的DCOM管理中添加32Bit的Excel、Wor 阅读全文
posted @ 2013-11-04 15:54 阿猫小覃 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 添加一个名叫“hougelou”的普通按钮 附言:以下是以UEditor .Net版本举例说明。 第一步:找到ueditor.config.js文件中的toolbars数组,增加一个“hougelou”字符串,然后找到labelMap数组,对应着添加一个labelMap,用于鼠标移上按钮时的提示。 阅读全文
posted @ 2013-10-24 19:14 阿猫小覃 阅读(991) 评论(0) 推荐(0) 编辑
摘要: 调试时巧用console.log(),这比用alert()方便多了。jquery易错点:元素拼接的时候,元素还未添加到DOM,就用该预添加元素操作。ajax动态获取的数据,还没有装载html元素,下面就开始用预拼凑的元素操作。 提交这样写,点击“提交”的时候,会报错“Uncaught Synt... 阅读全文
posted @ 2013-10-23 14:20 阿猫小覃 阅读(206) 评论(0) 推荐(0) 编辑
摘要: $(window.parent.document).find("#ContentIframe").load(function() { var main = $(window.parent.document).find("#ContentIframe"); var thisheight = $(document).height(); if (thisheight < 800) thisheight = 800; ... 阅读全文
posted @ 2013-10-23 10:30 阿猫小覃 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 在js里拼接好了json字符串,里面有时间的字段,例如“2013/4/19 14:33:26”,在json字符串转对象的时候出错。Exam_QuesContent quest = (Exam_QuesContent)Jayrock.Json.Conversion.JsonConvert.Import(typeof(Exam_QuesContent), json);//json字符串转对象字符串“2013/4/19 14:33:26”不是有效的 AllXsd 值。解决方法:在生成时间的时候,DateTime.Now.ToUniversalTime().ToString("s" 阅读全文
posted @ 2013-10-21 10:59 阿猫小覃 阅读(501) 评论(0) 推荐(0) 编辑
摘要: declare @count3 int,@count7 int,@count int,@countMore int;select @count3=count(*) from Exam_QuesContent where DateDiff(d,addDate,getdate())<3 --最近三天select @count7=count(*) from Exam_QuesContent where DateDiff(d,addDate,getdate())<7 --最近七天select @count=count(*) from Exam_QuesContent where DateD 阅读全文
posted @ 2013-10-08 16:32 阿猫小覃 阅读(183) 评论(0) 推荐(0) 编辑
摘要: Call me Ishmael. Some years ago &ndash; never mind how long precisely &ndash; having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world. It is a way I have of driving off the spl... 阅读全文
posted @ 2013-10-06 17:55 阿猫小覃 阅读(403) 评论(0) 推荐(0) 编辑
摘要: $.extend({ includePath: '', include: function(file) { var files = typeof file == "string" ? [file]:file; for (var i = 0; i "); } }});//使用方法$.includePath = '../js/Exam'; $.include(['/AddQuestion.js']); 阅读全文
posted @ 2013-09-29 14:39 阿猫小覃 阅读(275) 评论(0) 推荐(0) 编辑
摘要: //品牌地标弹出层(function($){$.fn.bgIframe = $.fn.bgiframe = function(s) { if ( $.browser.msie && /6.0/.test(navigator.userAgent) ) { s = $.extend({ top : 'auto', // auto == .currentStyle.borderTopWidth left : 'auto', // auto == .currentStyle.borderLeftWidth ... 阅读全文
posted @ 2013-08-21 16:33 阿猫小覃 阅读(165) 评论(0) 推荐(0) 编辑
摘要: jQuery.metadata.setType("attr", "validate");var opts = null;var isValidationGroup = false;jQuery(document).ready(function () { InitRules(); if (isValidationGroup) { if (opts != undefined || opts != null) { jQuery("#form1").validate(jQuery.extend(opts, { ons... 阅读全文
posted @ 2013-08-08 11:36 阿猫小覃 阅读(287) 评论(0) 推荐(0) 编辑
摘要: Win7安装IIS控制面板\程序\打开或关闭windows功能点击应用程序池,在右边你的应用程序池 右键/高级设置 ,将托管管道模式改成“Classic” 阅读全文
posted @ 2013-08-06 23:02 阿猫小覃 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 本地开发调试,能正常请求到服务器数据;发布到空间上后,就报错“因 URL 意外地以“/ValidateCode”结束,请求格式无法识别。”解决方法: 阅读全文
posted @ 2013-07-29 11:37 阿猫小覃 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 首先你要险种office组件,我之前以为转了wps也一样,结果不是。Application当程序运行到这句时出现下面的错误:检索 COM 类工厂中 CLSID 为 {000209FF-0000-0000-C000-000000000046} 的组件时失败,原因是出现以下错误: 80070005。3.单击"安全"选项卡,分别在"启动和激活权限"和"访问权限"组中选中"自定义",然后 自定义->编辑->添加ASP.NET账户和IUSER_计算机名。解决方法二:如果上述方法不能解决问题,就应该是权限问题,请尝 阅读全文
posted @ 2013-07-26 17:41 阿猫小覃 阅读(549) 评论(0) 推荐(0) 编辑
摘要: create FUNCTION fn_GetSimilar ( @StrA As Varchar(255), --传入的待比较的字符 @StrB As Varchar(255) --期望字符)RETURNS int ASBEGIN DECLARE @Result int declare @lenA int declare @lenB int declare @lenSameA int declare @lenSameB int set @lenA=len(@StrA) set @lenB=len(@StrB) -... 阅读全文
posted @ 2013-07-18 17:22 阿猫小覃 阅读(401) 评论(0) 推荐(0) 编辑
摘要: 下午不知道怎么搞的,突然Vs2008 运行就出问题了。真晕。Vs的问题可真多。!!!未能加载文件或程序集……或它的某一个依赖项。参数不正确。 (异常来自 HRESULT:0x80070057 (E_INVALIDARG))中文版:未能加载文件或程序集……或它的某一个依赖项。参数不正确。 (异常来自 HRESULT:0x80070057 (E_INVALIDARG))English:Could not load file or assembly … The parameter is incorrect … HRESULT: 0x80070057 (E_INVALIDARG)今天下午由于机器蓝屏后 阅读全文
posted @ 2013-06-28 16:17 阿猫小覃 阅读(238) 评论(0) 推荐(0) 编辑
摘要: position:absolute;left:50%;top:50%; margin-left:-元素自身宽度的一半; margin-top:-元素自身高度的一半;position:absolute;left:50%;top:50%; margin-left:-元素自身宽度的一半; margin-top:-元素自身高度的一半; 阅读全文
posted @ 2013-06-25 11:34 阿猫小覃 阅读(226) 评论(0) 推荐(0) 编辑