Oracle重写sql经典50题(代码)

news2024/11/17 3:38:25

上次发表的是写的时候遇到的问题,这次备份一下自己的代码(很冗余,也不保证正确率)
mysql50题链接在此

Oracle重写sql经典50题

  • 创建数据库和表
    • oracle数据库一个账户就一个库,不需要创建
    • 学生表 student
      • 创建学生表 student
        • 插入学生数据
    • 课程表 course
      • 创建课程表 course
      • 插入课程数据
    • 教师表 teacher
      • 创建教师表 teacher
      • 插入教师数据
      • 成绩表 score
        • 创建成绩表 score
        • 插入成绩数据
    • 经典练习 50 题
      • 1、查询"01"课程比"02"课程成绩高的学生的信息及课程分数
      • 2、查询"01"课程比"02"课程成绩低的学生的信息及课程分数
      • 3、查询平均成绩大于等于60分的同学的学生编号和学生姓名和平均成绩
      • 4、查询平均成绩小于60分的同学的学生编号和学生姓名和平均成绩
      • 5、查询所有同学的学生编号、学生姓名、选课总数、所有课程的总成绩
      • 6、查询"李"姓老师的数量
      • 7、查询学过"张三"老师授课的同学的信息
      • 8、查询没学过"张三"老师授课的同学的信息
      • 9、查询学过编号为"01"并且也学过编号为"02"的课程的同学的信息
      • 10、查询学过编号为"01"但是没有学过编号为"02"的课程的同学的信息
      • 11、查询没有学全所有课程的同学的信息
      • 12、查询至少有一门课与学号为"01"的同学所学相同的同学的信息
      • 13、查询和"01"号的同学学习的课程完全相同的其他同学的信息
      • 14、查询没学过"张三"老师讲授的任一门课程的学生姓名
      • 15、查询两门及其以上不及格课程的同学的学号,姓名及其平均成绩
      • 16、检索"01"课程分数小于60,按分数降序排列的学生信息
      • 17、按平均成绩从高到低显示所有学生的所有课程的成绩以及平均成绩
      • 18、查询各科成绩最高分、最低分和平均分:以如下形式显示:课程ID,课程name,最高分,最低分,平均分,及格率,中等率,优良率,优秀率,及格为>=60,中等为:70-80,优良为:80-90,优秀为:>=90
      • 19、按各科成绩进行排序,并显示排名
      • 20、查询学生的总成绩并进行排名
      • 21、查询不同老师所教不同课程平均分从高到低显示
      • 22、查询所有课程的成绩第2名到第3名的学生信息及该课程成绩
      • 23、统计各科成绩各分数段人数:课程编号,课程名称, 100-85 , 85-70 , 70-60 , 0-60 及所占百分比
      • 24、查询学生平均成绩及其名次
      • 25、查询各科成绩前三名的记录
      • 26、查询每门课程被选修的学生数
      • 27、查询出只有两门课程的全部学生的学号和姓名
      • 28、查询男生、女生人数
      • 29、查询名字中含有"风"字的学生信息
      • 30、查询同名同性学生名单,并统计同名人数
      • 31、查询1990年出生的学生名单
      • 32、查询每门课程的平均成绩,结果按平均成绩降序排列,平均成绩相同时,按课程编号升序排列
      • 33、查询平均成绩大于等于85的所有学生的学号、姓名和平均成绩
      • 34、查询课程名称为"数学",且分数低于60的学生姓名和分数
      • 35、查询所有学生的课程及分数情况;
      • 36、查询任何一门课程成绩在70分以上的姓名、课程名称和分数;
      • 37、查询课程不及格的学生
      • 38、查询课程编号为01且课程成绩在80分以上的学生的学号和姓名;
      • 39、求每门课程的学生人数
      • 40、查询选修"张三"老师所授课程的学生中,成绩最高的学生信息及其成绩
      • 41、查询不同课程成绩相同的学生的学生编号、课程编号、学生成绩
      • 42、查询每门功课成绩最好的前两名
      • 43、统计每门课程的学生选修人数(超过5人的课程才统计)。要求输出课程号和选修人数,查询结果按人数降序排列,若人数相同,按课程号升序排列
      • 44、检索至少选修两门课程的学生学号
      • 45、查询选修了全部课程的学生信息
      • 46、查询各学生的年龄
      • 47、查询本周过生日的学生
      • 48、查询下周过生日的学生
      • 49、查询本月过生日的学生
      • 50、查询下月过生日的学生

