Skip to content

Instantly share code, notes, and snippets.

View desireesantos's full-sized avatar

Desiree Santos desireesantos

View GitHub Profile
@desireesantos
desireesantos / index.html
Created December 14, 2013 22:21
Index.html
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<link rel="stylesheet" type="text/css" href="/css/style.css">
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDJQ59nuKUo1aSnhH0EV_UyJZSu0t3XU-4&sensor=true">
</script>
<script type="text/javascript" src="/js/map.js"></script>
</head>
@desireesantos
desireesantos / style.css
Created December 14, 2013 22:23
style.css
html, body, #map-canvas {
height: 100%;
margin: 0px;
padding: 0px;
}
#panel {
position: absolute;
top: 5px;
left: 92%;
function initialize() {
geocoder = new google.maps.Geocoder();
alert(geocoder.latitude);
alert(geocoder.longitude);
var latlng = new google.maps.LatLng(-22.618827234831404, -42.57636812499999);
var mapOptions = {
zoom: 8,
center: latlng
}
map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
@desireesantos
desireesantos / Folders
Created December 14, 2013 22:27
Folder struct LevelUp project
-resources
-css
--style.css
-img
--icon.png
-js
--map.js
-template
--index.html
@desireesantos
desireesantos / index.html
Created December 26, 2013 16:55
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Heatmaps</title>
<link rel="stylesheet" type="text/css" href="/css/style.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=visualization"></script>
<script type="text/javascript" src="/js/heatmap.js"></script>
</head>
@desireesantos
desireesantos / heatmap.js
Created December 26, 2013 16:57
Js file responsible to generate heatmap
var map,heatmap;
var taxiData = new Array();
var gradient = [
'rgba(0, 255, 255, 0)','rgba(0, 255, 255, 1)',
'rgba(0, 191, 255, 1)','rgba(0, 127, 255, 1)',
'rgba(0, 63, 255, 1)','rgba(0, 0, 255, 1)',
'rgba(0, 0, 223, 1)','rgba(0, 0, 191, 1)',
'rgba(0, 0, 159, 1)','rgba(0, 0, 127, 1)',
'rgba(63, 0, 91, 1)','rgba(127, 0, 63, 1)',
'rgba(191, 0, 31, 1)','rgba(255, 0, 0, 1)'
@desireesantos
desireesantos / data.json
Created December 26, 2013 16:58
Long and Latitude on BR area.
[
{
"latitude": -19.212355602107472,
"longitude": -44.20234468749999
},
{
"latitude": -22.618827234831404,
"longitude": -42.57636812499999
},
{
int direction= 3;
int step = 2;
int velocity = 5;
int number = 0;
char command;
#define FORWARD LOW
#define BACKWARD HIGH
void setup(){
@desireesantos
desireesantos / controller.js
Last active August 29, 2015 14:04
Módulo responsável por gerenciar socket
var ws = require('ws');
exports.create = function () {
machine = new Machine(name,status);
ws.callSocket(machine.status);
}
/*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* Copyright (c) 2000 */
/* All Rights Reserved. */
/* */
/* Permission is hereby granted, free of charge, to use and distribute */
/* this software and its documentation without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */