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> | |
<meta charset="utf-8"> | |
<style> | |
html, body { margin: 0; } | |
.line { | |
fill: none; | |
stroke-width: 2.0; | |
} | |
.axis .tick line, .axis path.domain { |
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
protected var delayedCalls:Array = []; | |
protected function callNextFrame(callback:Function, args:Array=null):void | |
{ | |
delayedCalls.push({ callback: callback, args: args }); | |
if (!hasEventListener(Event.ENTER_FRAME)) { | |
addEventListener(Event.ENTER_FRAME, onEnterForCallNextFrame); | |
} | |
} |
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
using System; | |
using System.Windows.Media; | |
namespace Stamen | |
{ | |
/* | |
* Extension methods for Matrix manipulation in Silverlight. | |
* | |
* Note that by default C# passes structs by value (and | |
* extension functions can't pass by reference) so the matrix |
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
String imageName = "world.topo.bathy.200401.3x5400x2700.jpg"; | |
noSmooth(); | |
print("opening original image... "); | |
PImage img = loadImage(imageName); | |
println("done!"); | |
if (img.width % 256 != 0 || img.height % 256 != 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
package candymaps.map | |
{ | |
import com.modestmaps.geo.Location; | |
import flash.events.Event; | |
import flash.net.URLLoader; | |
import flash.net.URLRequest; | |
public class MapUtil | |
{ |
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
// from http://lukehutch.wordpress.com/2010/01/06/my-multi-touch-code-ported-to-eclair/ | |
/** | |
* MultiTouchController.java | |
* | |
* (c) Luke Hutchison (luke.hutch@mit.edu) | |
* | |
* Modified for official level 5 API by Cyanogen (shade@chemlab.org) | |
* |
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> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
$.ajax({ | |
url: 'http://query.yahooapis.com/v1/public/yql', | |
data: { | |
q: "select * from csv where url='http://www.tom-carden.co.uk/p5/tube_map_travel_times/data/lines2.csv' and columns='station1,station2,line,time'", | |
format: 'json' |
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
///// IN IMPORTS | |
import flash.events.IEventDispatcher; | |
import flash.events.EventDispatcher; | |
///// | |
///// IN CLASS DECLARATION: | |
implements IEventDispatcher | |
///// | |
///// IN CONSTRUCTOR: |
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
package com.modestmaps.mapproviders.microsoft | |
{ | |
import com.modestmaps.core.Coordinate; | |
import com.modestmaps.mapproviders.AbstractMapProvider; | |
import com.modestmaps.mapproviders.IMapProvider; | |
import com.modestmaps.util.BinaryUtil; | |
import flash.events.Event; | |
import flash.events.EventDispatcher; | |
import flash.events.IEventDispatcher; |
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 loadCSV(url, columns, callback) { | |
var req = new XMLHttpRequest(); | |
req.open('GET', url, true); | |
req.onreadystatechange = function (aEvt) { | |
if (req.readyState == 4) {// && req.status == 200) { | |
callback(parseCSV(req.responseText, columns)); | |
} | |
}; | |
req.send(null); | |
} |
OlderNewer