创建数据库和表

oracle数据库一个账户就一个库,不需要创建

学生表 student

创建学生表 student

create table student (
	s_id int,
	s_name varchar(8),
	s_birth date,
	s_sex varchar(4)
);

插入学生数据

注意!!一条一条执行,并提交!!!

insert into Student values(1 , '赵雷' , to_date('1990-01-01','yyyy-MM-dd') , '男');
insert into Student values(2 , '钱电' , to_date('1990-12-21','yyyy-MM-dd') , '男');
insert into Student values(3 , '孙风' , to_date('1990-05-20','yyyy-MM-dd') , '男');
insert into Student values(4 , '李云' , to_date('1990-08-06','yyyy-MM-dd') , '男');
insert into Student values(5 , '周梅' , to_date('1991-12-01','yyyy-MM-dd') , '女');
insert into Student values(6 , '吴兰' , to_date('1992-03-01','yyyy-MM-dd') , '女');
insert into Student values(7 , '郑竹' , to_date('1989-07-01','yyyy-MM-dd') , '女');
insert into Student values(8 , '王菊' , to_date('1990-01-20','yyyy-MM-dd') , '女');

课程表 course

创建课程表 course

create table course (
	c_id int,
	c_name varchar(8),
	t_id int
);

插入课程数据

注意!!一条一条执行,并提交!!!

insert into course values (1,'语文',2);
insert into course values (2,'数学',1);
insert into course values (3,'英语',3);

教师表 teacher

创建教师表 teacher

create table teacher (
	t_id int,
	t_name varchar(8)
);

插入教师数据

注意!!一条一条执行,并提交!!!

insert into teacher values (1,'张三');
insert into teacher values (2,'李四');
insert into teacher values (3,'王五');

成绩表 score

创建成绩表 score

create table score (
	s_id int,
	c_id int,
	s_score int
);

插入成绩数据

注意!!一条一条执行,并提交!!!

insert into score values (1,1,80);
insert into score values (1,2,90);
insert into score values (1,3,99);
insert into score values (2,1,70);
insert into score values (2,2,60);
insert into score values (2,3,65);
insert into score values (3,1,80);
insert into score values (3,2,80);
insert into score values (3,3,80);
insert into score values (4,1,50);
insert into score values (4,2,30);
insert into score values (4,3,40);
insert into score values (5,1,76);
insert into score values (5,2,87);
insert into score values (6,1,31);
insert into score values (6,3,34);
insert into score values (7,2,89);
insert into score values (7,3,98);


在这里插入图片描述

经典练习 50 题

1、查询"01"课程比"02"课程成绩高的学生的信息及课程分数

select stu.*,sc0.s_score from student stu inner join (select sc1.* from score sc1 inner join score sc2 on sc1.s_id
 = sc2.s_id and sc1.c_id = 01 and sc2.c_id = 02 where sc1.s_score > sc2.s_score) sc0
    on stu.s_id = sc0.s_id;

2、查询"01"课程比"02"课程成绩低的学生的信息及课程分数

select stu.*,sc0.s_score from student stu inner join (select sc1.* from score sc1 inner join score sc2 on sc1.s_id
 = sc2.s_id and sc1.c_id = 01 and sc2.c_id = 02 where sc1.s_score < sc2.s_score) sc0
    on stu.s_id = sc0.s_id;

3、查询平均成绩大于等于60分的同学的学生编号和学生姓名和平均成绩

select stu.s_id,stu.s_name,avg(sc.s_score) as avgscore
    from score sc left join student stu on sc.s_id = stu.s_id
    group by stu.s_id, stu.s_name having avg(s_score) >= 60 order by s_id;

