trino-435版本windows下源码编译
一、源码下载地址
https://github.com/trinodb/trino/tags
二、编译环境及工具准备
1、maven
(1)版本:3.6.3
(2)settings.xml配置
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd"><localRepository>D:\maven\repo2</localRepository> <mirrors><mirror><id>alimaven</id><mirrorOf>central</mirrorOf><name>aliyun maven</name><url>https://maven.aliyun.com/repository/central/</url></mirror><mirror><id>alimaven</id><name>aliyun maven</name><url>http://maven.aliyun.com/nexus/content/groups/public/</url><mirrorOf>central</mirrorOf> </mirror></mirrors><profiles><profile><!-- maven使用jdk1.8 --> <id>jdk-1.8</id><!-- 开启jdk --> <activation><activeByDefault>true</activeByDefault><jdk>1.8</jdk></activation><properties><!-- 配置编译器信息 --><maven.compiler.source>1.8</maven.compiler.source><maven.compiler.target>1.8</maven.compiler.target><maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion></properties></profile></profiles>
</settings>
2、jdk
版本:17.0.9
3、idea
版本:2023.2
三、源码编译配置
(1)取消插件:really-executable-jar-maven-plugin
(2)trino-root xml取消如下两个module
(3)trino-root xml取消scm
(4)trino-root xml取消如下配置
<!-- <plugin>-->
<!-- <groupId>org.skife.maven</groupId>-->
<!-- <artifactId>really-executable-jar-maven-plugin</artifactId>-->
<!-- <version>2.1.1</version>-->
<!-- </plugin>-->
<!-- <plugin>-->
<!-- <groupId>org.gaul</groupId>-->
<!-- <artifactId>modernizer-maven-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <violationsFiles>-->
<!-- <violationsFile>${air.main.basedir}/.mvn/modernizer/violations.xml</violationsFile>-->
<!-- </violationsFiles>-->
<!-- <exclusionPatterns>-->
<!-- <exclusionPattern>org/joda/time/.*</exclusionPattern>-->
<!-- </exclusionPatterns>-->
<!-- <exclusions>-->
<!-- <!– getOnlyElement is more readable than the stream analogue –>-->
<!-- <exclusion>com/google/common/collect/Iterables.getOnlyElement:(Ljava/lang/Iterable;)Ljava/lang/Object;</exclusion>-->
<!-- <!– getLast has lower complexity for array based lists than the stream analogue (O(1) vs O(log(N)) –>-->
<!-- <exclusion>com/google/common/collect/Iterables.getLast:(Ljava/lang/Iterable;)Ljava/lang/Object;</exclusion>-->
<!-- <exclusion>com/google/common/collect/Iterables.getLast:(Ljava/lang/Iterable;Ljava/lang/Object;)Ljava/lang/Object;</exclusion>-->
<!-- <!– TODO: requires getting to common understanding which of those we want to enable –>-->
<!-- <exclusion>com/google/common/collect/Iterables.transform:(Ljava/lang/Iterable;Lcom/google/common/base/Function;)Ljava/lang/Iterable;</exclusion>-->
<!-- <exclusion>com/google/common/collect/Lists.transform:(Ljava/util/List;Lcom/google/common/base/Function;)Ljava/util/List;</exclusion>-->
<!-- <exclusion>com/google/common/collect/Iterables.isEmpty:(Ljava/lang/Iterable;)Z</exclusion>-->
<!-- <exclusion>com/google/common/collect/Iterables.concat:(Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/lang/Iterable;</exclusion>-->
<!-- <exclusion>com/google/common/collect/Iterables.concat:(Ljava/lang/Iterable;Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/lang/Iterable;</exclusion>-->
<!-- <exclusion>com/google/common/collect/Iterables.concat:(Ljava/lang/Iterable;Ljava/lang/Iterable;Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/lang/Iterable;</exclusion>-->
<!-- <exclusion>com/google/common/collect/Iterables.concat:(Ljava/lang/Iterable;)Ljava/lang/Iterable;</exclusion>-->
<!-- <exclusion>com/google/common/collect/Iterables.all:(Ljava/lang/Iterable;Lcom/google/common/base/Predicate;)Z</exclusion>-->
<!-- <exclusion>com/google/common/collect/Iterables.any:(Ljava/lang/Iterable;Lcom/google/common/base/Predicate;)Z</exclusion>-->
<!-- <exclusion>com/google/common/collect/Iterables.skip:(Ljava/lang/Iterable;I)Ljava/lang/Iterable;</exclusion>-->
<!-- <exclusion>com/google/common/collect/Iterables.limit:(Ljava/lang/Iterable;I)Ljava/lang/Iterable;</exclusion>-->
<!-- <exclusion>com/google/common/collect/Iterables.get:(Ljava/lang/Iterable;I)Ljava/lang/Object;</exclusion>-->
<!-- <exclusion>com/google/common/collect/Iterables.getFirst:(Ljava/lang/Iterable;Ljava/lang/Object;)Ljava/lang/Object;</exclusion>-->
<!-- <exclusion>com/google/common/collect/Iterables.getLast:(Ljava/lang/Iterable;)Ljava/lang/Object;</exclusion>-->
<!-- <exclusion>com/google/common/collect/Iterables.cycle:(Ljava/lang/Iterable;)Ljava/lang/Iterable;</exclusion>-->
<!-- <exclusion>com/google/common/collect/Iterables.cycle:([Ljava/lang/Object;)Ljava/lang/Iterable;</exclusion>-->
<!-- <exclusion>com/google/common/collect/Iterables.getOnlyElement:(Ljava/lang/Iterable;Ljava/lang/Object;)Ljava/lang/Object;</exclusion>-->
<!-- <!– com.google.common.io.BaseEncoding.base64 provides more reach interfaces than java.util.Base64 –>-->
<!-- <exclusion>com/google/common/io/BaseEncoding.base64:()Lcom/google/common/io/BaseEncoding;</exclusion>--><!-- <!– disable default modernizer violation –>-->
<!-- <exclusion>com/google/inject/Provider</exclusion>-->
<!-- </exclusions>-->
<!-- </configuration>-->
<!-- </plugin>-->
(4)取消maven-enforcer-plugin配置
(5)配置maven插件
四、profiles配置
取消dependency-scope-check、duplicate-finder-check两个配置,防止maven install时因依赖冲突或jar依赖相关问题的出现在这里插入图片描述](https://img-blog.csdnimg.cn/direct/c4754f121fbb4d7a82b682390f7dae3c.png)
五、启动类配置
Trino comes with sample configuration that should work out-of-the-box for development. Use the following options to create a run configuration:
Main Class: io.trino.server.DevelopmentServer
VM Options: -ea -Dconfig=etc/config.properties -Dlog.levels-file=etc/log.properties -Djdk.attach.allowAttachSelf=true
Working directory: $MODULE_DIR$
Use classpath of module: trino-server-dev
The working directory should be the trino-server-dev subdirectory. In IntelliJ, using $MODULE_DIR$ accomplishes this automatically.
If VM options doesn’t exist in the dialog, you need to select Modify options and enable Add VM options
六、代码修改
由于trino源码支持的构建环境为Max OS X or Linux,因此需要适配windows环境,代码修改如下:
(1)修改方法: io.trino.server.TrinoSystemRequirements.verifyOsArchitecture,将failRequirement改为警告形式warnRequirement
warnRequirement("Trino requires Linux or Mac OS X (found %s)", osName);
(2)修改方法: io.trino.server.TrinoSystemRequirements.verifyFileDescriptor,增加windows环境判断
private static void verifyFileDescriptor(){String osName = StandardSystemProperty.OS_NAME.value();OptionalLong maxFileDescriptorCount = getMaxFileDescriptorCount();if ("Windows 10".equals(osName)) {maxFileDescriptorCount=OptionalLong.of(100000);} if (maxFileDescriptorCount.isEmpty()) {// This should never happen since we have verified the OS and JVM abovefailRequirement("Cannot read OS file descriptor limit");}if (maxFileDescriptorCount.getAsLong() < MIN_FILE_DESCRIPTORS) {failRequirement("Trino requires at least %s file descriptors (found %s)", MIN_FILE_DESCRIPTORS, maxFileDescriptorCount.getAsLong());}if (maxFileDescriptorCount.getAsLong() < RECOMMENDED_FILE_DESCRIPTORS) {warnRequirement("Current OS file descriptor limit is %s. Trino recommends at least %s", maxFileDescriptorCount.getAsLong(), RECOMMENDED_FILE_DESCRIPTORS);}}
(3)io.trino.server.PluginDiscovery#discoverPlugins 适配windows
File file = artifact.getFile();if (!(file.getPath().endsWith("/target/classes")||file.getPath().endsWith("\\target\\classes"))) {throw new RuntimeException("Unexpected file for main artifact: " + file);}
(4)修改io.trino.server.PluginDiscovery#binaryName,适配windows系统
private static String binaryName(String javaName){String property=System.getProperty("os.name");if(property.trim().toLowerCase().contains("windows")){return javaName.replace('.','\\');}return javaName.replace('.', '/');}
(5)修改io.trino.server.PluginDiscovery#javaName适配windows系统
private static String javaName(String binaryName){return binaryName.replace('/', '.').replace("\\",".");}
``
`
(6)由于阿里云仓库使用得是https,io.trino.server.HttpsArtifactResolve代码中写死的使用http因此需要重写此代码,使用阿里云仓库,将HttpsArtifactResolve复制一份替换阿里云仓库,并修改resolveArtifacts方法,代码如下:
package io.trino.server;
public class ArtifactResolverX {
public static final String USER_LOCAL_REPO = “D:\maven\repo2”;
public static final String MAVEN_CENTRAL_URI = “https://repo1.maven.org/maven2/”;
public static final String ALIYUN_MAVEN_CENTRAL_URI = "https://maven.aliyun.com/repository/public";public static final Set<String> DEPRECATED_MAVEN_CENTRAL_URIS = ImmutableSet.<String>builder().add("http://repo1.maven.org/maven2").add("http://repo1.maven.org/maven2/").add("http://repo.maven.apache.org/maven2").add("http://repo.maven.apache.org/maven2/").build();private final RepositorySystem repositorySystem;private final MavenRepositorySystemSession repositorySystemSession;private final List<RemoteRepository> repositories;public ArtifactResolverX(String localRepositoryDir, String...remoteRepositoryUris){this(localRepositoryDir, Arrays.asList(remoteRepositoryUris));}public ArtifactResolverX(String localRepositoryDir, List < String > remoteRepositoryUris){MavenServiceLocator locator = new MavenServiceLocator();locator.addService(RepositoryConnectorFactory.class, FileRepositoryConnectorFactory.class);locator.addService(RepositoryConnectorFactory.class, AsyncRepositoryConnectorFactory.class);repositorySystem = locator.getService(RepositorySystem.class);repositorySystemSession = new MavenRepositorySystemSession();LocalRepositoryManager localRepositoryManager = new SimpleLocalRepositoryManager(localRepositoryDir);repositorySystemSession.setLocalRepositoryManager(localRepositoryManager);repositorySystemSession.setTransferListener(new ConsoleTransferListener());repositorySystemSession.setRepositoryListener(new ConsoleRepositoryListener());List<RemoteRepository> repositories = new ArrayList<>(remoteRepositoryUris.size());int index = 0;for (String repositoryUri : remoteRepositoryUris) {repositories.add(new RemoteRepository("repo-" + index++, "default", repositoryUri));}this.repositories = Collections.unmodifiableList(repositories);}public List<Artifact> resolveArtifacts (Artifact...sourceArtifacts){return resolveArtifacts(Arrays.asList(sourceArtifacts));}public List<Artifact> resolveArtifacts (Iterable < ? extends Artifact > sourceArtifacts){CollectRequest collectRequest = new CollectRequest();for (Artifact sourceArtifact : sourceArtifacts) {collectRequest.addDependency(new Dependency(sourceArtifact, JavaScopes.RUNTIME));}for (RemoteRepository repository : repositories) {// Hack: avoid using deprecated Maven Central URLsif (DEPRECATED_MAVEN_CENTRAL_URIS.contains(repository.getUrl())) {repository = new RemoteRepository(repository.getId(), repository.getContentType(), MAVEN_CENTRAL_URI);}collectRequest.addRepository(repository);}DependencyRequest dependencyRequest = new DependencyRequest(collectRequest, DependencyFilterUtils.classpathFilter(JavaScopes.RUNTIME));return resolveArtifacts(dependencyRequest);}public List<Artifact> resolvePom (File pomFile){if (pomFile == null) {throw new RuntimeException("pomFile is null");}MavenProject pom = getMavenProject(pomFile);Artifact rootArtifact = getProjectArtifact(pom);CollectRequest collectRequest = new CollectRequest();for (org.apache.maven.model.Dependency dependency : pom.getDependencies()) {collectRequest.addDependency(toAetherDependency(dependency));}// Hack: avoid using deprecated Maven Central URLs. The Central Repository no longer supports insecure// communication over plain HTTP.ImmutableList.Builder<RemoteRepository> allRepositories = ImmutableList.builder();for (RemoteRepository repository : pom.getRemoteProjectRepositories()) {if (DEPRECATED_MAVEN_CENTRAL_URIS.contains(repository.getUrl())) {repository = new RemoteRepository(repository.getId(), repository.getContentType(), MAVEN_CENTRAL_URI);}allRepositories.add(repository);}for (RemoteRepository repository : repositories) {if (DEPRECATED_MAVEN_CENTRAL_URIS.contains(repository.getUrl())) {repository = new RemoteRepository(repository.getId(), repository.getContentType(), MAVEN_CENTRAL_URI);}allRepositories.add(repository);}collectRequest.setRepositories(allRepositories.build());// Make sure we account for managed dependenciesif (pom.getDependencyManagement() != null) {for (org.apache.maven.model.Dependency managedDependency : pom.getDependencyManagement().getDependencies()) {collectRequest.addManagedDependency(toAetherDependency(managedDependency));}}DependencyRequest dependencyRequest = new DependencyRequest(collectRequest, DependencyFilterUtils.classpathFilter(JavaScopes.RUNTIME));List<Artifact> artifacts = resolveArtifacts(dependencyRequest);Map<String, Artifact> modules = getSiblingModules(pom).stream().collect(toMap(ArtifactResolverX::getArtifactKey, identity()));return Stream.concat(Stream.of(rootArtifact),artifacts.stream().map(artifact -> modules.getOrDefault(getArtifactKey(artifact), artifact))).collect(toImmutableList());}private MavenProject getMavenProject (File pomFile){try {PlexusContainer container = container();org.apache.maven.repository.RepositorySystem lrs = container.lookup(org.apache.maven.repository.RepositorySystem.class);ProjectBuilder projectBuilder = container.lookup(ProjectBuilder.class);ProjectBuildingRequest request = new DefaultProjectBuildingRequest();request.setSystemProperties(requiredSystemProperties());request.setRepositorySession(repositorySystemSession);request.setProcessPlugins(false);ArtifactRepository defaultLocalRepository = lrs.createDefaultLocalRepository();defaultLocalRepository.setUrl(USER_LOCAL_REPO);request.setLocalRepository(defaultLocalRepository);ArtifactRepository defaultRemoteRepository = lrs.createDefaultRemoteRepository();defaultRemoteRepository.setUrl(ALIYUN_MAVEN_CENTRAL_URI);request.setRemoteRepositories(Arrays.asList(new ArtifactRepository[]{defaultRemoteRepository}.clone()));ProjectBuildingResult result = projectBuilder.build(pomFile, request);return result.getProject();} catch (Exception e) {throw new RuntimeException("Error loading pom: " + pomFile.getAbsolutePath(), e);}}private Artifact getProjectArtifact (MavenProject pom){return new DefaultArtifact(pom.getArtifact().getGroupId(),pom.getArtifact().getArtifactId(),pom.getArtifact().getClassifier(),pom.getArtifact().getType(),pom.getArtifact().getVersion(),null,new File(pom.getModel().getBuild().getOutputDirectory()));}private List<Artifact> getSiblingModules (MavenProject module){if (!module.hasParent() || module.getParentFile() == null) {return ImmutableList.of();}// Parent exists and is a project reactorMavenProject parent = module.getParent();String parentDir = module.getParentFile().getParent();return parent.getModules().stream().map(moduleName -> new File(parentDir, moduleName + "/pom.xml")).filter(File::isFile).map(this::getMavenProject).map(this::getProjectArtifact).collect(toImmutableList());}/*** Returns a string identifying artifact by its maven coordinates.*/private static String getArtifactKey (Artifact artifact){return format("%s:%s:%s:%s", artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getClassifier());}private Properties requiredSystemProperties (){Properties properties = new Properties();properties.setProperty("java.version", System.getProperty("java.version"));return properties;}private Dependency toAetherDependency (org.apache.maven.model.Dependency dependency){Artifact artifact = new DefaultArtifact(dependency.getGroupId(), dependency.getArtifactId(), dependency.getClassifier(), dependency.getType(), dependency.getVersion());ImmutableList.Builder<Exclusion> exclusions = ImmutableList.builder();for (org.apache.maven.model.Exclusion exclusion : dependency.getExclusions()) {exclusions.add(new Exclusion(exclusion.getGroupId(), exclusion.getArtifactId(), null, "*"));}return new Dependency(artifact, dependency.getScope(), dependency.isOptional(), exclusions.build());}private List<Artifact> resolveArtifacts (DependencyRequest dependencyRequest){DependencyResult dependencyResult;try {dependencyResult = repositorySystem.resolveDependencies(repositorySystemSession, dependencyRequest);} catch (DependencyResolutionException e) {dependencyResult = e.getResult();}List<ArtifactResult> artifactResults = dependencyResult.getArtifactResults();List<Artifact> artifacts = new ArrayList<>(artifactResults.size());for (ArtifactResult artifactResult : artifactResults) {if (artifactResult.isMissing()) {artifacts.add(artifactResult.getRequest().getArtifact());} else {artifacts.add(artifactResult.getArtifact());}}return Collections.unmodifiableList(artifacts);}private static PlexusContainer container (){try {ClassWorld classWorld = new ClassWorld("plexus.core", Thread.currentThread().getContextClassLoader());ContainerConfiguration cc = new DefaultContainerConfiguration().setClassWorld(classWorld).setRealm(null).setName("maven");DefaultPlexusContainer container = new DefaultPlexusContainer(cc);// NOTE: To avoid inconsistencies, we'll use the Thread context class loader exclusively for lookupscontainer.setLookupRealm(null);container.setLoggerManager(new Slf4jLoggerManager());container.getLoggerManager().setThresholds(Logger.LEVEL_INFO);return container;} catch (PlexusContainerException e) {throw new RuntimeException("Error loading Maven system", e);}}
}
``
此外还需要修改下面的两个类,将HttpsArtifactResolver替换为ArtifactResolverX :
- io.trino.server.DevelopmentPluginsProvider
- io.trino.server.DevelopmentLoaderConfig
七、本地启动测试
1、启动服务
2、客户端连接
使用client/trino-cli下的jar,启动方式:java -jar trino-cli-435-executable.jar --server http://localhost:8080
3、执行命令
4、ui展示
登录只需填写用户名trino
相关文章:

trino-435版本windows下源码编译
一、源码下载地址 https://github.com/trinodb/trino/tags 二、编译环境及工具准备 1、maven (1)版本:3.6.3 (2)settings.xml配置 <?xml version"1.0" encoding"UTF-8"?> <settin…...

java类和对象的思想概述
0.面向对象Object OOP——名人名言:类是写出来的,对象是new出来的 **> 学习面向对象的三条路线 java类以及类成员:(重点)类成员——属性、方法、构造器、(熟悉)代码块、内部类面向对象特征&…...
ant design vue3中引入message消息提示,全局引入亲测有效
两种方式 第一种:使用provide和inject方式 第二种:使用全局挂载$message方式 第一种: //main.ts import { createApp } from vue; import App from ./App; import Antd,{ message } from ant-design-vue; import ant-design-vue/es/mess…...

UE5 Landscape 制作GIS卫星图地形
1. 总体想法: 制作GIS地形,使用Landscaping MapBox是一个好方法,但是区域过大,会占用很多内存 https://blog.csdn.net/qq_17523181/article/details/135029614 如果采用QGis,导出卫星图,在UE5里拼合出地形…...

opencv入门到精通——改变颜色空间
目录 目标 改变颜色空间 对象追踪 如何找到要追踪的HSV值? 目标 在本教程中,你将学习如何将图像从一个色彩空间转换到另一个,像BGR↔灰色,BGR↔HSV等 除此之外,我们还将创建一个应用程序,以提取视频中的…...

法线贴图实现地形模型皱褶、凹凸不平的纹理效果
在线工具推荐: 3D数字孪生场景编辑器 - GLTF/GLB材质纹理编辑器 - 3D模型在线转换 - Three.js AI自动纹理开发包 - YOLO 虚幻合成数据生成器 - 三维模型预览图生成器 - 3D模型语义搜索引擎 法线贴图在3D建模中扮演着重要的角色,它通过模拟表面的微…...

【SpringBoot篇】基于Redis实现生成全局唯一ID的方法
文章目录 🍔生成全局唯一ID🌹为什么要生成全局唯一id🌺生成全局id的方法✨代码实现 🍔生成全局唯一ID 是一种在分布式系统下用来生成全局唯一id的工具 在项目中生成全局唯一ID有很多好处,其中包括: 数据…...

轻度听力损失的儿童需要早期干预吗?
一些宝宝在做听力筛查时总是不通过,进一步听力诊断发现宝宝有轻度的听力损失,刚知道这个消息时,家长可担心了,总想着宝宝是不是听不到啊?但是一段时间后,有些家长又会忽略宝宝的听力问题,因为部…...

【Spring Security】认证密码加密Token令牌CSRF的使用详解
🎉🎉欢迎来到我的CSDN主页!🎉🎉 🏅我是Java方文山,一个在CSDN分享笔记的博主。📚📚 🌟推荐给大家我的专栏《Spring Security》。🎯🎯 …...
python一点通: 一文讲清Post 和 Put操作区别!
当我们使用网络服务时,如果我们不能小心地区分 POST 和 PUT,有时可能会触发错误。 在 Web 开发世界中,特别是在处理 RESTful API 时,HTTP 方法 POST 和 PUT 经常被使用,但常常被误解。这两者都用于向服务器发送数据&a…...

通过 Higress Wasm 插件 3 倍性能实现 Spring-cloud-gateway 功能
作者:韦鑫,Higress Committer,来自南京航空航天大学分布式系统实验室 导读:本文将和大家一同回顾 Spring Cloud Gateway 是如何满足 HTTP 请求/响应转换需求场景的,并为大家介绍在这种场景下使用 Higress 云原生网关的…...

0.618算法和基于Armijo准则的线搜索回退法
0.618代码如下: import math # 定义函数h(t) t^3 - 2t 1 def h(t): return t**3 - 2*t 1 # 0.618算法 def golden_section_search(a, b, epsilon): ratio 0.618 while (b - a) > epsilon: x1 b - ratio * (b - a) x2 a ratio * (b - a) h_…...

DPDK单步跟踪(3)-项目配置和单步跟踪
项目配置 下面都是示例的情况,请大家根据自己的工程来修改 ## 首先是配置CMake build setting Debug setting 这里最重要的是: –proc-type secondary 表示这是以secondary模式启动的dpdk客户端。 ## path mapping 然后根据自己的需要,配置…...

.NET core 自定义过滤器 Filter 实现webapi RestFul 统一接口数据返回格式
之前写过使用自定义返回类的方式来统一接口数据返回格式,.Net Core webapi RestFul 统一接口数据返回格式-CSDN博客 但是这存在一个问题,不是所有接口会按照定义的数据格式返回,除非每个接口都返回我们自定义的类,这种实现起来不…...
vue3 使用addRoute动态添加路由,页面刷新就白屏解决办法
问题,通过接口动态添加路由,第一次从登录页跳转还是正常的,说明路由添加成功了,但是刷新后就白屏了,且控制台报错路由匹配不到,在项目的main.js,router和路由拦截器中添加了一大堆打印后发现&am…...

探索鸿蒙:了解华为鸿蒙操作系统的基础课程
目录 学习目标: 学习内容: 学习时间: 学习产出: 介绍鸿蒙操作系统的起源和发展历程。 理解鸿蒙操作系统的核心概念和体系结构。 学习如何搭建和配置鸿蒙开发环境。 掌握基础的鸿蒙应用开发技术,包括应用的创建、…...

【Linux】进程周边007之进程控制
👀樊梓慕:个人主页 🎥个人专栏:《C语言》《数据结构》《蓝桥杯试题》《LeetCode刷题笔记》《实训项目》《C》《Linux》 🌝每一个不曾起舞的日子,都是对生命的辜负 目录 前言 1.进程创建 2.进程终止 2.…...
【C++】vector容器的模拟实现
目录 一,框架设计 二,构造函数 三,析构函数 四,赋值运算符 五,容器接口的实现 1,迭代器实现 2,“ [] ”运算符的实现 3,swap交换和resize重设大小 4,insert插入…...

华为Harmony——ArkTs语言
文章目录 一、简单示例二、声明式UI描述创建组件无参有参数 配置属性配置事件配置子组件 三、自定义组件基本用法基本结构成员函数/变量 一、简单示例 我们以一个具体的示例来说明ArkTS的基本组成。如下图所示,当开发者点击按钮时,文本内容从“Hello Wo…...

uniapp使用colorUI
colorUI 微动画 | ColorUI 使用文档 1:把colorui里三个文件复制到自己项目中去 App.vue </script> <style> import url(colorui/icon.css); import url(colorui/main.css); import url("colorui/animation.css");-webkit-keyframes show {…...
Linux简单的操作
ls ls 查看当前目录 ll 查看详细内容 ls -a 查看所有的内容 ls --help 查看方法文档 pwd pwd 查看当前路径 cd cd 转路径 cd .. 转上一级路径 cd 名 转换路径 …...

cf2117E
原题链接:https://codeforces.com/contest/2117/problem/E 题目背景: 给定两个数组a,b,可以执行多次以下操作:选择 i (1 < i < n - 1),并设置 或,也可以在执行上述操作前执行一次删除任意 和 。求…...

selenium学习实战【Python爬虫】
selenium学习实战【Python爬虫】 文章目录 selenium学习实战【Python爬虫】一、声明二、学习目标三、安装依赖3.1 安装selenium库3.2 安装浏览器驱动3.2.1 查看Edge版本3.2.2 驱动安装 四、代码讲解4.1 配置浏览器4.2 加载更多4.3 寻找内容4.4 完整代码 五、报告文件爬取5.1 提…...
JS设计模式(4):观察者模式
JS设计模式(4):观察者模式 一、引入 在开发中,我们经常会遇到这样的场景:一个对象的状态变化需要自动通知其他对象,比如: 电商平台中,商品库存变化时需要通知所有订阅该商品的用户;新闻网站中࿰…...

招商蛇口 | 执笔CID,启幕低密生活新境
作为中国城市生长的力量,招商蛇口以“美好生活承载者”为使命,深耕全球111座城市,以央企担当匠造时代理想人居。从深圳湾的开拓基因到西安高新CID的战略落子,招商蛇口始终与城市发展同频共振,以建筑诠释对土地与生活的…...

push [特殊字符] present
push 🆚 present 前言present和dismiss特点代码演示 push和pop特点代码演示 前言 在 iOS 开发中,push 和 present 是两种不同的视图控制器切换方式,它们有着显著的区别。 present和dismiss 特点 在当前控制器上方新建视图层级需要手动调用…...

TSN交换机正在重构工业网络,PROFINET和EtherCAT会被取代吗?
在工业自动化持续演进的今天,通信网络的角色正变得愈发关键。 2025年6月6日,为期三天的华南国际工业博览会在深圳国际会展中心(宝安)圆满落幕。作为国内工业通信领域的技术型企业,光路科技(Fiberroad&…...
Modbus RTU与Modbus TCP详解指南
目录 1. Modbus协议基础 1.1 什么是Modbus? 1.2 Modbus协议历史 1.3 Modbus协议族 1.4 Modbus通信模型 🎭 主从架构 🔄 请求响应模式 2. Modbus RTU详解 2.1 RTU是什么? 2.2 RTU物理层 🔌 连接方式 ⚡ 通信参数 2.3 RTU数据帧格式 📦 帧结构详解 🔍…...

消防一体化安全管控平台:构建消防“一张图”和APP统一管理
在城市的某个角落,一场突如其来的火灾打破了平静。熊熊烈火迅速蔓延,滚滚浓烟弥漫开来,周围群众的生命财产安全受到严重威胁。就在这千钧一发之际,消防救援队伍迅速行动,而豪越科技消防一体化安全管控平台构建的消防“…...

Unity VR/MR开发-VR开发与传统3D开发的差异
视频讲解链接:【XR马斯维】VR/MR开发与传统3D开发的差异【UnityVR/MR开发教程--入门】_哔哩哔哩_bilibili...