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

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    Int main(){
    Var x = 0;
    <script>
    color:red;
    >>> print('Hello world!')
    Hello world!
    Delay(256);
    /\каминтарый
    Срать(понос, 1кг,деревенский сортир);
    Cout<<говно.type<<";"<<site.govnokod.ru;

    Что выведет компилятор. Каким матом будет покрывать. Боюсь представить..

    Arduino, 04 Июля 2018

    Комментарии (4)
  2. Куча / Говнокод #24438

    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
    <!DOCTYPE html>
    <html>
        <head>
            <title>Why is he always talking about that damm movie?</title>
        </head>
        
    <img src="https://cdn.shopify.com/s/files/1/0064/7532/products/poster-war-games-1983-regular-2_1024x1024.jpg?v=1455775393" width="350" height="250">
    <br>
    <p>Wargames 1983</p>
    <br>
    <p>from: https://en.wikipedia.org/wiki/WarGames</p>
    <p>The film follows David Lightman, a young hacker who unwittingly accesses WOPR (War Operation Plan Response), a United States military supercomputer originally programmed to predict possible outcomes of nuclear war. Lightman gets WOPR to run a nuclear war simulation, believing it to be a computer game. The computer, now tied into the nuclear weapons control system and unable to tell the difference between simulation and reality, attempts to start World War III.
    </p>
    <img src="http://cdn3-www.comingsoon.net/assets/uploads/2015/10/wargames-1.jpg" width="350" height="200">
    <br>
    <p>The computer stages a massive Soviet first strike with hundreds of missiles, submarines, and bombers. Believing the attack to be genuine, NORAD prepares to retaliate. Falken (Inventor/Programmer) and David convince military officials to cancel the second strike and ride out the attack. WOPR tries to launch the missiles itself, however, using a brute-force attack to obtain the launch code. Without humans in the control centers as a safeguard, the computer will trigger a mass launch. All attempts to log in and order to cancel the countdown fail, and all weapons will launch if the computer is disabled.</p>
        
    <br>    
        <img src="http://oliversmith.cc/wp-content/uploads/2014/11/Screen-Shot-2014-11-26-at-14.17.30-e1417011526324-640x469.png" width="350" height="200">
    <p>Falken and David direct the computer to play tic-tac-toe against itself. This results in a long string of draws, forcing the computer to learn the concept of futility and no-win scenarios. WOPR obtains the missile code, but before launching, it cycles through all the nuclear war scenarios it has devised, finding they, too, all result in stalemates. Having discovered the concept of mutual assured destruction ("WINNER: NONE"), the computer tells Falken that it has concluded that nuclear war is "a strange game" in which "the only winning move is not to play." WOPR relinquishes control of NORAD and the missiles and offers to play "a nice game of chess."</p>
        
      </body>  
    </html>

    Ржунимагу. Этот говно код набрал 25 лайков а нормальный мой код калькулятора во вкладке рядом 0. Куда катится мир...

    Arduino, 02 Июля 2018

    Комментарии (17)
  3. C++ / Говнокод #24437

    0

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    https://github.com/mikael-s-persson/templight
    Templight 2.0 - Template Instantiation Profiler and Debugger
    
    Templight is a Clang-based tool to profile the time and memory consumption of
    template instantiations and to perform interactive debugging sessions to gain
    introspection into the template instantiation process.

    Шаблонные метапрограммисты будут довольны.
    Осталось еще сделать такое же, но чтобы constexpr можно было профилировать и интерактивно дебажить

    j123123, 02 Июля 2018

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

    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
    // Функция считывания списка из файла
    	private: int readContactList( System::String^ path ) {
    		contact_list_->clear();
    		try {
    			System::IO::StreamReader^ reader = gcnew System::IO::StreamReader( path ); // Объект чтения из файла
    			try {
    				System::String^ line; // считываемая строка
    				array<String^>^ contact = gcnew array<String^>( 32 ); // считываемая строка будет разбиваться 
    				array<String^>^ separator = { " " }; // разделитель строки - пробел
    				list_node* node; // вершина списка
    
    				while( line = reader->ReadLine() ) { 
    					contact = line->Split( ' ' ); // разделяем строку по пробелам
    					if ( contact->Length != 3 ) // Должно быть три числа
    						return 4;
    					try {
    						node = new list_node(); // Заводим вершину и инициализируем ее поля
    						node->element_number_ = Int32::Parse( contact[ 0 ] );
    						node->circuit_number_ = Int32::Parse( contact[ 1 ] );
    						node->contact_number_ = Int32::Parse( contact[ 2 ] );
    
    						contact_list_->pushBack( node );
    					} catch (Exception^ e) { // В случае ошибки удаляем вершину из кучи и выходим
    						delete node;
    						return 4;
    					}
    				}
    			} catch ( Exception^ e ) {
    				return 2;
    			}
    		} catch ( Exception^ e ) {
    			return 1;
    		}
    		return 0;
    	}

    Больше try - catch.
    Поля структуры не инкапсулировал потому, что тот, кому нужна эта программа не знает про инкапсуляцию.
    Кстати, сделано по примеру с MSDN

    OlegUP, 02 Июля 2018

    Комментарии (154)
  5. Си / Говнокод #24434

    −1

    1. 1
    main(){int i=0;char*c = "(5((((`+((((f(H+(P7(d(([)(/(`G(X)7d+(.X+d)X+d(_(d.GXA`gg/d(dggI7(dgg`+(dg7^)(dgKE((dGD/((d/K)(((((((((0X)(((7F(<(XK/H7(d`)`)(.D(F(H(G(/(D`7X(HOg+6(`YgX;(fd7d7//d+7X[+GHKgdX7gg77fcggYKgfg/";while(i++<1122)printf(i%34?(c[i/6]-40&1<<i%6)?"XX":" ":"\n");}

    Ёбаные обфускаторы.

    codemonkey, 02 Июля 2018

    Комментарии (24)
  6. C++ / Говнокод #24432

    +3

    1. 1
    2. 2
    3. 3
    class ... {
        void enable(bool enabled = false);
    }

    tar_gz, 30 Июня 2018

    Комментарии (11)
  7. Swift / Говнокод #24431

    +1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    @dynamicMemberLookup
    struct Uppercaser {
        subscript(dynamicMember input: String) -> String {
            return input.uppercased()
        }
    }
    
    Uppercaser().hello // → "HELLO"
    // You can type anything, as long as Swift accepts it as an identifier.
    Uppercaser().käsesoße // → "KÄSESOSSE"

    https://oleb.net/blog/2018/06/dynamic-member-lookup

    The proposal and implementation of dynamic member lookup was largely driven by the Swift for TensorFlow team at Google. Their main motivation is to facilitate interoperability between Swift and dynamic languages, specifically (though not exclusively) Python. Their goal is to make it possible to call Python code from Swift with a pretty and familiar syntax.

    We need MOAR syntax sugar

    Desktop, 30 Июня 2018

    Комментарии (21)
  8. Pascal / Говнокод #24429

    −3

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    30 июня 2012 года Михаилу Подивилову (mihip, podivilov) пришла в голову создать свою систему счисления WCT. 
    Напоминаю, что цифры WCT ABCDEFGHIJKLMNPO соответствует цифрам HEX 0123456789ABCDEF соответственно. 
    А реализация компилятора была написана на Embarcadero Delphi. 
    
    Стертор, не ты ли это?

    dm_fomenok, 29 Июня 2018

    Комментарии (41)
  9. PHP / Говнокод #24428

    +2

    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
    $param="";
    if (isset($_REQUEST['NO'])) {
    	$param="?NO=".$_REQUEST['NO'];
    }
    if (isset($_REQUEST['no'])) {
    	$param="?NO=".$_REQUEST['no'];
    }
    if (isset($_REQUEST['No'])) {
    	$param="?NO=".$_REQUEST['No'];
    }
    if (isset($_REQUEST['nO'])) {
    	$param="?NO=".$_REQUEST['nO'];
    }

    Сначала я думал что пьяный индус скопировал и четыре раза вставил кусок кода а потом присмотрелся и ахуел, аж здесь зарегистрировался.

    zhigalin, 29 Июня 2018

    Комментарии (16)
  10. Ruby / Говнокод #24427

    0

    1. 1
    course = course_id > 0 ? Course.find(course_id) : nil

    стаж - это багаж. Senior

    AlexKlim, 29 Июня 2018

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