Skip to content

Instantly share code, notes, and snippets.

View evanpurkhiser's full-sized avatar

Evan Purkhiser evanpurkhiser

View GitHub Profile
var last_details = $();
$('body').on('click','.info', function (e) {
// Don't let the page reload
e.preventDefault();
last_details.remove();
last_details = $('<div>').html(content_from_ajax)

Clocker was built using the Ruby on Rails (RoR) framework. The Ruby design-paradigm puts a strong emphasis on writing clean and understandable code that doesn’t try and be too clever. During development this philosophy was taken to heart; strong separation of concerns and the single responsability principle were kept in mind for all aspects of the application. The RoR framework tends to allow presentation logic to leak into the presentation markup. However in the spirit of proper design, the Mustache templating framework was used to provide a clean separation of presentation logic from markup. Database design was also thoroughly thought-out to ensure proper referential integrity of entities.

void LinkedList<T>::reverseList()
{
ListNode<T> *previous;
previous = NULL;
ListNode<T> *temp;
while(head != NULL)
{
temp = head->next;
<?php
error_reporting(E_ALL | E_STRICT);
Class lotto{
private $_connection;
function __construct()
{
$auth = include("login.php");
<?php
foreach ($games as $game)
{
// The default values array.. all empty
$default = array_combine($games, array_fill(0, length($games), '-'));
try
{
$sth = $dbh->prepare("SELECT * FROM $game ORDER BY date $sort");
<?php
require('File.Class.php');
Class lotto{
public function init(){
$dbName = "lotto";
try {
$dbh = new PDO('mysql:localhost:3306', 'root', '');
<?php
echo ' <link href="common/style.css" rel="stylesheet" type="text/css" />';
echo "<body onLoad='document.getElementById('song').select();'>";
//create a PDO object to interface with the database
try {
$dbh = new PDO('mysql:localhost:3306', 'root', '');
}
catch (PDOException $e) {
echo 'Connection failed: ' . $e->getMessage();