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
/** | |
* A Simple HTTP POST/GET Helper Class for Groovy | |
* | |
* @author Tony Landis | |
* @copyright 2007 Tony Landis | |
* @website http://www.tonylandis.com | |
* @license BSD License (http://www.opensource.org/licenses/bsd-license.php) | |
* @example h = new GroovyHTTP('http://www.google.com/search') | |
* h.setMethod('GET') | |
* h.setParam('q', 'groovy') |
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 | |
/** | |
* Smarty {json} plugin | |
* | |
* Type: function | |
* Name: json | |
* Purpose: fetch json file and assign result as a template variable (array) | |
* @author Tony Landis | |
* @copyright 2007 Tony Landis | |
* @website http://www.tonylandis.com |
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 | |
/** | |
* Smarty {soap} plugin | |
* | |
* Type: function<br> | |
* Name: soap<br> | |
* Purpose: post http data and display results from soap webservice | |
* Params: url, post(true/false - passes along orig params), assign, | |
* Usage: {soap assign=soapResponse | |
* endpoint=http://www.site.com/search.soap |
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 | |
/** | |
* PDO SINGLETON CLASS | |
* | |
* @author Tony Landis | |
* @link http://www.tonylandis.com | |
* @license Use how you like it, just please don't remove or alter this PHPDoc | |
*/ | |
class sdb |
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 | |
/** | |
* PDO SINGLETON CLASS, ADODB ENABLED | |
* | |
* @author Tony Landis | |
* @link http://www.tonylandis.com | |
* @license Use how you like it, just please don't remove or alter this PHPDoc | |
*/ | |
class sdb | |
{ |
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 | |
$data = array( | |
array('company'=>'AIG', 'id'=>1, 'balance'=> '-$99,999,999,999.00'), | |
array('company'=>'Wachovia', 'id'=>2, 'balance'=> '-$10,000,000.00'), | |
array('company'=>'HP', 'id'=>3, 'balance'=> '$555,000.000.00'), | |
array('company'=>'IBM', 'id'=>4, 'balance'=> '$12,000.00') | |
); | |
$renderer = new ArrayToTextTable($data); |
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 | |
/** | |
* Array to Text Table Generation Class | |
* | |
* @author Tony Landis <[email protected]> | |
* @link http://www.tonylandis.com/ | |
* @copyright Copyright (C) 2006-2009 Tony Landis | |
* @license http://www.opensource.org/licenses/bsd-license.php | |
*/ | |
class ArrayToTextTable |
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 | |
#Quick and dirty PDO vs ADOdb benchmark | |
#PDO benchmark script: | |
$db = new PDO("mysql:dbname=logs;host=127.0.0.1", "root", ""); | |
$rs = $db->query("select * from ses limit 10")->fetchAll(PDO::FETCH_ASSOC); | |
foreach($rs as $r) {} | |
#ADOdb benchmark script |
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
""" | |
Convert CSV string to fixed width text table. Supports multi-line rows, column width limits, and creates a header row automatically | |
@author Tony Landis | |
@link http://www.tonylandis.com | |
@license GPL | |
""" | |
from math import ceil | |
class CsvToTxt(): |
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
<!-- | |
AgileGallery Source Code | |
Author: Tony Landis | |
Link: http://www.agilegallery.com | |
Link: http://www.tonylandis.com | |
License: GPL | |
Restrictions: Free for personal/commerical use, the link/credit must remain intact and visible | |
--> | |
<?xml version="1.0" encoding="UTF-8"?> |
OlderNewer