2021年1月6日 星期三

2021年1月4日 星期一

[筆記]javascript 時間轉換,safari上面的問題

  • 參考:https://www.jianshu.com/p/dc83b45a9480
new Date('2018-11-11 00:00:00'.replace(/-/g, "/"))
new Date('2018-11-11 00:00:00'.replace(/ /g,"T"))

2020年10月30日 星期五

[筆記]Azure Web App 組態設定,資料庫連線字串

  • 參考:
    •  https://dotblogs.com.tw/ken74114/2017/04/14/111741
  • 解法:
    • 連線字串: " 改"
      • 原本在Web.config中,雙引號會寫成"。
      • Azure設定中要改回雙引號。
    • 類型改:Custom

2020年10月27日 星期二

Azure WebApp 新增mp4格式

  • Set Azure Web App Mime Types
  • Set Mp4

<system.webServer>
  <staticContent>
    <remove fileExtension=".mp4" />
        <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
               <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
 </staticContent>
</system.webServer>

2020年8月5日 星期三

JsonToDataTable

參考:
  1. https://rextester.com/LTRMYJ47380
  2. https://gist.github.com/KyleShen/88ef81e7e279b376e2f26dc9469d7d2e
方法:透過Newtonsoft.Json套件傳換

    string jsonString= "[{\"id\":3,\"name\":\"peter\"}]";
    DataTable dt = (DataTable)JsonConvert.DeserializeObject(jsonString, (typeof(DataTable)));

注意點:
    以此案例所傳的jsonstring一定要是以"[" 開頭"]" 的字串。(array)
    



2020年5月13日 星期三