4、查询平均成绩小于60分的同学的学生编号和学生姓名和平均成绩

select stu.s_id,stu.s_name,avg(sc.s_score) as avgscore
    from score sc left join student stu on sc.s_id = stu.s_id
    group by stu.s_id, stu.s_name having avg(s_score) < 60 order by s_id;

5、查询所有同学的学生编号、学生姓名、选课总数、所有课程的总成绩

select stu.s_id,stu.s_name,count(sc.c_id),nvl(sum(sc.s_score),0) sumscore
from student stu left join score sc on stu.s_id = sc.s_id group by stu.s_id, stu.s_name  order by stu.s_id;

6、查询"李"姓老师的数量

select count(*) 李姓老师的数量 from teacher where t_name like '李%';

7、查询学过"张三"老师授课的同学的信息

select stu.* from student stu
    left join SCORE sc on stu.s_id = sc.s_id
    left join course c on sc.c_id = c.c_id
    left join teacher t on c.t_id = t.t_id
where t_name = '张三';

8、查询没学过"张三"老师授课的同学的信息

select stu.* from student stu where stu.s_id not in
(select stu.s_id from student stu
    left join SCORE sc on stu.s_id = sc.s_id
    left join course c on sc.c_id = c.c_id
    left join teacher t on c.t_id = t.t_id
where t_name = '张三');

9、查询学过编号为"01"并且也学过编号为"02"的课程的同学的信息

select s.* from score sc1 inner join score sc2 on sc1.s_id = sc2.s_id and sc1.c_id = 01
              and sc2.c_id = 02 left join student s on sc1.s_id = s.s_id;

10、查询学过编号为"01"但是没有学过编号为"02"的课程的同学的信息

select * from student stu where s_id in (select s_id from score where c_id = 01)
and s_id not in (select s_id from score where c_id = 02);

11、查询没有学全所有课程的同学的信息

select stu.* from student stu
    left join score sc on stu.s_id = sc.s_id
    group by stu.s_id,s_name,s_birth,s_sex
    having count(sc.c_id) < (select count(course.c_id) from course)
    order by stu.s_id;

12、查询至少有一门课与学号为"01"的同学所学相同的同学的信息

select distinct stu.* from student stu left join score sc on sc.s_id = stu.s_id
    where sc.c_id in (select c_id from score where s_id = 01) order by stu.s_id;

13、查询和"01"号的同学学习的课程完全相同的其他同学的信息

select * from student inner join (select sc1.s_id from score sc1 inner join (select c_id from score where s_id = 1) s1
    on sc1.c_id = s1.c_id where s_id != 1
    group by sc1.s_id having count(sc1.c_id) = (select count(score.c_id) from score where s_id = 1)) t
    on student.s_id = t.s_id ;

14、查询没学过"张三"老师讲授的任一门课程的学生姓名

select s.* from student s where s.s_id not in (select stu.s_id from student stu
    left join score sc on stu.s_id = sc.s_id
    left join course c on sc.c_id = c.c_id
    left join teacher t on c.t_id = t.t_id where t.t_name = '张三');

15、查询两门及其以上不及格课程的同学的学号,姓名及其平均成绩

select stu.s_id,stu.s_name,avg(sc.s_score) from student stu
    left join score sc on stu.s_id = sc.s_id where sc.s_score < 60
    group by stu.s_id, stu.s_name having count(sc.c_id) >= 2;

16、检索"01"课程分数小于60,按分数降序排列的学生信息

select stu.* from student stu left join score sc on stu.s_id = sc.s_id
where sc.c_id = 01 and sc.s_score < 60 order by sc.s_score desc;

17、按平均成绩从高到低显示所有学生的所有课程的成绩以及平均成绩

select stu.s_name 学生姓名,
        sum(case sc.c_id when 1 then sc.s_score else 0 end ) 语文,
        sum(case sc.c_id when 2 then sc.s_score else 0 end ) 数学,
        sum(case sc.c_id when 3 then sc.s_score else 0 end ) 英语,
        nvl(avg(sc.s_score),0) avgscore
