- 博客(7)
- 收藏
- 关注
原创 2021-09-24
如何重置 CentOS 8 的 root 密码首先重启虚拟机,通过按箭头键从 GRUB/Boot 菜单中选择要引导的内核。按键盘上的“e”将打开编辑菜单。在编辑菜单中,找到“ ro ”内核参数并将其替换为“ rw, ”并添加一个附加参数“ init=/sysroot/bin/sh ”:完成上一步后,按Ctrl + X进入单用户模式。现在运行“chroot /sysroot”命令以读写模式转换根文件系统::/# chroot / sysroot执行完上面的语句,您现在可以更改 root
2021-09-24 19:45:06
234
原创 2021-09-14
python sort()函数sort()函数没有返回值,所以不能直接输出,如:我们打印str.sort()的类型所以我们不能直接输出,如下就对了:
2021-09-14 15:59:32
55
转载 2021-09-07
用PyMySQL模块连接数据库出现 init() takes 1 positional argument but 5 were given报错只需要把连接代码中的实参和形参指定就行了db = pymysql.connect(host="localhost", user="root", password="xxx", database="xxxx")
2021-09-07 16:10:19
62
原创 栈(括号匹配问题)
栈的应用(括号匹配)#include<stdio.h>#include<malloc.h>#include<string.h>#define MAXSIZE 20typedef struct linkNode{char data;struct linkNode *next;}Listack;int InitStack(Listack *&s){s=(Listack *)malloc(sizeof(Listack));s->next=
2020-11-16 17:38:18
367
原创 数据结构实验
数据结构实验:写一个学生管理系统:代码如下:#define OVERFLOW -1#define OK 1#define ERROR -1#define MAXSIZE 6#define INCREMENT 10#include<stdio.h>#include<stdlib.h>#include<malloc.h>#include<string.h>typedef int Status;typedef struct{char no
2020-11-13 17:39:57
245
原创 编写一个程序,将两个字符串连接起来,不要用stracat 函数
可能写的不好,希望对你们有帮助| | |#include<stdio.h>int main(){int a=0,b=0,c=0,m=0,i,j;char str1[80],str2[80];printf(“请输入字符串1:\n”);gets(str1);printf(“请输入字符串2:\n”);gets(str2);while(str1[a]!=’\0’){a+=1;}while(str2[c]!=’\0’){c+=1;}for(i=a,j=0;i<
2020-05-19 18:12:21
2236
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人