2025年10月22日 星期三

[筆記][SDD規格驅動開發]環境建置

  • 參考:
    • https://www.youtube.com/watch?v=THpWtwZ866s
    • https://www.youtube.com/watch?v=a9eR1xsfvHg
  • 透過powershell安裝uvx
    • powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
  • 裝完重啟powershell。
  • 呼叫
    • uvx --from git+https://github.com/github/spec-kit.git specify init podsite
  • 跑完畫面就出現
    目錄下產生的檔案:一些prompt.md檔。


    2025年8月5日 星期二

    [筆記][gpt-oss][ollama]Ollama測試使用gpt-oss模型

    • 2025-08-05 OPENAI 推出gpt-oss
      • 參考:https://openai.com/zh-Hant/index/introducing-gpt-oss/
    • 可以玩看看:https://gpt-oss.com/
      • 2025-08-06 目前很慢。建議下載模型來玩...
    • Ollama已可以下載。
      • 參考:https://ollama.com/download
    安裝:






    選擇你要的模型下載使用。
    這邊選gpt-oss:20b  







    2025年6月15日 星期日

    [筆記]Line Push錯誤

    問題:發訊息在某段文字中以後會有錯誤。初判是特殊字元。長度並沒有超過發送限制。

    解法:移除  CHAR(9):Tab 字元後正常。


    2025年6月12日 星期四

    [筆記][DotNetCore] GetEncode950錯誤

     No data is available for encoding 950. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method

    • 解法:

            byte[] buffer = File.ReadAllBytes(filePath);
            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

            var ansi = Encoding.GetEncoding(950);/
            ansi.GetString(buffer);
            

    2025年5月9日 星期五

    [筆記][PHP][MCE]MCE編輯器使用nl2br語法

    • 問題:
      •  mce html editor:每次存檔都會多一行出來。
      • https://www.w3school.com.cn/php/func_string_nl2br.asp
    • 結果:
      • 內文繫結時,使用了nl2br函式。
        • 導致每次顯示都加上了<br/>之類的語法。

    2025年3月3日 星期一

    [筆記][LINEBOT]訊息事件類別event type

    參考:
    • https://developers.line.biz/en/docs/messaging-api/
    • ReceivedMessage.events[0].type
    • event.message.type


    主要事件類型:
    • message - 使用者傳送訊息(文字、圖片、影片等)。
    • follow - 使用者加為好友或解除封鎖後再次加回。
    • unfollow - 使用者封鎖機器人。
    • join - 機器人被加入群組或聊天室。
    • leave - 機器人被移出群組或聊天室。
    • memberJoined - 有新成員加入群組或聊天室。
    • memberLeft - 有成員離開群組或聊天室。
    • postback - 使用者點擊 Postback Action 按鈕(會附帶 postback.data)。
    • beacon - 使用者進入 Beacon(LINE Beacon 訊號)。
    • accountLink - 使用者點擊 LINE Login 並綁定帳號。
    • things - 來自 LINE Things (IoT 相關) 的事件。

    message 事件的子類型:
    當 type 為 message 時,還會有 message.type 來指定訊息種類,例如:
    • text - 文字訊息
    • image - 圖片訊息
    • video - 影片訊息
    • audio - 音訊訊息
    • file - 檔案訊息
    • location - 位置訊息
    • sticker - 貼圖訊息