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
<?php | |
if($paramFetcher['owner'] != null && ($owner = $userMgr->getById($paramFetcher['owner']))) { | |
$org->setOwner($owner); | |
} | |
?> | |
vs. | |
<?php | |
if($paramFetcher['owner'] != null) { |
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
DELIMITER $$ | |
CREATE FUNCTION `bearing` (lat1 DECIMAL(8,6), lng1 DECIMAL(9,6), lat2 DECIMAL(8,6), lng2 DECIMAL(9,6)) RETURNS DECIMAL(9,6) | |
BEGIN | |
DECLARE dLng DECIMAL(30,15); | |
DECLARE y DECIMAL(30,15); | |
DECLARE x DECIMAL(30,15); | |
DECLARE bearing DECIMAL(30,15); | |
SET dLng = RADIANS( lng2 ) - RADIANS( lng1 ); |
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
DELIMITER $$ | |
CREATE FUNCTION `haversine` (lat1 DECIMAL(8,6), lng1 DECIMAL(8,6), lat2 DECIMAL(8,6), lng2 DECIMAL(8,6)) RETURNS DECIMAL(8,6) | |
BEGIN | |
DECLARE R INT; | |
DECLARE dLat DECIMAL(30,15); | |
DECLARE dLng DECIMAL(30,15); | |
DECLARE a1 DECIMAL(30,15); | |
DECLARE a2 DECIMAL(30,15); | |
DECLARE a DECIMAL(30,15); | |
DECLARE c DECIMAL(30,15); |