`
sevenduan
  • 浏览: 12054 次
  • 性别: Icon_minigender_1
  • 来自: 珠海
最近访客 更多访客>>
社区版块
存档分类
最新评论
文章列表
1, class loader could inherit the classes object from its parent class loader, e.g. bootstrap class loader. 2, when use loader to load class, e.g. Class.forName("Foo"); it will check the class is existed or not. if yes, stop load. else will go on the loading process: search the class file ...
jQuery Common Coding tips: 1, less code by chain coding 2, Use data method instead of storing data inside the DOM.      $('selector').data('meaningfullname', 'this is the data I am storing'); // then later getting the data with $('selector').data('meaningfullname'); 3, If you are Manip ...
Should we do RegEx or not? *pros: save time and less efforts less code *cons: sometimes heavyweight or involves heavy processing complicated RegEx hidden bugs, hard to read/write In a word, we need to balance the pros and cons above before make a descision. How to parse RegEx? //TODO:
请给Array本地对象增加一个原型方法,它的用途是删除数组条目中重复的条目(可能有多个),返回值是一个仅包含被删除的重复条目的新数组。 var hashCode = function(element){ return element.sort().toSource(); } Array.prototype.dell = function(hashCode){ var deleList = []; ...
做为一个java coder,除了eclipse, firefox,也是Outlook的重度使用者。 熟用以下快捷键是request code review, reply code review的制胜法宝。 创建邮件。  Ctrl+Shift+M 创建便笺。  Ctrl+Shift+N 新建MO文档。  Ctrl+Shift+H 检查姓名。  Ctrl+K 面板切换。  F6 答复邮件。  Ctrl+R 移动项目。  Ctrl+Shift+V reply all。 Ctrl+Shift+R 转发邮件。 Ctrl+F “flag”。  Insert 发送。          ...
Efficient JavaScript coding 1, 尽可能选择高效的method e.g. 如果没有必要,可以不用regular expression String.indexOf, String.lastIndexOf > String.match, String.search, String.replace 2, 面对large loop就要斤斤计较 2.1 Create once, use repeatedly for( var i = 0, oNode; oNode = oElement.childNodes[i]; i++ ) { if( oNode.no ...
Less Code == [Less Bugs,Better Readability,Less programmers to hire, Less organizational communication costs, Less maitain cost] Less Code != [Higher Productivity,Better Performance] 1, import static remove duplicated namespace what does it do? package com.toolbox.lang; public class ClassWithStati ...
按使用频率排名: 1,IDE 个人首选aptana IDE,因为用惯了eclipse快捷键。 根据个人喜好,可选intelJ,gvim 2,debugger 熟记debugger的快捷键是高效coding的关键之一。 FF当属firebug,IE除了IE8的debugger没有一个好鸟。 3,API doc 熟练翻阅各种API电子书,HTML 和 jscript的电子书是必备的,根据需要常备YUI,mootools,jquery等。要知道,许多api的function并不是可以那么容易google得到的。 e.g.string.replace(Regex, function) functio ...
传统的client side js MVC 结构: Model: json object - mapping with PO from server side View: HTML + CSS Controller: Page object - 负责页面初始化逻辑(验证、事件绑定、json数据渲染到DOM),提交时,获取DOM的数据组装json。 Concrete Javascript Pattern : 把status 和 behavior 直接绑定到DOM element上。 jquery concrete framework: http://github.com/hafriedland ...
solution: 所有的$(html)用法,给html的内容加上关闭标签,否则IE不支持 $('<li class="describe">') //refactor into $('<li class="describe"/>') //or $('<li class="describe"></li>') ------------------------- screw.unit 是一个很实用的BDD框架。 除了TDD的时候很方便,在学习任何新框架或者javascript语法 ...
Global site tag (gtag.js) - Google Analytics