Mistři v programování na #hovnokod

A zase tiketportal - verze uz 2.4 - Hladisko-1.2.4.js - stale se nejde podivat na pohled z mista sezeni

Uncaught TypeError: Cannot read property 'length' of undefined
at zobraz_sipky (Hladisko-1.2.4.js:3345)
at Zobraz_galeriu (Hladisko-1.2.4.js:3259)
at HTMLDocument.document_onclick (Hladisko-1.2.4.js:3053)

function chod_na_dalsi() {
    if (svg_img[zobrazujem_galeriu].length > cislo_fotografie + 1) {
        cislo_fotografie++;
        cakaj_zobraz_obrazok();

        zobraz_sipky();
    }
}

tommchimere@gmail.com,

Perlicka z Nette, metoda v modeli, preco nie ked mozes...

public function saveUserRegistrationRequest($values, &$presenter) {

Anonymous,

Luki je kokot

x = 0
print("\n")
meno = (input("Tvoje meno: "))
print("\n")
while x < 1:
    print('Ahoj '+str(meno)+' vidím, že ťa zaujíma veľkosť Lukiho čuraka')
    print("\n")
    a = input("(ano/nie)\n: ")
    print("\n")
    if a == ("ano") :
        print("###############################")
        print('# Veľkosť Lukiho čuraka = 0cm #')
        print("###############################")
        print("\n")
        a = input ("Ešte raz ? (ano/nie) \n: ")
        print("\n")
        if a == ("ano"):
            x = 0
        elif a == ("nie"):
            x += 1
        else:
            print ("Prečo ? ... prečo ?")
            x += 1
    elif a == ("nie"):
        print("###########################")
        print("# Luki aj tak žiaden nemá #")
        print("###########################")
        print("\n")
        a = input ("Ešte raz ? \n(ano/nie) \n: ")
        print("\n")
        if a == ("ano"):
            x = 0
        elif a == ("nie"):
            x += 1
        else:
            print ("Prečo ? ... prečo ?")
            x += 1
    else:
        print("Si kokot ?\n")
        a = input("(ano/nie) ? \n: ")
        if a == ("ano"):
            x += 1
        elif a == ("nie"):
            x += 1
        else:
            print ("Prečo ? ... prečo ?")
            x += 1


Matej1237,

Dalsia perlicka z Nette. Fc mkdir padne napr. pre nedostatocne prava, ale vdaka hovnokodu sa to nedozviem. Naviac, adresar sa nepodari vytvorit, napriek tomu pokracuje a kopiruje do neho subor... Cista fuserina :(

/**
 * Move uploaded file to new location.
 * @param  string
 * @return static
 */
public function move($dest)
{
    @mkdir(dirname($dest), 0777, TRUE); // @ - dir may already exist
    @unlink($dest); // @ - file may not exists
    if (!call_user_func(is_uploaded_file($this->tmpName) ? 'move_uploaded_file' : 'rename', $this->tmpName, $dest)) {
        throw new Nette\InvalidStateException("Unable to move uploaded file '$this->tmpName' to '$dest'.");
    }
    @chmod($dest, 0666); // @ - possible low permission to chmod
    $this->tmpName = $dest;
    return $this;
}

Anonymous,

Kvalitni pouziti navrhoveho vzoru builder.

SingleData result = SingleData.builder().build();

result.setBank(tariff.getBankName());
result.setInterestRate(interestRate);
result.setMonthlyPayment(monthPayment);
result.setBonita(bonita);

Vojta Bereščák,