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
import scala.xml._ | |
def googleLocalisation(adr: String) : Option[(Double, Double)] = { | |
val url = "http://maps.google.com/maps/api/geocode/xml?sensor=false&address=" | |
val xml = XML.load(url+adr) | |
if ((xml \ "status" text) == "OK") { | |
val lat = ((xml \ "result" \ "geometry" \ "location" \ "lat") text).toDouble | |
val lng = ((xml \ "result" \ "geometry" \ "location" \ "lng") text).toDouble | |
Some((lat, lng)) | |
} else { |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
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
ּ_בּ | |
בּ_בּ | |
טּ_טּ | |
כּ‗כּ | |
לּ_לּ | |
מּ_מּ | |
סּ_סּ | |
תּ_תּ | |
٩(×̯×)۶ | |
٩(̾●̮̮̃̾•̃̾)۶ |
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
# Function to print hierarchical call trees as the program executes. | |
# Use "ir.exe -trace" for IronRuby | |
$CALL_DEPTH = 0 | |
p = proc { |op, file, line, method, b, cls| | |
if op == "call" | |
filename = file.nil? ? nil : file.gsub('\\','/') | |
puts "#{$CALL_DEPTH}\t" + ('| ' * $CALL_DEPTH) + "> #{cls}::#{method} #{filename}:#{line}" | |
locals = eval("local_variables", b) | |
local_values = locals.each { |l| |
NewerOlder