In your command-line run the following commands:
brew doctorbrew update
| const TELEGRAM_BOT_TOKEN = '110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw'; // https://core.telegram.org/bots#creating-a-new-bot | |
| export const verifyTelegramWebAppData = async (telegramInitData: string): boolean => { | |
| // The data is a query string, which is composed of a series of field-value pairs. | |
| const encoded = decodeURIComponent(telegramInitData); | |
| // HMAC-SHA-256 signature of the bot's token with the constant string WebAppData used as a key. | |
| const secret = crypto |
| import { ValidationArguments, ValidatorConstraintInterface } from 'class-validator'; | |
| import { Connection, EntitySchema, FindConditions, ObjectType } from 'typeorm'; | |
| interface UniqueValidationArguments<E> extends ValidationArguments { | |
| constraints: [ | |
| ObjectType<E> | EntitySchema<E> | string, | |
| ((validationArguments: ValidationArguments) => FindConditions<E>) | keyof E, | |
| ]; | |
| } |
| // move_semantics1.rs | |
| // Make me compile! Scroll down for hints :) | |
| pub fn main() { | |
| let vec0 = Vec::new(); | |
| let mut vec1 = fill_vec(vec0); | |
| println!("{} has length {} content `{:?}`", "vec1", vec1.len(), vec1); |
In your command-line run the following commands:
brew doctorbrew update| UPDATE `table_name` SET `order` = | |
| CASE | |
| WHEN `order` = 6 THEN 3 | |
| ELSE `order` + 1 | |
| END | |
| WHERE `order` BETWEEN 3 AND 6; | |
| --Переместить элемент с весом 6 на место элемента с весом 3. | |
| --Изначально при вставке (INSERT) полю order присваиваем insert_id() чтобы оно было уникальным. |
| <?php | |
| /** | |
| * Find Damerau–Levenshtein distance between two string | |
| * | |
| * @param string $source | |
| * @param string $dest | |
| * @return int Damerau–Levenshtein distance | |
| */ | |
| function distance($source, $dest) |
| class HelperUrl | |
| { | |
| /** | |
| * Делает линки из текста с урлами | |
| * | |
| * @param string текст с урлами, но без ссылок (тег <a>) | |
| * | |
| * @return string текст со ссылкам | |
| */ | |
| public static function swapUrlOnLink($text) |
| /************************/ | |
| /*** Адаптивные стили ***/ | |
| /************************/ | |
| @media (min-width : 1260px) and (min-height : 580px) | |
| { | |
| .page | |
| { |
| frontend (read: http://cssguidelin.es/) | |
| Общее | |
| — Ширина кода по возможности 80 символов, максимум — 120 символов | |
| — Отступ 4 пробела (не табуляция!) |
| export LS_COLORS="no=00;38;5;244:rs=0:di=00;38;5;33:ln=01;38;5;37:mh=00:pi=48;5;230;38;5;136;01:so=48;5;230;38;5;136;01:do=48;5;230;38;5;136;01:bd=48;5;230;38;5;244;01:cd=48;5;230;38;5;244;01:or=48;5;235;38;5;160:su=48;5;160;38;5;230:sg=48;5;136;38;5;230:ca=30;41:tw=48;5;64;38;5;230:ow=48;5;235;38;5;33:st=48;5;33;38;5;230:ex=01;38;5;64:*.tar=00;38;5;61:*.tgz=01;38;5;61:*.arj=01;38;5;61:*.taz=01;38;5;61:*.lzh=01;38;5;61:*.lzma=01;38;5;61:*.tlz=01;38;5;61:*.txz=01;38;5;61:*.zip=01;38;5;61:*.z=01;38;5;61:*.Z=01;38;5;61:*.dz=01;38;5;61:*.gz=01;38;5;61:*.lz=01;38;5;61:*.xz=01;38;5;61:*.bz2=01;38;5;61:*.bz=01;38;5;61:*.tbz=01;38;5;61:*.tbz2=01;38;5;61:*.tz=01;38;5;61:*.deb=01;38;5;61:*.rpm=01;38;5;61:*.jar=01;38;5;61:*.rar=01;38;5;61:*.ace=01;38;5;61:*.zoo=01;38;5;61:*.cpio=01;38;5;61:*.7z=01;38;5;61:*.rz=01;38;5;61:*.apk=01;38;5;61:*.gem=01;38;5;61:*.jpg=00;38;5;136:*.JPG=00;38;5;136:*.jpeg=00;38;5;136:*.gif=00;38;5;136:*.bmp=00;38;5;136:*.pbm=00;38;5;136:*.pgm=00;38;5;136:*.ppm=00;38;5;136:*.tga=00;38;5;136:*.xbm |