Mistři v programování na #hovnokod

najdi rozdíl

    if(element.data("max")) {
            helps = $(this).closest(element).find("input").val();
            newVal = Number(helps)+1;

            $(this).closest(element).find("input").val(newVal).trigger('change');

    }else {
            helps = $(this).closest(element).find("input").val();
            newVal = Number(helps)+1;
            $(this).closest(element).find("input").val(newVal).trigger('change');
    }

Anonymous,

Jak ziskat posledni e-mail? Preci si nacist vsechny z db a vratit prvni.

function getLastEmail($code) {			
    $mails = dibi::fetchAll('SELECT id FROM emails e WHERE e.deleted = 0 AND e.name LIKE %~like~ ORDER BY e.date_entered DESC', $code);

    foreach($mails as $mail) {
        return $mail;
    }
}

Anonymous,

Verejne dostupny GDPR-ready kod

<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

ini_set('memory_limit', '-1');

include "NotORM.php";
$pdo = new PDO("mysql:dbname=production", "production", "Secr3tPassw0rd");
$db = new NotORM($pdo);
foreach ($db->sales_flat_order() as $order) { // get all applications
    echo "$order[customer_email]<br>"; // print application title
}
//echo 'Hello world';

Anonymous,

Potřebuje to komentář? :D

public function actionAuth($accessToken, $consumerKey) {
        // jakoze asi ok, zejo :)
        
        $this->responseOk();
}

Anonymous,

public function getValue(): ?DateTime
{
	return $this->date !== NULL ? $this->date : NULL;
}

2bad2furious,