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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
body { | |
background: #333333; | |
} |
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
.fieldset { | |
position: relative; | |
font-size: sans-serif; | |
display: block; | |
width: 100%; | |
padding: 0; | |
margin: 20px 0; | |
height: 64px; | |
} |
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 | |
/** | |
* Calculate the time elapsed from the timestamp described in the string | |
* and converts into a human-readable version (e.g. "about 3 days ago"). | |
*/ | |
function how_long_ago($date) { | |
$ago = false; | |
$elapsed = time() - strtotime($date); | |
if ($elapsed <= 1) { |
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
#VRML V2.0 utf8 | |
Inline{url "some_file.wrl"} | |
DEF mouse MouseSensor {} | |
DEF script Script { | |
eventIn SFVec2f position | |
eventIn SFBool click | |
directOutput TRUE | |
url "javascript: |
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
<!-- | |
Works even without the "plus" extension of the Templates plugin. | |
http://github.com/nje/jquery-tmpl | |
--> | |
<script id="MyStaticTemplate" type="text/x-jquery-tmpl"> | |
<div>Hello ${hello}</div> | |
</script> | |
<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
/** | |
* Dynamic template from an arbitrary string | |
* (which could be stored in an external file or even in a database). | |
* | |
* Works even without the "plus" extension of the Templates plugin. | |
* http://github.com/nje/jquery-tmpl | |
*/ | |
var MyData = {hello: "world"}; | |
$.template("MyInlineTemplate", "<div>Hello ${hello}</div>"); | |
$.tmpl("MyInlineTemplate", MyData).appendTo("#contents"); |
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
/** | |
* VEMap.CreatePushpin(point, options) and similar functions | |
* to create advanced pins, polylines & polygons easily in Bing Maps. | |
*/ | |
function _addshapeoptions(scope_, type_, points_, options_){ | |
var shape = new VEShape(type_, points_); | |
options_ = options_ || false; | |
if (options_){ | |
for (var key in options_){ |
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
/** | |
* Adds pan and zoom support for touch-based devices. | |
* Works best with fixed-size viewports, however VEMap.ZoomIn & VEMap.ZoomOut | |
* are very unreliable on the IPhone, you should keep the mini dashboard as a fallback. | |
*/ | |
VEMap.prototype.EnableTouch = function(){ | |
if (typeof Touch == "object"){ | |
var map = this; | |
// Whether a gesture is being performed currently or not. |
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
/** | |
* This snipplet adds the following methods: | |
* VEMap.DropPushpin | |
* VEShapeLayer.DropPushpin | |
* | |
* This is similar to VEMap.AddPushpin except the pin is animated (it "falls" on the map). | |
* | |
* Works even in IE6 and the IPhone. Generic solution based on this proof of concept: | |
* http://www.garzilla.net/vemaps/DropPushPin.aspx | |
*/ |
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
#VRML V2.0 utf8 | |
Transform { | |
translation -4 2 0 | |
children Shape { | |
appearance Appearance{ | |
material Material{ | |
diffuseColor 0 0 0 | |
emissiveColor 1 1 1 | |
} |