XpandNotes

exploring the intersection of technology and creativity

FreeRTOS Lab 2: 走訪 Tasklist 並實作 task monitor

環境: wnidows 10, STM32CubeIDE 1.8.0 開發板: stm32f407g 環境設定 參照 在 stm32f407g 使用 uart設置好 uart4。 接下來編輯 .ioc 檔案 將 PD12 到 PD15 設為 GPIO_Output,Label 設為 led_green、led_orange、led_red、led_blue。 接下來設置...

FreeRTOS Lab 1: Task 與 Queue

環境: wnidows 10, STM32CubeIDE 1.8.0 開發板: stm32f407g 環境設定 首先編輯 .ioc 檔案 將 PA0 設為 GPIO_Input,並且將 PA0 的 Label 設為 btn_blue。 將 PD12 到 PD15 設為 GPIO_Output,Label 設為 led_green、led_orange、led_red、led...

在 Ubuntu 20.04 編譯 MariaDB 原始碼

此篇筆記參考官方文件與個人實測所撰寫,安裝當下的 MariaDB 版本為 10.9。 從原始碼安裝 MariaDB $ sudo apt install -y build-essential bison $ sudo apt build-dep mariadb-server 此時你可能會遇到以下錯誤: E: You must put some 'source' URIs in yo...

在 stm32f407g 使用 uart

環境: wnidows 10, STM32CubeIDE 1.8.0 在這個教學將透過 PA0 和 PA1 腳位來使用 uart4。 專案初始化 首先在 CubeIDE 新增 stm32f407g 的專案,將專案命名為 uart_test。 設定 RCC 中的 High Speed Clock 與 Low Speed Cock。 設定 SYS 的 Debug 與 Timeb...

Leetcode #70 Climbing Stairs

Description You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? Example 1: Input: n...

Leetcode #21 Merge Two Sorted Lists

Description You are given the heads of two sorted linked lists list1 and list2. Merge the two lists in a one sorted list. The list should be made by splicing together the nodes of the first two l...

Leetcode #206 Reverse Linked List

Description Given the head of a singly linked list, reverse the list, and return the reversed list. Example 1: Input: head = [1,2,3,4,5] Output: [5,4,3,2,1] Constraints: The number of nodes...

Leetcode #20 Valid Parentheses

Description Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed ...

Leetcode #102 Binary Tree Level Order Traversal

Description Given the root of a binary tree, return the level order traversal of its nodes’ values. (i.e., from left to right, level by level). Example 1: Input: root = [3,9,20,null,null,15,7]...

Graph Theory Homework 1

1. Prove or disprove: 9, 6, 5, 5, 3, 3, 2, 1, 1 are the vertex degrees of some graph. Each edge contributes one degree to each of its two endpoints, therefore $\Sigma_{v \in V(G)}d(v)=2e(G)$, whic...