原创 C++17 知識彙集欄

【去掉臨時對象】C++ 17 最大的改變——Guaranteed copy elision 【內存對齊】Dynamic memory allocation for over-aligned data 【結構化綁定】C++17嚐鮮:結構化綁

原创 計算機基礎知識收集

https://mp.weixin.qq.com/s/S5RT5vbr9fzySpih1uhk_g

原创 C++17 結構綁定

#include <iostream> #include <set> #include <tuple> using namespace std; int main(int argc, char **argv) { set<int

原创 C++17 增強auto規則

#include <iostream> using namespace std; int main(int argc, char **argv) { auto x{1}; cout << "x = " << x << endl

原创 C++17之if constexpr

#include <iostream> using namespace std; template<typename T> auto get_value(T t) { if constexpr(std::is_pointer_v<

原创 Python之類的創建

class TheThing(object): """ __init__ 函數 用於創建內部變量 """ def __init__(self): self.number = 0 """

原创 curl學習資源收集

https://man.linuxde.net/curl

原创 Qt代碼之改變形狀的對話框

一、designer之ui 二、頭文件之sortdialog.h #ifndef DIALOG_H #define DIALOG_H #include <QDialog> #include "ui_sortdialog.h" cl

原创 閱讀代碼的方式

1. 從前向後。 2. 從後向前。 3. 逆時針方向。  

原创 Python字符串文本處理

表示:雙引號""或單引號'' 格式化:%s 格式化多個變量:(變量1,變量2,...,變量n) x = "There are %d types of people." % 10 binary = "binary" do_not = "

原创 可變字符串(Python)

import io a = "test txt" sio = io.StringIO(a) print(sio.getvalue()) sio.seek(4) sio.write("abc") print(sio.getvalue(

原创 列表-list(Python)

range: 推導式創建序列 元素增加append 拼接 extend insert 刪除元素del pop remove 訪問 索引index 成員資格判斷: 計數count in

原创 基本數據類的範圍

越簡單的東西越容易出錯。 unsigned   int   0~4294967295   int   2147483648~2147483647 unsigned long 0~4294967295 long   2147483648~2