随笔分类 -  编程语言/IDE

摘要:用pip安装matplotlib时,因超时而安装失败: pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed 阅读全文
posted @ 2022-07-22 09:43 無常 阅读(182) 评论(0) 推荐(0)
摘要:ax2 = ax.twinx() ax2.plot(labels,men_means,color="red",marker="o",label="庐阳区") 使用ax2.plot()函数画出来的折线使用的为右边纵轴 阅读全文
posted @ 2022-05-13 21:50 無常 阅读(906) 评论(0) 推荐(0)
摘要:cmake的help可以帮助我们查询陌生命令和变量 未知命令,以“cmake_minimum_required”为例: cmake --help-command cmake_minimum_required 未知变量,以“CMAKE_BUILD_TYPE”为例: cmake --help-varia 阅读全文
posted @ 2022-04-22 17:20 無常 阅读(207) 评论(0) 推荐(0)
摘要:char *strtok(char *str, const char *delim) 参数 str -- 要被分解成一组小字符串的字符串。 delim -- 包含分隔符的 C 字符串。 返回值 该函数返回被分解的第一个子字符串,如果没有可检索的字符串,则返回一个空指针。 阅读全文
posted @ 2022-02-23 09:14 無常 阅读(454) 评论(0) 推荐(0)
摘要:VS: arr_name,10 VSCode: *arr_name@10、 *(int(*)[10])arr_name Clion: *arr_name@10、 *(int(*)[10])(arr_name)、(MyType [128])arr_name 阅读全文
posted @ 2021-11-28 20:49 無常 阅读(567) 评论(0) 推荐(0)
摘要:用std::cout.precision() 和 std::cout.setf() 函数 double num = 1234567.1234567; std::cout << num << "\n"; std::cout.setf(std::ios::fixed, std::ios::floatfi 阅读全文
posted @ 2021-09-05 16:26 無常 阅读(894) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/zsr0401/p/6405677.html 阅读全文
posted @ 2021-02-25 21:14 無常 阅读(118) 评论(0) 推荐(0)
摘要:qsort()函数是ANSI C标准中提供的,在<stdlib.h>头文件中 是根据二分法写的,时间复杂度为:n*log(n) 原型:void qsort(void *base, size_t nelem, size_t width, cmp) base:为要排序的数组 nelem:为排序数组的长度 阅读全文
posted @ 2021-01-23 11:18 無常 阅读(223) 评论(0) 推荐(0)
摘要:注:(1)控制坐标轴显示刻度用到了库:matplotlib.ticker,可能需要安装一下(如果小伙伴有更好的方法,可以留言交流一下) (2)主要用到的函数matplotlib.pyplot.subplots,别忘了加“s” import numpy as np import matplotlib. 阅读全文
posted @ 2021-01-03 19:31 無常 阅读(1734) 评论(0) 推荐(0)
摘要:switch(表达式) { case 常量表达式1:语句1; break; case 常量表达式2:语句2; break; case 常量表达式3:语句3; break; ... default:语句n; break; } 1.default无论放在case前面还是后面都是执行完case后再执行de 阅读全文
posted @ 2020-12-29 12:15 無常 阅读(1928) 评论(0) 推荐(0)
摘要:这个代码主要是我同门写的,我在这里整理一下。 import math import matplotlib.pyplot as plt ax = plt.subplot(111, projection='polar') # projection='polar'-->设为极坐标 ax.set_theta 阅读全文
posted @ 2020-12-19 11:34 無常 阅读(1991) 评论(0) 推荐(0)
摘要:plt.legend(loc='String or Number', bbox_to_anchor=(num1, num2)) 其中,第一个参数loc,设置它可以遵循以下的表格 StringNumber upper right 1 upper left 2 lower left 3 lower ri 阅读全文
posted @ 2020-11-22 20:57 無常 阅读(6314) 评论(0) 推荐(0)
摘要:在‘timespec’前面加上struct struct timespec 阅读全文
posted @ 2020-11-07 13:44 無常 阅读(398) 评论(0) 推荐(0)
摘要:double antdel[2][3]; /* antenna delta {{rov_e,rov_n,rov_u},{ref_e,ref_n,ref_u}} */ void antmodel_g(int sat, const pcv_t *pcv, const double (*antdel)[3 阅读全文
posted @ 2020-11-07 13:28 無常 阅读(369) 评论(0) 推荐(0)
摘要:添加头文件 #include<stdbool.h> 阅读全文
posted @ 2020-11-07 13:18 無常 阅读(1302) 评论(0) 推荐(0)
摘要:字符串和字符串数组声明和初始化 char buff[1024] = {'\0'}; char *str1; 字符串和字符串数组间的转化 /* 字符数组可以直接转字符串,但字符串不能直接转字符数组 */ char buff[1024] = "successing to read the file!"; 阅读全文
posted @ 2020-11-05 19:42 無常 阅读(227) 评论(0) 推荐(0)
摘要:linux下一般都用gcc(编译)+gdb(调试)+vim(编辑),向我这种弱鸡用IDE(Integrated Development Environment)集成开发环境clion 在clion下调试代码,需要编辑CMakeLists.txt文件,用CMakeLists.txt文件中的CMake命 阅读全文
posted @ 2020-10-09 13:22 無常 阅读(1545) 评论(0) 推荐(0)