隨筆-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 華夢行 閱讀(162) | 評論 (0)編輯 收藏
          Install-Package NLog.Config -Version 3.2.1



          Install-Package NLog -Version 3.2.1
          posted @ 2020-01-06 16:10 華夢行 閱讀(128) | 評論 (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 華夢行 閱讀(164) | 評論 (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 華夢行 閱讀(138) | 評論 (0)編輯 收藏
          主站蜘蛛池模板: 贞丰县| 阿尔山市| 潞西市| 岗巴县| 南漳县| 葵青区| 嘉定区| 赤峰市| 华亭县| 安新县| 天门市| 云龙县| 丹寨县| 乃东县| 鲜城| 绵竹市| 隆回县| 柳林县| 疏附县| 巴东县| 土默特左旗| 鸡西市| 黄平县| 徐汇区| 叙永县| 辉南县| 石棉县| 瓦房店市| 柳州市| 左云县| 井冈山市| 延安市| 石河子市| 星子县| 西林县| 冷水江市| 那曲县| 攀枝花市| 法库县| 清苑县| 西和县|