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
<!DOCTYPE html> | |
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta name="mobile-web-app-capable" content="yes" /> | |
<meta name="apple-mobile-web-app-capable" content="yes" /> | |
<title>Starfield</title> | |
</head> |
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
<!-- set the max width accordingly --> | |
<div style="margin: 0 auto; max-width: 960px; position: relative;"> | |
<!-- set the padding % as the aspect ratio of the content e.g. 960/560 = 5.833333 --> | |
<div style="padding-bottom: 58.33333333%;"> | |
<!-- the width=1; max-width=100% is for iOS --> | |
<iframe scrolling="no" src="urls/to/iframe.html" style="position: absolute;width: 1px;min-width:100%;height: 100%;"></iframe> | |
</div> | |
</div> |
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
/** | |
* Pick a random point within a triangle | |
* @param {Object} a Point {x:# , y:#} | |
* @param {Object} b Point {x:# , y:#} | |
* @param {Object} c Point {x:# , y:#} | |
* @returns Object {x:# , y:#} | |
* | |
* @see http://parametricplayground.blogspot.co.uk/2011/02/random-points-distributed-inside.html | |
*/ |
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
DELIMITER $$ | |
DROP FUNCTION IF EXISTS d $$ | |
CREATE FUNCTION d(lat1 FLOAT, lon1 FLOAT, lat2 FLOAT, lon2 FLOAT) RETURNS FLOAT | |
DETERMINISTIC | |
BEGIN | |
DECLARE R FLOAT; | |
DECLARE rad FLOAT; | |
DECLARE a FLOAT; | |
DECLARE d FLOAT; |