1. Куча / Говнокод #27118

    0

    1. 1
    Mi sidim v servernoy!

    Vse kto nas chitaet! Mi sidim v servernoy, v zaperty, mobillnyi ne beret! Pozovonite na ohrany po telefony на okrany 762-23-96 i skagite chtobi nas vypustili!

    3vservernoy, 19 Ноября 2020

    Комментарии (145)
  2. Python / Говнокод #27117

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    88. 88
    #Я новичок в питоне, учусь буквально 2 недели. Это моя первая программа - типа банкомат, 
    #которую показал для примера учитель в очень упрощенном варианте, а я уже заинтересовался этим и стал улучшать её. 
    
    x=input('Чтобы зарегистрироваться, введите логин.\n' )
    y=input('Придумайте пароль.\n')
    login=x
    password=y
    print('Вы успешно зарегистрировались!')
    print('__________________________________________________________________________________________________________________')
    print('__________________________________________________________________________________________________________________')
    print('Войдите в систему, чтобы получить доступ ко всем функциям.')
    log=(input("Введите логин:\n"))
    pas=(input("Введите пароль:\n"))
    if((log==login)and(pas == password)):
    	balance=0
    	print('__________________________________________________________________________________________________________________')
    	print('__________________________________________________________________________________________________________________')
    	print("Вход выполнен успешно! У вас на счету",balance,"р.")
    	while 1:
    		print('__________________________________________________________________________________________________________________')
    		print('__________________________________________________________________________________________________________________')
    		print("Введите 1, чтобы пополнить счет, 2, чтобы снять, 3, чтобы выйти из аккаунта, и 4, чтобы узнать состояние счета.")
    		s=int(input('(Далее - Enter.)\n'))
    		if(s==1):
    			sum=int(input("На сколько вы хотите пополнить счет? (Далее - Enter.)\n"))
    			balance=balance+sum
    			print("Операция проведена успешно! На Вашем счету",balance,'р.')
    		if(s==2):
    			print("Сколько вы желаете снять со счета?")
    			sum=int(input('(Далее - Enter.)\n'))
    			if (sum>balance):
    				print('__________________________________________________________________________________________________________________')
    				print('__________________________________________________________________________________________________________________')
    				print("На счете недостаточно средств. Попробуйте ввести меньшее значение.")
    			else:
    				balance=balance-sum
    				print("Средства сняты со счета. Остаток:",balance,"р.")
    		if(s==3):
    			print('__________________________________________________________________________________________________________________')
    			print('__________________________________________________________________________________________________________________')
    			print('Вы вышли из аккаунта.') 
    			raise SystemExit
    		if(s==4):
    			print('__________________________________________________________________________________________________________________')
    			print('__________________________________________________________________________________________________________________')
    			print('На вашем счету',balance,'р.')
    if((log!= login)or(pas!= password)):
    	count=4
    	while ((log!=login)or(pas!=password)):
    		count=count-1
    		print("Неправильно введён логин или пароль. Осталось попыток входа:", count)
    		log=(input("Введите логин:\n"))
    		pas=(input("Введите пароль:\n"))	
    		if ((count < 2)and((log!=login)or(pas!=password))):
    			print('Вход заблокирован в связи с ошибкой при входе.')
    			break
    if ((log ==login)and(pas==password)):
    	
    	balance=0
    	print('__________________________________________________________________________________________________________________')
    	print('__________________________________________________________________________________________________________________')
    	print("Вход выполнен успешно! У вас на счету",balance,"р.")
    	while ((balance > -1)):
    		print('__________________________________________________________________________________________________________________')
    		print('__________________________________________________________________________________________________________________')
    		print('Введите 1, чтобы пополнить счет, 2, чтобы снять, 3, чтобы выйти из аккаунта, и 4, для того чтобы узнать состояние счета.')
    		s=int(input('(Далее - Enter.)\n'))
    		if(s==1):
    			sum=int(input("На сколько вы хотите пополнить счет?\n"))
    			balance=balance+sum
    			print("Операция проведена успешно! На Вашем счету",balance,'р.')
    		if(s==2):
    			print("Сколько вы желаете снять со счета?")
    			sum=int(input('(Далее - Enter.)\n'))
    			if (sum>balance):
    				print("На счете недостаточно средств. Попробуйте ввести меньшее значение.")
    			else:
    				balance=balance-sum
    				print("Средства сняты со счета. Остаток:",balance,"р.")
    		if(s==3):
    			print('__________________________________________________________________________________________________________________')
    			print('__________________________________________________________________________________________________________________')
    			print('Вы вышли из аккаунта.')
    			raise SystemExit
    		if(s==4):
    			print('__________________________________________________________________________________________________________________')
    			print('__________________________________________________________________________________________________________________')
    			print('На вашем счету',balance,'р.')

    govnokoder7, 18 Ноября 2020

    Комментарии (36)
  3. Куча / Говнокод #27116

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    88. 88
    Fixpoint mint_add0 {N} (i k : Fin.t N) te_i te' t0 vec
                 (Ht : MInt nonCommRel N k vec (te' :: t0))
                 (Hik : k < i)
                 (Hcomm0 : trace_elems_commute te_i te')
                 {struct Ht} :
          exists t' : list TE,
              MInt nonCommRel N k (vec_append i te_i vec) (te' :: t') /\
              Permutation trace_elems_commute (te_i :: te' :: t0) (te' :: t').
        Proof with eauto.
          (* Welcome to the hell proof! *)
          remember (te' :: t0) as t_.
          destruct Ht as [k
                         |k j vec te_k t Hij Ht
                         |k j vec te_k te_j t Hij Hcomm Ht
                         ];
            [discriminate
            |replace te' with te_k in * by congruence; clear Heqt_..
            ].
          2:{ destruct (trace_elems_commute_dec te_i te_j).
              - apply mint_add0 with (te_i := te_i) (i := i) in Ht; [|lia|assumption].
                destruct Ht as [t' [Ht' Hperm']].
                exists (te_j :: t'). split.
                + swap_vec_append.
                  eapply mint_cons2...
                + apply permut_cons with (a := te_k) in Hperm'.
                  eapply permut_trans...
                  now apply permut_head'.
              - exists (te_i :: te_j :: t). split.
                + swap_vec_append.
                  apply mint_cons1 with (j0 := i); [lia|].
                  apply mint_cons2 with (j0 := j); [lia|auto..].
                + now apply permut_head'.
          }
          { inversion_ Ht.
            - exists [te_i]. split.
              + swap_vec_append.
                apply mint_cons1 with (j0 := i); [lia|].
                apply mint_cons1 with (j0 := i); [lia|].
                constructor.
              + now apply permut_head'.
            - rename te into te_j.
              destruct (PeanoNat.Nat.lt_ge_cases j i).
              2:{ exists (te_i :: te_j :: t1). split.
                  - swap_vec_append.
                    apply mint_cons1 with (j1 := i); [lia|].
                    apply mint_cons1 with (j1 := j); [lia|assumption].
                  - now apply permut_head'.
              }
              { destruct (trace_elems_commute_dec te_i te_j) as [Hte_ij|Hte_ij].
                - apply mint_add0 with (i := i) (te_i := te_i) in Ht; [|lia|assumption].
                  destruct Ht as [t' [Ht' Hperm']].
                  exists (te_j :: t'). split.
                  + swap_vec_append.
                    eapply mint_cons1...
                  + apply permut_cons with (a := te_k) in Hperm'.
                    now apply permut_head.
                - exists (te_i :: te_j :: t1). split.
                  + swap_vec_append.
                    apply mint_cons1 with (j1 := i); [lia|].
                    apply mint_cons2 with (j1 := j); [lia|assumption..].
                  + apply permut_head; [assumption|constructor].
              }
            - rename j0 into i0. cbn in H0.
              destruct (PeanoNat.Nat.lt_ge_cases j i).
              2:{ exists (te_i :: te_i0 :: te_j :: t1). split.
                  + swap_vec_append.
                    apply mint_cons1 with (j0 := i); [lia|].
                    apply mint_cons1 with (j0 := j); [lia|assumption].
                  + now apply permut_head'.
              }
              { destruct (trace_elems_commute_dec te_i te_i0).
                - apply mint_add0 with (i := i) (te_i := te_i) in Ht; [|lia|assumption].
                  destruct Ht as [t' [Ht' Hperm']].
                  exists (te_i0 :: t'). split.
                  + swap_vec_append.
                    eapply mint_cons1...
                  + apply permut_cons with (a := te_k) in Hperm'.
                    now apply permut_head.
                - exists (te_i :: te_i0 :: te_j :: t1). split.
                  + swap_vec_append.
                    apply mint_cons1 with (j0 := i); [lia|].
                    apply mint_cons2 with (j0 := j); [lia|assumption..].
                  + apply permut_head.
                    * assumption.
                    * constructor.
              }
          }
        Qed.

    Мой magnum opus. Часть доказательства про выкидывание из рассмотрения коммутирующих системных вызовов.

    CHayT, 17 Ноября 2020

    Комментарии (87)
  4. C# / Говнокод #27114

    +1

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    DeliveryTruck t when t.GrossWeightClass switch
    {
        < 3000 => 10.00m - 2.00m,
        >= 3000 and <= 5000 => 10.00m,
        > 5000 => 10.00m + 5.00m,
    }

    С каждой новой версией C# всё меньше похож на C# и всё больше на Perl.

    Vindicar, 14 Ноября 2020

    Комментарии (59)
  5. Python / Говнокод #27113

    +1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    In order to fund the development work on speeding CPython by a factor of five, something like $2M will be required.
    This seems like a sizeable sum, but compared to the amount of money spent on Python development and the 
    cost of running Python applications, it is quite a modest sum.
    
    ---
    
    The overall aim is to speed up CPython by a factor of (approximately) five. We aim to do this in four distinct stages, 
    each stage increasing the speed of CPython by (approximately) 50%.
    
    1.5**4 ≈ 5
    
    ---
    
    The interpreter will adapt to types and values during execution, exploiting [b]type stability[/b] in the program
    
    ---
    
    Improved performance for [b]integers of less than one machine word[/b].
    Improved peformance for [b]binary operators[/b].
    
    ---
    
    Simple "JIT" compiler for small regions. Compile small regions of specialized code, using a relatively simple, fast compiler.
    Extend regions for compilation. Enhance compiler to generate [b]superior machine code[/b].

    питонисты готовят новую версию интерпретатора с революционной фичей - возможностью отъема денег у населения. Ожидается, что нововведение позволит языку быстро заработать очки на рынке пускания пыли в глаза.

    https://github.com/markshannon/faster-cpython

    Fike, 13 Ноября 2020

    Комментарии (65)
  6. Куча / Говнокод #27112

    0

    1. 1
    bp kernelbase!VirtualAlloc " .printf \"\n\n\n\nBytes allocated: %lu (k)\n\n\n\",(@rdx/0n1024); k 8"

    Давайте течь от windbg

    MAPTbIwKA, 13 Ноября 2020

    Комментарии (76)
  7. C++ / Говнокод #27111

    0

    1. 1
    2. 2
    3. 3
    4. 4
    pituhs.reserve(kurochkas.size());
    for (auto& kurochka : kurochkas) {
        pituhs.push_back(kurochka.snesti_jajichko());
    }

    reserve заебал.
    Коллега (да, тот же самый) пихает его везде.
    Я понимаю зачем это нужно, но блядь, я читаю на одну строку больше, чем мог бы, и лишний раз напрягаю мозг.
    И это сливается со словом «reverse».

    Кстати, оптимизаторы могли бы такую хуйню сами детектить, и резервировать сами.

    3_dar, 12 Ноября 2020

    Комментарии (122)
  8. Куча / Говнокод #27110

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    <div class="filter-aside-mobile-category-popular" id="filter-aside-mobile-category-popular">
                  <div class="catalog-mobile-menu__header">
                    <div class="catalog-mobile-menu__close">
                      <svg>
                        <use xlink:href="assets/img/sprite.svg#arr-left"></use>
                      </svg><span>Назад</span>
                    </div>
                  </div>
                  <h3 class="filter-aside-mobile-sorted__title">Популярные подборки</h3>
                <ul class="category-popular-filter__list">
                      <li class="category-popular-filter__item"><a class="category-popular-filter__link" href="#">Rotabroach</a></li>
                 
                    </ul>
                </div>

    snegoviktlt, 12 Ноября 2020

    Комментарии (7)
  9. JavaScript / Говнокод #27109

    −1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    $(".mobile-filter__footer-popular-btn").on("click",function(e){
    e.preventDefault(),
    $("#header-mobile").addClass("blue"),
    $(this).addClass("active"),
    $("#filter-aside-mobile-category-popular").addClass("active")
    });
    $("#filter-aside-mobile-category-popular .catalog-mobile-menu__close").on("click",function(e){
    e.preventDefault(),
    $("#header-mobile").removeClass("blue"),
    $(".mobile-filter__footer-popular-btn").removeClass("active"),
    $("#filter-aside-mobile-category-popular").removeClass("active")
    })

    sdf

    snegoviktlt, 12 Ноября 2020

    Комментарии (52)
  10. JavaScript / Говнокод #27108

    0

    1. 1
    2. 2
    3. 3
    $(".mobile-filter__footer-popular-btn").on("click",function(e){e.preventDefault(),$("#header-mobile").addClass("blue"),$(this).addClass("active"),$("#filter-aside-mobile-category-popular").addClass("active")}),
    	$("#filter-aside-mobile-category-popular .catalog-mobile-menu__close").on("click",function(e){e.preventDefault(),$("#header-mobile").removeClass("blue"),$(".mobile-filter__footer-popular-btn").removeClass("active"),
    	$("#filter-aside-mobile-category-popular").removeClass("active")})

    1

    snegoviktlt, 12 Ноября 2020

    Комментарии (0)