1. C# / Говнокод #5820

    +119

    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
    int buf;
                    for (int j = 1; j < srows.Length; j++)
                        for (int i = 0; i < srows.Length - j; i++)
                        {
                            if (vrows[i] > vrows[i + 1])
                            {
                                buf = vrows[i];
                                vrows[i] = vrows[i + 1];
                                vrows[i + 1] = buf;
    
                                buf = srows[i];
                                srows[i] = srows[i + 1];
                                srows[i + 1] = buf;
                            }
                        }

    В коде формы. (c) EGAR

    jonie, 28 Февраля 2011

    Комментарии (13)
  2. ActionScript / Говнокод #5819

    −106

    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
    private function handleApplcationCallback(call:String, params:String = "") : void 
    {
    	var paramsArr:Array; 
    	if(params)
    		paramsArr = params.length > 0 ? params.split(",") : [];
    	else 
    		paramsArr = [];	
    	try 
    	{
    		handleApplicationCalls(call,paramsArr);
    	} 
    	catch (error : Error)
    	{
    	}
    }

    wvxvw, 28 Февраля 2011

    Комментарии (11)
  3. PHP / Говнокод #5818

    +163

    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
    case 'form_processing':
            	   /*многа букаф*/
            	    die();
            	    break;//чтобы наверняка
    
            	// Выведем собщение об успешной отправке данных
            	case 'processing_succses':
            	    $content = $this->get_template_block('processing_succses');
            	    break;
    
                // Выведем собщение невозможности отправки
            	case 'processing_fail':
            	    $content = $this->get_template_block('processing_fail');
            	    break;

    gorky, 28 Февраля 2011

    Комментарии (18)
  4. JavaScript / Говнокод #5817

    +162

    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
    <script language="javascript" src="http://media.fastclick.net/w/get.media?sid=24280&m=1&tp=5&d=j&t=n"></script><noscript><a href="http://media.fastclick.net/w/click.here?sid=24280&m=1&c=1" target="_blank"><img src="http://media.fastclick.net/w/get.media?sid=24280&m=1&tp=5&d=s&c=1"width=728 height=90 border=1></a></noscript> 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <title>unstyled form</title>
    <script type="text/JavaScript">
    <!--
    function myF(targ,selObj,restore){
      eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
      if (restore) selObj.selectedIndex=0;
    }
    //-->
    </script>
    </head>
    
    <body>
    <form id="form1">
    	<select name="menu1" onchange="myF('parent',this,0)">
    		<option>Return to home page</option>
    		<option>Contact</option>
    		<option>unnamed1</option>
    	</select>
    </form>
    </body>
    </html>

    С новым 1993-им годом!

    xxx, 28 Февраля 2011

    Комментарии (3)
  5. PHP / Говнокод #5816

    +169

    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
    if (($_GET['var'])==0 and ($_GET['email'])==1 and ($_GET['numbers'])==1)
    $label='Вы неправильно указали логин';
    elseif (($_GET['var'])==0 and ($_GET['email'])==0 and ($_GET['numbers'])==1)
    $label='Вы неправильно указали логин и е-мейл';
    elseif (($_GET['var'])==1 and ($_GET['email'])==0 and ($_GET['numbers'])==1)
    $label='Вы неправильно указали е-мейл';
    elseif (($_GET['var'])==0 and ($_GET['email'])==0 and ($_GET['numbers'])==0)
    $label='Вы неправильно указали логин, е-мейл и числовой набор';
    elseif (($_GET['var'])==1 and ($_GET['email'])==1 and ($_GET['numbers'])==0)
    $label='Вы неправильно указали числовой набор';
    elseif (($_GET['var'])==0 and ($_GET['email'])==1 and ($_GET['numbers'])==0)
    $label='Вы неправильно указали логин и числовой набор';
    else
    $label='';

    Вывод ошибки

    Dedan, 28 Февраля 2011

    Комментарии (19)
  6. JavaScript / Говнокод #5815

    +145

    1. 1
    <noscript><meta http-equiv="refresh" content="0; URL=/badbrowser.php"></noscript>

    Паша Дура запретил отрубать его говноскрипты, теперь все должны смотреть на контакт, засранный скриптами.

    TarasB, 27 Февраля 2011

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

    +164

    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
    var s = setUpOmnitureVariable();
    s.pageName="LO-20110214-EE-VQP-203";
    s.server="www2.experts-exchange.com";
    s.channel="Web_Development/Web_Languages-Standards/PHP";
    s.pageType="";
    s.prop1=document.title;
    s.prop2="";
    s.prop3="";
    s.prop4="";
    s.prop5="";
    s.prop6="";
    s.prop7=""; // TODO THIS IS NO LONGER PROP 7, SHOULD BE BLOG AUTHOR
    s.prop8="";
    s.prop9="";
    s.prop10="";
    s.prop11="";
    s.prop12="";
    s.prop14="";
    s.prop15="50";
    s.prop16="";
    
    <...>
    
    s.prop27="";
    s.prop28="";
    
    <...>
    s.prop41="";
    s.prop42="";
    s.prop43="";
    s.prop44="";
    s.prop45="";
    s.prop46="";
    s.prop47="";
    s.prop48="";
    s.prop49="";
    s.prop50="";
    /* E-commerce Variables */
    s.campaign="";
    s.events="event4,event74";
    s.products="";
    s.state="";
    s.zip="";
    s.purchaseID="";
    s.eVar1=document.title;
    s.eVar2="";
    s.eVar3="AD #3 - Scroll, bullet, no steps";
    s.eVar4="";
    s.eVar5="";
    s.eVar6="Free Trial Guest";
    s.eVar7="";
    s.eVar8="";
    s.eVar9="";
    s.eVar10="";
    s.eVar14="";
    
    <...>
    s.eVar26="";
    s.eVar27="";
    s.eVar28="";
    s.eVar29="5AM";
    s.eVar30="Sunday";
    s.eVar31="77.243.99.37";
    s.eVar32="";
    s.eVar33="Web_Development/Web_Languages-Standards/PHP";
    s.eVar34="3";
    s.eVar35="20110214-EE-VQP-203-FREE-TRIAL";
    s.eVar36="Header AD";
    
    <...>
    
    s.eVar44="Accepted Solution";
    s.eVar45="EE_Level3 - 2";
    s.eVar46="";
    s.eVar47="";
    s.eVar48="";
    s.eVar49="rating9.6";

    Источник виден в коде. Неужели нельзя было массив сделать?! Или это такой странный вид обфускации?

    RaZeR, 27 Февраля 2011

    Комментарии (9)
  8. ActionScript / Говнокод #5813

    −107

    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
    public function receive(streamName:String):void
    {
    	stopReceive()
    	
    	if(!netConnection.connected)
    	{
    		receiveStreamName = streamName;
    		LogAppender.getInstance().appendLog(LogType.STREAM_LOG,"FMSStream.receive?not connected, set streamName: " + receiveStreamName);
    		return;
    	}
    	
    	nsReceive = new NetStream(netConnection);
    	nsReceive.addEventListener(NetStatusEvent.NET_STATUS, handleReceiveNetStreamStatus);
    	nsReceive.play(streamName, -2, -1, true);
    	dispatchEvent(new VRDataEvent(VRDataEvent.OPPONENT_STREAM_UPDATED));
    	// default audio sound
    	var st:SoundTransform = nsReceive.soundTransform;
    	st.volume = 0.7;
    	nsReceive.soundTransform = st;			
    	examineCallTimer.start();
    	LogAppender.getInstance().appendLog(LogType.STREAM_LOG,"FMSStream.receive?play=" + streamName);
    }

    Уже за новыми наушниками собирался идти...

    wvxvw, 27 Февраля 2011

    Комментарии (5)
  9. Pascal / Говнокод #5812

    +92

    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
    89. 89
    90. 90
    91. 91
    92. 92
    93. 93
    94. 94
    95. 95
    type BOOK= record
          Name:string[20];
          Avtor:string[20];
          Price:integer;
          end;
    
     BOOKS=Array[1..100] of BOOK;
     F= File of BOOK;
    procedure Vvod(var biblioteka: books; var File_tBIBL:F; var n:integer);
    Procedure AVTOR_KN(VAR File_tBIBl:F; VAR File_tBIBl_AVTOR:text);
    Procedure TIP_TEXT(VAR File_tBIBl:F; VAR File_tBIBl_text:text);
    Function MIN_CENA( var File_tBIBl:F ; n:integer ):integer;
    procedure Vvod(var biblioteka: books; var File_tBIBL:F; var n:integer);
      var i:integer;
      begin
       rewrite(File_tBIBL);
    
      FOR i:=1 to n do begin
                     Writeln('  Vvedite nazvanie knigi');
                       readln(biblioteka[i].Name);
                     Writeln('  Vvedite avtora');
                       readln(biblioteka[i].Avtor);
                     Writeln('  Vvedite cenu');
                       readln(biblioteka[i].Price);
                     Write(File_tBIBL,biblioteka[i]);
                     writeln;
                       end;
      close(File_tBIBL);
      end;
    
      Procedure TIP_TEXT(VAR File_tBIBl:F; VAR File_tBIBl_text:text);
       var BIBLIOTEKA:BOOk;
    
         BEGIN
    
       reset(File_tBIBl);
       rewrite(File_tBIBl_text);
    
       WHILE not eof(File_tBIBl) do begin
                                    read(File_tBIBl,BIBLIOTEKA);
                                    writeln(File_tBIBl_text,BIBLIOTEKA.Name);
                                    writeln(File_tBIBl_text,BIBLIOTEKA.Avtor);
                                    writeln(File_tBIBl_text,BIBLIOTEKA.Price);
                                    writeln(File_tBIBl_text);
                                    writeln(File_tBIBl_text);
                                    end;
       close(File_tBIBl);
       close(File_tBIBl_text);
       end;
    
      Procedure AVTOR_KN(VAR File_tBIBl:F; VAR File_tBIBl_AVTOR:text);
       var BIBLIOTEKA:BOOk; Av:string;
    
         BEGIN
    
    
       reset(File_tBIBl);
       rewrite(File_tBIBl_AVTOR);
    
       Writeln('Vvedite iskomogo avtora');
       readln(Av);
    
     WHILE not eof(File_tBIBl) do   begin
                                    read(File_tBIBl,BIBLIOTEKA);
                                    if BIBLIOTEKA.Avtor = Av then begin
                                                                 writeln(File_tBIBl_AVTOR,BIBLIOTEKA.Name);
                                                                 writeln(File_tBIBl_AVTOR,BIBLIOTEKA.Avtor);
                                                                 writeln(File_tBIBl_AVTOR,BIBLIOTEKA.Price:4);
                                                                 writeln(File_tBIBl_AVTOR);
                                                                 end;
                                    end;
       close(File_tBIBl);
       close(File_tBIBl_AVTOR);
        end;
    
    var nomer,i,min:integer;BIBLIOTEKA:BOOks; SIZE:integer;
    begin
      reset(File_tBIBl);
     size:=1;
        while  not eof(File_tBIBl) do
            with BIBLIOTEKA[size] do
        begin
            readln(File_tBIBl , BIBLIOTEKA.name);
             Readln(File_tBIBl,BIBLIOTEKA.Avtor);
            readln(File_tBIBl,BIBLIOTEKA.Price);
    
            inc(size);
        end;
        dec(size);
     min:=BIBLIOTEKA[1].Price;
    for i:=1 to size  do
    if BIBLIOTEKA[i].Price< min then        begin
                                            min:=BIBLIOTEKA[i].Price;
                                            nomer:=i;
                                            end;

    Juris_Kabanis, 27 Февраля 2011

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

    +168

    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
    function ProcButton0()
    {
     var s=document.getElementById("InputN").value;
     if (s!="")
     {
      s+="0";
     }
     document.getElementById("InputN").value=s;
    }
    function ProcButton1()
    {
     document.getElementById("InputN").value+="1";
    }
    function ProcButton2()
    {
     document.getElementById("InputN").value+="2";
    }
    function ProcButton3()
    {
     document.getElementById("InputN").value+="3";
    }
    function ProcButton4()
    {
     document.getElementById("InputN").value+="4";
    }
    function ProcButton5()
    {
     document.getElementById("InputN").value+="5";
    }
    function ProcButton6()
    {
     document.getElementById("InputN").value+="6";
    }
    function ProcButton7()
    {
     document.getElementById("InputN").value+="7";
    }
    function ProcButton8()
    {
     document.getElementById("InputN").value+="8";
    }
    function ProcButton9()
    {
     document.getElementById("InputN").value+="9";
    }
    function ProcButtonClear()
    {
     document.getElementById("InputN").value="";
    }

    С сайта о программировании (#5809).
    http://codesite.hut2.ru/JavaScriptTests/Factorial/

    7ion, 26 Февраля 2011

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