This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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); | |
} | |
} |
NewerOlder