This file contains 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
<textarea cols="150" rows="30">{!$form}</textarea> |
This file contains 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
#!/bin/bash | |
files=($(find $1 -type f -printf "%f\r\n")) | |
num_files=${#files[*]} | |
echo "${files[$((RANDOM%num_files))]}" |
This file contains 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
$cetnost_tematu = 3; // vytáhne z db | |
$i = 0; | |
do { | |
mysql_query("INSERT INTO rezervace (id_tema,cetnost) VALUES ($tema,$i)"); | |
$i++; | |
}while($i < $cetnost_tematu && mysql_errno() == 1062); // dokud nedosahnu maximalni cetnosti a insert selhal na unikatnosti zaznamu |
This file contains 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 FrontModule; | |
class CenikPresenter extends BasePresenter | |
{ | |
public function renderDefault() | |
{ | |
$this->template->anyVariable = 'any value'; | |
} |
This file contains 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 | |
function barDump($var, $title='') | |
{ | |
$backtrace = debug_backtrace(null/*, 2*/); // Ready for PHP 5.4 | |
$source = (isset($backtrace[1]['class'])) ? | |
$backtrace[1]['class'] : | |
basename($backtrace[0]['file']); | |
$line = $backtrace[0]['line']; | |
if($title !== '') |
This file contains 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
Dvě tabulky – tabulka 'a' obsahuje pouze primární klíč 'id', tabulka 'b' obsahuje dva cizí klíče 'a1' a 'a2' – oba odkazují na 'a.id' – s vlastnostní ON DELETE CASCADE | |
CREATE TABLE `a` ( | |
`id` int(11) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
CREATE TABLE `b` ( | |
`a1` int(11) NOT NULL, |
This file contains 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
00:15:30 | |
Kompilátory - zkušební test (3 otázky mají 2 správné odpovědi) | |
1 | |
Kompilátory | |
19 | |
Kompilátor se koncepčně skládá z dvou základních etap: | |
° | |
1 Analýza a syntéza. | |
0 Analýza a optimalizace kódu. | |
0 Lexikální a syntaktická analýza. |
This file contains 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
class Article { | |
... | |
public function saveArticle() { | |
... | |
} | |
} | |
// Takhle taky NE! :) |
This file contains 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
(ns rps.core | |
(:use clojure.core.match)) | |
(defn get-rps-winner [choice-1, choice-2] | |
(match [choice-1, choice-2] | |
[choice-2, choice-1] :draw | |
[:rock :paper] :paper | |
[:paper :rock] :paper | |
[:rock :scissors] :rock | |
[:scissors :rock ] :rock |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Xunit; | |
using Xunit.Extensions; | |
namespace CodingDojo | |
{ | |
public class Dojo | |
{ |
OlderNewer