当前位置: 首页 > news >正文

springboot整合hive

springboot整合hive

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.7.18</version><relativePath/> <!-- lookup parent from repository --></parent><groupId>cn.lhz</groupId><artifactId>hive-api</artifactId><version>0.0.1</version><name>hive-api</name><description>hive-api</description><url/><licenses><license/></licenses><developers><developer/></developers><scm><connection/><developerConnection/><tag/><url/></scm><properties><java.version>21</java.version><jdk.version>21</jdk.version><maven.compiler.source>${jdk.version}</maven.compiler.source><maven.compiler.target>${jdk.version}</maven.compiler.target><maven.compiler.compilerVersion>${jdk.version}</maven.compiler.compilerVersion><maven.compiler.encoding>utf-8</maven.compiler.encoding><project.build.sourceEncoding>utf-8</project.build.sourceEncoding><project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding><maven.test.failure.ignore>true</maven.test.failure.ignore><maven.test.skip>true</maven.test.skip><commons-io.version>2.17.0</commons-io.version><commons-lang3.version>3.17.0</commons-lang3.version><druid.version>1.2.23</druid.version><dom4j.version>2.1.4</dom4j.version><fastjson.version>2.0.53</fastjson.version><fastjson2.version>2.0.53</fastjson2.version><gson.version>2.11.0</gson.version><generator.version>1.1.2</generator.version><hutool.version>5.8.32</hutool.version><junit5.version>5.11.2</junit5.version><jaxen.version>2.0.0</jaxen.version><jackson.version>2.18.0</jackson.version><lombok.version>1.18.34</lombok.version><mybatis-plus.version>3.5.9</mybatis-plus.version><mybatis-spring.version>3.0.4</mybatis-spring.version><spring-boot.version>2.7.18</spring-boot.version></properties><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-thymeleaf</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId><exclusions><exclusion><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-tomcat</artifactId></exclusion></exclusions></dependency><dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-boot-starter</artifactId><version>${mybatis-plus.version}</version></dependency><dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus</artifactId><version>${mybatis-plus.version}</version></dependency><dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-jsqlparser</artifactId><version>${mybatis-plus.version}</version></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-configuration-processor</artifactId><optional>true</optional></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><optional>true</optional></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency><dependency><groupId>cn.hutool</groupId><artifactId>hutool-all</artifactId><version>${hutool.version}</version></dependency><dependency><groupId>com.github.binarywang</groupId><artifactId>java-testdata-generator</artifactId><version>1.1.2</version></dependency><dependency><groupId>org.apache.commons</groupId><artifactId>commons-lang3</artifactId><version>${commons-lang3.version}</version></dependency><dependency><groupId>commons-io</groupId><artifactId>commons-io</artifactId><version>${commons-io.version}</version></dependency><dependency><groupId>com.google.code.gson</groupId><artifactId>gson</artifactId><version>${gson.version}</version></dependency><dependency><groupId>org.webjars</groupId><artifactId>layui</artifactId><version>2.9.10</version></dependency><!--com.alibaba.druid--><dependency><groupId>com.alibaba</groupId><artifactId>druid</artifactId><version>${druid.version}</version></dependency><!--swagger3--><dependency><groupId>io.springfox</groupId><artifactId>springfox-boot-starter</artifactId><version>3.0.0</version></dependency><dependency><groupId>io.springfox</groupId><artifactId>springfox-swagger-ui</artifactId><version>3.0.0</version></dependency><dependency><groupId>com.github.xiaoymin</groupId><artifactId>swagger-bootstrap-ui</artifactId><version>1.9.6</version></dependency><dependency><groupId>com.github.xiaoymin</groupId><artifactId>knife4j-spring-ui</artifactId><version>3.0.3</version></dependency><!-- hive-jdbc --><dependency><groupId>org.apache.hive</groupId><artifactId>hive-jdbc</artifactId><version>3.1.3</version><exclusions><exclusion><groupId>ch.qos.logback</groupId><artifactId>logback-classic</artifactId></exclusion><exclusion><groupId>org.apache.logging.log4j</groupId><artifactId>log4j-slf4j-impl</artifactId></exclusion><exclusion><groupId>org.slf4j</groupId><artifactId>slf4j-log4j12</artifactId></exclusion><exclusion><groupId>org.eclipse.jetty.orbit</groupId><artifactId>*</artifactId></exclusion><exclusion><groupId>org.eclipse.jetty.aggregate</groupId><artifactId>*</artifactId></exclusion><exclusion><groupId>tomcat</groupId><artifactId>*</artifactId></exclusion><exclusion><groupId>javax.servlet</groupId><artifactId>servlet-api</artifactId></exclusion><exclusion><groupId>org.mortbay.jetty</groupId><artifactId>*</artifactId></exclusion></exclusions></dependency></dependencies><build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.13.0</version><configuration><encoding>UTF-8</encoding><source>${jdk.version}</source><target>${jdk.version}</target></configuration></plugin><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><excludes><exclude><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId></exclude></excludes></configuration></plugin></plugins><finalName>${project.name}</finalName></build><repositories><repository><id>public</id><name>aliyun nexus</name><url>https://maven.aliyun.com/repository/public</url><releases><enabled>true</enabled></releases></repository></repositories><pluginRepositories><pluginRepository><id>public</id><name>aliyun nexus</name><url>https://maven.aliyun.com/repository/public</url><releases><enabled>true</enabled></releases><snapshots><enabled>false</enabled></snapshots></pluginRepository></pluginRepositories>
</project>

