1. C++ / Говнокод #8422

    +995

    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
    #include <stdio.h>
    #include <conio.h>
    #include <condefs.h>
     
    int main() {
    char str[]="любой текст";
    int i=0;
    while (str[i]!='\0') {
    printf("%c", str[i++]^100);
    if (str[i]=='\0') break;
    printf("%c", str[i++]|10);
    if (str[i]=='\0') break;
    printf("%c", str[i++]&400);
    if (str[i]=='\0') break;
    }
    printf("\n");
    getch();
    return 0;
    }

    Шифруется текст

    ITdocer, 03 Ноября 2011

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

    +147

    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
    <HTML>
    <HEAD>
      <META content='text/html; charset=utf-8' http-equiv=Content-Type>
      <META name="Expires" content="Mon, 26 Jul 1997 05:00:00 GMT">
      <META name="Cache-Control" content="no-store, no-cache, must-revalidate">
      <META name="Cache-Control" content="post-check=0, pre-check=0">
      <META name="Pragma" content="no-cache">
      <LINK href='style.css' rel=stylesheet type=text/css>
      <SCRIPT  type="text/javaSCRIPT" src="md5.js"></SCRIPT>
    
    </HEAD>
    <BODY>
    <SCRIPT language=javascript>
      function logins(){
        var key = hex_md5(document.authentication.chalangeack.value + document.authentication.password.value.substring(0,15) );
        document.authentication.password.value = key;
        }
    </SCRIPT>
    <H1>МФТИ-Телеком</H1>
    <TABLE align=center border=0 borderColor=#060102 cellSpacing=2 cellPading=2 width=100%><FORM name=authentication action='/bin/login.cgi' autocomplete=off>
      <TR><TD align=center height=20></TD></TR>
        <TR><TD align=center><INPUT type=hidden name=chalangeack value=2a08933e327a7877ec91efd746076b48>
            &nbsp; <STRONG>Логин: </STRONG> &nbsp;<INPUT type=text name=login size=20>&nbsp;&nbsp; <STRONG>Пароль: </STRONG> &nbsp;<INPUT type=password name=password size=20>&nbsp;
    
          </TD>
        </TR>
        <TR><TD align=center height=10></TD></TR>    
        <TR><TD align=center>&nbsp; <STRONG>Запомнить этот компьютер: </STRONG> &nbsp;<INPUT type=checkbox name=memorize checked>&nbsp;</TD></TR>
        <TR><TD align=center><INPUT type=submit value='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Войти &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' onclick="logins()" width=400></TD></TR>
      </FORM></TABLE>
      
    <TABLE align=center border=0 borderColor=#060102 cellSpacing=2 cellPading=2 width=100%><FORM  action='/bin/logout.cgi' autocomplete=off>  
        <TR><TD align=center><INPUT type=submit value='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Закрыть доступ в Интернет для этого компьютера. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' width=400></TD></TR>   
    
    </FORM></TABLE>  
    
    <ADDRESS>&copy;&nbsp;2010 <a href="http://www.mipt-telecom.ru/">МФТИ-Телеком</a></ADDRESS>
    
    
    
    </BODY></HTML>

    2011 год на дворе блин

    blah, 03 Ноября 2011

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

    +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
    /**/
    	TCHAR* szFileType = _T("");
    	int ftype = JGetByte( hContact, "AvatarType", PA_FORMAT_UNKNOWN );
    	if( ftype == PA_FORMAT_UNKNOWN ) {
    		WIN32_FIND_DATA ffd;
    		HANDLE hFind = FindFirstFile( ptszDest, &ffd );
    		if ( hFind != INVALID_HANDLE_VALUE ) {
    			wchar_t* szExt = m_strrchrs( ffd.cFileName, ".\\" );
    			if( szExt ) {
    				if( !_tcsicmp( szExt, _T(".jpg") ) )
    					ftype = PA_FORMAT_JPEG;
    				else if( !_tcsicmp( szExt, _T(".png") ) )
    					ftype = PA_FORMAT_PNG;
    				else if( !_tcsicmp( szExt, _T(".gif") ) )
    					ftype = PA_FORMAT_GIF;
    				else if( !_tcsicmp( szExt, _T(".bmp") ) )
    					ftype = PA_FORMAT_BMP;
    				if( ftype != PA_FORMAT_UNKNOWN )
    					JSetByte( hContact, "AvatarType", ftype );
    			}
    			FindClose( hFind );
    		}
    	}
    	switch( ftype ) {
    		case PA_FORMAT_JPEG: szFileType = _T("jpg");   break;
    		case PA_FORMAT_PNG:  szFileType = _T("png");   break;
    		case PA_FORMAT_GIF:  szFileType = _T("gif");   break;
    		case PA_FORMAT_BMP:  szFileType = _T("bmp");   break;
    	}

    http://infium.googlecode.com/svn/trunk/Jabber/jabber_misc.cpp

    bot-minurast, 03 Ноября 2011

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

    +158

    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
    <table class="alpha">
    	<tbody><tr><td onclick="    CitySelect = document.getElementById('cityFind');
    			    selectId = CitySelect.selectedIndex;
    			    ttt = CitySelect.options[selectId].value;
    			    symb=escape('А');
    			    sndAPReq('getStreets.php?city='+ttt+'&amp;name='+symb)">А</td><td onclick="    CitySelect = document.getElementById('cityFind');
    			    selectId = CitySelect.selectedIndex;
    			    ttt = CitySelect.options[selectId].value;
    			    symb=escape('Б');
    			    sndAPReq('getStreets.php?city='+ttt+'&amp;name='+symb)">Б</td><td onclick="    CitySelect = document.getElementById('cityFind');
    			    selectId = CitySelect.selectedIndex;
    			    ttt = CitySelect.options[selectId].value;
    			    symb=escape('В');
    			    sndAPReq('getStreets.php?city='+ttt+'&amp;name='+symb)">В</td><td onclick="    CitySelect = document.getElementById('cityFind');
    			    selectId = CitySelect.selectedIndex;
    			    ttt = CitySelect.options[selectId].value;
    			    symb=escape('Г');
    			    sndAPReq('getStreets.php?city='+ttt+'&amp;name='+symb)">Г</td><td onclick="    CitySelect = document.getElementById('cityFind');
    			    selectId = CitySelect.selectedIndex;
    			    ttt = CitySelect.options[selectId].value;
    			    symb=escape('Д');
    			    sndAPReq('getStreets.php?city='+ttt+'&amp;name='+symb)">Д</td>
    
    //... пропущен весь алфавит и цифры ...
    
    <td onclick="    CitySelect = document.getElementById('cityFind');
    			    selectId = CitySelect.selectedIndex;
    			    ttt = CitySelect.options[selectId].value;
    			    symb=escape('9');
    			    sndAPReq('getStreets.php?city='+ttt+'&amp;name='+symb)">9</td></tr>
    </tbody></table>

    Выбор улицы.

    AjiTae, 03 Ноября 2011

    Комментарии (6)
  5. ActionScript / Говнокод #8418

    −115

    1. 1
    2. 2
    3. 3
    4. 4
    private function validateString(s:String):Boolean
    {
    	return s != null && s.length > 0;
    }

    Все тот же Сан Диего, true story.

    wvxvw, 03 Ноября 2011

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

    +179

    1. 1
    <div onclick="window.location = 'site.com/product/detail/12';">ссылка</div>

    И такие люди берут деньги за свою работу

    taral, 03 Ноября 2011

    Комментарии (17)
  7. PHP / Говнокод #8416

    +159

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    ..... Всякий HTML .....
    <?php echo "<div class='divfilter'>"; ?> 
    <?php echo "Пользователь: " ;?>
    <?php echo CHtml::dropDownList('id_member',$id_member, $members);  ?>
    <?php echo "</div>"; ?>
     ..... Всякий HTML .....

    Доделываю проект на Yii Framework, за предыдущим программистом, в одно их view заметил ))

    Igogo, 03 Ноября 2011

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

    +1011

    1. 1
    #define RETURN_OR_THROW_EXCEPTION_IF_ERROR(Expression, Exception) if(!Expression) throw Exception; return Expression

    AnimeGovno-_-, 03 Ноября 2011

    Комментарии (16)
  9. Java / Говнокод #8414

    +75

    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
    // Gets the starting position for the endtag of the first element in text.
        private int getEndTagPosition(String element, String text) {
            String startTag = "<" + element;
            String endTag = "</" + element;
            int nestingLevel = 1;
            int end = 0;
            int startPos = 1;
    
            while (nestingLevel > 0) { // loop until matching endtag is found
                int start = text.indexOf(startTag, startPos);
                end = text.indexOf(endTag, startPos);
    
                if ((start == -1) || (start > end)) {   // next tag is an endtag
                    nestingLevel--;
                    startPos = end + 1;
                } else {    // next tag is a starttag
                    nestingLevel++;
                    startPos = start + 1;
                }
            }
    
            return end;
        }

    euee, 03 Ноября 2011

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

    +127

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    if (ddlSex.SelectedValue.Contains("мужской"))
           cbPregnant.Visible = false;
    if (employer.Pregnant.StartsWith("1"))
          cbProject.Checked = true;
    if (employer.Pregnant.StartsWith("2"))
          cbPregnant.Checked = true;

    TasmX, 03 Ноября 2011

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