Get location data from a string in PHP.
Note that you can only make a certain amount of requests, so use sparingly.
/** | |
* gulp-angular | |
* Nik Sudan | |
* | |
* Commands: | |
* gulp Creates dist files | |
* gulp watch Continuously creates dist files when files are changed | |
* gulp styles Compiles SCSS | |
* gulp app Compiles app Javascript | |
* gulp components Compiles components |
<?php | |
$regions = new Regions('General'); | |
$regions->add('North', 54.5742270, -1.2349560); | |
$regions->add('North West', 53.9690089, -2.6276908); | |
$regions->add('East Anglia', 52.6308859, 1.2973550); | |
$regions->add('Midlands', 52.6368778, -1.1397592); | |
$regions->add('Wales', 52.1306607, -3.7837117); | |
$regions->add('South East', 50.7680350, 0.2904720); | |
$regions->add('Scotland', 56.4906712, -4.2026458); | |
$regions->add('South West', 50.7772135, -3.9994610); |
// Makes a date readable | |
app.filter('fuzzyDate', function() { | |
return function(input, all) { | |
var now = new Date(); | |
var now = new Date(now.valueOf() + -now.getTimezoneOffset() * 60000); | |
var then = Date.parse(input); | |
if (!then) { | |
var s = input.replace(' ', 'T'); |
<?php | |
/** | |
* Restyle login page | |
* | |
* @return void | |
*/ | |
function restyle_login_page() | |
{ ?> | |
<style type="text/css"> |
/** | |
* Gets information about where the current camera is facing | |
* | |
* @return RaycastHit/Boolean | |
*/ | |
function getTarget() | |
{ | |
var target : RaycastHit; | |
if ( Physics.Raycast( transform.position, transform.TransformDirection( Vector3.forward ), target ) ) { |
<div class="fadeCycle"> | |
<img src="img1.jpg"> | |
<img src="img2.jpg"> | |
<img src="img2.jpg"> | |
</div> |
<div class="fadeWhenScrolledTo"> | |
<h1>Guess what?</h1> | |
<p>This should fade in when you scroll to it!</p> | |
</div> | |
<div class="fadeWhenScrolledTo"> | |
<h1>How is that possible?</h1> | |
<p>With this adequate jQuery script, that's how!</p> | |
</div> |
<h1>£<span class="numberRoll">100</span></h1> |
<?php | |
/** | |
* URL extraction class | |
* | |
* @author Nik Sudan | |
*/ | |
class UrlExtractor { | |
public static $parts = array(); |