The exchange of new line & br HTML tag could refer to PHP - nl2br() function, which uses to inserts HTML line breaks before all newlines in a string.
These JavaScript functions consider whether to use insert or replace to handle the swap.
| - In VS Code settings, search for settings.json: | |
| "php.validate.executablePath": "/usr/local/bin/php" | |
| - Edit the file: | |
| sudo nano /usr/local/bin/php | |
| Paste the code: | |
| path=$(printf '%s\n' "${PWD##*/}") | |
| command="docker exec ${path}_laravel.test_1 php "$@"" | |
| echo "Running php on docker ${path}_laravel.test_1" | |
| $command |
The exchange of new line & br HTML tag could refer to PHP - nl2br() function, which uses to inserts HTML line breaks before all newlines in a string.
These JavaScript functions consider whether to use insert or replace to handle the swap.
| "use strict"; | |
| // Load plugins | |
| const autoprefixer = require("autoprefixer"); | |
| const browsersync = require("browser-sync").create(); | |
| const cp = require("child_process"); | |
| const cssnano = require("cssnano"); | |
| const del = require("del"); | |
| const eslint = require("gulp-eslint"); | |
| const gulp = require("gulp"); |
| <?php | |
| namespace Deployer; | |
| require 'recipe/yii2-app-advanced.php'; | |
| /* | |
| * Configuration | |
| */ | |
| set('bin/php', '/opt/php70/bin/php'); |
| /* -------------------------------------------------------------------------- */ | |
| // All Bootstrap 4 Sass Mixins [Cheat sheet] | |
| // Updated to Bootstrap v4.5.x | |
| // @author https://anschaef.de | |
| // @see https://github.com/twbs/bootstrap/tree/master/scss/mixins | |
| /* -------------------------------------------------------------------------- */ | |
| /* | |
| // ########################################################################## */ | |
| // New cheat sheet for Bootstrap 5: |
| <?php | |
| //http://stackoverflow.com/questions/25708344/yii2-autocomplete-save-the-id-instead-of-value | |
| use yii\web\JsExpression; | |
| use yii\jui\AutoComplete; | |
| $data = Company::find() | |
| ->select(['name as value', 'name as label','c_id as id']) | |
| ->asArray() | |
| ->all(); |
| // Colors reference | |
| // You can use the following as so: | |
| // console.log(colorCode, data); | |
| // console.log(`${colorCode}some colorful text string${resetCode} rest of string in normal color`); | |
| // | |
| // ... and so on. | |
| export const reset = "\x1b[0m" | |
| export const bright = "\x1b[1m" | |
| export const dim = "\x1b[2m" |
| https://toster.ru/q/276441 | |
| Отсюда, есть и другие рекомендации от др авторов. | |
| Я когда делаю Code Review критерии следующие: | |
| * Безопасность: | |
| - Каждый аргумент метода простого типа должен проверяться на тип в случае его проксирования и на граничные значения в случае обработки. Чуть что не так - бросается исключение. Если метод с кучкой аргументов на 80% состоит из поверки из аргументов - это вполне норм)) | |
| - Никаких trigger_error, только исключения. | |
| - Исключения ДОЛЖНЫ быть человеко-понятны, всякие "Something went wrong" можно отдавать пользователю, но в лог должно попасть исключение со стектрейсом и человеко-понятным описанием, что же там пошло не так. | |
| - Каждый аргумент (объект) метода должен быть с тайпхинтингом на этот его класс, или интерфейс. |
| #!/bin/bash | |
| # ---------------------------------- | |
| # DEFINED - Global variables | |
| # ---------------------------------- | |
| # defined temporary folder | |
| DBBACKUP="dbbackup" | |
| # database configure |