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
CREATE TABLE events ( | |
id serial PRIMARY KEY, | |
title varchar(255) NOT NULL, | |
body text, | |
start_date date NOT NULL, | |
start_time time NOT NULL, | |
end_date date default NULL, | |
end_time time default NULL, | |
recurrence_frequency integer default 1, | |
recurrence varchar(10) NOT NULL default 'Never' CHECK(recurrence IN ('Never', 'Daily', 'Weekly', 'Monthly', 'Yearly')), |
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
public function generateEventOccurrences() | |
{ | |
// Flush all existing occurrences | |
foreach ($this->buildEventOccurrences() as $event_occurrence) { | |
$event_occurrence->delete(); | |
} | |
// Rebuild based on the new date information | |
// Determine start timestamp |
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
<?php | |
function get_url($with_query_string = TRUE, $canonical_filter = array()) | |
{ | |
$query = NULL; | |
$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); | |
$port = ':' . $_SERVER['SERVER_PORT']; | |
$host = $_SERVER['SERVER_NAME']; | |
$scheme = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') | |
? 'https' |
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
gsettings set org.gnome.shell.overrides button-layout 'close:' |
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(inputs){ | |
var values = {}; | |
for (var i = 0; i < inputs.length; i++) { | |
if (inputs[i].name.indexOf('[') != -1) { | |
var parts = inputs[i].name.split(/\[|\]\[|\]/g); | |
var value = inputs[i].value; | |
for (var j = parts.length; j > 0; j--) { | |
if (parts[j - 1]) { |
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
/** | |
* Allows for IE's setInterval and setTimeout to pass parameters | |
*/ | |
(function(f){ | |
window.setTimeout = f(window.setTimeout); | |
window.setInterval = f(window.setInterval); | |
})(function(f){ | |
return function(c,t){ | |
var a=[].slice.call(arguments,2); | |
return f(function(){ c.apply(this,a); },t); |
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
<?php | |
/** | |
* Constructing an iw object is not allowed, this is purely for | |
* namespacing and static controls. | |
* | |
* @final | |
* @access private | |
* @param void | |
* @return void |
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
<?php | |
/** | |
* Many examples of pre 5.3 versions of this function use recursion | |
* this one avoids it for people who, like me, are only going to rely | |
* on this logic in a single place. In short, you can fully remove the | |
* function definition and implications and the actual code will still | |
* work. That is, the function does not need to call itself. | |
*/ | |
function array_replace_recursive($base, $replacements) |
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
REST is software design on the scale of decades: every detail is intended to promote software longevity and independent evolution. Many of the constraints are directly opposed to short-term efficiency. Unfortunately, people are fairly good at short-term design, and usually awful at long-term design. Most don’t think they need to design past the current release. There are more than a few software methodologies that portray any long-term thinking as wrong-headed, ivory tower design (which it can be if it isn’t motivated by real requirements). |
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
\Dotink\Flourish\ | |
# Loaded from /includes/lib/flourish via: | |
# | |
# 'autoloaders' => array( | |
# '\Dotink\Flourish\*' => 'COMPAT:includes/lib/flourish' | |
# ) | |
ORM | |
ActiveRecord |
OlderNewer