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
var $msCart = $("#msCart"); | |
$('.catalog__item__cart.in_basket').each(function(){ | |
var $icon = $(this); | |
var productID = $icon.data("id"); | |
if(productID) { | |
if($msCart.find("[data-number='" + productID + "']").length > 0) | |
$icon.removeClass("hidden"); |
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
СтоимостьКирпича = 2.5 // (грн) | |
ШиринаКирпича = 0.230 // (м) | |
ВысотаКирпича = 0.065 // (м) | |
ШиринаСтены = 12 // (м) | |
ВысотаСтены = 3 // (м) | |
КоличествоСтен = 4 // (шт) | |
КоличествоКирпичейНаСтену = (ШиринаСтены / ШиринаКирпича) * (ВысотаСтены / ВысотаКирпича) | |
ЦенаЗаСтену = КоличествоКирпичейНаСтену * СтоимостьКирпича | |
ЦенаЗаСтены = ЦенаЗаСтену * КоличествоСтен | |
Результат = "Для стен (" + КоличествоСтен + " шт) нужно кирпичей (" + КоличествоКирпичейНаСтену + " шт) по сумарной цене " + ЦенаЗаСтены + " грн." |
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
document.title = '[WS] Connected..'; | |
(function(){ | |
// config | |
var HOST = 'example.com' | |
var PORT = 3311 | |
var USER_ID = 1000; | |
// connect |
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
/** | |
* @author Hryhorii Furletov <littlefuntik@gmail.com> | |
* | |
* @example | |
* (new CommandReader).runYii('config/database').then((databaseConfig) => { }); | |
* (new CommandReader).runYii('/usr/bin/php', 'configJson.php').then((databaseConfig) => { }); | |
*/ | |
'use strict' | |
const spawn = require('child_process').spawn; |
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 | |
$keywords = 'aa,bb,cc'; | |
function splitGenerator($haystack, $separator = ',') | |
{ | |
$separatorPos1 = -1; | |
while (true) { | |
$separatorPos2 = mb_strpos($haystack, $separator, $separatorPos1 + 1); | |
if (false === $separatorPos2) { | |
$chunk = mb_substr($haystack, - (mb_strlen($haystack) - $separatorPos1 - 1)); |
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 | |
$array = new SplFixedArray(2); | |
$array[0] = 'A'; | |
$array[1] = 'B'; | |
$offset = 0; | |
if ($array->offsetExists($offset)) { | |
$sizeNew = $array->getSize() - 1; | |
for ($i = $offset; $i < $sizeNew; ++$i) { | |
$array[$offset] = $array[$offset + 1]; | |
} |
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 PmlMatchType implements \JsonSerializable | |
{ | |
const EXACT = 0b001; | |
const BROAD = 0b010; | |
const EXACT_COMBO = 0b100; | |
const EXACT_TEXT = 'Exact'; | |
const BROAD_TEXT = 'Broad'; |
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 test (1000 records) | |
Test time: 0.15334296226501 seconds, 0.37MB | |
Table: test | |
Rows: 1000 | |
Data_length: 0.02 MB | |
Index_length: 0.02 MB | |
Table: test_sha256 | |
Rows: 1000 | |
Data_length: 0.02 MB | |
Index_length: 0.02 MB |
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
├── Africa | |
│ ├── Abidjan | |
│ ├── Accra | |
│ ├── Addis_Ababa | |
│ ├── Algiers | |
│ ├── Asmara | |
│ ├── Asmera | |
│ ├── Bamako | |
│ ├── Bangui | |
│ ├── Banjul |
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 | |
/* | |
file "uk.ini" content: | |
[section1] | |
value1={{.REPLACE1}} | |
[section2] | |
value0={{.REPLACE2}} | |
test=test |
OlderNewer