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 'benchmark' | |
def fibonacci(n) | |
return n if n <= 1 | |
fibonacci( n - 1 ) + fibonacci( n - 2 ) | |
end | |
@cache = [0,1] | |
def fibo(n) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/> | |
<title>ArcGIS API for JavaScript | Simple Geocoding</title> | |
<script src="http://js.arcgis.com/3.9/"></script> | |
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/esri/css/esri.css"> | |
<style> | |
html, body, #map { |
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
Geotrigger Service: https://developers.arcgis.com/en/features/geotrigger-service | |
Esri Developers Summit: http://www.esri.com/events/devsummit | |
ArcGIS for Runtime Installers: https://developers.arcgis.com/en/downloads | |
Blogs de Desenvolvedores Esri: http://blogs.esri.com/esri/arcgis/category/developer | |
Esri Javascript API: https://developers.arcgis.com/javascript | |
Esri Beta Community: https://betacommunity.esri.com | |
Geocoding Service: https://developers.arcgis.com/en/features/geocoding | |
Routing Service: https://developers.arcgis.com/en/features/directions | |
GeoEnrichment Service: https://developers.arcgis.com/en/features/geo-enrichment | |
Geotrigger Service: https://developers.arcgis.com/en/features/geotrigger-service |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<!--The viewport meta tag is used to improve the presentation and behavior of the samples | |
on iOS devices--> | |
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> | |
<title>Rotas Parametrizáveis</title> | |
<link rel="stylesheet" href="http://js.arcgis.com/3.8/js/esri/css/esri.css"> |
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
def gray_code_for(number_of_bits) | |
if number_of_bits == 1 | |
return %w[0 1] | |
end | |
ordered = gray_code_for(number_of_bits - 1) | |
reversed = ordered.reverse | |
ordered.map! { |item| "0#{item}"} | |
reversed.map! { |item| "1#{item}"} | |
ordered + reversed | |
end |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<script src="http://maps.google.com/maps?file=api&v=28&key=xyz" type="text/javascript"> <!-- the required library for google maps usage --> | |
</script> | |
</head> | |
<body> | |
<div id="map" style="width: 500px; height:400px"></div> | |
<script type="text/javascript"> |