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 {…...
超短脉冲激光自聚焦效应
前言与目录 强激光引起自聚焦效应机理 超短脉冲激光在脆性材料内部加工时引起的自聚焦效应,这是一种非线性光学现象,主要涉及光学克尔效应和材料的非线性光学特性。 自聚焦效应可以产生局部的强光场,对材料产生非线性响应,可能…...
调用支付宝接口响应40004 SYSTEM_ERROR问题排查
在对接支付宝API的时候,遇到了一些问题,记录一下排查过程。 Body:{"datadigital_fincloud_generalsaas_face_certify_initialize_response":{"msg":"Business Failed","code":"40004","sub_msg…...
树莓派超全系列教程文档--(61)树莓派摄像头高级使用方法
树莓派摄像头高级使用方法 配置通过调谐文件来调整相机行为 使用多个摄像头安装 libcam 和 rpicam-apps依赖关系开发包 文章来源: http://raspberry.dns8844.cn/documentation 原文网址 配置 大多数用例自动工作,无需更改相机配置。但是,一…...
边缘计算医疗风险自查APP开发方案
核心目标:在便携设备(智能手表/家用检测仪)部署轻量化疾病预测模型,实现低延迟、隐私安全的实时健康风险评估。 一、技术架构设计 #mermaid-svg-iuNaeeLK2YoFKfao {font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg…...
(二)TensorRT-LLM | 模型导出(v0.20.0rc3)
0. 概述 上一节 对安装和使用有个基本介绍。根据这个 issue 的描述,后续 TensorRT-LLM 团队可能更专注于更新和维护 pytorch backend。但 tensorrt backend 作为先前一直开发的工作,其中包含了大量可以学习的地方。本文主要看看它导出模型的部分&#x…...
Objective-C常用命名规范总结
【OC】常用命名规范总结 文章目录 【OC】常用命名规范总结1.类名(Class Name)2.协议名(Protocol Name)3.方法名(Method Name)4.属性名(Property Name)5.局部变量/实例变量(Local / Instance Variables&…...
STM32标准库-DMA直接存储器存取
文章目录 一、DMA1.1简介1.2存储器映像1.3DMA框图1.4DMA基本结构1.5DMA请求1.6数据宽度与对齐1.7数据转运DMA1.8ADC扫描模式DMA 二、数据转运DMA2.1接线图2.2代码2.3相关API 一、DMA 1.1简介 DMA(Direct Memory Access)直接存储器存取 DMA可以提供外设…...
ffmpeg(四):滤镜命令
FFmpeg 的滤镜命令是用于音视频处理中的强大工具,可以完成剪裁、缩放、加水印、调色、合成、旋转、模糊、叠加字幕等复杂的操作。其核心语法格式一般如下: ffmpeg -i input.mp4 -vf "滤镜参数" output.mp4或者带音频滤镜: ffmpeg…...
uniapp微信小程序视频实时流+pc端预览方案
方案类型技术实现是否免费优点缺点适用场景延迟范围开发复杂度WebSocket图片帧定时拍照Base64传输✅ 完全免费无需服务器 纯前端实现高延迟高流量 帧率极低个人demo测试 超低频监控500ms-2s⭐⭐RTMP推流TRTC/即构SDK推流❌ 付费方案 (部分有免费额度&#x…...
大模型多显卡多服务器并行计算方法与实践指南
一、分布式训练概述 大规模语言模型的训练通常需要分布式计算技术,以解决单机资源不足的问题。分布式训练主要分为两种模式: 数据并行:将数据分片到不同设备,每个设备拥有完整的模型副本 模型并行:将模型分割到不同设备,每个设备处理部分模型计算 现代大模型训练通常结合…...
