This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @param string $fileName | |
* @return resource | |
*/ | |
function imagecreatefrombmp($fileName) { | |
$file = fopen($fileName, "rb"); | |
$read = fread($file, 10); | |
while (!feof($file) && ($read <> "")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Utils; | |
/** | |
* Description of TreeModel | |
* @author Tomaš Grasl <grasl.t@centrum.cz> | |
* @category utils | |
* Slouží pro vytvoření stromové struktury | |
* <code> | |
* $createTree = new Utils/TreeModel(); | |
* $createTree->setKey('id_modul'); | |
* $createTree->setParentKey('group'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Model; | |
use Exception; | |
use Nette\DI\Config\Adapters\NeonAdapter; | |
use Nette\IOException; | |
use Nette\Utils\Neon; | |
/** | |
* Description of NeonBuilder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{control test:HTML} | |
{control test:JS} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$form = new Form(); | |
$form->addSubmit('submit', NULL) | |
->setAttribute("title", "vložení do košíku") | |
->setAttribute("alt", "vložení do košíku"); | |
$vybratBtn = $form['submit']->getControlPrototype(); | |
$vybratBtn->setName("button"); | |
$vybratBtn->type = 'submit'; | |
$vybratBtn->create('i class="fa fa-shopping-cart"'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div n:if="count($flashes) > 0" n:foreach="$flashes as $flash" role="alert" class="alert alert-{$flash->type}"> | |
{$flash->message} | |
</div> | |
<div n:foreach="$flashes as $flash" class="alert alert-{$flash->type}"> | |
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> | |
{$flash->message} | |
</div> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Nette\Application\UI\InvalidLinkException; | |
use Nette\Application\UI\Presenter; | |
use Tracy\Debugger; | |
abstract class BasePresenter extends Presenter { | |
/** | |
* @param InvalidLinkException $e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
** Public API v2 ** | |
Usage: | |
The API follows the general pattern of enumerating possible values of the | |
subsequent path segment, with the fully qualified path yielding a json object | |
of the type being enumerated. | |
For example, /v2/colors will yield: | |
[1, 2, 3, ... ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$array = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); | |
$restart = TRUE; | |
while (list($key, $value) = each($array)) { | |
if($key === 5 && $restart) { | |
prev($array); | |
$restart = FALSE; | |
} | |
var_dump($key); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
HomepagePresenter: | |
class: FrontModule\HomepagePresenter() | |
setup: | |
- $tempPath(%tempPath%) | |
#nebo | |
- FrontModule\HomepagePresenter() |
OlderNewer