摘要: 什么是函数指针 函数指针:如果在程序中定义了一个函数,那么在编译时系统就会为这个函数代码分配一段存储空间,这段存储空间的首地址称为这个函数的地址。 函数指针变量定义形式 函数返回值类型 (*函数指针变量名) (函数参数列表); 如何用函数指针调用函数 int max(int x, int y); / 阅读全文
posted @ 2020-08-19 01:09 dilex 阅读(245) 评论(0) 推荐(0) 编辑
摘要: # Simple Example ```C++ #include #include #include void print(std::string prefix, int number) { std::cout numbers; for (int i = 0; i #include #include 阅读全文
posted @ 2023-09-05 11:29 dilex 阅读(5) 评论(0) 推荐(0) 编辑
摘要: ```C++ #include int main(const int argc, const char* argv[]) { std::string strSql1 = "select * from table \ where id = 1 \ and name='name'"; std::cout 阅读全文
posted @ 2023-06-30 14:27 dilex 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <vector> 3 #include <boost/algorithm/string.hpp> 4 5 int main(const int argc, const char* argv[]) 6 { 7 std::vector<s 阅读全文
posted @ 2022-11-22 10:01 dilex 阅读(561) 评论(0) 推荐(0) 编辑
摘要: 1 def load_csv(): 2 # 从csv文件读取股票日线数据 3 file = "data/300474.csv" 4 df = pd.read_csv(file, encoding="gbk") 5 # 数据以日期升序排序 6 df.sort_values(by="日期", ascen 阅读全文
posted @ 2022-09-21 17:11 dilex 阅读(94) 评论(0) 推荐(0) 编辑
摘要: #!/bin/sh i=1 while [ $i -le 10 ] do echo $i i=$((i+1)) sleep 1 done while与方括号之间必须加一个空格; 方括号内,各参数及方括号内侧之间也需要加上空格; 阅读全文
posted @ 2021-12-30 11:24 dilex 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 空类占用1字节内存空间 #include <iostream> using namespace std; class A{}; int main() { cout << sizeof(A) << endl; return 0; } 阅读全文
posted @ 2021-12-27 15:54 dilex 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 背景 需要配置VM的硬件信息,故重启了VM,结果开机后mariadb启动失败: # systemctl restart mariadb Authorization not available. Check if polkit service is running or see debug messa 阅读全文
posted @ 2021-12-08 10:23 dilex 阅读(2974) 评论(0) 推荐(0) 编辑
摘要: 安装库 pip install openpyxl -i https://pypi.douban.com/simple/ pip install pandas -i https://pypi.douban.com/simple/ excel文件示例 python代码 import pandas as 阅读全文
posted @ 2021-11-19 17:33 dilex 阅读(1322) 评论(0) 推荐(0) 编辑
摘要: 代码如下: 1 #include <map> 2 #include <iostream> 3 using namespace std; 4 5 namespace mapext 6 { 7 template <class T> 8 struct type_traits 9 { 10 typedef 阅读全文
posted @ 2021-10-29 20:38 dilex 阅读(56) 评论(0) 推荐(0) 编辑
摘要: import time import win32api import win32clipboard import win32con timespan = 0.3 if __name__ == '__main__': win32api.ShellExecute(0, 'open', 'notepad. 阅读全文
posted @ 2021-08-31 17:31 dilex 阅读(996) 评论(0) 推荐(0) 编辑