- 1
- 2
- 3
...
ТабличныйДокумент.Вывести(Отчеты[Сред(Лев(ЭтаФорма.ИмяФормы, СтрНайти(ЭтаФорма.ИмяФормы, ".Форма.") - 1), 7)].ПолучитьМакет(Сред(ЭтаФорма.ИмяФормы, СтрНайти(ЭтаФорма.ИмяФормы, "ФормаОтчета")) + "_" + Раздел.ИмяСтраницы));
...
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−13
...
ТабличныйДокумент.Вывести(Отчеты[Сред(Лев(ЭтаФорма.ИмяФормы, СтрНайти(ЭтаФорма.ИмяФормы, ".Форма.") - 1), 7)].ПолучитьМакет(Сред(ЭтаФорма.ИмяФормы, СтрНайти(ЭтаФорма.ИмяФормы, "ФормаОтчета")) + "_" + Раздел.ИмяСтраницы));
...
Типовая ЗУП 3.0.25.150, модуль ФОРМЫ регл. отчета 6-НДФЛ.
−95
Функция ПроверкаВхожденияДатыВпериод(Дата, ДатаНач, ДатаКон)
Запрос = Новый Запрос;
Запрос.Текст =
"ВЫБРАТЬ
| ВЫБОР
| КОГДА &Дата МЕЖДУ &ДатаНач И &ДатаКон
| ТОГДА ИСТИНА
| ИНАЧЕ ЛОЖЬ
| КОНЕЦ КАК ВходитВПериод";
Запрос.УстановитьПараметр("ДатаКон", ДатаКон);
Запрос.УстановитьПараметр("ДатаНач", ДатаНач);
Запрос.УстановитьПараметр("Дата", Дата);
Результат = Запрос.Выполнить().Выбрать();
Если Результат.Следующий() Тогда
Возврат Результат.ВходитВПериод;
Иначе
Возврат Ложь;
КонецЕсли;
КонецФункции
Когда на клавиатуре сломались кнопки Б и Ю.
−103
&НаСервере
Процедура ОтсортироватьЧТ()
ТЧсерНомера = Объект.СерийныеНомера;
ТЧсерНомера.Сортировать("IDСтрокиТЧМатериалы Возр, СерийныйНомер Убыв");
КонецПроцедуры // ()
+916
if(!empty($_REQUEST['action_button']))
$_REQUEST['action'] = $_REQUEST['action_button'];
bitrix/modules/main/interface/admin_lib.php:3320
+317
$this->db->query("UPDATE `" . DB_PREFIX . "order` SET firstname = '" . $this->db->escape($data['firstname']) . "', lastname = '" . $this->db->escape($data['lastname']) . "', email = '" . $this->db->escape($data['email']) . "', telephone = '" . $this->db->escape($data['telephone']) . "', fax = '" . $this->db->escape($data['fax']) . "', payment_firstname = '" . $this->db->escape($data['payment_firstname']) . "', payment_lastname = '" . $this->db->escape($data['payment_lastname']) . "', payment_company = '" . $this->db->escape($data['payment_company']) . "', payment_company_id = '" . $this->db->escape($data['payment_company_id']) . "', payment_tax_id = '" . $this->db->escape($data['payment_tax_id']) . "', payment_address_1 = '" . $this->db->escape($data['payment_address_1']) . "', payment_address_2 = '" . $this->db->escape($data['payment_address_2']) . "', payment_city = '" . $this->db->escape($data['payment_city']) . "', payment_postcode = '" . $this->db->escape($data['payment_postcode']) . "', payment_country = '" . $this->db->escape($payment_country) . "', payment_country_id = '" . (int)$data['payment_country_id'] . "', payment_zone = '" . $this->db->escape($payment_zone) . "', payment_zone_id = '" . (int)$data['payment_zone_id'] . "', payment_address_format = '" . $this->db->escape($payment_address_format) . "', payment_method = '" . $this->db->escape($data['payment_method']) . "', payment_code = '" . $this->db->escape($data['payment_code']) . "', shipping_firstname = '" . $this->db->escape($data['shipping_firstname']) . "', shipping_lastname = '" . $this->db->escape($data['shipping_lastname']) . "', shipping_company = '" . $this->db->escape($data['shipping_company']) . "', shipping_address_1 = '" . $this->db->escape($data['shipping_address_1']) . "', shipping_address_2 = '" . $this->db->escape($data['shipping_address_2']) . "', shipping_city = '" . $this->db->escape($data['shipping_city']) . "', shipping_postcode = '" . $this->db->escape($data['shipping_postcode']) . "', shipping_country = '" . $this->db->escape($shipping_country) . "', shipping_country_id = '" . (int)$data['shipping_country_id'] . "', shipping_zone = '" . $this->db->escape($shipping_zone) . "', shipping_zone_id = '" . (int)$data['shipping_zone_id'] . "', shipping_address_format = '" . $this->db->escape($shipping_address_format) . "', shipping_method = '" . $this->db->escape($data['shipping_method']) . "', shipping_code = '" . $this->db->escape($data['shipping_code']) . "', comment = '" . $this->db->escape($data['comment']) . "', order_status_id = '" . (int)$data['order_status_id'] . "', affiliate_id = '" . (int)$data['affiliate_id'] . "', date_modified = NOW() WHERE order_id = '" . (int)$order_id . "'");
Строчечка
+267
//форма собственности
$('#sobst').change(function(){
var $radiouch = $('#uchred1, #uchred2');
var valip = 'ИП';
var $ip = $('#ip').attr('id');
var $obsch = $('.obschestvo').attr('class');
var $obsch2 = $('.obschestvo2').attr('class');
if($('option:selected', this).attr('id')==$ip){
$tab24.fadeOut(500);
$tab24.find('input[type!=button][type!=submit], select, #Opis').removeAttr('required').removeClass('err').attr('disabled','');
$tab24.find('input[type!=button][type!=submit][type!=radio], select, #Opis').val('');
$radiouch.prop('checked', false);
$novalid.removeAttr('required');
}
if($('option:selected', this).attr('class')==$obsch){
if($('#i').prop("checked")){
$tab24.fadeOut(500);
$tab24.find('input[type!=button][type!=submit], select, #Opis').removeAttr('required').removeClass('err').attr('disabled','');
$tab24.find('input[type!=button][type!=submit][type!=radio], select, #Opis').val('');
$radiouch.prop('checked', false);
$novalid.removeAttr('required');
}
else{
$tab24.fadeIn(1000);
$tab24.find('input[type!=button][type!=submit], select, #Opis').removeAttr('disabled').removeClass('err').attr('required','');
$tab24.find('input[type!=button][type!=submit][type!=radio], select, #Opis').val('');
$radiouch.prop('checked', false);
$novalid.removeAttr('required');
}
}
if($('option:selected', this).attr('class')==$obsch2){
if($('#i').prop("checked")){
$tab24.fadeOut(500);
$tab24.find('input[type!=button][type!=submit], select, #Opis').removeAttr('required').removeClass('err').attr('disabled','');
$tab24.find('input[type!=button][type!=submit][type!=radio], select, #Opis').val('');
$radiouch.prop('checked', false);
}
else{
$tab24.fadeIn(1000);
$tab24.find('input[type!=button][type!=submit], select, #Opis').removeAttr('disabled').removeClass('err').removeAttr('required','');
$tab24.find('input[type!=button][type!=submit][type!=radio], select, #Opis').val('');
$radiouch.prop('checked', false);
}
}
});
//Выбор учредителя
$('#uchrdiv1').find("input[type='radio']").click(function(){
var $dopuchr = $('#Familia, #Imia, #Otchestvo, #Dola');
var $uchr2elem = $('#uchrdiv2').find('input[type!=button][type!=submit][type!=radio], select, #Opis');
var $rad = $(this).attr('id');
if($rad==$('#uchred2').attr('id')){
$("#labfio").text("Форма собственности *");
$("#labname").text("Наименование *");
$("#labsur").text("УНП *");
$("#zagolovok").text("Наименование учредителя *");
$uchr2elem.removeAttr('required').removeClass('err').attr('disabled','');
$('#surname1').attr('required','');
$('#uchred1').removeClass('err');
$dopuchr.removeAttr('required');
}
else {
$("#labfio").text('Фамилия *');
$("#labname").text("Имя *");
$("#labsur").text("Отчество");
$("#zagolovok").text("Ф.И.О учредителя в именительном падеже *");
$uchr2elem.removeAttr('disabled').attr('required','').val('');
$('#table2').find('input[type!=radio]').removeAttr('disabled').attr('required','');
$('#surname1, #pomeschenieNum3').removeAttr('required','');
$('#uchred2').removeClass('err');
$dopuchr.removeAttr('required');
}
});
//Способ получения
$('.forms5').find("input[type='radio']").click(function(){
var $grd = $('#grd').find('input[id!=pomeschenieNum6], select');
var $ofs = $('#ofs').find('input, select');
var $posrad = $(this).attr('id');
if($posrad==$('#Ofis').attr('id')){
$grd.removeAttr('required').removeClass('err').attr('disabled','').val('');
$ofs.removeAttr('disabled').attr('required','').val('');
$('#Viezd').removeAttr('required').removeClass('err');
$('#Ofis').attr('required');
}
if($posrad==$('#Viezd').attr('id')){
$ofs.removeAttr('required').removeClass('err').attr('disabled','').val('');
$grd.removeAttr('disabled').attr('required','').val('');
$('#Ofis').removeAttr('required').removeClass('err');
$('#Viezd').attr('required');
}
});
//кнопка submit
$('#otpravit').on({
mousedown: function(){
$(this).css('background','linear-gradient(to bottom right, #D77024, #E49656)');
},
mouseup: function(){
$(this).css('background','linear-gradient(to bottom right, #EC841C, #EDA24E)');
страница с формами
название файла (ВНИМАНИЕ!): dubische_gaz
+319
if (("/dir/" + TXT_FILE_NAME).equals(fileName))
processTxtFiles(TXT_FILE_NAME);
else if (fileName.endsWith(TXT_FILE_NAME))
processTxtFiles(TXT_FILE_NAME);
else if ...
Зачем первые две строки?
+4
bool shift = keys.Shift;
if (keys.Control)
{
return SelectNextControl(shift ? false : true);
}
Телерик опять жжот. Цветёт и пахнет.
+7
https://twitter.com/neuromzan
Нейросеть научилась писать твиты за Рамзана Кадырова https://nplus1.ru/news/2016/08/05/neurokad
Вореции
+20
std::vector<D3D11_INPUT_ELEMENT_DESC> desc;
for (auto it = descStrings.begin(); it != descStrings.end(); it++)
{
auto strIt = it->begin();
std::string SemanticName;
while ((*strIt) != ',' || strIt != it->end())
{
if ((*strIt) != ' ')
SemanticName += (*strIt);
strIt++;
}
strIt++;
std::string SemanticIndex;
while ((*strIt) != ',' || strIt != it->end())
{
if ((*strIt) != ' ')
SemanticIndex += (*strIt);
strIt++;
}
strIt++;
std::string Format;
while ((*strIt) != ',' || strIt != it->end())
{
if ((*strIt) != ' ')
Format += (*strIt);
strIt++;
}
strIt++;
std::string InputSlot;
while ((*strIt) != ',' || strIt != it->end())
{
if ((*strIt) != ' ')
InputSlot += (*strIt);
strIt++;
}
strIt++;
std::string AlignedByteOffset;
while ((*strIt) != ',' || strIt != it->end())
{
if ((*strIt) != ' ')
AlignedByteOffset += (*strIt);
strIt++;
}
strIt++;
std::string InputSlotClass;
while ((*strIt) != ',' || strIt != it->end())
{
if ((*strIt) != ' ')
InputSlotClass += (*strIt);
strIt++;
}
strIt++;
std::string InstanceDataStepRate;
while ((*strIt) != '}' || strIt != it->end())
{
if((*strIt) != ' ')
InstanceDataStepRate += (*strIt);
strIt++;
}
strIt++;
D3D11_INPUT_ELEMENT_DESC element = {
SemanticName.c_str(),
atoi(SemanticIndex.c_str()),
(DXGI_FORMAT)atoi(Format.c_str()),
atoi(InputSlot.c_str()),
atoi(AlignedByteOffset.c_str()),
(D3D11_INPUT_CLASSIFICATION)atoi(InputSlotClass.c_str()),
atoi(InstanceDataStepRate.c_str())
};
desc.push_back(element);
}
Где-то в мире сдох от зависти один индус