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

qt-Quick3D笔记之官方例程Runtimeloader Example运行笔记

qt-Quick3D笔记之官方例程Runtimeloader Example运行笔记

文章目录

  • qt-Quick3D笔记之官方例程Runtimeloader Example运行笔记
    • 1.例程运行效果
    • 2.例程缩略图
    • 3.项目文件列表
    • 4.main.qml
    • 5.main.cpp
    • 6.CMakeLists.txt

1.例程运行效果

在这里插入图片描述

运行该项目需要自己准备一个模型文件

2.例程缩略图

在这里插入图片描述

3.项目文件列表

runtimeloader/
├── CMakeLists.txt
├── main.cpp
├── main.qml
├── qml.qrc
└── runtimeloader.pro1 directory, 5 files

4.main.qml

// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clauseimport QtQuick
import QtQuick.Window
import QtQuick.Controls
import QtQuick.Layoutsimport Qt.labs.platform
import QtCoreimport QtQuick3D
import QtQuick3D.Helpers
import QtQuick3D.AssetUtils// 创建一个窗口根节点,设置窗口大小和显示状态
Window {id: windowRootvisible: truewidth: 1280height: 720property url importUrl; // 用于导入模型的URL//! [base scene] 基础场景View3D {id: view3Danchors.fill: parent // 填充父窗口environment: SceneEnvironment {id: envbackgroundMode: SceneEnvironment.SkyBox // 背景模式为天空盒lightProbe: Texture {textureData: ProceduralSkyTextureData{} // 使用程序化天空纹理}InfiniteGrid {visible: helper.gridEnabled // 是否显示网格gridInterval: helper.gridInterval // 网格间隔}}camera: helper.orbitControllerEnabled ? orbitCamera : wasdCamera // 根据控制器选择相机// 设置方向光源DirectionalLight {eulerRotation.x: -35eulerRotation.y: -90castsShadow: true // 启用阴影}Node {id: orbitCameraNodePerspectiveCamera {id: orbitCamera // 轨道相机}}// 第一人称相机(WASD控制)PerspectiveCamera {id: wasdCameraonPositionChanged: {// 更新相机的近远裁剪面let distance = position.length()if (distance < 1) {clipNear = 0.01clipFar = 100} else if (distance < 100) {clipNear = 0.1clipFar = 1000} else {clipNear = 1clipFar = 10000}}}//! [base scene]// 重置视图的函数function resetView() {if (importNode.status === RuntimeLoader.Success) {helper.resetController()}}//! [instancing] 实例化RandomInstancing {id: instancinginstanceCount: 30 // 设置实例数量position: InstanceRange {property alias boundsDiameter: helper.boundsDiameterfrom: Qt.vector3d(-3*boundsDiameter, -3*boundsDiameter, -3*boundsDiameter); // 位置范围to: Qt.vector3d(3*boundsDiameter, 3*boundsDiameter, 3*boundsDiameter)}color: InstanceRange { from: "black"; to: "white" } // 颜色范围}//! [instancing]QtObject {id: helperproperty real boundsDiameter: 0 // 场景边界的直径property vector3d boundsCenter // 场景中心property vector3d boundsSize // 场景大小property bool orbitControllerEnabled: true // 是否启用轨道控制器property bool gridEnabled: gridButton.checked // 是否启用网格property real cameraDistance: orbitControllerEnabled ? orbitCamera.z : wasdCamera.position.length() // 相机与中心的距离property real gridInterval: Math.pow(10, Math.round(Math.log10(cameraDistance)) - 1) // 网格间隔计算// 更新场景边界信息function updateBounds(bounds) {boundsSize = Qt.vector3d(bounds.maximum.x - bounds.minimum.x,bounds.maximum.y - bounds.minimum.y,bounds.maximum.z - bounds.minimum.z)boundsDiameter = Math.max(boundsSize.x, boundsSize.y, boundsSize.z)boundsCenter = Qt.vector3d((bounds.maximum.x + bounds.minimum.x) / 2,(bounds.maximum.y + bounds.minimum.y) / 2,(bounds.maximum.z + bounds.minimum.z) / 2 )wasdController.speed = boundsDiameter / 1000.0 // 更新控制器速度wasdController.shiftSpeed = 3 * wasdController.speedwasdCamera.clipNear = boundsDiameter / 100wasdCamera.clipFar = boundsDiameter * 10view3D.resetView() // 重置视图}// 重置控制器function resetController() {orbitCameraNode.eulerRotation = Qt.vector3d(0, 0, 0)orbitCameraNode.position = boundsCenterorbitCamera.position = Qt.vector3d(0, 0, 2 * helper.boundsDiameter)orbitCamera.eulerRotation = Qt.vector3d(0, 0, 0)orbitControllerEnabled = true}// 切换控制器function switchController(useOrbitController) {if (useOrbitController) {let wasdOffset = wasdCamera.position.minus(boundsCenter)let wasdDistance = wasdOffset.length()let wasdDistanceInPlane = Qt.vector3d(wasdOffset.x, 0, wasdOffset.z).length()let yAngle = Math.atan2(wasdOffset.x, wasdOffset.z) * 180 / Math.PIlet xAngle = -Math.atan2(wasdOffset.y, wasdDistanceInPlane) * 180 / Math.PIorbitCameraNode.position = boundsCenterorbitCameraNode.eulerRotation = Qt.vector3d(xAngle, yAngle, 0)orbitCamera.position = Qt.vector3d(0, 0, wasdDistance)orbitCamera.eulerRotation = Qt.vector3d(0, 0, 0)} else {wasdCamera.position = orbitCamera.scenePositionwasdCamera.rotation = orbitCamera.sceneRotationwasdController.focus = true}orbitControllerEnabled = useOrbitController}}//! [runtimeloader] 运行时加载器RuntimeLoader {id: importNodesource: windowRoot.importUrl // 导入模型的URLinstancing: instancingButton.checked ? instancing : null // 实例化开关onBoundsChanged: helper.updateBounds(bounds) // 更新场景边界}//! [runtimeloader]//! [bounds] 场景边界Model {parent: importNodesource: "#Cube" // 默认使用立方体模型materials: PrincipledMaterial {baseColor: "red" // 设置基础颜色为红色}opacity: 0.2 // 设置模型透明度visible: visualizeButton.checked && importNode.status === RuntimeLoader.Success // 根据条件显示模型position: helper.boundsCenterscale: Qt.vector3d(helper.boundsSize.x / 100,helper.boundsSize.y / 100,helper.boundsSize.z / 100)}//! [bounds]//! [status report] 状态报告Rectangle {id: messageBoxvisible: importNode.status !== RuntimeLoader.Success // 如果导入失败,显示错误消息color: "red"width: parent.width * 0.8height: parent.height * 0.8anchors.centerIn: parentradius: Math.min(width, height) / 10opacity: 0.6Text {anchors.fill: parentfont.pixelSize: 36text: "Status: " + importNode.errorString + "\nPress \"Import...\" to import a model" // 显示错误信息color: "white"wrapMode: Text.WraphorizontalAlignment: Text.AlignHCenterverticalAlignment: Text.AlignVCenter}}//! [status report]}//! [camera control] 相机控制OrbitCameraController {id: orbitControllerorigin: orbitCameraNodecamera: orbitCameraenabled: helper.orbitControllerEnabled // 根据状态启用或禁用轨道控制器}WasdController {id: wasdControllercontrolledObject: wasdCameraenabled: !helper.orbitControllerEnabled // 根据状态启用或禁用WASD控制器}//! [camera control]// 界面控制面板Pane {width: parent.widthcontentHeight: controlsLayout.implicitHeightRowLayout {id: controlsLayoutButton {id: importButtontext: "Import..."onClicked: fileDialog.open() // 打开文件对话框focusPolicy: Qt.NoFocus}Button {id: resetButtontext: "Reset view"onClicked: view3D.resetView() // 重置视图focusPolicy: Qt.NoFocus}Button {id: visualizeButtoncheckable: truetext: "Visualize bounds" // 显示场景边界focusPolicy: Qt.NoFocus}Button {id: instancingButtoncheckable: truetext: "Instancing" // 开启实例化focusPolicy: Qt.NoFocus}Button {id: gridButtontext: "Show grid" // 显示网格focusPolicy: Qt.NoFocuscheckable: truechecked: false}Button {id: controllerButtontext: helper.orbitControllerEnabled ? "Orbit" : "WASD" // 切换控制器onClicked: helper.switchController(!helper.orbitControllerEnabled)focusPolicy: Qt.NoFocus}RowLayout {Label {text: "Material Override"}ComboBox {id: materialOverrideComboBoxtextRole: "text"valueRole: "value"implicitContentWidthPolicy: ComboBox.WidestTextonActivated: env.debugSettings.materialOverride = currentValue // 选择材质覆盖model: [{ value: DebugSettings.None, text: "None"},{ value: DebugSettings.BaseColor, text: "Base Color"},{ value: DebugSettings.Roughness, text: "Roughness"},{ value: DebugSettings.Metalness, text: "Metalness"},{ value: DebugSettings.Diffuse, text: "Diffuse"},{ value: DebugSettings.Specular, text: "Specular"},{ value: DebugSettings.ShadowOcclusion, text: "Shadow Occlusion"},{ value: DebugSettings.Emission, text: "Emission"},{ value: DebugSettings.AmbientOcclusion, text: "Ambient Occlusion"},{ value: DebugSettings.Normals, text: "Normals"},{ value: DebugSettings.Tangents, text: "Tangents"},{ value: DebugSettings.Binormals, text: "Binormals"},{ value: DebugSettings.F0, text: "F0"}]}}CheckBox {text: "Wireframe" // 启用或禁用线框模式checked: env.debugSettings.wireframeEnabledonCheckedChanged: {env.debugSettings.wireframeEnabled = checked}}}}// 文件对话框,允许用户选择glTF模型文件FileDialog {id: fileDialognameFilters: ["glTF files (*.gltf *.glb)", "All files (*)"]onAccepted: importUrl = file // 选择文件后导入Settings {id: fileDialogSettingscategory: "QtQuick3D.Examples.RuntimeLoader"property alias folder: fileDialog.folder}}// 调试视图切换按钮Item {width: debugViewToggleText.implicitWidthheight: debugViewToggleText.implicitHeightanchors.right: parent.rightLabel {id: debugViewToggleTexttext: "Click here " + (dbg.visible ? "to hide DebugView" : "for DebugView")anchors.right: parent.rightanchors.top: parent.top}MouseArea {anchors.fill: parentonClicked: dbg.visible = !dbg.visible // 切换调试视图可见性DebugView {y: debugViewToggleText.height * 2anchors.right: parent.rightsource: view3Did: dbgvisible: false}}}
}

