# 建立Image
docker build -t image -f docker/Dockerfile.dev .
# 運行
docker run -it --rm --name containerName -p 8080:8080 -v .:/app image
Follow Fang!
試著突破低點,往高點邁進
2025/05/27
用 Docker 建立 Vue.js 開發環境:簡單一步啟動 npm run serve
2025/04/30
用一行指令搞定 Git 歷史中的大檔案:git lfs migrate import
用一行指令搞定 Git 歷史中的大檔案:git lfs migrate import
如果你曾經在推送 Git 專案到 GitHub 時遇到以下錯誤訊息:
remote: error: File opencv2.framework/Versions/A/opencv2 is 236.31 MB; this exceeds GitHub's file size limit
remote: error: GH001: Large files detected. You may want to try Git Large File Storage
那麼你就遇到 GitHub 強制限制:單一檔案不可超過 100MB。而這個限制,不只是針對目前版本的檔案,就算該檔案只曾出現在 Git 歷史中一次,也會導致整個 Push 被拒絕。
常見的錯誤誤解
2025/03/27
Using C# Reflection to Get Public Method Call Count
用法:
class Program
{
public static void SampleMethod()
{
Console.WriteLine("Hello World!");
AnotherMethod();
}
public static void AnotherMethod()
{
Console.WriteLine("This is another method.");
}
static void Main(string[] args)
{
// 取得 SampleMethod 的 MethodInfo
MethodInfo sampleMethodInfo = typeof(Program).GetMethod("SampleMethod");
// 分析方法內的呼叫次數
int callCount = MethodUtils.AnalyzeMethodCalls(sampleMethodInfo);
Console.WriteLine($"SampleMethod has {callCount} method calls inside it.");
}
}
2025/03/21
Windows 11 配置 Claude Desktop MCP
簡介
多點 Claude Desktop MCP 是一款高效能且高度可擴展的人工智慧模型運行平台,旨在支援多點操作與併行處理,適用於開發、測試與生產環境。此平台能夠透過多點控制 (Multi-Point Control, MCP) 提供更靈活的資源調度與管理能力,大幅提升效能與穩定性。
Model Context Protocol (MCP)
MCP(Model Context Protocol)是一種用於人工智慧模型運行環境的標準化協議,旨在協調多個模型、模組或應用程式之間的互動與資料交換。MCP 提供了一個統一的協作框架,使各個元件能夠在多點控制環境中高效運行。
在 Claude Desktop MCP 中,MCP 被應用於:
- 調整資源配置:允許動態分配 CPU、記憶體與網路資源,以符合不同模型的需求。
- 資料同步與管理:確保多點操作中的資料一致性與安全性。
- 通訊協議設計:標準化不同元件之間的通訊格式與資料協定。
- 併行處理架構:支持多個模型同時運行並協調結果輸出。
MCP 支援的應用程式 (MCP Clients)
以下是支援 MCP 的一些應用程式與工具:
- Claude 桌面應用程式:提供對 MCP 的全面支援,允許深度整合本地工具和資料來源。
- 5ire:支援 MCP 的工具功能,允許 AI 模型執行特定任務。
- BeeAI 框架:在代理工作流程中支援 MCP 的工具功能。
- Cline:支援 MCP 的工具和資源功能,增強了 AI 的操作能力。
- Continue:全面支援 MCP 的所有功能,提供完整的整合體驗。
特點
- 支援多點操作與併行處理
- 高效能模型運行與資源管理
- 友善的圖形化操作介面
- 高度可擴展的組態檔配置系統
- 支援自訂測試工具與模組開發
2025/03/14
透過CloudFlare GraphQL 取得SubDomain國家來源數據
權限要給Zone/Logs & Analytics
curl -X POST "https://api.cloudflare.com/client/v4/graphql" ^
-H "Authorization: Bearer YourToken" ^
-H "Content-Type: application/json" ^
--data "{ \"query\": \"query { viewer { zones(filter: { zoneTag: \\\"YourZoneID\\\" }) { httpRequestsAdaptiveGroups( limit: 1000, filter: { clientRequestHTTPHost: \\\"YourSubDomain\\\", datetime_geq: \\\"2025-03-13T00:00:00Z\\\", datetime_lt: \\\"2025-03-14T00:00:00Z\\\" }, orderBy: [count_DESC] ) { dimensions { clientCountryName } count sum { edgeResponseBytes } } } } }\" }"
訂閱:
文章 (Atom)