from student stu left join score sc on stu.s_id = sc.s_id
group by stu.s_name order by avgscore desc ;

18、查询各科成绩最高分、最低分和平均分:以如下形式显示:课程ID,课程name,最高分,最低分,平均分,及格率,中等率,优良率,优秀率,及格为>=60,中等为:70-80,优良为:80-90,优秀为:>=90

select c.c_id 课程ID,c_name 课程name,
       max(sc.s_score) 最高分,min(sc.s_score) 最低分,
       avg(sc.s_score) 平均分,
       sum(case when sc.s_score > 60 then 1 else 0 end ) /count(sc.s_id) 及格率,
       sum(case when sc.s_score between 70 and 80 then 1 else 0 end ) /count(sc.s_id) 中等率,
       sum(case when sc.s_score between 80 and 90 then 1 else 0 end ) /count(sc.s_id) 优良率,
       sum(case when sc.s_score >= 90 then 1 else 0 end ) /count(sc.s_id) 优秀率
from score sc left join course c on sc.c_id = c.c_id group by c.c_id, c_name order by 课程ID;

19、按各科成绩进行排序,并显示排名

select stu.s_name,sc.c_id,sc.s_score,rank() over (partition by sc.c_id order by s_score desc) 排名
from score sc left join student stu on sc.s_id = stu.s_id order by sc.c_id,s_score desc ;

20、查询学生的总成绩并进行排名

select stu.s_name,nvl(sum(sc.s_score),0) sumscore from student stu
    left join score sc on stu.s_id = sc.s_id
group by stu.s_name,stu.s_id order by sumscore desc;

21、查询不同老师所教不同课程平均分从高到低显示

select t.t_name,c.c_name,avg(sc.s_score) avgscore from score sc
    left join course c on sc.c_id = c.c_id
    left join teacher t on c.t_id = t.t_id
    group by t.t_name, c.c_name order by avgscore desc ;

22、查询所有课程的成绩第2名到第3名的学生信息及该课程成绩

select * from (select stu.*,sc.c_id,sc.s_score from student stu left join score sc on stu.s_id = sc.s_id
where c_id = 1 order by sc.s_score desc) where ROWNUM <= 2
union select * from (select stu.*,sc.c_id,sc.s_score from student stu left join score sc on stu.s_id = sc.s_id
where c_id = 2 order by sc.s_score desc) where rownum <= 2
union select * from (select stu.*,sc.c_id,sc.s_score from student stu left join score sc on stu.s_id = sc.s_id
where c_id = 3 order by sc.s_score desc) where rownum <= 2 ;

23、统计各科成绩各分数段人数:课程编号,课程名称, 100-85 , 85-70 , 70-60 , 0-60 及所占百分比

select sc.c_id 课程编号,c.c_name 课程名称,
       sum(case when s_score between 85 and 100 then 1 else 0 end) "100-85",
       sum(case when s_score between 85 and 100 then 1 else 0 end) /count(sc.s_id)*100 "100-85占比",
       sum(case when s_score between 70 and 85 then 1 else 0 end) "100-85",
       sum(case when s_score between 70 and 85 then 1 else 0 end) /count(sc.s_id)*100 "85-70占比",
       sum(case when s_score between 60 and 70 then 1 else 0 end) "100-85",
       sum(case when s_score between 60 and 70 then 1 else 0 end) /count(sc.s_id)*100 "70-60占比",
       sum(case when s_score between 0 and 60 then 1 else 0 end) "100-85",
       sum(case when s_score between 0 and 60 then 1 else 0 end) /count(sc.s_id)*100 "0-60占比"
       from score sc left join course c on sc.c_id = c.c_id group by sc.c_id, c.c_name order by 课程编号;

24、查询学生平均成绩及其名次

select sc.s_id,stu.s_name,avg(sc.s_score) avgscore,
       rank() over (order by avg(sc.s_score) desc) 排名 from score sc
    left join student stu on sc.s_id = stu.s_id
    group by stu.s_name,sc.s_id order by avgscore desc ;

25、查询各科成绩前三名的记录

