Ruby's Louvre

每天学习一点点算法

导航

2009年12月8日 #

返回数组中不重复的元素

摘要: 这是实现结构伪类only-of-type的部分代码: var ret= ["span","span","strong","span","b"] var norepeat = function(array){ var set = array.join(",")+","; while(array.length){ var el = array.shift(); set = set.replace(el... 阅读全文

posted @ 2009-12-08 20:31 司徒正美 阅读(2988) 评论(11) 推荐(3) 编辑

Performance and Design

摘要: Following up on Antranig’s recent post about performance, I’d like to address the issue of code design and its relationship to performance. Antranig’s article is very comprehensive a... 阅读全文

posted @ 2009-12-08 10:17 司徒正美 阅读(725) 评论(0) 推荐(0) 编辑

About this and that

摘要: This posting will be about the different styles of creating “components” or “objects” in Javascript, and which styles Fluid is planning to recommend and in what contexts. Javas... 阅读全文

posted @ 2009-12-08 10:08 司徒正美 阅读(722) 评论(0) 推荐(0) 编辑