04 2012 档案
摘要:JQuery AutoComplete插件在IE9下会因为bgiframe的问题出错解决方法:引入新的bgiframejquery.bgiframe-2.1.2.js:/*!Copyright(c)2010BrandonAaron(http://brandonaaron.net)*LicensedundertheMITLicense(LICENSE.txt).**Version2.1.2*/(function($){$.fn.bgiframe=($.browser.msie&&/msie6\.0/i.test(navigator.userAgent)?function(s){s
阅读全文
摘要:众所周知, ASP.NET的System.Web命名空间下的缓存可以用来保存一段时间的数据因此, 在项目中我们可能利用它来保存一些缓存数据.因此, 很多人写了这样的工具类来保存和加载缓存保存缓存:publicstaticvoidSetCache(stringCacheKey,objectobjObject){System.Web.Caching.CacheobjCache=HttpRuntime.Cache;objCache.Insert(key,objObject);}publicstaticvoidSetCache(stringCacheKey,objectobjObject,DateT.
阅读全文
摘要:1. Register as a developer athttps://developer.apple.com/devcenter/ios/index.action2. Install XCode Launch Xcode from the Developer/Applications folder.On the right side of the display are the templates within the category, with adescription of the currently highlighted template. For this tutorial,.
阅读全文
摘要:子查询分为独立子查询和相关子查询什么时候该利用子查询,我们可以先来看下面几个实际的例子。我们以Northwind数据库为例1. 返回在每月最后实际订单日期发生的订单(独立子查询) 思路:由于每个月最后实际订单最后一天是唯一的,所以我们 可以利用内层查询分组来实现。SELECTOrderID,CustomerID,EmployeeID,OrderDate,RequiredDateFROMdbo.OrdersWHEREOrderDateIN(SELECTMAX(OrderDate)FROMdbo.OrdersGROUPBYEmployeeID)2. 为每个员工返回具有最大OrderDate的订单(
阅读全文
摘要:Ruby是脚本语言,与传统的C, Java不同的是,它不需要经过编译,而是直接可以被执行Ubuntu下执行第一个ruby脚本print("Hello David, This is your first Ruby script.\n")david@ubuntu:~/RubyTrain/Basic$ ruby Hello.rb运行结果:Hello David, This is your first Ruby script.
阅读全文
摘要:Decorator Pattern: Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.什么是装饰模式? 装饰模式被用来应对类型在继承过程中快速膨胀的情况,而导致膨胀的原因往往是我们需要为类型增加新的职责(功能)现实生活中的例子: 手机从一开始的只能打电话,收发短信,到后来的听MP3, GPS, 拍照,智能化功能等等装饰模式的目的: 动态为对象增加新的职责
阅读全文