1. Куча / Говнокод #26590

    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 ballerina/auth;
    import ballerina/config;
    import ballerina/http;
    import ballerina/log;
    
    auth:InboundBasicAuthProvider basicAuthProvider = new;
    http:BasicAuthHandler basicAuthHandler = new (basicAuthProvider);
    
    listener http:Listener ep = new (9090, config = {
        auth: {
            authHandlers: [basicAuthHandler]
        },
    
        secureSocket: {
            keyStore: {
                path: config:getAsString("b7a.home") +
                      "/bre/security/ballerinaKeystore.p12",
                password: "ballerina"
            }
        }
    });
    
    @http:ServiceConfig {
        basePath: "/hello",
        auth: {
            scopes: ["scope1"]
        }
    }
    
    service echo on ep {
    
        @http:ResourceConfig {
            methods: ["GET"],
            path: "/sayHello",
            auth: {
                scopes: ["scope2"]
            }
        }
    
        resource function hello(http:Caller caller, http:Request req) {
            error? result = caller->respond("Hello, World!!!");
            if (result is error) {
                log:printError("Error in responding to caller", result);
            }
        }
    }

    Кто что думает про https://ballerina.io?

    Desktop, 19 Апреля 2020

    Комментарии (45)
  2. Куча / Говнокод #26589

    0

    1. 1
    IT Оффтоп #41

    #7: https://govnokod.ru/24538 https://govnokod.xyz/_24538
    #8: (vanished) https://govnokod.xyz/_24815
    #9: https://govnokod.ru/24867 https://govnokod.xyz/_24867
    #10: https://govnokod.ru/25328 https://govnokod.xyz/_25328
    #11: (vanished) https://govnokod.xyz/_25436
    #12: (vanished) https://govnokod.xyz/_25471
    #13: (vanished) https://govnokod.xyz/_25590
    #14: https://govnokod.ru/25684 https://govnokod.xyz/_25684
    #15: https://govnokod.ru/25694 https://govnokod.xyz/_25694
    #16: https://govnokod.ru/25725 https://govnokod.xyz/_25725
    #17: https://govnokod.ru/25731 https://govnokod.xyz/_25731
    #18: https://govnokod.ru/25762 https://govnokod.xyz/_25762
    #19: https://govnokod.ru/25767 https://govnokod.xyz/_25767
    #20: https://govnokod.ru/25776 https://govnokod.xyz/_25776
    #21: https://govnokod.ru/25798 https://govnokod.xyz/_25798
    #22: https://govnokod.ru/25811 https://govnokod.xyz/_25811
    #23: https://govnokod.ru/25863 https://govnokod.xyz/_25863
    #24: https://govnokod.ru/25941 https://govnokod.xyz/_25941
    #25: https://govnokod.ru/26026 https://govnokod.xyz/_26026
    #26: https://govnokod.ru/26050 https://govnokod.xyz/_26050
    #27: https://govnokod.ru/26340 https://govnokod.xyz/_26340
    #28: https://govnokod.ru/26372 https://govnokod.xyz/_26372
    #29: https://govnokod.ru/26385 https://govnokod.xyz/_26385
    #30: https://govnokod.ru/26413 https://govnokod.xyz/_26413
    #31: https://govnokod.ru/26423 https://govnokod.xyz/_26423
    #32: https://govnokod.ru/26440 https://govnokod.xyz/_26440
    #33: https://govnokod.ru/26449 https://govnokod.xyz/_26449
    #34: https://govnokod.ru/26456 https://govnokod.xyz/_26456
    #35: https://govnokod.ru/26463 https://govnokod.xyz/_26463
    #36: https://govnokod.ru/26508 https://govnokod.xyz/_26508
    #37: https://govnokod.ru/26524 https://govnokod.xyz/_26524
    #38: https://govnokod.ru/26539 https://govnokod.xyz/_26539
    #39: https://govnokod.ru/26556 https://govnokod.xyz/_26556
    #40: https://govnokod.ru/26568 https://govnokod.xyz/_26568

    gost, 18 Апреля 2020

    Комментарии (480)
  3. Java / Говнокод #26588

    +6

    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
    public Page<DispatchSchedule>findBySalesOrderItemSalesOrderOrderDateBetween(Date startDate, Date endDate, Pageable pageable) {
            return repository.findBySalesOrderItemSalesOrderOrderDateBetween(startDate, endDate, pageable);
    
        }
        public Page<DispatchSchedule> findBySalesOrderItemSalesOrderOrderDateAndJob(Date date, Job job, Pageable pageable) {
            return repository.findBySalesOrderItemSalesOrderOrderDateAndJob(date, job, pageable);
        }
    
        public Page<DispatchSchedule> findBySalesOrderItemSalesOrderOrderDateBetweenAndJob(Date startDate, Date endDate, Job job, Pageable pageable) {
            return repository.findBySalesOrderItemSalesOrderOrderDateBetweenAndJob(startDate, endDate, job, pageable);
        }
       
        public Page<DispatchSchedule> findBySalesOrderItemSalesOrderCustomerAndSalesOrderItemSalesOrderOrderDateBetween(Customer customer, Date startDate, Date endDate, Pageable pageable) {
            return repository.findBySalesOrderItemSalesOrderCustomerAndSalesOrderItemSalesOrderOrderDateBetween(customer, startDate, endDate, pageable);
        }
        public Page<DispatchSchedule> findBySalesOrderItemSalesOrderCustomerAndSalesOrderItemSalesOrderOrderDateAndJob(Customer customer, Date date, Job job, Pageable pageable) {
            return repository.findBySalesOrderItemSalesOrderCustomerAndSalesOrderItemSalesOrderOrderDateAndJob(customer, date, job, pageable);
    
        }
        public Page<DispatchSchedule> findBySalesOrderItemSalesOrderCustomerAndSalesOrderItemSalesOrderOrderDateBetweenAndJob(Customer customer, Date startDate, Date endDate, Job job, Pageable pageable) {
            return repository.findBySalesOrderItemSalesOrderCustomerAndSalesOrderItemSalesOrderOrderDateBetweenAndJob(customer, startDate, endDate, job, pageable);
        }
    
        Page<DispatchSchedule> findBySalesOrderItemSalesOrderCustomer(Customer customer, Pageable pageable) {
            return repository.findBySalesOrderItemSalesOrderCustomer(customer, pageable);
        }
    
        Page<DispatchSchedule> findByJob(Job job, Pageable pageable) {
            return repository.findByJob(job, pageable);
    }
    
    
    public Page<DispatchSchedule> findByJobItemAndSalesOrderItemSalesOrderOrderDateBetween(Item item, Date startDate, Date endDate, Pageable pageable) {
        return repository.findByJobItemAndSalesOrderItemSalesOrderOrderDateBetween(item, startDate, endDate, pageable);
    }
    
    public Page<DispatchSchedule> findBySalesOrderItemSalesOrderSalesOrderTypeAndSalesOrderItemSalesOrderOrderDateBetween(SalesOrderType salesOrderType, Date startDate, Date endDate, Pageable pageable) {
        return repository.findBySalesOrderItemSalesOrderSalesOrderTypeAndSalesOrderItemSalesOrderOrderDateBetween(salesOrderType, startDate, endDate, pageable);
    }
    
    public Page<DispatchSchedule> findByJobItemAndSalesOrderItemSalesOrderOrderDateBetweenAndJob(Item item, Date startDate, Date endDate, Job job, Pageable pageable) {
        return repository.findByJobItemAndSalesOrderItemSalesOrderOrderDateBetweenAndJob(item, startDate, endDate, job, pageable);
    }
    
    public Page<DispatchSchedule> findByJobItemAndSalesOrderItemSalesOrderOrderDateBetweenAndSalesOrderItemSalesOrderSalesOrderType(Item item, Date startDate, Date endDate, SalesOrderType salesOrderType, Pageable pageable) {
        return repository.findByJobItemAndSalesOrderItemSalesOrderOrderDateBetweenAndSalesOrderItemSalesOrderSalesOrderType(item, startDate, endDate, salesOrderType, pageable);
    }
    
    public Page<DispatchSchedule> findByJobItemAndSalesOrderItemSalesOrderOrderDateBetweenAndSalesOrderItemSalesOrderCustomer(Item item, Date startDate, Date endDate, Customer customer, Pageable pageable) {
        return repository.findByJobItemAndSalesOrderItemSalesOrderOrderDateBetweenAndSalesOrderItemSalesOrderCustomer(item, startDate, endDate, customer, pageable);
    }
    
    public Page<DispatchSchedule> findBySalesOrderItemSalesOrderSalesOrderTypeAndSalesOrderItemSalesOrderOrderDateBetweenAndJob(SalesOrderType salesOrderType, Date startDate, Date endDate, Job job, Pageable pageable) {
        return repository.findBySalesOrderItemSalesOrderSalesOrderTypeAndSalesOrderItemSalesOrderOrderDateBetweenAndJob(salesOrderType, startDate, endDate, job, pageable);
    }
    
    public Page<DispatchSchedule> findBySalesOrderItemSalesOrderSalesOrderTypeAndSalesOrderItemSalesOrderOrderDateBetweenAndSalesOrderItemSalesOrderCustomer(SalesOrderType salesOrderType, Date startDate, Date endDate, Customer customer, Pageable pageable) {
        return repository.findBySalesOrderItemSalesOrderSalesOrderTypeAndSalesOrderItemSalesOrderOrderDateBetweenAndSalesOrderItemSalesOrderCustomer(salesOrderType, startDate, endDate, customer, pageable);
    }

    Можно мне травы, которую курили эти ребята :D
    Ссылка на репо:
    https://github.com/thilina01/file-manager-api/blob/25a771ac0c1940408fb7c7f021d63ef30b2af891/src/main/java/com/trendsmixed/fma/module/dispatchschedule/DispatchScheduleService.java

    pashaluk31, 17 Апреля 2020

    Комментарии (21)
  4. PHP / Говнокод #26586

    0

    1. 1
    https://www.php.net/manual/en/intro.parallel.php

    Покайтесь! Пока вы называли пиздецом пандемию и всё с ней связанное, незаметно подкралось нечто действительно страшное.

    Fike, 15 Апреля 2020

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

    0

    1. 1
    2. 2
    3. 3
    <?php
    
    echo 'Именно поэтому я за' . ' ' . 'Silverlight' . '!';

    Кто программировал на silverlight, стоит начинать изучение в 2к20 ?

    phpBidlokoder2, 15 Апреля 2020

    Комментарии (215)
  6. Куча / Говнокод #26583

    0

    1. 1
    Пиздец-оффтоп #3

    #1 https://govnokod.ru/26503 https://govnokod.xyz/_26503
    #2 https://govnokod.ru/26541 https://govnokod.xyz/_26541

    gost, 14 Апреля 2020

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

    +4

    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
    /etc/network/interfaces: ща сделаем норм
    ifupdown: вы неправильно управляете интерфейсами, ща сделаем норм
    ifconfig: парень выше сосет, ща сделаем норм
    ip: опять ссанина получилась, ща сделаем норм
    isc-dhcp-server: ща сделаем норм
    udhcpd: вы слишком жирно раздаёте адреса, ща сделаем норм
    dnsmasq: DHCP? да, это по моей части, ща сделаем норм
    /etc/hosts: во, вот это норм!
    /etc/resolv.conf: поговори мне тут, ща сделаем норм
    генераторы /etc/resolv.conf: вот теперь-то хорошо!
    /etc/nsswitch.conf: да не, ща сделаем норм
    iptables: вы неправильно обрабатываете пакеты, ща сделаем норм
    nftables: вы неправильно делаете норм, ща сделаем байткодно-норм
    wpa_supplicant: у вас нет вай-фая, ща сделаем норм
    hostapd: у вас нет раздачи вай-фая, ща сделаем норм
    network-manager: вы неправильно управляете всем, ща сделаем норм
    systemd: вы неправильно называете интерфейсы, ща сделаем норм
    systemd: вы неправильно раздаёте адреса, ща сделаем норм
    systemd: вы неправильно делаете dns, ща вкомпилим без возможности конфигурировать и будет норм
    systemd: вы неправильно делаете nat, ща сделаем норм
    
    netplan: привет, я тут новенький )))

    какой пятнадцатый стандарт )))

    Fike, 14 Апреля 2020

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

    0

    1. 1
    2. 2
    3. 3
    char* szOwnedData = reinterpret_cast <char*> (m_bOwner && szData != NULL ?
                                                                  realloc (szData, nLength + 1) :
                                                                  malloc (nLength + 1));

    Ha ha, classic.

    codemonkey, 13 Апреля 2020

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

    0

    1. 1
    2. 2
    https://upload.wikimedia.org/wikipedia/commons/0/0e/Bjarne-stroustrup_%28cropped%29.jpg
    https://cdn.jpg.wtf/futurico/cb/3e/1586622557-cb3e3c00a16ab8b849e9464c1e3037ea.jpeg

    Шок! Рецепты защиты от коронавируса, от создателя языка C++. Надо всего лишь...

    j123123, 13 Апреля 2020

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

    −3

    1. 1
    Электрика / электроника #3

    #1: https://govnokod.ru/25437 https://govnokod.xyz/_25437/
    #2: https://govnokod.ru/25820 https://govnokod.xyz/_25820

    gost, 10 Апреля 2020

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