This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--TSQL利用CASE WHEN處理欄位的NULL值 | |
SELECT 'new CustomersEntity("'+ [CustomerID] + '" , "' + [CompanyName] + '" , "' + [ContactName] + '" , "' + [ContactTitle] + '" , " ' + [Address] + '" , "' + [City] + '" , "' | |
+ CASE WHEN [Region] IS NULL THEN '' ELSE [Region] END + '" , "' | |
+ CASE WHEN [PostalCode] IS NULL THEN '' ELSE [PostalCode] END + '" , "' | |
+ [Country] + '" , "' + [Phone] + '" , "' | |
+ CASE WHEN [Fax] IS NULL THEN ' ' ELSE [Fax] END + '" ' --SQL結尾 | |
+');' | |
FROM [dbo].[Customers] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import requests,datetime | |
from bs4 import BeautifulSoup | |
url = 'http://stock.capital.com.tw/z/zm/zmd/zmdb.djhtm' | |
res = requests.get(url) | |
#res.encoding = 'cp950' | |
#print("encoding: %s" % res.encoding) | |
#print("content: \n%s" % res.text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ※此版本會被證交所主機擋,無法正常使用,僅供示範※ | |
# 請先pip install beautifulsoup4 | |
# https://rexpyblog.blogspot.com/2021/03/html.html 文章範例程式 | |
import requests | |
from bs4 import BeautifulSoup | |
headers = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36'} | |
# 公開資訊觀測站的重大訊息公告 | |
url = 'https://mops.twse.com.tw/mops/web/ajax_t05st01?firstin=1&TYPEK=sii&co_id=2330&year=107&month=&b_date=&e_date=' | |
res = requests.get(url, headers=headers).text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--搜尋java關鍵字 | |
/* | |
搜尋語法: | |
SELECT [url],title,[text] | |
FROM PagesArticles20210302 | |
WHERE CONTAINS([title], 'java') | |
OR CONTAINS([text], 'java') | |
order by [url] | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<settings> | |
<proxies> | |
<proxy> | |
<active>true</active> | |
<protocol>http</protocol> | |
<host>PROXY.xxxyyy.com</host> | |
<port>8080</port> | |
<nonProxyHosts>intraDomain.com|localhost|127.*|[::1]|192.168.*|[::1]</nonProxyHosts> | |
</proxy> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
直接ssh用sudo systemctl start mysql80-container.service指令是可以啟動 | |
### RHEL 8.3重開機後的資訊 ### | |
[linuxuser@localhost ~]$ sudo podman ps | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
[linuxuser@localhost ~]$ sudo podman ps -a | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
35f94aedd9d8 registry.redhat.io/rhel8/mysql-80 run-mysqld 22 minutes ago Exited (137) 13 minutes ago 0.0.0.0:3306->3306/tcp mysql-80-persist | |
[linuxuser@localhost ~]$ systemctl is-enabled mysql80-container.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#環境:RHEL 8.3 | |
#目的:透過podman建立一個Persistent Storage的MySQL 8.0資料庫,並藉由systemctl設為Host重開機自動啟動 | |
#備註1:podman run指令不支援--restart=always(因為podman有別於Docker架構,不使用Daemon機制(daemonless Container),無法透過Daemon機制去自動重啟) | |
#參考資料 https://igene.tw/podman-intro | |
#備註2:如果rm刪除容器重新建立,需要重新產生 podman generate systemd --name mysql-80-persist > mysql80-container.service | |
#建立Permanent Storage Location | |
sudo mkdir -p /var/podmandata/db/mysql80 | |
#加入合適的SELinux context |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ohcache; | |
import org.caffinitas.ohc.CacheSerializer; | |
import org.caffinitas.ohc.OHCache; | |
import org.caffinitas.ohc.OHCacheBuilder; | |
import java.nio.ByteBuffer; | |
import java.nio.charset.StandardCharsets; | |
import java.util.HashMap; | |
import java.util.Map; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Java\jdk1.8.0_241_64bits\bin\java.exe -Dmaven.multiModuleProjectDirectory=D:\LDEV-JAVA-Spring\mall\mall-admin "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA 2020.1.2\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA 2020.1.2\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA 2020.1.2\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2020.1.2\lib\idea_rt.jar=14711:C:\Program Files\JetBrains\IntelliJ IDEA 2020.1.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2020.1.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2020.1.2\plugins\maven\lib\maven3\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.version2020.1.2 deploy | |
[INFO] Scanning for projects... | |
[INFO] | |
[INFO] ---------------------< com.macro.mall:mall-admin >---------------------- | |
[INFO] Building mall- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/MicrosoftDocs/visualstudio-docs/blob/master/docs/install/create-an-offline-installation-of-visual-studio.md | |
vs_community.exe --layout c:\vslayout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Component.GitHub.VisualStudio --includeOptional --lang en-US | |
vs_professional.exe --layout D:\vs2019layout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Component.GitHub.VisualStudio --includeOptional --lang en-US zh-TW |
NewerOlder