配置文件

application.yml

server:port: 8080servlet:context-path: /api
spring:application:name: hive-apimvc:path match:matching-strategy: ant_path_matcherjackson:serialization:FAIL_ON_EMPTY_BEANS: false# json 序列化排除值为 null 的属性default-property-inclusion: non_null# 配置 Date 类的时间格式,如果不涉及可以不加date-format: yyyy-MM-dd HH:mm:ss# 配置 Date 类的时区,如果不涉及可以不加time-zone: GMT+8thymeleaf:#缓冲的配置cache: falsecheck-template: truecheck-template-location: true#开启MVC thymeleaf 视图解析enabled: true#模板的模式,支持 HTML, XML TEXT JAVASCRIPTmode: HTML5#编码 可不用配置encoding: UTF-8#配置模板路径,默认是templates,可以不用配置prefix: classpath:templates# 文件后缀名suffix: .html#内容类别,可不用配置servlet:content-type: text/html;charset=utf-8datasource:type: com.alibaba.druid.pool.DruidDataSourcedriver-class-name: org.apache.hive.jdbc.HiveDriverurl: jdbc:hive2://lihaozhe03:10000/lihaozheusername: rootpassword:
mybatis-plus:# 如果是放在src/main/java目录下 classpath:/com/yourpackage/*/mapper/*Mapper.xml# 如果是放在resource目录 classpath:/mapper/*Mapper.xmlmapper-locations: classpath:mapper/*.xml#实体扫描,多个package用逗号或者分号分隔type-aliases-package: cn.lhz.dto,cn.lhz.voconfiguration:#配置返回数据库(column下划线命名&&返回java实体是驼峰命名),自动匹配无需as(没开启这个,SQL需要写as: select user_id as userId)map-underscore-to-camel-case: truecache-enabled: false#配置JdbcTypeForNull, oracle数据库必须配置jdbc-type-for-null: 'null'log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#是否激活 swagger true or false
springfox:documentation:enabled: true

工具类

util 包下的工具类
opeapi配置类

swagger配置类

