AP CSA FRQ Q2 Past Paper 五年真题汇总 2023-2019
Author(wechat): bigshuang2020
ap csa tutor, providing 1-on-1 tutoring.
国际教育计算机老师, 擅长答疑讲解,带学生实践学习。
热爱创作,作品:ap csa原创双语教案,真题梳理汇总, AP CSA FRQ专题冲刺, AP CSA MCQ小题狂练。
2023 FRQ Q2 Sign
This question involves methods that distribute text across lines of an electronic sign. The electronic sign and the text to be displayed on it are represented by the Sign
class. You will write the complete Sign
class, which contains a constructor and two methods.
The Sign
class constructor has two parameters. The first parameter is a String
that contains the message to be displayed on the sign. The second parameter is an int
that contains the w i d t h width width of each line of the sign. The width is the positive maximum number of characters that can be displayed on a single line of the sign.
A sign contains as many lines as are necessary to display the entire message. The message is split among the lines of the sign without regard to spaces or punctuation. Only the last line of the sign may contain fewer characters than the width indicated by the constructor parameter
The following are examples of a message displayed on signs of different widths. Assume that in each example, the sign is declared with the width specified in the first column of the table and with the message "Everything on sale,please come in"
, which contains 34 characters.
In addition to the constructor, the Sign
class contains two methods.
The numberOfLines
method returns an int
representing the number of lines needed to display the text on the sign. In the previous examples, numberOfLines
would return 3, 2, and 1, respectively for the sign widths shown in the table.
The getLines
method returns a String
containing the message broken into lines separated by semicolons (😉 or returns null
if the message is the empty string. The constructor parameter that contains the message to be displayed will not include any semicolons. As an example, in the first row of the preceding table, getLines
would return "Everything on s;ale, please com;e in"
.No semicolon should appear at the end of the String
returned by getLines
.
The following table contains a sample code execution sequence and the corresponding results. The code execution sequence appears in a class other than Sign
.
Statement | Method Call Return Value (blank if none) | Explanation |
---|---|---|
String str; | ||
int x; | ||
Sign sign1 = new Sign("ABC222DE", 3); | The message for sign1 contains 8 characters, and the sign has lines of width 3. | |
x = sign1.numberOfLines(); | 3 | The sign needs three lines to display the 8-character message on a sign with lines of width 3. |
str = sign1.getLines(); | "ABC;222;DE" | Semicolons separate the text displayed on the first, second, and third lines of the sign. |
str = sign1.getLines(); | "ABC;222;DE" | Successive calls to getLines return the same value. |
Sign sign2 = new Sign("ABCD", 10); | The message for sign2 contains 4 characters, and the sign has lines of width 10. | |
x = sign2.numberOfLines(); | 1 | The sign needs one line to display the 4-character message on a sign with lines of width 10. |
str = sign2.getLines(); | "ABCD" | No semicolon appears, since the text to be displayed fits on the first line of the sign. |
Sign sign3 = new Sign("ABCDEF", 6); | The message for sign3 contains 6 characters, and the sign has lines of width 6. | |
x = sign3.numberOfLines(); | 1 | The sign needs one line to display the 6-character message on a sign with lines of width 6. |
str = sign3.getLines(); | "ABCDEF" | No semicolon appears, since the text to be displayed fits on the first line of the sign. |
Sign sign4 = new Sign("", 4); | The message for sign4 is an empty string. | |
x = sign4.numberOfLines(); | 0 | There is no text to display. |
str = sign4.getLines(); | null | There is no text to display. |
Sign sign5 = new Sign("AB_CD_EF", 2); | The message for sign5 contains 8 characters, and the sign has lines of width 2. | |
x = sign5.numberOfLines(); | 4 | The sign needs four lines to display the 8-character message on a sign with lines of width 2. |
str = sign5.getLines(); | "AB;_C;D_;EF" | Semicolons separate the text displayed on the four lines of the sign. |
Write the complete Sign
class. Your implementation must meet all specifications and conform to theexamples shown in the preceding table.
2022 FRQ Q2 Book & Textbook
The Book
class is used to store information about a book.
A partial Book
class definition is shown.
public class Book {/** The title of the book */private String title;/** The price of the book */private double price;/** Creates a new Book with given title and price */public Book(String bookTitle, double bookPrice) {/* implementation not shown */}/** Returns the title of the book */public String getTitle() {return title;}/** Returns a string containing the title and price of the Book */public String getBookInfo() {return title + "-" + price;}// There may be instance variables, constructors, and methods that are not shown.
}
You will write a class Textbook
, which is a subclass of Book
.
A Textbook
has an edition number, which is a positive integer used to identify different versions of the book.
The getBookInfo
method, when called on a Textbook
, returns a string that also includes the edition information, as shown in the example.
Information about the book title and price must be maintained in the Book
class.
Information about the edition must be maintained in the Textbook
class.
The Textbook
class contains an additional method, canSubstituteFor
, which returns true
if a Textbook
is a valid substitute for another Textbook
and returns false
otherwise.
The current Textbook
is a valid substitute for the Textbook
referenced by the parameter of the canSubstituteFor
method if the two Textbook
objects have the same title and if the edition of the current Textbook
is greater than or equal to the edition of the parameter.
The following table contains a sample code execution sequence and the corresponding results.
The code execution sequence appears in a class other than Book
or Textbook
.
Statement | Value Returned (blank if no value) | Class Specification |
---|---|---|
Textbook bio2015 = new Textbook("Biology", 49.75, 2); | bio2015 is a Textbook with a title of "Biology" , a price of 49.75 , and an edition of 2 . | |
Textbook bio2019 = new Textbook("Biology", 39.75, 3); | bio2019 is a Textbook with a title of "Biology" , a price of 39.75 , and an edition of 3 . | |
bio2019.getEdition(); | 3 | The edition is returned. |
bio2019.getBookInfo(); | "Biology-39.75-3" | The formatted string containing the title, price, and edition of bio2019 is returned. |
bio2019.canSubstituteFor(bio2015); | true | bio2019 is a valid substitute for bio2015 , since their titles are the same and the edition of bio2019 is greater than or equal to the edition of bio2015 . |
bio2015.canSubstituteFor(bio2019); | false | bio2015 is not a valid substitute for bio2019 , since the edition of bio2015 is less than the edition of bio2019 . |
Textbook math = new Textbook("Calculus", 45.25, 1); | math is a Textbook with a title of "Calculus" , a price of 45.25 , and an edition of 1 . | |
bio2015.canSubstituteFor(math); | false | bio2015 is not a valid substitute for math , since the title of bio2015 is not the same as the title of math . |
Write the complete Textbook
class. Your implementation must meet all specifications and conform to the examples shown in the preceding table.
2021 FRQ Q2 SingleTable
- The class
SingleTable
represents a table at a restaurant.
public class SingleTable {/*** Returns the number of seats at this table. The value is always greater than or equal to 4.*/public int getNumSeats() { /*implementation not shown*/ }/*** Returns the height of this table in centimeters.*/public int getHeight() { /*implementation not shown*/ }/*** Returns the quality of the view from this table.*/public double getViewQuality() { /*implementation not shown*/ }/*** Sets the quality of the view from this table to value.*/public void setViewQuality(double value) { /*implementation not shown*/ }// There may be instance variables, constructors, and methods that are not shown.
}
At the restaurant, customers can sit at tables that are composed of two single tables pushed together. You will write a class CombinedTable
to represent the result of combining two SingleTable
objects, based on the following rules and the examples in the chart that follows.
- A
CombinedTable
can seat a number of customers that is two fewer than the total number of seats in its twoSingleTable
objects (to account for seats lost when the tables are pushed together). - A
CombinedTable
has a desirability that depends on the views and heights of the two single tables. If the two single tables of aCombinedTable
object are the same height, the desirability of theCombinedTable
object is the average of the view qualities of the two single tables. - If the two single tables of a
CombinedTable
object are not the same height, the desirability of theCombinedTable
object is 10 units less than the average of the view qualities of the two single tables.
Assume SingleTable
objects t1
, t2
, and t3
have been created as follows.
SingleTable t1
has 4 seats, a view quality of 60.0, and a height of 74 centimeters.SingleTable t2
has 8 seats, a view quality of 70.0, and a height of 74 centimeters.SingleTable t3
has 12 seats, a view quality of 75.0, and a height of 76 centimeters.
The chart contains a sample code execution sequence and the corresponding results.
Statement | Value Returned (blank if no value) | Class Specification |
---|---|---|
CombinedTable c1 = new CombinedTable(t1, t2); | A CombinedTable is composed of two SingleTable objects. | |
c1.canSeat(9); | true | Since its two single tables have a total of 12 seats, c1 can seat 10 or fewer people. |
c1.canSeat(11); | false | c1 cannot seat 11 people. |
c1.getDesirability(); | 65.0 | Because c1 ’s two single tables are the same height, its desirability is the average of 60.0 and 70.0. |
CombinedTable c2 = new CombinedTable(t2, t3); | A CombinedTable is composed of two SingleTable objects. | |
c2.canSeat(18); | true | Since its two single tables have a total of 20 seats, c2 can seat 18 or fewer people. |
c2.getDesirability(); | 62.5 | Because c2 ’s two single tables are not the same height, its desirability is 10 units less than the average of 70.0 and 75.0. |
t2.setViewQuality(80); | Changing the view quality of one of the tables that makes up c2 changes the desirability of c2 , as illustrated in the next line of the chart. Since setViewQuality is a SingleTable method, you do not need to write it. | |
c2.getDesirability(); | 67.5 | Because the view quality of t2 changed, the desirability of c2 has also changed. |
The last line of the chart illustrates that when the characteristics of a SingleTable
change, so do those of the CombinedTable
that contains it.
Write the complete CombinedTable
class. Your implementation must meet all specifications and conform to the examples shown in the preceding chart.
2020 FRQ Q2 GameSpinner
This question involves the creation and use of a spinner to generate random numbers in a game.
A GameSpinner
object represents a spinner with a given number of sectors, all equal in size.
The GameSpinner
class supports the following behaviors.
- Creating a new spinner with a specified number of sectors
- Spinning a spinner and reporting the result
- Reporting the length of the c u r r e n t r u n current run currentrun, the number of consecutive spins that are the same as the most recent spin
The following table contains a sample code execution sequence and the corresponding results.
Statements | Value Returned (blank if no value returned) | Comment |
---|---|---|
GameSpinner g = new GameSpinner(4); | Creates a new spinner with four sectors. | |
g.currentRun(); | 0 | Returns the length of the current run. The length of the current run is initially 0 because no spins have occurred. |
g.spin(); | 3 | Returns a random integer between 1 and 4, inclusive. In this case, 3 is returned. |
g.currentRun(); | 1 | The length of the current run is 1 because there has been one spin of 3 so far. |
g.spin(); | 3 | Returns a random integer between 1 and 4, inclusive. In this case, 3 is returned. |
g.currentRun(); | 2 | The length of the current run is 2 because there have been two 3s in a row. |
g.spin(); | 4 | Returns a random integer between 1 and 4, inclusive. In this case, 4 is returned. |
g.currentRun(); | 1 | The length of the current run is 1 because the spin of 4 is different from the value of the spin in the previous run of two 3s. |
g.spin(); | 3 | Returns a random integer between 1 and 4, inclusive. In this case, 3 is returned. |
g.currentRun(); | 1 | The length of the current run is 1 because the spin of 3 is different from the value of the spin in the previous run of one 4. |
g.spin(); | 1 | Returns a random integer between 1 and 4, inclusive. In this case, 1 is returned. |
g.spin(); | 1 | Returns a random integer between 1 and 4, inclusive. In this case, 1 is returned. |
g.spin(); | 1 | Returns a random integer between 1 and 4, inclusive. In this case, 1 is returned. |
g.currentRun(); | 3 | The length of the current run is 3 because there have been three consecutive 1s since the previous run of one 3. |
Write the complete GameSpinner
class. Your implementation must meet all specifications and conform to the example.
2019 FRQ Q2 StepTracker
This question involves the implementation of a fitness tracking system that is represented by the StepTracker
class. A StepTracker
object is created with a parameter that defines the minimum number of steps that must be taken for a day to be considered active.
The StepTracker
class provides a constructor and the following methods
addDailySteps
, which accumulates information about steps, in readings taken once per dayactiveDays
, which returns the number of active daysaverageSteps
, which returns the average number of steps per day, calculated by dividing thetotal number of steps taken by the number of days tracked
The following table contains a sample code execution sequence and the corresponding results.
Statements and Expressions | Value Returned (blank if no value) | Comment |
---|---|---|
StepTracker tr = new StepTracker(10000); | Days with at least 10,000 steps are considered active. Assume that the parameter is positive. | |
tr.activeDays(); | 0 | No data have been recorded yet. |
tr.averageSteps(); | 0.0 | When no step data have been recorded, the averageSteps method returns 0.0 . |
tr.addDailySteps(9000); | This is too few steps for the day to be considered active. | |
tr.addDailySteps(5000); | This is too few steps for the day to be considered active. | |
tr.activeDays(); | 0 | No day had at least 10,000 steps. |
tr.averageSteps(); | 7000.0 | The average number of steps per day is (14000 / 2) . |
tr.addDailySteps(13000); | This represents an active day. | |
tr.activeDays(); | 1 | Of the three days for which step data were entered, one day had at least 10,000 steps. |
tr.averageSteps(); | 9000.0 | The average number of steps per day is (27000 / 3) . |
tr.addDailySteps(23000); | This represents an active day. | |
tr.addDailySteps(1111); | This is too few steps for the day to be considered active. | |
tr.activeDays(); | 2 | Of the five days for which step data were entered, two days had at least 10,000 steps. |
tr.averageSteps(); | 10222.2 | The average number of steps per day is (51111 / 5) . |
Write the complete StepTracker
class, including the constructor and any required instance variables and methods. Your implementation must meet all specifications and conform to the example.
相关文章:
AP CSA FRQ Q2 Past Paper 五年真题汇总 2023-2019
Author(wechat): bigshuang2020 ap csa tutor, providing 1-on-1 tutoring. 国际教育计算机老师, 擅长答疑讲解,带学生实践学习。 热爱创作,作品:ap csa原创双语教案,真题梳理汇总, AP CSA FRQ专题冲刺, AP CSA MCQ小题…...
海量数据场景题--查找两个大文件的URL
查找两个大文件共同的URL 给定 a、b 两个文件,各存放 50 亿个 URL,每个 URL 各占 64B,找出 a、b 两个文件共同的 URL。内存限制是 4G。 操作逻辑: 使用哈希函数 hash(URL) % 1000 将每个URL映射到0-999的编号 文件A切割为a0, a1…...
Spring AI Alibaba 工具(Function Calling)使用
一、工具(Function Calling)简介 Spring AI Alibaba工具(Function Calling):https://java2ai.com/docs/1.0.0-M6.1/tutorials/function-calling/ 1、工具(Function Calling) “工具(Tool)”或“功能调用(Function Calling…...
汽车方向盘开关功能测试的技术解析
随着汽车智能化与电动化的发展,方向盘开关的功能日益复杂化,从传统的灯光、雨刷控制到智能语音、自动驾驶辅助等功能的集成,对开关的可靠性、耐久性及安全性提出了更高要求。本文结合北京沃华慧通测控技术有限公司(以下简称“慧通…...
9-100V输入替代CYT5030/LM5030高压双路电流模式PWM控制器
产品描述: PC3530高压 PWM 控制器包含实现推挽和桥式拓扑所需的所有功能,采用电流模式控制,提供两个交替栅极驱动器输出。PC3530内置高压启动稳压器,可在 9V~100V 的宽输入电压范围内工作。芯片内部还集成有误差放大器、精密基准、两级过流保…...
详细讲解c++中线程类thread的实现,stl源码讲解之thread
Thread 本节我们来详细介绍一下c中的线程类thread,在讲解的过程中会用到大量模板的知识,可以去看c详解模板泛型编程,详解类模板的实现为什么不能放在cpp文件_泛型函数 cpo-CSDN博客 源码: template <class _Fn, class... _Args, enable_…...
PostgreSQL详解
第一章:环境部署与基础操作 1.1 多平台安装详解 Windows环境 图形化安装 下载EnterpriseDB安装包(含pgAdmin) 关键配置项说明: # postgresql.conf优化项 max_connections 200 shared_buffers 4GB work_mem 32MB 服务管理命…...
系统思考—第五项修炼
感谢【汇丰】邀请,为其高阶管理者交付系统思考系列项目。这不仅是一次知识的传递,更是一次认知的升级。 系统思考,作为《第五项修炼》的核心能力,正在帮助越来越多的管理者突破碎片化决策的困局,建立看见全貌的智慧与…...
如何使用QuickAPI生成带参数的数据API(基于原生SQL)
目录 一、示例表结构 二、准备工作 三、创建带参数的数据API 步骤 1:登录 QuickAPI 平台 步骤 2:连接数据库 步骤 3:配置基础信息 步骤 4:编写 SQL 并添加参数 步骤 5:测试并发布API 步骤 6:验证A…...
RHINO 转 STL,解锁 3D 打印与工业应用新通道
一、RHINO 格式介绍 RHINO 是一款功能强大的三维建模软件,其对应的文件格式(.3dm)能够精确地存储复杂的三维模型数据。它支持多种几何类型,包括 NURBS(非均匀有理 B 样条曲线)、多边形网格等。这种格式的优…...
PySide6属性选择器设置样式避坑
总所周知,Qt中qss语法支持属性选择器,通过setProperty设置key和value,支持在多种样式之前切换。今天使用了一下PySide6的属性选择器,发现了一个问题。完整代码见最后。 首先,先写一段qss样式,用来设置按键样…...
BKA-CNN-BiLSTM、CNN-BiLSTM、BiLSTM、CNN四模型多变量时序光伏功率预测,附模型报告
BKA-CNN-BiLSTM、CNN-BiLSTM、BiLSTM、CNN四模型多变量时序光伏功率预测,附模型报告 目录 BKA-CNN-BiLSTM、CNN-BiLSTM、BiLSTM、CNN四模型多变量时序光伏功率预测,附模型报告预测效果基本介绍程序设计参考资料 预测效果 基本介绍 BKA-CNN-BiLSTM、CNN-…...
ADS 学习和培训资源 - Keysight ADS
在 Signal Edge Solutions,我们是 Keysight ADS 的忠实用户,因此我们明白,使用和学习这款强大的仿真工具有时可能非常困难。 因此,我们编制了一份清单,列出了一些我们最喜欢的 ADS 学习和培训资源,以帮助您…...
【leetcode刷题记录】(java)数组 链表 哈希表
文章目录 四、题目之:代码随想录(1) 代码随想录:数组[704. 二分查找](https://leetcode.cn/problems/binary-search/)[27. 移除元素](https://leetcode.cn/problems/remove-element/)暴力解:双指针: [977. 有序数组的平方](https://leetcode.…...
ngx_http_core_root
定义在 src\http\ngx_http_core_module.c static char * ngx_http_core_root(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) {ngx_http_core_loc_conf_t *clcf conf;ngx_str_t *value;ngx_int_t alias;ngx_uint_t …...
大模型在支气管肺癌预测及临床决策中的应用研究报告
目录 一、引言 1.1 研究背景与意义 1.2 研究目的 二、大模型预测支气管肺癌的原理与技术基础 2.1 大模型简介 2.2 数据收集与预处理 2.3 模型训练与优化 三、术前预测 3.1 病情评估 3.1.1 肿瘤大小、位置及分期预测 3.1.2 转移风险预测 3.2 手术风险预测 3.2.1 患…...
机器人原点丢失后找回原点的解决方案与步骤
机器人原点丢失后找回原点的解决方案与步骤 在机器人运行过程中,原点丢失可能导致定位错误、运动失控等问题,常见于机械臂、AGV(自动导引车)、3D打印机等设备。以下是针对原点丢失问题的系统性解决方案及详细步骤,涵盖…...
CSS SEO、网页布局、媒体查询
目录 一、SEO 头部三大标签 1. Title 标签(标题) 核心作用 优化规范 示例 2. Meta Description(描述) 核心作用 优化规范 示例 3. Viewport 标签(视口) 核心作用 优化规范 4. 完整 SEO 头部模…...
SolidJS 深度解析:高性能响应式前端框架
SolidJS 是一个新兴的响应式前端框架,以其极致的性能、简洁的语法和接近原生 JavaScript 的开发体验而闻名。它结合了 React 的声明式 UI 和 Svelte 的编译时优化,同时采用细粒度响应式更新,避免了虚拟 DOM(Virtual DOM࿰…...
基于Spring Boot + Vue的银行管理系统设计与实现
基于Spring Boot Vue的银行管理系统设计与实现 一、引言 随着金融数字化进程加速,传统银行业务向线上化转型成为必然趋势。本文设计并实现了一套基于Spring Boot Vue的银行管理系统,通过模块化架构满足用户、银行职员、管理员三类角色的核心业务需求…...
解决 Ubuntu/Debian 中 `apt-get` 报错 “无法获得锁 /var/lib/dpkg/lock“
问题描述 在 Ubuntu/Debian 系统中运行 sudo apt-get install 或 sudo apt update 时,遇到以下错误: E: 无法获得锁 /var/lib/dpkg/lock - open (11: 资源暂时不可用) E: 无法锁定管理目录(/var/lib/dpkg/),是否有其他进程正占用它&#…...
OpenGL 着色器
一、着色器基础结构 版本声明与入口函数 首行版本声明:必须指定 GLSL 版本和模式(如 #version 450 core)。 #version 450 core // 声明使用 OpenGL 4.5 Core Profile 入口函数:所有着色器的入口均为 main() 函…...
代码随想录刷题day53|(二叉树篇)105.从前序与中序遍历序列构造二叉树(▲
目录 一、二叉树基础知识 二、构造二叉树思路 2.1 构造二叉树流程(先序中序 2.2 递归思路 三、相关算法题目 四、易错点 一、二叉树基础知识 详见:代码随想录刷题day34|(二叉树篇)二叉树的递归遍历-CSDN博客 二、构造二叉…...
【leetcode刷题日记】lc.560-和为 K 的子数组
目录 1.题目 2.代码 1.题目 给你一个整数数组 nums 和一个整数 k ,请你统计并返回 该数组中和为 k 的子数组的个数 。 子数组是数组中元素的连续非空序列。 示例 1: 输入:nums [1,1,1], k 2 输出:2示例 2: 输入…...
计算机期刊推荐 | 计算机-人工智能、信息系统、理论和算法、软件工程、网络系统、图形学和多媒体, 工程技术-制造, 数学-数学跨学科应用
Computers, Materials & Continua 学科领域: 计算机-人工智能、信息系统、理论和算法、软件工程、网络系统、图形学和多媒体, 工程技术-制造, 数学-数学跨学科应用 期刊类型: SCI/SSCI/AHCI 收录数据库: SCI(SCIE),EI,Scopus,知网(CNK…...
K8S安装及部署calico(亲测有用[特殊字符])
一、 基础部署(三台均部署) 1. 关闭防火墙并修改网络为aliyun 要保证网络可以使用,可以将DNS的指向修改为114.114.114.114和8.8.8.8这两个。 systemctl stop firewalld && systemctl disable firewalld sed -i s/enforcing/disabl…...
etcd性能测试
etcd性能测试 本文参考官方文档完成etcd性能测试,提供etcd官方推荐的性能测试方案。 1. 理解性能:延迟与吞吐量 etcd 提供稳定、持续的高性能。有两个因素决定性能:延迟和吞吐量。延迟是完成一项操作所花费的时间。吞吐量是在某个时间段内…...
在shell脚本内部获取该脚本所在目录的绝对路径
目录 需求描述 方法一:使用 dirname 和 readlink 命令 方法二:使用 BASH_SOURCE 变量 方法三:仅使用纯 Bash 实现 需求描述 工作中经常有这样情况,需要在脚本内部获取该脚本自己所在目录的绝对路径。 假如有一个脚本/a/b/c/…...
JavaEE企业级开发 延迟双删+版本号机制(乐观锁) 事务保证redis和mysql的数据一致性 示例
提醒 要求了解或者熟练掌握以下知识点 spring 事务mysql 脏读如何保证缓存和数据库数据一致性延迟双删分布式锁并发编程 原子操作类 前言 在起草这篇博客之前 我做了点功课 这边我写的是一个示例代码 数据层都写成了 mock 的形式(来源于 JUnit5) // Dduo import java.u…...
SCI一区 | Matlab实现DBO-TCN-LSTM-Attention多变量时间序列预测
SCI一区 | Matlab实现DBO-TCN-LSTM-Attention多变量时间序列预测 目录 SCI一区 | Matlab实现DBO-TCN-LSTM-Attention多变量时间序列预测预测效果基本介绍程序设计参考资料 预测效果 基本介绍 1.【SCI一区级】Matlab实现DBO-TCN-LSTM-Attention多变量时间序列预测(程…...
【Python】天气数据可视化
1. Python进行数据可视化 在数据分析和科学计算领域,Python凭借其强大的库和简洁的语法,成为了众多开发者和科研人员的首选工具。数据可视化作为数据分析的重要环节,能够帮助我们更直观地理解数据背后的规律和趋势。本文将详细介绍如何使用P…...
c#的.Net Framework 的console 项目找不到System.Window.Forms 引用
首先确保是建立的.Net Framework 的console 项目,然后天健reference 应用找不到System.Windows.Forms 引用 打开对应的csproj 文件 在第一个PropertyGroup下添加 <UseWindowsForms>true</UseWindowsForms> 然后在第一个ItemGroup 下添加 <Reference Incl…...
Ubuntu 重置密码方法
目录 修改过 root 密码,重置密码的方法没改过 root 密码,重置密码的方法 修改过 root 密码,重置密码的方法 Ubuntu 默认禁用root用户,意思就是安装好Ubuntu系统后,root用户默认是没有密码的,普通用户通过…...
电机控制常见面试问题(二十)
文章目录 一.整流电路绕组接法二.电机为什么需要转速器三.电机转矩产生原理四.电机控制中载波频率大小的确定五.开关周期 Tpwm 一.整流电路绕组接法 为了引出直流的输出,一定要在整流变压器的二次侧引出零线,所以二次侧绕组必须接成星形 一次绕组必须要…...
Linux系统之yum本地仓库创建
目录 一.Linux软件安装 1.Rpm包安装 2.yum本地仓库安装 二.yum本地仓库建立 三.编译 一.Linux软件安装 软件安装共2种安装方式,通过rpm包安装或通过yum仓库库安装。 先下载安装包命令的方式去安装软件包安装结束 得到一个可以执行程序 绝对路径下的程序 1.…...
未来技术的发展趋势与影响分析
区块链技术在版权中的应用越来越受到关注。它的基本原理是通过分布式账本将每一份作品的版权信息储存起来,确保这些信息不可篡改、不可删除。这就意味着,当创作者发布作品时,可以在区块链上登记相关信息。这样,任何人都能验证版权…...
ROS2 架构梳理汇总整理
文章目录 前言正文机器人平台整体架构(ROS2)图一、个人理解整体架构 ROS2架构图一、个人理解ROS2整体架构图二、开发者整理ROS2整体架构图三、Intel整理ROS2整体架构图四、DDS具体架构说明 ROS2 Control架构图一、官方整整理ROS2 Control整体架构 总结 前…...
蓝桥杯算法精讲:二分查找实战与变种解析
适合人群:蓝桥杯备考生 | 算法竞赛入门者 | 二分查找进阶学习者 目录 一、二分查找核心要点 1. 算法思想 2. 适用条件 3. 算法模板 二、蓝桥杯真题实战 例题:分巧克力(蓝桥杯2017省赛) 三、二分查找变种与技巧 1. 查找左边…...
多层感知机实现
激活函数 非线性 ReLU函数 修正线性单元 rectified linear unit relu(x)max(0,x) relu的导数: sigmoid函数 s i g m o i d ( x ) 1 1 e − x sigmoid(x)\frac{1}{1e^{-x}} sigmoid(x)1e−x1 是一个早期的激活函数 缺点是: 幂运算相对耗时&…...
Linux进程控制--进程创建 | 进程终止 | 进程等待 | 进程替换
1.进程创建 现阶段我们知道进程创建有如下两种方式,起始包括在以后的学习中有两种方式也是最常见的: 1、命令行启动命令(程序、指令)。 2、通过程序自身,使用fork函数创建的子进程。 1.1 fork函数 在linux操作系统中,fork函数是…...
Linux 网络编程(二)——套接字编程简介
文章目录 2 Socket 套接字 2.1 什么是 Socket 2.2 Socket编程的基本操作 2.3 地址信息的表示 2.4 网络字节序和主机字节序的转换 2.4.1 字节序转换 2.4.2 网络地址初始化与分配 2.5 INADDR_ANY 2.6 Socket 编程相关函数 2.7 C标准中的 main 函数声明 2.8 套接字应用…...
串行通信 与 并行通信 对比
总目录 一、并行通信 1. 定义与核心特点 1) 定义 并行通信是指通过多条数据线同时传输一组数据的各个位(如8位、16位或更多),以字节或字为单位进行数据交换的通信方式。 2)核心特点 特点描述传输速度快多位同时传…...
基于springboot+vue的北部湾地区助农平台
开发语言:Java框架:springbootJDK版本:JDK1.8服务器:tomcat7数据库:mysql 5.7(一定要5.7版本)数据库工具:Navicat11开发软件:eclipse/myeclipse/ideaMaven包:…...
Docker技术系列文章,第七篇——Docker 在 CI/CD 中的应用
在当今快速发展的软件开发领域,持续集成与持续部署(CI/CD)已经成为提高软件交付效率和质量的关键实践。而 Docker 作为一种流行的容器化技术,为 CI/CD 流程提供了强大的支持。通过将应用及其依赖项打包成容器,Docker 确…...
Hive SQL中 ?+.+ 的用法,字段剔除
一、含义 ?. 的用法代表剔除表中的特定字段,建议按照字段顺序列出以确保正确性。 二、参数设置 -- 首先需要设置一个参数: set hive.support.quoted.identifiersNone; --然后指定要剔除哪个字段 select (dateline)?. from test.dm_user_add三、举例…...
Vue学习笔记集--pnpm包管理器
pnpm包管理器 官网: https://www.pnpm.cn/ pnpm简介 pnpm全称是performant npm,意思为“高性能的npm”,它通过硬链接和符号链接共享依赖,提升安装速度并减少存储占用。 功能特点 节省磁盘空间:依赖包被存放在一个统…...
游戏交易系统设计与实现(代码+数据库+LW)
摘 要 在如今社会上,关于信息上面的处理,没有任何一个企业或者个人会忽视,如何让信息急速传递,并且归档储存查询,采用之前的纸张记录模式已经不符合当前使用要求了。所以,对游戏交易信息管理的提升&#x…...
为什么视频文件需要压缩?怎样压缩视频体积即小又清晰?
在日常生活中,无论是为了节省存储空间、便于分享还是提升上传速度,我们常常会遇到需要压缩视频的情况。本文将介绍为什么视频需要压缩,压缩视频的好处与坏处,并教你如何使用简鹿视频格式转换器轻松完成MP4视频文件的压缩。 为什么…...
腾讯pcg客户端一面
Java 基本引用类型 常见异常以及怎么处理 所有类的父类是什么,有哪些常用方法 常用线程池有哪些 线程池的创建参数 如何实现线程同步 常用锁有哪些 Lock和reentrantlock有什么不一样 Reentrantlock要手动释放锁吗 数据结构 数组和链表的区别 队列和栈的区别 为什么…...
解决vscode终端和本地终端python版本不一致的问题
🌿 问题描述 本地终端: vscode终端: 别被这个给骗了,继续往下看: 难怪我导入一些包的时候老提示找不到,在本地终端就不会这样,于是我严重怀疑vscode中的python版本和终端不一样,…...