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
require 'rubygems' | |
require 'httparty' | |
require 'json' | |
class Party | |
include HTTParty | |
base_uri 'messageparty.net' | |
def post room, message | |
headers = { |
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
// create tab group | |
var tabGroup = Titanium.UI.createTabGroup(); | |
///////////////////////// | |
// create base UI tab and root window | |
// We need a tabBar to be able to win.setToolbar items, even though we'll hide it | |
///////////////////////// | |
var win = Titanium.UI.createWindow({ | |
title:'TweetFlow', |
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
cities = Hash.new | |
cities[:san_fran] = [-122.75,36.8,-121.75,37.8] | |
cities[:new_york] = [-74,40,-73,41] | |
cities[:houston] = [-95.7,29.4,-94.7,30.4] | |
cities[:los_angeles] = [-118.4, 33.7,-117.4,34.7] | |
cities[:chicago] = [-88.3, 41.5, -87.3, 42.5] | |
cities[:phoenix] = [-112.3, 33.1, -111.3, 34.1] | |
cities[:philadelphia] = [-75.5, 39.6, -74.5, 40.6] | |
cities[:san_antonio] = [-98.8, 29.1, -97.8, 30.1] | |
cities[:austin] = [-97.9, 30.1, -96.9, 31.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
var boxes = [-90, -60, -80, -50, -80, -60, -70, -50, -70, -60, -60, -50, -60, -60, -50, -50, -50, -60, -40, -50, -40, -60, -30, -50, -30, -60, -20, -50, -90, -50, -80, -40, -80, -50, -70, -40, -70, -50, -60, -40, -60, -50, -50, -40, -50, -50, -40, -40, -40, -50, -30, -40, -30, -50, -20, -40, -90, -40, -80, -30, -80, -40, -70, -30, -70, -40, -60, -30, -60, -40, -50, -30, -50, -40, -40, -30, -40, -40, -30, -30, -30, -40, -20, -30, -90, -30, -80, -20, -80, -30, -70, -20, -70, -30, -60, -20, -60, -30, -50, -20, -50, -30, -40, -20, -40, -30, -30, -20, -30, -30, -20, -20, -90, -20, -80, -10, -80, -20, -70, -10, -70, -20, -60, -10, -60, -20, -50, -10, -50, -20, -40, -10, -40, -20, -30, -10, -30, -20, -20, -10, -90, -10, -80, 0, -80, -10, -70, 0, -70, -10, -60, 0, -60, -10, -50, 0, -50, -10, -40, 0, -40, -10, -30, 0, -30, -10, -20, 0, -90, 0, -80, 10, -80, 0, -70, 10, -70, 0, -60, 10, -60, 0, -50, 10, -50, 0, -40, 10, -40, 0, -30, 10, -30, 0, -20, 10, -90, 10, -80, 20, -80, 10, -70, 20, -70, 10, -60, 20, -60, 10, -50 |
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
continents = Hash.new | |
continents[:north_america] = [70, 10, -140, -60] | |
continents[:south_america] = [10, -60, -90, -30] | |
continents[:africa] = [40,-20, -20, 40] # <-- smaller, actual is --> [40, -40, -20, 50] | |
continents[:europe] = [70, 40, -10, 50] | |
#continents[:asia] = [80, -20, 50, 180] | |
def grid_up continent | |
grid = Array.new | |
continent[1].upto(continent[0]) do |h| |