0%

前言

筆者在 Laravel 開發 API 應用時,

有遇到 Route 無法正常解析,導致網頁導向請求一直失敗的情況。

那時候真的是摸不清問題在哪,於是便有了整理此篇文章的想法,

這篇文章將針對 路由無法正常運作 問題,提供 3 個排查步驟,希望能幫到同樣有困難的人。

閱讀全文 »

前言

使用Discord也有段很長的時間了,使用過各式各樣的群組Bot,

好的群組Bot可以替群組增加許多有趣功能,增添社群的趣味性,

筆者身為工程師也想做一個出來,至少資料都看得到存在哪,不會因為哪天服務停止就全消失了。

此篇文章不會深入如何從 Discord 開發者模式去創建新Bot,僅開發完成的功能進行說明。

閱讀全文 »

題目說明

Implement a SnapshotArray that supports the following interface:

  • SnapshotArray(int length) initializes an array-like data structure with the given length. Initially, each element equals 0.
  • void set(index, val) sets the element at the given index to be equal to val.
  • int snap() takes a snapshot of the array and returns the snap_id: the total number of times we called snap() minus 1.
  • int get(index, snap_id) returns the value at the given index, at the time we took the snapshot with the given snap_id
閱讀全文 »