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
Пишите код, исходя из того, что все программисты, которые будут сопровождать вашу программу, — склонные к насилию психопаты, знающие, где вы живёте. | |
-- Мартин Голдинг |
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
// Сохранить значение выбранных свойств элемента $arItem. | |
CIBlockElement::SetPropertyValuesEx($arItem['ID'], $arItem['IBLOCK_ID'], array( | |
'PROPERTY_PROP1' => 'VALUE1', | |
'PROPERTY_PROP2' => 'VALUE2', | |
)); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Пример работы с формой</title> | |
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script> | |
</head> | |
<body> | |
<button id="sendForm" type="button">Отправить данные</button> |
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
EvilBeaver | |
allustin | |
silverbulleters | |
vsuh | |
kuntashov | |
bytemdfab | |
dmpas | |
nixel2007 | |
xDrivenDevelopment | |
pumbaEO |
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
Перем юТест; | |
Функция ПолучитьСписокТестов(ЮнитТестирование) Экспорт | |
юТест = ЮнитТестирование; | |
ДобавитьТест("ТестДолжен_ПроверитьСложение", "Sum", "Сложить", Новый Структура("А,Б,Результат", 2, 2, 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
sudo apt-get update | |
# Apache2 | |
sudo apt-get install apache2 | |
# sudo apache2ctl configtest | |
# Если выдает ошибку "Could not reliably determine the server's fully qualified domain name", | |
# то нужно добавить в /etc/apache2/apache2.conf в коне файла строку | |
# ServerName ДОМЕННОЕ_ИМЯ_ИЛИ_IP |
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
// Еще в 8.2 появился редко используемый на практике вариант получения ссылки на объект по уникальному идентификатору, | |
// но до сих пор синтаксический контроль в конфигураторе не признает данную синтаксическую конструкцию как корректную | |
// и выдает ошибку. | |
УИД = Новый УникальныйИдентификатор(); | |
РТУСсылка = Новый ДокументСсылка.РеализацияТоваровУслуг(УИД); | |
// Альтернативные равнозначные варианты, не вызывающие ошибок синтаксического контроля. | |
// 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
FROM alpine:3.6 | |
ENV GOPATH /go | |
ENV LEGO_VERSION master | |
ENV http_proxy='http://user:pass@proxy:port' | |
RUN apk update && apk add --no-cache --virtual run-dependencies ca-certificates && \ | |
apk add --no-cache --virtual build-dependencies go git musl-dev && \ | |
git config --global http.proxy $http_proxy |
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 | |
protected function onFieldModify($name, $oldValue, $value) | |
{ | |
$result = new Result(); | |
if ($name == "QUANTITY" && $value != 0) | |
{ | |
$value = (float)$value; | |
$oldValue = (float)$oldValue; |
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 | |
CModule::IncludeModule('sale'); | |
$res = $DB->Query("select ID from b_sale_order where EXTERNAL_ORDER = 'Y' and ID_1C is null order by id ASC LIMIT 1000"); | |
$count = 0; | |
while ($row = $res->Fetch()) { | |
CSaleOrder::Delete($row['ID']); |
OlderNewer