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
var topLocations = [{"Locations":"Cedar Grove Park","Lat Long":"-26.75768,152.8438","Footfall":293},{"Locations":"Noel Burns Park","Lat Long":"-26.76416,153.12004","Footfall":289},{"Locations":"Bill Keylock Place","Lat Long":"-27.60254,152.98185","Footfall":288},{"Locations":"Pardalote Park","Lat Long":"-27.60706,153.04122","Footfall":284},{"Locations":"Laurel Oak Park","Lat Long":"-27.62282,153.03159","Footfall":276},{"Locations":"Biambi Yumba Park","Lat Long":"-27.54035,152.96964","Footfall":272},{"Locations":"Homestead Park","Lat Long":"-27.60673,152.95791","Footfall":272},{"Locations":"Crummunda Park","Lat Long":"-26.7643,153.12379","Footfall":271},{"Locations":"Bicentenary Park","Lat Long":"-26.75921,152.85016","Footfall":271},{"Locations":"Hives Park","Lat Long":"-27.53381,152.98028","Footfall":267}]; | |
L.mapbox.accessToken = 'Sample Token'; //Use a Valid Token | |
var featureArray = []; | |
topLocations.forEach(function(ele,i){ | |
lat = parseFloat(ele['Lat Long'].split(',')[0]); | |
lon = parseFloat(ele[' |
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 is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |
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
function detectmob() { | |
if( navigator.userAgent.match(/Android/i) | |
|| navigator.userAgent.match(/webOS/i) | |
|| navigator.userAgent.match(/iPhone/i) | |
|| navigator.userAgent.match(/iPad/i) | |
|| navigator.userAgent.match(/iPod/i) | |
|| navigator.userAgent.match(/BlackBerry/i) | |
|| navigator.userAgent.match(/Windows Phone/i) | |
){ | |
return true; |
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> | |
<title>GoogleMap</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=4.0, user-scalable=yes"/> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<link rel="stylesheet" href="//code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css" /> | |
<style> | |
#map-page, #map-canvas { width: 100%; height: 100%; padding: 0; } |
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> | |
<title>GoogleMap</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=4.0, user-scalable=yes"/> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<link rel="stylesheet" href="//code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css" /> | |
<style> | |
.gm-style-iw{ | |
top: 10px !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
<? | |
class CacheAPC { | |
var $iTtl = 600; // Time To Live | |
var $bEnabled = false; // APC enabled? | |
// constructor | |
function CacheAPC() { | |
$this->bEnabled = extension_loaded('apc'); | |
} |
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
class vertex | |
{ | |
public $key = null; | |
public $visited = 0; | |
public $distance = 1000000; // infinite | |
public $parent = null; | |
public $path = null; | |
public function __construct($key) | |
{ |
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> | |
</head> | |
<body> | |
<!-- <form action="evalcode.php" id="usrform" method="post">--> | |
Code 1: <textarea id="code1" name="code1" rows="10" cols="70"></textarea> Code2: <textarea id="code2" name="code2" rows="10" cols="70"></textarea></br> | |
No of Iterations: <input type="text" name="itr" id="itr"> </br></br> | |
<div align="center"> | |
<input type="submit" align="center" onclick="callAjax()"> |
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
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
var videoDuration; | |
var firstQuartileFlag = true; | |
var mutedFlag = false; | |
var videoad; | |
var updateProgressBar = function() { | |
progress = (100.0 * parseFloat(videoad.prop("played").end(0)) / videoDuration).toFixed(2); | |
if (firstQuartileFlag && progress >= 25.0 && progress < 50.0) { |
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
function getDistance($latitude1, $longitude1, $latitude2, $longitude2) { | |
$earth_radius = 6371000; | |
$dLat = deg2rad($latitude2 - $latitude1); | |
$dLon = deg2rad($longitude2 - $longitude1); | |
$a = sin($dLat/2) * sin($dLat/2) + cos(deg2rad($latitude1)) * cos(deg2rad($latitude2)) * sin($dLon/2) * sin($dLon/2); | |
$c = 2 * asin(sqrt($a)); | |
$d = $earth_radius * $c; |
NewerOlder