APEX开发过程中需要注意的小细节5.5

oracle保留小数点后两位的函数

在日常开发中经常用到百分比做数据对比,但是有可能得到的数据是一个多位小数,结果如下所示:

如果想截取部分小数如保留小数点后两位可以怎么做呢?

在Oracle中,可以使用ROUND函数来四舍五入保留小数点后两位,或者使用TRUNC函数来截断小数点后多余的位数。

例子:

使用ROUND函数:

SELECT ROUND(123.4567, 2) FROM DUAL;

-- 结果: 123.46

使用TRUNC函数:

SELECT TRUNC(123.4567, 2) FROM DUAL;

-- 结果: 123.45

在这里,DUAL是Oracle提供的一个虚拟表,可以用来进行这种单行选择操作。ROUND函数进行四舍五入,而TRUNC函数则直接截断多余的小数位数。两者的区别在于如何处理.5的情况,ROUND会四舍五入到最接近的偶数,而TRUNC则简单地截断。

【注意】截取的先后顺序也有讲究,如果是百分比需要*100,建议先*100再截取,否则结果精确度会受影响

(select distinct ROUND((select sum(CONSUMED)from JA_PROJECT_MANAGER_OF_GROUP_TASK_Vwhere PRODUCTID = C.PRODUCTIDand TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW'))/ (select sum(CONSUMED)from JA_PROJECT_MANAGER_OF_GROUP_TASK_Vwhere TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW'))* 100,2)from JA_PROJECT_MANAGER_OF_GROUP_TASK_V)AS ACTUAL_RATE_DEVELOPMENT--“开发投入实际占比”:当前统计周期内当前专项上投入的开发资源工时/当前统计周期内所有开发资源工时 * 100%from JAS_PROJECT_MASTER Mleft join JA_PROJECt_MAPPING B on B.PROJECT_ID = M.PROJECT_IDleft join JA_PROJECT_MANAGER_OF_GROUP_TASK_V C on C.PRODUCTID = B.PRODUCT_ID

实际取值:8.26%

错误示范:

取值:8%

【不想拼接为空的数】

现状:当查询到的内容为空依然会拼接%,但是很突兀

原代码:直接拼接,并未判断,为空也展示%

改进:判断是否为空,若为空则赋值0

改进后效果:

【本周计划完成度与状态关联,当本周计划完成度小于100状态显示为异常(1),反之则正常(0)】

之前的做法是在两个项(本周计划完成度,状态)都设置动态操作,在里面设置对应的动态操作,设置值-JavaScript表达式-

if (utils.checkNull($v('P203_WEEK_PERCENTAGE')) ) {
    return 0;
} else{
    if (($v('P203_WEEK_PERCENTAGE')) >= 100) {
    return 0;
}else{
    return 1;
}
    }

最后设置-刷新

受影响的元素-项-状态

但是这样太麻烦不说,js返回的0和1在项-本周计划完成度 中没有意义

于是有了

方案二

直接对本周计划完成度做判断然后给状态赋值

JavaScript表达式-

if (($v('P203_WEEK_PERCENTAGE')) >= 100) {
    $s('P203_STATUS',0);
}else{
    $s('P203_STATUS',1);
}

效果:

完成度100为正常

完成度小于100为异常

【在APEX页面实现鼠标指到悬浮展示数据】

APEX也可以实现

属性-高级-初始化JavaS函数-