select * from (select sc.s_id,stu.s_name,c.c_name,sc.s_score from score sc
    left join student stu on sc.s_id = stu.s_id
    left join course c on sc.c_id = c.c_id where c.c_id = 1
    group by sc.s_id, stu.s_name, c.c_name, sc.s_score order by sc.s_score desc,sc.s_id)
    where rownum <= 3
union all select * from (select sc.s_id,stu.s_name,c.c_name,sc.s_score from score sc
    left join student stu on sc.s_id = stu.s_id
    left join course c on sc.c_id = c.c_id where c.c_id = 2
    group by sc.s_id, stu.s_name, c.c_name, sc.s_score order by sc.s_score desc,sc.s_id)
    where rownum <= 3
union all select * from (select sc.s_id,stu.s_name,c.c_name,sc.s_score from score sc
    left join student stu on sc.s_id = stu.s_id
    left join course c on sc.c_id = c.c_id where c.c_id = 3
    group by sc.s_id, stu.s_name, c.c_name, sc.s_score order by sc.s_score desc,sc.s_id)
    where rownum <=3 ;

26、查询每门课程被选修的学生数

select c.c_name,count(sc.c_id) 学生数 from score sc
    left join course c on sc.c_id = c.c_id group by c.c_name;

27、查询出只有两门课程的全部学生的学号和姓名

select stu.s_id,stu.s_name from score sc
    left join student stu on sc.s_id = stu.s_id
group by stu.s_id, stu.s_name having count(sc.c_id) = 2;

28、查询男生、女生人数

select s_sex,count(*) 人数 from student group by s_sex;

29、查询名字中含有"风"字的学生信息

select * from student where s_name like '%风%';

30、查询同名同性学生名单,并统计同名人数

select count(*) 同名同性学生人数 from student stu1
    join student stu2 on stu1.s_id=stu2.s_id and stu1.s_sex = stu2.s_sex
    and stu1.s_id != stu2.s_id;

31、查询1990年出生的学生名单

select * from student where to_char(s_birth,'yyyy-MM-dd') like '%1990%';

32、查询每门课程的平均成绩,结果按平均成绩降序排列,平均成绩相同时,按课程编号升序排列

select sc.c_id,c.c_name, avg(sc.s_score) avgscore from score sc
left join course c on sc.c_id = c.c_id
group by sc.c_id,c.c_name order by avgscore desc ,sc.c_id asc;

33、查询平均成绩大于等于85的所有学生的学号、姓名和平均成绩

select stu.s_id, s_name, avg(sc.s_score) avgscore from student stu
    left join score sc on stu.s_id = sc.s_id
    group by stu.s_id, s_name having avg(sc.s_score) >=85;

34、查询课程名称为"数学",且分数低于60的学生姓名和分数

select stu.s_name,sc.s_score from student stu
    left join score sc on stu.s_id = sc.s_id
    left join course c on sc.c_id = c.c_id
    where c_name = '数学' and s_score < 60;

35、查询所有学生的课程及分数情况;

select stu.s_id,s_name,
       nvl(sum(case sc.c_id when 1 then sc.s_score end ),0) 语文,
       nvl(sum(case sc.c_id when 2 then sc.s_score end ),0) 数学,
       nvl(sum(case sc.c_id when 3 then sc.s_score end ),0) 英语
    from student stu
    left join score sc on stu.s_id = sc.s_id
    left join course c on sc.c_id = c.c_id
    group by stu.s_id, s_name order by s_id;

36、查询任何一门课程成绩在70分以上的姓名、课程名称和分数;

select stu.s_name,c.c_name,sc.s_score from student stu
    left join score sc on stu.s_id = sc.s_id
    left join course c on sc.c_id = c.c_id
    where s_score > 70;

37、查询课程不及格的学生

select stu.s_name,c.c_name,sc.s_score from student stu
    left join score sc on stu.s_id = sc.s_id
    left join course c on sc.c_id = c.c_id
    where s_score < 60;

38、查询课程编号为01且课程成绩在80分以上的学生的学号和姓名;

