[Flutter] 使用 shared_preferences 套件儲存 App 資料
Last Updated on 2021-10-12 by Clay
開發 App 的過程中,總難免會有需要將 App 中使用者的資料儲存下來的時候,不論是 App 的參數設定、亦或者是上次使用者最後一次使用的配置......等等。
Read More »[Flutter] 使用 shared_preferences 套件儲存 App 資料Last Updated on 2021-10-12 by Clay
開發 App 的過程中,總難免會有需要將 App 中使用者的資料儲存下來的時候,不論是 App 的參數設定、亦或者是上次使用者最後一次使用的配置......等等。
Read More »[Flutter] 使用 shared_preferences 套件儲存 App 資料Last Updated on 2021-10-12 by Clay
在設計 APP 的過程中,我們經常會有需要將元件變形便上動畫的時候。常見的一個例子,便是展開眾多的選項時,要顯示如卷軸攤開般的動畫。
Read More »[Flutter] 使用 AnimatedContainer 來將元件變形加上動畫Last Updated on 2021-10-12 by Clay
在我們使用 Flutter 來製作行動裝置 APP 時,我們經常會有著將元件『隱藏』起來、或是『顯示』出來的需求。當然,我們可以透過調整元件可視與否、調整元件的顏色、甚至刪除元件等幾種方法來做到這一點。
Read More »[Flutter] 實現元件淡出淡入效果Last Updated on 2021-10-12 by Clay
過去在某堂課上,老師突發奇想(?)要讓每位同學交一份自己撰寫的手機 APP 當作期末專題的成品;也正是在那個時候,在某位朋友的推薦下,我嘗試學習著使用 Flutter 框架進行手機 APP 的開發。
Read More »Dart 語言基本教學筆記Last Updated on 2021-10-12 by Clay
一直以來,我都有使用 PyQt5 做一些簡單的小工具供自己日常使用,在我將日常生活用的筆電從 Linux 轉到 MacOS 後,這些小工具也一直都運作得很好。
Read More »[已解決][MacOS] Big Sur 11.2.1 PyQt5 的視窗無法顯示Last Updated on 2021-10-11 by Clay
Flutter 是一套由 Google 所開發、並積極推廣的 APP 開發框架,其中是使用 Dart 語言來撰寫我們所希望實作的功能。其中,Flutter 最廣為人知的框架特性,便是你只需要『寫一份程式碼』便能同時編譯成 Android 和 iOS 上可以執行的程式。
Read More »[Flutter] 在 Android Studio 上配置 Flutter 開發環境Last Updated on 2021-10-11 by Clay
今天我在 MacOS 的系統上配置 Flutter 的開發環境時,依照 flutter docter
指令給予的建議使用以下指令:
Last Updated on 2021-02-21 by Clay
The count-and-say sequence is a sequence of digit strings defined by the recursive formula:
- countAndSay(1) = "1"
- countAndSay(n) is the way you would "say" the digit string from countAndSay(n-1), which is then converted into a different digit string.
To determine how you "say" a digit string, split it into the minimal number of groups so that each group is a contiguous section all of the same character. Then for each group, say the number of characters, then say the character. To convert the saying into a digit string, replace the counts with a number and concatenate every saying.
Given a positive integer n, return the nth term of the count-and-say sequence.
Example:
Input: n = 1
Output: "1"
Explanation: This is the base case.
Input: n = 4
Output: "1211"
Explanation:
countAndSay(1) = "1"
countAndSay(2) = say "1" = one 1 = "11"
countAndSay(3) = say "11" = two 1's = "21"
countAndSay(4) = say "21" = one 2 + one 1 = "12" + "11" = "1211"
Read More »LeetCode: 38-Count and Say 解題紀錄Last Updated on 2021-02-07 by Clay
Given a sorted array nums, remove the duplicates in-place such that each element appears only once and returns the new length.
Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.
Clarification:
Confused why the returned value is an integer but your answer is an array?
Note that the input array is passed in by reference, which means a modification to the input array will be known to the caller as well.
Example:
Input: nums = [1,1,2]
Output: 2, nums = [1,2]
Explanation: Your function should return length = 2, with the first two elements of nums being 1 and 2 respectively. It doesn't matter what you leave beyond the returned length.
題目輸入一個由小到大排序的陣列,我們需要回傳『沒有重複元素陣列長度』,並將這些沒有重複的元素移動至該陣列的開頭。
當然你可以選擇刪除掉重複的元素,但驗證時只會依照你回傳的長度進行該陣列的檢測。比方說你回傳 1,那麼驗證機制只會檢測陣列開頭第 1 個元素。
Read More »LeetCode: 26-Remove Duplicates from Sorted Array 解題紀錄Last Updated on 2021-02-07 by Clay
Given the head of a linked list, remove the nth node from the end of the list and return its head.
Follow up: Could you do this in one pass?
Example:
Input: head = [1,2,3,4,5], n = 2
Output: [1,2,3,5]
本題給定一個鏈結串列(Linked List),而我們要做的,便是將倒數第 n 個元素刪除,並回傳刪除後的 Linked List。
Read More »LeetCode: 19-Remove Nth Node From End of List 解題紀錄