function(config) {config.defaultGridViewOptions = {tooltip: {// when the tooltip is integrated with the grid view the content callback// gets some extra helpful parameterscontent: function(callback, model, recordMeta, colMeta, columnDef ) {var text = null;// if in/over the row header display a tooltip based on // the record edit state metadataif (recordMeta && $(this).hasClass( "a-GV-rowHeader" ) ) {if ( recordMeta.deleted ) {text = "This record has been deleted";} else if ( recordMeta.inserted ) {text = "This record has been added";} else if ( recordMeta.updated ) {text = "This record has been changed";}} else {if ( columnDef && recordMeta) {// if in/over the DEFAULT_VALUE column put the DEFAULT_VALUE in a tooltip so more of the DEFAULT_VALUE can be seen// if in/over the name column show the hire dateif ( columnDef.property === "ACTUAL_RATE_DEVELOPMENT" ) {text = model.getValue( recordMeta.record, "DETAILS" );}}// if in/over any other column display a tooltip based on // the changed state metadataif ( colMeta && colMeta.changed ) {if ( text !== null) {text += "<br>";} else {text = "";}text += "This cell has been changed";}}return text;}}};return config;
}

【汉字拼接多个查询值输出为一个值】

1.0版本

SELECT LISTAGG(label, ',') WITHIN GROUP (ORDER BY label) AS labels
FROM (SELECT '该项目本周总开发工时:' || sum(CONSUMED) AS labelFROM JAS_PROJECT_MASTER Mleft join JA_PROJECt_MAPPING B on B.PROJECT_ID = M.PROJECT_IDleft join JA_PROJECT_MANAGER_OF_GROUP_TASK_V C on C.PRODUCTID = B.PRODUCT_IDwhere TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')and M.PROJECT_ID = :P205_PROJECT_IDUNION ALLSELECT '晶品研发组本周开发工时(小时):' || nvl((select sum(CONSUMED)from JA_PROJECT_MANAGER_OF_GROUP_TASK_Vwhere PRODUCTID = C.PRODUCTIDand code = 'kaifa-2024'and TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')),0)FROM JAS_PROJECT_MASTER Mleft join JA_PROJECt_MAPPING B on B.PROJECT_ID = M.PROJECT_IDleft join JA_PROJECT_MANAGER_OF_GROUP_TASK_V C on C.PRODUCTID = B.PRODUCT_IDwhere TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')and M.PROJECT_ID = :P205_PROJECT_IDUNION ALLSELECT '晶品支撑组本周开发工时(小时):' || nvl((select sum(CONSUMED)from JA_PROJECT_MANAGER_OF_GROUP_TASK_Vwhere PRODUCTID = C.PRODUCTIDand code = 'LCODEDEV-2024'and TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')),0)FROM JAS_PROJECT_MASTER Mleft join JA_PROJECt_MAPPING B on B.PROJECT_ID = M.PROJECT_IDleft join JA_PROJECT_MANAGER_OF_GROUP_TASK_V C on C.PRODUCTID = B.PRODUCT_IDwhere TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')and M.PROJECT_ID = :P205_PROJECT_ID)
;

输出

都在同一行,页面不美观

改进2.0版本:在分结果之后面拼接|| CHR(10)

SELECT LISTAGG(label, ',') WITHIN GROUP (ORDER BY label) AS labels
FROM (SELECT '该项目本周总开发工时:' || sum(CONSUMED) AS labelFROM JAS_PROJECT_MASTER Mleft join JA_PROJECt_MAPPING B on B.PROJECT_ID = M.PROJECT_IDleft join JA_PROJECT_MANAGER_OF_GROUP_TASK_V C on C.PRODUCTID = B.PRODUCT_IDwhere TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')and M.PROJECT_ID = :P205_PROJECT_IDUNION ALLSELECT '晶品研发组本周开发工时(小时):' || nvl((select sum(CONSUMED)from JA_PROJECT_MANAGER_OF_GROUP_TASK_Vwhere PRODUCTID = C.PRODUCTIDand code = 'kaifa-2024'and TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')),0) || CHR(10)FROM JAS_PROJECT_MASTER Mleft join JA_PROJECt_MAPPING B on B.PROJECT_ID = M.PROJECT_IDleft join JA_PROJECT_MANAGER_OF_GROUP_TASK_V C on C.PRODUCTID = B.PRODUCT_IDwhere TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')and M.PROJECT_ID = :P205_PROJECT_IDUNION ALLSELECT '晶品支撑组本周开发工时(小时):' || nvl((select sum(CONSUMED)from JA_PROJECT_MANAGER_OF_GROUP_TASK_Vwhere PRODUCTID = C.PRODUCTIDand code = 'LCODEDEV-2024'and TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')),0) || CHR(10)FROM JAS_PROJECT_MASTER Mleft join JA_PROJECt_MAPPING B on B.PROJECT_ID = M.PROJECT_IDleft join JA_PROJECT_MANAGER_OF_GROUP_TASK_V C on C.PRODUCTID = B.PRODUCT_IDwhere TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')and M.PROJECT_ID = :P205_PROJECT_ID)
;

在数据库层面实现了换行,但是在Oracle APEX页面还是紧密排序的,看来无法使用。

改进3.0版本:拼接|| '<br/>',在APEX页面层面实现拼接换行

