行首
^
行尾
&
0個以上字元
(.*)
搜尋此網誌
2020年11月2日 星期一
2020年9月22日 星期二
重置IntelliJ IDEA試用期限
C:
cd "C:%HOMEPATH%\.IntelliJIdea*\config"rmdir "eval" /s /q
del "options\other.xml"
reg delete "HKEY_CURRENT_USER\Software\JavaSoft\Prefs\jetbrains\idea" /f
2020.1後的版本
C:
cd "C:%HOMEPATH%\AppData\Roaming\JetBrains\IntelliJIdea*"
rmdir "eval" /s /q
del "options\other.xml"
reg delete "HKEY_CURRENT_USER\Software\JavaSoft\Prefs\jetbrains\idea" /f
強烈建議購買正版授權,此方法只適用延長試用期限
2020年8月27日 星期四
2020年8月24日 星期一
Oracle指令
複製schema和data
create table new_table as select * from old_table;
複製指定欄位data
insert into new_table(column1, column2) select (column1, column2) from old_table;
跨database複製table
create table new_table as select * from old_table;
複製指定欄位data
insert into new_table(column1, column2) select (column1, column2) from old_table;
跨database複製table
copy from username/password@ip:port/service to username/password@ip:port/service create table using select * from table;
*注意Table Engine和Character Set
*注意Table Engine和Character Set
2020年5月27日 星期三
MySQL快速複製Table
複製schema
create table new_table like old_table;
複製data
insert into new_table select * from old_table;
複製schema和data
select * into new_table from old_table;
複製指定欄位data
insert into new_table(column1, column2) select (column1, column2) from old_table;
*注意Table Engine和Character Set
create table new_table like old_table;
複製data
insert into new_table select * from old_table;
複製schema和data
select * into new_table from old_table;
複製指定欄位data
insert into new_table(column1, column2) select (column1, column2) from old_table;
*注意Table Engine和Character Set
2020年5月24日 星期日
2020年5月18日 星期一
CentOS 7安裝MariaDB
安裝
yum install mariadb-server
設定開機自動啟動
systemctl enable mariadb
啟動
systemctl start mariadb
檢查狀態
systemctl status mariadb
安全性設定工具
mysql_secure_installation
登入
mysql -u root -p
yum install mariadb-server
設定開機自動啟動
systemctl enable mariadb
啟動
systemctl start mariadb
檢查狀態
systemctl status mariadb
安全性設定工具
mysql_secure_installation
登入
mysql -u root -p
Linux目錄配置(FHS)
/ (root, 根目錄):與開機系統有關
/etc (設定檔)
/boot (開機與核心檔)
/usr (unix software resource):與軟體安裝/執行有關
/opt (第三方協力軟體)
/var (variable):與系統運作過程有關
/var/run (程序相關)
/var/lock (程序相關)
/var/mail (使用者郵件信箱)
/var/spool/news (新聞群組)
/etc (設定檔)
/boot (開機與核心檔)
/usr (unix software resource):與軟體安裝/執行有關
/opt (第三方協力軟體)
/var (variable):與系統運作過程有關
/var/run (程序相關)
/var/lock (程序相關)
/var/mail (使用者郵件信箱)
/var/spool/news (新聞群組)
2020年2月2日 星期日
Java常用API(Apache)
字串相關
隨機字串相關
File相關
StringUtils.isBlank //是否為空字串 StringUtils.leftPad/rightPad/center //左/右/中補字 StringUtils.substring //擷取字串 StringUtils.left/right/mid //從左/右/中擷取字串 StringUtils.equals //比較兩字串 StringUtils.join //串接List元素
隨機字串相關
RandomStringUtils.randomNumeric //產生隨機數(指定位數)
File相關
FileUtils.openInputStream //讀inputStream FileUtils.readFileToString //讀檔至String FileUtils.readFileToByteArray //讀檔至byte FileUtils.openOutputStream //寫outputStream FileUtils.writeStringToFile //將String寫檔 FileUtils.writeByteArrayToFile//將byte寫檔 FileUtils.copyInputStreamToFile //將inputStream寫檔 FileUtils.copyFile //複製檔案至目的 FileUtils.copyURLToFile //複製url至目的
Java常用API(Native)
取得所有可用的編碼
整數左補0
印出Array所有元素
Array轉換為List
Array排序
List轉為Array
List排序
List反轉
List元素串接為字串
Charset.availableCharsets();
整數左補0
String.format("%05d", 123); //00123
印出Array所有元素
Arrays.toString();
Array轉換為List
Arrays.asList();
Array排序
Arrays.sort();
List轉為Array
new ArrayList().toArray();
List排序
Collections.sort();
List反轉
Collections.reverse();
List元素串接為字串
String.join();
訂閱:
文章 (Atom)