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

    Всего: 2

  2. Куча / Говнокод #16280

    +127

    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
    boolean loadPPOGroupCompleted(string customerRef, string competence, string marketArea) {
        int i = 0;
        table sceData = getPPOPODGroupSCEs(customerRef, competence, marketArea);
        table dceData = getPPOPODGroupDCEs(customerRef, competence, marketArea);
        table sbilData = getPPOPODGroupSbil(customerRef, competence, marketArea);
        while (i < tableRowCount(sceData)) {
            EventRec sce = convertStoredSCRtoEventRec(false, sceData, i, "", competence);
            if ((string)tableGet(sceData, i, "ACTION_TYPE") == ACTION_REP) {
                udrRoute(sce, "toSE_Agg_rer");
                isReplaceAction = true;
            } else {
                udrRoute(sce, "toSE_Agg_evt");
            }
            i = i+ 1;
        }
        i = 0;
        while (i < tableRowCount(dceData)) {
            EventRec dce = convertStoredDCRtoEventRec(false, dceData, i, "", competence);
            if ((string)tableGet(dceData, i, "ACTION_TYPE") == ACTION_REP) {
                udrRoute(dce, "toSE_Agg_rer");
                isReplaceAction = true;
            } else {
                udrRoute(dce, "toSE_Agg_evt");
            }
            i = i+ 1;
        }
        i = 0;
        while (i < tableRowCount(sbilData)) {
            EventRec sbilEvent = convertStoredSbiltoEventRec(sbilData, i, PPO_ZONALE, competence);
            if ((string)tableGet(sbilData, i, "ACTION_TYPE") == ACTION_REP) {
                udrRoute(sbilEvent, "toSE_Agg_rer");
                isReplaceAction = true;
            } else {
                udrRoute(sbilEvent, "toSE_Agg_evt");
            }
            i = i + 1;
        }
        return true;
    }
    
    boolean loadGroupCompleted(string customerRef, string competence, date minStartDate) {
        table sceData = getGroupSCEs(customerRef, competence);
        table dceData = getGroupDCEs(customerRef, competence);
        int i = 0;
        string extPODCode, hour_date, hour_value, eventDTM, hourlyConsumption, totalF0GroupConsumption, treatmentType, consumptionType, actionType, edmID;       
        while (i < tableRowCount(sceData)) {
            EventRec sce = convertStoredSCRtoEventRec(true, sceData, i, "", competence);
            if ((string)tableGet(sceData, i, "ACTION_TYPE") == ACTION_REP) {
                udrRoute(sce, "toSE_Agg_rer");
                isReplaceAction = true;
            } else {
                udrRoute(sce, "toSE_Agg_evt");
            }
            i = i + 1;
        }
        i = 0;
        while (i < tableRowCount(dceData)) {
            EventRec dce = convertStoredDCRtoEventRec(true, dceData, i, "", competence);
            if ((string)tableGet(dceData, i, "ACTION_TYPE") == ACTION_REP) {
                udrRoute(dce, "toSE_Agg_rer");
                isReplaceAction = true;
            } else {
                udrRoute(dce, "toSE_Agg_evt");
            }
            i = i + 1;
        }
        if (isGroupHasPPO(customerRef, minStartDate)) {
            table sbilData = getPPOGroupSbil(customerRef, competence);   
            i = 0;
            while (i < tableRowCount(sbilData)) {
                EventRec sbilEvent = convertStoredSbiltoEventRec(sbilData, i, PPO_ZONALE, competence);
                if ((string)tableGet(sbilData, i, "ACTION_TYPE") == ACTION_REP) {
                    udrRoute(sbilEvent, "toSE_Agg_rer");
                    isReplaceAction = true;
                } else {
                    udrRoute(sbilEvent, "toSE_Agg_evt");
                }
                i = i + 1;
            }   
        }
        return true;
    }

    ctrl+c, ctrl+v

    n924, 04 Июля 2014

    Комментарии (17)
  3. Pascal / Говнокод #15488

    +87

    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
    delim:=0;
    result:='';
    resulttemp:='';
    otv1:=trunc(rez);
    ott2:=rez-otv1;
    while otv1>=s1 do
    begin
    	delim:=delim+1;
    	r1:=otv1 div s1;
    	r2:=otv1 mod s1;
    	otv1:=r1;		
    	if (r2>=0) and (r2<=9) then
    		str(r2,resulttemp);			
    	if r2=10 then resulttemp:='a';
    	if r2=11 then resulttemp:='b';
    	if r2=12 then resulttemp:='c';
    	if r2=13 then resulttemp:='d';
    	if r2=14 then resulttemp:='e';
    	if r2=15 then resulttemp:='f';		
    	result:=result+resulttemp;
    end;	
    if (otv1>=0) and (otv1<=9) then
    	str(otv1,resulttemp);	
    if otv1=10 then resulttemp:='a';
    if otv1=11 then resulttemp:='b';
    if otv1=12 then resulttemp:='c';
    if otv1=13 then resulttemp:='d';
    if otv1=14 then resulttemp:='e';
    if otv1=15 then resulttemp:='f';	
    result:=result+resulttemp;
    delim:=length(result);
    resulttemp:=result;
    for otv1:=1 to delim do
    	result[otv1]:=resulttemp[delim+1-otv1];

    Перевод числа из десятичной системы счисления в систему счисления с основанием s1

    n924, 15 Марта 2014

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