SELECT LISTAGG(label, ',') WITHIN GROUP (ORDER BY label) AS labels
FROM (SELECT '该项目本周总开发工时:' || sum(CONSUMED) AS labelFROM JAS_PROJECT_MASTER Mleft join JA_PROJECt_MAPPING B on B.PROJECT_ID = M.PROJECT_IDleft join JA_PROJECT_MANAGER_OF_GROUP_TASK_V C on C.PRODUCTID = B.PRODUCT_IDwhere TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')and M.PROJECT_ID = :P205_PROJECT_IDUNION ALLSELECT '晶品研发组本周开发工时(小时):' || nvl((select sum(CONSUMED)from JA_PROJECT_MANAGER_OF_GROUP_TASK_Vwhere PRODUCTID = C.PRODUCTIDand code = 'kaifa-2024'and TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')),0)|| '<br/>'FROM JAS_PROJECT_MASTER Mleft join JA_PROJECt_MAPPING B on B.PROJECT_ID = M.PROJECT_IDleft join JA_PROJECT_MANAGER_OF_GROUP_TASK_V C on C.PRODUCTID = B.PRODUCT_IDwhere TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')and M.PROJECT_ID = :P205_PROJECT_IDUNION ALLSELECT '晶品支撑组本周开发工时(小时):' || nvl((select sum(CONSUMED)from JA_PROJECT_MANAGER_OF_GROUP_TASK_Vwhere PRODUCTID = C.PRODUCTIDand code = 'LCODEDEV-2024'and TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')),0)|| '<br/>'FROM JAS_PROJECT_MASTER Mleft join JA_PROJECt_MAPPING B on B.PROJECT_ID = M.PROJECT_IDleft join JA_PROJECT_MANAGER_OF_GROUP_TASK_V C on C.PRODUCTID = B.PRODUCT_IDwhere TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')and M.PROJECT_ID = :P205_PROJECT_ID)

改进4.0版本:想优先展示总开发工时,再展示各组

去掉分组和排序条件,按照想要的顺序查询数据并拼接即可

