自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(25)
  • 资源 (1)
  • 收藏
  • 关注

原创 JavaScript 三目运算符 return不合语法

JavaScript 三目运算符

2022-07-23 00:16:37 453 1

原创 重新安装jupyter notebook后 numpy无法使用 DLL load failed while importing _multiarray_umath: 找不到指定的模块

notebooknumpyDLL load failed while importing _multiarray_umath:找不到指定模块

2022-02-15 10:04:45 1959 2

原创 python格式化输出直接输出 %

连续打两个%

2021-08-13 16:20:19 116

原创 python 校园IT管理系统面向对象

import sysdef main_menu(): print("===============校园IT管理系统===============") print("\t\t\t\t1、创建总部\t\t\t\t") print("\t\t\t\t2、增加分校\t\t\t\t") print("\t\t\t\t3、学生入学\t\t\t\t") print("\t\t\t\t4、显示余额\t\t\t\t") print("\t\t\t\t0、退出程序\t\t\

2021-07-07 22:47:28 162

原创 fnmatch文件匹配模块

PatternMeaningmatches everything?matches any single character[seq]matches any character in seq[!seq]matches any character not in seq

2021-07-06 14:33:31 81

原创 typehints

Frameworks expecting callback functions of specific signatures might be type hinted using Callable[[Arg1Type, Arg2Type], ReturnType].

2021-06-24 16:06:41 75

原创 Pycharm connecting to console的解决方案

1.打开settings—>Build,Execution,Deployment—>Cosole—>Python Console2.编辑Environment variables:将下方Path复制到上方User environment variables3. 将更改应用并保存4. 重启Pycharm

2021-06-22 23:15:01 392 1

原创 importlib.import_module() 和import

#this is test2print('this is test2')import importlibimportlib.import_module('人狗大战', '..')importlib.import_module('包2.tt', '..')importlib.import_module('test1')from .. import (module_name)这种语法只能使用在被其它文件调用的模块当中,直接运行自己会报错...

2021-06-21 13:26:53 388

原创 python包 _init_.py

当直接调用包而不调用其中模块时,其实是调用的包中的_init_.py文件例如import numpy as npnp.array()numpy是一个包,如果直接使用包的方法,那么会调用包中的_init_.py文件文件部分如下from . import corefrom .core import *core仍然是一个包,导入了包中的所有文件,其中包括_multiarray_umath模块,该模块中定义了array()方法因此可以直接使用np.array()...

2021-06-14 09:30:26 246 1

原创 python os模块和os.path模块

一、ospython库中有os.py但是其中并没有定义相关函数,这些函数(例如:os.open , os.makdir)来自于其他文件以下是os.pyt部分源代码if 'posix' in _names: name = 'posix' linesep = '\n' **from posix import *** try: from posix import _exit __all__.append('_exit') except

2021-06-14 09:10:01 289 1

原创 最大公约数

//辗转相除法 #include <stdio.h>#include <iostream>using namespace std;int gcd(int a,int b){ if(b==0){ return a; } gcd(b,a%b);}int main(){ int a,b; cin>>a>>b; cout<<gcd(a,b)<<endl; return 0;}

2021-06-03 09:59:42 50

原创 有几个PAT简单版

//有几个PAT//省略了右侧数组的构造 #include <stdio.h>#include <string.h> const int maxsize = 1e5+10;int leftP[maxsize]={0};char c[maxsize];int main(){ scanf("%s",c); int len = strlen(c); int rightTnum = 0; if (c[0] == 'P'){ leftP[0] = 1; }

2021-06-03 09:58:51 62

原创 有几个PAT

//有几个PAT//小心溢出,注意取余的运算法则 #include <stdio.h>#include <string.h> const int maxsize = 1e5+10;int leftP[maxsize]={0};int rightT[maxsize]={0};char c[maxsize];int main(){ scanf("%s",c); int len = strlen(c); if (c[0] == 'P'){ leftP[0] =

2021-06-03 09:58:05 72

原创 PAT数素数

#include <iostream>#include <stdio.h>using namespace std;const int pmax = 2e5;//素数能去到的最大范围 const int maxn = 1e4;//数组下标的最大范围 int p[maxn];bool q[pmax] = {0};int main(){ int M,N; cin>>M>>N; p[0]=2; q[2]=1; int count=2,i=

2021-06-03 09:57:28 64

原创 PAT_Ranking

#include <stdio.h>#include <string.h>#include <iostream>#include <algorithm>using namespace std; struct STU{ char id[14]; int grade; int rank; int loc;}stu[30000];bool cmp(STU stu1,STU stu2){ if(stu1.grade!=stu2.grade)

2021-06-03 09:56:23 65

原创 //n皇后问题简单递归

//n皇后问题简单递归#include <stdio.h>#include <math.h>const int maxsize = 100;bool visited[maxsize]={0};int rout[maxsize];int N;int num = 0;void gen(int layer){ if(layer == N+1){ num++; return; } for(int x=1;x<=N;x++){ bool flag

2021-06-03 09:55:07 101

原创 PAT B1001 3n+1猜想

//PAT B1001#include <stdio.h>int main(){ int n; int count=0; scanf("%d",&n); while(n!=1){ if(n%2==0){ n/=2; count++; } else{ n=(3*n+1)/2; count++; } } printf("%d\n",count); return 0;}

2021-06-03 09:53:57 61

原创 PAT A1060 有效数字比较标准

//编写思路:求同存异//把大家都换成开头是0.//有效位数的实现不是用截断,而是另开辟一个字符串来一个个字符添加#include <iostream> #include <stdio.h>#include <string>using namespace std;string deal(string str,int N,int &exp){ while(str.length()>0&&str[0]=='0'){//要把去除前

2021-06-03 09:51:49 118

原创 PAT A1060 有效数字比较

//PAT A1060//删除过程注意不要越界 由于小数点不一定存在而产生的越界删除//注意是字符之间的比较而不是数字#include <stdio.h>#include <iostream>#include <string>using namespace std;int len(string str){ int i; for(i=0;i<str.length();i++){ if(str[i]=='.') break; } ret

2021-06-03 09:50:00 112

原创 Python学生管理系统

import osdef menu(): print('==============================学生管理系统==============================') print('-------------------------------功能菜单--------------------------------') print('\t\t\t\t\t\t\t1.录入学生信息') print('\t\t\t\t\t\t\t2.查找学生信息')

2021-06-03 09:45:09 158

原创 conda安装tensorflow连接服务器失败的问题

C:\Users\用户名.condarc原版ssl_verify: trueshow_channel_urls: true更改版show_channel_urls: truedefault_channels: - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free - http://mirrors.tuna.ts

2021-05-31 23:33:24 187

原创 吉林大学计算机网络考研知识点整理

**本博客不保证正确性,是本人考研过程中对红皮书考点的一些总结,仅供参考。参考资料计算机网络第三版,胡亮主编,高等教育出版社**第一章:概论(一)知识点:网络协议三要素:p6语法 :数据格式 信号电平语义 :调整和差错处理时序 :速度匹配和顺序OSI七层参考模型:物联网淑慧试用 p9会话层:会话连接,同步表示层:对用户数据进行翻译,数据加密、解密、信息压缩服务的4种原语:请求、指示、响应、证实IEEE为局域网制定的服务原语中,没有响应原语传输层的数据传输单位是报文段(segment

2021-04-05 18:24:08 2121

原创 《王道》递归删除链表节点不断链的问题

《王道》递归删除链表节点不断链的问题先附上正确代码:void Del_X(LinkList &L,int x){ LNode* p=NULL; if(L==NULL) return; if(L->data==x){ p=L; L=L->next; free(p); p=NULL; Del_X(L,x); } else Del_X(L->next,x);}递归调用该删除函数链不会断的关键在于**else后面调用的是 Del_X(L

2020-12-04 14:36:01 947

原创 二叉树最近公共祖先递归算法

标题二叉树最近公共祖先递归算法我目前搜到的网上的版本都是这样的;BTree NearestAncestor(BTree T,BTree p,BTree q){ if(T==NULL||T==p||T==q) return T; BTree left = NearestAncestor(T->lchild,p,q); BTree right = NearestAncestor(T->rchild,p,q); if(left==NULL) return right; if(ri

2020-12-01 18:47:02 335

原创 树的宽度 递归非递归

树的宽度 递归非递归欢迎使用Markdown编辑器你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页。如果你想学习如何使用Markdown编辑器, 可以仔细阅读这篇文章,了解一下Markdown的基本语法知识。新的改变我们对Markdown编辑器进行了一些功能拓展与语法支持,除了标准的Markdown编辑器功能,我们增加了如下几点新功能,帮助你用它写博客:全新的界面设计 ,将会带来全新的写作体验;在创作中心设置你喜爱的代码高亮样式,Markdown 将代码片显示选择的高亮样式

2020-11-28 15:10:13 103

PAT考试中的一些习题,大概做了100道甲级,需要自取

PAT考试中的一些习题,大概做了100道甲级,需要自取

2021-06-03

空空如也

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

TA关注的人

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