I hereby claim:
- I am zephster on github.
- I am zeph (https://keybase.io/zeph) on keybase.
- I have a public key whose fingerprint is 391C F44B 0E38 89A7 CC01 B53C FA52 656B F3DE 41A4
To claim this, I am signing this object:
function custom_sort($a, $b) { | |
if ($a == $b) { return 0; } | |
$order = array("things", "i", "want", "in", "order"); | |
$position = array_search($a, $order); | |
$position2 = array_search($b, $order); | |
if ($position !== false && $position2 !== false) return ($position < $position2) ? -1 : 1; | |
if ($position !== false) { return -1; } |
function calculateNearestCity(myGeo, cityGeo) | |
{ | |
//using the Haversine formula - http://en.wikipedia.org/wiki/Haversine_formula | |
var deg2rad = Math.PI / 180, | |
cos = Math.cos, | |
sin = Math.sin, | |
earth = 6371; //radius of earth in km | |
var derivedLat = (cityGeo.lat - myGeo.lat) * deg2rad, | |
derivedLon = (cityGeo.lon - myGeo.lon) * deg2rad; |
$(document).on('hidden.bs.modal', '.modal', function(e) | |
{ | |
$(this).removeClass('bs-modal-stack'); | |
$('body').data('bs_open_modals', $('body').data('bs_open_modals') - 1); | |
if ($(this).hasClass('is-clone')) | |
$(this).remove(); | |
}); | |
$(document).on('shown.bs.modal', '.modal', function (e) |
private function _diff($old, $new) | |
{ | |
$diffs = array(); | |
foreach ($old as $section => $v) | |
{ | |
if (is_array($v)) | |
{ | |
$array_diffs = $this->_diff($v, $new[$section]); |
<style> | |
.search-minimum-rating { | |
border : none; | |
float : left; | |
padding: 0; | |
} | |
.search-minimum-rating > input { | |
display: none; | |
} | |
.search-minimum-rating > label:before { |
<!doctype html> | |
<html> | |
<head> | |
<title>AWmonitor</title> | |
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script> | |
</head> | |
<body> | |
<p> | |
AWmonitor, by brandon | |
</p> |
<style> | |
.progress-bar { | |
padding: 5px; | |
height : 20px; | |
} | |
.progress-bar > span { | |
height : 100%; | |
display : block; | |
overflow : hidden; |
Handlebars.registerHelper({ | |
// usage: {{inc @index}} | |
inc: function(value) | |
{ | |
return parseInt(value) + 1; | |
}, | |
// usage: {{#if_eq a b}} or {{^if_eq a b}} for not equal | |
if_eq: function(a, b, c, options) | |
{ | |
if (typeof(c) === "object") |
// returns null if $needle is not found anywhere in $haystack, | |
// or an array of $haystack keys to reference $needle where it is located within $haystack | |
// eg. [0]departure [1]connecting [2]0 => $haystack[departure][connecting][0] == $needle | |
private function _recursive_array_search($needle, $haystack) | |
{ | |
foreach ($haystack as $key => $value) | |
{ | |
if ($needle === $value) | |
{ | |
return array($key); |
I hereby claim:
To claim this, I am signing this object: