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
| /// <summary> | |
| /// 簡單判斷是不是質數,反正在10以內,不可能太久 | |
| /// </summary> | |
| /// <param name="n"></param> | |
| /// <returns></returns> |
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
| var sp = new Stopwatch(); | |
| sp.Start(); | |
| Parallel.For(1, 10, a => | |
| { | |
| Parallel.For(1, 10, b => |
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
| winget install --id Cloudflare.cloudflared | |
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
| winget source update | |
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
| winget source reset --force | |
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
| var userType = ""; | |
| var result = userType switch | |
| { | |
| var t when string.IsNullOrEmpty(t) => | |
| new Func<string>(() => { Console.WriteLine("Default"); return "CALL_DEFAULT"; })(), |
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
| var userType = ""; | |
| var result = userType switch | |
| { | |
| //要使用 when 關鍵字來使用 | |
| var t when string.IsNullOrEmpty(t) => "DEFAULT", | |
| "PLUS" => "CALL_PLUS", | |
| "PREMIUM" => "CALL_PREMIUM", |
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
| var userType = "PREMIUM"; | |
| var result1 = userType switch | |
| { | |
| "PLUS" =>"CALL_PLUS", | |
| "PREIUM" => "Call_Preium", | |
| "Ultimate" => "Call_UTIMATE", | |
| _ => "CALL_DEFAULT", |
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
| ngrok http 5021 | |
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
| ngrok config add-authtoken $YOUR_AUTHTOKEN | |
NewerOlder