select *
from (select d.project_detail_id                                               project_detail_id,m.project_id                                                      project_id,m.project_name                                                    project_name,m.project_class                                                   project_class,--工作类型 专项,事务,推广/内部专项、外部专项m.important_grade                                                 important_grade, --重要等级(仅内部人员可见)m.project_status                                                  project_status,--当前阶段m.project_scope                                                   project_scope,--项目范围m.leading_unit                                                    leading_unit,--需求单位(CASEWHEN plan_to_end_date IS NULL THEN NULLwhen SYSDATE > plan_to_end_date then '100%'ELSEFLOOR((SYSDATE - start_date) / (plan_to_end_date - start_date) * 100) || '%'END)                                                       AS progress, --项目进度(%)(SELECT next_planFROM (SELECT f.project_id                                                                            project_id,f.next_plan                                                                             next_plan,ROW_NUMBER() OVER (PARTITION BY t.project_id ORDER BY f.CREATE_DATE DESC NULLS LAST) AS rnFROM JAS_PROJECT_MASTER tJOINJAS_PROJECT_DETAIL f ON t.project_id = f.project_id and to_char(t.start_date, 'yyyy') = '2024')WHERE rn = 2and project_id = m.project_id)                                 plan,--上周的“下周计划”即——本周计划d.current_progress                                             as current_progress_week, --本周工作总结(casewhen d.WEEK_PERCENTAGE is null then ''else d.WEEK_PERCENTAGE || '%' end)                        as WEEK_PERCENTAGE, --本周计划内工作完成度(%)(casewhen d.ACTUAL_RATE_WEEK is null then ''else d.ACTUAL_RATE_WEEK || '%' end)                          ACTUAL_RATE_WEEK, --本周实际工作完成度(%)d.next_plan                                                       next_plan, --下周工作计划m.project_owner                                                   project_owner, --项目负责人m.project_target                                                  project_target,--项目目标m.progress_memo                                                   progress_memo,--进度说明m.start_date                                                      start_date,--开始时间m.plan_to_end_date                                                plan_to_end_date,--计划完成时间m.actual_end_date                                                 actual_end_date,--实际完成时间m.REQUEST_CONTACT_POINT, --需求方对接人(必填)m.HQIT_TEAM,--总部IT对接组m.HQIT_TEAM_CP,--总部IT对接人m.VENDOR,--厂商m.VENDOR_CP,--厂商对接人m.WEIGHT_COEFFICIENT                                              WEIGHT_COEFFICIENT, --权重系数d.NEXT_PLAN_ORG,--下周工作责任方/对接方d.NEXT_PLAN_OWNER,--下周工作责任人/对接人(case when d.STATUS = 0 or d.STATUS is null then 0 else 1 end) as STATUS,d.project_comment                                                 project_comment,--异常说明d.update_date                                                     update_date,(casewhen m.WEIGHT_COEFFICIENT = 0 then ''else NVL(ROUND((select m.WEIGHT_COEFFICIENT /sum(WEIGHT_COEFFICIENT) * 100from JAS_PROJECT_MASTER Dwhere PROJECT_CLASS = '内部专项'group by PROJECT_CLASS),2), 0) || '%' end)AS REASONABLE_RATE_DEVELOPMENT,--“开发投入合理占比”:当前内部专项权重系数 / 所有内部专项的权重之和 * 100%(select distinct NVL(ROUND((select sum(CONSUMED)from JA_PROJECT_MANAGER_OF_GROUP_TASK_V2where PRODUCTID = B.PRODUCT_IDand TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW'))/ (select sum(CONSUMED)from JA_PROJECT_MANAGER_OF_GROUP_TASK_V2where TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')) *100, 2), 0)from JA_PROJECT_MANAGER_OF_GROUP_TASK_V2) || '%'AS ACTUAL_RATE_DEVELOPMENT,--“开发投入实际占比”:当前统计周期内当前专项上投入的开发资源工时/当前统计周期内所有开发资源工时 * 100%
(SELECT LISTAGG(label, '') AS labels
FROM (SELECT distinct '该项目本周总开发工时:' || sum(CONSUMED)  || '<br/>' AS labelFROM JAS_PROJECT_MASTER M2left join JA_PROJECt_MAPPING B on B.PROJECT_ID = M2.PROJECT_IDleft join JA_PROJECT_MANAGER_OF_GROUP_TASK_V2 C on C.PRODUCTID = B.PRODUCT_IDwhere TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')and M.PROJECT_ID = M2.PROJECT_IDUNION ALLSELECT distinct  '晶品研发组本周开发工时(小时):' || nvl((select sum(CONSUMED)from JA_PROJECT_MANAGER_OF_GROUP_TASK_V2where PRODUCTID = C.PRODUCTIDand code = 'kaifa-2024'and TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')),0) || '<br/>'FROM JAS_PROJECT_MASTER M0left join JA_PROJECt_MAPPING B on B.PROJECT_ID = M0.PROJECT_IDleft join JA_PROJECT_MANAGER_OF_GROUP_TASK_V2 C on C.PRODUCTID = B.PRODUCT_IDwhere TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')and M.PROJECT_ID = M0.PROJECT_IDUNION ALLSELECT distinct  '晶品支撑组本周开发工时(小时):' || nvl((select sum(CONSUMED)from JA_PROJECT_MANAGER_OF_GROUP_TASK_V2where PRODUCTID = C.PRODUCTIDand code = 'LCODEDEV-2024'and TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')),0) || '<br/>'FROM JAS_PROJECT_MASTER M1left join JA_PROJECt_MAPPING B on B.PROJECT_ID = M1.PROJECT_IDleft join JA_PROJECT_MANAGER_OF_GROUP_TASK_V2 C on C.PRODUCTID = B.PRODUCT_IDwhere TO_CHAR(WORK_DATE, 'YYYYIW') = TO_CHAR(TRUNC(SYSDATE), 'YYYYIW')and M.PROJECT_ID = M1.PROJECT_ID) ) DETAILSfrom JAS_PROJECT_MASTER Mleft join JA_PROJECt_MAPPING B on B.PROJECT_ID = M.PROJECT_ID
--                left join JA_PROJECT_MANAGER_OF_GROUP_TASK_V2 C on C.PRODUCTID = B.PRODUCT_IDleft join (select *from (select rank() over (partition by e.project_id order by e.CREATE_DATE desc NULLS LAST ) rn,e.project_detail_id,e.project_id,e.update_date,e.updator,e.project_comment,e.STATUS,e.NEXT_PLAN_ORG,e.NEXT_PLAN_OWNER,e.WEEK_PERCENTAGE,e.next_plan,e.current_progress,e.CREATE_BY,e.CREATE_DATE,e.ACTUAL_RATE_WEEKfrom JAS_PROJECT_DETAIL e)where rn = 1) don m.project_id = d.project_idleft join JA_PROJECt_MAPPING P on P.PROJECT_ID = M.PROJECT_IDwhere start_date >= to_date('2024-01-01', 'yyyy-mm-dd')and start_date <= to_date('2024-12-31', 'yyyy-mm-dd')and m.PROJECT_OWNER is not nulland m.DEL_FLAG is nulland (m.important_grade = :P205_IMPORTANT_GRADE or :P205_IMPORTANT_GRADE is null)and (m.project_class = :P205_CLASSIFY or :P205_CLASSIFY is null)and (m.project_status = :P205_PROJECT_STATUS or :P205_PROJECT_STATUS is null)order by M.IMPORTANT_GRADE);

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

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

