Načítám...

Nejnovější prasokódy

  • JavaScript #4

    Copy-paste-fest prase s globálníma českoanglickýma proměnnýma

    var FinalCena = 0;
    var CenaArray = dataLayer[0].shoptet.cart;
    var CenaArrayLength = CenaArray.length;
    for (var i = 0; i < CenaArrayLength; i++) {
    var CenaQuent = CenaArray[i].quantity;
    var CenaSingle = CenaArray[i].priceWithVat;
    var CenaAll = CenaQuent * CenaSingle;
        console.log(CenaArray[i]);
    FinalCena = (FinalCena + CenaAll);
    var ResultCena = (FinalCena).toFixed(2).replace(' ', '').replace(',', '').replace('.', ',');
    console.log(FinalCena);
    console.log(ResultCena); 
  • JavaScript #3

    almost loop free jQuery!!

    if( $('#rozdelene-kategorie').length )    
    {
           $(".type-category .subcategories > li:nth-of-type(13)").insertBefore(".subcategories > li:nth-of-type(1)");
           $(".type-category .subcategories > li:nth-of-type(14)").insertBefore(".subcategories > li:nth-of-type(2)");
           $(".type-category .subcategories > li:nth-of-type(15)").insertBefore(".subcategories > li:nth-of-type(3)");
           $(".type-category .subcategories > li:nth-of-type(16)").insertBefore(".subcategories > li:nth-of-type(4)");
           $(".type-category .subcategories > li:nth-of-type(17)").insertBefore(".subcategories > li:nth-of-type(5)");
           $(".type-category .subcategories > li:nth-of-type(18)").insertBefore(".subcategories > li:nth-of-type(6)");
           $(".type-category .subcategories > li:nth-of-type(19)").insertBefore(".subcategories > li:nth-of-type(7)");
           $(".type-category .subcategories > li:nth-of-type(20)").insertBefore(".subcategories > li:nth-of-type(8)");
           $(".type-category .subcategories > li:nth-of-type(21)").insertBefore(".subcategories > li:nth-of-type(9)");
           $(".type-category .subcategories > li:nth-of-type(22)").insertBefore(".subcategories > li:nth-of-type(10)");
  • TypeScript #2

    Is it friday yet?

    function isItFridayYet(today: string): boolean {
        const theDay = today.toLowerCase().trim();
    
        if (theDay === "monday") {
            return false;
        } else if (theDay === "tuesday") {
            return false;
        } else if (theDay === "wednesday") {
            return false;
        } else if (theDay === "thursday") {
            return false;
        } else if (theDay === "friday") {
  • Ostatní #1

    Hello, World!

    Ahoj světe,
    
    dnes byl spuštěn prasokód a možná zažil své první pády serveru jako správný reprezentant prasokódu.
    
    Platforma slouží pro pobavení a případnou ventilaci frustrace z kódu, kterou sem tam zažije asi každý.
    Je to pokus o nový take na hovnokod.cz, což byla (a je) super stránka, ale za poslední rok vypadá nefunkčně a neudržovaně, tak jsem se rozhodl pro reborn.
    
    V patičce najdete odkazy na zpětnou vazbu a na plány do budoucna, ať to kódí!
  • Žádné další prasokódy