- 自分の id
- 親の id(親がいなければ 0)
- 自分の値
を持った配列を一つの塊としたときに、複数の塊が並んでいるような二次元配列があるとします。(以下のような形)
php
diff -c -r php-5.6.2-orig/Zend/zend.h php-5.6.2/Zend/zend.h | |
*** php-5.6.2-orig/Zend/zend.h 2014-10-15 21:59:32.000000000 +0900 | |
--- php-5.6.2/Zend/zend.h 2014-11-02 13:26:51.000000000 +0900 | |
*************** | |
*** 291,298 **** | |
--- 291,300 ---- | |
#define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, return_value_ptr, this_ptr, return_value_used TSRMLS_CC | |
#if defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__) | |
+ # define ZEND_NORETURN __attribute__((noreturn)) |
ruby 2.0.0p195
$ gem install chef-provider-service-daemontool -V
HEAD https://rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
HEAD https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz
304 Not Modified
ERROR: Could not find a valid gem 'chef-provider-service-daemontool' (>= 0) in any repository
HEAD https://rubygems.org/prerelease_specs.4.8.gz
手もとでGFM (GitHub Flavored Markdown) ファイルをHTMLファイルに変換する簡単なRubyスクリプトgfm2html.rbを下に置きました。 github-markdownを用いています。 google-code-prettifyを使えばsyntax highlightができることが特徴です。 簡単なCSSファイルを用意して使います。例としてstyle.cssが下に置いてあります。
この文章は Gist https://gist.github.com/t-nissie/c415b7da3a694e82d6b5 に置いてあります。
git clone https://gist.github.com/c415b7da3a694e82d6b5.git gfm2html
でクローンできます。
$ php -v | |
PHP 5.5.14 (cli) (built: Jul 23 2014 16:08:06) (DEBUG) | |
Copyright (c) 1997-2014 The PHP Group | |
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies | |
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies | |
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans | |
$ php -d zend.multibyte=1 -d zend.script_encoding='EUC-JP' aa.php | |
PHP Warning: Unexpected character in input: ' in /tmp/aa.php on line 11 | |
PHP Warning: Unexpected character in input: ' in /tmp/aa.php on line 11 | |
PHP Warning: Unexpected character in input: ' in /tmp/aa.php on line 11 |
<?php | |
declare(encoding='UTF-8'); | |
/* あああ */ | |
?> |
<?php | |
// composer require react/react:\* | |
require __DIR__ . '/vendor/autoload.php'; | |
use React\EventLoop\Factory; | |
use React\Socket\Server as SocketServer; | |
use React\Http\Server as HttpServer; | |
use React\Http\Request; | |
use React\Http\Response; |