摘要: http://blogs.msdn.com/b/brada/archive/2009/12/11/visual-studio-project-sample-loading-error-assembly-could-not-be-loaded-and-will-be-ignored-could-not-load-file-or-assembly-or-one-of-its-dependencies-operation-is-not-supported-exception-from-hresult-0x80131515.aspx 阅读全文
posted @ 2012-04-30 06:15 wiseshrek 阅读(176) 评论(0) 推荐(0) 编辑
摘要: function getSelectedText(){ var selectedText = ''; if (document.selection) { var range = document.selection.createRange(); selectedText = range.text; } else if (window.getSelection) { selectedText = window.getSelection(); } return selectedText;} 阅读全文
posted @ 2011-08-04 12:30 wiseshrek 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 本文只作为备份,可参考:http://www.cnblogs.com/ptwlw/archive/2011/04/04/2005172.htmlReal World XSS Vulnerabilities in ASP.NET Codehttp://blogs.msdn.com/b/cisg/archive/2008/09/10/real-world-xss-vulnerabilities-in-asp-net-code.aspxFrom couple of weeks we have been seeing some XSS vulnerabilities in asp.net code. 阅读全文
posted @ 2011-07-25 17:02 wiseshrek 阅读(970) 评论(0) 推荐(0) 编辑
摘要: 选择该列数据,然后数据—分列—下一步—下一步—列数据格式为“文本”—确定。 阅读全文
posted @ 2011-07-21 10:07 wiseshrek 阅读(656) 评论(0) 推荐(0) 编辑
摘要: 问题:Today when Itried to add Web Service to My WPF application I was getting following error:"The components required to enumerate Web references are not installed on this computer.Please re-install Visual Studio"解决方案:Run"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Devenv 阅读全文
posted @ 2011-06-08 14:05 wiseshrek 阅读(504) 评论(0) 推荐(0) 编辑
摘要: 问题描述:通过ODBC3.5.1连接MySQL读取数据,所有VARCHAR字段返回的都是byte[],要用Encoding GetString方法才能转为字符串解决方案:机器上先安装过ODBC5.1.5,后面需要3.5.1时才安装了ODBC3.5.1。卸载2个版本的驱动,按照驱动的顺序从低到高重新安装,问题解决。分析:这个问题有点蛋疼 阅读全文
posted @ 2011-06-01 11:51 wiseshrek 阅读(496) 评论(0) 推荐(0) 编辑
摘要: 问题:在数据库执行查询 select SUM(col) from Table发生expression 转换为数据类型 int 时出现算术溢出错误解决方案:sum(convert(bigint,col)) 阅读全文
posted @ 2011-05-12 11:00 wiseshrek 阅读(747) 评论(0) 推荐(1) 编辑
摘要: 造成这个错误的原因是:在head runat="server"/head里面,使用了%=xxx%这样的代码,把Head中使用的%=.....%的脚本放到body中,就OK了.当然, 可以根据实际情况用其他方式处理 阅读全文
posted @ 2010-12-15 20:48 wiseshrek 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 列名数据类型描述fileidsmallint每个数据库的唯一文件标识号。groupidsmallint文件组标识号。sizeint文件大小(以 8 KB 页为单位)。maxsizeint最大文件大小(以 8 KB 页为单位)。0 值表示不增长,–1 值表示文件应一直增长到磁盘已满。growthint数据库的增长大小。0 值表示不增长。根据状态的值,可以是页数或文件大小的百分比。如果status包含 0x100000,则growth是文件大小的百分比;否则,它是页数。statusintgrowth值(以兆字节 (MB) 或千字节 (KB) 为单位)的状态位。0x1 = 默认设备。0x2 = 磁盘 阅读全文
posted @ 2010-12-09 16:12 wiseshrek 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 本来准备把公司的一些搜索移到RavenDB, 但是发现了一些问题对一些包含中文的字段进行了索引(KeywordAnalyzer)但是在进行搜索的时候 发现以H开都的都搜索不到, B的也搜索不到, 到开发博客发了问题, 开发的OK, 我是为什么?难道是因为中文?PS:后来只用英文测试, 还是一样的问题. 阅读全文
posted @ 2010-11-29 11:00 wiseshrek 阅读(696) 评论(3) 推荐(0) 编辑
摘要: 示例下载地址thunder://QUFodHRwOi8vbW9iaWxlLjkxLmNvbS9zb2Z0L2Rvd25sb2FkLzEwMTQ2NjkvZmQ3ZTdkYWE4YWJjZjJkNTMzNzI4NmQ1ZGUzMjA5NmEvsbzF3LXE0KG/1sH6IERpbm8gUnVzaC5weGxaWg==解决方案:1。获取thunder://后面部分string thunderDow... 阅读全文
posted @ 2010-11-28 17:56 wiseshrek 阅读(1216) 评论(0) 推荐(0) 编辑
摘要: 转自:http://msdn.microsoft.com/zh-cn/library/ms190384(v=SQL.90).aspx定义自定义权限集时为模块指定执行上下文非常有用。例如,某些操作(如 TRUNCATE TABLE)没有可授予的权限。若要执行 TRUNCATE TABLE,用户必须对指定表具有 ALTER 权限。授予用户对表的 ALTER 权限可能不是最佳方法,因为用户将拥有超出截断... 阅读全文
posted @ 2010-10-29 17:27 wiseshrek 阅读(295) 评论(0) 推荐(0) 编辑
摘要: 问题:在codebehind.cs文件, 如何获取一个服务端控件的innerHtml解决方案:StringBuilder sb= new StringBuilder();StringWriter sw= new StringWriter(sb);HtmlTextWriter hw= newHtmlTextWriter(sw);yourServerControl.RenderControl(hw);... 阅读全文
posted @ 2010-10-27 18:15 wiseshrek 阅读(1516) 评论(0) 推荐(0) 编辑
摘要: 在web应用中,何时创建DocumentStore?何时创建DocumentSession?从其所带的Sample中可以看到:在Application_Start时创建 DocumentStore在BeginRequest时创建DocumentSession在EndRequest时销毁DocumentSession 阅读全文
posted @ 2010-10-26 16:37 wiseshrek 阅读(316) 评论(0) 推荐(1) 编辑
摘要: 用SQL:ALTER TABLE table ADD column AS datediff(d,CreatedDate,getdate())通过ssms列属性-> 表设计器 -> 计算所得的列规范 -> 公式 阅读全文
posted @ 2010-10-20 20:08 wiseshrek 阅读(986) 评论(0) 推荐(0) 编辑
摘要: 原文-http://technet.microsoft.com/zh-cn/library/ms175987(SQL.90).aspxhttp://technet.microsoft.com/zh-cn/library/ms178052(SQL.90).aspxhttp://technet.microsoft.com/zh-cn/library/ms190203(SQL.90).aspx从简单恢复... 阅读全文
posted @ 2010-10-17 13:23 wiseshrek 阅读(260) 评论(0) 推荐(0) 编辑
摘要: ScriptManager的EnablePageMethods属性用于设定客户端javascript直接调用服务端静态WebMethodaspx<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true"> </asp:ScriptManager>aspx.cs[System.W... 阅读全文
posted @ 2010-10-14 11:11 wiseshrek 阅读(224) 评论(0) 推荐(0) 编辑
摘要: INSERT INTO SELECT语句要求目标表必须存在(可以插入常量)SELECT INTO FROM语句要求目标表不存在,在插入时会自动创建表 阅读全文
posted @ 2010-10-13 13:36 wiseshrek 阅读(491) 评论(0) 推荐(0) 编辑
摘要: 备注: 1 因为测试的时候我用的是本地一个书库内容, 数据写入的代码就省略了 2 中科院分词部分可以到中科院网站下载http://ictclas.org/ 3 上面利用中科院分词的ICTCLASAnalyzer, 已经在项目中应用,效率还可以另: 本来打算用盘古分词来做测试的, 但是盘古分词对lucene 2.9的时候做了些修改, 所以ravendb必须要重新编译, 有点麻烦, 就跳过了, 操作方... 阅读全文
posted @ 2010-09-26 13:41 wiseshrek 阅读(1096) 评论(0) 推荐(2) 编辑
摘要: 问题:应用的一个Lucene.Net搜索程序, Dll从2.4升级到2.9.2.2, 发生异常:Exception: System.FormatException Message: Invalid shift value in prefixCoded string (is encoded value really an INT?)排查:跟踪代码发现searcher.Search(wq, new S... 阅读全文
posted @ 2010-09-25 11:50 wiseshrek 阅读(1344) 评论(0) 推荐(0) 编辑