This file contains hidden or 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
192.168.48.5 - 30/Dec/2021:10:53:36 +0300 "GET /index.php" 200 | |
NOTICE: PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 16384 bytes) in /web/app/lib/base.php on line 2881 | |
NOTICE: PHP message: PHP Stack trace: | |
NOTICE: PHP message: PHP 1. {main}() /web/public/index.php:0 | |
NOTICE: PHP message: PHP 2. Base->run() /web/public/index.php:196 | |
NOTICE: PHP message: PHP 3. Base->call($func = 'BackendController->orders', $args = [0 => class Base { private $hive = [...]; private $init = [...]; private $languages = [...]; private $locks = [...]; private $fallback = 'en' }, 1 => [0 => '/backend/plugins/orders', 'name' => 'orders'], 2 => 'BackendController->orders'], $hooks = 'underroute,beforeroute,afterroute') /web/app/lib/base.php:1727 | |
NOTICE: PHP message: PHP 4. BackendController->orders(class Base { private $hive = ['HEADERS' => [...], 'LANGUAGE' => 'ru-RU,ru,en-US,en', 'AGENT' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) C |
This file contains hidden or 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
sep = Brackets.templateLiteral; | |
// склонение числительных | |
function declOfNum(number, titles) { | |
cases = [2, 0, 1, 1, 1, 2]; | |
return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ]; | |
} | |
// всякая херня типа расчета суммы заказа (товары+доставка) и пр. - макросы | |
Brackets.addFilter('priceQ', function (price, quantity) { | |
return (parseFloat(price) * parseFloat(quantity)).toFixed(2); |
This file contains hidden or 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
<? | |
function lengthOfLongestSubstring($s) { | |
$a = str_split($s); | |
$max = ''; | |
$cur = ''; | |
$ch = ''; | |
for($i=0;$i<sizeof($a);$i++){ | |
$g = explode($a[$i],$cur); |
This file contains hidden or 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
#!/usr/bin/perl | |
use Data::Dumper; | |
use strict; | |
use warnings; | |
# Complete the divisibleSumPairs function below. | |
sub divisibleSumPairs { | |
my $n = shift; | |
my $k = shift; | |
my $ar = shift; |
This file contains hidden or 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 | |
// Complete the birthday function below. | |
function birthday($s, $d, $m) { | |
$tot = 0; | |
for($i=0;$i<=sizeof($s)-1;$i++){ | |
$cnt=1;$sum=$s[$i];$ok=0; | |
for($j=$i+1;$j<=sizeof($s)-1;$j++) | |
{ | |
$cnt++; |
This file contains hidden or 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 | |
// Complete the sockMerchant function below. | |
function sockMerchant($n, $ar) { | |
$arnew = array(); | |
$cnt=0; | |
foreach($ar as $val){ | |
if (isset($arnew[$val])){ | |
$cnt++; | |
unset($arnew[$val]); |
This file contains hidden or 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 | |
// Complete the breakingRecords function below. | |
function breakingRecords($scores) { | |
$max = $scores[0]; $min = $scores[0]; | |
$max_count=0; | |
$min_count=0; | |
foreach($scores as $value){ | |
if ($value>$max){ | |
$max=$value; $max_count++; |
This file contains hidden or 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 | |
/* | |
* Complete the getTotalX function below. | |
*/ | |
function getTotalX($a, $b) { | |
$f = lcm($a); | |
$l = gcd($b); | |
$count = 0; |
This file contains hidden or 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 | |
// Complete the kangaroo function below. | |
function kangaroo($x1, $v1, $x2, $v2) { | |
$xc1=$x1; $xc2=$x2; | |
for($i=$x1;$i<$x2;$i++){ | |
$xc1+=$v1; | |
$xc2+=$v2; | |
if ($xc1==$xc2) return "YES"; | |
} |
NewerOlder