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
| package test | |
| import ( | |
| "image" | |
| _ "image/jpeg" | |
| _ "image/png" | |
| "testing" | |
| "github.com/disintegration/imaging" |
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
| package bench | |
| import ( | |
| "fmt" | |
| "strconv" | |
| "strings" | |
| "testing" | |
| ) | |
| var validResult = "100 abc --- false 200 500" |
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 artisan doctrine:mapping:import annotation |
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
| get - получает или вычисляет свойство объекта | |
| set - устанавливает свойство объекта | |
| is - проверяет условие, всегда возвращает true или false | |
| create - создать новый объект | |
| add - добавить объект в какую-либо коллекцию | |
| save - сохранить состояние объекта в любое хранилище | |
| delete - удалить объект из коллекции или хранилища | |
| find - найти в хранилище | |
| fetch - выбрать результат | |
| execute - выполнить команду |
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
| return [ | |
| 'analysis' => [ | |
| 'char_filter' => [ | |
| 'ru' => [ | |
| 'type' => 'mapping', | |
| 'mappings' => ['Ё=>Е','ё=>е'], | |
| ], | |
| ], | |
| 'analyzer' => [ | |
| 'default' => [ |
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
| sudo apt-get update | |
| sudo apt-get install curl git | |
| curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer | |
| composer |
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 | |
| $im = new \Imagick(); | |
| $count = count( \Imagick::queryFonts() ); | |
| $im->newImage(450, ($count * 25 + 20), new ImagickPixel('white')); | |
| $draw = new \ImagickDraw(); | |
| $draw->setFillColor('black'); | |
| $draw->setFontSize(20); | |
| foreach ( \Imagick::queryFonts() as $i => $font ) { |