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>-->
<!--                            &lt;!&ndash; getOnlyElement is more readable than the stream analogue &ndash;&gt;-->
<!--                            <exclusion>com/google/common/collect/Iterables.getOnlyElement:(Ljava/lang/Iterable;)Ljava/lang/Object;</exclusion>-->
<!--                            &lt;!&ndash; getLast has lower complexity for array based lists than the stream analogue (O(1) vs O(log(N)) &ndash;&gt;-->
<!--                            <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>-->
<!--                            &lt;!&ndash; TODO: requires getting to common understanding which of those we want to enable &ndash;&gt;-->
<!--                            <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>-->
<!--                            &lt;!&ndash; com.google.common.io.BaseEncoding.base64 provides more reach interfaces than java.util.Base64 &ndash;&gt;-->
<!--                            <exclusion>com/google/common/io/BaseEncoding.base64:()Lcom/google/common/io/BaseEncoding;</exclusion>--><!--                            &lt;!&ndash; disable default modernizer violation &ndash;&gt;-->
<!--                            <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
在这里插入图片描述

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

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

相关文章

Jmeter 性能测试 —— 评估一个系统TPS与并发数!

问题&#xff1a;性能压测&#xff0c;如何评估一个系统的TPS和并发数&#xff1f; 1、对于新系统 由业务部门或开发人员预估交易量和TPS指标 可以参考公式&#xff1a;并发用户 在线用户数 * 10%。 当一个系统还没有上线时&#xff0c;我们可以预判的是这个系统准备要给多…

【数据结构】队列的使用|模拟实现|循环队列|双端队列|面试题

一、 队列(Queue) 1.1 概念 队列&#xff1a;只允许在一端进行插入数据操作&#xff0c;在另一端进行删除数据操作的特殊线性表&#xff0c;队列具有先进先出FIFO(First In First Out) 入队列&#xff1a;进行插入操作的一端称为队尾&#xff08;Tail/Rear&#xff09; 出队列…

深度剖析:Golang中结构体方法的高级应用

深度剖析&#xff1a;Golang中结构体方法的高级应用 引言结构体方法的基础回顾结构体的定义和用法方法的定义和绑定基本语法和用法 高级特性与应用封装、继承和多态方法集与接口的关系结构体方法的匿名字段和嵌入结构体 性能优化与最佳实践接收器类型的选择&#xff1a;指针还是…

文档 - - - Docsify文档创建

目录 1. Docsify 介绍2. 创建 Docsify 项目2.1 安装 Node.js2.1 安装 docsfiy-cli2.3 初始化项目2.4 运行项目2.5 使用 Python 运行项目&#xff08;扩展&#xff0c;不推荐有bug&#xff09; 3. 配置 Docsify 项目3.1 修改等待加载文字3.2 添加网站 ico 图标3.3 创建新页面写文…

Redux与React环境准备、实现counter(及传参)、异步获取数据

环境说明&#xff1a; 一&#xff1a;说明 在React中使用redux&#xff0c;官方要求安装两个其他插件&#xff1a;Redux Toolkit和react-redux 1. Redux ToolKit(RTK) - 官方推荐编写Redux逻辑的方式&#xff0c;是一套工具的集合集&#xff0c;简化书写方式 &#xff08;简化…

【数据结构之单链表】

数据结构学习笔记---003 数据结构之单链表1、什么是单链表?1.1、概念及结构 2、单链表接口的实现2.1、单链表的SList.h2.1.1、定义单链表的结点存储结构2.1.2、声明单链表各个接口的函数 2.2、单链表的SList.c2.2.1、遍历打印链表2.2.2、销毁单链表2.2.3、打印单链表元素2.2.4…

VM进行TCP/IP通信

OK就变成这样 vm充当服务端的话也是差不多的操作 点击连接 这里我把端口号换掉了因为可能被占用报错了&#xff0c;如果有报错可以尝试尝试换个端口号 注&#xff1a; 还有一个点在工作中要是充当服务器&#xff0c;要去网络这边看下他的ip地址 拉到最后面

【github】github设置项目为私有

点击setting change to private 无脑下一步

web架构师编辑器内容-创建业务组件和编辑器基本行为

编辑器主要分为三部分&#xff0c;左侧是组件模板库&#xff0c;中间是画布区域&#xff0c;右侧是面板设置区域。 左侧是预设各种组件模板进行添加 中间是使用交互手段来更新元素的值 右侧是使用表单的方式来更新元素的值。 大致效果&#xff1a; 左侧组件模板库 最初的模板…

基于JSP+Servlet+Mysql的调查管理系统

基于JSPServletMysql的调查管理系统 一、系统介绍二、功能展示1.项目内容2.项目骨架3.数据库3.登录4.注册3.首页5.系统管理 四、其它1.其他系统实现五.获取源码 一、系统介绍 项目名称&#xff1a;基于JSPServlet的调查管理系统 项目架构&#xff1a;B/S架构 开发语言&#…

在Next.js和React中搭建Cesium项目

在Next.js和React中搭建Cesium项目&#xff0c;需要确保Cesium能够与服务端渲染(SSR)兼容&#xff0c;因为Next.js默认是SSR的。Cesium是一个基于WebGL的地理信息可视化库&#xff0c;通常用于在网页中展示三维地球或地图。下面是一个基本的步骤&#xff0c;用于在Next.js项目中…

.raw 是一个 Anndata 包中的对象,用于存储原始的单细胞数据。scanpy种如何查看 .raw 对象的内容,

1查看 .raw 对象的内容&#xff0c;可以使用以下方法&#xff1a; .raw 是一个 Anndata 包中的对象&#xff0c;用于存储原始的单细胞数据。 使用 .X 属性查看原始数据矩阵&#xff1a;.raw.X 这将返回一个 Numpy 数组&#xff0c;其中包含原始数据的数值。 使用 .var_names 属…

nodejs微信小程序+python+PHP兴趣趣班预约管理系统设计与实现-计算机毕业设计推荐

目 录 摘 要 I ABSTRACT II 目 录 II 第1章 绪论 1 1.1背景及意义 1 1.2 国内外研究概况 1 1.3 研究的内容 1 第2章 相关技术 3 2.1 nodejs简介 4 2.2 express框架介绍 6 2.4 MySQL数据库 4 第3章 系统分析 5 3.1 需求分析 5 3.2 系统可行性分析 5 3.2.1技术可行性&#xff1a;…

ARM作业1

汇编实现三个灯闪烁 汇编代码&#xff1a; .text .global _start _start: 设置GPIOE,GPIOF时钟使能LDR R0,0X50000A28 LDR R1,[R0] ORR R1,R1,#(0x3<<4) STR R1,[R0] 设置PE10,PF10,PE8为输出 LED1LDR R0,0X50006000LDR R1,[R0]ORR R1,R1,#(0X1<<20)BIC R1…

力扣每日一题day38[106. 从中序与后序遍历序列构造二叉树]

给定两个整数数组 inorder 和 postorder &#xff0c;其中 inorder 是二叉树的中序遍历&#xff0c; postorder 是同一棵树的后序遍历&#xff0c;请你构造并返回这颗 二叉树 。 示例 1: 输入&#xff1a;inorder [9,3,15,20,7], postorder [9,15,7,20,3] 输出&#xff1a;[…

华为鸿蒙(HarmonyOS):连接一切,智慧无限

华为鸿蒙是一款全场景、分布式操作系统&#xff0c;旨在构建一个真正统一的硬件生态系统。该操作系统于2019年8月首次发布&#xff0c;并被设计为可以应用于各种设备&#xff0c;包括智能手机、智能手表、智能电视、车载系统等多种智能设备。 推荐一套最新版的鸿蒙4.0开发教程 …

从零开发短视频电商 在AWS上SageMaker部署模型自定义日志输入和输出示例

从零开发短视频电商 在AWS上SageMaker部署模型自定义日志输入和输出示例 怎么部署自定义模型请看&#xff1a;从零开发短视频电商 在AWS上用SageMaker部署自定义模型 都是huaggingface上的模型或者fine-tune后的。 为了适配jumpstart上部署的模型的http输入输出&#xff0c;我…

Java设计模式之单例模式以及如何防止通过反射破坏单例模式

单例模式 单例模式使用场景 ​ 什么是单例模式&#xff1f;保障一个类只能有一个对象&#xff08;实例&#xff09;的代码开发模式就叫单例模式 ​ 什么时候使用&#xff1f; 工具类&#xff01;&#xff08;一种做法&#xff0c;所有的方法都是static&#xff0c;还有一种单…

使用 Elasticsearch 检测抄袭 (一)

作者&#xff1a;Priscilla Parodi 抄袭可以是直接的&#xff0c;涉及复制部分或全部内容&#xff0c;也可以是释义的&#xff0c;即通过更改一些单词或短语来重新表述作者的作品。 灵感和释义之间是有区别的。 即使你得出类似的结论&#xff0c;也可以阅读内容&#xff0c;获得…

Chrome浏览器http自动跳https问题

现象&#xff1a; Chrome浏览器访问http页面时有时会自动跳转https&#xff0c;导致一些问题。比如&#xff1a; 开发阶段访问dev环境网址跳https&#xff0c;后端还是http&#xff0c;导致接口跨域。 复现&#xff1a; 先访问http网址&#xff0c;再改成https访问&#xf…