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
function sortT(obj, column){ | |
var tbl = document.getElementById("primary").tBodies[0]; | |
var store = []; | |
var col = parseInt(column); | |
for(var i=0, len=tbl.rows.length; i<len; i++){ | |
var row = tbl.rows[i]; | |
var str = row.cells[col].textContent || row.cells[col].innerText; | |
var sortnr = parseFloat(str.replace(/,/g,'')); | |
if(!isNaN(sortnr)) store.push([sortnr, row]); |
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
/** | |
* @param $cnum country number | |
* @param $news combined att and def news of a country | |
* @src http://earthempires.com/forum/announcements/20140201-changeset-15-restart-aid-abbr-diminishing-returns-29694?t=1393414830 | |
*/ | |
function getDR( $cnum, $newsObj ) { | |
// For each hit within the past 72 hours, add 1/2^(T/H). | |
// where: | |
// T = hours have passed since the hit | |
// H = halflife; 20 average oversend; 18 if DH |
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
initialize: function() { | |
var collection = this.collection; | |
this.listenTo(collection, 'xxx', this.render); | |
this.listenTo(collection, 'reset', this.renderComplete); | |
collection.fetch(); | |
}, |
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
// string from db | |
<p>[greet]Happy {month}![/greet]</p> | |
<p> </p> | |
<p>[body]</p> | |
<p>Hello world! {name}</p> | |
<p>[/body]</p> | |
/=============================================/ | |
// this does not work |
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
class NP_PluginAcl extends Zend_Controller_Plugin_Abstract { | |
private $_acl = null; | |
public function __contruct(Zend_Acl $acl) | |
{ | |
$this->_acl = $acl; | |
} | |
public function preDispatch(Zend_Controller_Request_Abstract $request) |
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
Bootstrap.php | |
protected function _initAcl() | |
{ | |
$acl = new NP_Acl(); | |
$fc = Zend_Controller_Front::getInstance(); | |
$fc->registerPlugin( new NP_PluginAcl($acl) ); // problem starts here | |
} | |
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
data: | |
data: { | |
data: name: 'nodelab3', | |
data: subdomain: 'pneftali2', | |
data: scripts: { start: 'server.js' }, | |
data: version: '0.0.0', | |
data: engines: { node: '0.6.x' } | |
data: } | |
data: | |
prompt: Is this ok?: (yes) |
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
data: | |
data: { | |
data: name: 'nodelab2', | |
data: version: '0.0.0', | |
data: engines: { node: '0.8.x' }, | |
data: scripts: { start: 'server.js' }, | |
data: subdomain: 'pneftali1' | |
data: } | |
data: | |
prompt: Is this ok?: (yes) |
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
data: | |
data: { | |
data: name: 'nodelab1', | |
data: engines: { node: '0.8.x' }, | |
data: scripts: { start: 'server.js' }, | |
data: subdomain: 'pneftali', | |
data: version: '0.0.0' | |
data: } | |
data: | |
prompt: Is this ok?: (yes) |