- 博客(70)
- 问答 (1)
- 收藏
- 关注
原创 【2026年4月】FusionXpark GB10 本地部署 Qwen3.6-35B-A3B详细流程
摘要 本文详细记录了在超聚变FusionXpark GB10服务器上部署千问团队开源的Qwen3.6-35B-A3B大语言模型的全过程。硬件配置采用NVIDIA Grace Blackwell架构的GB10服务器,配备6144 CUDA Core和128GB内存。部署过程主要包含七个步骤:1)使用conda创建Python3.10虚拟环境;2)检查CUDA环境;3)安装适配Blackwell架构的PyTorch12.8版本;4)安装vLLM推理框架时遇到的PyTorch版本冲突问题;5)重新强制安装
2026-04-23 15:19:23
1767
1
原创 Flink-2.0.0在配置文件中修改.pid文件存储位置及其他默认参数
Apache Flink 2.0.0版本配置文件发生重大变化,原有flink-conf.yaml被config.yaml取代。新版本支持标准YAML 1.2语法,配置文件分为conf/config.yaml和bin/config.sh两部分。修改.pid文件存储位置需在bin/config.sh中调整DEFAULT_ENV_PID_DIR参数,该参数仅在config.yaml未配置时生效。建议初学阶段在config.sh中修改参数,但长期使用应掌握config.yaml配置方法。
2025-10-31 15:54:01
262
原创 python 3.10安装Box2D遇到的问题及解决办法汇总
近期在入门强化学习,安装Box2D的过程遇到很多问题,网上资料比较分散,本人查阅了许多资料才得以解决,将问题与解决方法整理汇总如下。
2023-03-22 17:42:06
9434
2
原创 MATLAB提示未定义变量simout的解决办法
记录一下仿真学习下中遇到的问题,在用命令执行仿真过程中需要仿真模型通过simout模块将结果输出到工作区,但是在后续对输出结果处理的时候提示没有定义simout,解决方法如下:检查simout相关程序代码没有拼错检查simout双击后属性页面save format为structure with time检查工作区中ans是否包含simout这一结果在程序中sim( )代码后加上simout = ans.simout;一个例子:(不同仿真速率下结果对比)simulink的.mdl模型文件s
2022-05-23 15:44:16
3994
原创 【论文学习】5G Industrial Networks With CoMP for URLLC and Time Sensitive Network Architecture
5G空口授时文献研究
2022-04-02 12:27:06
369
原创 牛客网 考研真题 KY43 全排列
贴个代码方便复习,思路是每个元素轮流当本次全排列第一个元素,同时将待排序列变短,直至只剩下一个元素,输出结果。#include <iostream>#include <string>#include <algorithm>#include <vector>using namespace std;vector<string> result; //存储结果方便排序void swapa(string& ss, int i,
2021-05-06 22:50:40
218
原创 c++ cctype库
函数原型头文件 cctype库中字符函数函数名称返回值isalnum()如果参数是字母或数字返回trueisalpha()如果参数是字母返回trueiscntrl()如果参数是控制字符返回trueisdigit()如果参数是数字0~9返回trueisgraph()如果参数是除空格外可打印字符返回trueislower()如果参数是小写字母返回trueisprint()如果参数是打印字符(含空格)返回trueispunct()
2021-04-21 22:38:58
204
原创 牛客网 考研真题 KY4 代理服务器
思路一道贪心的题目,贪心策略是要在所有代理服务器IP全部在访问服务器IP中出现过的情况下找到那个最后一个代理服务器IP的出现位置,作为这一次访问使用的IP,然后再把除刚使用过的最后那个IP外所有代理服务器IP设置为未出现过重复进行。注意如果只给一个代理IP而访问IP第一个就是此IP的话则无解。代码实现#include <iostream>#include <string>#include <vector>#include <map>using n
2021-04-14 21:47:43
440
原创 C++ 读取一行输入
方法一:getline()cin.getline()有两个参数,第一个用来存储输入行数组的名称,第二个是要读取的字符数(包括结尾 \0 ,即参数为20则最多读入19个字符),此成员函数遇到换行或者到达指定数目字符时停止读取。方法二:get()与getline()类似,但不会丢弃换行符,而是将其留在输入队列中。...
2021-04-14 15:49:23
1693
原创 牛客网 考研真题 KY39 大整数的因子
思路虽然我有一篇文章摘抄了《王道机试指南》的大整数类,但我发现用它取余操作总是不对,无奈自己写了一个,思路不难,就是模拟正常列竖式除法。代码实现#include <iostream>using namespace std;int main() { int big[30]; //存放大整数 string input; //存放输入 while (cin >> input) { if (input == "-1") { break; }
2021-04-13 19:07:49
174
原创 C/C++ 高精度整数模板
const int MAXN = 10000;struct BigInteger { int digit[MAXN]; int length; BigInteger(); BigInteger(int x); BigInteger(string str); BigInteger(const BigInteger& b); BigInteger operator=(int x); BigInteger operator=(string str); BigInteger oper
2021-04-11 17:12:12
244
原创 Linux 利用POSIX多线程API函数进行线程同步
参考:《Linux c与c++一线开发实践》朱文伟 李建英将书上代码敲了一下,存在这里以便后续开发参考一、互斥锁定义互斥锁pthread_mutex_t mutex;互斥锁初始化(动态方式)int pthread_mutex_init(pthread_mutex_t *restrict mutex,const pthread_mutexattr_t *restrict attr);关键字restrict只用于限定指针,用于告知编译器所有修改该指针所指向的内容的操作全部都是基于该指针的,即不存在其
2021-03-21 21:10:12
311
原创 牛客网 KY191 矩阵幂
#include <iostream>using namespace std;struct Matrix { int matrix[10][10]; int row, col; Matrix(int r, int c):row(r),col(c){}};Matrix Multiply(Matrix x, Matrix y) { Matrix answer(x.row, y.col); for (int i = 0; i < answer.row; ++i) {
2021-03-20 13:34:33
165
原创 Linux C++11中线程类
参考:《Linux c与c++一线开发实践》朱文伟 李建英将书上代码敲了一下,存在这里以便后续开发参考一、类std::thread常用成员函数成员函数说明thread构造函数get_id获得线程IDjoinable判断线程对象是否可结束join阻塞函数,等待线程结束native_handle用于获得与操作系统相关的原生线程句柄swap线程交换detach分离线程二、线程的创建1.批量创建线程#include <std
2021-03-16 22:58:52
277
原创 Linux 利用POSIX多线程API函数进行多线程开发
与线程有关基本API函数API函数含义以上函数需要包含头文件pthread.h线程创建int pthread_create(pthread_t *pid, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)其中,pid是一个指针,指向创建成功后的线程ID;pthread_t其实就是unsigned long int;attr是指向线程属性结构
2021-03-15 21:42:03
367
原创 linux进程间通信 实例:使用kill发送信号终止目标进程
参考列表waitpid(…)函数:https://blog.youkuaiyun.com/yiyi__baby/article/details/45539993exit(…)函数:https://blog.youkuaiyun.com/u010006102/article/details/39737155代码参考:《Linux c与c++一线开发实践》朱文伟 李建英自学笔记c语言代码#include <sys/types.h>#include <sys/wait.h>#include <
2021-03-08 22:59:49
343
1
原创 牛客网 KY105 整除问题
参考下述解法:1.素数筛2.对n!质因子分解算法3.对a质因子分解算法int nFac[MAXN]={0};//记录n!的质因数分解后的结果,n!存在质因数i,则aFac[i]=指数int aFac[MAXN]={0};//记录a的质因数分解的结果,a存在质因数i,则aFac[i]=指数比较n!和a的相同质因数的指数相除的最小值为所求。例如:6!=24+32+5^110=21*51有公共质因数:2 指数相除为4/1=45 指数相除为1/1=1所以答案为1这里是将a质因子分解后在n
2021-03-05 19:38:09
288
原创 牛客网 KY3 约数的个数
约数即因子,质数,约数类题目先想到用所给数开根号来缩小循环次数,简化计算,对于本题,以sqrt(num)为界,若比它小有一个因子,则比它大一定存在另一个因子,此时结果加2,最后再判断sqrt(num)是否为其一个因子若是则结果加1,即可。程序代码#include <iostream>using namespace std;int main(){ int n; while (cin >> n) { for (int i = 0; i < n; ++i) {
2021-03-05 12:25:23
191
原创 牛客网 KY183 素数
#include <iostream>#include <vector>#include <cmath>using namespace std;int main(){ long long n; while (cin >> n) { vector<int> re; //所有素数存放在这里 for (int j = 2; j < n; ++j) { bool t = true; for (in
2021-03-04 19:47:31
276
2
原创 牛客网 KY235 进制转换2
#include <iostream>#include <cstring>#include <vector>#include <sstream>using namespace std;string mul(string a, int b) { //字符串乘法 int carry = 0; for (int i = a.size() - 1; i >= 0; --i) { int current = carry + (a
2021-03-04 16:27:28
268
2
原创 动态规划 最长上升子序列 学习笔记
题目描述递推公式程序代码#include <iostream>#include <algorithm>using namespace std;const int MAXN = 100;int main(){ int a[MAXN]; int maxLen[MAXN]; int n; cin >> n; for (int i = 1; i <= n; ++i) { cin >> a[i]; maxLen[i] =
2021-03-03 19:12:54
96
2
原创 牛客网 KY26 10进制 VS 2进制
#include <iostream>#include <vector>using namespace std;string divide(string str, int x) { //字符串除法 int remainder = 0; for (int i = 0; i < str.size(); ++i) { int current = remainder * 10 + str[i] - '0'; str[i] = current / x + '
2021-03-03 16:07:13
195
2
原创 牛客网 KY30 进制转换
思路对输入字符串对2取模再除以2,对于字符串取模运算,转换为对字符串最低位数进行取模;字符串除法则是把字符串从高到低逐位除以除数,如果不能整除,那么保留它除以除数的余数,余数乘10后和低位相加后一起处理,由于有前置0,故应取首个非0位之后的字符。程序代码#include <iostream>#include <vector>using namespace std;int qu_yu(string a) { //取余 return (a[a.length() -
2021-03-03 12:09:57
166
原创 牛客网 KY187 二进制数
位运算#include <iostream>using namespace std;void calculate(int n) { int temp = n & 1; if (n == 0) return; calculate(n >> 1); cout << temp;}int main(){ int n; while (cin >> n) { calculate(n); cout << endl
2021-03-02 23:55:10
269
原创 牛客网 KY79 浮点数加法
#include <iostream>#include <string>using namespace std;string stringadd(string a, string b) {//先在整数部分补0使两数小数点在同一位置 int a1 = a.find('.'); int b1 = b.find('.'); string c1 = (a1 > b1) ? a : b; string c2 = (a1 > b1) ? b : a;
2021-02-28 15:35:30
233
原创 牛客网 KY46 单词替换
#include <iostream>#include <string>using namespace std;int main(){ string s; while (getline(cin, s)) { string a, b; getline(cin, a); getline(cin, b); int found = s.find(a); //找第一次出现位置 while (found != string::npos) { if (
2021-02-28 13:03:15
270
原创 递归+枚举 算24 学习笔记
题目描述注意:浮点数相等不能用 == 判断,要看两数差的绝对值是否足够小程序代码#include <iostream>#include <cmath>using namespace std;double a[5]; //存放四个数;# define EPS 1e-6bool isZero(double x) { return fabs(x) <= EPS;}bool count24(double a[], int n) { if (n ==
2021-02-26 23:11:33
120
原创 递归 放苹果 学习笔记
问题描述分析:k为盘子数,i为苹果数k > i 时,f ( i , k ) = f ( i , i )k ≤ i 时,总放法 = 有盘子为空的放法 + 没有盘子为空的放法,即f ( i , k ) = f ( i , k - 1 ) + f ( i-k , k )程序代码#include <iostream>using namespace std;int f(int m, int n) { if (n > m) return f(m, m); if (m ==
2021-02-26 22:45:47
112
原创 递归 爬台阶 学习笔记
问题描述分析:问题拆解成更小规模同样的问题,即n级台阶的走法 = 先走一级台阶后n-1级台阶的走法 + 先走两级台阶后 n-2级台阶的走法,可以表示为 f(n)= f(n-1)+ f(n-2),边界条件,n = 1时 返回1,n = 2 时返回2,观察递归函数防止无穷递归。程序代码#include <iostream>using namespace std;int N;int stairs(int n) { if (n == 1) return 1; if (n == 2)
2021-02-26 22:19:27
127
原创 求中缀表达式的值 学习笔记
题目描述程序代码#include <iostream>#include <cstdlib>#include <cstring>using namespace std;int factor_value() { //读入一个因子并返回它的值 int result = 0; char c = cin.peek(); if (c == '(') { cin.get(); result = expression_value(); cin.ge
2021-02-26 22:02:07
144
原创 逆波兰表达式求值 学习笔记
问题描述程序代码#include <iostream>using namespace std;double exp() { char s[20]; cin >> s; switch (s[0]) { case '+': return exp() + exp(); //注意此处exp()读取的顺序 case '-': return exp() - exp(); case '*': return exp() * exp(); case '/': return
2021-02-26 16:31:44
120
原创 递归 N皇后问题 学习笔记
#include <iostream>#include <cmath>using namespace std;int N;int queenPos[100];void NQueen(int k) { //在0 - k-1行皇后已经摆好的情况下,摆第k行及其后的皇后 int i; if (k == N) { //N个皇后已经摆好 for (i = 0; i < N; i++) cout << queenPos[i] + 1 &l
2021-02-26 14:00:50
145
原创 牛客网 KY228 找位置
思路利用map将位置与字符对应,然后根据其出现顺序进行查找,其中关键一步是按照value去查找key值,将多次出现的字符位置进行记录后再输出。代码如下#include <iostream>#include <algorithm>#include <string>#include <vector>#include <map>using namespace std;int main(){ string input; whi
2021-02-26 00:01:25
280
原创 C++ 动态内存管理
一、动态分配与堆整个内存空间被设置为堆和栈,他们以相反的方向增长堆:向更高地址增长栈:向更低地址增长1. new操作符使用new操作符从堆中分配内存,形式是:取一种类型,并在堆中分配一块空间给所指定的类型变量。如:int* p = new int;2. 动态数组...
2021-02-24 23:10:18
130
原创 牛客网 KY117 奥运排序问题
最直观的解法就是四个排序全部进行一次,记录最好的一次输出,解法如下:#include <iostream>#include <algorithm>#include <string>using namespace std;class country {public: int gold; int medal; int population; int num; //国家编号 float gold_population; //金牌人口比
2021-02-21 00:10:16
190
原创 牛客网 KY2 成绩排序
这道题重载运算符就可以完成#include <iostream>#include <algorithm>using namespace std;class student {public: string name; int grade; int i; //记录输入序号 void studentinit(string a, int b,int c) { this->name = a; this->grade = b; this
2021-02-19 20:30:19
176
原创 熄灯问题 学习笔记
思路就是当第一行开关按下后灯状态确定,向下逐行可以有一个确定的开关状态使得上一行的灯一定全部熄灭,直到最后一行检查是否也全部熄灭,如果是则得到结果。这里只需要枚举第一行所有开关的状态即可,更巧妙的是可以采用二进制位运算节省空间。代码#include <iostream>#include <string>#include <cstring>using namespace std;char oriLights[5]; //原始灯状态char light
2021-02-18 22:45:02
133
原创 PTA基础编程题目集 7-38 数列求和-加强版
#include <iostream>using namespace std;int result[100000]; //结果很大,用数组保存int main(){ for (int i = 0; i < 100000; i++) { result[i] = 0; } int a, n; cin >> a >> n; if (n == 0) { cout << "0"; return 0; }
2021-02-17 00:33:42
184
2
空空如也
C++中此处for()内代码 :的含义是什么?
2021-02-01
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