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
var flickr:Flickr = new Flickr('YOUR_KEY_HERE'); | |
flickr.call('flickr.people.findByUsername', { username: 'Steve Coast' }, function(event:Event):void { | |
var rsp:XML = XML(event.target.data); | |
var userId:String = rsp.user[0][email protected](); | |
flickr.call('flickr.photos.search', { user_id: userId, has_geo: 1, extras: 'geo' }, function(event:Event):void { | |
var rsp:XML = XML(event.target.data); | |
for each (var photo:XML in rsp.photos.photo) { | |
var lat:Number = parseFloat(photo.@latitude); | |
var lon:Number = parseFloat(photo.@longitude); |
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 ([email protected]) | |
* | |
* Modified for official level 5 API by Cyanogen ([email protected]) | |
* |
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
/* | |
An Albers Equal Area Conic projection in javascript, for protovis. | |
For centering the contiguous states of the USA in a 800x400 div, I used: | |
var scale = pv.Geo.scale(albers(23, -96, 29.5, 45.5)) | |
.range({ x: -365, y: -375 }, { x: 1200, y: 1200 }); | |
http://mathworld.wolfram.com/AlbersEqual-AreaConicProjection.html |
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; |
OlderNewer