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

    Всего: 9

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

    0

    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
    import * as React from 'react';
    import {CityFromSelector} from './components/cityFromSelector';
    import {CountryToSelector} from './components/countryToSelector';
    import {MealsTypeSelector} from './components/mealsTypeSelector';
    import {DepartureDatesRangeSelector} from './components/departureDatesRangeSelector';
    import {HotelCategoriesSelector} from './components/hotelCategoriesSelector';
    import {ResortSelector} from './components/resortSelector';
    import {HotelsSelector} from './components/hotelsSelector';
    import {TouristsSelector} from './components/touristsSelector';
    import {OperatorsSelector} from './components/operatorsSelector';
    import {NightsCountRangeSelector} from './components/nightsCountRangeSelector';
    import {PriceRangeSelector} from './components/priceRangeSelector';
    import {FlightInfo} from './components/flightInfo';
    import {SearchFormActionCreator} from './search/searchFormActionCreator';
    import {HotelsCountPopup} from './components/hotelsCountLimitPopup';
    import * as throttle from 'lodash/throttle';
    import * as filter from 'lodash/filter';
    import * as union from 'lodash/union';
    import * as merge from 'lodash/merge';
    import * as reduce from 'lodash/reduce';
    import * as chunk from 'lodash/chunk';
    import * as difference from 'lodash/difference';
    import * as differenceBy from 'lodash/differenceBy';
    import { Tour } from 'sletat-api-services/lib/ModuleApiServices/Main.svc/GetTours/Tour';
    import { logViewedTours } from 'sletat-api-services/lib/GraphApiServices/Main.svc/LogViewedTours/LogViewedTours';
    import { OilTax } from 'sletat-api-services/lib/ModuleApiServices/Main.svc/GetTours/OilTax';
    import { VisaFee } from 'sletat-api-services/lib/ModuleApiServices/Main.svc/GetTours/VisaFee';
    import { getHotelImageSrc } from 'sletat-common-utils/lib/tour/getHotelImageSrc';
    import { declineByCount } from 'sletat-common-utils/lib/format/declineByCount';
    import { Tour as GetToursTour } from 'sletat-api-services/lib/ModuleApiServices/Main.svc/GetTours/Tour';
    import { Tour } from './tour';
    import { IVisaFee } from './visaFee';
    import { IOilTax } from './oilTaxes';
    import { UiPopup } from 'react-sletat-uikit/lib/ui-popup/UiPopup';
    import { UiLoader } from 'react-sletat-uikit/lib/ui-loader/UiLoader';
    import {
        SendConfirmEmailResults,
        recoverySendConfirmEmail,
        registrationSendConfirmEmail
    } from 'sletat-api-services/lib/SletatServices/Services/SendConfirmEmail/SendConfirmEmail';
    import { authentification } from 'sletat-api-services/lib/SletatServices/Authentification';
    import LoginPopup from './components/Login';
    import RegistrationPopup from './components/Registration';
    import RecoveryPopup from './components/Recovery';
    import SuccessPopup from './components/Success';
    import { PopupTypes } from './constants';

    может это уже нормально в современном фронтенде

    tablecell, 02 Июня 2020

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

    +1

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    /// <summary>
            /// Сохранение описания отеля в базу данных.
            /// </summary>
            public void Save()
            {
                lock ("save")
                {

    tablecell, 01 Июня 2020

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

    −49

    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
    ...
    	//Функцыя с помощью которой совершаю имитацыю сотия blur
    	closeOpened: function(){	
    		for(var i in ui.controlers) 
    		if(ui.controlers[i].bluring && i!= ui.clicked) ui.controlers[i].close(); 
    		ui.clicked = false;
    	},
    ...
    
    //Стандартный клас от которого все будуть унаследоватса
    function ui_simple(option){
    	var _this = this;
    ...
    els 	: _this.container.find(".ui-select-els") //Ну ссобственно елементы списка

    и это в "культурной столице"

    tablecell, 25 Января 2017

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

    +3

    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
    <name>customer_language_iso</name>
                          <value>
                            <string>en</string>
                          </value>
                        </member>
                      </struct>
                    </value>
                  </data>
                </array>
              </value>
            </data>
          </array>
        </value>
      </param>
    </params>

    За 7 лет в туризме ни разу не видел человеческого api.
    Страшнющие нечитабельные SOAP, фантастическая вложенность, json внутри xml, время ответа доходит до нескольких минут и прочее, прочее.

    tablecell, 07 Июня 2016

    Комментарии (13)
  6. SQL / Говнокод #17318

    −165

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    update #tmpTours1 set pricelink = ('<a target="_blank" title="Прайс-лист на ближайшие заезды" href="../pricelist/Complex.aspx?country=' + ltrim(str(cnkey)) + '&tour=' + ltrim(str(tourkey)) + '&dateFrom=' + dbo.mwFirstTourDate(tlkey) + '">' + ltrim(str(tourprice)) + ' ' + tourrate + '</a>')
      
     set @sql = N'select * from #tmpTours1 where tourprice is not null and quota <> case ' + ltrim(str(@quotaYes)) + ' when -1 then -10 else 0 end '
     if len(@sort) > 0
      set @sql = @sql + ' order by ' + @sort
    	print @sql
     exec sp_executesql @sql

    Хранимочки по 1000 строк подобного кода.

    tablecell, 15 Декабря 2014

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

    +162

    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
    function makeRequest(params)
    {
        var tParams = new Object();
        
        try{        
            tParams.accepts = params.accepts
        }
        catch(e){}
    
        try{
            tParams.async = params.async
        }
        catch(e){}
    
        try{
            tParams.beforeSend = params.beforeSend
        }
        catch(e){}
    
        try{
        tParams.cache = params.cache
        }
        catch(e){}

    очередной тревел-стартап
    http://www.corteos.ru/Scripts/helpers.js

    tablecell, 06 Октября 2014

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

    +134

    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
    String r_count = "";
                String r_cat = "";
                String r_pansion = "";
                for (Int32 ii = 0; ii < rows.Count; ii++)
                {
                    Int32 j = rows[ii].NNight;
                    DateTime d = rows[ii].DateBeg;
                    DateTime d_e = rows[ii].DateEnd;
                    Int32 type = rows[ii].MinLength > 0 ? 3 : 2;
                    j = (type == 3) ? -1 : j;
    
                    Int32 lengthMin = rows[ii].MinLength;
                    if (((d < date1 || d > date2) && type != 3))
                        continue;
                    else
                        if (!(d <= date1 && d_e >= date1 || d <= date2 && d_e >= date2) && date1 != DateTime.MinValue && date2 != DateTime.MaxValue && type == 3)
                            continue;
                    String _r_count = _Rooms[rows[ii].RoomId];
                    String _r_cat = _RoomCat[rows[ii].RoomCatId];
                    String _r_pansion = _Pansions[rows[ii].PansionId];
                    List<String> a = new List<string>();
                    if (_r_count != r_count || _r_cat != r_cat || _r_pansion != r_pansion)
                    {
                        if (!String.IsNullOrEmpty(r_count) && !String.IsNullOrEmpty(r_cat))
                        {
                            Pricing.RoomCat cat = new Pricing.RoomCat();
                            cat.RoomCount = r_count;
                            cat.RoomName = r_cat;
                            cat.PansionName = r_pansion;
    
                            p.rooms.Add(cat);
                        }
                        r_count = _r_count;
                        r_cat = _r_cat;
                        r_pansion = _r_pansion;
                    }

    Краху туроператоров способствовали также и собственные инженеры.

    tablecell, 20 Августа 2014

    Комментарии (24)
  9. C# / Говнокод #16205

    +143

    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
    return string.Format(templateStr, "",
                    _p1_Tb.Text,
                    _p2_Tb1.Text + ", " + _p2_Tb2.Text,
                    _p3_Tb.Text,
                    "",//_p4_Tb.Text,
                    _p5_Tb1.Text + " / " + _p5_Tb2.Text,
                    _p6_Tb.Text,
                   RblTxt(_p7_Rbl) + " " + _p7_Tb.Text,
                    b("Построен в ") + _p8_Tb1.Text + " году, в " + _p8_Tb2.Text + " году произведен "
                    + _p8_Tb3.Text + " ремонт. " + _p8_Tb4.Text + ", Количество корпусов " + _p8_Tb4.Text + ", Количество этажей в каждом корпусе " + _p8_Tb5.Text
                    + (_p8_Ch1.Checked ? (", " + _p8_Ch1.Text) : "")
                    + (_p8_Ch2.Checked ? (", " + _p8_Ch2.Text) : "")
                    + (_p8_Ch3.Checked ? (", " + _p8_Ch3.Text) : "") ,
                    FillTbl9() ,
                    b("Уровень средства размещения: ") + _p10_Tb.Text,
                    b("Объект находится рядом с ") + _p11_Tb.Text,
                    "принимаются  с " + _p12_Tb1.Text + " лет, " + _p12_Tb2.Text,
                    _p13_Tb.Text,
                    b("Период работы: ") + (_p14_Rb1.Checked ? ("С " + _p14_Tb1.Text + " По " + _p14_Tb2.Text) : "Круглогодично"),
                    "к " + _p15_Tb1.Text + " до " + _p15_Tb2.Text,
                    _p16_Tb.Text
                    + (_p16_Ch1.Checked ? ("<br/> От аэропорта " + _p16_Tb1.Text + " автобусом № " + _p16_Tb2.Text + " до остановки" + _p16_Tb3.Text) : "")
                    + (_p16_Ch2.Checked ? ("<br/> От жд вокзала " + _p16_Tb4.Text + " автобусом № " + _p16_Tb5.Text + " до остановки" + _p16_Tb6.Text) : "")
                    + (_p16_Ch3.Checked ? ("<br/> Другое " + _p16_Tb7.Text) : "")
                    ,
                    b("Типы номеров: ") + _p17_Tb.Text,
                    b("В номере: ")
                     ((_p23_Ch1.Checked ? (" " + _p23_Ch1.Text + ",") : "")
                    + (_p23_Ch2.Checked ? (" " + _p23_Ch2.Text + ",") : "")
                    + (_p23_Ch3.Checked ? (" " + _p23_Ch3.Text + ",") : "")
                    + (_p23_Ch4.Checked ? (" " + _p23_Ch4.Text + ",") : "")
                    + (_p23_Ch5.Checked ? (" " + _p23_Ch5.Text + ",") : "")
                    + (_p23_Ch6.Checked ? (" " + _p23_Ch6.Text + ",") : "")
                    + (_p23_Ch7.Checked ? (" " + _p23_Ch7.Text + ",") : "")
                    + (_p23_Ch8.Checked ? (" " + _p23_Ch8.Text + ",") : "")
                    + (_p23_Ch9.Checked ? (" " + _p23_Ch9.Text + ",") : "")
                    + (_p23_Ch10.Checked ? (" " + _p23_Ch10.Text + ",") : "")
                    + (_p23_Ch11.Checked ? (" " + _p23_Ch11.Text + ",") : "")
                    + (_p23_Ch12.Checked ? (" " + _p23_Ch12.Text + ",") : "")
                    + (_p23_Ch13.Checked ? (" " + _p23_Ch13.Text + ",") : "")
                    + (_p23_Ch14.Checked ? (" " + _p23_Ch14.Text + ",") : "")
                    + (_p23_Ch15.Checked ? (" " + _p23_Ch15.Text + ",") : "")
                    + (_p23_Ch16.Checked ? (" " + _p23_Ch16.Text + ",") : "")
                    + (_p23_Ch17.Checked ? (" " + _p23_Ch17.Text + ",") : "")
                    + (_p23_Ch18.Checked ? (" " + _p23_Ch18.Text + ",") : "")
                    + (_p23_Ch19.Checked ? (" " + _p23_Ch19.Text + ",") : "")
                    + (_p23_Ch20.Checked ? (" " + _p23_Ch20.Text + ",") : "")
                    + (_p23_Ch21.Checked ? (" " + _p23_Ch21.Text + ",") : "")
                    + (_p23_Ch22.Checked ? (" " + _p23_Ch22.Text + ",") : "")
                    + (_p23_Ch23.Checked ? (" " + _p23_Ch23.Text + ",") : "")
                    + (_p23_Ch24.Checked ? (" " + _p23_Ch24.Text + ",") : "")
                    + (_p23_Ch25.Checked ? (" " + _p23_Ch25.Text + ",") : "")
                    + (_p23_Ch26.Checked ? (" " + _p23_Ch26.Text + ",") : "")
                    + (_p23_Ch27.Checked ? (" " + _p23_Ch27.Text + ",") : "")
                    + (_p23_Ch28.Checked ? (" " + _p23_Ch28.Text + ",") : "")
                    + (_p23_Ch29.Checked ? (" " + _p23_Ch29.Text + ",") : "")
                    + (_p23_Ch20.Checked ? (" " + _p23_Ch30.Text + ",") : "")
                    + (_p23_Ch31.Checked ? (" " + _p23_Ch31.Text + ",") : "")
                    + (_p23_Ch32.Checked ? (" " + _p23_Ch32.Text + ",") : "")
                    + (_p23_Ch33.Checked ? (" " + _p23_Tb.Text) : "")).TrimEnd(new char[] { ' ', ',' }),
                    ((_p24_Ch1.Checked ? (" " + _p24_Ch1.Text + ",") : "")
                    + (_p24_Ch2.Checked ? (" " + _p24_Ch2.Text + ",") : "")
                    + (_p24_Ch3.Checked ? (" " + _p24_Tb.Text) : "")).TrimEnd(new char[] { ' ', ',' }),
                    FillTbl25(),
                    RblTxt(_p26_Rbl1) + " " + _p26_Tb.Text + ". " + RblTxt(_p26_Rbl2),
                    ((_p27_Ch1.Checked ? (" " + _p27_Ch1.Text + ",") : "")
                    + (_p27_Ch2.Checked ? (" " + _p27_Ch2.Text + ",") : "")
                    + (_p27_Ch3.Checked ? (" " + _p27_Ch3.Text + ",") : "")
                    + (_p27_Ch4.Checked ? (" " + _p27_Ch4.Text + ",") : "")
                    + (_p27_Ch5.Checked ? (" " + _p27_Ch5.Text + ",") : "")
                    + (_p27_Ch6.Checked ? (" " + _p27_Ch6.Text + ",") : "")
                    + (_p27_Ch7.Checked ? (" " + _p27_Tb.Text) : "")).TrimEnd(new char[] { ' ', ',' }),
                    _p28_Tb.Text,
                    b("Минимальная продолжительность заезда ") + _p29_Tb.Text + " дней",
                    "от " + _p30_Tb1.Text + " до " + _p30_Tb2.Text + " лет " + _p30_Tb3.Text,
                    ((_p31_Ch1.Checked ? (" " + _p31_Ch1.Text + " " + _p31_Tb1.Text) : "")
                    + "<br/>" + (_p31_Ch2.Checked ? (" " + _p31_Ch2.Text + " " + _p31_Tb2.Text) : "")
                    + "<br/>" + (_p31_Ch3.Checked ? (" " + _p31_Ch3.Text + " " + _p31_Tb3.Text) : "")

    Бэкенды крупнейшего российского туроператора. На отдел разработки уходит 1500000 рб/мес.

    tablecell, 23 Июня 2014

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

    +158

    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
    for (i in rates) {
       if (CheckFlightInRates(FlightStartRate, rates[i]['dirs'][0]['trips'][0]) == 2) {
          if (CheckFlightInRates(FlightSecondRate, rates[i]['dirs'][0]['trips'][1]) != 0) {
             //var flightNmSecond = rates[i]['dirs'][0]['trips'][1]['params']['airCmp']+'-'+rates[i]['dirs'][0]['trips'][1]['params']['fltNm'];
             if (CheckFlightInRates(FlightSecondRate, rates[i]['dirs'][0]['trips'][1]) == 2) {
                if (CheckFlightInRates(FlightThirdRate, rates[i]['dirs'][0]['trips'][2]) != 0) {
                   //var flightNmThird = rates[i]['dirs'][0]['trips'][2]['params']['airCmp']+'-'+rates[i]['dirs'][0]['trips'][2]['params']['fltNm'];
                   if (CheckFlightInRates(FlightThirdRate, rates[i]['dirs'][0]['trips'][2]) == 2) {
                      if (FlightBackStartRate != '') {
                         if (CheckFlightInRates(FlightBackStartRate, rates[i]['dirs'][1]['trips'][0]) == 2) {
                            if (CheckFlightInRates(FlightBackSecondRate, rates[i]['dirs'][1]['trips'][1]) != 0) {
                               //var flightNmSecond = rates[i]['dirs'][0]['trips'][1]['params']['airCmp']+'-'+rates[i]['dirs'][0]['trips'][1]['params']['fltNm'];
                               if (CheckFlightInRates(FlightBackSecondRate, rates[i]['dirs'][1]['trips'][1]) == 2) {
                                  if (CheckFlightInRates(FlightBackThirdRate, rates[i]['dirs'][1]['trips'][2]) != 0) {
                                     //var flightNmThird = rates[i]['dirs'][0]['trips'][2]['params']['airCmp']+'-'+rates[i]['dirs'][0]['trips'][2]['params']['fltNm'];
                                     if (CheckFlightInRates(FlightBackThirdRate, rates[i]['dirs'][1]['trips'][2]) == 2) {
                                        if (rates[i]['price'] != options.values.price) {
                                           FlightMinPrice3.push(rates[i]['price']);
                                           ButtonToPress3[rates[i]['price']] = '#fare_' + rates[i]['id'] + '_' + i
                                        }
                                        else {
                                           FlightMinPrice.push(rates[i]['price']);
                                           ButtonToPress[rates[i]['price']] = '#fare_' + rates[i]['id'] + '_' + i;
                                        }
                                     }
                                  }
                                  else {
                                     if (rates[i]['price'] != options.values.price) {
                                        FlightMinPrice3.push(rates[i]['price']);
                                        ButtonToPress3[rates[i]['price']] = '#fare_' + rates[i]['id'] + '_' + i
                                     }
                                     else {
    
                                        FlightMinPrice.push(rates[i]['price']);
                                        ButtonToPress[rates[i]['price']] = '#fare_' + rates[i]['id'] + '_' + i;
                                     }
                                  }
                               }
                            }
                            else {
                               if (rates[i]['price'] != options.values.price) {
                                  FlightMinPrice3.push(rates[i]['price']);
                                  ButtonToPress3[rates[i]['price']] = '#fare_' + rates[i]['id'] + '_' + i
                               }
                               else {
                                  FlightMinPrice.push(rates[i]['price']);
                                  ButtonToPress[rates[i]['price']] = '#fare_' + rates[i]['id'] + '_' + i
                               }
                            }
                         }
                         else {
                            if (rates[i]['price'] != options.values.price) {
                               FlightMinPrice3.push(rates[i]['price']);
                               ButtonToPress3[rates[i]['price']] = '#fare_' + rates[i]['id'] + '_' + i
                            }
                            else {
                               FlightMinPriceOther2.push(rates[i]['price']);
                               ButtonToPressOther2[rates[i]['price']] = '#fare_' + rates[i]['id'] + '_' + i;
                            }
                         }
                      }
                      else {
                         if (rates[i]['price'] != options.values.price) {
                            FlightMinPrice3.push(rates[i]['price']);
                            ButtonToPress3[rates[i]['price']] = '#fare_' + rates[i]['id'] + '_' + i
                         }
                         else {
                            FlightMinPrice.push(rates[i]['price']);
                            ButtonToPress[rates[i]['price']] = '#fare_' + rates[i]['id'] + '_' + i;
                         }
                      }
    
                   }

    https://www.svyaznoy.travel/avia/styles/js/Flight.js?cache=20140418-1
    весь русский онлайн-тревел такой

    tablecell, 22 Апреля 2014

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