This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Element.Methods.r31n = function(elm, imgs){ | |
elm.elmImg = new Element('img',{ src: elm.checked?imgs.checked:imgs.unchecked }); | |
if(elm.type == 'checkbox'){ | |
elm.elmImg.observe('click',function(){ | |
elm.checked = !elm.checked; | |
elm.elmImg.src = elm.checked?imgs.checked:imgs.unchecked; | |
}); | |
elm.observe('change',function(){ | |
elm.elmImg.src = elm.checked?imgs.checked:imgs.unchecked; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(document.getElementsByClassName){ | |
var elementos = | |
document.getElementsByClassName('esconder'); | |
for(var i = 0, j = elementos.length; i < j; i++){ | |
elementos[i].style.display = 'none'; | |
} | |
}else{ | |
var elementos = document.getElementsByTagName('div'); | |
var expressao = new RegExp("(^|\\s)esconder(\\s|$)"); | |
for(var i = 0, j = elementos.length; i < j; i++){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Prototype | |
$$('.esconder').invoke('hide'); | |
// jQuery | |
$('.esconder').hide(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var b = document.body; | |
var c = b.className ? b.className + 'js' : 'js'; | |
b.className = c; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body.js div.hide { | |
display: none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KevLinDev.extend = function(subClass, baseClass) { | |
function inheritance() {} | |
inheritance.prototype = baseClass.prototype; | |
subClass.prototype = new inheritance(); | |
subClass.prototype.constructor = subClass; | |
subClass.baseConstructor = baseClass; | |
subClass.superClass = baseClass.prototype; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
width="" | |
height="" | |
prepend="" | |
append="" | |
while getopts 'h:w:p:a:' OPTION | |
do | |
case $OPTION in | |
w) width="$OPTARG" | |
;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ find . -iname \*.png -exec thumbalizr -w 400 -a _t {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getPositionInMatrix(needle, haystack, pos) | |
{ | |
pos = pos || []; | |
for(var i = haystack.length; --i >= 0;) | |
{ | |
if(haystack[i] === needle) | |
{ | |
return pos.push(i); | |
} | |
else if(Object.prototype.toString.call(haystack[i]) === '[object Array]') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
js> getPositionInMatrix('foo', ['bar',['baz','foo'],'foobar']); | |
1,1 | |
js> getPositionInMatrix('foo', ['bar',['baz','rs', 'foo'],'foobar']); | |
1,2 |
OlderNewer