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

    Всего: 3

  2. C++ / Говнокод #22658

    −25

    1. 1
    2. 2
    3. 3
    4. 4
    int main()                                                     {
        for(int i = 0; i < 99; ++i)                                {
            cout << "Hello world";                                 }
        return 0;                                                  }

    fldisplay1, 22 Марта 2017

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

    −46

    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
    order_columns = u'id_np asc, id_street asc, '\
        + column + ' ' + order\
        + u"cast("\
            u"NULLIF(" \
                u"regexp_replace(" \
                    u"regexp_replace(" \
                        u"regexp_replace(" \
                            u"regexp_replace(" \
                                u"regexp_replace(" \
                                    u"regexp_replace(" + column + u", '[ёА-яа-яA-Za-z\s]+', '')," \
                                u" '[/-\\\]+', '', 'g'), " \
                            u"'[-]+', '', 'g'), " \
                        u"'[А-яа-я\s,]+', '', 'g'), " \
                    u"'[А-яа-я)(\s]+', ''), " \
                u"'', '0'), " \
            u"'0') " \
        u"AS FLOAT)  "

    fldisplay1, 16 Марта 2017

    Комментарии (2)
  4. Python / Говнокод #22498

    −14

    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
    ...
    def insert(self, request):
                ato = ID_Rayons()
                ato.id_ato = request.POST.get('id_ato')
                ato.name_ato = request.POST.get('name_ato')
                self.session.add(ato)
                self.session.commit()
                
                print ato, ato.id_ato # !!! DON'T TOUCH "print"!!! YOU WILL BREAK ALL !!!!
    
                ato_dict = ato.__dict__
                ato_dict.pop('_sa_instance_state', None)
    
                audit_model = Audit()
                for key, value in ato_dict.iteritems():
                    new_value += '{}|'.format(value)
    ...

    sqlalchemy

    fldisplay1, 06 Марта 2017

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