package cn.lhz.config;import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.web.context.WebServerInitializedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;import java.net.Inet4Address;
import java.net.UnknownHostException;/*** @author 李昊哲* @version 1.0.0*/
@Configuration
@Slf4j
public class OpenApiConfig implements ApplicationListener<WebServerInitializedEvent> {@Beanpublic OpenAPI springOpenAPI() {Contact contact = new Contact();contact.setName("李昊哲");contact.setUrl("https://space.bilibili.com/480308139");contact.setEmail("646269678@qq.com");// 访问路径:http://localhost:8080/swagger-ui/index.html// 访问路径:http://localhost:8080/doc.htmlreturn new OpenAPI().info(new Info().title("SpringBoot API").description("SpringBoot Simple Application").contact(contact).version("1.0.0"));}@Overridepublic void onApplicationEvent(WebServerInitializedEvent event) {try {//获取IPString hostAddress = Inet4Address.getLocalHost().getHostAddress();//获取端口号int port = event.getWebServer().getPort();//获取应用名String applicationName = event.getApplicationContext().getApplicationName();// TODO:这个localhost改成host地址log.info("项目启动启动成功!接口文档地址: http://" + hostAddress + ":" + port + applicationName + "/doc.html");log.info("项目启动启动成功!接口文档地址: http://" + hostAddress + ":" + port + applicationName + "/swagger-ui/index.html");} catch (UnknownHostException e) {e.printStackTrace();}}
}
MybatisPlus配置类
package cn.lhz.config;import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;/*** @author 李昊哲* @version 1.0.0*/
@Configuration
public class MybatisPlusConfig {@Beanpublic MybatisPlusInterceptor mybatisPlusInterceptor() {MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();// 于 v3.5.9 起,PaginationInnerInterceptor 已分离出来。如需使用,则需单独引入 mybatis-plus-jsqlparser 依赖interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));return interceptor;}
}
全局异常处理
package cn.lhz.config;import cn.lhz.util.response.ResponseResult;
import cn.lhz.util.response.ResultCode;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;/*** 全局异常处理** @author 李昊哲* @version 1.0.0*/
@ControllerAdvice
@RestControllerAdvice
public class GlobalException {@ExceptionHandler(Exception.class)public ResponseResult<String> defaultErrorHandler(Exception e) {return new ResponseResult<>(ResultCode.EXCEPTION.getCode(), e.getMessage());}
}

模型类

package cn.lhz.dto;import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;/*** @author 李昊哲* @version 1.0.0*/
@Setter
@Getter
@ToString
@NoArgsConstructor
@AllArgsConstructor
@TableName("person")
public class Person {@TableId(type = IdType.NONE)private String idCard;private String realName;private String mobile;private String provinceCode;
}

持久层接口

package cn.lhz.mapper;import cn.lhz.dto.Person;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;/*** @author 李昊哲* @version 1.0.0*/
@Mapper
public interface PersonMapper extends BaseMapper<Person> {
}

业务层接口

package cn.lhz.service;import cn.lhz.dto.Person;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;/*** @author 李昊哲* @version 1.0.0*/
public interface PersonService extends IService<Person> {Page<Person> pageList(int pageNum, int pageSize);
}

业务层实现类

package cn.lhz.service.impl;import cn.lhz.dto.Person;
import cn.lhz.mapper.PersonMapper;
import cn.lhz.service.PersonService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;/*** @author 李昊哲* @version 1.0.0*/
@Service
@RequiredArgsConstructor
public class PersonServiceImpl extends ServiceImpl<PersonMapper, Person> implements PersonService {private final PersonMapper personMapper;@Overridepublic Page<Person> pageList(int pageNum, int pageSize) {return personMapper.selectPage(new Page<>(pageNum, pageSize), new QueryWrapper<>());}
}

API接口

package cn.lhz.controller;import cn.lhz.dto.Person;
import cn.lhz.service.PersonService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;/*** @author 李昊哲* @version 1.0.0*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/person")
public class PersonController {private final PersonService personService;@GetMapping("/pageList")public Page<Person> pageList(@RequestParam(value = "pageNum", defaultValue = "1") int pageNum,@RequestParam(value = "pageSize", defaultValue = "5") int pageSize) {return personService.pageList(pageNum, pageSize);}
}

测试

spingboot hviespringboot hive

相关文章:

springboot整合hive

springboot整合hive pom.xml <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0" xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation"http://maven.…...

浅谈 proxy

应用场景 Vue2采用的defineProperty去实现数据绑定&#xff0c;Vue3则改为Proxy&#xff0c;遇到了什么问题&#xff1f; - 在Vue2中不能检测数组和对象的变化 1. 无法检测 对象property 的添加或移除 var vm new Vue({data:{a:1} })// vm.a 是响应式的vm.b 2 // vm.b 是…...

Ansys Maxwell:SheetScan - 导入材料特性曲线

你好&#xff0c; 在这篇博文中&#xff0c;我展示了如何使用 Ansys Maxwell“SheetScan”工具导入材料特性数据集。在这篇博文中&#xff0c;我展示了如何导入复杂磁导率实部数据集以用于涡流&#xff08;频率相关&#xff09;求解器&#xff0c;并以 Ferroxcube 磁芯材料规格…...

解决 Android 单元测试 No tests found for given includes:

问题 报错&#xff1a; Execution failed for task :testDebugUnitTest. > No tests found for given includes: 解决方案 1、一开始以为是没有给测试类加public修饰 2、然后替换 Test 注解的包可以解决&#xff0c;将 org.junit.jupiter.api.Test 修改为 org.junit.Tes…...

人工智能的核心思想-神经网络

神经网络原理 引言 在理解ChatGPT之前&#xff0c;我们需要从神经网络开始&#xff0c;了解最简单的“鹦鹉学舌”是如何实现的。神经网络是人工智能领域的基础&#xff0c;它模仿了人脑神经元的结构和功能&#xff0c;通过学习和训练来解决复杂的任务。本文将详细介绍神经网络…...

JAVA中的Lamda表达式

JAVA中的Lamda表达式 Lambda 表达式的语法使用场景示例代码1.代替匿名内部类2. 带参数的 Lambda 表达式3. 与集合框架结合使用4. 使用 Stream 操作 总结 Java 的 Lambda 表达式是 Java 8 引入的一个新特性&#xff0c;用于简化代码&#xff0c;特别是在处理函数式编程时。Lambd…...

锂电池学习笔记(一) 初识锂电池

前言 锂电池近几年一直都是很热门的产品&#xff0c;充放电管理更是学问蛮多&#xff0c;工作生活中难免会碰到&#xff0c;所以说学习锂电池是工程师的必备知识储备&#xff0c;今天学习锂电池的基本知识&#xff0c;分类&#xff0c;优缺点&#xff0c;循序渐进 学习参考 【…...

深度学习2

四、tensor常见操作 1、元素值 1.1、获取元素值 tensor.item() 返回tensor的元素&#xff1b;只能在一个元素值使用&#xff0c;多个报错&#xff0c;当存在多个元素值时需要使用索引进行获取到一个元素值时在使用 item。 1.2、元素值运算 tensor对元素值的运算&#xff1a;…...

第六节-AppScan扫描报告

第六节-AppScan扫描报告 1.加载扫描结果 1.点击【打开】 2.选择之前保存过的扫描结果 3.等待加载完成 2.领导查看的报告 1.点击【报告】 2.模板选择为【缺省值】 3.最低严重性选择为【中】&#xff0c;测试类型选择为【应用程序】 4.点击【布局】 5.选择【其他徽标】&#x…...

【c++丨STL】stack和queue的使用及模拟实现

&#x1f31f;&#x1f31f;作者主页&#xff1a;ephemerals__ &#x1f31f;&#x1f31f;所属专栏&#xff1a;C、STL 目录 前言 一、什么是容器适配器 二、stack的使用及模拟实现 1. stack的使用 empty size top push和pop swap 2. stack的模拟实现 三、queue的…...

基于SpringBoot的在线教育系统【附源码】

基于SpringBoot的在线教育系统 效果如下&#xff1a; 系统登录页面 系统管理员主页面 课程管理页面 课程分类管理页面 用户主页面 系统主页面 研究背景 随着互联网技术的飞速发展&#xff0c;线上教育已成为现代教育的重要组成部分。在线教育系统以其灵活的学习时间和地点&a…...

Kafka-副本分配策略

一、上下文 《Kafka-创建topic源码》我们大致分析了topic创建的流程&#xff0c;为了保持它的完整性和清晰度。细节并没有展开分析。下面我们就来分析下副本的分配策略以及副本中的leader角色的确定逻辑。当有了副本分配策略&#xff0c;才会得到分区对应的broker&#xff0c;…...

市场波动不断,如何自我提高交易心理韧性?

交易市场&#xff0c;一个由无数变量交织而成的复杂领域&#xff0c;常常因各方因素的微妙变化而掀起波澜。在这里&#xff0c;机遇与挑战并存&#xff0c;诱人的利润与潜在的风险如影随形&#xff0c;共同考验着每一位交易员的智慧与心理承受能力。在这样的环境下&#xff0c;…...

加速科技精彩亮相中国国际半导体博览会IC China 2024

11月18日—20日&#xff0c;第二十一届中国国际半导体博览会&#xff08;IC China 2024&#xff09;在北京国家会议中心顺利举办&#xff0c;加速科技携重磅产品及全系测试解决方案精彩亮相&#xff0c;加速科技创始人兼董事长邬刚受邀在先进封装创新发展论坛与半导体产业前沿与…...

利用c语言详细介绍下选择排序

选择排序&#xff08;Selection sort&#xff09;是一种简单直观的排序算法。它是每次选出最小或者最大的元素放在开头或者结尾位置&#xff08;采用升序的方式&#xff09;&#xff0c;最终完成列表排序的算法。 一、图文介绍 我们还是使用数组【10&#xff0c;5&#xff0c;3…...

华为流程L1-L6业务流程深度细化到可执行

该文档主要介绍了华为业务流程的深度细化及相关内容,包括流程框架、建模方法、流程模块描述、流程图建模等,旨在帮助企业构建有效的流程体系,实现战略目标。具体内容如下: 华为业务流程的深度细化 流程层级:华为业务流程分为 L1 - L6 六个层级,L1 为流程大类,L2 为流程…...

bridge-multicast-igmpsnooping

# 1.topo # 2.创建命名空间 ip netns add ns0 ip netns add ns1 ip netns add ns2 ip netns add ns3 # 3.创建veth设备 ip link add ns0-veth0 type veth peer name hn0-veth0 ip link add ns1-veth0 type veth peer name hn1-veth0 ip link add ns2-veth0 type veth pe…...

git使用(一)

git使用&#xff08;一&#xff09; 为什么学习git?两种版本控制系统在github上创建一个仓库&#xff08;repository&#xff09;windows上配置git环境在Linux上配置git环境 为什么学习git? 代码写了好久不小心删了&#xff0c;可以使用git防止&#xff0c;每写一部分代码通…...

Linux环境安装MongoDB

文章目录 1. 查看Linux系统的发行版本2. 下载MongoDB3. 安装MongoDB3.1 新建几个目录&#xff0c;分别用来存储 MongoDB 的数据和日志3.2 新建日志文件3.3 新建配置文件 4. 将MongoDB注册为服务4.1 新建服务文件4.2 编写服务文件 5. MongoDB服务相关操作5.1 启动MongoDB服务5.2…...

Cyberchef使用功能之-多种压缩/解压缩操作对比

cyberchef的compression操作大类中有大量的压缩和解压缩操作&#xff0c;每种操作的功能和区别是什么&#xff0c;本章将进行讲解&#xff0c;作为我的专栏《Cyberchef 从入门到精通教程》中的一篇&#xff0c;详见这里。 关于文件格式和压缩算法的理论部分在之前的文章《压缩…...

TypeScript 装饰器都有那些应用场景?如何更快的上手?

TypeScript 装饰器简介 在 TypeScript 中&#xff0c;装饰器&#xff08;Decorators&#xff09;是一种特殊的语法&#xff0c;用于在类、类方法、属性、访问器等上动态地添加行为或修改现有行为。装饰器可以用来增强类的功能、修改方法的行为&#xff0c;或者修改类的元数据等…...

堆优化版本的Prim

prim和dijkstra每轮找最小边的松弛操作其实是同源的&#xff0c;因而受dijkstra堆优化的启发&#xff0c;那么prim也可以采用小根堆进行优化。时间复杂度也由 O ( n 2 ) O(n^2) O(n2)降为 O ( n l o g n ) O(nlogn) O(nlogn)。 测试一下吧&#xff1a;原题链接 #include <i…...

Ubuntu上安装MySQL并且实现远程登录

目录 下载网络工具 查看网络连接 更新系统软件包&#xff1b; 安装mysql数据库 查看mysql数据库状态 以数字ip形式显示mysql的监听状态。&#xff08;默认监听端口是3306&#xff09; 查看安装mysql数据库时系统创建的目录信息。 根据查询到的系统用户名以及随机密码&a…...

蓝桥杯每日真题 - 第21天

题目&#xff1a;(空间) 题目描述&#xff08;12届 C&C B组A题&#xff09; 解题思路&#xff1a; 转换单位&#xff1a; 内存总大小为 256MB&#xff0c;换算为字节&#xff1a; 25610241024268,435,456字节 计算每个整数占用空间&#xff1a; 每个 32 位整数占用…...

(长期更新)《零基础入门 ArcGIS(ArcMap) 》实验一(下)----空间数据的编辑与处理(超超超详细!!!)

续上篇博客&#xff08;长期更新&#xff09;《零基础入门 ArcGIS(ArcMap) 》实验一&#xff08;上&#xff09;----空间数据的编辑与处理&#xff08;超超超详细&#xff01;&#xff01;&#xff01;&#xff09;-CSDN博客 继续更新 目录 什么是拓扑&#xff1f; 1.3.5道路…...

NLP论文速读(CVPR 2024)|使用DPO进行diffusion模型对齐

论文速读|Diffusion Model Alignment Using Direct Preference Optimization 论文信息&#xff1a; 简介&#xff1a; 本文探讨的背景是大型语言模型&#xff08;LLMs&#xff09;通过人类比较数据和从人类反馈中学习&#xff08;RLHF&#xff09;的方法进行微调&#xff0c;以…...

操作系统——揭开盖子

计算机执行时——取指执行 es:bx等于从0x9000开始&#xff0c;到0x90200结束...

如何在 React 项目中应用 TypeScript?应该注意那些点?结合实际项目示例及代码进行讲解!

在 React 项目中应用 TypeScript 是提升开发效率、增强代码可维护性和可读性的好方法。TypeScript 提供了静态类型检查、自动补全和代码提示等功能&#xff0c;这对于 React 开发者来说&#xff0c;能够帮助早期发现潜在的 bug&#xff0c;提高开发体验。 1. 项目初始化 在现…...

C++学习第四天

创作过程中难免有不足&#xff0c;若您发现本文内容有误&#xff0c;恳请不吝赐教。 提示&#xff1a;以下是本篇文章正文内容&#xff0c;下面案例可供参考 一、计算类对象的大小 #include<iostream> using namespace std;class Date { public:void Init(int year, in…...

【从零开始的LeetCode-算法】3232. 判断是否可以赢得数字游戏

给你一个 正整数 数组 nums。 Alice 和 Bob 正在玩游戏。在游戏中&#xff0c;Alice 可以从 nums 中选择所有个位数 或 所有两位数&#xff0c;剩余的数字归 Bob 所有。如果 Alice 所选数字之和 严格大于 Bob 的数字之和&#xff0c;则 Alice 获胜。 如果 Alice 能赢得这场游…...