Skip to content

Instantly share code, notes, and snippets.

# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * command to be executed
@smokymountains
smokymountains / Box-Muller Transform
Created May 8, 2015 00:51
Box-Muller Transform
#include <cstdlib>
#include <cmath>
#include <limits>
double generateGaussianNoise(double mu, double sigma)
{
const double epsilon = std::numeric_limits<double>::min();
const double two_pi = 2.0*3.14159265358979323846;
static double z0, z1;
static bool generate;
@smokymountains
smokymountains / image-ajax
Last active August 29, 2015 14:20
XHR-Free Data Posting
function sendData(url) {
function remove() {
img = null;
}
var img = new Image();
img.onerror = remove;
img.onload = remove;
img.src = url;
}
<?php
/**
* Main class that interacts with the EscapiaAPI.
*/
class EscapiaAPI {
const API_VERSION = '1.030';
const MAX_RESPONSES = 10000;
const SOAP_NAMESPACE = 'http://www.escapia.com/EVRN/2007/02';