5.main.cpp

// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifdef HAS_MODULE_QT_WIDGETS
# include <QApplication>
#endif
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQuickWindow>
#include <QtQuick3D/qquick3d.h>int main(int argc, char *argv[])
{
#ifdef HAS_MODULE_QT_WIDGETSQApplication app(argc, argv);
#elseQGuiApplication app(argc, argv);
#endifapp.setOrganizationName("The Qt Company");app.setOrganizationDomain("qt.io");app.setApplicationName("Runtime Asset Loading Example");const auto importUrl = argc > 1 ? QUrl::fromLocalFile(argv[1]) : QUrl{};if (importUrl.isValid())qDebug() << "Importing" << importUrl;QSurfaceFormat::setDefaultFormat(QQuick3D::idealSurfaceFormat(4));QQmlApplicationEngine engine;const QUrl url(QStringLiteral("qrc:/main.qml"));engine.load(url);if (engine.rootObjects().isEmpty()) {qWarning() << "Could not find root object in" << url;return -1;}QObject *topLevel = engine.rootObjects().value(0);QQuickWindow *window = qobject_cast<QQuickWindow *>(topLevel);if (window)window->setProperty("importUrl", importUrl);return app.exec();
}

6.CMakeLists.txt

# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clausecmake_minimum_required(VERSION 3.16)
project(runtimeloader LANGUAGES CXX)set(CMAKE_AUTOMOC ON)find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick Quick3D Widgets)qt_add_executable(runtimeloadermain.cpp
)set_target_properties(runtimeloader PROPERTIESWIN32_EXECUTABLE TRUEMACOSX_BUNDLE TRUE
)target_link_libraries(runtimeloader PUBLICQt::CoreQt::GuiQt::QuickQt::Quick3D
)if(TARGET Qt::Widgets)target_compile_definitions(runtimeloader PUBLICHAS_MODULE_QT_WIDGETS)target_link_libraries(runtimeloader PUBLICQt::Widgets)
endif()qt_add_qml_module(runtimeloaderURI ExampleVERSION 1.0QML_FILES main.qmlNO_RESOURCE_TARGET_PATH
)install(TARGETS runtimeloaderBUNDLE  DESTINATION .RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)qt_generate_deploy_qml_app_script(TARGET runtimeloaderOUTPUT_SCRIPT deploy_scriptMACOS_BUNDLE_POST_BUILDNO_UNSUPPORTED_PLATFORM_ERRORDEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
install(SCRIPT ${deploy_script})

相关文章:

qt-Quick3D笔记之官方例程Runtimeloader Example运行笔记

qt-Quick3D笔记之官方例程Runtimeloader Example运行笔记 文章目录 qt-Quick3D笔记之官方例程Runtimeloader Example运行笔记1.例程运行效果2.例程缩略图3.项目文件列表4.main.qml5.main.cpp6.CMakeLists.txt 1.例程运行效果 运行该项目需要自己准备一个模型文件 2.例程缩略图…...

Linux内核中的页面错误处理机制与按需分页技术

在现代操作系统中,内存管理是核心功能之一,而页面错误(Page Fault)处理机制是内存管理的重要组成部分。当程序访问一个尚未映射到物理内存的虚拟地址时,CPU会触发页面错误异常,内核需要捕获并处理这种异常,以决定如何响应,例如加载缺失的页面、处理权限错误等。Linux内…...

PHP实现混合加密方式,提高加密的安全性(代码解密)

代码1&#xff1a; <?php // 需要加密的内容 $plaintext 授权服务器拒绝连接;// 1. AES加密部分 $aesKey openssl_random_pseudo_bytes(32); // 生成256位AES密钥 $iv openssl_random_pseudo_bytes(16); // 生成128位IV// AES加密&#xff08;CBC模式&#xff09…...

使用openwrt搭建ipsec隧道

背景&#xff1a;最近同事遇到了个ipsec问题&#xff0c;做的ipsec特性&#xff0c;ftp下载ipv6性能只有100kb, 正面定位该问题也蛮久了&#xff0c;项目没有用openwrt, 不过用了开源组件strongswan, 加密算法这些也是内核自带的&#xff0c;想着开源的不太可能有问题&#xff…...

大语言模型(LLM)模拟金融市场参与者行为

大语言模型(LLM)模拟金融市场参与者行为 研究背景 传统深度学习模型通过识别市场数据历史模式预测市场,但未捕捉个体决策过程。LLM 虽能学习人类对不同提示的反应,但在模拟金融市场参与者时面临挑战:个体投资者不总是理性决策,LLM 可能无法捕捉;LLM 数值和金融知识可靠…...

用一个例子详细说明python单例模式

单例模式是一种设计模式&#xff0c;它确保一个类只有一个实例&#xff0c;并提供一个全局访问点来访问该实例。这在需要控制资源&#xff08;如数据库连接、文件系统等&#xff09;的访问时非常有用。 下面是一个使用Python实现单例模式的例子&#xff1a; class Singleton:…...

第1章 量子暗网中的血色黎明

月球暗面的危机与阴谋 量子隧穿效应催生的幽蓝电弧&#xff0c;于环形山表面肆意跳跃&#xff0c;仿若无数奋力挣扎的机械蠕虫&#xff0c;将月球暗面的死寂打破&#xff0c;徒增几分诡异。艾丽伫立在被遗弃的“广寒宫”量子基站顶端&#xff0c;机械义眼之中&#xff0c;倒映着…...

LeetCode--84. 柱状图中最大的矩形【单调栈】

84. 柱状图中最大的矩形 正文 题目如下 给定 n 个非负整数&#xff0c;用来表示柱状图中各个柱子的高度。每个柱子彼此相邻&#xff0c;且宽度为 1 。 求在该柱状图中&#xff0c;能够勾勒出来的矩形的最大面积。 这道题暴力很简单&#xff0c;但是时间复杂度是O(N^2)&#xf…...

网络工程师 (8)存储管理

一、页式存储基本原理 &#xff08;一&#xff09;内存划分 页式存储首先将内存物理空间划分成大小相等的存储块&#xff0c;这些块通常被称为“页帧”或“物理页”。每个页帧的大小是固定的&#xff0c;例如常见的页帧大小有4KB、8KB等&#xff0c;这个大小由操作系统决定。同…...

【Leetcode 每日一题】541. 反转字符串 II

问题背景 给定一个字符串 s s s 和一个整数 k k k&#xff0c;从字符串开头算起&#xff0c;每计数至 2 k 2k 2k 个字符&#xff0c;就反转这 2 k 2k 2k 字符中的前 k k k 个字符。 如果剩余字符少于 k k k 个&#xff0c;则将剩余字符全部反转。如果剩余字符小于 2 k…...

MSA Transformer

过去的蛋白质语言模型以单个序列为输入&#xff0c;MSA Transformer以多序列比对的形式将一组序列作为输入。该模型将行和列注意力交织在输入序列中&#xff0c;并在许多蛋白质家族中使用mask语言建模目标进行训练。模型的性能远超过了当时最先进的无监督学习方法&#xff0c;其…...

Vue.js组件开发-实现全屏焦点图片带图标导航按钮控制图片滑动切换

使用 Vue 实现全屏焦点图片带图标导航按钮控制图片滑动切换 步骤 创建 Vue 项目&#xff1a;可以使用 Vue CLI 快速创建一个新的 Vue 项目。设计组件结构&#xff1a;创建一个包含图片展示区域和导航按钮的组件。实现图片滑动切换逻辑&#xff1a;通过点击导航按钮切换图片。…...

Linux系统上安装与配置 MySQL( CentOS 7 )

目录 1. 下载并安装 MySQL 官方 Yum Repository 2. 启动 MySQL 并查看运行状态 3. 找到 root 用户的初始密码 4. 修改 root 用户密码 5. 设置允许远程登录 6. 在云服务器配置 MySQL 端口 7. 关闭防火墙 8. 解决密码错误的问题 前言 在 Linux 服务器上安装并配置 MySQL …...

Vue 3 30天精进之旅:Day 10 - Vue Router

在现代单页面应用&#xff08;SPA&#xff09;中&#xff0c;路由管理是必不可少的一部分。Vue Router是Vue.js官方的路由管理库&#xff0c;它使得在Vue应用中实现路由变得简单而灵活。今天的学习将围绕以下几个方面展开&#xff1a; Vue Router概述安装和基本配置定义路由路…...

人工智能如何驱动SEO关键词优化策略的转型与效果提升

内容概要 随着数字化时代的到来&#xff0c;人工智能&#xff08;AI&#xff09;技术对各行各业的影响日益显著&#xff0c;在搜索引擎优化&#xff08;SEO&#xff09;领域尤为如此。AI的应用不仅改变了关键词研究的方法&#xff0c;而且提升了内容生成和搜索优化的效率&…...

keil5如何添加.h 和.c文件,以及如何添加文件夹

1.简介 在hal库的编程中我们一般会生成如下的几个文件夹&#xff0c;在这几个文件夹内存储着各种外设所需要的函数接口.h文件&#xff0c;和实现函数具体功能的.c文件&#xff0c;但是有时我们想要创建自己的文件夹并在这些文件夹下面创造.h .c文件来实现某些功能&#xff0c;…...

BMC PSL function(22)-printf()

printf() 含义:Print text formatted to the C library printf() routine specification Format printf(format,[arg1,......,argn]) Parameter ParameterDefinitionformattext, variable names, and control characters that specify the content and format of output t…...

【数据结构】_复杂度

目录 1. 算法效率 2. 时间复杂度 2.1 时间复杂度概念 2.2 准确的时间复杂度函数式 2.3 大O渐进表示法 2.4 时间复杂度的常见量级 2.5 时间复杂度示例 3. 空间复杂度 3.1 空间复杂度概念 3.2 空间复杂度示例 1. 算法效率 一般情况下&#xff0c;衡量一个算法的好坏是…...

pytorch实现循环神经网络

人工智能例子汇总&#xff1a;AI常见的算法和例子-CSDN博客 PyTorch 提供三种主要的 RNN 变体&#xff1a; nn.RNN&#xff1a;最基本的循环神经网络&#xff0c;适用于短时依赖任务。nn.LSTM&#xff1a;长短时记忆网络&#xff0c;适用于长序列数据&#xff0c;能有效解决…...

Java 16进制 10进制 2进制数 相互的转换

在 Java 中&#xff0c;进行进制之间的转换时&#xff0c;除了功能的正确性外&#xff0c;效率和安全性也很重要。为了确保高效和相对安全的转换&#xff0c;我们通常需要考虑&#xff1a; 性能&#xff1a;使用内置的转换方法&#xff0c;如 Integer.toHexString()、Integer.…...

wordpress后台更新后 前端没变化的解决方法

使用siteground主机的wordpress网站&#xff0c;会出现更新了网站内容和修改了php模板文件、js文件、css文件、图片文件后&#xff0c;网站没有变化的情况。 不熟悉siteground主机的新手&#xff0c;遇到这个问题&#xff0c;就很抓狂&#xff0c;明明是哪都没操作错误&#x…...

(LeetCode 每日一题) 3442. 奇偶频次间的最大差值 I (哈希、字符串)

题目&#xff1a;3442. 奇偶频次间的最大差值 I 思路 &#xff1a;哈希&#xff0c;时间复杂度0(n)。 用哈希表来记录每个字符串中字符的分布情况&#xff0c;哈希表这里用数组即可实现。 C版本&#xff1a; class Solution { public:int maxDifference(string s) {int a[26]…...

19c补丁后oracle属主变化,导致不能识别磁盘组

补丁后服务器重启&#xff0c;数据库再次无法启动 ORA01017: invalid username/password; logon denied Oracle 19c 在打上 19.23 或以上补丁版本后&#xff0c;存在与用户组权限相关的问题。具体表现为&#xff0c;Oracle 实例的运行用户&#xff08;oracle&#xff09;和集…...

Python:操作 Excel 折叠

💖亲爱的技术爱好者们,热烈欢迎来到 Kant2048 的博客!我是 Thomas Kant,很开心能在CSDN上与你们相遇~💖 本博客的精华专栏: 【自动化测试】 【测试经验】 【人工智能】 【Python】 Python 操作 Excel 系列 读取单元格数据按行写入设置行高和列宽自动调整行高和列宽水平…...

FastAPI 教程:从入门到实践

FastAPI 是一个现代、快速&#xff08;高性能&#xff09;的 Web 框架&#xff0c;用于构建 API&#xff0c;支持 Python 3.6。它基于标准 Python 类型提示&#xff0c;易于学习且功能强大。以下是一个完整的 FastAPI 入门教程&#xff0c;涵盖从环境搭建到创建并运行一个简单的…...

汽车生产虚拟实训中的技能提升与生产优化​

在制造业蓬勃发展的大背景下&#xff0c;虚拟教学实训宛如一颗璀璨的新星&#xff0c;正发挥着不可或缺且日益凸显的关键作用&#xff0c;源源不断地为企业的稳健前行与创新发展注入磅礴强大的动力。就以汽车制造企业这一极具代表性的行业主体为例&#xff0c;汽车生产线上各类…...

ServerTrust 并非唯一

NSURLAuthenticationMethodServerTrust 只是 authenticationMethod 的冰山一角 要理解 NSURLAuthenticationMethodServerTrust, 首先要明白它只是 authenticationMethod 的选项之一, 并非唯一 1 先厘清概念 点说明authenticationMethodURLAuthenticationChallenge.protectionS…...

RabbitMQ入门4.1.0版本(基于java、SpringBoot操作)

RabbitMQ 一、RabbitMQ概述 RabbitMQ RabbitMQ最初由LShift和CohesiveFT于2007年开发&#xff0c;后来由Pivotal Software Inc.&#xff08;现为VMware子公司&#xff09;接管。RabbitMQ 是一个开源的消息代理和队列服务器&#xff0c;用 Erlang 语言编写。广泛应用于各种分布…...

02.运算符

目录 什么是运算符 算术运算符 1.基本四则运算符 2.增量运算符 3.自增/自减运算符 关系运算符 逻辑运算符 &&&#xff1a;逻辑与 ||&#xff1a;逻辑或 &#xff01;&#xff1a;逻辑非 短路求值 位运算符 按位与&&#xff1a; 按位或 | 按位取反~ …...

Java详解LeetCode 热题 100(26):LeetCode 142. 环形链表 II(Linked List Cycle II)详解

文章目录 1. 题目描述1.1 链表节点定义 2. 理解题目2.1 问题可视化2.2 核心挑战 3. 解法一&#xff1a;HashSet 标记访问法3.1 算法思路3.2 Java代码实现3.3 详细执行过程演示3.4 执行结果示例3.5 复杂度分析3.6 优缺点分析 4. 解法二&#xff1a;Floyd 快慢指针法&#xff08;…...