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 | |
$select->where | |
->literal('LOWER(campaign.title) LIKE "%'.strtolower($data['search']).'%"') | |
->or | |
->literal('LOWER(campaign.description) LIKE "%'.strtolower($data['search']).'%"'); |
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 | |
namespace Application\Controller; | |
use Zend\Mvc\Controller\AbstractActionController; | |
use Zend\View\Model\ViewModel; | |
use Zend\Http\Client; | |
use Zend\Http\Client\Adapter\Curl; | |
use Zend\Json\Json; |
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
var array = [22, 44, 17, 47, 75, 26, 81, 15, 31, 23, 78, 95, 84, 29, 134, 64]; | |
function indexOfSmallest(a) { | |
var lowest = 0; | |
for (var i = 1; i < a.length; i++) { | |
if (a[i] < a[lowest]) lowest = i; | |
} | |
return lowest; | |
} |
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 fun route access /install by /setup | |
resources.router.routes.install.type = "Zend_Controller_Router_Route_Static" | |
resources.router.routes.install.route = "setup" | |
resources.router.routes.install.defaults.module = "install" | |
resources.router.routes.install.defaults.controller = "index" | |
resources.router.routes.install.defaults.action = "index" |
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 | |
$loader = require __DIR__.'/vendor/autoload.php'; | |
$loader->add('React', __DIR__); | |
$loop = React\EventLoop\Factory::create(); | |
$files = array( | |
'node-v0.6.18.tar.gz' => 'http://nodejs.org/dist/v0.6.18/node-v0.6.18.tar.gz', | |
'php-5.4.3.tar.gz' => 'http://it.php.net/get/php-5.4.3.tar.gz/from/this/mirror', | |
); |
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
window.CustomerListView = Backbone.View.extend({ | |
template: _.template($('#CustomerListView').html()), | |
page: 1, | |
sort: 'asc', | |
search: { | |
name: "", | |
email: "", |
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
var callServer = function(args, callback) { | |
var url = "http://www.urbandictionary.com/iphone/search/define"; | |
$.ajax({ | |
url: url, | |
data: args, | |
dataType: "jsonp", | |
type: "GET", | |
success: function(result) { | |
callback(result); | |
} |
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
define('AppLoad', ['jquery', 'underscore', 'backbone', 'AppConfig', 'ProjectCollection', 'PhotographyCollection'], function ($, _, Backbone, AppConfig, ProjectCollection, PhotographyCollection) { | |
var AppLoad = _.extend({}, Backbone.Events); | |
AppLoad.GDRIVE_LOADED = 'GDRIVE_LOADED'; | |
AppLoad.projectCollection = null; | |
AppLoad.photographyCollection = null; | |
AppLoad.totalLoaded = 0; |
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 | |
namespace HTMLPurifier\Controller\Plugin; | |
use Zend\Mvc\Controller\Plugin\AbstractPlugin; | |
class Purifier extends AbstractPlugin | |
{ | |
public function __invoke($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 | |
namespace Application\Controller\Plugin; | |
use Zend\Mvc\Controller\Plugin\AbstractPlugin; | |
use Zend\Debug\Debug; | |
class Dump extends AbstractPlugin | |
{ | |
public function __invoke($var, $label = null, $echo = true) |
OlderNewer