select stu.s_id,stu.s_name from student stu
    left join score sc on stu.s_id = sc.s_id
    where sc.c_id = 1 and sc.s_score >= 80;

39、求每门课程的学生人数

select c.c_name,count(sc.s_id) 学生人数 from score sc
    left join course c on sc.c_id = c.c_id
    group by c.c_name;

40、查询选修"张三"老师所授课程的学生中,成绩最高的学生信息及其成绩

select stu.*,select1.maxstu from student stu
    left join score sc on stu.s_id = sc.s_id
    left join course c on sc.c_id = c.c_id
    left join
    (select c.c_id,max(s_score) maxstu from student stu
    left join score sc on stu.s_id = sc.s_id
    left join course c on sc.c_id = c.c_id
    left join teacher t on c.t_id = t.t_id
    where t.t_name = '张三' group by c.c_id) select1 on c.c_id = select1.c_id
    where sc.s_score = select1.maxstu;

41、查询不同课程成绩相同的学生的学生编号、课程编号、学生成绩

Select sc1.s_id,sc1.c_id,sc1.s_score From score sc1 left join
    (select sc.s_score from score sc
group by sc.s_score having count(sc.s_score)>1) b  on sc1.s_score = b.s_score
Where sc1.s_score = b.s_score;

42、查询每门功课成绩最好的前两名

select * from (select stu.s_id,stu.s_name,c.c_name,sc.s_score from student stu
    left join score sc on stu.s_id = sc.s_id
    left join course c on sc.c_id = c.c_id where sc.c_id = 1
    group by stu.s_id, stu.s_name, c.c_name, sc.s_score
    order by sc.s_score desc,s_id) where rownum <= 2
union all select * from (select stu.s_id,stu.s_name,c.c_name,sc.s_score from student stu
    left join score sc on stu.s_id = sc.s_id
    left join course c on sc.c_id = c.c_id where sc.c_id = 2
    group by stu.s_id, stu.s_name, c.c_name, sc.s_score
    order by sc.s_score desc,s_id) where rownum <=2
union all select * from (select stu.s_id,stu.s_name,c.c_name,sc.s_score from student stu
    left join score sc on stu.s_id = sc.s_id
    left join course c on sc.c_id = c.c_id where sc.c_id = 3
    group by stu.s_id, stu.s_name, c.c_name, sc.s_score
    order by sc.s_score desc,s_id) where rownum <= 2;

43、统计每门课程的学生选修人数(超过5人的课程才统计)。要求输出课程号和选修人数,查询结果按人数降序排列,若人数相同,按课程号升序排列

select sc.c_id,count(sc.s_id) 选修人数 from score sc
    group by sc.c_id  having count(sc.s_id) > 5 order by 选修人数 desc ,sc.c_id asc;

44、检索至少选修两门课程的学生学号

select s_id from score group by s_id having count(score.c_id) >= 2 order by s_id;

45、查询选修了全部课程的学生信息

select stu.* from student stu
    left join score sc on stu.s_id = sc.s_id
    group by stu.s_id,s_name,s_birth,s_sex
    having count(sc.c_id) = (select count(*) from course) order by stu.s_id;

46、查询各学生的年龄

select s_name,to_char(sysdate,'yyyy')-to_char(s_birth,'yyyy') 年龄  from student;

47、查询本周过生日的学生

select * from student where to_char(s_birth,'Iw') = to_char(sysdate,'Iw');

48、查询下周过生日的学生

select * from student where to_char(s_birth,'Iw') =to_char(sysdate,'Iw')+ 1;

49、查询本月过生日的学生

select * from student where to_char(s_birth,'MM') = to_char(sysdate,'MM');

50、查询下月过生日的学生

select * from student where to_char(s_birth,'MM') = to_char(sysdate,'MM') + 1;
select * from student;

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/186396.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

A-Star算法探索和实现(五)

本篇摘要在上一篇中我们对寻路的移动规则进行了制定&#xff0c;而在本篇我们将对最佳路径的查找方式进行优化&#xff0c;而这就会涉及到移动规则的检测改进、权值计算的改进、NextNode集的处理改进、寻路逻辑的改进&#xff0c;我们将从上述四个方面进行详细讲解。方案探讨&a…

