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

    Всего: 1

  2. Perl / Говнокод #2334

    −352.1

    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
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    88. 88
    89. 89
    #!/usr/bin/perl
    while ($colresults = $rez->fetchrow_hashref()) {
    		$hour = $colresults->{'TIME'};
    		if ($hour == '00') {$value0 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '01') {$value1 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '02') {$value2 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '03') {$value3 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '04') {$value4 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '05') {$value5 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '06') {$value6 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '07') {$value7 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '08') {$value8 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '09') {$value9 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '10') {$value10 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '11') {$value11 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '12') {$value12 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '13') {$value13 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '14') {$value14 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '15') {$value15 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '16') {$value16 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '17') {$value17 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '18') {$value18 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '19') {$value19 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '20') {$value20 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '21') {$value21 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '22') {$value22 = $colresults->{'VALUE_NUM'}};
    		if ($hour == '23') {$value23 = $colresults->{'VALUE_NUM'}};
    	if ($d_name ne $colresults->{'DNAME'}) {
    		unless ($first) {
    			push @result, {
    				N => $n_name,
    				C => $c_name,
    				D => $d_name,
    				TIME0 => get_temp($value0),
    				TIME1 => get_temp($value1),
    				TIME2 => get_temp($value2),
    				TIME3 => get_temp($value3),
    				TIME4 => get_temp($value4),
    				TIME5 => get_temp($value5),
    				TIME6 => get_temp($value6),
    				TIME7 => get_temp($value7),
    				TIME8 => get_temp($value8),
    				TIME9 => get_temp($value9),
    				TIME10 => get_temp($value10),
    				TIME11 => get_temp($value11),
    				TIME12 => get_temp($value12),
    				TIME13 => get_temp($value13),
    				TIME14 => get_temp($value14),
    				TIME15 => get_temp($value15),
    				TIME16 => get_temp($value16),
    				TIME17 => get_temp($value17),
    				TIME18 => get_temp($value18),
    				TIME19 => get_temp($value19),
    				TIME20 => get_temp($value20),
    				TIME21 => get_temp($value21),
    				TIME22 => get_temp($value22),
    				TIME23 => get_temp($value23),
    			};
    			$value0 = undef;
    			$value1 = undef;
    			$value2 = undef;
    			$value3 = undef;
    			$value4 = undef;
    			$value5 = undef;
    			$value6 = undef;
    			$value7 = undef;
    			$value8 = undef;
    			$value9 = undef;
    			$value10 = undef;
    			$value11 = undef;
    			$value12 = undef;
    			$value13 = undef;
    			$value14 = undef;
    			$value15 = undef;
    			$value16 = undef;
    			$value17 = undef;
    			$value18 = undef;
    			$value19 = undef;
    			$value20 = undef;
    			$value21 = undef;
    			$value22 = undef;
    			$value23 = undef;
    		}
    		
    		...
    	}
    
    }
    .... # продолжение не менее захватывающее

    Феерический код из одной не малоизвестной организации :)

    SoulSeeker, 25 Декабря 2009

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