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
# http://www.movable-type.co.uk/scripts/latlong.html | |
def distance_from(place, unit = :km) | |
radius = (unit == :km) ? 6371 : 3959 | |
dLat = (place.source[:lat] - source[:lat]) * Math::PI / 180 | |
dLon = (place.source[:lng] - source[:lng]) * Math::PI / 180 | |
lat1 = source[:lat] * Math::PI / 180 | |
lat2 = place.source[:lat] * Math::PI / 180 | |
a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.sin(dLon / 2) * Math.sin(dLon / 2) * Math.cos(lat1) * Math.cos(lat2) | |
c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)) |
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
.btn-group-radio input[type=radio] { | |
visibility: hidden; | |
position: absolute !important; | |
top: -9999px !important; | |
left: -9999px !important; | |
} | |
.btn-group-radio input[type=radio]:checked + .btn { | |
color: #333333; | |
background-color: #e6e6e6; |
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
[ | |
{ | |
"featureType": "water", | |
"elementType": "geometry", | |
"stylers": [ | |
{ "color": "#b1bdd6" } | |
] | |
},{ | |
"featureType": "water", | |
"elementType": "labels.text.fill", |
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 random_close_location(max_dist = 0.5, km = true) | |
# http://www.geomidpoint.com/random/calculation.html | |
return unless source && source[:lat] != nil && source[:lng] != nil | |
deg_to_rad = Math::PI / 180 | |
rad_to_deg = 180 / Math::PI | |
radius_earth_M = 3960.056052 | |
radius_earth_Km = 6372.796924 |
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
.circle-radio-boxes { | |
margin-left: -10px; | |
padding-top: 5px; | |
} | |
.circle-radio-boxes input[type=radio] { | |
visibility: hidden; | |
position: absolute !important; | |
top: -9999px !important; | |
left: -9999px !important; | |
} |
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 name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta charset="utf-8"> | |
<title>Simple markers</title> | |
<link href="https://developers.google.com/maps/documentation/javascript/examples/default.css" rel="stylesheet"> | |
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> | |
<script> | |
function initialize() { |
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
/* This Source Code Form is subject to the terms of the Mozilla Public | |
* License, v. 2.0. If a copy of the MPL was not distributed with this | |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */ | |
@namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); | |
/* bidi */ | |
[dir="rtl"] { |
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
/* This Source Code Form is subject to the terms of the Mozilla Public | |
* License, v. 2.0. If a copy of the MPL was not distributed with this | |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
/** | |
Styles for old GFX form widgets | |
**/ | |
@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */ |
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 charset='utf-8'/> | |
<meta content='width=device-width, initial-scale=1.0' name='viewport'/> | |
<title>FA 3.2.1 performance test</title> | |
<script src="js/test.js"></script> | |
<link rel="stylesheet" href="css/font-awesome.3.2.1.min.css"> | |
</head> | |
<body onload="test()" id="body" data-icon-class="icon"></body> |
OlderNewer