Skip to content

Instantly share code, notes, and snippets.

View hobodave's full-sized avatar
🎯
Focusing

David Abdemoulaie hobodave

🎯
Focusing
View GitHub Profile
document.observe('dom:loaded', function(event) {
// I just added this to see if it was a dom loading issue
window.displayItems = function(element, items) {
// have to add function to window since I'm within this stupid observe block
alert(typeof searchVisibility)
term = (element == 'itemList') ? 'Results' : 'Related Items';
element = $(element);
element.childElements().invoke('remove');
<?php
class Mm_Service_Order
{
protected $_orderModel;
protected $_orderModelOptions;
protected $_orderMapper;
<?php
class Base
{
protected $_availableSizes = array();
public function __call($name, $args)
{
$action = strtolower(substr($name, 0, 3));
$field = '_' . strtolower($name[3]) . substr($name, 4);
Fatal error: Class 'sfYaml' not found in /Users/hobodave/dev/work/sentact.svn/lib/Doctrine/lib/Doctrine/Parser/Yml.php on line 0
Call Stack:
0.0004 631392 1. {main}() /opt/local/bin/phpunit:0
0.3180 6090840 2. PHPUnit_TextUI_Command::main() /opt/local/bin/phpunit:52
0.5890 10690792 3. PHPUnit_TextUI_TestRunner->doRun() /opt/local/lib/php/PHPUnit/TextUI/Command.php:128
0.8107 10822392 4. PHPUnit_Framework_TestSuite->run() /opt/local/lib/php/PHPUnit/TextUI/TestRunner.php:324
0.8109 10823624 5. PHPUnit_Framework_TestSuite->run() /opt/local/lib/php/PHPUnit/Framework/TestSuite.php:623
1.5379 32987696 6. PHPUnit_Framework_TestSuite->runTest() /opt/local/lib/php/PHPUnit/Framework/TestSuite.php:660
1.5379 32987696 7. PHPUnit_Framework_TestCase->run() /opt/local/lib/php/PHPUnit/Framework/TestSuite.php:679
<?php
require_once PATH_PROJECT . 'lib/Zend/Loader/Autoloader.php';
$autoloader = Zend_Loader_Autoloader::getInstance()
->setFallbackAutoloader(true);
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
<?php
$this->hasColumn('resolution_source', 'enum', null, array(
'values' => array('web', 'phone', 'pda', 'email'),
'notnull' => true,
'default' => ''
));
<?php
class dTicket extends Doctrine_Record
{
public function setTableDefinition()
{
$this->setTableName('tickets');
$this->hasColumn('id', 'integer', 4, array(
'primary' => true,
'notnull' => true,
'autoincrement' => true));
<?php
class Ticket extends Doctrine_Record
{
public function setTableDefinition()
{
$this->setTableName('tickets');
$this->hasColumn('id', 'integer', 4, array(
'primary' => true,
'notnull' => true,
(function(){
function focusInHandler(e){
Event.element(e).fire("focus:in");
}
function focusOutHandler(e){
Event.element(e).fire("focus:out");
}
if (document.addEventListener){
document.addEventListener("focus", focusInHandler, true);