- PHP RFC: Parameter Type Widening
- PHP RFC: Return Type Declarations
- https://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science)
- https://en.wikipedia.org/wiki/Liskov_substitution_principle
- https://en.wikipedia.org/wiki/Type_system
- https://en.wikipedia.org/wiki/Top_type
- https://en.wikipedia.org/wiki/Bottom_type
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 node | |
// Based on https://github.com/montlebalm/find-js-imports | |
import { readFileSync } from 'fs'; | |
import { basename } from 'path'; | |
import glob from 'glob'; | |
import { fileURLToPath } from 'url'; | |
// https://gist.github.com/manekinekko/7e58a17bc62a9be47172 | |
const IMPORT_RX = /^import (?:["'\s]*([\w*{}\n, ]+) from\s*)?["'\s]*([.@\w\/_-]+)["'\s]*;?/gm; |
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); | |
namespace GraphQL\Benchmarks; | |
function identity($value, $key = null) | |
{ | |
return $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
git clone --bare [email protected]:vhenzl/dotfiles.git $HOME/.dotfiles | |
function dotfiles { | |
git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME $@ | |
} | |
mkdir -p .dotfiles-backup | |
dotfiles checkout | |
if [ $? = 0 ]; then | |
echo "Checked out dotfiles."; | |
else | |
echo "Backing up pre-existing dot 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
<?php | |
// https://3v4l.org/ZoCO0 | |
class X | |
{ | |
static $y = 0; | |
static $z = 0; | |
public static function test() |
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
set @table_schema = 'zhf'; | |
-- ### Find missing foreign keys ### | |
-- select all columns ending with 'Id' (are supoused to be FK) which don't have key starting with 'FK_' | |
select c.table_schema, c.table_name, c.column_name, c.column_type | |
from information_schema.columns c | |
left join information_schema.key_column_usage k on ( | |
c.table_schema = k.table_schema and | |
c.table_name = k.table_name and | |
c.column_name = k.column_name and |
docker images -q --filter "dangling=true" |xargs docker rmi
Based on
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
# Ignore everything | |
* | |
# But not these files... | |
!.gitignore | |
!Default (Windows).sublime-keymap | |
!Preferences.sublime-settings | |
!Package Control.sublime-settings | |
!PHP.sublime-settings | |
!phpfmt.sublime-settings |
V Excelu pomocí Alt+F11
otevřít Microsoft Visual Basic for Applications, zde vytvořit nový modul (Insert a Module) a vložit kód požadované funkce (v tomto případě funkce, která zjistí úroveň odsazení textu):
Function indent(r As Range) As Integer
indent = r.IndentLevel
End Function
Po přepnutí zpět do Excelu je dostupná jako jakákoliv jiná funkce: =indent(A1)
.
NewerOlder