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 | |
function setter($val) { | |
return function(&$val) use ($val) {} | |
}; | |
$fooSetter = setter('foo'); | |
$fooSetter($x); |
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 | |
function treeWalker($fnCallback, $strTable, $intStart=0, $orderBy='pid, sorting') | |
{ | |
$arrItemsByPid = array(); | |
$arrItems = \Database::getInstance()->execute('SELECT * FROM ' . $strTable . ' ORDER BY ' . $orderBy)->fetchAllAssoc(); | |
$strResult = ''; | |
foreach($arrItems as $arrItem) |
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 page = require('webpage').create(), | |
system = require('system'), | |
address, output, size; | |
if (system.args.length < 3 || system.args.length > 5) { | |
console.log('Usage: rasterize.js URL filename'); | |
phantom.exit(1); | |
} else { | |
address = system.args[1]; | |
output = system.args[2]; |
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
const pipeline = (...fns) => (val) => fns.reduce((prom, fn) => prom.then(fn), Promise.resolve(val)); | |
const myPipe = pipeline( | |
(val) => val + 1, | |
(val) => val + 1 | |
); | |
Promise.resolve(1) | |
.then(myPipe) | |
.then((result) => { |
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 am attesting that this GitHub handle xat is linked to the Tezos account tz1P9djZkQKQdvt68eixoyBf8ezNYjgrEdue for tzprofiles | |
sig:edsigtue5MxmvLyCQsaXQGDNJ5hb3ovPMQjZkK6twewkscXr98ZCGUTN8zHqR9X4wqoZrJg6vy4EffLmipjmcYc9NtEypfSPWGg |
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 castv2Cli = require('castv2-client'); | |
var inherits = require('util').inherits; | |
var Application = castv2Cli.Application; | |
var RequestResponseController = castv2Cli.RequestResponseController; | |
var extend = require('xtend'); | |
var noop = function() {}; | |
var slice = Array.prototype.slice; | |
var Api = function(client, session) { | |
var that = this; |
OlderNewer