自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

只想安静地敲个代码

她说我是像星星一样的人

  • 博客(57)
  • 收藏
  • 关注

原创 自定义pycharm TODO类注释以及其高亮颜色

2023-10-08 17:54:44 246

原创 pycharm配置ssh解释器出现“Error running ‘xxx‘: SDK is not defined for Run C…”或“cannot find remote create cre

pycharm配置ssh解释器出现“Error running ‘xxx’: SDK is not defined for Run C…”或“cannot find remote create credentials for target config com.jetbrains.plugins.remotesdk.target.webDeployment.WebDeploymentTargetEnvironmentConfiguration。

2023-10-07 11:29:50 816

原创 服务器linux无图形界面上pyrender.OffscreenRenderer出现pyglet.canvas.xlib.NoSuchDisplayException的小白级解决方式

服务器linux无图形界面上pyrender.OffscreenRenderer出现pyglet.canvas.xlib.NoSuchDisplayException的小白级解决方式用osmesa

2023-03-05 14:27:55 1125

原创 解决Errors may have originated from an input operation. Input Source operations connected to Conv2D

Errors may have originated from an input operation.

2023-03-05 14:10:22 1676

原创 解决:pycharm调试时不能在变量同行显示变量的值,以及出现show value不能同步显示值

解决:pycharm调试时不能在变量同行显示变量的值

2023-02-22 15:28:11 392

原创 服务器上可以跑,本地Pycharm中报错Ninja is required to load C++ extensions

ninja is required to load C++ extensions

2023-02-22 15:17:18 1511 1

原创 解决CondaUpgradeError网上的方法都不奏效(回退版本、upgrade/update都不行)的问题和CondaValueError

Executing transaction: failedERROR conda.core.link:_execute(502): An error occurred while installing package 'conda-forge::certifi-2022.9.24-pyhd8ed1ab_0'.CondaUpgradeError: This environment has previously been operated on by a conda version that's newe

2023-02-20 20:32:25 1108

原创 torch tensor transpose函数:每次可以转置2 dim(线代上的转置)

2022-09-16 16:13:16 506

原创 pycharm远程调试的pytorch程序,显示cuda.is_available()为True,但Found no NVIDIA driver,加LD_LIBRARY_PATH也无法解决的解决方法

问题:远程能跑,本地连远程调试跑不通,显示Found no NVIDIA driver,或是torch._C._cuda_init() RuntimeError: cuda runtime error (38) : no CUDA-capable device is detected

2022-09-08 19:41:01 1318

原创 实验室集群的使用,远程跑代码(配Anaconda虚拟环境、PyCharm远程解释器等),一站式教学

集群架构PC -------- 跳板机(数据中心) ---- 内网 ---- 计算节点数据中心中的个人目录会挂载到计算节点的目录下在数据中心存放自己的环境和代码在计算节点跑实验win10命令行登录数据中心和计算节点ssh -p [端口号] [用户名]@数据中心/计算节点IP用MobaXterm登录数据中心和计算节点新建sessionssh跳板机(数据中心)填写这些即可连上ssh计算节点要ssh内网的计算节点必须通过跳板机就ok了配Anaconda虚拟环境配在数据中心,

2022-04-18 00:33:52 3796

原创 python deque超限会怎样

会pop出最早放入的元素,然后push(python中即append)进想要加入的新元素不信试试下面这段:a = deque(maxlen=2)a.append(0)a.append(1)a.append(2)a.append(3)结果

2022-04-12 00:08:56 960

原创 超详细,绝对能解决Cannot run program “D:\...\venv\Scripts\python.exe“ (in directory ): CreateProcess error=2

