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 colors = new Array( | |
[116,143,138], | |
[78,117,143], | |
[191,206,197], | |
[0,40,40], | |
[0,60,60], | |
[0,80,80], | |
[0,100,100], | |
[165,187,181], | |
[134,160,154], |
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
# django template tag filter to generate jpeg thumbnails | |
import os | |
import Image | |
from django.template import Library | |
register = Library() | |
def scale(max_x, size): | |
" size is a tuple: (image_x,image_y) " |
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
// is a fix for this bug : http://code.google.com/p/galleria/issues/detail?id=62 | |
onImage : function(image,caption,thumb) { | |
// fetch the thumbnail container | |
var _li = thumb.parents('li'); | |
// count items | |
var n = parseInt(_li.siblings().length); | |
if (typeof n == 'undefined' || n == 0) { |
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
// cross-browser width and height functions | |
function f_clientWidth() { | |
return f_filterResults ( | |
window.innerWidth ? window.innerWidth : 0, | |
document.documentElement ? document.documentElement.clientWidth : 0, | |
document.body ? document.body.clientWidth : 0 | |
); | |
} | |
function f_clientHeight() { | |
return f_filterResults ( |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us"> | |
<head> | |
<title>openLayers</title> | |
<style> | |
html,body { | |
height: 99%; | |
width: 99%; | |
} |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us"> | |
<head> | |
<title>openLayers</title> | |
<style> | |
html,body { | |
height: 99%; | |
width: 99%; | |
} |
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
<html> | |
<head> | |
<!-- | |
just download PURE and drop this file the 'tutorial' directory | |
- http://beebole.com/pure/ | |
--> | |
<title>PURE Unobtrusive Rendering Engine</title> | |
<script src="../libs/jquery.js"></script> |
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
/** | |
* @fileOverview some javascript boilerplate to provide enhancements to old browsers | |
* @author zack @ m-og.eu | |
*/ | |
/** | |
* JSLINT CONFIG | |
*/ | |
/*jslint white: false, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true */ | |
/*global window: false, document: false, log: false */ |
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
/** JSLINT CONFIG */ | |
/*jslint white: false, onevar: true, undef: true, nomen: false, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true */ | |
/*global window: false, document: false, $: false, log: false, bleep: false, | |
// QUnit vars | |
QUnit: false, | |
test: false, | |
asyncTest: false, | |
expect: false, | |
module: false, | |
ok: false, |
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
<!doctype html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" > | |
</head> | |
<body> | |
<!-- source: http://www.zachleat.com/web/2010/02/24/array-sort/ --> | |
<!-- The Fix: Don’t reuse the argument variables inside of an Array sort function: | |
/* Changing the above example |
OlderNewer