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 fs = require('fs'); | |
var stream = fs.createReadStream('./test/fixtures/current'); | |
var currentData = ''; | |
stream.on('error', function (err) { | |
throw err; | |
}); | |
stream.on('data', function (data) { | |
currentData += 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 | |
class AncientFileFilter extends \FilterIterator { | |
protected $DaysOld = 7; | |
public function __construct($dir,$days=null) { | |
// is the specified directory valid? | |
if(!is_string($dir) || !is_dir($dir) || !is_readable($dir)) |
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 | |
class AncientFileFilter extends \FilterIterator { | |
protected $DaysOld = 7; | |
public function __construct($dir,$days=null) { | |
// is the specified directory valid? | |
if(!is_string($dir) || !is_dir($dir) || !is_readable($dir)) |
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
I have my model here: | |
// transactionmodel.js | |
function TransactionModel() { | |
var pg = require('pg'); | |
var connectionString = "pg://chartjes:******@localhost:5432/ibl_stats"; | |
this.client = new pg.Client(connectionString); | |
this.client.connect(); | |
this.getCurrent = function() { |