Region: Thailand
Calendar:: Gregorian
Prefer: OpenType
Source Code Pro: https://github.com/adobe-fonts/source-code-pro/releases
<?php | |
/** | |
* Convert number with unit byte to bytes unit | |
* @link https://en.wikipedia.org/wiki/Metric_prefix | |
* @param string $value a number of bytes with optinal SI decimal prefix (e.g. 7k, 5mb, 3GB or 1 Tb) | |
* @return integer|float A number representation of the size in BYTES (can be 0). otherwise FALSE | |
*/ | |
function str2bytes($value) { | |
// only string |
<?php | |
/** | |
* Escape php string to javascript string | |
* @param string $str | |
* @return string escaped string | |
*/ | |
function escape_javascript_string($str){ | |
// if php supports json_encode, use it (support utf-8) | |
if (function_exists('json_encode')) { |
<?php | |
/** | |
* Seach in array value, similar to in_array(), but has ability to search with partial match | |
* @param string $needle searched value | |
* @param array $haystack target array | |
* @param string $return_key if third parameter is set to TRUE, the function will return array key | |
* @return boolean|int|string if found, function will return TRUE, string or int of first founded key (if return_key set to TRUE) | |
* otherwise FALSE | |
*/ |
<?php | |
private function _logfile($logName, $str2log) | |
{ | |
$file= sys_get_temp_dir() . '/mydebug-' . date('Y-m-d') . '.log'; | |
if (!$handle = fopen($file, 'a')) { | |
throw new Exception('Could not open file!'); | |
} | |
$str2log = print_r($str2log, true); | |
$olog = print_r("{$logName}: {$str2log}", true) . PHP_EOL; |
{ | |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; | |
} |
Region: Thailand
Calendar:: Gregorian
Prefer: OpenType
Source Code Pro: https://github.com/adobe-fonts/source-code-pro/releases
https://www.wolframalpha.com/examples/
Examples for Words & Linguistics https://www.wolframalpha.com/examples/society-and-culture/words-and-linguistics/
word <word>
synonyms <word>
spell 1,702,465,818
acronym WHO
Source: https://github.com/JohnCoates/Aerial/blob/master/Documentation/OfflineMode.md | |
1) Download resource file.. | |
2) Extract and check `entries.json`. | |
3) Check url-* and get what you want. |
Set xdebug.remote_host=host.docker.internal
and xdebug.remote_enable=1
in php.ini
PHPSTORM
https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html
Using environment variables: https://symfony.com/doc/current/configuration.html#configuration-based-on-environment-variables
Listing Environment Variables: https://symfony.com/doc/current/configuration.html#listing-environment-variables
php bin/console debug:container --env-vars
php bin/console debug:container --parameters