摘要:本文介绍如何用lambda实现一个递归。包括整个思考的过程。供大家参考。
阅读全文
摘要:1 X-AspNetMvc-Version在Global.asax的Application_Start方法中加入 MvcHandler.DisableMvcResponseHeader=true;2 X-AspNet-Versionweb.config中<httpRuntimeenableVersionHeader="false"/>3 X-Powered-Byweb.config中<httpProtocol><customHeaders><removename="X-Powered-By"/></c
阅读全文
摘要:$(".class")到底发生了什么。让我们一步一步来看注意rootjQuery其实就是$(document),绕了半天$(".class")就是$(document).find(".class")。接着看注意下面这行代码jQuery.find = Sizzle;也就是说jQuery.find默认是由Sizzle引擎提供的。那么开始进入Sizzle的代码了。先从简单的说起好的,这就很明白了,如果你的浏览器支持document.querySelectorAll,那么jQuery就直接用document.querySelectorAll来做了。有点区别的是IE8需要在document上设个id(如
阅读全文
摘要:usingSystem;usingSystem.Collections.Generic;usingSystem.IO;usingSystem.Reflection;usingSystem.Linq; namespaceSampleConsole{ classProgram {staticvoidMain(string[]args){stringfind="SessionState";stringd...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--Array.prototype.where=function(callback){vararray=[]for(vari=0;i<this.length;i++){if(callback.apply...
阅读全文
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#!/usr/bin/envpython#coding=utf-8importrandomdefdichotomy(L,K,Index):if(len(L)==1):returnIndexlength...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.0Transitional//EN"><html><head><title>New...
阅读全文
摘要:只能用鼠标而不是用手哟。Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.0Transitional//EN"><html><head><...
阅读全文
摘要:64位的操作系统(包括xp,2003,vista,2008等)在使用OLEDB去访问时回收到下面的一个错误The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine问题出在'Microsoft.Jet.OLEDB.4.0' 没有64位的版本。微软好像也不准备出一个64位的版本。下面是一些目前能采取的解决...
阅读全文
摘要:微软今天布了ASP.NET MVC 1.0 Release Candidate (RC)。同时声称将在下个月发布ASP.NET MVC 1.0。http://weblogs.asp.net/scottgu/archive/2009/01/27/asp-net-mvc-1-0-release-candidate-now-available.aspx在发布RC不久,Phil Haack就发现一个Bug...
阅读全文
摘要:刚刚将一台服务器升级到IIS7,经典模式没有任何问题。换成集成模式碰到以下问题问题一:状况:程序启动报“Request is not available in this context”错误。原因:在集成模式下Application_Start时HttpContext并不可用。解决:在Application_BeginRequest中使用单件模式模拟Application_Start。具体参阅ht...
阅读全文
摘要:min-width是个非常方便的CSS命令,它可以指定元素最小也不能小于某个宽度,这样就能保证排版一直正确。但IE不认得,所以如果你用IE将博客园的窗口宽度缩到足够小,所有的字都变在一列中。常见的解决方法就是用javascript或IE的expressions。在这里我来尝试用css来解决这个问题假设我们需要一个min-width为300px的div第一步<divstyle="border-...
阅读全文
摘要:<scriptlanguage="JavaScript"><!--if(window.Event)document.captureEvents(Event.MOUSEUP);functionnocontextmenu(){event.cancelBubble=trueevent.returnValue=false;returnfalse;}functionnorightclick...
阅读全文
摘要:你可能已经注意到在asp.net 2.0 Beta1中的 Precompile.axd 和 Webadmin.axd 在asp.net 2.0 Beta2中已经找不到了.如果你现在想要编译你的站点,你只能在命令行中使用aspnet_compiler或者是 Visual Studio's菜单中的 Build->Publish command。另一个Webadmin.axd, 我想你应该忘记它。Web...
阅读全文
摘要:string[] ColorStep = new string[] { "00", "33", "66", "99", "cc", "ff" }; //LoadAtc(); Response.Write(""); //Response.Write(""); //int i = 0; for (int i = 0; i "); ...
阅读全文
摘要:浮动广告是时下网上较为流行的广告形式之一。当你拖动浏览器的滚动条时,这种在页面上浮动的广告,可以跟随屏幕一起移动。 制作浮动广告,看起来不是一个很困难的任务.但它却花了我近6个小时的时间。 刚接到这个需求时,我就想起我已前的Javascript代码 function page_scroll(){ oDiv.style.top = parseInt(document.body.scrollTo...
阅读全文
摘要:对于所有开发人员来说,写连接字符串永远不是一件困难的事,但却是一件很头痛的事情。看ADO.NET 2.0如何解决的 SqlConnectionStringBuilder connbuilder = new SqlConnectionStringBuilder();connbuilder.DataSource = "localhost";connbuilder.UserID = "someuser"...
阅读全文