3.堆排序和比较器

1. 堆 堆结构就是用数组实现的完全二叉树结构&#xff0c;对于结点i&#xff0c;左孩子2*i1、右孩子2*i2、父节点&#xff08;i-1&#xff09;/ 2。 完全二叉树中如果每棵子树的最大值都在顶部就是大根堆 完全二叉树中如果每棵子树的最小值都在顶部就是小根堆堆结构的heapInse…

【C++算法图解专栏】一篇文章带你入门二分算法

✍个人博客&#xff1a;https://blog.csdn.net/Newin2020?spm1011.2415.3001.5343 &#x1f4e3;专栏定位&#xff1a;为 0 基础刚入门数据结构与算法的小伙伴提供详细的讲解&#xff0c;也欢迎大佬们一起交流~ &#x1f4da;专栏地址&#xff1a;https://blog.csdn.net/Newin…

步进式PID控制算法及仿真

在较大阶跃响应时&#xff0c;很容易产生超调。采用步进式积分分离PID控制&#xff0c;该方法不直接对阶跃信号进行响应&#xff0c;而是使输入指令信号一步一步地逼近所要求的阶跃信号&#xff0c;可使对象运行平稳&#xff0c;适用于高精度伺服系统的位置跟踪。在步进式PID控…

【数据手册】CH340G芯片使用介绍

1.概述 CH340是一系列USB总线适配器&#xff0c;它通过USB总线提供串行、并行或IrDA接口。CH340G集成电路提供通用的MODEM信号&#xff0c;允许将UART添加到计算机上&#xff0c;或将现有的UART设备转换为USB接口。 2.特征 全速USB接口&#xff0c;兼容USB 2.0接口。使用最小…

Android核心技术【SystemServer加载AMS】

启动流程 Init 初始化Linux 层&#xff0c;处理部分服务 挂载和创建系统文件 解析rc文件&#xff1a; rc 文件中有很多action 进入无限循环 执行action&#xff1a;zygote 进程就在这里启动 for循环去解析参数&#xff0c;根据rc 文件中的action 执行相应操作 检测并重启需要…

细谈文件操作

该文章将详细的介绍文件操作这方面的知识&#xff0c;文件的打开&#xff0c;关闭&#xff0c;读取&#xff0c;写入&#xff0c;以及相关的函数都会在本文一一介绍&#xff0c;干货满满喔&#xff01;1.为什么使用文件2.什么是文件2.1程序文件2.2数据文件2.3文件名3.文件的打开…

SpringBoot(java)操作elasticsearch

elasticsearch我已经装了ik&#xff0c;中文分词器。已经使用容器搭建了集群。之前在我的博客-elasticsearch入门中&#xff0c;已经介绍了http请求操纵es的基本功能&#xff0c;java API功能和他一样&#xff0c;只是从http请求换成了javaApi操作。springBoot里继承了elastics…

蓝桥杯算法训练合集八 1.数的划分2.求先序排列3.平方计算4.三角形高5.单词复数

目录 1.数的划分 2.求先序排列 3.平方计算 4.三角形高 5.单词复数 1.数的划分 问题描述 将整数n分成k份&#xff0c;且每份不能为空&#xff0c;任意两份不能相同(不考虑顺序)。 例如&#xff1a;n7&#xff0c;k3&#xff0c;下面三种分法被认为是相同的。 1&#xff0c…

关于宏文档开启宏后还是不能正常使用问题

1.问题 2.开启宏 (62条消息) [Win10Excel365]尽管已启用VBA宏&#xff0c;Excel还是无法运行宏_逍遥猴哥的博客-CSDN博客 3. 问题还是没解决 发现可能是字体显示乱码&#xff0c;导致vba运行找不到争取路径 VBA编辑器中中文乱码的解决办法&#xff1a;1、依次点击【工具→选项…

如何写一个命令行解释器(SHELL)

