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
var sys = require('sys'); | |
setTimeout(function(){ | |
sys.puts('world'); | |
}, 2000); | |
sys.puts('hello'); |
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
# in sphinx.conf | |
source main | |
{ | |
type = mysql | |
... | |
sql_query = SELECT id, title, body FROM documents | |
} | |
index main | |
{ |
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 | |
class Zend_View_Helper_JavascriptHelper extends Zend_View_Helper_Abstract | |
{ | |
function javascriptHelper() { | |
$request = Zend_Controller_Front::getInstance()->getRequest(); | |
$file_uri = 'js/' . $request->getControllerName() . '/' . $request->getActionName() . '.js'; | |
if (file_exists($file_uri)) { | |
$this->view->headScript()->appendFile('/' . $file_uri); | |
} |
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
CREATE TABLE sph_counter | |
( | |
counter_id INTEGER PRIMARY KEY NOT NULL, | |
max_doc_id INTEGER NOT NULL | |
); |
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
source main | |
{ | |
# ... | |
sql_query_pre = SET NAMES utf8 | |
sql_query_pre = REPLACE INTO sph_counter SELECT 1, MAX(id) FROM documents | |
sql_query = SELECT id, title, body FROM documents \ | |
WHERE id<=( SELECT max_doc_id FROM sph_counter WHERE counter_id=1 ) | |
} | |
source delta : main |
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 | |
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { | |
//... | |
protected function _initConfig(){ | |
$config_options = new Zend_Config($this->getOptions()); | |
Zend_Registry::set('config', $config_options); | |
return $config_options; | |
} | |
} |
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 | |
class MyController extends Zend_Controller_Action { | |
//... | |
public function myAction(){ | |
$bootstrap = $this->getInvokeArg('bootstrap'); | |
$config_options = $bootstrap->getOptions(); | |
} | |
} |
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 | |
$bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap'); | |
$config_options = $bootstrap->getOptions(); |
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
diego$ git branch | |
* diego | |
master |
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
git checkout <branch_you_want_to_merge_from> <file_paths_to_merge...> |
OlderNewer