相关文章

51单片机入门_江协科技_31~32_OB记录的自学笔记_LCD1602液晶显示屏

31. LCD1602 31.1. LCD1602介绍 •LCD1602&#xff08;Liquid Crystal Display&#xff09;液晶显示屏是一种字符型液晶显示模块&#xff0c;可以显示ASCII码的标准字符和其它的一些内置特殊字符&#xff0c;还可以有8个自定义字符 •显示容量&#xff1a;162个字符&#xff0c…

二、Maven安装

Maven安装 一、Centos7.9安装1.下载2.安装3.设置国内镜像4.设置maven安装路径 一、Centos7.9安装 1.下载 第一种&#xff1a;官网下载最新版本&#xff1a;http://maven.apache.org/download.cgi第二种&#xff1a;其他版本下载&#xff1a;https://archive.apache.org/dist/…

数据中心的新动脉:探索ADOP 800G MPO/MTP单模光纤跳线

在数据传输领域&#xff0c;随着技术的不断进步&#xff0c;对于更快、更高效的传输解决方案的需求日益增长。ADOP 800G MPO/MTP单模光纤跳线便是在这样的背景下应运而生的产品。本文将为您提供一个全面而详细的介绍&#xff0c;带您深入了解这款创新产品的特点、优势以及应用场…

国产主流数据库存储类型简析

国产数据库在技术架构上主要分为集中式、基于中间件分布式和原生分布式架构&#xff0c;衍生出集中式架构和分布式架构。那么在这些部署架构中&#xff0c;从数据分布的视角来看&#xff0c;在数据库中数据分布的形态是怎样的。本文将简要分析OceanBase、PolarDB、OpenGauss、G…

探索数据中台的力量:企业数据资产管理的未来_光点科技

随着数字化时代的到来&#xff0c;"数据中台"这一概念逐渐为人所知&#xff0c;并迅速成为推动企业数据驱动转型的重要基石。数据中台不仅是集数据接入、管理、分析于一身的综合平台&#xff0c;更是企业实现数据资源集中管理、分析决策和业务创新的核心支撑。 一、数…

【好书推荐6】《Excel函数与公式应用大全for Excel 365 Excel 2021》

【好书推荐6】《Excel函数与公式应用大全for Excel 365 & Excel 2021》 写在最前面《Excel函数与公式应用大全for Excel 365 & Excel 2021》关键点内容简介作者简介前言/序言目录 &#x1f308;你好呀&#xff01;我是 是Yu欸 &#x1f30c; 2024每日百字篆刻时光&…

预付费水表充值系统

预付费水表充值系统是一种为用户提供水费预付服务的系统&#xff0c;旨在方便用户预先充值水费&#xff0c;实现用水时按照预付金额自动扣费&#xff0c;从而实现水费的实时管理和节约用水。这种系统在社会生活中越来越受欢迎&#xff0c;下文将从核心功能、工作流程、优势特点…

SSRF题目进阶+SSRF正则绕过+进制绕过SSRF限制

[题目信息]&#xff1a; 题目名称题目难度SSRF题目进阶3 [题目考点]&#xff1a; SSRF绕过[Flag格式]: SangFor{h3bvbopR6L2EQOXv}[环境部署]&#xff1a; docker-compose.yml文件或者docker tar原始文件。 docker-compose up -d[题目writeup]&#xff1a; 1、实验主页 …

学习大数据的第一天

今天学习如何安装hapood安装 1.安装hapood安装 2.需要的资料 3.开始安装 1.创建目录 mkdir -p /export/server 2.进入目录下 cd /export/server/ 3.安装 安装需要的依赖 yum install gcc gcc-c make autoconf automake libtool curl lzo-devel zlib-devel openssl opens…

算法与数据结构要点速学——排序算法

