| Models | Examples |
|---|---|
| Display ads | Yahoo! |
| Search ads |
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
| #!/bin/bash | |
| for arg; do [[ $arg = /* ]] || arg=$PWD/$arg; absargs+=("$arg"); done; | |
| /Applications/p4merge.app/Contents/Resources/launchp4merge "${absargs[@]}" | |
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
| $sm = $this->getServiceLocator(); | |
| $view = new ViewModel(array('foo' => 'bar')); | |
| $view->setTemplate('foo/bar'); | |
| $resolver = $sm->get('ViewManager')->getResolver(); | |
| $renderer = new PhpRenderer(); | |
| $renderer->setResolver($resolver); | |
| $html = $renderer->render($view); |
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
| # | |
| # This config file is a combination of ideas from: | |
| # http://www.37signals.com/svn/posts/1073-nuts-bolts-haproxy | |
| # http://www.igvita.com/2008/05/13/load-balancing-qos-with-haproxy/ | |
| # http://wiki.railsmachine.com/HAProxy | |
| # http://elwoodicious.com/2008/07/15/nginx-haproxy-thin-fastcgi-php5-load-balanced-rails-with-php-support/ | |
| # http://upstream-berlin.com/2008/01/09/using-haproxy-with-multiple-backends-aka-content-switching/ | |
| # http://wiki.railsmachine.com/HAProxy | |
| # http://gist.github.com/raw/25482/d39fb332edf977602c183194a1cf5e9a0b5264f9 | |
| # |
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 | |
| /** | |
| * Zend Framework 2 | |
| * | |
| * @category Zend | |
| * @package Validator | |
| */ | |
| namespace Zend\Validator; |
This event is triggered by the following classes:
- Zend\Mvc\Application: it's triggered in the
bootstrapmethod.
The following classes are listening to this event (they are sorted from higher priority to lower priority):
- Class: Zend\Mvc\View\Http\ViewManager. Method: onBootstrap. Priority: 10000. Task: preparing the view layer.
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
| use Zend\File\Transfer\Adapter\Http; | |
| $adapter = new Http(); | |
| //$size = new Size(array('min'=>2000)); //minimum bytes filesize | |
| //$adapter->setValidators(array($size), $File['name']); | |
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
| # Requires ImageMagick | |
| # Converting the source from JPEG to PNG - if necessary | |
| convert my_src_image.jpg my_src_image.png | |
| # Option A | |
| # - Requires a temporary intermediate file | |
| # - Drill more than 10 might result in poor results |
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
| (ns clj-wamp-example | |
| (:require [org.httpkit.server :as http-kit] | |
| [clj-wamp.server :as wamp])) | |
| ; Topic URIs | |
| (defn rpc-url [path] (str "http://clj-wamp-example/api#" path)) | |
| (defn evt-url [path] (str "http://clj-wamp-example/event#" path)) | |
| (defn wamp-websocket-handler [req] | |
| (http-kit/with-channel req channel |
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
| (defproject semantic-gs "0.1.0-SNAPSHOT" | |
| :dependencies [[org.clojure/clojure "1.5.1"] | |
| [compojure "1.1.5"] | |
| [garden "0.1.0-beta5"] | |
| [hiccup "1.0.3"]] | |
| :plugins [[lein-ring "0.8.5"]] | |
| :ring {:handler semantic-gs.handler/app} | |
| :profiles | |
| {:dev {:dependencies [[ring-mock "0.1.5"]]}}) |