写在前面这篇没有什么 WebKit 代码的分析,因为……没啥好分析的,在实现里无非就是树的(先序DFS)遍历而已,囧哈哈哈……在WebCore/dom/Node.h , WebCore/dom/ContainerNode.h 和 WebCore/dom/Element.h 以及对应的 .cpp 里看...
分类:
Web程序 时间:
2014-12-17 09:02:09
阅读次数:
311
在修改一下,暂时这样;(function($, window, document, undefined){ var tiance = function(element, opt){ this.element = element; this.defaults = {...
分类:
其他好文 时间:
2014-12-16 16:40:26
阅读次数:
140
Implement regular expression matching with support for '.' and
'*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input...
分类:
其他好文 时间:
2014-12-16 15:12:03
阅读次数:
153
flex3中用addChild(child:DisplayObject) 增加显示对象,flex4中用addElement(element:IVisualElement)。绝大多数的flex3显示控件都是从DispalyObject继承的,所以在flex3中增加显示对象非常容易。一旦到了flex4,...
分类:
其他好文 时间:
2014-12-16 14:52:34
阅读次数:
186
标题:Remove Duplicates from Sorted List通过率:34.5难度:简单Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example...
分类:
其他好文 时间:
2014-12-15 23:23:12
阅读次数:
207
Implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding element....
分类:
其他好文 时间:
2014-12-15 18:48:32
阅读次数:
160
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get...
分类:
其他好文 时间:
2014-12-15 17:25:36
阅读次数:
212
div本来是没有focus和blur事件的。如果用div来模拟一个input标签,同时需要它和input一样响应focus和blur事件,就需要给他加上attribute:tabindexAn element can have focus if the tabIndex property is se...
分类:
其他好文 时间:
2014-12-15 17:05:33
阅读次数:
165
原题链接:https://oj.leetcode.com/problems/find-peak-element/
题目大意:给定一个相邻元素不相等的数组,找出其中的一个局部最大值,返回对应下标。
方法1:顺序遍历。
本题的一个重要特点是,从第一个元素开始,若其大于相邻的后续元素,则第一个元素就是一个局部最大值,返回即可。若其小于相邻的后续元素,则第二个元素大于第一个元素。如此,一一遍历数组,...
分类:
其他好文 时间:
2014-12-15 15:29:53
阅读次数:
112
Kth Largest ElementFind K-th largest element in an array.NoteYou can swap elements in the arrayExampleIn array[9,3,2,4,8], the 3th largest element is ...
分类:
其他好文 时间:
2014-12-15 15:06:10
阅读次数:
338