摘要:#include "common.h" typedef struct rb_node_t rb_node_t; struct rb_node_t { rb_node_t *m_parent; rb_node_t *m_left; rb_node_t *m_right; bool m_red; int
阅读全文
摘要:#define UNICODE #include <windows.h> #include <windowsx.h> #include <stdbool.h> #include <stdio.h> typedef struct ball_t ball_t; struct ball_t { int s
阅读全文
摘要:1. 三个排序算法和红黑树, 使得念头通达 (预计时间 最多两天, 明天2024/9/20和后天), 2024/9/27晚上去深圳退房 2. Java核心技术 (预计时间, 12天, 24章) 3. Vue前端框架 (预计时间,花完整3天)
阅读全文
摘要:// 移除引用获取原始类型 template <typename _Tp> struct remove_reference { typedef _Tp type; }; template <typename _Tp> struct remove_reference<_Tp &> { typedef
阅读全文
摘要:C++完美转发解析-CSDN博客 template<typename T> void func(T&& t) { // 这里面的t始终是左引用 // (T&&)t 是万能引用(forward的实现), 实参(注意不是形参T&& t)是左引用,则是左引用,实参是右引用,则是右应用 // (typena
阅读全文
摘要:// 一元函数 template <typename _Arg, typename _Result> struct unary_function { /// @c argument_type is the type of the argument typedef _Arg argument_type
阅读全文
摘要:defaultConfig下添加 build: { minify: false, }, import { fileURLToPath, URL } from "node:url"; import { defineConfig } from "vite"; import vue from "@vite
阅读全文
摘要:#include "common.h" typedef struct rb_node_t rb_node_t; struct rb_node_t { rb_node_t* m_parent; rb_node_t* m_left; rb_node_t* m_right; bool m_red; int
阅读全文
摘要:#include "common.h" #define ASIZE(a) (sizeof(a)/sizeof(a[0])) void bunble_sort(int* a, int size) { for (int i = 0; i < size - 1; i++) { for (int j = s
阅读全文
摘要:import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.lang.reflect.Method; import java.lang.reflect.Constr
阅读全文
摘要:#include "mcu_io.h" #include "mcu_timer.h" #include "mcu_spi.h" void mcu_spi_init(mcu_spi_t* spi, uint8_t cs_pin, uint8_t clk_pin, uint8_t mosi_pin, u
阅读全文
摘要:#include "common.h" void insert_sort(int* a, int size) { for (int i = 1; i < size; i++) { int v = a[i]; // 要插入的位置 int j = i; for (int k = i - 1; k > -
阅读全文