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
The above code is used to generate a dynamic image similar to below: | |
https://dl.dropbox.com/u/15302156/flows.png |
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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* | |
* @author Jake Toolson | |
* | |
*/ | |
class Uploadify extends CI_Controller | |
{ | |
public $upload_path; |
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 if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* Derived from ASP.NET Setup | |
* | |
* The library contains login, logout, xml helpers, and sessionchecking functions and no other non-authentication methods should be here. | |
* Other methods needing to be added here should just extend this library for tidyness sake otherwise containing all license service methods | |
* within this library would be overwhelming. | |
* | |
* This library interacts with a remote licensing service through SOAP which brokers or interacts with Salesforce as |
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
SELECT s.eh AS hub, | |
Month(Concat(s.yearmonth, '-01')) AS m, | |
Sum(IF(Year(Concat(s.yearmonth, '-01')) = 2006, Round( | |
1000 * s.elec_price / s.gas_price), '')) AS '2006', | |
Sum(IF(Year(Concat(s.yearmonth, '-01')) = 2007, Round( | |
1000 * s.elec_price / s.gas_price), '')) AS '2007', | |
Sum(IF(Year(Concat(s.yearmonth, '-01')) = 2008, Round( | |
1000 * s.elec_price / s.gas_price), '')) AS '2008', | |
Sum(IF(Year(Concat(s.yearmonth, '-01')) = 2009, Round( | |
1000 * s.elec_price / s.gas_price), '')) AS '2009', |
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
// Jake Toolson | |
// jQuery used to handle the rotating fullsize background images, the external AJAX page loading, opening and closing of the book. Looking at it now, clearly places where I could rewrite it to clean it up. | |
jQuery.fx.interval = 33; | |
$(document).ready(function(){ | |
var img_folder = 'http://www.jaketoolson.com/ems/images/'; | |
$.supersized({ | |
slideshow : 1, | |
autoplay : 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
// Jake Toolson | |
// This code is used to scrape raw data from websites which is then stored and used at a later time. | |
// This code incorporates the use of curl as well as the AWESOME phpQuery DOM library. | |
// Error handling is done using the throw and catch handlers. Errors are logged with a custom log class. | |
// This is run at the command prompt level. | |
ob_start(); | |
try | |
{ | |
$urls = array(); |
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
// Jake Toolson | |
// This code allows a user to select option(s) from one box and move them over to another and then the selections are saved to the database and can be changed at anytime. Although simple, the select box' content changed dynamically based on live input from the user. The user could also filter out the results by typing in keywords. In addition, and what was most difficult was the fact that the browsers don't handle setting already selected options to an inactive state! Surprising, I know but I figured out a way around this. Oh and in addition, the user was limited to the number of selections. | |
// Also, the reason I am sharing this code sample, is because I wrote it in 2005 and even though jQuery, the javascript framework this utilizes, has been upgraded numerous times, this code still works and has remain untouched since (mainly due to time constraints). Sure it could be optimized and cut in half but let it do its thing! | |
$().ready(function(){ | |
// Color variables when an option is di |
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
// Jake Toolson | |
// PHP Code Sample | |
// This illustrates a library method which shows my use of comments/notes. | |
/** | |
* Loop through field arrays and retrieve only the 'settings' for each field. | |
* These are NOT the attributes but rather the array which holds more specifics such as rules, type, label etc. | |
* | |
* $omit_key is used to omit a specific key=>value pair from the return array. | |
* |
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 | |
// Jake Toolson | |
// PHP Code Sample | |
// This illustrates the styles I use and techniques/methods used to problem solve. | |
function words_sort_callback($a, $b) | |
{ | |
if ($b[0] - $a[0]) | |
{ |
NewerOlder