随笔-295  评论-26  文章-1  trackbacks-0
  2019年9月14日



            //允许输入字母、点、回退键、数字
            if (((int)e.KeyChar >= (int)'a' && (int)e.KeyChar <= (int)'z') || (((int)e.KeyChar > 48 && (int)e.KeyChar < 57) || (int)e.KeyChar == 8 || (int)e.KeyChar == 46))
            {
                e.Handled = false;
            }
            else e.Handled = true;



      //允许输入字母、回退键、数字
            if (((int)e.KeyChar >= (int)'a' && (int)e.KeyChar <= (int)'z') || (((int)e.KeyChar > 48 && (int)e.KeyChar < 57) || (int)e.KeyChar == 8))
            {
                e.Handled = false;
            }
            else e.Handled = true; 


// 只能输入字母数字以及中文字
  if ((e.KeyChar != '\b') && (!Char.IsLetter(e.KeyChar)) && (!char.IsDigit(e.KeyChar)))
            {
                e.Handled = true;
            }

//只输入数字
 if (e.KeyChar != 8 && (!Char.IsDigit(e.KeyChar)))
            {
                e.Handled = true;
            }

只能输入数字以及字母X

  if (e.KeyChar != 88 && e.KeyChar != 8 && (!Char.IsDigit(e.KeyChar)))
            {
                e.Handled = true;
            }
posted @ 2020-06-13 10:46 华梦行 阅读(151) | 评论 (0)编辑 收藏
Install-Package NLog.Config -Version 3.2.1



Install-Package NLog -Version 3.2.1
posted @ 2020-01-06 16:10 华梦行 阅读(118) | 评论 (0)编辑 收藏
  • mysql5.7以上版本在常会报关于only_full_group_by的错误,可以在sql_mode中关闭他,网上查找的解
  • 在[mysqld]中添加代码
sql_mode ='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'

重启mysql

sudo service mysql restart

mysql5.7以上版本在常会报关于only_full_group_by的错误,可以在sql_mode中关闭他,网上查找的解
查看参数是否存在

mysql> SELECT @@sql_mode;
+------------------------------------------------------------------------------------------------------------------------+
| @@sql_mode                                                                                                             |
+------------------------------------------------------------------------------------------------------------------------+
| STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> SELECT @@GLOBAL.sql_mode;
+------------------------------------------------------------------------------------------------------------------------+
| @@GLOBAL.sql_mode                                                                                                      |
+------------------------------------------------------------------------------------------------------------------------+
| STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
posted @ 2019-09-15 22:02 华梦行 阅读(138) | 评论 (0)编辑 收藏

MYSQL_HOME     解压路径   C:\DevelopTool\MySQL\mysql-5.7.25-winx64    

 

 

 Path     %MYSQL_HOME%\bin



>mysqld --initialize --user=mysql --console
mysqld -install 

先启动服务:

net start MySQL【或者是MySQL57】

修改密码
mysqladmin -uroot -p123456 password 123 


sc delete 服务名例如: sc delete mysql



https://www.cnblogs.com/july7/p/11489029.html

远程访问
use mysql;
GRANT ALL ON *.* TO root@'%' IDENTIFIED BY '密码' WITH GRANT OPTION;
flush privileges;
posted @ 2019-09-14 22:51 华梦行 阅读(121) | 评论 (0)编辑 收藏