文章目录前言什么是命令行解释器 ——SHELLSHELL的结构void print_info(char ** env) //打印命令行信息函数void read_comand(char **buffer) //读取指令函数char **split_line(char *buffer, int *flag) //分割字符串函数int excute_line(char **buffer, int flag) // 执行指令…

Redis 安全汇总小结

Redis redis 是一个C语言编写的 key-value 存储系统&#xff0c;可基于内存亦可持久化的日志型、Key-Value数据库&#xff0c;并提供多种语言的API。它通常被称为数据结构服务器&#xff0c;因为值&#xff08;value&#xff09;可以是 字符串(String), 哈希(Hash), 列表(list…

电子技术——基本MOS放大器配置

电子技术——基本MOS放大器配置 上一节我们探究了一种MOS管的放大器实现&#xff0c;其实MOS放大器还有许多变种配置&#xff0c;在本节我们学习最基本的三大MOS放大器配置&#xff0c;分别是共栅极&#xff08;CG&#xff09;、共漏极&#xff08;CD&#xff09;、共源极&…

【MSSQL】分析数据库日志文件无法收缩的问题

一、问题描述 在SQL Server 2008R2数据库中&#xff0c;无法对数据库日志进行收缩&#xff0c;导致日志不断膨胀。 二、问题分析 由于是日志文件不断增大且无法收缩&#xff0c;所以初步判断为存在未提交的事务。检查可能阻止日志阶段的活动事务&#xff0c;执行&#xff1a…

使用 JMX 连接远程服务进行监测

使用 JMX 连接远程服务进行监测1.JVM参数2.启动脚本3.演示使用相关JMX工具连接部署在服务器上的Java应用&#xff0c;可以对应用的内存使用量&#xff0c;CPU占用率和线程等信息进行监测。相关监测工具有jconsole&#xff0c;jprofiler&#xff0c;jvisualvm等。1.JVM参数 监测…

本地镜像发布到阿里云

1、找到阿里云控制台中的容器镜像服务&#xff0c;进入个人版 2、先创建命名空间&#xff0c;再创建镜像仓库 记住创建时设置的密码&#xff0c;选择创建本地的镜像仓库 建完之后&#xff0c;选择管理 进入后的界面如下 内容如下&#xff1a; 1. 登录阿里云Docker Registry $…

547、RocketMQ详细入门教程系列 -【消息队列之 RocketMQ(一)】 2023.01.30

目录一、RocketMQ 特点二、基本概念2.1 生产者2.2 消费者2.3 消息服务器2.4 名称服务器三、参考链接一、RocketMQ 特点 RocketMQ 是阿里巴巴在2012年开源的分布式消息中间件&#xff0c;目前已经捐赠给 Apache 软件基金会&#xff0c;并于2017年9月25日成为 Apache 的顶级项目…

【自然语言处理】【大模型】PaLM:基于Pathways的大语言模型

PaLM&#xff1a;基于Pathways的大语言模型《PaLM: Scaling Language Modeling with Pathways》论文地址&#xff1a;https://arxiv.org/pdf/2204.02311.pdf 相关博客 【自然语言处理】【大模型】PaLM&#xff1a;基于Pathways的大语言模型 【自然语言处理】【chatGPT系列】大语…

电脑重装系统后找不到硬盘怎么办

有网友的win10系统电脑出了系统故障进行了重装&#xff0c;但是又发现了重装系统后找不到硬盘的新问题&#xff0c;那么重装系统后找不到硬盘怎么办呢? 工具/原料&#xff1a; 系统版本&#xff1a;win10专业版 品牌型号&#xff1a;戴尔成就5880 方法/步骤&#xff1a; …

使用FFmpeg工具进行推流、拉流、截图、变速、转换,及常见问题处理

下载安装 FFmpeg下载官网&#xff1a;FFmpeg &#xff0c;这里提供了官网下载的windows环境 4.1.3版本&#xff1a;https://download.csdn.net/download/qq_43474959/12311422 下载后&#xff0c;配置环境变量&#xff0c;将bin文件地址加入到path中&#xff1a; 测试 在cmd…