<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>使用babel測試開發React</title>
<!-- React 和 ReactDOM(開發版本) -->
<script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
<!-- Babel Standalone:讓瀏覽器即時編譯 JSX -->
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<!-- axios -->
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<!-- bootstrap -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
</head>
<body>
<div id="root"></div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js"
integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI"
crossorigin="anonymous"></script>
<script type="text/babel">
const App = () => {
const { useState } = React;
const [count, setCount] = useState(0);
const handleClick = () => {
setCount(count + 1);
}
return (
<>
<h5>{count}</h5>
<button className="btn btn-primary" onClick={handleClick}>+1</button>
</>
)
}
ReactDOM.createRoot(document.querySelector('#root')).render(<App />);
</script>
</body>
</html>
簡單使用
筆記筆記
2025年12月4日 星期四
筆記 使用Babel開發測試React
僅測試時使用
2025年11月27日 星期四
2025年11月4日 星期二
筆記 前端開發簡易使用https方法 VS Code + mkcert + Vite
情境如果已經拿到一個網站是"資料夾類型"例如剛切好html + css + javascript,測試時想使用https開啟瀏覽器,Live Server雖然也可以,但是比較麻煩複雜,以下方式AI提供測試改良,蠻簡單的。
PS.已經是vite專案的話1>5>6即可
1.下載mkcert,一般windows選mkcert-v1.4.4-windows-amd64.exe,下載後重新命名"mkcert.exe",放於C:\Windows或C:\Windows\System32底下
2.新增vite.config.js package.json .gitignore到專案底下,內容如下
4.vs code > 終端機(termainal) > npm install -y
5.vs code > 終端機(termainal) > mkcert localhost(產生憑證)
6.vs code > 終端機(termainal) > npm run dev
PS.已經是vite專案的話1>5>6即可
1.下載mkcert,一般windows選mkcert-v1.4.4-windows-amd64.exe,下載後重新命名"mkcert.exe",放於C:\Windows或C:\Windows\System32底下
2.新增vite.config.js package.json .gitignore到專案底下,內容如下
vite.config.js
import { defineConfig } from 'vite';
import fs from 'fs';
export default defineConfig({
server: {
https: {
key: fs.readFileSync('./localhost-key.pem'),
cert: fs.readFileSync('./localhost.pem')
},
port: 3000,
open: true
}
});
package.json
{
"name": "yourname",
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview"
},
"devDependencies": {
"vite": "^7.1.12"
}
}
.gitignore node_modules/ dist/ .vite/ npm-debug.log* .yarn-debug.log* .yarn-error.log* .pnpm-debug.log* .vscode/ .DS_Store Thumbs.db # mkcert local certificates localhost.pem localhost-key.pem3.改package.json裡的name變成你的專案名稱
4.vs code > 終端機(termainal) > npm install -y
5.vs code > 終端機(termainal) > mkcert localhost(產生憑證)
6.vs code > 終端機(termainal) > npm run dev
2025年9月29日 星期一
未分類 威力導演365無法匯出
直接點選.pds副檔名開啟專案後,點選匯出都沒反應,網路找了解決方式
1.檔案 > 開新專案
2.將要使用的影音檔都拉進媒體櫃如下圖
3.如果出現下列錯誤的話,整個軟體關掉或電腦重開,從1開始重作,如果沒錯就直接跳4
4.檔案 > 開啟專案 > 選擇您的.pds
參考網址:
Cyberlink PowerDirector 2025 不讓你匯出影片
1.檔案 > 開新專案
2.將要使用的影音檔都拉進媒體櫃如下圖
3.如果出現下列錯誤的話,整個軟體關掉或電腦重開,從1開始重作,如果沒錯就直接跳4
4.檔案 > 開啟專案 > 選擇您的.pds
參考網址:
Cyberlink PowerDirector 2025 不讓你匯出影片
2025年8月4日 星期一
未分類 開發好用套件
VS Code
Visual Studio Live Share: 即時程式碼共同作業工具
Chrome插件
Visual Studio
網頁
AJAX:AJAX:axios
輪播:swiper
動畫:Animate.css aos wow.js gsap parallax.js
瀑布流:masonry
3d圖:three.js
時間:mement.js
alert:sweetalert sweetalert2
eslint檢查 code 風格
多國:i18n
分頁:
2025年7月9日 星期三
Git make sure you configure your 'user.name' and 'user.email' in git
VS Code Commit時出現的錯誤
make sure you configure your 'user.name' and 'user.email' in git
開啟終端機輸入以下指令
make sure you configure your 'user.name' and 'user.email' in git
開啟終端機輸入以下指令
git config --global user.name "你git上面的名稱" git config --global user.email 你git註冊的mail
2025年5月26日 星期一
未分類 Nas 對接電腦傳輸速度變慢
使用網路芳鄰時跑的速度很慢
1.檢查網路線是否接好
2.網路線品質cat?
3.先檢查Nas跟PC或筆電的網路速度
4.透過 Windows (SMB / CIFS) 傳輸檔案時速度緩慢,該如何解決?或[網路芳鄰 (SMB)] 如何解決Windows 11無法使用SMB功能的問題?
5.通常會需要關閉SMB簽名要求,用管理員開啟Power Shell
透過 Windows (SMB / CIFS) 傳輸檔案時速度緩慢,該如何解決?
[網路芳鄰 (SMB)] 如何解決Windows 11無法使用SMB功能的問題?
1.檢查網路線是否接好
2.網路線品質cat?
3.先檢查Nas跟PC或筆電的網路速度
4.透過 Windows (SMB / CIFS) 傳輸檔案時速度緩慢,該如何解決?或[網路芳鄰 (SMB)] 如何解決Windows 11無法使用SMB功能的問題?
5.通常會需要關閉SMB簽名要求,用管理員開啟Power Shell
Set-SmbClientConfiguration -RequireSecuritySignature $false參考資料
透過 Windows (SMB / CIFS) 傳輸檔案時速度緩慢,該如何解決?
[網路芳鄰 (SMB)] 如何解決Windows 11無法使用SMB功能的問題?
2025年5月9日 星期五
Windows chkdsk
2025年4月14日 星期一
IIS At least one other site is using the same HTTPS binding and the binding is configured
一台Server IIS使用多網站憑證問題
At least one other site is using the same HTTPS binding and the binding is configured
解決方式
參考資料
IIS 多站台使用 HTTPS 憑證的設定方式
At least one other site is using the same HTTPS binding and the binding is configured
解決方式
勾選Require Server Name Indication中文版請參考下方參考資料
參考資料
IIS 多站台使用 HTTPS 憑證的設定方式
2025年4月1日 星期二
Git npm : 因為這個系統上已停用指令碼執行,所以無法載入
1.開啟PowerShell
2.執行
VSCode 執行 npm install 失敗
2.執行
get-executionpolicy3.如為Restricted執行
set-executionpolicy remotesigned4.如有例外改執行
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned參考資料
VSCode 執行 npm install 失敗
2025年3月21日 星期五
SQL Server 無法修改強制執行密碼原則
新增SQL使用者時,強制密碼原則未勾選時錯誤
"The CHECK_POLICY and CHECK_EXPIRATION options cannot be turned OFF when MUST_CHANGE is ON"
Can't Alter Login
"The CHECK_POLICY and CHECK_EXPIRATION options cannot be turned OFF when MUST_CHANGE is ON"
USE Master
GO
ALTER LOGIN UserName WITH PASSWORD = 'password'
GO
ALTER LOGIN UserName WITH
CHECK_POLICY = OFF,
CHECK_EXPIRATION = OFF;
參考資料Can't Alter Login
2025年3月3日 星期一
SQL Server provider: Named Pipes Provider, error: 40
這問題新手時常遇到所以大概解法
1.開啟 Sql Server Configuation Manager,啟用具名管道
2.防火牆設定輸入規則1433 port
通常這樣就解決了,但我問題還是沒解決
後來詢問主機廠商才知道1433 port常被駭,所以主機商先鎖了,所以需要在Server上使用另一個Port
以下為解決方法
1.開啟 Sql Server Configuation Manager,修改TCP/IP > 改port > 重啟服務
2.防火牆設定輸入規則"自訂的"port
最後專案或程式碼修改連線字串
連線字串比較特別,例如自訂的port為9527,原"192.168.1.100",要改成"192.168.1.100,9527"
1.開啟 Sql Server Configuation Manager,啟用具名管道
2.防火牆設定輸入規則1433 port
通常這樣就解決了,但我問題還是沒解決
後來詢問主機廠商才知道1433 port常被駭,所以主機商先鎖了,所以需要在Server上使用另一個Port
以下為解決方法
1.開啟 Sql Server Configuation Manager,修改TCP/IP > 改port > 重啟服務
2.防火牆設定輸入規則"自訂的"port
最後專案或程式碼修改連線字串
連線字串比較特別,例如自訂的port為9527,原"192.168.1.100",要改成"192.168.1.100,9527"
2024年11月20日 星期三
c# 台灣載具正規表達式
目前查了一下台灣載具規則如下
載具規則
1.總長度8碼
2.第一碼必為[/]
3.後七碼為[半形]數字[0-9]、英文大寫[A-Z]、符號[.][-][+]
以下為驗證,如有錯誤請告知
手機條碼、自然人憑證條碼與捐贈碼檢核規則
用 regular expression 驗證電子發票手機條碼格式 。E-invoice mobile barcode validator by regular expression.
載具規則
1.總長度8碼
2.第一碼必為[/]
3.後七碼為[半形]數字[0-9]、英文大寫[A-Z]、符號[.][-][+]
以下為驗證,如有錯誤請告知
using System.Text.RegularExpressions;
public static bool taiwancarrier(string input) {
return Regex.IsMatch(input, @"^/[0-9A-Z.+-]{7}$");
}
參考資料手機條碼、自然人憑證條碼與捐贈碼檢核規則
用 regular expression 驗證電子發票手機條碼格式 。E-invoice mobile barcode validator by regular expression.
2024年7月23日 星期二
Asp.net 404.15 - Not found
連結字串長度問題
修改web.confiog
修改web.confiog
<system.web> <httpRuntime maxQueryStringLength="102400" maxUrlLength="102400" /> </system.web> <system.webServer> <security> <requestFiltering> <requestLimits maxUrl="102400" maxQueryString="102400" /> </requestFiltering> </security> </system.webServer>
2024年7月8日 星期一
jQueryUI datepicker改變字體大小或CSS
$('.datepicker').datepicker({
beforeShow: function () {
setTimeout(function () {
$('.ui-datepicker').css('font-size', '16px');
}, 0);
}
});
2024年5月31日 星期五
Google AdSense 廣告申請未過原因,讓AI來翻譯吧
負責團隊已審查完畢,但很抱歉,您的網站目前無法放送廣告。 您的網站有些問題,必須先修正才能開始放送廣告。英文原文如下
1 00:00:05,872 --> 00:00:07,807 Hi welcome to the Google Ads channel. 2 00:00:08,108 --> 00:00:12,12 I'm andreas, and today I will be taking you through the best practices to help 3 00:00:12,12 --> 00:00:13,279 you get your side approved. 4 00:00:14,114 --> 00:00:17,384 I will be giving you three recommendations to increase the chances 5 00:00:17,617 --> 00:00:20,153 of getting your sites approval status to ready, 6 00:00:20,920 --> 00:00:22,722 before diving into the best practices. 7 00:00:23,56 --> 00:00:24,157 Let me introduce them to you. 8 00:00:24,991 --> 00:00:28,495 The first best practice is to make sure your site has the correct adcoat. 9 00:00:29,295 --> 00:00:29,763 Next, 10 00:00:30,96 --> 00:00:32,198 we've a second practice on having the site available. 11 00:00:32,999 --> 00:00:36,436 Last but not least, we will talk about our program policies to ensure the site 12 00:00:36,569 --> 00:00:37,404 is policy compliant. 13 00:00:38,38 --> 00:00:39,372 So let's get started. 14 00:00:39,773 --> 00:00:43,43 The first best practice is to make sure your code is complete and correct. 15 00:00:43,610 --> 00:00:47,147 After you've generated the ad code, you will need to place the ad code into the 16 00:00:47,147 --> 00:00:48,148 hcml of your site. 17 00:00:48,815 --> 00:00:52,752 You need to place the ad code in the head tag or at the top of the body of 18 00:00:52,752 --> 00:00:53,86 your page. 19 00:00:53,386 --> 00:00:54,721 Without making any changes, 20 00:00:55,221 --> 00:00:58,658 please make sure you've placed the code into the same site you've added in your 21 00:00:58,758 --> 00:00:59,526 ad sense account. 22 00:00:59,959 --> 00:01:03,296 Alternatively, you can verify your side ownership in search console. 23 00:01:03,697 --> 00:01:03,997 Instead, 24 00:01:04,497 --> 00:01:08,34 if we detect that you verified your site in search conso we'll continue 25 00:01:08,335 --> 00:01:10,503 checking if your site is ready to show Ads. 26 00:01:10,837 --> 00:01:14,74 The second best practice is to make sure your site is reachable. 27 00:01:14,841 --> 00:01:18,278 We often review websites which may be down or not loading correctly. 28 00:01:18,978 --> 00:01:21,614 Therefore we are unable to review these sites. 29 00:01:22,415 --> 00:01:26,920 Make sure that the url used to sign up for the adsense account is correct and 30 00:01:26,986 --> 00:01:27,554 open running. 31 00:01:27,721 --> 00:01:28,154 Globally 32 00:01:28,888 --> 00:01:32,592 your site would be unavailable if you need a password to access the site. 33 00:01:33,59 --> 00:01:36,262 If your sites login is password protected, consider temporarily 34 00:01:36,730 --> 00:01:39,532 removing the login screen so that we can reach your site. 35 00:01:40,900 --> 00:01:45,638 Also make sure you are not blocking our crawler in your robot satx t file. 36 00:01:45,872 --> 00:01:49,943 To avoid any crawler issues, you can see more details on why your site might 37 00:01:49,943 --> 00:01:51,945 be unreachable by clicking on the help center. 38 00:01:52,112 --> 00:01:53,913 Link that's in the description of this video. 39 00:01:54,581 --> 00:01:58,251 The final best practice is to make sure your site is policy compliant. 40 00:01:58,818 --> 00:02:01,788 Please review our program policies and content policies. 41 00:02:02,88 --> 00:02:02,722 In particular, 42 00:02:03,390 --> 00:02:07,961 we've observed three main violations by our publishers that will highlight next 43 00:02:08,28 --> 00:02:08,962 to help you avoid them. 44 00:02:09,295 --> 00:02:11,664 The first violation is low value content. 45 00:02:12,32 --> 00:02:14,668 Make sure the content is original and valuable to your users. 46 00:02:15,235 --> 00:02:17,704 The second violation is having replicated content. 47 00:02:18,271 --> 00:02:21,875 Ensure that your content is unique and it's not repetitive on different pages 48 00:02:22,8 --> 00:02:25,712 of your site, when the same content is found replicated on your pages or on 49 00:02:25,712 --> 00:02:27,147 other sides, your site will be approved. 50 00:02:27,714 --> 00:02:30,550 The third and the last main violation is site navigation. 51 00:02:30,917 --> 00:02:33,319 Users need to be able to easily navigate your site. 52 00:02:33,620 --> 00:02:37,757 This can be achieved by categorizing your content using menu bars and so on. 53 00:02:38,91 --> 00:02:41,861 Keep in mind that we may review all pages of your site, and not just the 54 00:02:41,861 --> 00:02:44,164 sign up url where you place the ad code. 55 00:02:44,497 --> 00:02:48,101 That's why it's very important to make sure each page has valuable content 56 00:02:48,568 --> 00:02:50,870 that is not repetitive and is easy to navigate. 57 00:02:51,371 --> 00:02:55,542 In addition to these, we advise placing ad code on the most popular page of 58 00:02:55,608 --> 00:02:58,912 your site, which will trigger our system into recognizing your ad code 59 00:02:59,79 --> 00:03:00,814 and speed up the activation process. 60 00:03:01,381 --> 00:03:04,184 Last but not least, keep your site in the sites list. 61 00:03:04,517 --> 00:03:06,886 As removing it might delay the review process 62 00:03:07,220 --> 00:03:07,620 to summarize. 63 00:03:08,121 --> 00:03:10,724 Here are the most important points to get your account activated. 64 00:03:11,291 --> 00:03:15,195 One, copy the code exactly as it appears in your outsense home page. 65 00:03:15,695 --> 00:03:16,329 Two, 66 00:03:16,496 --> 00:03:17,931 make sure your side is reachable. 67 00:03:18,331 --> 00:03:20,467 And three, review our program policies. 68 00:03:21,1 --> 00:03:24,637 We hope this video helps you better understand how you can get your site approved. 69 00:03:25,138 --> 00:03:28,575 To learn more, you can visit the adsense help center, an ad sense 70 00:03:28,742 --> 00:03:31,678 website, vie the links in the description of this video. 71 00:03:32,112 --> 00:03:35,715 Last but not least, make sure to subscribe to the Google outsense 72 00:03:36,116 --> 00:03:39,986 channel for more best practices on how you can grow your side further. 73 00:03:40,820 --> 00:03:41,621 Thank you for watching. 74 00:03:41,955 --> 00:03:46,92 And let us know in the comments section if you have any suggestions for new videos讓AI來翻譯吧
1 00:00:05,872 --> 00:00:07,807 嗨,歡迎來到 Google Ads 頻道。 2 00:00:08,108 --> 00:00:12,12 我是 Andreas,今天我會帶你 了解一些最佳做法,幫助你 3 00:00:12,12 --> 00:00:13,279 讓你的網站獲得批准。 4 00:00:14,114 --> 00:00:17,384 我會給你三個 增加網站審核通過機會的建議, 5 00:00:17,617 --> 00:00:20,153 在深入了解最佳做法之前。 6 00:00:20,920 --> 00:00:22,722 讓我先介紹一下這些建議。 7 00:00:23,56 --> 00:00:24,157 第一個最佳做法是確保 你的網站有正確的廣告代碼。 8 00:00:24,991 --> 00:00:28,495 接下來, 9 00:00:29,295 --> 00:00:29,763 我們有第二個做法,就是確保網站可用。 10 00:00:30,96 --> 00:00:32,198 最後但同樣重要的是,我們會談論 我們的計畫政策,以確保網站符合政策。 11 00:00:32,999 --> 00:00:36,436 12 00:00:36,569 --> 00:00:37,404 那麼,我們開始吧。 13 00:00:38,38 --> 00:00:39,372 第一個最佳做法是確保 你的代碼完整且正確。 14 00:00:39,773 --> 00:00:43,43 在你生成廣告代碼後, 需要將廣告代碼放入你網站的 HTML 中。 15 00:00:43,610 --> 00:00:47,147 需要將廣告代碼放在 head 標籤或 頁面的 body 標籤頂部。 16 00:00:47,147 --> 00:00:48,148 不要進行任何更改, 17 00:00:48,815 --> 00:00:52,752 請確保將代碼放入與 你在 Adsense 帳戶中添加的相同網站中。 18 00:00:52,752 --> 00:00:53,86 或者, 19 00:00:53,386 --> 00:00:54,721 你可以在搜尋控制台中驗證你的网站所有權。 20 00:00:55,221 --> 00:00:58,658 如果我們檢測到你在搜尋控制台中 驗證了你的网站,我們將繼續檢查 21 00:00:58,758 --> 00:00:59,526 你的網站是否準備好顯示廣告。 22 00:00:59,959 --> 00:01:03,296 第二個最佳做法是確保 你的網站可訪問。 23 00:01:03,697 --> 00:01:03,997 我們經常審核 24 00:01:04,497 --> 00:01:08,34 無法正常加載或正在宕機的網站。 25 00:01:08,335 --> 00:01:10,503 因此我們無法審核這些網站。 26 00:01:10,837 --> 00:01:14,74 確保用於註冊 Adsense 帳戶的 URL 正確無誤且全球可訪問。 27 00:01:14,841 --> 00:01:18,278 如果你的网站需要密碼才能訪問, 則不可訪問。 28 00:01:18,978 --> 00:01:21,614 如果你的网站登入需要密碼, 請考慮暫時移除登入頁面以便我們訪問。 29 00:01:22,415 --> 00:01:26,920 同時確保沒有在 robots.txt 檔案中 阻止我們的爬蟲。 30 00:01:26,986 --> 00:01:27,554 為了避免任何爬蟲問題, 31 00:01:27,721 --> 00:01:28,154 你可以通過點擊此影片描述中的幫助中心連結, 32 00:01:28,888 --> 00:01:32,592 查看更多關於你的网站為何不可訪問的詳細信息。 33 00:01:33,59 --> 00:01:36,262 最後一個最佳做法是確保 你的網站符合政策。 34 00:01:36,730 --> 00:01:39,532 請審查我們的計畫政策和內容政策。 35 00:01:40,900 --> 00:01:45,638 特別是, 36 00:01:45,872 --> 00:01:49,943 我們觀察到的三個主要違規行為將在接下來的部分突顯顯示, 37 00:01:49,943 --> 00:01:51,945 以幫助你避免它們。 38 00:01:52,112 --> 00:01:53,913 第一個違規行為是低價值內容。 39 00:01:54,581 --> 00:01:58,251 確保內容是原創且對用戶有價值。 40 00:01:58,818 --> 00:02:01,788 第二個違規行為是重複內容。 41 00:02:02,88 --> 00:02:02,722 確保你的內容是唯一的, 42 00:02:03,390 --> 00:02:07,961 而不是在不同頁面上重複出現。 43 00:02:08,28 --> 00:02:08,962 當在你的頁面上或其他網站上發現重複內容時, 44 00:02:09,295 --> 00:02:11,664 你的網站將無法獲得批准。 45 00:02:12,32 --> 00:02:14,668 第三個主要違規行為是網站導航。 46 00:02:15,235 --> 00:02:17,704 用戶需要能夠輕鬆地導航你的网站。 47 00:02:18,271 --> 00:02:21,875 可以通過使用選單欄等方式對內容進行分類來實現這一點。 48 00:02:22,8 --> 00:02:25,712 請記住,我們可能會審核你网站的所有頁面, 而不僅僅是你放置廣告代碼的註冊 URL。 49 00:02:25,712 --> 00:02:27,147 這就是為什麼確保每個頁面都有有價值的內容 50 00:02:27,714 --> 00:02:30,550 且不重複且易於導航是非常重要的。 51 00:02:30,917 --> 00:02:33,319 此外,我們建議將廣告代碼放在 52 00:02:33,620 --> 00:02:37,757 你網站上最受歡迎的頁面上, 這將觸發我們的系統識別你的廣告代碼並加速激活過程。 53 00:02:38,91 --> 00:02:41,861 最後,請確保你的网站保留在网站列表中, 54 00:02:41,861 --> 00:02:44,164 因為刪除它可能會延遲審核過程。 55 00:02:44,497 --> 00:02:48,101 總結一下, 56 00:02:48,568 --> 00:02:50,870 這裡是讓你的帳戶激活的幾個最重要的要點。 57 00:02:51,371 --> 00:02:55,542 一,準確複製廣告代碼到 Adsense 首頁上。 58 00:02:55,608 --> 00:02:58,912 二,確保你的網站可訪問。 59 00:02:59,79 --> 00:03:00,814 三,審查我們的計畫政策。 60 00:03:01,381 --> 00:03:04,184 希望這個影片能幫助你更好地了解如何讓你的網站獲得批准。 61 00:03:04,517 --> 00:03:06,886 想了解更多,你可以訪問 Adsense 幫助中心和 Adsense 62 00:03:07,220 --> 00:03:07,620 網站,通過影片描述中的連結。 63 00:03:08,121 --> 00:03:10,724 最後,請務必訂閱 Google Adsense 頻道, 64 00:03:11,291 --> 00:03:15,195 以獲取更多關於如何進一步發展你的网站的最佳做法。 65 00:03:15,695 --> 00:03:16,329 謝謝觀看。 66 00:03:16,496 --> 00:03:17,931 如果你有任何新影片的建議, 請在評論區告訴我們。
2024年5月30日 星期四
Asp.net MVC Web.config導頁設定
以下筆記一下而已
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <httpProtocol> <customHeaders> <clear /> <add name="X-UA-Compatible" value="IE=Edge" /> </customHeaders> </httpProtocol> <httpErrors> <remove statusCode="502" subStatusCode="-1" /> <remove statusCode="501" subStatusCode="-1" /> <remove statusCode="500" subStatusCode="-1" /> <remove statusCode="406" subStatusCode="-1" /> <remove statusCode="412" subStatusCode="-1" /> <remove statusCode="405" subStatusCode="-1" /> <remove statusCode="404" subStatusCode="-1" /> <remove statusCode="403" subStatusCode="-1" /> <remove statusCode="401" subStatusCode="-1" /> <error statusCode="401" prefixLanguageFilePath="" path="https://easyusingx.blogspot.com/" responseMode="Redirect" /> <error statusCode="403" prefixLanguageFilePath="" path="https://easyusingx.blogspot.com/" responseMode="Redirect" /> <error statusCode="404" prefixLanguageFilePath="" path="https://easyusingx.blogspot.com/" responseMode="Redirect" /> <error statusCode="405" prefixLanguageFilePath="" path="https://easyusingx.blogspot.com/" responseMode="Redirect" /> <error statusCode="412" prefixLanguageFilePath="" path="https://easyusingx.blogspot.com/" responseMode="Redirect" /> <error statusCode="406" prefixLanguageFilePath="" path="https://easyusingx.blogspot.com/" responseMode="Redirect" /> <error statusCode="500" prefixLanguageFilePath="" path="https://easyusingx.blogspot.com/" responseMode="Redirect" /> <error statusCode="501" prefixLanguageFilePath="" path="https://easyusingx.blogspot.com/" responseMode="Redirect" /> <error statusCode="502" prefixLanguageFilePath="" path="https://easyusingx.blogspot.com/" responseMode="Redirect" /> </httpErrors> </system.webServer> </configuration>
2024年3月1日 星期五
Asp.net MVC Razor Page Url.Action編碼問題
在Razore Page的裡面使用Url.Action
在JS內會產生連結
連結怎麼點都會錯,仔細一看&被編碼了
外面包一層Html.Raw以免被編碼
這樣連結就會正常
參考資料
Url.Action puts an & in my url, how can I solve this?
Url.Action puts an & in my url, how can I solve this?
2024年2月19日 星期一
c# Unix Timestamp轉換
近期專案接觸到很多API
發現目前大多數日期都是數字,查了一下是Unix Timestamp
寫了兩個Function來互轉
時間轉數字
[C#] 時間轉換為Unix TimeStamp
Epoch (computing)
The Current Epoch Unix Timestamp
發現目前大多數日期都是數字,查了一下是Unix Timestamp
寫了兩個Function來互轉
時間轉數字
public static double DateToDouble(DateTime? pNow = null)
{
DateTime mNow = DateTime.Now;
if (pNow != null && pNow.HasValue)
{
mNow = pNow.Value;
}
DateTimeOffset t = DateTimeOffset.Parse(mNow.ToString("yyyy-MM-dd HH:mm:ss"));
return Convert.ToDouble(t.ToUnixTimeSeconds());
}
數字轉時間
public static DateTime DoubleToDate(double? pDate = 0)
{
double d = 0;
if (pDate != null && pDate.HasValue)
{
d = pDate.Value;
}
if (d > 9999999999)
d = d / 1000;
DateTime StartComputerFirstDay = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
return StartComputerFirstDay.AddSeconds(d).ToLocalTime();
}
參考資料[C#] 時間轉換為Unix TimeStamp
Epoch (computing)
The Current Epoch Unix Timestamp
2024年1月25日 星期四
.Net Core The SSL connection could not be established, see inner exception.
在使用HttpClient時出現錯誤
後來猜想是不是TLS支援度問題
所以將程式移至另一台OS較新的Server上就可以了
The SSL connection could not be established, see inner exception.
Windows Server2012 R2不支持TLS1.3
The SSL connection could not be established, see inner exception.網路上能找的解法都用上了都沒用
後來猜想是不是TLS支援度問題
所以將程式移至另一台OS較新的Server上就可以了
Server 2012 X > Server 2016 O參考資料
The SSL connection could not be established, see inner exception.
Windows Server2012 R2不支持TLS1.3
訂閱:
意見 (Atom)












