1. Java / Говнокод #13054

    +115

    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
    /**
     * Converts the Accpac fields to names that do not
     * require Sherlock Holmes to decipher.
     * 
     * @param arcus Accpac customer object
     */
    public Store(final ARCus arcus) {
    	name = trim(arcus.getIdcust());
    	description = trim(arcus.getNamecust());
    	addressLine1 = trim(arcus.getTextstre1());
    	addressLine2 = trim(arcus.getTextstre2());
    	addressLine3 = trim(arcus.getTextstre3());
    	addressLine4 = trim(arcus.getTextstre4());
    	suburb = trim(arcus.getNamecity());
    	state = trim(arcus.getCodestte());
    	postalCode = trim(arcus.getCodepstl());
    	country = trim(arcus.getCodectry());
    	contactName = trim(arcus.getNamectac());
    	phone1 = trim(arcus.getTextphon1());
    	phone2 = trim(arcus.getTextphon2());
    	email = trim(arcus.getEmail2());
    	department = arcus.getAudtorg();
    }

    someone, 27 Мая 2013

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

    −80

    1. 1
    2. 2
    self.data = [[NSMutableData alloc] initWithLength:0];
    [data release];

    Indian code.
    So deep.

    ivandjeferov, 26 Мая 2013

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

    −103

    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
    switch (btnTemp.tag) {
    		case 1:
    			if(1!=1)
    				return;
    			btnAll.selected = TRUE;
    			btnCasino.selected = FALSE;
    			btnHotel.selected = FALSE;
                btnEntertainment.selected = FALSE;
                btnGolf.selected = FALSE;
    			
    			break;
    		case 2:
    			if(1!=1)
    				return;
    			btnAll.selected = FALSE;
    			btnCasino.selected = TRUE;
    			btnHotel.selected = FALSE;
                btnEntertainment.selected = FALSE;
                btnGolf.selected = FALSE;
    			
    			break;
    		case 3:
    			if(1!=1)
    				return;
    			btnAll.selected = FALSE;
    			btnCasino.selected = FALSE;
    			btnHotel.selected = TRUE;
                btnEntertainment.selected = FALSE;
                btnGolf.selected = FALSE;
    			break;
            case 4:
    			if(1!=1)
    				return;
    			btnAll.selected = FALSE;
    			btnCasino.selected = FALSE;
                btnHotel.selected = FALSE;
       			btnEntertainment.selected = FALSE;
    			btnGolf.selected = TRUE;
    			break;
            case 5:
    			if(1!=1)
    				return;
    			btnAll.selected = FALSE;
    			btnCasino.selected = FALSE;
    			btnHotel.selected = FALSE;
                btnEntertainment.selected = TRUE;
    			btnGolf.selected = FALSE;
    			break;
    
    		default:
    			break;
    	}

    Some Indian code within a view controller.

    ivandjeferov, 26 Мая 2013

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

    +151

    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
    function edToolbar(obj)
    {
    	document.write("<span class=\"m_bold\"><img class=\"markup\" src=\"/icons/markup_buttons/photon/bold.png\" title=\"Жирный\" onClick=\"doAddTags('[b]','[/b]','" + obj + "')\"></span>");
    	document.write("<span class=\"m_italic\"><img class=\"markup\" src=\"/icons/markup_buttons/photon/italic.png\" title=\"Наклонный\" onClick=\"doAddTags('[i]','[/i]','" + obj + "')\"></span>");
    	document.write("<span class=\"m_quote\"><img class=\"markup\" src=\"/icons/markup_buttons/photon/quote1.png\" title=\"Цитирование\" onClick=\"doAddTags('>','','" + obj + "')\"></span>");
    	document.write("<span class=\"m_underline\"><img class=\"markup\" src=\"/icons/markup_buttons/photon/underline.png\" title=\"Нижнее подчёркивание\" onClick=\"doAddTags('[u]','[/u]','" + obj + "')\"></span>");
    	document.write("<span class=\"m_overline\"><img class=\"markup\" src=\"/icons/markup_buttons/photon/overline.png\" title=\"Верхнее подчёркивание\" onClick=\"doAddTags('[o]','[/o]','" + obj + "')\"></span>");
    	document.write("<span class=\"m_spoiler\"><img class=\"markup\" src=\"/icons/markup_buttons/photon/spoiler.png\" title=\"Спойлер\" onClick=\"doAddTags('[spoiler]','[/spoiler]','" + obj + "')\"></span>");
    	document.write("<span class=\"m_strike\"><img class=\"markup\" src=\"/icons/markup_buttons/photon/strike.png\" title=\"Зачёркнутый\" onClick=\"doAddTags('[s]','[/s]','" + obj + "')\"></span>");
    	document.write("<span class=\"m_sup\"><img class=\"markup\" src=\"/icons/markup_buttons/photon/sup.png\" title=\"Сдвиг текста вверх\" onClick=\"doAddTags('[sup]','[/sup]','" + obj + "')\"></span>");
    	document.write("<span class=\"m_sub\"><img class=\"markup\" src=\"/icons/markup_buttons/photon/sub.png\" title=\"Сдвиг текста вниз\" onClick=\"doAddTags('[sub]','[/sub]','" + obj + "')\"></span>");
    	document.write("<br>");
    }

    хуита, 26 Мая 2013

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

    +130

    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
    void main(void)
    {
    	int a1,a2,a3,a4,a5,a6,a7,a8,a9;
    	int b1,b2,b3,b4,b5,b6,b7,b8,b9;
    	int c1,c2,c3,c4,c5,c6,c7,c8,c9;
    	int d1,d2,d3,d4,d5,d6,d7,d8,d9;
    	int e1,e2,e3,e4,e5,e6,e7,e8,e9;
    	int f1,f2,f3,f4,f5,f6,f7,f8,f9;
    	int g1,g2,g3,g4,g5,g6,g7,g8,g9;
    	int h1,h2,h3,h4,h5,h6,h7,h8,h9;
    	int i1,i2,i3,i4,i5,i6,i7,i8,i9;
    
    ....
    
    }

    Когда-то когда я еще не знала о существовании массивов.... это начало программы для решения судоку.
    В продолжении этого были определены еще 729 переменных для вариантов решения.

    Daiver, 25 Мая 2013

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

    +161

    1. 1
    2. 2
    3. 3
    4. 4
    if (file_exists($path.'/'.$rename_to))
                throw Service_Unzip_Exception("Target catalog ".$path.'/'.$rename_to." already exist");
                rename($path.'/'.$old_dir,$path.'/'.$rename_to);
    }

    invision70, 25 Мая 2013

    Комментарии (12)
  7. Куча / Говнокод #13048

    +126

    1. 1
    <img src="/html/../images/menu/top.png" alt="" />

    Весь HTML вот так зашифрован, не знаю нормально ли это?

    straga_coda, 24 Мая 2013

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

    +128

    1. 1
    public int sended, zipsended;

    там же

    taburetka, 24 Мая 2013

    Комментарии (11)
  9. PHP / Говнокод #13046

    +149

    1. 1
    $years = range(date('Y', $now), date('Y', strtotime('+ 1 year', $now)));

    Пятница в моей голове... А надо было всеголтшь действующий и следующий

    nonamez, 24 Мая 2013

    Комментарии (1)
  10. Куча / Говнокод #13044

    +130

    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
    Class barcode
    	...
    	Dim CharData
    
    	Dim CharNumber
    
    	Public Function GetHTMLBar(BarData  ,  BarHeight  )
    		...
    		For lop = 1 To Len(x)
    			For s = 0 To UBound(CharData)
    					...
    					tsum = tsum + (CLng(CharNumber(s)) * lop)
    					...
    				End If
    			Next 
    		Next 
    	End Function
    
    	Private Sub Class_Initialize()
    		CharNumber = Split("0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106", ",")
    		...
    	End Sub
    End class

    VBScript.
    Массив, содержащий собственные индексы?

    slbsomeone, 24 Мая 2013

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