$ php -s input.php > output.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
<?php | |
function distance($fromLat, $fromLon, $toLat, $toLon) { | |
$radius = 6378.1; // 3963.17 miles | |
$dLat = deg2rad($toLat - $fromLat); | |
$dLon = deg2rad($toLon - $fromLon); | |
$tmp = cos(deg2rad(($fromLat + $toLat) / 2)) * $dLon; | |
$distance = $radius * sqrt($dLat * $dLat + $tmp * $tmp); | |
return round($distance, 1); | |
} |
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
heroku config:add TZ=Europe/Istanbul |
I decided to build an iOS app for my University's bus service that runs through the various campuses.
It was an interesting challenge as I had nothing but the printed timetables (http://www.nottingham.ac.uk/about/documents/903-times.pdf) to use as the data.
Thus I had to come with a suitable data structure that would complement the design & user experience i had in mind for the app.
I also decided to take the challenge of writing the app in swift. This project has helped me get to up speed with swift really quickly.
OlderNewer