paul_cheung

导航

07 2013 档案

Static variables in JavaScript
摘要:javascript中变量和方法,static, public,private 阅读全文

posted @ 2013-07-31 21:03 paul_cheung 阅读(187) 评论(0) 推荐(0)

TypeScript入门笔记
摘要:TypeScript的简单结构,module,AMD简单介绍 阅读全文

posted @ 2013-07-31 19:49 paul_cheung 阅读(619) 评论(0) 推荐(0)

Visual Studio TFS
摘要:安装TFS2012,创建Project Collection,TFS Admin Console,Project Collection Web Portal,了解Build Configuration(Controller/Agent) 阅读全文

posted @ 2013-07-26 10:02 paul_cheung 阅读(531) 评论(0) 推荐(1)

English Learning Sites
摘要:good explanation for english grammar 阅读全文

posted @ 2013-07-25 15:42 paul_cheung 阅读(161) 评论(0) 推荐(0)

JavaScript私有方法
摘要:some concepts: Java is from Sun Microsystem Inc., andJavaScript, called LiveScript before,is from Netscape; those two languages has little relationship with each other. Just their names confuse us. 个人一直以为javascript中没有私有成员(变量和方法)的说法,直到看完此文云雾骤散。1.对象 Arrays, Functions, Objects都是对象。Objects是name-valu... 阅读全文

posted @ 2013-07-24 16:27 paul_cheung 阅读(346) 评论(0) 推荐(0)

Django学习笔记----settings and database_based App demo
摘要:原文参考docs.djangoproject.com, what can manage.py utility do? find here.1.Database Setup编辑settings.py文件,配置数据库,包括provider和数据库(文件路径)名称,然后保存(不确定要不要compile下)。如果为SQLite,使用此操作自动创建数据库文件(给出绝对路径名c:/blah/blah/demoDB.db,engine:'django.db.backends.sqlite3')使用:python manage.py syncdb2.设置Time Zone等默认为美国中部时间C 阅读全文

posted @ 2013-07-23 12:11 paul_cheung 阅读(481) 评论(0) 推荐(0)

CSS 三栏布局入门
摘要:使用CSS进行简单的三栏布局 阅读全文

posted @ 2013-07-22 15:43 paul_cheung 阅读(220) 评论(0) 推荐(0)

Module, Package in Python
摘要:Phthon中Module,Package,__init__ 阅读全文

posted @ 2013-07-21 18:09 paul_cheung 阅读(231) 评论(0) 推荐(0)

Django[pronounced dʒ] installation on windows
摘要:1.Install python,download python windows installerfrom http://www.python.org/download/and do installation(add evironmentvariable); when this operation complete, there is no 'Script' folder under %Python% directory.2.Google search 'ez_setup', find ez_setup.py, copy it and save as ez_s 阅读全文

posted @ 2013-07-21 17:14 paul_cheung 阅读(188) 评论(0) 推荐(0)

Singleton pattern的线程安全问题
摘要:Singleton实现中的线程安全问题及保证线程安全。 阅读全文

posted @ 2013-07-20 23:51 paul_cheung 阅读(1319) 评论(0) 推荐(0)

可以直接拿来用的15个jQuery代码片段
摘要:jQuery代码片段;handy usage... 阅读全文

posted @ 2013-07-19 20:31 paul_cheung 阅读(157) 评论(0) 推荐(0)

管窥python语法
摘要:刚接触python,mark下所见所得:1.Python调用底层API,可在任何platform上运行,包括Windows、Mac、Unix;2.用#符号对代码或语句进行注释,#后的代码不被编译;3.print的时候使用逗号[,]告诉解释器不作新行输出;4.python程序可以运行在windows shell里(cmd line);5.代码可以在notepad下编辑,纯文本结构文件;6.变量声明:v=2; v="can be changedtoa string"; #the value of v can be changed at any time; name=" 阅读全文

posted @ 2013-07-19 13:50 paul_cheung 阅读(186) 评论(0) 推荐(0)

Daily Build[called heart beat]
摘要:Use MSBuild to do daily build 阅读全文

posted @ 2013-07-17 14:31 paul_cheung 阅读(165) 评论(0) 推荐(0)

JS判断浏览器类型与版本
摘要:javascript判断浏览器类型 阅读全文

posted @ 2013-07-16 23:53 paul_cheung 阅读(182) 评论(0) 推荐(0)

