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
$oFormRow = \Zend\Form\View\Helper\FormRow(); | |
echo $oFormRow->render($myElement); | |
// or | |
echo $oFormRow($myElement) | |
// Always produces empty markup when used outside zend views. Otherwise works ok. |
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
alias sudo='sudo ' | |
alias edit='SUDO_EDITOR="open -FWne" sudo -e' | |
alias edit_hosts='edit /etc/hosts' | |
alias edit_httpd='edit /etc/apache2/httpd.conf' | |
alias edit_php='edit /etc/php.ini' | |
alias edit_profile='open -e ~/.profile' | |
alias edit_vhosts='edit /etc/apache2/extra/httpd-vhosts.conf' | |
alias goto_mw='goto_web; cd mindworks' |
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
$idNumbers = $oRegistry->get('IdNumbers')->setEntity(Entity::STM_PROCESS, $iStmProcessId); | |
$isbn = $idNumbers->has('isbn') ? $idNumbers->getNumber('isbn') : null; |
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
public function getServiceConfig() | |
{ | |
return array( | |
'factories' => array( | |
'Pizza' => function ($sm) { | |
/** @var $sm \Zend\ServiceManager\ServiceManager */ | |
$oObject = new \Application\Model\Pizza(); | |
return $oObject; | |
}, | |
'Ingredient' => function ($sm) { |
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
package test | |
object TestApp { | |
def main (args: Array[String]) { | |
val p = new HelloWorldPrinter | |
p.output() | |
println("Howdy") | |
} | |
} |
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
package test | |
abstract class Printer { | |
def output() | |
} | |
class HelloWorldPrinter extends Printer { | |
def output() {println("Hello World!")} | |
} |
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
package week4 | |
trait List[T] { | |
def isEmpty: Boolean | |
def head: T | |
def tail: List[T] | |
} | |
class Cons[T](val head: T, val tail: List[T]) extends List[T] { | |
def isEmpty: Boolean = false |
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
<script type="text/javascript" src="fancy-settings/source/lib/store.js"></script> | |
<script type="text/javascript" src="background.js"></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
{ | |
"name": "Codeskulptor Autosave", | |
"version": "1", | |
"manifest_version" : 2, | |
"description": "Autosave timer for Codeskulptor!", | |
"background" : { "page" : "background.html" }, | |
"page_action" : | |
{ | |
"default_icon" : "icon.png", | |
"default_title" : "Autosave detected you're on Codeskulptor" |
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
chrome.extension.sendRequest({}, function(response) { | |
var readyStateCheckInterval = setInterval(function() { | |
if (document.readyState === "complete") { | |
clearInterval(readyStateCheckInterval); | |
var saveButton = document.getElementById("save"); | |
var autosaveInterval = setInterval(function() { | |
if (document.URL.indexOf("/#user") != -1 && saveButton !== null) { | |
var evt = document.createEvent("HTMLEvents"); | |
evt.initEvent("click", true, true ); | |
saveButton.dispatchEvent(evt); |