This file contains 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
$(document).ready(function() { | |
"use strict"; | |
var ident = 0; // generate unique element id | |
// Find all iframe DFP ads | |
$('iframe').each(function() { | |
var width = $(this).width(), | |
height = $(this).height(), |
This file contains 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
/** | |
* Primary application logic for our Functional Programming blog example | |
* See related blog series at: http://www.datchley.name/tag/functional-programming/ | |
* Version: 2.0 | |
*/ | |
// A simple, resuable comparison for '>=' | |
function greaterThanOrEqual(a, b) { | |
return a >= b | |
} |
This file contains 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
/**************\ | |
* Algorithms * | |
\**************/ | |
// Given an array of objects summarizing the number of fish in an aquarium, | |
// find the percent of fish where the species is unknown (the `species` is | |
// `undefined`). Return the percentage as a whole number between `0` and `100`. | |
// Example input: |
This file contains 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<!-- Stylesheets to handle CSS --> | |
<link rel="stylesheet" type="text/css" href="js/extjs/resources/css/ext-all.css" /> | |
<!-- Javascript for the applications --> | |
<!-- <script type="text/javascript" src="js/extjs/ext-all-debug.js"></script> --> | |
<script type="text/javascript" src="js/extjs/bootstrap.js"></script> | |
<script type="text/javascript"> |
This file contains 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
let isFunction = function(obj) { | |
return typeof obj == 'function' || false; | |
}; | |
class EventEmitter { | |
constructor() { | |
this.listeners = new Map(); | |
} | |
addListener(label, callback) { | |
this.listeners.has(label) || this.listeners.set(label, []); |
This file contains 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
WITH all_builds AS ( | |
/* | |
* Set this up as a Materialized View after each "sync" process | |
* which allows querying by VIN # or build_id | |
*/ | |
SELECT | |
'Base' as type, | |
s.header as header, | |
s.description as description, | |
null as value, |
This file contains 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 | |
// the template | |
$template = "<h1>{TITLE}</h1>"; | |
// add any template placeholder key/values here | |
$map = array( | |
'TITLE' => "ExtJS Sucks" | |
); | |
// Quick and dirty template parser, replace occurences of '{KEY}' with |
This file contains 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
#!/bin/sh | |
# | |
# @file pre-commit | |
# @author David Atchley, <david.atchley@answers.com> | |
# @date Wed Dec 18 14:02:39 CST 2013 | |
# | |
# Pre Commit checks for various syntax and cleaning prio | |
# to committing. Exits with non-zero to stop commit | |
# | |
#---------------------------------------------------------------------- |
NewerOlder