I hereby claim:
- I am pavelkucera on github.
- I am pavelkucera (https://keybase.io/pavelkucera) on keybase.
- I have a public key whose fingerprint is 0005 24EB E07A F7B5 0FD8 1F58 7CC7 013E D3CD 526B
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| const expensiveOperation = () => new Promise((resolve) => { | |
| console.log('Executing expensive operation') | |
| setTimeout(resolve, 1000) | |
| }) | |
| let expensiveOperationPromise = null | |
| let expensiveOperationResult = null | |
| const cacheExpensiveOperation = async () => { | |
| if (expensiveOperationResult !== null) { |
| <?php | |
| class Extension extends \Nette\DI\CompilerExtension | |
| { | |
| public function loadConfiguration() | |
| { | |
| $container = $this->getContainerBuilder(); | |
| $container->addDefinition($this->prefix('formMapperFactory')) | |
| ->setImplement('Namespace\IFactory') |
| <?php | |
| class MyPresenter extends \Nette\Application\UI\Presenter | |
| { | |
| /** | |
| * @var \Some\Class | |
| * @inject | |
| */ | |
| public $dependency; | |
| } |
| failure: foo hitchhiker Earth exists | |
| test.php(10) |
| $.nette.ext('page', { | |
| load: function() { | |
| for (var i in this.callbacks) { | |
| var callback = this.callbacks[i]; | |
| callback(); | |
| } | |
| } | |
| }, { | |
| callbacks: [], | |
| register: function(callback) { |
| <?php | |
| namespace RS\Doctrine\Config; | |
| use RS\Doctrine\DBAL\Types\Type; | |
| use Nette\Diagnostics\Debugger; | |
| /** | |
| * @author Pavel Kučera | |
| */ |
| <?php | |
| namespace Nodlehs\Doctrine; | |
| /** | |
| * @author Pavel Kučera | |
| */ | |
| class EntityManager extends \Doctrine\ORM\EntityManager | |
| { | |
| /************************************************************************************ |
| Nette mi pravděpodobně kvůli Nelle vyhazuje fatal error v kešovaném konfigu, k odstranění stačí: | |
| 1) přidat na začátek kešovaného souboru die('G'); | |
| 2) soubor spustit, ať zemře na lajně přidané v kroku 1) | |
| 3) zakomentovat řádek se smrtí | |
| Po této proceduře se fatal error přestane objevovat! Žádný racionální důvod proč to tak je mě fakt nenapadá :/. |
| /** | |
| * Beta | |
| * | |
| * Sibling of netteForms.js "rewritten to jQuery" | |
| * @author Pavel Kučera | |
| * @author David Grudl author of netteForms.js, of the idea and the one who I copied from | |
| * | |
| * Disclaimer: I'm not a javascript programmer, actually I hate javascript, so consider that please if you want to complain about quality of this utility. | |
| * | |
| * Dependencies |