https://www.linode.com/docs/development/go/developing-udp-and-tcp-clients-and-servers-in-go/
2020年9月11日 星期五
2020年9月9日 星期三
Mariadb settings
https://www.azureunali.com/dbmysql-sql-mode%E7%9A%84%E8%A8%AD%E5%AE%9A/
https://rtfm.co.ua/en/aws-rds-sqlstate22001-data-too-long-for-column-using-mariadb-10-2/
2020年9月7日 星期一
PHP setting warnging message
https://stackoverflow.com/questions/24506642/can-i-get-phps-pdo-to-return-mysql-warnings-instead-of-only-error-messages
2020年9月6日 星期日
Mariasql comment-doucment
such as /*!5200 set XXX */
ref
https://stackoverflow.com/questions/1916392/how-can-i-get-rid-of-these-comments-in-a-mysql-dump
https://www.techonthenet.com/mariadb/comments.php
http://job.achi.idv.tw/2013/05/02/mysql-annotation-syntax/
mysql partition
1. https://cola.workxplay.net/mysql-partitioning-for-performance-optimization/
2. https://mariadb.com/kb/en/partitioning-limitations/
3. https://kkc.github.io/2017/07/07/mysql-partitioning/
2020年8月4日 星期二
PHP clousre and access modify object
: use
and
: &$
###
https://ourcodeworld.com/articles/read/712/how-to-change-the-value-of-a-variable-outside-of-the-scope-within-a-closure-function-in-phphttps://ithelp.ithome.com.tw/articles/10132747
2020年8月3日 星期一
PHP change table name to lowcase
$subject = "From ab_cD efg";
$callback = function($match)
{
//var_dump($match);
//echo $match[1];
return "FROM " . strtolower($match[1]) . " ";
//return preg_replace($match[1], strtolower($match[1]) ,$match[0]);
};
echo preg_replace_callback('/from\s+([\w]+)\s*/i', $callback, $subject, 1);
echo "\n";
echo preg_replace_callback('/from\s+([\w]+)\s*/i', $callback, "From ab_cD", 1);
echo "\n";
echo preg_replace_callback('/from\s+([\w]+)\s*/i', $callback, "Fsssc ab_cD", 1);
ref
http://tools.jb51.net/regex/create_reg
// 将文本中的年份增加一年.
$text = "April fools day is 04/01/2002n";
$text.= "Last christmas was 12/24/2001n";
// 回调函数
function next_year($matches)
{
// 通常: $matches[0]是完成的匹配
// $matches[1]是第一个捕获子组的匹配
// 以此类推
return $matches[1].($matches[2]+1);
}
echo preg_replace_callback(
"|(d{2}/d{2}/)(d{4})|",
"next_year",
$text);
訂閱:
文章 (Atom)