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

    +128

    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
    <th style='border-left: 1px solid #97cbee;'>Premium<br />without<br />excess<span><img src='Artog/Images/empty/empty.gif' /></span>
    					<div style='position: relative; top: 0'>
    						<IMG class='str3' width='16' heigth='16' title='The excess can be removed from some plans in return for a higher premium.<br/>You can select this option when purchasing the plan from the insurer.' src="Artog/Images/Icons/InfoIcon28x28.png" />
    					</div>
    				</th>
    				<th style='border-left: 1px solid #97cbee'>Luggage/<br />Personal<br />effects<span><img src='Artog/Images/empty/empty.gif' /></span>
    					<div style='position: relative'>
    						<IMG class='str3' width='16' heigth='16' title='Coverage on luggage (typically important for people with a lot of good quality travel gear)' src="Artog/Images/Icons/InfoIcon28x28.png" />
    					</div>
    				</th>
    				<th style='border-left: 1px solid #97cbee'>Medical<br />expenses<span><img src='Artog/Images/empty/empty.gif' /></span>
    					<div style='position: relative'>
    						<IMG class='str2' width='16' heigth='16' title='How much will be contributed to any doctor's bills, emergency surgery etc. (for obvious reasons this is generally important for all travelers)' src="Artog/Images/Icons/InfoIcon28x28.png" />
    					</div>
    				</th>
    				<th style='border-left: 1px solid #97cbee'>Cancellation<br />costs<span><img src='Artog/Images/empty/empty.gif' /></span>
    					<div style='position: relative'>
    						<IMG class='str2' width='16' heigth='16' title='How much will be paid from inconvenience due to cancellation of flights etc. (typically important for people with a complex itinerary)' src="Artog/Images/Icons/InfoIcon28x28.png" />
    					</div>
    				</th>

    разбираю тут 1 проект
    <th style='border-left: 1px solid #97cbee'> <---------- индусы не знают ,что такое класс в css

    Rubaka, 20 Сентября 2011

    Комментарии (8)
  2. Java / Говнокод #7908

    +74

    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
    public class Statuses {
        protected List<String> id;
        protected List<String> name;
    
        public List<String> getId() {
            if (id == null) {
                id = new ArrayList<String>();
            }
            return this.id;
        }
    
        public List<String> getName() {
            if (name == null) {
                name = new ArrayList<String>();
            }
            return this.name;
        }
    }
    
    Statuses statuses = new Statuses();
    List<String> statusesString = statuses.getId();

    Создание пустого списка.

    Art, 20 Сентября 2011

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

    +178

    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
    96. 96
    97. 97
    <?
    $g_menu=0;
    if(isset($_GET['A']))
     {
    	// это реализация ЧПУ - бля, работает...
       if($_GET['A']=='oi'){$i=1;}
        if($_GET['A']=='po'){$i=2;}
          if($_GET['A']=='pt'){$i=3;}
            if($_GET['A']=='ko'){$i=5;}
         if($_GET['A']=='sl'){$i=9;}
          if($_GET['A']=='ml'){$i=11;}
          if($_GET['A']=='pd'){$i=12;}
            if($_GET['A']=='da'){$i=13;}
            if($_GET['A']=='sa'){$i=14;}
            if($_GET['A']=='na'){$i=15;}
            if($_GET['A']=='da'){$i=16;}
            if($_GET['A']=='dn'){$i=17;}  
            if($_GET['A']=='dk'){$i=18;} 
            if($_GET['A']=='im'){$i=6;} 
          if($_GET['A']=='articles'){$i=19;}   
    	  if($_GET['A']=='du'){$i=20;}   
    	   if($_GET['A']=='dz'){$i=21;}  
    	   if($_GET['A']=='ii'){$i=22;}  
    	   if($_GET['A']=='dy'){$i=23;}
    	    if($_GET['A']=='ct'){$i=24;}
    	    if($_GET['A']=='ti'){$i=25;}  
      }
    else
    {
      if (!isset($_GET['i'])){$i=0;}
      else
      {
      $i=$_GET['i'];
      if($i!=1 && $i!=2 && $i!=3  && $i!=4 && $i!=5 && $i!=6 && $i!=7 && $i!=8 && $i!=9 && $i!=11 && $i!=12 && $i!=13 
      && $i!=14 && $i!=15 && $i!=16 && $i!=17 && $i!=18 && $i!=19 && $i!=20 && $i!=21 && $i!=22 && $i!=23 && $i!=24 && $i!=25    ){$i=0;}
      }
     }
    print"
    <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>
    <html>
    <head>
    ";
    print"
    <META http-equiv=Content-Type content='text/html; charset=windows-1251'>
    ";
      if($i==1 || $i==0)
    {
    print"
    <title>xxx</title>
    <meta name=Description content='xxx'>
    <meta name=Keywords content='xxx'>
    ";
    }
     if($i==2)
    {
    print"
    <title>yyy</title>
    <meta name=Description content='yyy'>
    <meta name=Keywords content='yyy'>
    ";
    }
     if($i==3)
    {
    print"
    <title>zzz</title>
    <meta name=Description content='zzz'>
    <meta name=Keywords content='zzz'>
    ";
    } 
    // далее сокращу
    if($i==5)
    {
    print"...";
    }
     if($i==9)
    {
    print"...";
    }
     if($i==11)
    {
    print"...";
    }
     if($i==12)
    {
    print"...";
    }
    // много говна, числа иногда не по порядку: реализует титлы, кейвордс и дескрипшн
     if($i==25)
    {
    print"...";
    }
    //  внезапно
    if($i==7 || $i==8 || $i==3)
    {
    print"...";
    }
    /* дальше хтмл-говно со вставками типа: <? if($g_menu==1) { print"блок хтмл-говна"; } ?> */

    Открыл я значит исходники одного сайта...

    deep, 20 Сентября 2011

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

    +170

    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
    $email = strip_tags($email);
    $email = str_replace("’", "", $email);
    $email = str_replace("(", "", $email);
    $email = str_replace(")", "", $email);
    $email = str_replace(";", "", $email);
    $email = str_replace(":", "", $email);
    $email = str_replace("<", "", $email);
    $email = str_replace("'", "", $email);
    $email = str_replace("UNION", "", $email);
    $email = str_replace("SELECT", "", $email);
    $email = str_replace("WHERE", "", $email);
    $email = str_replace("LIKE", "", $email);
    $email = str_replace("FROM”", "", $email);
    $email = str_replace("UPDATE", "", $email);
    $email = str_replace("INSERT", "", $email);
    $email = str_replace("ORDER", "", $email);
    $email = str_replace("GROUP", "", $email);
    $email = str_replace("ALTER", "", $email);
    $email = str_replace(" OR ", "", $email);
    $email = str_replace(" or ", "", $email);
    $email = str_replace("=", "", $email);
    
    $email1 = str_replace("’", "", $email1);
    $email1 = str_replace("(", "", $email1);
    $email1 = str_replace(")", "", $email1);
    $email1 = str_replace(";", "", $email1);
    $email1 = str_replace(":", "", $email1);
    $email1 = str_replace("<", "", $email1);
    $email1 = str_replace("'", "", $email1);
    $email1 = str_replace("UNION", "", $email1);
    $email1 = str_replace("SELECT", "", $email1);
    $email1 = str_replace("WHERE", "", $email1);
    $email1 = str_replace("LIKE", "", $email1);
    $email1 = str_replace("FROM”", "", $email1);
    $email1 = str_replace("UPDATE", "", $email1);
    $email1 = str_replace("INSERT", "", $email1);
    $email1 = str_replace("ORDER", "", $email1);
    $email1 = str_replace("GROUP", "", $email1);
    $email1 = str_replace("ALTER", "", $email1);
    $email1 = str_replace(" OR ", "", $email1);
    $email1 = str_replace(" or ", "", $email1);
    $email1 = str_replace("=", "", $email1);
    
    $location = str_replace("’", "", $location);
    $location = str_replace("(", "", $location);
    $location = str_replace(")", "", $location);
    $location = str_replace(";", "", $location);
    $location = str_replace(":", "", $location);
    $location = str_replace("<", "", $location);
    $location = str_replace("'", "", $location);
    $location = str_replace("UNION", "", $location);
    $location = str_replace("SELECT", "", $location);
    $location = str_replace("WHERE", "", $location);
    $location = str_replace("LIKE", "", $location);
    $location = str_replace("FROM”", "", $location);
    $location = str_replace("UPDATE", "", $location);
    $location = str_replace("INSERT", "", $location);
    $location = str_replace("ORDER", "", $location);
    $location = str_replace("GROUP", "", $location);
    $location = str_replace("ALTER", "", $location);
    $location = str_replace(" OR ", "", $location);
    $location = str_replace(" or ", "", $location);
    $location = str_replace("=", "", $location);
    
    $cinsiyet = str_replace("’", "", $cinsiyet);
    $cinsiyet = str_replace("(", "", $cinsiyet);
    $cinsiyet = str_replace(")", "", $cinsiyet);
    $cinsiyet = str_replace(";", "", $cinsiyet);
    $cinsiyet = str_replace(":", "", $cinsiyet);
    $cinsiyet = str_replace("<", "", $cinsiyet);
    $cinsiyet = str_replace("'", "", $cinsiyet);
    $cinsiyet = str_replace("UNION", "", $cinsiyet);
    $cinsiyet = str_replace("SELECT", "", $cinsiyet);
    $cinsiyet = str_replace("WHERE", "", $cinsiyet);
    $cinsiyet = str_replace("LIKE", "", $cinsiyet);
    $cinsiyet = str_replace("FROM”", "", $cinsiyet);
    $cinsiyet = str_replace("UPDATE", "", $cinsiyet);
    $cinsiyet = str_replace("INSERT", "", $cinsiyet);
    $cinsiyet = str_replace("ORDER", "", $cinsiyet);
    $cinsiyet = str_replace("GROUP", "", $cinsiyet);
    $cinsiyet = str_replace("ALTER", "", $cinsiyet);
    $cinsiyet = str_replace(" OR ", "", $cinsiyet);
    $cinsiyet = str_replace(" or ", "", $cinsiyet);
    $cinsiyet = str_replace("=", "", $cinsiyet);

    Большой проект. Часть переменных на турецком. Смесь из php с html. Файлы проекта сохранены в разных кодировках. Mysql конфиги иногда подключаются include'ом, иногда прямо в текущем файле.

    zorbis, 20 Сентября 2011

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

    +124

    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
    public object Data 
                {
                    get
                    {
                        return this._data;
                    }
                    set
                    {
                        (((value is byte ||
                           value is short ||
                           value is ushort ||
                           value is int ||
                           value is uint ||
                           value is long ||
                           value is ulong ||
                           value is decimal ||
                           value is double ||
                           value is float) && (DataType == JsonNodeDataType.Number)) ||
                         ((value is string) && (DataType == JsonNodeDataType.String)) ||
                         ((value is object[]) && (DataType == JsonNodeDataType.Array)) ||
                         ((value is Json) && (DataType == JsonNodeDataType.SubObject)) ||
                         ((value is bool) && (DataType == JsonNodeDataType.Boolean))).Assert();
                        this._data = value;
                    }
                }

    Изобретаю велосипед для работы с Json

    psina-from-ua, 20 Сентября 2011

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

    +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
    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
    for (DWORD CurItem=0; CurItem<dwNumItems; CurItem++)
    	{
    		switch (CurItem) 
    
    		{
    		case 0:
    			description.LoadString(IDS_OPC_PROP_CDT);	
    			pPropertyIDs[CurItem]	=	OPC_PROP_CDT;
    			pDescriptions[CurItem]	=	OpcStrDup(description);
    			pDataTypes[CurItem]		=	VT_I2;
    			break;
    		case 1:
    			description.LoadString(IDS_OPC_PROP_VALUE);	
    			pPropertyIDs[CurItem]	=	OPC_PROP_VALUE;
    			pDescriptions[CurItem]	=	OpcStrDup(description);
    			pDataTypes[CurItem]		=	pDATag->m_value.vt;
    			break;
    		case 2:
    			description.LoadString(IDS_OPC_PROP_QUALITY);	//Item Quality
    			pPropertyIDs[CurItem]	=	OPC_PROP_QUALITY;
    			pDescriptions[CurItem]	=	OpcStrDup(description);
    			pDataTypes[CurItem]		=	VT_I2;
    			break;
    		case 3:
    			description.LoadString(IDS_OPC_PROP_TIME);		//Item Timestamp
    			pPropertyIDs[CurItem]	=	OPC_PROP_TIME;
    			pDescriptions[CurItem]	=	OpcStrDup(description);
    			pDataTypes[CurItem]		=	VT_DATE;
    			break;
    		case 4:
    			description.LoadString(IDS_OPC_PROP_RIGHTS);	//Item Access Rights
    			pPropertyIDs[CurItem]	=	OPC_PROP_RIGHTS;
    			pDescriptions[CurItem]	=	OpcStrDup (description);
    			pDataTypes[CurItem]		=	VT_I4;
    			break;
    		case 5:
    			description.LoadString(IDS_OPC_PROP_DESC);		//Item Description
    			pPropertyIDs[CurItem]	=	OPC_PROP_DESC;
    			pDescriptions[CurItem]	=	OpcStrDup(description);
    			pDataTypes[CurItem]		=	VT_BSTR;
    			break;
    		case 6:
    			description.LoadString(IDS_OPC_PROP_SCANRATE);		//Item ScanRate
    			pPropertyIDs[CurItem]	=	OPC_PROP_SCANRATE;
    			pDescriptions[CurItem]	=	OpcStrDup(description);
    			pDataTypes[CurItem]		=	VT_R4;
    			break;
    		/////////////////////////////////////////////////////////////////////////
    		
    		}
    	}

    azote, 20 Сентября 2011

    Комментарии (6)
  7. Perl / Говнокод #7903

    −110

    1. 1
    Понтовый язык. Не полный по Тьюрингу...

    alexoy, 20 Сентября 2011

    Комментарии (15)
  8. Ruby / Говнокод #7902

    −105

    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
    def show
        @updates = UpdateList.new
        update_id = params[:update_id]
    
        if 'twitter' == @provider_key
          provider_api = ProviderApi::Twitter.new(current_user)
    
          if update_id.present?
            begin
              benchmark(" Twitter API: status") do
                @api_response = provider_api.status(update_id)
              end
              @update = update = SocialUpdate.from_twitter_response(@api_response, true)
              while update && (in_reply_to = update.in_reply_to_update_id)
                benchmark(" Twitter API: status") do
                  @previous_status = provider_api.status(in_reply_to)
                end
    
                if error = @previous_status['error']
                  @updates << SocialUpdate.from_twitter_error(error)
                  break
                else
                  update = SocialUpdate.from_twitter_response(@previous_status, true)
                  @updates << update
                end
              end
            rescue => e
              logger.info("Error in fetching status #{in_reply_to || update_id}: #{e}")
            end
          end
        end
    
        @update.flag_for_user(current_user) if @update
        @updates.flag_for_user(current_user)
      end

    sumskyi, 19 Сентября 2011

    Комментарии (1)
  9. Си / Говнокод #7901

    +146

    1. 1
    if ((chlen = wcwidth(CharOf(CHDEREF(ch)))) <= 0) {

    хорошо назвали переменную н курсес 5.9 tty_update.c

    ragim, 19 Сентября 2011

    Комментарии (14)
  10. C# / Говнокод #7900

    +128

    1. 1
    2. 2
    3. 3
    string a = 'a'+""+'b';
    string b = ""+'a'+'b';
    string c = 'a'+'b'+"";

    никогда не воспроизводи говнокод по памяти

    Ccik, 19 Сентября 2011

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