This file contains hidden or 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
<!-- | |
Material UI Textfield</h3> | |
以 Tailwind CSS 為基底實作 Material UI TextField。<br/> | |
ref→[Material UI Textfield - By wan54](https://tailwindcomponents.com/component/material-ui-textfield-1) | |
--> | |
<!DOCTYPE html> | |
<html> | |
<head> |
This file contains hidden or 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
using System; | |
using System.Net; | |
using System.Web; | |
using System.Web.Helpers; | |
using System.Web.Mvc; | |
using YourProject.DB; | |
using YourProject.Models; | |
namespace YourProject | |
{ |
This file contains hidden or 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
§§ Ubuntu/Linux 常用指令 | |
## su | |
切換成 super user。 | |
## sudo | |
## ls: 列出檔案清單 | |
ls -l | |
列出現在目錄的檔案清單與授權授權狀況。 | |
ls -la |
This file contains hidden or 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
void GenerateBig5File(List<YourInfo> dataList) | |
{ | |
try | |
{ | |
// register and get Big5 Encoding | |
System.Text.Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); // 註冊Big5等編碼 | |
Encoding big5Enc = Encoding.GetEncoding(950); | |
//## 暫寫入記憶體檔 | |
using var ms = new MemoryStream(); |
This file contains hidden or 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
### 用 PowerShell 建立新的 Eventlog | |
# ※需有管理員權限才能建立 EventLog。 | |
New-EventLog -source MyEventSource -LogName MyApplication |
This file contains hidden or 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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace conShortSession | |
{ | |
class Program |
This file contains hidden or 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
using Microsoft.Extensions.DependencyInjection; | |
using System; | |
namespace Vista.Biz.AOP | |
{ | |
/// <summary> | |
/// Add static service resolver to use when dependencies injection is not available | |
/// ref → [Resolving instances with ASP.NET Core DI in static classes](https://www.davidezoccarato.cloud/resolving-instances-with-asp-net-core-di-in-static-classes/) | |
/// 請在 Startup 把 IServiceProvider 註冊進來使用。 | |
/// </summary> |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Page Title</title> | |
</head> | |
<body> | |
<h1>This is a Heading</h1> | |
<p>This is a paragraph.</p> | |
<p id="message">Click on this document to give it focus.</p> |
This file contains hidden or 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
/// | |
/// ref->[Aes 類別](https://docs.microsoft.com/zh-tw/dotnet/api/system.security.cryptography.aes?view=net-6.0) | |
/// | |
using System; | |
using System.IO; | |
using System.Security.Cryptography; | |
using System.Text; | |
using System.Text.Json; |
This file contains hidden or 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
record MyInfo | |
{ | |
public string foo { get; set; } | |
public string bar { get; set; } | |
public decimal abc { get; set; } | |
} | |
var info = new MyInfo { | |
foo = "FOO 123.456", | |
bar = "我是中文字", |