-
Принцип хранения - многие VCS хранят свои данные в виде списка изменений, Git же хранит полные копии файлов, только заменяя неизмененные файлы на ссылки. [[2.1]][2.1]
- Таким образом Git является своего рода небольшой файловой системой.
- Такой подход предоставляет ряд преимуществ при восстановлении данных, работе с комитами и т.д., но требует больше места.
-
Локальные операции - для совершения большинства операций в Git'е необходимы только локальные файлы и ресурсы, т.е. обычно информация с других компьютеров в сети не нужна. [[2.2]][2.2]
- Данная особенность позволяет спокойно делать коммиты, а затем отправить их, как только станет доступна сеть (в некоторых других VCS это невозможно или же крайне неудобно).
- Поскольку вся история проекта хранится локально у вас на диске, большинство операций кажутся практически мгновенными.
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
<? | |
if (CModule::IncludeModule('iblock')) | |
{ | |
$arSectionCodeByOffer = []; | |
$arSectionId = []; | |
$arSectionCode = []; | |
$arOfferId = []; | |
/** | |
* Получаем связку id товара с id предложений | |
*/ |
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
<?/** | |
* @param $cropSetting array получившиеся настройки кропа из изображения | |
* @param $imageSrc string абсолютный путь до исходного изображения | |
* @param $resizeSrc string абсолютный путь до результирующего изображения | |
* @return bool | |
*/ | |
function cropImage($cropSetting, $imageSrc, $resizeSrc) { | |
// Получаем размеры и тип изображения в виде числа | |
$lAllowedExtensions = array(1 => "gif", 2 => "jpeg", 3 => "png"); | |
list($originalWidth, $originalHeight, $lImageExtensionId) = getimagesize($imageSrc); |
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
<video playsinline loop muted><source></video> | |
<picture> | |
<source srcset="<?=$photo['SMALL']['SRC_1X_WEBP']?> 1x, <?=$photo['SMALL']['SRC_2X_WEBP']?> 2x" type="image/webp"> | |
<source srcset="<?=$photo['SMALL']['SRC_1X']?> 1x, <?=$photo['SMALL']['SRC_2X']?> 2x"> | |
<img src="<?=$photo['SMALL']['SRC_1X']?>" alt="<?=$photo['DESCRIPTION']?>" title="<?=$photo['DESCRIPTION']?>"> | |
</picture> |
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
protected static $mimes = [ | |
'hqx' => 'application/mac-binhex40', | |
'cpt' => 'application/mac-compactpro', | |
'csv' => 'text/x-comma-separated-values', | |
'bin' => 'application/octet-stream', | |
'dms' => 'application/octet-stream', | |
'lha' => 'application/octet-stream', | |
'lzh' => 'application/octet-stream', | |
'exe' => 'application/octet-stream', | |
'class' => 'application/octet-stream', |
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 //php 7.2.24 | |
$ar = [0 => 'Артём', 1 => 'Кирилл']; | |
$rand = random_int(0,1); | |
echo "Сейчас рандом выберет кто будет первый подстригаться:"; | |
sleep(5); | |
echo $ar[$rand]; | |
?> | |
<?php //php 7.2.24 |
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
# Исключаем настройки PHPStorm, мы в нём работаем | |
/.idea/ | |
# исключаем логи | |
/local/php_interface/logs/ | |
/local/logs/ | |
/bitrix/site_checker_*.log | |
# исключаем загружаемые файлы, изображения и кеш | |
/upload |
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
<? | |
$arConfig = [ | |
[ | |
"NAME_PROPERTY" => "NAME", | |
"NAME_INPUT" => "Блюдо", | |
"TYPE_INPUT" => "text", | |
"REQUIRED" => "Y", | |
"PLACEHOLDER" => "Что хотели бы заказать?", | |
], |
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 | |
$modulesfiles = array( | |
array( | |
'main', | |
array( | |
'/bitrix/components/bitrix/main.post.list/templates/.default/activity.php', | |
'/bitrix/components/bitrix/main.post.list/templates/.default/html_parser.php', | |
'/bitrix/components/bitrix/main.post.list/templates/.default/component_epilog.php', | |
'/bitrix/components/bitrix/main.ui.grid/templates/.default/js/updater.js', |
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
<? | |
$array = array( | |
'январь', | |
'февраль', | |
'март', | |
'апрель', | |
'май', | |
'июнь', | |
'июль', | |
'август', |
NewerOlder