Based on initial version by Tom Isaacson (@parsley72).
Learn more about tracking geo coordinates in your own projects here.
/** | |
* Simply compares two string version values. | |
* | |
* Example: | |
* versionCompare('1.1', '1.2') => -1 | |
* versionCompare('1.1', '1.1') => 0 | |
* versionCompare('1.2', '1.1') => 1 | |
* versionCompare('2.23.3', '2.22.3') => 1 | |
* | |
* Returns: |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Mouse Over and Out with Moving Infobox</title> | |
<script type="text/javascript" src="https://github.com/mbostock/d3/raw/fe671a70e236710412a514fa276e59f875f3c617/d3.js"></script> | |
<link type="text/css" rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<!-- I've only commented changes relevant to this mouse follow stuff --> | |
<!-- btw, this is what an html comment looks like --> |
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
var my_element = document.getElementById('my-element'); | |
//-- Returns true/false | |
my_element.isVisible(my_element); |
<?php | |
if (!function_exists('apache_request_headers')) { | |
function apache_request_headers() { | |
foreach($_SERVER as $key=>$value) { | |
if (substr($key,0,5)=="HTTP_") { | |
$key=str_replace(" ","-",ucwords(str_replace("_"," ",substr($key,5)))); | |
$out[$key]=$value; | |
} | |
} | |
return $out; |
<?php | |
header('Content-Type: text/html; charset=utf-8'); | |
/** | |
* Download the currecy data from the link below, and place it along side this file | |
* @link http://www.currency-iso.org/en/home/tables/table-a1.html Current currency & funds code list | |
*/ | |
$xml = file_get_contents( dirname(__FILE__) . '/dl_iso_table_a1.xml'); | |
$currencyArray = json_decode(json_encode((array) simplexml_load_string($xml)), 1); |
bigcorPar <- function(x, nblocks = 10, verbose = TRUE, ncore="all", ...){ | |
library(ff, quietly = TRUE) | |
require(doMC) | |
if(ncore=="all"){ | |
ncore = multicore:::detectCores() | |
registerDoMC(cores = ncore) | |
} else{ | |
registerDoMC(cores = ncore) | |
} |
/** | |
* An AngularJS directive for Dropzone.js, http://www.dropzonejs.com/ | |
* | |
* Usage: | |
* | |
* <div ng-app="app" ng-controller="SomeCtrl"> | |
* <button dropzone="dropzoneConfig"> | |
* Drag and drop files here or click to upload | |
* </button> | |
* </div> |
function map() { | |
emit(1, { | |
sum: this.value, // the field you want stats for | |
min: this.value, | |
max: this.value, | |
count: 1, | |
diff: 0 | |
}); | |
} |
Based on initial version by Tom Isaacson (@parsley72).
Learn more about tracking geo coordinates in your own projects here.