Skip to content

Instantly share code, notes, and snippets.

View donma's full-sized avatar
:octocat:
I wanna play a game.

Donma Hsu donma

:octocat:
I wanna play a game.
View GitHub Profile
@donma
donma / ziwei-bible-demo.html
Created September 22, 2026 10:54
ZiWeiJS — 紫微斗數命盤(離線單檔 demo,雙擊即用)
<!DOCTYPE html>
<html lang="zh-TW">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<title>ZiWeiJS — 紫微斗數 Reference Engine</title>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700&family=Noto+Serif+TC:wght@400;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
<style>:root{--bg: #faf7f2;--panel: #ffffff;--panel-2: #f4f0e9;--line: #ddd5c8;--line-strong: #8a8175;--text: #2b2620;--text-sub: #6b6156;--text-faint: #a3988a;--accent: #4a3f66;--accent-2: #6b5b95;--accent-soft: #ece7f4;--gold: #8a6d1f;--malefic: #9c3d3d;--ok: #2f6f4f;--warn: #a06a1f;--danger: #a03030;--radius: 10px;--shadow: 0 1px 2px rgba(30,25,15,.05), 0 4px 14px rgba(30,25,15,.06);--font-serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", "SimSun", serif;--font-sans: "Noto Sans TC", "Source Han Sans TC", "PingFang TC", "Microsoft JhengHei", "Segoe UI", system-ui, sans-serif;--font-mono: "JetBra
<table style="width:100%; border-collapse:collapse; font-size:15px; line-height:1.7;">
<thead>
<tr>
<th style="border-bottom:2px solid #ddd; text-align:left; padding:10px;">Repo</th>
<th style="border-bottom:2px solid #ddd; text-align:left; padding:10px;">LLM</th>
<th style="border-bottom:2px solid #ddd; text-align:left; padding:10px;">GitHub</th>
<th style="border-bottom:2px solid #ddd; text-align:left; padding:10px;">Demo</th>
</tr>
</thead>
/// <summary>
/// 簡單判斷是不是質數,反正在10以內,不可能太久
/// </summary>
/// <param name="n"></param>
/// <returns></returns>
var sp = new Stopwatch();
sp.Start();
Parallel.For(1, 10, a =>
{
Parallel.For(1, 10, b =>
winget install --id Cloudflare.cloudflared
winget source update
winget source reset --force
var userType = "";
var result = userType switch
{
var t when string.IsNullOrEmpty(t) =>
new Func<string>(() => { Console.WriteLine("Default"); return "CALL_DEFAULT"; })(),
var userType = "";
var result = userType switch
{
//要使用 when 關鍵字來使用
var t when string.IsNullOrEmpty(t) => "DEFAULT",
"PLUS" => "CALL_PLUS",
"PREMIUM" => "CALL_PREMIUM",
var userType = "PREMIUM";
var result1 = userType switch
{
"PLUS" =>"CALL_PLUS",
"PREIUM" => "Call_Preium",
"Ultimate" => "Call_UTIMATE",
_ => "CALL_DEFAULT",