I hereby claim:
- I am chernomyrdin on github.
- I am chernomyrdin (https://keybase.io/chernomyrdin) on keybase.
- I have a public key ASCq-emI1BAZyD5J-aF5Mb0SlfgYDaMb3J6_aaqKqFU1AQo
To claim this, I am signing this object:
package qb | |
import ( | |
"io" | |
"strconv" | |
"strings" | |
) | |
const PlaceHolder = "?" |
I hereby claim:
To claim this, I am signing this object:
<?php | |
class UserFilter extends FilterIterator { | |
public function accept () { | |
$file = $this->getInnerIterator()->current(); | |
$path = explode("/", $file, 3); | |
if (count($path) < 2 or !in_array($path[1], array('app','bootstrap','vendor'))) return FALSE; | |
elseif ("/." == substr($file, -2)) return FALSE; | |
elseif ("/.." == substr($file, -3)) return FALSE; | |
# echo $file, PHP_EOL; |
<?php | |
/** | |
* Class Main - Проверяем возможность работы с LISTEN/NOTIFY в PostgreSQL | |
* Вывод: Подобное возможно только начиная с PHP 5.6, так как только там появилась функция pg_socket($dbh) | |
* Так-же демонстрируется возможность работать по опросу, что менее удобно, но это лучше чем ничего | |
*/ | |
class Main { | |
/** |
<?php | |
class Replacer { | |
private static $__instance; | |
private $regex = ''; | |
private $append = ''; | |
private $replace = array( | |
'ул' => 'улица', | |
'ш' => 'шоссе', |
/** | |
* @output_file_name default.js | |
* @compilation_level ADVANCED_OPTIMIZATIONS | |
* @formatting pretty_print | |
*/ | |
/** | |
* Sample location parameter access classs | |
*/ |
#!/usr/bin/perl -w -- | |
use strict; | |
use Benchmark; | |
my $num = 3; | |
my $match = 0; | |
timethese( 1e8, { | |
just_if => sub { | |
if ($num == 0 or $num == 1 or $num == 2 or $num == 3 or $num == 4 or $num == 5) { |
<?php | |
class Template { | |
private $vars = array(); | |
private $file = null; | |
function __construct ($file = null, $vars = null) { | |
$this->file = $file; | |
if (!is_null($vars)) { | |
$this->vars = $vars; |
#!/usr/bin/perl -w -- | |
use strict; | |
use warnings; | |
use diagnostics; | |
sub new { | |
my $class = shift; | |
my $obj; | |
#!/usr/bin/perl -w -- | |
use strict; | |
use Benchmark; | |
my %hash; | |
for (1..1e4) { | |
my $key = join($_, "*" x (10*rand), (10*rand)); | |
$hash{$key} = "*" x (100*rand); |