Skip to content

Instantly share code, notes, and snippets.

View kangax's full-sized avatar

Juriy Zaytsev kangax

View GitHub Profile
------------ PRODUCTS STATUS ------------
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill': execution expired (Timeout::Error)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/timeout.rb:56:in `timeout'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/timeout.rb:76:in `timeout'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:126:in `readline'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:2029:in `read_status_line'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:2018:in `read_new'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/u
*[
{-- Node --}
@name="ELEMENT_NODE" or
@name="ATTRIBUTE_NODE" or
@name="TEXT_NODE" or
@name="CDATA_SECTION_NODE" or
@name="ENTITY_REFERENCE_NODE" or
@name="ENTITY_NODE" or
@name="PROCESSING_INSTRUCTION_NODE" or
<form action="/">
<fieldset>
<legend>Vocabulary 1</legend>
<ul>
<li>
<input type="checkbox" name="name_1" id="name_1">
<label for="name_1">Term 1</label>
</li>
<li>
<input type="checkbox" name="name_2" id="name_2">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
</head>
<body>
<form action="/">
<fieldset>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
</head>
<body>
<script type="text/javascript">
var extend = (function(){
function F(){ }
F.prototype = {
enable: function() { },
disable: function() { },
isEnabled: function() { }
};
function StyleSheet(){ }
StyleSheet.prototype = new F();
var sel = '.shapes li a';
var lim = 100;
console.time('NW');
for (var i=0; i<lim; i++) {
NW.Dom.select(sel);
}
console.timeEnd('NW');
console.time('NW (extended)');
var arr = [1,2,3,4,5,6,7,8,9,10],
lim = 1000;
function iterator(sum, n) {
return n += sum;
}
console.time(1);
for (var i=0; i<lim; i++) arr.inject(0, iterator);
console.timeEnd(1);
/**
* Element#clone(@element, deep) -> Element
*
* Returns a duplicate of an element.
* A wrapper around DOM Level 2 Node::cloneNode,
* which takes care of clone's expando properties defined by Prototype
*
* `deep` argument is passed along to a an underlying `cloneNode`
* and affects cloning correspondingly - i.e. skipping child nodes if `false`
**/
(function(){
var fnOuter = (function(){
// `F` has already leaked onto the enclosing scope
// (since it was parsed as a declaration, not an expression)
// as per specs, `F` Identifier should only be visible to function object
// created as a result of named function expression
// assign to `fnInner` property of a global object for comparison
this.fnInner = F;