1. Список говнокодов пользователя iofjuupasli

    Всего: 4

  2. JavaScript / Говнокод #16311

    +155

    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
    function createDataStringFromArray(data){
        dataName = "outputSyntax=plain"
        data.each(function(value, index){
            if(value.name == "register_first_name"){
                dataName = dataName + "&register_first_name=" + value.value;
            }else if(value.name == "register_last_name"){
                dataName = dataName + "&register_last_name=" + value.value;
            }else if(value.name == "etablishment"){
                dataName = dataName + "&etablishment=" + value.value;
            }else if(value.name == "function"){
                dataName = dataName + "&fonction=" + value.value;
            }else if(value.name == "element_id"){
                dataName = dataName + "&id=" + value.value;
            }else if(value.name == "mail"){
                dataName = dataName + "&register_email=" + value.value;
            }else if(value.name == "phone"){
                dataName = dataName + "&register_phone=" + value.value;
            }else if(value.name == "mobile"){
                dataName = dataName + "&register_mobile=" + value.value;
            }else if(value.name == "access"){
                dataName = dataName + "&access=" + value.value;
            }else if(value.name == "mail_alerts"){
                dataName = dataName + "&mail_alerts=" + value.value;
            }
        })
        return dataName;
    }

    iofjuupasli, 11 Июля 2014

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

    +155

    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
    jQuery(document).ready(function(){
        jQuery('#administratifs .accessElement').each(function(){
            #foreach($user in $users)
                #set($function = $user.getProperty('fonction').getValue())
                if(jQuery(this).attr('id')== "accessElement_$user.getNumber()"){
                    jQuery(this).find('.selectFunction option').filter(function() {
                    return jQuery(this).text() == "$function";
                    }).prop('selected', true);
                }
            #end
        })
    
        jQuery('#administratifs .disableClass').attr('disabled', 'disabled');
    
    })

    тут еще velocity

    iofjuupasli, 11 Июля 2014

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

    +125

    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
    var colorInfoList = new List<ColorInfo>()
                    {
                        new ColorInfo("#000000", "	black", "	Черный"),
                        new ColorInfo("#000080","	navy","	Темно-синий"),
                        new ColorInfo("#00008B","	darkblue","	Темно-голубой"),
                        new ColorInfo("#0000CD","	mediumblue","	Умеренно-голубой"),
                        new ColorInfo("#0000FF","	blue	","Голубой"),
                        new ColorInfo("#006400","	darkgreen","	Темно-зеленый"),
                        new ColorInfo("#008000","	green","	Зеленый"),
                        new ColorInfo("#008080","	teal","	Чайный"),
                        new ColorInfo("#008B8B","	darkcyan","	Темный циан"),
                        new ColorInfo("#00BFFF","	deepskyblue","	Темный небесно-синий"),
                        new ColorInfo("#00CED1","darkturquoise	","Темно-бирюзовый"),
                        new ColorInfo("#00FA9A","	mediumspringgreen","	Умеренный синевато-серый"),
                        new ColorInfo("#00FF00","	lime","	Известковый"),
                        new ColorInfo("#00FFFF","	aqua","	Синий"),
                        new ColorInfo("#2E8B57","	seagreen","	Морской волны"),
                        new ColorInfo("#32CD32","	limegreen","	Зеленовато-известковый"),
                        new ColorInfo("#4B0082","	indigo","	Индиго"),
                        new ColorInfo("#696969","	dimgray","	Тускло-серый"),
                        new ColorInfo("#7CFC00","	lawngreen","	Зеленой травы"),    
                        new ColorInfo("#7FFFD4","	aquamarine","	Аквамарин"),
                        new ColorInfo("#800000","	maroon","	Оранжево-розовый"),
                        new ColorInfo("#808080"," 	gray","	Серый"),
                        new ColorInfo("#8B0000","	darkred","	Темно-красный"),
                        new ColorInfo("#9ACD32","	yellowgreen","	Желто-зеленый"),
                        new ColorInfo("#A52A2A","	brown","	Коричневый")
                    };
    
    
            public ColorInfo ColorCheck(List<ColorInfo> list, string colorHex)
            {
                for (int i = 0; i < list.Count-1; i++)
                {
                    if (String.Compare(list[i].HexInfo, colorHex, StringComparison.Ordinal) <= 0 && String.Compare(list[i + 1].HexInfo, colorHex, StringComparison.Ordinal)>=0)
                        return list[i+1];
                }
                return new ColorInfo();
            }

    Определение названия цвета

    iofjuupasli, 17 Июля 2013

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

    +8

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    int wordLen(const char* word) 
    { 
        int i=-1; 
        while(word[++i]!='\0'&&word[i]!='\n'); 
        return i; 
    }

    Типичная лаба, но как же смешно это увидеть спустя некоторое время

    iofjuupasli, 29 Июня 2013

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