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

    +133

    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
    <div style='margin-top: 8px; margin-left: 2px;'><span style='display: inline-block; width: 68px; height: 68px;'><a href='http://www.miss.ru/julii'><img src='fotki/2012-09-13-09-58-01-861mmm_tut.jpg' alt='Юлия Г' border='0' width='62' height='62'></a></span><script language='JavaScript'>
    if (document.getElementById("new_user_left_5921")) document.getElementById("new_user_left_5921").src="fotki/2012-09-13-09-58-01-861mmm_tut.jpg";
    </script><span style='display: inline-block; width: 68px; height: 68px;'><a href='http://www.miss.ru/anastasiyashirshakova'><img src='fotki/2012-04-08-15-24-10-633mmm_tut.jpg' alt='Анастасия Ширшакова' border='0' width='62' height='62'></a></span><script language='JavaScript'>
    if (document.getElementById("new_user_left_5094")) document.getElementById("new_user_left_5094").src="fotki/2012-04-08-15-24-10-633mmm_tut.jpg";
    </script><span style='display: inline-block; width: 68px; height: 68px;'><a href='http://www.miss.ru/zoloto'><img src='fotki/2011-09-20-18-16-59-630mmm_tut.jpg' alt='Анна Золотова' border='0' width='62' height='62'></a></span><script language='JavaScript'>
    if (document.getElementById("new_user_left_5095")) document.getElementById("new_user_left_5095").src="fotki/2011-09-20-18-16-59-630mmm_tut.jpg";
    </script><span style='display: inline-block; width: 62px; height: 68px;'><a href='http://www.miss.ru/angel_in_disguise'><img src='fotki/2011-10-12-13-47-56-383mmm_tut.jpg' alt='Анна Данилова' border='0' width='62' height='62'></a></span><script language='JavaScript'>
    if (document.getElementById("new_user_left_5096")) document.getElementById("new_user_left_5096").src="fotki/2011-10-12-13-47-56-383mmm_tut.jpg";
    </script><span style='display: inline-block; width: 68px; height: 68px;'><a href='http://www.miss.ru/alekc'><img src='fotki/2011-09-21-23-26-16-859mmm_tut.jpg' alt='Алекс Алекс' border='0' width='62' height='62'></a></span><script language='JavaScript'>
    if (document.getElementById("new_user_left_5098")) document.getElementById("new_user_left_5098").src="fotki/2011-09-21-23-26-16-859mmm_tut.jpg";
    </script><span style='display: inline-block; width: 68px; height: 68px;'><a href='http://www.miss.ru/milashka_t'><img src='fotki/2011-09-23-05-36-11-815mmm_tut.jpg' alt='Таня Сакович' border='0' width='62' height='62'></a></span><script language='JavaScript'>
    if (document.getElementById("new_user_left_5101")) document.getElementById("new_user_left_5101").src="fotki/2011-09-23-05-36-11-815mmm_tut.jpg";
    </script><span style='display: inline-block; width: 68px; height: 68px;'><a href='http://www.miss.ru/oksano4ka'><img src='fotki/2011-09-23-15-45-35-905mmm_tut.jpg' alt='Оксана Таштиева' border='0' width='62' height='62'></a></span><script language='JavaScript'>
    if (document.getElementById("new_user_left_5102")) document.getElementById("new_user_left_5102").src="fotki/2011-09-23-15-45-35-905mmm_tut.jpg";
    </script><span style='display: inline-block; width: 62px; height: 68px;'><a href='http://www.miss.ru/branez'><img src='fotki/2011-11-10-21-04-58-361mmm_tut.jpg' alt='Марина Бранец' border='0' width='62' height='62'></a></span><script language='JavaScript'>
    if (document.getElementById("new_user_left_5182")) document.getElementById("new_user_left_5182").src="fotki/2011-11-10-21-04-58-361mmm_tut.jpg";
    </script><span style='display: inline-block; width: 68px; height: 68px;'><a href='http://www.miss.ru/kratyulianka'><img src='fotki/2011-11-10-22-08-23-802mmm_tut.jpg' alt='Yulianka Krat' border='0' width='62' height='62'></a></span><script language='JavaScript'>
    if (document.getElementById("new_user_left_5183")) document.getElementById("new_user_left_5183").src="fotki/2011-11-10-22-08-23-802mmm_tut.jpg";
    </script><span style='display: inline-block; width: 68px; height: 68px;'><a href='http://www.miss.ru/romanova'><img src='fotki/2011-11-11-11-29-44-496mmm_tut.jpg' alt='Лилия Романова' border='0' width='62' height='62'></a></span><script language='JavaScript'>
    if (document.getElementById("new_user_left_5186")) document.getElementById("new_user_left_5186").src="fotki/2011-11-11-11-29-44-496mmm_tut.jpg";
    </script><span style='display: inline-block; width: 68px; height: 68px;'><a href='http://www.miss.ru/agafonova'><img src='fotki/2011-11-11-11-45-36-596mmm_tut.jpg' alt='Нина Агафонова' border='0' width='62' height='62'></a></span><script language='JavaScript'>
    if (document.getElementById("new_user_left_5187")) document.getElementById("new_user_left_5187").src="fotki/2011-11-11-11-45-36-596mmm_tut.jpg";
    </script><span style='display: inline-block; width: 62px; height: 68px;'><a href='http://www.miss.ru/demash'><img src='fotki/2011-11-11-11-49-50-483mmm_tut.jpg' alt='Анастасия Демаш' border='0' width='62' height='62'></a></span><script language='JavaScript'>
    if (document.getElementById("new_user_left_5188")) document.getElementById("new_user_left_5188").src="fotki/2011-11-11-11-49-50-483mmm_tut.jpg";
    </script></div>
    <br>

    Найдено в работах одного дорогого уфимского фрилансера...

    Stud, 20 Сентября 2012

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

    +168

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    function confirmDialog(sMessage) {
        if (confirm(sMessage)) {
            return true;
        } else {
            return false;
        }
    }

    Lokich, 19 Сентября 2012

    Комментарии (12)
  3. SQL / Говнокод #11801

    −164

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    9. 9
    create procedure PVN_CNV_DATE (
        DATUMS varchar(28))
    returns (
        RDATUMS date)
    AS
    begin
     datums=rdatums;
     when any do exit;
    end

    Очередной перл предшественника. cast as date? Не, не видал..

    N21, 19 Сентября 2012

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

    +133

    1. 1
    string[] res = value.Split("$".ToCharArray(), StringSplitOptions.None);

    shtaff, 19 Сентября 2012

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

    +22

    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
    static bool GetPathToExecutable( std::wstring & sPath )
    {
    #ifdef WIN32
        std::vector<wchar_t> TmpData;
    #else
        std::vector<char> TmpData;
    #endif
        static const size_t _nResize = 256;
        try
        {
            TmpData.resize( _nResize );
        }
        catch( ... )
        {
            sPath.clear();
            return false;
        }
        while( true )
        {
    #ifdef WIN32
            DWORD iSize = GetModuleFileNameW( NULL, &TmpData[0], (DWORD) TmpData.size() - 1 );
            if( GetLastError() == NO_ERROR )
            {
                sPath.assign( &TmpData[0], iSize );
                return true;
            }
            else if( GetLastError() != ERROR_INSUFFICIENT_BUFFER )
            {
                //
                // Unsupported error
                //
                break;
            }
    #else
            int iSize = readlink( "/proc/self/exe", &TmpData[0], (int) TmpData.size() - 1 );
            if( iSize < 0 )
            {
                //
                // Error is occurred
                //
                break;
            }
            if( iSize < TmpData.size() - 1 )
            {
                //
                // Store value
                //
                return LConv::ConvertCharToWstring( sPath, &TmpData[0] );
            }
    #endif
            try
            {
                TmpData.resize( iSize + _nResize );
            }
            catch(...)
            {
                break;
            }
        }
        sPath.clear();
        return false;
    }

    коллега инициализит строку

    Axrud, 19 Сентября 2012

    Комментарии (10)
  6. Java / Говнокод #11798

    +126

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    9. 9
    private Listener<BaseEvent> blurListener = new Listener<BaseEvent>() {
    	@Override
    	public void handleEvent(BaseEvent be) {
    		Component item = getComponent(be);
    		if(focusedItem == item) {
    			focusedItem = item;
    		}
    	}
    }

    Даже боюсь предположить, зачем это.

    someone, 19 Сентября 2012

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

    +38

    1. 1
    if (!file_exists($this->filePath)) fopen($this->filePath, 'r');

    норм чё

    dizballanze, 19 Сентября 2012

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

    −166

    1. 1
    select r.nID as id, d.nId as id from Tm_Region as r join Tm_Direction as d where d.strName = r.strName and d.nDepth = 2 and d.nInternational = 1;

    ответ обрабатывается в Java через "forName", так что "as *" стоит спец...сначала все было норм, потом чуть по переименовывал...минут 10 искал эту ошибку

    Dougrinch, 18 Сентября 2012

    Комментарии (0)
  9. Куча / Говнокод #11795

    +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
    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
    #!/bin/bash
    hl=`cat $1`
    wrdl=`cat ~/worlds.txt`
    addr=$PWD'/extra_hosts.txt'
    rm -f $addr && echo "Deleted host list file "$addr
    touch $addr && echo "Created file "$addr
    for address in $hl
    do
    rm $PWD/`basename $address`.txt && echo "Deleted file "$PWD/`basename $address`.txt
    done
    for address in $hl
    do
    #echo $address
    export address
    tmp=$PWD/`basename $address`.txt
    trc=$PWD/`basename $address`.tr.txt
    mytmp=/tmp/`basename $address`.txt
    curl -Ss --retry 2 --trace $trc --tr-encoding --tcp-nodelay $address > $mytmp &
    sleep 10s
    cat $mytmp \
     | grep -e '<a href=\"[^"]*\"' | grep -E -o '[^"]+'\
     | grep htm | perl -pe 's/$ENV{address}//'| \
     perl -pe 's/^\//$ENV{address}\//' | perl -pe 's/text\/html//'|\
      sed -e 's/<[^>]*>//g' -e '/\/http:/d;/^http/p;d;' | sort | uniq >> $addr &
    for wrd in `cat ~/worlds.txt`
    do
    export wrd
    cat -b $mytmp\
    | sed -e 's/<[^>]*>//g' |grep -i $wrd \
     | perl -pe 's/^/$ENV{address}:$ENV{wrd}:/' | tee -a $tmp &
    done
    done
    mkdir -p extra_hosts && echo "Made dir extra_hosts"
    cd extra_hosts
    $0 $addr

    AliceGoth, 18 Сентября 2012

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

    +139

    1. 1
    Assert.That(users.Count(), Is.EqualTo(Enumerable.Empty<User>().Count()));

    rk4n, 18 Сентября 2012

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