按下F5

@SupportCoding

這個團體名稱源自於在程式開發時常用的重新整理快捷鍵,象徵著不斷優化、更新自己的程式技能。

Public team

Joined on Sep 8, 2021

Before software can be reusable it first has to be usable.

  • 運算式(Expression)有三種表示方式:中序式(Infix)、前序式(Prefix)、後序式(Postfix)。 一般我們算數學時看到的表達式 A * (B + C) / D,我們知道括號優先算,再來先乘除後加減,這樣的表達式叫(中序Infix)。對於電腦或編譯器來說,解析過於複雜的中序是有難度的,所以有了前序及後序。 中序如何轉換成前序或後序?記住兩個要點 前序就是將運算元移動貼到==左括號==。例如(A+B) => (+AB) 後序就是將運算元移動貼到==右括號==。例如(A+B) => (AB+) 題目一:將 A + B * (C + D) + E / F 轉為前序及後序。 先把運算式所有隱藏的括號加上去,會得出
     Like  Bookmark
  • 大綱 Pinia簡介 Pinia & Vuex Pinia架構 創建Store Pinia簡介 可跨元件/頁面共享狀態 支援Vue2和Vue3 TypeScript支援
     Like  Bookmark
  • 介紹 氣泡排序是反覆進行將相鄰數字做比較後重新排序,因排序時一個一個浮出序列頂部,很像水中泡泡浮起來的樣子,亦稱泡泡排序,最壞情況下,數是由大排到小,每次比較後將數值對調,因此,時間複雜度為O(n^2)。 圖片來源 虛擬碼 function bubble_sort (array, length) { var i, j; for(i from 0 to length-1){ for(j from 0 to length-1-i){
     Like 1 Bookmark
  • Object-Oriented Programming (OOP) Q1. What is an example of dynamic binding? [ ] any method [ ] method overloading [x] method overriding [ ] compiling Q2. For which case would the use of a static attribute be appropriate? [ ] the number of people in each house in a small neighborhood [ ] the lot size for each house in a small neighborhood
     Like 1 Bookmark
  • 介紹 滑動視窗協定 有學過計概都知道Sliding window protocol(滑動視窗協定),Stop and Wait 一次只能傳一個封包,而 Sliding Window 則可以一次傳送一批封包,使用滑動窗口方法可以避免網路上的流量壅塞。由於傳送方(Sender)和接收方(Receiver)的 TCP 實作了封包緩衝區的滑動窗口,應用層仍將提供資料以傳輸到 TCP,而不必擔心網路流量壅塞問題。 窗口大小可能會根據網路流量動態變化,如果在通訊路徑的錯誤非常少,則可增加窗口的大小,以增加資料吞吐量。反之,則減少窗口的大小,以確保資料完整性而且維持吞吐量。 有興趣了解可以參考此影片 滑動視窗演算法
     Like 3 Bookmark
  • 同一個演算法在不同等級的電腦上跑,效率可能會有所不同,我們可以透過比較科學的方式,就是計算時間複雜度(Time Complexity)與空間複雜度(Space Complexity)來判斷演算法好壞。 時間複雜度 衡量程式執行的速度 介紹 時間複雜度可以使用Big O Notation來展示複雜度的趨勢,Big-Ο代表演算法時間函式的上限(Upper bound),而在最壞的狀況下,演算法的執行時間不會超過Big-Ο。 那該如何計算Big O Notation,有三個規則:
     Like 2 Bookmark
  • (圖片來自於The Algorithm of an Algorithm) 演算法(Algorithm)是一種按照指定步驟解決問題的方法。它是用來解決一組特定的問題,並且能夠被程式設計師程式化實現。演算法在計算機科學、數學以及其他科學領域都有廣泛的應用。 演算法通常由一系列有順序的指令組成,每一步都是對問題進行分析或操作。演算法必須是清晰明確的,並且可以在有限的時間內達到目的。正確性、可行性和效率是評估演算法的三個主要標準。 正確性指的是演算法必須正確地解決問題,不存在錯誤的情況。可行性指的是演算法必須在可接受的時間內達到目的,並且沒有無限循環的情況。效率指的是演算法所花費的時間和空間是否是可以接受的。 演算法可以通過算法設計方法來改進,以提高效率和正確性。有許多常見的演算法,如排序、搜索、數學運算等。不同的演算法適用於不同的問題,選擇合適的演算法是解決問題的關鍵。
     Like  Bookmark
  • 介紹 最小生成樹(Minimum Spanning Tree,MST)是指在一個帶權無向圖中,找到一棵包含所有節點,權值最小的樹。其中,權值是指樹中所有邊權重的總和。 那甚麼是有向圖甚麼是無向圖? 無向圖 (圖片取自於wiki) 無向圖是指其中的邊沒有方向,也就是連接兩個節點的邊沒有特定的起點和終點。 以生活例子舉例,社交軟體中用戶之間的關係就可以用無向圖表示,用戶之間的好友關係,每個用戶可以視為一個節點,而好友關係可以視為無向邊。
     Like  Bookmark
  • C# Q1. In which of these situations are interfaces better than abstract classes? [ ] When you need to define an object type's characteristics, use an interface. When you need to define an object type's capabilities, use an abstract class. [ ] Interfaces are a legacy of older versions of C#, and are interchangeable with the newer abstract class feature. [x] When you need a list of capabilities and data that are classes-agnostic, use an interface. When you need a certain object type to share characteristics, use an abstract class. [x] You should use both an interface and an abstract class when defining any complex object. Q2. Which statement is true of delegates? [x] Delegates are not supported in the current version of C# [x] They cannot be used as callbacks.
     Like  Bookmark
  • 國內線上影音 六角學院 https://www.hexschool.com/ Hahow好學校 https://hahow.in/ Hiskio https://hiskio.com/
     Like  Bookmark
  • 🤖Eazy 🗞 217. Contains Duplicate 包含重複項 🗞 350. Intersection of Two Arrays II 兩個陣列的交集 🗞 566. Reshape the Matrix 重塑矩陣 🗞 118. Pascal’s Triangle 巴斯卡三角形 🗞 387. First Unique Character in a String 字串中的第一個唯一字元 🗞 242. Valid Anagram 有效字謎 🏄🏻‍♂️Medium
     Like  Bookmark
  • 😗Eazy 🗞 175. Combine Two Tables 🗞 181. Employees Earning More Than Their Managers 🗞 182. Duplicate Emails 🗞 184. Department Highest Salary 🗞 197. Rising Temperature 🗞 511. Game Play Analysis I 🗞 586. Customer Placing the Largest Number of Orders 🗞 596. Classes More Than 5 Students 🗞 607. Sales Person
     Like  Bookmark
  • Rearrange Products Table 透過leetcode 1327List the Products Ordered in a Period來練習 題目說明: 撰寫一個 SQL 查詢,以獲取在 2020 年 2 月至少訂購了一定數量100的產品名稱和其金額。 返回的結果表可以按任意順序排列。 其中,product_name 是產品名稱,total_amount 是在 2020 年 2 月至少訂購了一定數量的該產品的總金額。 解題:
     Like  Bookmark
  • 介紹 ![](https://i.imgur.com/YqaNtKj.jpg =45%x) Huffman 編碼是一種常用的數據壓縮算法,由 David A. Huffman 在 1952 年發明。它通過對字符出現的頻率進行編碼,將出現頻率高的字符用較短的位元串(Bit Strings)表示,而出現頻率低的字符用較長的位元串(Bit Strings)表示,從而實現對數據的壓縮。 Huffman 編碼是一種基於貪心算法的編碼方法,它首先根據字符頻率構建一棵 Huffman 樹,然後對每個字符進行編碼。構建 Huffman 樹的過程中,可以使用 Min Heap 來維護節點,每次從 Heap 中取出頻率最小的兩個節點合併成一個新節點,直到 Heap 中只剩下一個節點,即 Huffman 樹的根節點。 Huffman 編碼採用前綴編碼(prefix code)方式,保證了編碼的唯一性和無歧義性。在解碼時,從 Huffman 樹的根節點開始遍歷,遇到 0 就進入左子樹,遇到 1 就進入右子樹,直到葉子節點,即可得到原始字符。 由於 Huffman 編碼採用變長編碼,可以在一定程度上減少數據存儲所需的空間,從而減少數據傳輸所需的帶寬和存儲空間。因此,Huffman 編碼被廣泛應用於無損數據壓縮(Lossless compression)領域,如圖像、音頻、視頻等。
     Like  Bookmark
  • ⛄ Introduction 🙈 何謂演算法 🙉 時間複雜度 與 空間複雜度 ✔ 排序Sorting <img src="https://pic.sopili.net/pub/emoji/twitter/2/72x72/2600.png" width=20 height=20> 氣泡排序(Bubble Sort) <img src="https://pic.sopili.net/pub/emoji/twitter/2/72x72/1f324.png" width=20 height=20> 插入排序(Insertion Sort) <img src="https://pic.sopili.net/pub/emoji/twitter/2/72x72/26c5.png" width=20 height=20> 選擇排序(Selection Sort) <img src="https://pic.sopili.net/pub/emoji/twitter/2/72x72/1f325.png" width=20 height=20> 合併排序(Merge Sort) <img src="https://pic.sopili.net/pub/emoji/twitter/2/72x72/1f326.png" width=20 height=20> 堆積排序(Heap sort)
     Like  Bookmark
  • 介紹 Priority Queue是一種特殊類型的資料結構,其中每個元素都有一個與之關聯的優先級或權重,並且根據其優先級來決定存取和刪除元素的順序。不同於一般的佇列(Queue),Priority Queue不一定是先進先出(FIFO)的,而是根據元素的優先級來決定處理的順序。 優先級該如何比較? 優先級通常根據事先定義的比較函數(Comparator)或物件本身的內部屬性來決定,並且越小或越大的元素視為優先級越高,取決於具體的實現方式。 Priority Queue在許多應用場景中都是非常有用的,例如作業系統中的進程調度、路由協議中的路徑選擇、圖形算法中的最小生成樹、現實生活中醫院急診室中的病人。 Priority Queue通常支持以下基本操作: 插入(Insertion):將一個新的元素插入到Priority Queue中,並根據其優先級進行排序。 刪除最大/最小元素(Deletion):刪除Priority Queue中具有最高/最低優先級的元素,並返回其值。
     Like  Bookmark
  • 🎨語言 C# Java Javascript PHP Python 🗄資料庫 MySQL NoSQL
     Like  Bookmark
  • NoSQL Q1. Which types of indexes are available in CosmosDB? [x] range and spatial [ ] secondary and primary key [ ] secondary and spatial [ ] range and primary key Q2. You want to connect a DynamoDB stream to AWS Lambda function. Which one of these object do you create? [ ] DynamoDB table [x] DynamoDB trigger
     Like  Bookmark
  • MySQL Q1. When you have a subquery inside of the main query, which query is executed first? [ ] The subquery is never executed. Only the main query is executed. [ ] They are executed at the same time [ ] the main query [x] the subquery Q2. You need to export the entire database, including the database objects, in addition to the data. Which command-line tool do you use? [ ] mysqlexport [ ] mysqladmin
     Like  Bookmark
  • Node.js Q1. When a javaScript function is invoked (called) in Node, where is a new frame placed? [x] the call stack [ ] the event loop [ ] the poll phase [ ] the events queue Explanation: From javascripttutorial: reference Q2. Which of the following is a core module in Node?
     Like  Bookmark