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

    −40

    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
    /*
    	 * This GtkIMHtml has the maximum number of smileys allowed, so don't
    	 * add any more.  We do this for performance reasons, because smileys
    	 * are apparently pretty inefficient.  Hopefully we can remove this
    	 * restriction when we're using a better HTML widget.
    	 */
    	unescaped = purple_unescape_html(smiley);
    	numsmileys_thismsg = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(imhtml), "gtkimhtml_numsmileys_thismsg"));
    	if (numsmileys_thismsg >= 30) {
    		gtk_text_buffer_insert(imhtml->text_buffer, iter, unescaped, -1);
    		g_free(unescaped);
    		return;
    	}
    	numsmileys_total = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(imhtml), "gtkimhtml_numsmileys_total"));
    	if (numsmileys_total >= 300) {
    		gtk_text_buffer_insert(imhtml->text_buffer, iter, unescaped, -1);
    		g_free(unescaped);
    		return;
    	}

    Вот такой прикол от Pidgin. Больше 30 смайлов в сообщении и 300 в диалоге - низя. Захардкодили, ибо стыдно, что тормозит. А оно действительно тормозит.

    g0rky, 29 Мая 2012

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

    +102

    1. 1
    return (m.Id == Id) ? (true) : (false);

    походу платят за символы

    MegaZver, 29 Мая 2012

    Комментарии (4)
  3. Java / Говнокод #10396

    +72

    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
    public AllianceEntity getByMember(BigInteger dcgId) {
            for (AllianceEntity alliance : getAll()) {
                if (String.valueOf(alliance.getAdminDcgId()).equals(String.valueOf(dcgId))) {
                    return alliance;
                }
                for (BigInteger memberDcgId : alliance.getMembersAsList()) {
                    if (String.valueOf(memberDcgId).equals(String.valueOf(dcgId))) {
                        return alliance;
                    }
                }
                for (BigInteger officerDcgId : alliance.getOfficersAsList()) {
                    if (String.valueOf(officerDcgId).equals(String.valueOf(dcgId))) {
                        return alliance;
                    }
                }
            }
            return null;
        }

    все айдишники BigInteger..

    iliakot, 29 Мая 2012

    Комментарии (0)
  4. Java / Говнокод #10395

    +123

    1. 1
    createCanvas(); // create canvas!

    Комментарии от Кэпа.

    someone, 29 Мая 2012

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

    +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
    /**
     * crane looks like this: ("----" - fork, "ssss" - stand, "xxx" - crane rail)
     * 
     * ----- .pos2 __/0/ ----- | sssss | sssss | xxx | ----- distance between stands .pos1 __|/distance/ ----- sssss
     * sssss xxx xxx xxx xxx xxx xxx
     * 
     * so if pos2 defined - it will be the second fork; BUT! if the flag "draw second stand" defined - that will draw or
     * not draw the stand for pos1...
     * 
     * if there is just one fork but two TUs to handle is possible:
     * 
     * xxx ________ .pos1 .pos2 ________ sssss sssss xxx xxx xxx
     */

    someone, 29 Мая 2012

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

    +62

    1. 1
    2. 2
    <<<<<<<<<<<<<<<<<===============================>>>>>>>>>>>>>>>>>
                                                      АДМИН - ПИДОР!!!

    uiopqwertyasd, 29 Мая 2012

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

    −119

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    Запрос.Текст = "ВЫБРАТЬ РАЗЛИЧНЫЕ
    .....
    ГДЕ
    .....
    И ОсновныеНачисления.Авторасчет = Истина
    И ОсновныеНачисления.Авторасчет = Ложь"

    Выбрать обязательно различные! :)

    mrbus, 29 Мая 2012

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

    −30

    1. 1
    2. 2
    TempAnalogTable[ArrayData->GetNomerElement( j )].Data = 
                Chanel.TempPlace[in] + ( Chanel.TempPlace[in + 1] << 8 );

    Скажите, это нормально?

    cyrax, 29 Мая 2012

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

    +67

    1. 1
    ПЕРВЫЙ НАХ!!!

    uiopqwertyasd, 29 Мая 2012

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

    +25

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    #ncld<strm.h>
    vd mn()
    {
    ct<<"Hll, wrld!";
    cn.gt();
    }

    Нхй пргрммрвн.

    dos_, 29 Мая 2012

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