问题表现原因移动了project的位置,python解释器(即图中的Python Interpreter)的位置也跟着移动了,原本的解释器路径失效了解决方法修改python解释器的位置为移动后的位置①File->Settings->Project->Python Interpreter->Show All②Edit(点击那只笔)->将Interpreter path改为新路径(不会找的话,可以找找项目路径下venv文件夹,在里面找到Scripts\python

2021-11-15 16:12:39 23934 6

原创 1098 Insertion or Heap Sort (25 分) +测试要点

题目描述1098 Insertion or Heap Sort (25 分)According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element from the input data, finds the locati

2021-09-08 16:01:25 222

原创 1107 Social Clusters (30 分) + 测试要点

题目描述1107 Social Clusters (30 分)When register on a social network, you are always asked to specify your hobbies in order to find some potential friends with the same hobbies. A social cluster is a set of people who have some of their hobbies in common. Yo

2021-09-06 17:09:04 154

原创 1043 Is It a Binary Search Tree (25 分) + 测试注意点

题目描述:A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less than the node’s key.The right subtree of a node contains only nodes with keys greate

2021-09-06 17:05:58 310

原创 1066 Root of AVL Tree (25 分) + 测试要点

题目描述1066 Root of AVL Tree (25 分)An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more than one, rebalancing is done to restore this

2021-09-03 01:06:49 253

原创 1053 Path of Equal Weight (30 分) + 容易忽略的测试测试点

题目描述:1053 Path of Equal Weight (30 分)Given a non-empty tree with root R, and with weight Wi assigned to each tree node Ti. The weight of a path from R to L is defined to be the sum of the weights of all the nodes along the path from R to any leaf node L

2021-08-31 21:29:17 394 3

原创 codeup - B: 数制转换 - 给出个人错误原因和测试数据

AC代码错误原因:char num[400];和char res[500];最初大小分别是40和50,不够大#include<stdio.h>#include<string.h>int main(){ int a,b; char num[400]; while(scanf("%d%s%d",&a,num,&b)!=EOF) { char res[500]; long c=0; int len=strlen(num); //print

2021-03-08 21:18:58 87

原创 codeup - A: 又一版 A+B - 不用数组存储而是直接输出&&给出测试数据

AC代码#include <iostream>#include<cstdio>#include<algorithm>#include<math.h>#include<stdlib.h>using namespace std;int main(){ long long int a,b; int m; while(cin>>m) { if(m==0) break;

2021-03-01 22:47:41 69

原创 codeup - 打印日期 - 给出测试数据

AC代码// 以及需要的头文件int main(){ int m,n; while(cin>>m>>n){ int leap=isLeap(m); int i,d=0; for(i=1;;i++) { n=n-month[i][leap]; if(n<=0) { d=n+month[i][leap];

2021-02-18 20:09:19 76

原创 codeup - 入门模拟->日期处理 - 人间大迷惑

ac代码#include <iostream>#include<cstdio>#include<algorithm>#include<math.h>#include<cstring>#include<time.h>using namespace std;/*2013010120130105201302052013010120000101200101052013010120140105*/int

2021-02-17 21:35:34 74

原创 codeup 问题 B: Hello World for U

AC代码#include <iostream>#include<cstdio>#include<algorithm>#include<cstring>using namespace std;int main(){ char str[1000]; cin>>str; int len=strlen(str); int a=len/3;// int b=len-2*a int b=le

2021-02-16 19:54:34 87

原创 虚拟机下linux20.04开机时进入initramfs无法开机

Linux系统之initramfs工作流程原因:没有正常关机导致磁盘文件损坏解决:输入exit打开机器,系统启动,一下子屏蔽闪出很多不应该看到的文字,最后停留在initramfs这里,这时如果运行exit可以进入系统,则说明rootdelay时间太短了.读反馈消息,是因为磁盘上/dev/sda3中的系统文件被损坏,需要手动用fsck修复一下根据提示,输入fsck /dev/sda3,看到一路Fix?,均输入y最后能看到"FILE SYSTEM WAS MODIFIED."的提示,修

2020-11-21 19:49:53 1012 1

原创 1002 A+B for Polynomials (25分) 测试用例+犯了所有可能犯的错误

原题1002 A+B for Polynomials (25分)This time, you are supposed to find A+B where A and B are two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial:wh

2020-08-29 17:00:06 1631 4

原创 PAT 1001 A+B Format (20分)

通过代码#include<iostream>#include<cstdio>#include<string>#include<algorithm>#include<list>#include<string>using namespace std;bool gt(const int &a, const int &b) { return a>b;}int main() { in

2020-08-16 17:58:18 78

原创 PAT 1009 说反话 (20分)

通过代码#include<iostream>#include<cstdio>#include<string>#include<algorithm>#include<list>#include<string>using namespace std;int main() { string str; getline(cin,str); list<string> lst; strin

2020-08-16 17:16:05 133

原创 PAT 1008 数组元素循环右移问题 (20分)

通过代码#include<iostream>#include<cstdio>#include<string>#include<algorithm>#include<list>using namespace std;bool gt(const int &a, const int &b) { return a>b;}int main() { list<int> lst;

2020-08-15 15:23:58 82

原创 PTA 1006 换个格式输出整数 (15分)

#include<iostream>#include<cstdio>#include<string>#include<algorithm>using namespace std;int num[3];int main() { int n; int i=2; cin>>n; while(i>=0) { num[i] = n%10; n=n/10; i

2020-08-14 18:07:18 92

原创 git提交代码流程

git add .git commit -m "comment"git push -u origin yuhanyao

2020-08-14 17:38:15 94

原创 PAT 1005 继续(3n+1)猜想 (25分)

自拟测试点63 5 6 7 8 113:5 8 4 2 15:√6:3 (…√)但不算是被覆盖了,是关键数7:11 16 8 4 2 18:√11:√46 3 2 16:3 5 8 4 2 13:√2:√ans:647 4 9 127:11 16 8 4 2 14:√9:14 7 (7被覆盖)(…√)12:6 3 5 8 (…√)ans:7 9 12...

2020-08-14 17:36:00 148

原创 PAT 1004 成绩排名 (20分) 犯了所有可能犯的错误

原题1004 成绩排名 (20分)读入 n(>0)名学生的姓名、学号、成绩,分别输出成绩最高和成绩最低学生的姓名和学号。输入格式:每个测试输入包含 1 个测试用例,格式为第 1 行:正整数 n第 2 行:第 1 个学生的姓名 学号 成绩第 3 行:第 2 个学生的姓名 学号 成绩 ... ... ...第 n+1 行:第 n 个学生的姓名 学号 成绩其中姓名和学号均为不超过 10 个字符的字符串,成绩为 0 到 100 之间的一个整数,这里保证在一组测试用例中没有两个学生的成绩

2020-08-14 15:51:33 294 1

原创 DELL戴尔笔记本没有break/pause键的解决方案

CTRL + FN + B

2020-06-30 12:29:08 3377

原创 数据结构 - 线性表、栈和队列 - 笔记

文章目录1. 线性表1.1 线性表的实现1.1.1 顺序表1.1.2 链表1.1.2.1 单链表1.1.2.2 双链表1.1.2.3 可利用空间表1.1.2.4 字典2. 栈2.1 顺序栈2.2 链式栈2.3 栈的应用2.3.1 栈实现递归2.3.2 栈实现进制转换2.3.3 栈实现平衡符号2.3.4 栈实现逆波兰(RPN)计算器2.3.5 [栈实现迷宫问题的解决](https://blog.cs...

2020-06-19 16:15:02 107

原创 数据结构 - 图 - 笔记

目录图的定义、实现与基本操作有关图的重要定义图的两种表示方式、ADT及其实现1.图的定义、实现与基本操作1.1 有关图的重要定义稀疏图,密集图,完全图标号图相邻的,邻接点权,带权图路径,简单路径,路径长度回路,简单回路子图连通的,连通分量(最大连通子图)无环图,有向无环图自由树1.2 图的两种表示方式、ADT及其实现使用哪种方式取决于边的数目密集图...

2020-06-19 16:14:04 180

原创 数据结构 - 二叉树 - 笔记

目录定义有关二叉树的重要定义二叉树的ADT遍历二叉树的方式1.定义1.1 有关二叉树的重要定义路径 - 长度 — 祖先 - 子孙深度:从根结点到该结点的路径长度树的高度=最深节点的深度+1结点的层数=深度 (根结点结点层数为0,深度为0)叶节点、内部节点(/分支节点)(定义有争议) 满二叉树:结点若是分支结点,定有两个非空子结点(定义无争议) 完全二叉树:从...

2020-06-19 16:13:28 318

原创 数模美赛论文怎么写

文章目录1. 总体指导思想2. 关于引言(Introduction)2.1 要写什么2.2 怎么写3. 论文主体3.1 Assumption and hypothesis3.2 The Design of Models3.2.1 指导思想3.2.2 系列模型的写法3.2.3 普遍模型的写法3.3 结论部分4. 摘要4.1 需要的要素4.2 注意事项1. 总体指导思想关键词:明确重要的句子用...

2020-06-19 16:12:36 2770

原创 java通讯录

要求一、实现通讯录类(姓名、性别和电话号码),并为每个属性设置 set和get方法;二、从通讯录的文本文件“record.txt”中读取数据放到通讯录类实例化的对象中,并合理组织存储结果方便查找。其文件样例如下,文件第一行为通讯录中人员的个数n,从第二行到第n+1行是n个通讯录; 每个通讯录占1行,每行依次为人员姓名、性别和电话号码,每个属性间以空格隔开。3张三 男 123456李四 ...

2020-06-19 16:10:45 2325

原创 Vivado加上VsCode自动纠错配置错误:ERROR: [VRFC 10-453] cannot open verilog file -

原因是你是在系统终端输入的xvlog -version而实际上你应该在vscode的terminal里面输入更新:我错了,现在在系统终端也能显示了应该是不能一配好环境变量就输入,要不你的电脑反应不过来?(瞎猜的...

2020-05-14 11:11:42 2283 2

原创 在Vivado中指定VSCode作为文本编辑器时遇到Unable to launch external text editor using the following arguments

Unable to launch external text editor using the following arguments:C:/My_Programs/VSCode/Microsoft VS Code/Code.exe [file name]显然因为你的vscode不装在这个路径……找半天找不到路径怎么办?打开环境变量,看看你自己的在哪里,然后用你的替换C:/My_Programs/VSCode/Microsoft VS Code/Code.exe [file name]然后就.

2020-05-10 19:36:18 6122 1

原创 vivado的下载

注册一个账户,然后登录下载左键用迅雷之类的加速下载(约30min-60min),否则要等很久(两小时都不一定下的完),有条件的挂载vpn安装程序大小如下:3. 点击安装程序,开始安装,步骤如下...

2020-05-07 13:08:19 443

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除