-
Лучший говнокод
- В номинации:
-
- За время:
-
-
0
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
$openTab.on('click', function () {
$('.c-header__nav__level-1').hide();
$('.c-header__nav__level-back').show();
$tabContent.show();
});
//показываем меню 1 уровня когда нажимаем на бургер
$('.c-header__toggler--burger').on('click', function () {
$('.c-header__toggler').toggle();
$('.c-header__nav__level-1').fadeIn();
$('body').addClass('body-no-scroll');
});
//скрытие на кнопку закрытие
$('.c-header__toggler--close').on('click', function () {
$('.c-header__toggler').toggle(); //сама кнопка
$('.c-header__nav__level-1').fadeOut(); //закрываем первый уровень
$tabContent.fadeOut(); //закрываем второй уровень
setTimeout(function () { //тайм-аут для восстановления 2 уровня по умолчанию
$('.c-header__nav__level-2-item--show').removeClass('c-header__nav__level-2-item--show');
$('.c-header__nav__level-2-item').show();
}, 800);
$('.c-header__nav__level-3').fadeOut(); //закрываем 3 уровень
$('.c-header__nav__back').fadeOut(); // закрываем все кнопки 'назад'
$('body').removeClass('body-no-scroll');
});
//кнопка "назад" со 2 на 1 уровень
$('.c-header__nav__level-back').on('click', function () {
$(this).hide().parent().hide().prev().show();
});
$('.c-header__nav__level-2-back').on('click', function () {
$(this).hide();
$(this).prev().show();
$('.c-header__nav__level-2').removeClass('is-active');
});
//кнопка "назад" с 3 на 2 уровень
$('.c-header__nav__level-3-back').on('click', function () {
$(this).hide()
.parent().find('.c-header__nav__level-2-item--show').removeClass('c-header__nav__level-2-item--show'); // восстановления 2 уровня по умолчанию
$('.c-header__nav__level-2-item').show(); // восстановления 2 уровня по умолчанию
$('.c-header__nav__level-2-back').show(); //восстанавливаем кнопку "назад" 2 уровня
$('.c-header__nav__level-3').hide(); //закрываем 3 уровень
});
//переход с 2 на 3 уровень
$('.c-header__nav__level-2-item').on('click', function () {
$('.c-header__nav__level-2-item').not($(this)).hide(); //закрываем весь 2 уровень кроме нажатого
$(this).addClass('c-header__nav__level-2-item--show'); //стили для нажатого 2 уровня
$('.c-header__nav__level-2-back').hide(); //скрываем кнопку "назад" 2 уровня
$('.c-header__nav__level-3').show(); // показываем кнопку "назад" 3 уровня
$('.c-header__nav__level-3-back').show(); //показываем 3 уровень
});
//новое меню
$('body').on('click', '.c-header__nav__level-left__link.parent', function (e) {
e.preventDefault();
$(this).next('ul').addClass('is-active');
$('.c-header__nav__level-2-back').show();
$('.c-header__nav__level-back').hide();
});
Главное, что задокументировано
phpBidlokoder2,
21 Мая 2020
-
+5
- 1
- 2
- 3
- 4
function reclstr($txt1) {//утилизировать текст
$util = sha1( $txt1 . rand(0,54424456));
return $util;
}
govnokoduser2000,
28 Апреля 2020
-
−1
- 1
- 2
- 3
Вас заметили
капча pa9e
Part of the challenge of programming (and for some people, the reason why programming is fun in the first place) is looking at the building blocks provided to you and deciding how to assemble them to build something new. After all, if everything you wanted a program to do already existed ready-made, it wouldn't be called programming any more. It would be called shopping.
>> Is there an API or a quick way to find out which window the mouse is in?
I replied, "The LEGO Group does not make a piece for every possible object. Sometimes you just have to take two LEGO blocks and click them together. Here are some interesting blocks: GetCursorPos, WindowFromPoint."
>> Thanks for your reply. But WindowFromPoint gives me the window of the object at the location of the cursor. But I'm looking for the top level window containing the cursor.
Fine, then use a different block.
I wonder how it is these people manage to write programs at all. I get the impression they write code by asking a million tiny questions and cutting and pasting together all the replies.
No wait, pasting together the replies counts as snapping blocks together. Maybe they just ask for completed programs.
kak,
12 Марта 2020
-
0
- 1
let randomHexColor = (g = () => (a => (a < 16 ? '0' : '') + a.toString(16))(~~(Math.random() * 255)))() + g() + g();
fuckyounoob,
09 Февраля 2020
-
0
- 1
Ворециометр зашкаливает
Охладите трахание.
Как будто вернулся в 2015, когда не понимал о чём тут пишут.
3_dar,
22 Января 2020
-
−1
- 1
- 2
- 3
- 4
сука блядь ебучий фрорнтенд блядь гори сука в аду, JS, HTML, CSS и прочая хуета, это ебаное исчадь ада
еuо создали настоящие мрази, ебучие серийные программисты, сколько жизней уже отобрала эта хуйня?
ПРЕДСТАВЬТЕ ПРОСТО СКОЛЬКО ЛЮДЕЙ В СУММЕ ПОТРАТИЛИ ВРЕМЕНИ НА ОТЛАДКУ ВСЕЙ ЭТО КРИВОЙ ХУЕТЫ
КОТОРАЯ БЫЛА СОЗДАНА C ОДНОЙ ЕБАНОЙ ЦЕЛЬЮ -- ДЛЯ ТОГО ЧТОБЫ УБИВАТЬ ЛЮДЕЙ, ДЕТЕЙ НА ДОНБАССЕ СУКА, ГИБНУТ!!!
МОЙ АНУС МИРОТОЧИК ПЫЛЬЮ ГАЛАКТИК ДОСТИГНУВШИХ КОЛЛАПСА
JS-PIDORAW,
20 Января 2020
-
0
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
public static long NextTimestamp()
{
if (initTimestamp == null)
{
lock (syncRoot)
{
if (initTimestamp == null)
{
initTimestamp = false;
var sessionProvider = Locator.GetServiceNotNull<ISessionProvider>();
TimestampService.GetTimestamp();
sessionProvider.CloseSession("");
initTimestamp = true;
}
}
}
return initTimestamp.Value ? TimestampService.GetTimestamp() : 0;
}
Нельзя просто взять и вызвать TimestampService.GetTimestamp() - StackOverflowException получишь. Вот как надо!
scrappyabc,
27 Ноября 2019
-
+1
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
private static string GetServerHostFromUrl(string url)
{
char[] delimiterChars = { '/', ':' };
var urlParser = url.Split(delimiterChars);
if (urlParser[0] == "http" || urlParser[0] == "https")
return urlParser[3];
else
return string.Empty;
}
Когда ты умеешь решать все поставленные задачи
partizanes,
05 Ноября 2019
-
−102
SwiftGovno,
27 Сентября 2019
-
+1
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
<?php
function php2js ($var) {
if (is_array($var)) {
$res = "[";
$array = array();
foreach ($var as $a_var) {
$array[] = php2js($a_var);
}
//return "[" . join(",", $array) . "]";
return "" . join(",", $array) . "";
}
elseif (is_bool($var)) {
return $var ? "true" : "false";
}
elseif (is_int($var) || is_integer($var) || is_double($var) || is_float($var)) {
return $var;
}
elseif (is_string($var)) {
//return "\"" . addslashes(stripslashes($var)) . "\"";
return "" . addslashes(stripslashes($var)) . "";
}
return FALSE;
}
real_escape_string,
19 Мая 2019