1. Лучший говнокод

    В номинации:
    За время:
  2. JavaScript / Говнокод #18441

    +144

    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
    $( document ).ready(function() {
          $(".doc_4").hover(function(){
            $(".Kiril").css("display","block");
            $(".beckzhan").css("display","none");
            $(".Sergey").css("display","none");
            $(".Asiya").css("display","none");
          });
          $(".doc_1").hover(function(){
            $(".beckzhan").css("display","block");
            $(".Kiril").css("display","none");
            $(".Sergey").css("display","none");
            $(".Asiya").css("display","none");
          });
          $(".doc_2").hover(function(){
            $(".Sergey").css("display","block");
            $(".beckzhan").css("display","none");
            $(".Kiril").css("display","none");
            $(".Asiya").css("display","none");
          });
          $(".doc_3").hover(function(){
            $(".Asiya").css("display","block");
            $(".beckzhan").css("display","none");
            $(".Sergey").css("display","none");
            $(".Kiril").css("display","none");
          });
        });

    Супер реализация.
    При наведении на объект он должен подсвечиваться, остальные тухнут.

    kschingiz, 07 Июля 2015

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

    +144

    1. 1
    bool X = Glob.UserIsAdmin ? true : false;

    alex493049469, 03 Июля 2015

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

    +144

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    var::var (double initial) {
        (*this) = initial;
    }
    var::var (char *initial) {
        (*this) = initial;
    }

    С воландесайта.http://habrahabr.ru/post/261351

    roman-kashitsyn, 29 Июня 2015

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

    +144

    1. 1
    scrollValue = scrollValue; //refresh

    vottakvot, 26 Июня 2015

    Комментарии (1)
  6. PHP / Говнокод #18405

    +144

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    //перевод даты в timestamp
    function strtotimestamp($time) {
        $tmp = explode(' ', $time);
        $date = explode('.', $tmp[0]);
        $hours = explode(':',$tmp[1]);
        $tmp = mktime($hours[0], $hours[1], 0, $date[1], $date[0], $date[2]);
        return $tmp;
    }

    когда нужно быстро сделать работающее решение, а времени на чтение гугла нет

    simplycrazy, 26 Июня 2015

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

    +144

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    if (['text'].indexOf(data[a]['input']) === 'date') {
         data[a]['value'][f].subscribe(function (nv) {
             self.pollChanges();
        })
    }

    lord_rb, 24 Июня 2015

    Комментарии (21)
  8. Куча / Говнокод #18389

    +144

    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
    <!--
        Правил верстку, затем решил не коммитить без необходимости
        <table border="1" style=" width: 900pt; margin-top: 20px; table-layout: fixed;">
            <col style=" width: 55pt"/>
            <col style=" width: 65pt"/>
            <col style=" width: 140pt"/>
            <col style=" width: 70pt"/>
            <col style=" width: 65pt"/>
            <col style=" width: 65pt"/>
            <col style=" width: 70pt"/>
            <col style=" width: 70pt"/>
            <col style=" width: 75pt"/>
            <col style=" width: 70pt"/>
            <col style=" width: 75pt"/>
     -->

    И все-таки закоммитил.

    downmedic, 24 Июня 2015

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

    +144

    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
    var me = this;            
    if (me.profile.carveoutSettings) {
        me.profile.carveoutSettings.truncationMethod = fields.truncationMethod;
        me.profile.carveoutSettings.truncationMode = fields.truncationMode;
        me.profile.carveoutSettings.applyTruncation = fields.applyTruncation;
        me.profile.carveoutSettings.truncationValue = fields.truncationValue;
        me.profile.carveoutSettings.applyExclusion = fields.applyExclusion;
        me.profile.carveoutSettings.serviceTypes = me.getSelected(me.getServiceTypeSelector().getStore(), 'ServiceSubCategoryID');
        me.profile.carveoutSettings.placeOfServices = me.getSelected(me.getPlaceOfServiceSelector().getStore(), 'code');
        me.profile.carveoutSettings.chronicConditions = me.getSelected(me.getChronicConditionSelector().getStore(), 'column');
    } else {
        this.profile.carveoutSettings = {
            truncationMethod: fields.truncationMethod,
            truncationMode: fields.truncationMode,
            applyTruncation: fields.applyTruncation,
            truncationValue: fields.truncationValue,
            applyExclusion: fields.applyExclusion,
            serviceTypes: me.getSelected(me.getServiceTypeSelector().getStore(), 'ServiceSubCategoryID'),
            placeOfServices: me.getSelected(me.getPlaceOfServiceSelector().getStore(), 'code'),
            chronicConditions: me.getSelected(me.getChronicConditionSelector().getStore(), 'column')
        }
    }

    Суслика видишь? а он есть ...

    expert, 20 Июня 2015

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

    +144

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    var s = 0;
    $('#slider .slider_item').each(function(){
    	s++;
    });
    if (s > 1) {
    // ...

    Пример с прода для определения числа элементов в карусели

    loudless, 18 Июня 2015

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

    +144

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    9. 9
    public void checkApply()
            {
                if (((((Parent as StackPanel).Parent as Grid).Parent as ToolControlPanel).Parent as ToolControl).Parent != null)
                {
                    var w = (((((((((Parent as StackPanel).Parent as Grid).Parent as ToolControlPanel).Parent as ToolControl).Parent as DockPanel).Parent as DockPanel).Parent as DockPanel).Parent as Window).Owner as MainWindow);
                    if (w != null)
                        w.EnableApplyNext();
                }
            }

    промолчу... ибо и так все ясно... :)

    Tlk, 18 Июня 2015

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