В TypeScript существуют конструкции, которые работают аналогично итераторам в обычных языках программирования, но оперируют с типами во время компиляции. Эти "итераторы типов" позволяют трансформировать типы и создавать мощные абстракции на уровне типовой системы.
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 | |
// Путь к вашему файлу .har | |
$filePath = '/Users/evilgazz/Desktop/chat.mistral.ai.har'; | |
// Загрузите содержимое файла .har | |
$harContent = file_get_contents($filePath); | |
// Декодируйте JSON | |
$harData = json_decode($harContent, true); |
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 | |
function drawTree($directory, $prefix = '') | |
{ | |
$files = array_diff(scandir($directory), array('.', '..')); | |
$totalFiles = count($files); | |
$fileCount = 0; | |
$output = ''; |
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 | |
if (!function_exists('interface_exists')) { | |
die('PHP version too old'); | |
} | |
$throwables = listThrowableClasses(); | |
$throwablesPerParent = splitInParents($throwables); | |
printTree($throwablesPerParent); | |
if (count($throwablesPerParent) !== 0) { | |
die('ERROR!!!'); |
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
/** | |
* Include this Sass mixin for aspect-ratio. Includes fallback | |
* for browsers that do not support aspect-ratio. This fallback is really not necessary at this point unless | |
* a specific browser you need to support. | |
* | |
* Usage: | |
* @include aspect-ratio(16,9); | |
* creates a 16x9 container using aspect-ratio for supported browsers with fallback for browsers that do not. | |
* | |
* Codepen Example: https://codepen.io/knolaust/pen/KKZwXjv |
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
<script> | |
function loadStyle(url){ | |
let link = document.createElement('link'); | |
link.href = url; | |
link.rel = 'stylesheet'; | |
document.body.appendChild(link); | |
} | |
loadStyle('css/async.css'); | |
</script> |