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 object that works a lot like jQuery: | |
var NodeList = Class.create(Enumerable); | |
Object.extend(NodeList.prototype, { | |
initialize: function(selector) { | |
this.elements = $$(selector); | |
}, | |
_each: function(iterator) { | |
this.elements.each(iterator); | |
return this; | |
} |
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 object that works a lot like jQuery: | |
var NodeList = Class.create(Enumerable); | |
Object.extend(NodeList.prototype, { | |
initialize: function(selector) { | |
this.elements = $$(selector); | |
}, | |
_each: function(iterator) { | |
this.elements.each(iterator); | |
return this; | |
} |
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
<?php | |
function sendFile($path, $name, $mime) { | |
$fp = @fopen($path, 'rb'); | |
if (!$fp) { | |
// error opening file; it may not exist or be readable | |
header("HTTP/1.0 404 Not Found"); | |
exit(0); | |
} | |
$size = filesize($path); |
NewerOlder