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 | |
declare(strict_types = 1); | |
final readonly class solution { | |
public function __construct( | |
public int $n, | |
public string $info, | |
) {} |
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
#!/usr/bin/env php | |
<?php | |
declare(strict_types = 1); | |
namespace Scripts; | |
// run given command when any file changes in given paths or in working directory | |
if (!isset($_SERVER['argv'][1])) { |
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 | |
$counter = 0; | |
for ($i = 0; $i <= 2359; $i++) { | |
$n = str_pad($i, 4, '0', STR_PAD_LEFT); | |
$ciphers = str_split($n); | |
if ($ciphers[2] > 5) { | |
continue ; |
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
<script type="text/javascript"> | |
(function (window, $) { | |
window['grecaptchaInit'] = function () { | |
$.nette.ext({ | |
init: function () { | |
$('.g-recaptcha').each(function () { | |
var recaptcha = $(this); | |
if (recaptcha.children().length) { // already processed -> skip | |
return ; |
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
\documentclass[a4paper]{article} | |
\usepackage[czech]{babel} | |
\usepackage[utf8x]{inputenc} | |
\usepackage{amsmath} | |
\usepackage{amsfonts} | |
\usepackage{graphicx} | |
\usepackage[colorinlistoftodos]{todonotes} | |
\usepackage{fullpage} |
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
(function ($, window) { | |
if (!window.Nette) { | |
console.log('Error: Nette form validation not loaded.'); | |
return ; | |
} | |
var live; |
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
require_once __DIR__ . '/geocaching.php'; | |
var_dump( getFoundCacheCount( '3f4da330-f5d0-411d-bcee-74672b284351' ) ); |
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 | |
use Nette\Forms\Form, | |
Nette\Forms\Controls\TextInput; | |
class AntispamControl extends TextInput | |
{ | |
/** | |
* @return void |
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
(function ($, window) { | |
$(function () { | |
// navazani validate Nette formularu | |
$('form').livequery(function () { | |
var $this = $(this); | |
Nette.initForm($this[0]); | |
}); |
NewerOlder