Test data is from http://apps.timwhitlock.info/emoji/tables/unicode
#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-
require 'stringio'
data = File.read(ARGV.first)
data.each_codepoint do |codepoint|
// query: select * from html where url="http://some.url.com" and xpath='//title' | |
var yql_url = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D%22" + encodeURIComponent(url) + "%22%20and%0A%20%20%20%20%20%20xpath%3D'%2F%2Ftitle'&format=json&callback=?"; | |
$.getJSON(yql_url, function(json) { | |
if (json && json.query && json.query.results && json.query.results.title) { | |
$('#page_title').html(json.query.results.title); | |
} | |
}); |
# Ruby's TSort requires that you implement | |
# tsort_each_node and tsort_each_child. I | |
# extend Array so that it knows how to | |
# TSort instances of Project, which has a | |
# child_project_id pointing to another | |
# Project. | |
require 'tsort' | |
class Array |
Test data is from http://apps.timwhitlock.info/emoji/tables/unicode
#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-
require 'stringio'
data = File.read(ARGV.first)
data.each_codepoint do |codepoint|
San Francisco 4821 | |
London 1409 | |
Seattle, WA 1083 | |
New York, NY 2056 | |
Portland, OR 949 | |
Chicago, IL 930 | |
Tokyo, Japan 1518 | |
London, UK 894 | |
japan 880 | |
Germany 856 |