Skip to content

Instantly share code, notes, and snippets.

View floydian's full-sized avatar

Wayne Fincher floydian

View GitHub Profile
<?php
/**
* This singleton object is responsible for keeping references to variables like the database object,
* the user object, and any other variable that is required for most pages.
*
*/
class application {
/**
<?php
/**
* This singleton object is responsible for keeping references to variables like the database object,
* the user object, and any other variable that is required for most pages.
*
*/
class application {
/**
window.location.replace('new_web_page.html');
<?php
class Toggle {
private $config;
private $temp;
public function __construct() {
$args = func_get_args();
if (empty($args)) {
throw new Exception('Toggle requires an array or an argument list.');
<?php
function rand_large($min, $max) {
if ($max > PHP_INT_MAX) {
$adjusted_max = bcsub($max, $min);
$adjusted_min = 0;
if ($adjusted_max > PHP_INT_MAX) {
$sections = floor(bcdiv($adjusted_max, PHP_INT_MAX));
$remainder = bcmod($adjusted_max, PHP_INT_MAX);
YUI().use('node', 'dd-drag', function (Y) {
Y.on('contentready', function (e) {
var dds = [],
els = Y.all('#ex1Page .box').each(function (el) {
var key = dds.length;
dds[key] = new Y.DD.Drag({
node: el
});
});