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
import redis | |
from itertools import izip_longest | |
import sys | |
from multiprocessing import Pool | |
import signal | |
OLD = "SHARD_ENDPOINT_FOR_OLD_REDIS" | |
NEW = "SHARD_ENDPOINT_FOR_NEW_REDIS" |
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
// big_integer.js | |
// Douglas Crockford | |
// 2019-02-09 | |
// You can access the big integer object in your module by importing it. | |
// import big_integer from "./big_integer.js"; | |
/*jslint bitwise */ | |
/*property |
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 | |
// responses in different formats | |
$r1 = "Пароль: 0188 | |
Перевод на счет 41001312169904 | |
Спишется 10,06р. | |
"; | |
$r2 = "Пароль: 0188 | |
Спишется 10,06р. | |
Перевод на счет 41001312169904 |
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 | |
<?php | |
/** | |
* Configuration file generated by ZF Apigility Admin | |
* | |
* The previous config file has been stored in /app/app/DocFlowServer/config/autoload/../../config/modules.config.old | |
*/ | |
return [ | |
'Zend\Filter', | |
'Zend\Hydrator', |
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
# coding: utf-8 | |
import copy | |
from collections import defaultdict | |
try: | |
import Queue as Q # ver. < 3.0 | |
except ImportError: | |
import queue as Q | |
class Event(object): |
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 | |
$regex = '#^(?|/foo(\d+)(*MARK:16) | |
|/foo(\w+)(*MARK:41) | |
)$#x'; | |
preg_match($regex, '/footest', $matches); | |
var_dump($matches); | |
$m = $matches['MARK']; | |
$regex = substr_replace($regex, 'FAIL', $m, 5+strlen($m)); |
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 | |
1. | |
$x = true; | |
if ($x == 1 && $x==2 && $x==3){ | |
echo("ok"); | |
} | |
2. | |
class Helm | |
{ |
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 | |
$n1 = "1234534534534534534"; | |
$n2 = "3435435435353464362"; | |
// var_dump($n1+$n2); | |
function add($n1, $n2): string | |
{ | |
// ищем максимальное по длине число | |
if (strlen($n1) > $n2) { | |
$max = $n1; |
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 | |
namespace src\Integration; | |
class DataProvider | |
{ | |
private $host; | |
private $user; | |
private $password; | |
/** |
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 | |
namespace src\Integration; | |
class DataProvider | |
{ | |
private $host; | |
private $user; | |
private $password; | |
/** |
NewerOlder