排序算法 所有主要的编程语言都有一个内置的排序方法。假设并说排序成本为 O(n*log n)&#xff0c;通常是正确的&#xff0c;其中 n 是要排序的元素数。为了完整起见&#xff0c;这里有一个图表&#xff0c;列出了许多常见的排序算法及其完整性。编程语言实现的算法各不相同&a…

DBUtils工具类的使用

1、DBUtils是什么 为了更加简单地使用JDBC&#xff0c;Apache组织提供了一个DBUtils工具&#xff0c;它是操作数据库的一个组件&#xff0c;实现了对JDBC的简单封装&#xff0c;可以在不影响数据库访问性能的情况下简化JDBC的编码工作量。DBUtils工具要有2个作用。 写数据&am…

光明与速度:AI网络中GPU与光模块的协奏曲

&#x1f3b6;在人工智能&#xff08;AI&#xff09;的世界里&#xff0c;GPU和光模块是实现高速计算和数据传输的关键。它们如同一场精心编排的交响乐&#xff0c;每个部分都不可或缺&#xff0c;共同创造出美妙的和谐。&#x1f3bc; GPU&#xff1a;AI网络的心脏&#x1f4…

创建一个javascript公共方法的npm包,js-tool-big-box,发布到npm上,一劳永逸

前端javascript的公共方法太多了&#xff0c;时间日期的&#xff0c;数值的&#xff0c;字符串的&#xff0c;搞复制的&#xff0c;搞网络请求的&#xff0c;搞数据转换的&#xff0c;几乎就是每个新项目&#xff0c;有的拷一拷&#xff0c;没有的继续写&#xff0c;放个utils目…

AJAX (异步的JavaScript 和 XML)

目录 1、什么是AJAX 2、作用 1&#xff09;与服务器通信 2&#xff09;异步交互&#xff08;更新局部页面&#xff09; 3、AJAX 的基本工作原理 4、应用举例 5、jQuery与AJAX 6、使用jQeury实现AJAX 1&#xff09;$.ajax()&#xff1a;发送异步请求 2&#xff09;$.g…

2024五一杯数学建模C题思路分析

文章目录 1 赛题思路2 比赛日期和时间3 组织机构4 建模常见问题类型4.1 分类问题4.2 优化问题4.3 预测问题4.4 评价问题 5 建模资料 1 赛题思路 (赛题出来以后第一时间在CSDN分享) https://blog.csdn.net/dc_sinor?typeblog 2 比赛日期和时间 报名截止时间&#xff1a;2024…

解决npm install安装node-sass包容易失败的问题

具体问题如下&#xff1a; npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: XXX3.4.0 npm ERR! Found: webpack5.31.2 npm ERR! node_modules/webpack npm ERR! peer webpack”^4.0.0 || ^5.0.0″ from html-…

SpringBoot和Axios数据的传递和接收-Restful完全版

文章目录 一、基础知识铺垫Axios使用HTTP请求方式数据传输方式SpringBoot获取数据的方式 二、基础传递代码示例&#xff08;一&#xff09;Path Variables&#xff08;二&#xff09;Get、DeleteRequestParamModelAttribute &#xff08;三&#xff09;Post、Put、PatchRequest…

FreeRTOS学习 -- 中断配置

一、什么是中断 中断时微控制器一个很常见的特性&#xff0c;中断是由硬件产生&#xff0c;当中断产生以后CPU就会中断当前的流程而去处理中断服务&#xff0c;Cortex-M内核的MCU提供了一个用于中断管理的嵌套向量中断控制器&#xff08;NVIC&#xff09;。 二、中断优先级分…

土壤湿度传感器:助力农业现代化

随着科技的飞速发展&#xff0c;越来越多的先进技术被应用到农业生产中。其中&#xff0c;土壤湿度传感器作为现代农业的重要工具&#xff0c;正逐渐改变着传统农业的生产方式&#xff0c;成为农业现代化的秘密武器。 精确监测&#xff1a;土壤湿度传感器能够实时、精确地监测土…

WIN7用上最新版Chrome

1.下载WIN10最新版Chrome的离线安装包 谷歌浏览器 Chrome 最新版离线安装包下载地址 v123.0.6312.123 - 每日自动更新 | 异次元软件 文件名称&#xff1a;123.0.6312.123_chrome_installer.exe。 123.0.6312.123_chrome_installer.exe 文件右键解压缩得到 chrome.7z&#x…