1. Лучший говнокод

    В номинации:
    За время:
  2. Куча / Говнокод #29174

    0

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

    #86: (vanished) https://govnokod.xyz/_28814
    #87: https://govnokod.ru/28817 https://govnokod.xyz/_28817
    #88: https://govnokod.ru/28836 https://govnokod.xyz/_28836
    #89: https://govnokod.ru/28843 https://govnokod.xyz/_28843
    #90: https://govnokod.ru/28874 https://govnokod.xyz/_28874
    #91: https://govnokod.ru/28880 https://govnokod.xyz/_28880
    #92: https://govnokod.ru/28884 https://govnokod.xyz/_28884
    #93: https://govnokod.ru/28889 https://govnokod.xyz/_28889
    #94: https://govnokod.ru/28895 https://govnokod.xyz/_28895
    #95: https://govnokod.ru/28904 https://govnokod.xyz/_28904
    #96: https://govnokod.ru/28912 https://govnokod.xyz/_28912
    #97: https://govnokod.ru/28918 https://govnokod.xyz/_28918
    #98: https://govnokod.ru/28932 https://govnokod.xyz/_28932
    #99: https://govnokod.ru/28936 https://govnokod.xyz/_28936
    #100: https://govnokod.ru/28940 https://govnokod.xyz/_28940
    #101: https://govnokod.ru/28949 https://govnokod.xyz/_28949
    #102: https://govnokod.ru/28978 https://govnokod.xyz/_28978
    #103: https://govnokod.ru/28982 https://govnokod.xyz/_28982
    #104: https://govnokod.ru/28989 https://govnokod.xyz/_28989
    #105: https://govnokod.ru/29052 https://govnokod.xyz/_29052
    #106: https://govnokod.ru/29069 https://govnokod.xyz/_29069
    #107: https://govnokod.ru/29086 https://govnokod.xyz/_29086
    #108: https://govnokod.ru/29102 https://govnokod.xyz/_29102
    #109: https://govnokod.ru/29126 https://govnokod.xyz/_29126
    #110: https://govnokod.ru/29136 https://govnokod.xyz/_29136
    #111: https://govnokod.ru/29142 https://govnokod.xyz/_29142
    #112: https://govnokod.ru/29155 https://govnokod.xyz/_29155
    #113: https://govnokod.ru/29160 https://govnokod.xyz/_29160
    #114: https://govnokod.ru/29165 https://govnokod.xyz/_29165
    #115: https://govnokod.ru/29173 https://govnokod.xyz/_29173

    nepeKamHblu_nemyx, 01 Сентября 2025

    Комментарии (108)
  3. JavaScript / Говнокод #29175

    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
    /* "[...] To fix this I added a delay at the end of the function and the events
    now fire properly. Thank you for all of your help. Fixed Code:"
    */
    
    data.indexedDB.addSource = function(sourceBlob) {
    //adds source to data base
      var version = 1;
      var request = indexedDB.open("content", version);
      request.onerror = errorHandler;
      request.onsuccess = function(e) {
        db = e.target.result;
        var trans = db.transaction(["nContent"], "readwrite");
        var store = trans.objectStore("nContent");
        var request = store.put(sourceBlob);
        trans.oncomplete = function(e) {
          extron.indexedDB.getIndexedSource();
        };
    
      };
        var token = 100000;
        while(token != 0)
        {
          token = token-1;
    
        }
    };

    https://stackoverflow.com/questions/27494247/why-is-my-indexeddb-open-onsuccess-event-not-called

    ISO, 02 Сентября 2025

    Комментарии (27)
  4. C++ / Говнокод #29176

    0

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    9. 9
    SparseMatrix<double> mat(rows,cols);
    for (int k=0; k<mat.outerSize(); ++k)
      for (SparseMatrix<double>::InnerIterator it(mat,k); it; ++it)
      {
        it.value();
        it.row();   // row index
        it.col();   // col index (here it is equal to k)
        it.index(); // inner index, here it is equal to it.row()
      }

    Random access to the elements of a sparse object can be done through the coeffRef(i,j) function. However, this function involves a quite expensive binary search. In most cases, one only wants to iterate over the non-zeros elements. This is achieved by a standard loop over the outer dimension, and then by iterating over the non-zeros of the current inner vector via an InnerIterator. Thus, the non-zero entries have to be visited in the same order than the storage order.

    CHayT, 03 Сентября 2025

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