Dependency Injection in ASP.NET MVC
摘要:原文引自http://www.dotnetcurry.com/ShowArticle.aspx?ID=7861.传统三层结构,相邻两层之间交互; 2.如果使用EntityFramework则View层直接与Db层交互,如在Controller中定义DbContext操作数据库,属于紧耦合; 3.解决2中紧耦合的方法:1)定义IRepository(CRUD),此接口在对应数据层实现(DbContext);2)Controller中只使用IRepository实例出的相应Repository,进而达到松耦合的目的; 4.Controller默认使用无参构造函数,不能以传递参数的方式实例化Cont 阅读全文

posted @ 2013-07-15 19:17 paul_cheung 阅读(435) 评论(0) 推荐(0)

Splash Screen(短时间弹出框,信息显示一次)
摘要:原文引自codeproject site, http://www.codeproject.com/Articles/6511/Transparent-Splash-Screen1.A splash page: an initial web site page used to capture the user's attention for a short timeas a promotion or lead-in to the site home page or to tell the user anything. to have the splash page automatical 阅读全文

posted @ 2013-07-15 19:14 paul_cheung 阅读(331) 评论(0) 推荐(0)

Mock Framework
摘要:Typemock Isolator; Rhino Mocks; NMock; MS Fakes(has not same mechanism with NMock)Mock is usually used for Test-Driven Development, in order to write unit test, we need to mock certain objects using these frameworks. 阅读全文

posted @ 2013-07-15 19:14 paul_cheung 阅读(203) 评论(0) 推荐(0)

sites for debugging script
摘要:1. javascript debugger online: http://jsfiddle.net/2. script(js,python,ruby) debugger online:http://codechat.net/ 阅读全文

posted @ 2013-07-15 19:12 paul_cheung 阅读(193) 评论(0) 推荐(0)

Types in Javascript(jQuery)
摘要:String: 空字符串等于Boolean的false;htmlString: 包括起始tag和结束tag的字符串,代表html代码;Number:双精度64位,跟string一样属于immutable,基于c语言的运算符都适用于此值;0默认为false,!0为true; Math函数,parseInt函数(各进制到int的转换); 转换为字符串,""+1+2==“12”,""+(1+3)==“4”...... NaN,非Number的对象会返回NaN,用isNaN函数判断;Number类型; Infinity,1/0==infinity;Number类 阅读全文

posted @ 2013-07-15 17:14 paul_cheung 阅读(246) 评论(0) 推荐(0)

推荐10个超棒的jQuery工具 提示插件
摘要:脚本之家 http://www.jb51.net/article/28525.htm 阅读全文

posted @ 2013-07-15 17:13 paul_cheung 阅读(137) 评论(0) 推荐(0)

The AJAX response: XML, HTML, or JSON?
摘要:shared from: http://www.quirksmode.org/blog/archives/2005/12/the_ajax_respon.html1. 返回XML文档对返回的XML文档进行读取,然后插入到当前的HTML页面中。读取不方便,XSLT此时派上用场,将XML文档转换成另一种XML文档; 优点:可读性强;很多开发者已经习惯XML格式,而不是JSON数据(Saying "I'd like your server side script to return an XML document" won't cause raised eyebr 阅读全文

posted @ 2013-07-15 17:11 paul_cheung 阅读(278) 评论(0) 推荐(0)

datetime is null
摘要:本文转载自阿单《datetime is null》datetime 以'YYYY-MM-DD HH:MM:SS'格式检索和显示DATETIME值同时当datetime 为 null时,选取相关数据使用:SELECT * FROM process WHERE date_inserted is null;并不是使用:SELECT * FROM process WHERE date_inserted =null; 阅读全文

posted @ 2013-07-15 17:09 paul_cheung 阅读(178) 评论(0) 推荐(0)

jquey中的事件绑定
摘要:三种方法:$(selector).live(events, data, handler); // jQuery 1.3+$(document).delegate(selector, events, data, handler); // jQuery 1.4.3+$(document).on(events, selector, data, handler); // jQuery 1.7+以上三种方法,data都是可选项;events参数可以为空格分开的list;.live()不推荐使用,因为:1.(selector).live(),当文档很大时,selector耗时很严重 ... 阅读全文

posted @ 2013-07-15 17:03 paul_cheung 阅读(410) 评论(0) 推荐(0)