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
TARGET=$(notdir $(shell pwd)) | |
MAGIC=$(shell (([ "$(GOARCH)" == "amd64" ] && echo 6) || ([ "$(GOARCH)" == "arm" ] && echo 5)) || echo 8) | |
all: | |
@for dir in `find * -type d`; do \ | |
go=$$(find "$$dir" -maxdepth 1 -name "*.go"); \ | |
if [ ! -z "$$go" ]; then \ | |
echo "- $$dir: $$go"; \ | |
$(MAGIC)g -I. -o _go_.8 $$go; \ | |
rm -f $$dir.a; \ |
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
TARGET=$(notdir $(shell pwd)) | |
MAGIC=$(shell (([ "$(GOARCH)" == "amd64" ] && echo 6) || ([ "$(GOARCH)" == "arm" ] && echo 5)) || echo 8) | |
all: | |
@for dir in `find * -type d`; do \ | |
go=$$(find "$$dir" -maxdepth 1 -name "*.go"); \ | |
if [ ! -z "$$go" ]; then \ | |
echo "- $$dir: $$go"; \ | |
$(MAGIC)g -I. -o _go_.8 $$go; \ | |
rm -f $$dir.a; \ |
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
TARGET=$(notdir $(shell pwd)) | |
MAGIC=$(shell (([ "$(GOARCH)" == "amd64" ] && echo 6) || ([ "$(GOARCH)" == "arm" ] && echo 5)) || echo 8) | |
all: | |
@for dir in `find * -type d`; do \ | |
go=$$(find "$$dir" -maxdepth 1 -name "*.go"); \ | |
if [ ! -z "$$go" ]; then \ | |
echo "- $$dir: $$go"; \ | |
$(MAGIC)g -I. -o _go_.8 $$go; \ | |
rm -f $$dir.a; \ |
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 | |
/* | |
* Hledá se způsob, jak elegantně přepsat PHP kód níže pomocí vyjadřovacích | |
* schopností jiného šablonovacího jazyka, který pro daná data (pole $seznam) | |
* vyplivne stejný výsledek (včetně zachování formátování bílých znaků; hlavně | |
* co se týče věcí v závorce). | |
*/ | |
$seznam = array( |
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
toplevel = ys:element | |
(eol y:element -> { $ys = array_merge($ys, $y); } )* | |
-> $ys | |
block = ys:element | |
(eol samedent y:element -> { $ys = array_merge($ys, $y); } )* | |
-> $ys | |
element = n:name ":" spaces? eol indent b:block -> { | |
array_pop($this->indent); |
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
START = ?{ | |
$this->indent = array(); | |
$this->indentstring = ""; | |
return TRUE; | |
} | |
EmpL* | |
b:(blockarray / blockhash) | |
EmpL* | |
!. |
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
Jak nejlépe na tree walker v PHP? |
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 foo | |
{ | |
function stream_open() { return TRUE; } | |
function stream_eof() { return FALSE; } | |
function stream_read($count) | |
{ | |
var_dump($count); | |
return ""; |
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 | |
/** | |
* Wraps callback with some default params | |
*/ | |
class fn | |
{ | |
/** | |
* @var callback Wrapped callback | |
*/ | |
private $callback; |
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 foo | |
{ | |
function stream_open() { return TRUE; } | |
function stream_eof() { return FALSE; } | |
function stream_read($count) | |
{ | |
$backtrace = debug_backtrace(); | |
if (isset($backtrace[1]['function']) && $backtrace[1]['function'] === 'fread') { |
OlderNewer