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
function haversineDistance(lat1, lon1, lat2, lon2) { | |
'use strict'; | |
var R = 6378100; // metres | |
var dLat = this.deg2rad(lat2 - lat1); | |
var dLon = this.deg2rad(lon2 - lon1); | |
var a = | |
Math.sin(dLat / 2) * Math.sin(dLat / 2) + | |
Math.cos(this.deg2rad(lat1)) * Math.cos(this.deg2rad(lat2)) * | |
Math.sin(dLon / 2) * Math.sin(dLon / 2); | |
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); |
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
[ | |
{ | |
"id": "Quick-test", | |
"name": "Quick test", | |
"description": "", | |
"line": 1, | |
"keyword": "Feature", | |
"uri": "Hardy/tests/quicktests/test.feature", | |
"elements": [ | |
{ |
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
/* "<Given> I wait for "N" seconds */ | |
this.Given(/^I wait for "([^"]*)" seconds$/, function (seconds, callback) { | |
this.pause(seconds*1000, callback); | |
}); | |
/* "<Given> I wait for "elementname" to be present" */ | |
this.Given(/^I wait for "([^"]*)" to be present$/, function (selector, callback) { | |
selector = selectors(selector); | |
this.waitFor(selector, 1000, function (err, result) { | |
if(err) { |
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
/* CSS */ | |
html,body, #mapContainer { | |
font-family:sans-serif; | |
background:#fff; | |
color:#444; | |
height:100%; | |
padding:0; | |
margin:0; | |
} |
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
(function(e,t,n){function h(t,n){this.element=t,this.options=e.extend({},s,n),this._defaults=s,this._plugin=r,this.init()}function p(e,t){var n=new u.kml.Manager;n.addObserver("state",l(function(e){e.state==="finished"&&t.call(this,e)},this)),n.parseKML(e)}function d(t){var n=t.target[t.type];if(e.isFunction(n)){var r=e.Event(t.type,{originalEvent:t,geo:{latitude:t.target.coordinate.latitude,longitude:t.target.coordinate.longitude},target:t.target});n.call(this.element,r)}}function v(e){return typeof e=="function"}var r="jHERE",i="0.2.0",s,o,u,a,f,l=e.proxy,c;s={appId:"_peU-uCkp-j8ovkzFGNU",authToken:"gBoUkAMoxoqIWfxWA5DuMQ",zoom:12,center:[52.49,13.37],enable:["behavior","zoombar","scalebar","typeselector"],type:"map",marker:{text:"",textColor:"#333333",fill:"#ff6347",stroke:"#333333",shape:"balloon",icon:undefined},bubble:{content:"",closable:!0,onclose:e.noop},heatmap:{max:20,opacity:.8,coarseness:2}},e[r]=c={},o=h.prototype,c.defaultCredentials=function(e,t){f={appId:e,authenticationToken:t},a.load().is.d |
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
/* | |
* Strikethrough | |
*/ | |
del { | |
text-decoration:none; | |
position:relative; | |
} | |
del::after { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>Web Audio API</title> | |
</head> | |
<body> | |
<p class="play">Play</p> | |
<p class="stop">Stop</p> |
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
/** | |
* Typing animation with pure CSS | |
* Revised. Browser support (as of Feb 2012): Firefox, IE10 | |
*/ | |
@keyframes typing { from { width: 0; } } | |
@keyframes blink-caret { 50% { border-color: transparent; } } | |
h1 { | |
font: bold 200% Consolas, Monaco, monospace; |
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
//Our little runner, celebration animation and placeholder | |
// for an empty set of possible maze generation steps | |
L="♥", | |
// q = current font size, | |
// z = width and generic constant, | |
// h = animation loop counter | |
q=z=h=21, | |
// All the colours we need, | |
// the hsla is pretty but tricky to shorten |
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
div { | |
width: 75px; | |
height: 100px; | |
background: black url('http://www.developer.nokia.com/Community/Piazza/images/Blog-Icon.png') no-repeat 50%; | |
background-size: contain; | |
} |
NewerOlder