原创 【Zig】Zig 中 Hash 的使用,如 Md5、Sha1

Zig 中做Md5 和 Sha1 之類的Hash 非常簡單的,現在支持Hash 算法有,blanke2、Blanke3、Gimli、Md5、Sha1、sha2、sha3,還有一個 組合 composition。 Md5 pub fn md5

原创 【Electron】使用 build-tools 在 Windows 中編譯 electron

【Electron】使用 build-tools 在 Windows 中編譯 electron 提前準備 預留好磁盤空間 Git 緩存目錄:%UserProfile%/.git_cache ,大概有 16G。 electron_buil

原创 【Electron】在 WSL2 中 打包 electron Linux 版本

【Electron】在 WSL2 中 打包 electron Linux 版本。 安裝 WSL 我使用的是 Ubuntu 20.04.4 LTS 的版本。 安裝 WSL 文檔地址:https://docs.microsoft.com/zh-

原创 【Electron】Electron Icon 圖標說明、及常見問題

【Electron】Electron Icon 圖標說明、及常見問題 其實各種打包模塊都有相關的文檔說明,相關鏈接如下: electron-builder:https://www.electron.build/icons.html elec

原创 【Win10】UAP/UWP/通用 開發之 SplitView

[Some information relates to pre-released product which may be substantially modified before it's commercially released.

原创 【Win10】UAP/UWP/通用 開發之 x:Bind

[Some information relates to pre-released product which may be substantially modified before it's commercially released.

原创 【Win10】UAP/UWP/通用 開發之 RelativePanel

[Some information relates to pre-released product which may be substantially modified before it's commercially released.

原创 【Flutter】Flutter C/C++ 插件的開發 (支持 windows、macos、ios、android )

一個各平臺調用 C/C++ 源碼的例子,如何共享代碼,配置相關的編譯 官方的例子:https://docs.flutter.dev/development/platform-integration/c-interop 源碼地址:https:

原创 【Electron】electron-builder 打包nsis時,設置URL Protocol

問題 electron-builder使用nsis打包,安裝時不會設置URL Protocol。 解決方法 自定義nsis 腳本 electron-builder 可以自定義打包腳本 https://www.electron.build/c

原创 【Electron】windows中使用 check-disk-space 獲取磁盤空間碰到兩個問題

windows上 使用 check-disk-space 獲取磁盤空間碰到兩個問題 在用戶端碰到兩個問題 無法找到wmic命令。 提示"不是內部或外部命令,也不是可運行的程序"等 可以在執行前配置PATH中包含 %SystemRoot%/S

原创 【Typescirpt】定義數字範圍類型

數字範圍參數 有的時候我們想定義一個參數的數字範圍,如果範圍比較小點好,比如1到5。 type Range = 1 | 2 | 3 | 4 | 5 ; 但如果數字範圍很大,比如 1到100,或是1到1000,那就要寫死了。 支持現狀 Gi

原创 Windows、Mac 命令行啓動程序(爲了查看Electron打包後主進程日誌)

原因 最近碰有人問怎麼查看主進程日誌,簡單寫一下windows、mac如何啓動了。主要是面向新手、老手自動滑過吧 啓動方式 Windows 啓動命令行 Powershell 或 CMD 進入到程序的安裝目錄。以XMind Zen 爲例: #

原创 Electron-Builder 打包Nsis,安裝後自動運行程序

需求,想要的功能 默認 Program Files 或 Program Files(x86) 可以選擇安裝目錄 安裝後自動運行程序 electorn-builder nsis配置,如下: { oneClick: false,

原创 基於uiautomator2 安裝 app,處理adb install 未知來源 風險管控的一個方式

有些手機可以通過adb直接安裝 app,但有些手機會提示風險提示,有的還要求輸入密碼等(oppo、vivo) 正常基於uiautomator2 安裝一個app import uiautomator2 as u2 import os d =

原创 【AspNetCore】【WebApi】擴展Webapi中的RouteConstraint中,讓DateTime類型,支持時間格式化(DateTimeFormat)

擴展Webapi中的RouteConstraint中,讓DateTime類型,支持時間格式化(DateTimeFormat) 一、背景 大家在使用WebApi時,會用到DateTime爲參數,類似於這樣: //url: xxx/2016-0