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

Chromium 中chrome.system.display扩展接口定义c++

一、chrome.system.display

使用 system.display API 查询展示元数据。

权限

system.display

类型

ActiveState

Chrome 117 及更高版本

用于指示系统是否检测到和使用显示屏的枚举。如果系统未检测到显示屏(可能断开连接,或因睡眠模式等原因而被视为断开连接),则显示屏将被视为“非活动状态”。例如,此状态用于在所有显示屏断开连接时保留现有显示屏。

chrome.system.display  |  API  |  Chrome for Developers

二、chrome.system.display c++接口定义:

1、system_display.idl

extensions\common\api\system_display.idl

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.// Use the <code>system.display</code> API to query display metadata.
namespace system.display {dictionary Bounds {// The x-coordinate of the upper-left corner.long left;// The y-coordinate of the upper-left corner.long top;// The width of the display in pixels.long width;// The height of the display in pixels.long height;};dictionary Insets {// The x-axis distance from the left bound.long left;// The y-axis distance from the top bound.long top;// The x-axis distance from the right bound.long right;// The y-axis distance from the bottom bound.long bottom;};dictionary Point {// The x-coordinate of the point.long x;// The y-coordinate of the point.long y;};dictionary TouchCalibrationPair {// The coordinates of the display point.Point displayPoint;// The coordinates of the touch point corresponding to the display point.Point touchPoint;};dictionary TouchCalibrationPairQuad {// First pair of touch and display point required for touch calibration.TouchCalibrationPair pair1;// Second pair of touch and display point required for touch calibration.TouchCalibrationPair pair2;// Third pair of touch and display point required for touch calibration.TouchCalibrationPair pair3;// Fourth pair of touch and display point required for touch calibration.TouchCalibrationPair pair4;};dictionary DisplayMode {// The display mode width in device independent (user visible) pixels.long width;// The display mode height in device independent (user visible) pixels.long height;// The display mode width in native pixels.long widthInNativePixels;// The display mode height in native pixels.long heightInNativePixels;// The display mode UI scale factor.[deprecated="Use $(ref: displayZoomFactor)"] double? uiScale;// The display mode device scale factor.double deviceScaleFactor;// The display mode refresh rate in hertz.double refreshRate;// True if the mode is the display's native mode.boolean isNative;// True if the display mode is currently selected.boolean isSelected;// True if this mode is interlaced, false if not provided.boolean? isInterlaced;};// Layout position, i.e. edge of parent that the display is attached to.enum LayoutPosition { top, right, bottom, left };dictionary DisplayLayout {// The unique identifier of the display.DOMString id;// The unique identifier of the parent display. Empty if this is the root.DOMString parentId;// The layout position of this display relative to the parent. This will// be ignored for the root.LayoutPosition position;// The offset of the display along the connected edge. 0 indicates that// the topmost or leftmost corners are aligned.long offset;};// EDID extracted parameters. Field description refers to "VESA ENHANCED// EXTENDED DISPLAY IDENTIFICATION DATA STANDARD (Defines EDID Structure// Version 1, Revision 4)" Release A, Revision 2 September 25, 2006.// https://www.vesa.org/vesa-standardsdictionary Edid {// 3 character manufacturer code. See Sec. 3.4.1 page 21. Required in v1.4.DOMString manufacturerId;// 2 byte manufacturer-assigned code, Sec. 3.4.2 page 21. Required in v1.4.DOMString productId;// Year of manufacturer, Sec. 3.4.4 page 22. Required in v1.4.long yearOfManufacture;};// An enum to tell if the display is detected and used by the// system. The display is considered 'inactive', if it is not// detected by the system (maybe disconnected, or considered// disconnected due to sleep mode, etc). This state is used to keep// existing display when the all displays are disconnected, for// example.enum ActiveState { active, inactive };dictionary DisplayUnitInfo {// The unique identifier of the display.DOMString id;// The user-friendly name (e.g. "HP LCD monitor").DOMString name;// NOTE: This is only available to Chrome OS Kiosk apps and Web UI.Edid? edid;// Chrome OS only. Identifier of the display that is being mirrored if// mirroring is enabled, otherwise empty. This will be set for all displays// (including the display being mirrored).DOMString mirroringSourceId;// Chrome OS only. Identifiers of the displays to which the source display// is being mirrored. Empty if no displays are being mirrored. This will be// set to the same value for all displays. This must not include// |mirroringSourceId|.DOMString[] mirroringDestinationIds;// True if this is the primary display.boolean isPrimary;// True if this is an internal display.boolean isInternal;// True if this display is enabled.boolean isEnabled;// Active if the display is detected and used by the system.ActiveState activeState;// True for all displays when in unified desktop mode. See documentation// for $(ref:enableUnifiedDesktop).boolean isUnified;// True when the auto-rotation is allowed. It happens when the device is in// a tablet physical state or kSupportsClamshellAutoRotation is set.// Provided for ChromeOS Settings UI only. TODO(stevenjb): Remove when// Settings switches to a mojo API.[nodoc] boolean? isAutoRotationAllowed;// The number of pixels per inch along the x-axis.double dpiX;// The number of pixels per inch along the y-axis.double dpiY;// The display's clockwise rotation in degrees relative to the vertical// position.// Currently exposed only on ChromeOS. Will be set to 0 on other platforms.// A value of -1 will be interpreted as auto-rotate when the device is in// a physical tablet state.long rotation;// The display's logical bounds.Bounds bounds;// The display's insets within its screen's bounds.// Currently exposed only on ChromeOS. Will be set to empty insets on// other platforms.Insets overscan;// The usable work area of the display within the display bounds. The work// area excludes areas of the display reserved for OS, for example taskbar// and launcher.Bounds workArea;// The list of available display modes. The current mode will have// isSelected=true. Only available on Chrome OS. Will be set to an empty// array on other platforms.DisplayMode[] modes;// True if this display has a touch input device associated with it.boolean hasTouchSupport;// True if this display has an accelerometer associated with it.// Provided for ChromeOS Settings UI only. TODO(stevenjb): Remove when// Settings switches to a mojo API. NOTE: The name of this may change.[nodoc] boolean hasAccelerometerSupport;// A list of zoom factor values that can be set for the display.double[] availableDisplayZoomFactors;// The ratio between the display's current and default zoom.// For example, value 1 is equivalent to 100% zoom, and value 1.5 is// equivalent to 150% zoom.double displayZoomFactor;};dictionary DisplayProperties {// Chrome OS only. If set to true, changes the display mode to unified// desktop (see $(ref:enableUnifiedDesktop) for details). If set to false,// unified desktop mode will be disabled. This is only valid for the// primary display. If provided, mirroringSourceId must not be provided and// other properties will be ignored. This is has no effect if not provided.boolean? isUnified;// Chrome OS only. If set and not empty, enables mirroring for this display// only. Otherwise disables mirroring for all displays. This value should// indicate the id of the source display to mirror, which must not be the// same as the id passed to setDisplayProperties. If set, no other property// may be set.[deprecated="Use $(ref:setMirrorMode)."] DOMString? mirroringSourceId;// If set to true, makes the display primary. No-op if set to false.// Note: If set, the display is considered primary for all other properties// (i.e. $(ref:isUnified) may be set and bounds origin may not).boolean? isPrimary;// If set, sets the display's overscan insets to the provided values. Note// that overscan values may not be negative or larger than a half of the// screen's size. Overscan cannot be changed on the internal monitor.Insets? overscan;// If set, updates the display's rotation.// Legal values are [0, 90, 180, 270]. The rotation is set clockwise,// relative to the display's vertical position.long? rotation;// If set, updates the display's logical bounds origin along the x-axis.// Applied together with $(ref:boundsOriginY). Defaults to the current value// if not set and $(ref:boundsOriginY) is set. Note that when updating the// display origin, some constraints will be applied, so the final bounds// origin may be different than the one set. The final bounds can be// retrieved using $(ref:getInfo). The bounds origin cannot be changed on// the primary display.long? boundsOriginX;// If set, updates the display's logical bounds origin along the y-axis.// See documentation for $(ref:boundsOriginX) parameter.long? boundsOriginY;// If set, updates the display mode to the mode matching this value.// If other parameters are invalid, this will not be applied. If the// display mode is invalid, it will not be applied and an error will be// set, but other properties will still be applied.DisplayMode? displayMode;// If set, updates the zoom associated with the display. This zoom performs// re-layout and repaint thus resulting in a better quality zoom than just// performing a pixel by pixel stretch enlargement.double? displayZoomFactor;};dictionary GetInfoFlags {// If set to true, only a single $(ref:DisplayUnitInfo) will be returned// by $(ref:getInfo) when in unified desktop mode (see// $(ref:enableUnifiedDesktop)). Defaults to false.boolean? singleUnified;};// Mirror mode, i.e. different ways of how a display is mirrored to other// displays.enum MirrorMode {// Specifies the default mode (extended or unified desktop).off,// Specifies that the default source display will be mirrored to all other// displays.normal,// Specifies that the specified source display will be mirrored to the// provided destination displays. All other connected displays will be//  extended.mixed};dictionary MirrorModeInfo {// The mirror mode that should be set.MirrorMode mode;// The id of the mirroring source display. This is only valid for 'mixed'.DOMString? mirroringSourceId;// The ids of the mirroring destination displays. This is only valid for// 'mixed'.DOMString[]? mirroringDestinationIds;};callback DisplayInfoCallback = void (DisplayUnitInfo[] displayInfo);callback DisplayLayoutCallback = void (DisplayLayout[] layouts);callback SetDisplayUnitInfoCallback = void();callback SetDisplayLayoutCallback = void();callback NativeTouchCalibrationCallback = void(boolean success);callback SetMirrorModeCallback = void();interface Functions {// Requests the information for all attached display devices.// |flags|: Options affecting how the information is returned.// |callback|: The callback to invoke with the results.[supportsPromises] static void getInfo(optional GetInfoFlags flags,DisplayInfoCallback callback);// Requests the layout info for all displays.// NOTE: This is only available to Chrome OS Kiosk apps and Web UI.// |callback|: The callback to invoke with the results.[supportsPromises] static void getDisplayLayout(DisplayLayoutCallback callback);// Updates the properties for the display specified by |id|, according to// the information provided in |info|. On failure, $(ref:runtime.lastError)// will be set.// NOTE: This is only available to Chrome OS Kiosk apps and Web UI.// |id|: The display's unique identifier.// |info|: The information about display properties that should be changed.//     A property will be changed only if a new value for it is specified in//     |info|.// |callback|: Empty function called when the function finishes. To find out//     whether the function succeeded, $(ref:runtime.lastError) should be//     queried.[supportsPromises] static void setDisplayProperties(DOMString id,DisplayProperties info,optional SetDisplayUnitInfoCallback callback);// Set the layout for all displays. Any display not included will use the// default layout. If a layout would overlap or be otherwise invalid it// will be adjusted to a valid layout. After layout is resolved, an// onDisplayChanged event will be triggered.// NOTE: This is only available to Chrome OS Kiosk apps and Web UI.// |layouts|: The layout information, required for all displays except//     the primary display.// |callback|: Empty function called when the function finishes. To find out//     whether the function succeeded, $(ref:runtime.lastError) should be//     queried.[supportsPromises] static void setDisplayLayout(DisplayLayout[] layouts,optional SetDisplayLayoutCallback callback);// Enables/disables the unified desktop feature. If enabled while mirroring// is active, the desktop mode will not change until mirroring is turned// off. Otherwise, the desktop mode will switch to unified immediately.// NOTE: This is only available to Chrome OS Kiosk apps and Web UI.// |enabled|: True if unified desktop should be enabled.static void enableUnifiedDesktop(boolean enabled);// Starts overscan calibration for a display. This will show an overlay// on the screen indicating the current overscan insets. If overscan// calibration for display |id| is in progress this will reset calibration.// |id|: The display's unique identifier.static void overscanCalibrationStart(DOMString id);// Adjusts the current overscan insets for a display. Typically this should// either move the display along an axis (e.g. left+right have the same// value) or scale it along an axis (e.g. top+bottom have opposite values).// Each Adjust call is cumulative with previous calls since Start.// |id|: The display's unique identifier.// |delta|: The amount to change the overscan insets.static void overscanCalibrationAdjust(DOMString id, Insets delta);// Resets the overscan insets for a display to the last saved value (i.e// before Start was called).// |id|: The display's unique identifier.static void overscanCalibrationReset(DOMString id);// Complete overscan adjustments for a display  by saving the current values// and hiding the overlay.// |id|: The display's unique identifier.static void overscanCalibrationComplete(DOMString id);// Displays the native touch calibration UX for the display with |id| as// display id. This will show an overlay on the screen with required// instructions on how to proceed. The callback will be invoked in case of// successful calibration only. If the calibration fails, this will throw an// error.// |id|: The display's unique identifier.// |callback|: Optional callback to inform the caller that the touch//      calibration has ended. The argument of the callback informs if the//      calibration was a success or not.[supportsPromises] static void showNativeTouchCalibration(DOMString id,optional NativeTouchCalibrationCallback callback);// Starts custom touch calibration for a display. This should be called when// using a custom UX for collecting calibration data. If another touch// calibration is already in progress this will throw an error.// |id|: The display's unique identifier.static void startCustomTouchCalibration(DOMString id);// Sets the touch calibration pairs for a display. These |pairs| would be// used to calibrate the touch screen for display with |id| called in// startCustomTouchCalibration(). Always call |startCustomTouchCalibration|// before calling this method. If another touch calibration is already in// progress this will throw an error.// |pairs|: The pairs of point used to calibrate the display.// |bounds|: Bounds of the display when the touch calibration was performed.//     |bounds.left| and |bounds.top| values are ignored.static void completeCustomTouchCalibration(TouchCalibrationPairQuad pairs,Bounds bounds);// Resets the touch calibration for the display and brings it back to its// default state by clearing any touch calibration data associated with the// display.// |id|: The display's unique identifier.static void clearTouchCalibration(DOMString id);// Sets the display mode to the specified mirror mode. Each call resets the// state from previous calls. Calling setDisplayProperties() will fail for// the mirroring destination displays.// NOTE: This is only available to Chrome OS Kiosk apps and Web UI.// |info|: The information of the mirror mode that should be applied to the//     display mode.// |callback|: Empty function called when the function finishes. To find out//     whether the function succeeded, $(ref:runtime.lastError) should be//     queried.[supportsPromises] static void setMirrorMode(MirrorModeInfo info,optional SetMirrorModeCallback callback);};interface Events {// Fired when anything changes to the display configuration.static void onDisplayChanged();};
};

2、system_display.idl生成c++文件:

out\Debug\gen\extensions\common\api\system_display.h

out\Debug\gen\extensions\common\api\system_display.cc

3、chrome.system.display api接口定义c++:

extensions\browser\api\system_display\system_display_api.h

extensions\browser\api\system_display\system_display_api.cc

namespace extensions {class SystemDisplayFunction : public ExtensionFunction {public:static const char kApiNotAvailableError[];protected:~SystemDisplayFunction() override = default;bool PreRunValidation(std::string* error) override;
};class SystemDisplayCrOSRestrictedFunction : public SystemDisplayFunction {public:static const char kCrosOnlyError[];static const char kKioskOnlyError[];protected:~SystemDisplayCrOSRestrictedFunction() override = default;bool PreRunValidation(std::string* error) override;// Returns true if this function should be restricted to kiosk-mode apps and// webui. The default is true.virtual bool ShouldRestrictToKioskAndWebUI();
};// This function inherits from SystemDisplayFunction because, unlike the
// rest of this API, it's available on all platforms.
class SystemDisplayGetInfoFunction : public SystemDisplayFunction {public:DECLARE_EXTENSION_FUNCTION("system.display.getInfo", SYSTEM_DISPLAY_GETINFO)protected:~SystemDisplayGetInfoFunction() override = default;ResponseAction Run() override;void Response(std::vector<api::system_display::DisplayUnitInfo> all_displays_info);
};class SystemDisplayGetDisplayLayoutFunction: public SystemDisplayCrOSRestrictedFunction {public:DECLARE_EXTENSION_FUNCTION("system.display.getDisplayLayout",SYSTEM_DISPLAY_GETDISPLAYLAYOUT)protected:~SystemDisplayGetDisplayLayoutFunction() override = default;ResponseAction Run() override;bool ShouldRestrictToKioskAndWebUI() override;void Response(std::vector<api::system_display::DisplayLayout> display_layout);
};class SystemDisplaySetDisplayPropertiesFunction: public SystemDisplayCrOSRestrictedFunction {public:DECLARE_EXTENSION_FUNCTION("system.display.setDisplayProperties",SYSTEM_DISPLAY_SETDISPLAYPROPERTIES)protected:~SystemDisplaySetDisplayPropertiesFunction() override = default;ResponseAction Run() override;void Response(std::optional<std::string> error);
};class SystemDisplaySetDisplayLayoutFunction: public SystemDisplayCrOSRestrictedFunction {public:DECLARE_EXTENSION_FUNCTION("system.display.setDisplayLayout",SYSTEM_DISPLAY_SETDISPLAYLAYOUT)protected:~SystemDisplaySetDisplayLayoutFunction() override = default;ResponseAction Run() override;void Response(std::optional<std::string> error);
};class SystemDisplayEnableUnifiedDesktopFunction: public SystemDisplayCrOSRestrictedFunction {public:DECLARE_EXTENSION_FUNCTION("system.display.enableUnifiedDesktop",SYSTEM_DISPLAY_ENABLEUNIFIEDDESKTOP)protected:~SystemDisplayEnableUnifiedDesktopFunction() override = default;ResponseAction Run() override;
};class SystemDisplayOverscanCalibrationStartFunction: public SystemDisplayCrOSRestrictedFunction {public:DECLARE_EXTENSION_FUNCTION("system.display.overscanCalibrationStart",SYSTEM_DISPLAY_OVERSCANCALIBRATIONSTART)protected:~SystemDisplayOverscanCalibrationStartFunction() override = default;ResponseAction Run() override;
};class SystemDisplayOverscanCalibrationAdjustFunction: public SystemDisplayCrOSRestrictedFunction {public:DECLARE_EXTENSION_FUNCTION("system.display.overscanCalibrationAdjust",SYSTEM_DISPLAY_OVERSCANCALIBRATIONADJUST)protected:~SystemDisplayOverscanCalibrationAdjustFunction() override = default;ResponseAction Run() override;
};class SystemDisplayOverscanCalibrationResetFunction: public SystemDisplayCrOSRestrictedFunction {public:DECLARE_EXTENSION_FUNCTION("system.display.overscanCalibrationReset",SYSTEM_DISPLAY_OVERSCANCALIBRATIONRESET)protected:~SystemDisplayOverscanCalibrationResetFunction() override = default;ResponseAction Run() override;
};class SystemDisplayOverscanCalibrationCompleteFunction: public SystemDisplayCrOSRestrictedFunction {public:DECLARE_EXTENSION_FUNCTION("system.display.overscanCalibrationComplete",SYSTEM_DISPLAY_OVERSCANCALIBRATIONCOMPLETE)protected:~SystemDisplayOverscanCalibrationCompleteFunction() override = default;ResponseAction Run() override;
};class SystemDisplayShowNativeTouchCalibrationFunction: public SystemDisplayCrOSRestrictedFunction {public:DECLARE_EXTENSION_FUNCTION("system.display.showNativeTouchCalibration",SYSTEM_DISPLAY_SHOWNATIVETOUCHCALIBRATION)protected:~SystemDisplayShowNativeTouchCalibrationFunction() override = default;ResponseAction Run() override;void OnCalibrationComplete(std::optional<std::string> error);
};class SystemDisplayStartCustomTouchCalibrationFunction: public SystemDisplayCrOSRestrictedFunction {public:DECLARE_EXTENSION_FUNCTION("system.display.startCustomTouchCalibration",SYSTEM_DISPLAY_STARTCUSTOMTOUCHCALIBRATION)protected:~SystemDisplayStartCustomTouchCalibrationFunction() override = default;ResponseAction Run() override;
};class SystemDisplayCompleteCustomTouchCalibrationFunction: public SystemDisplayCrOSRestrictedFunction {public:DECLARE_EXTENSION_FUNCTION("system.display.completeCustomTouchCalibration",SYSTEM_DISPLAY_COMPLETECUSTOMTOUCHCALIBRATION)protected:~SystemDisplayCompleteCustomTouchCalibrationFunction() override = default;ResponseAction Run() override;
};class SystemDisplayClearTouchCalibrationFunction: public SystemDisplayCrOSRestrictedFunction {public:DECLARE_EXTENSION_FUNCTION("system.display.clearTouchCalibration",SYSTEM_DISPLAY_CLEARTOUCHCALIBRATION)protected:~SystemDisplayClearTouchCalibrationFunction() override = default;ResponseAction Run() override;
};class SystemDisplaySetMirrorModeFunction: public SystemDisplayCrOSRestrictedFunction {public:DECLARE_EXTENSION_FUNCTION("system.display.setMirrorMode",SYSTEM_DISPLAY_SETMIRRORMODE)protected:~SystemDisplaySetMirrorModeFunction() override = default;ResponseAction Run() override;void Response(std::optional<std::string> error);
};}  // namespace extensions

相关文章:

Chromium 中chrome.system.display扩展接口定义c++

一、chrome.system.display 使用 system.display API 查询展示元数据。 权限 system.display 类型 ActiveState Chrome 117 及更高版本 用于指示系统是否检测到和使用显示屏的枚举。如果系统未检测到显示屏&#xff08;可能断开连接&#xff0c;或因睡眠模式等原因而被视…...

容器docker的ulimit

Ulimit 在linux里ulimit命令可以对shell生成的进程的资源进行限制。 常用的ulimit限制 打开文件句柄数core文件大小设置进程能够消耗的虚拟内存设置用户能够打开的进程数目 不太常用的ulimit限制 设置数据段的最大值.单位:kbytes 设置创建文件的最大值.单位:blocks 设置在…...

一、HTML

一、基础概念 1、浏览器相关知识 这五个浏览器市场份额都非常大&#xff0c;且都有自己的内核。 什么是内核&#xff1a; 内核是浏览器的核心&#xff0c;用于处理浏览器所得到的各种资源。 例如&#xff0c;服务器发送图片、视频、音频的资源&#xff0c;浏览…...

使用Geekbench6软件对真实和虚拟的苹果桌面系统(macOS)进行打分比较

前言 感觉VMWare安装的MacOS使用起来非常的慢&#xff0c;所以特意用打分软件GeekBench进行了评测。 一、Geekbench的安装 可以从官网直接进行下载&#xff0c; 链接是&#xff1a; 二、Geekbench的直接使用 2.1、真机的信息 2.2、虚拟机的信息 三、打分的比较 3.1、真机…...

lua入门教程:随机数

在Lua中&#xff0c;生成随机数是通过math库中的math.random函数来实现的。这个函数可以生成一个[0, 1)区间内的随机浮点数。如果你需要生成其他范围内的随机数&#xff0c;或者需要整数类型的随机数&#xff0c;可以通过一些简单的数学运算来调整math.random的输出。 以下是如…...

华为大咖说 | 浅谈智能运维技术

本文分享自华为云社区&#xff1a;华为大咖说 | 浅谈智能运维技术-云社区-华为云 本文作者&#xff1a;李文轩 &#xff08; 华为智能运维专家 &#xff09; 全文约2695字&#xff0c;阅读约需8分钟 在大数据、人工智能等新兴技术的加持下&#xff0c;智能运维&#xff08;AI…...

creo toolkit二次开发学习之获取任意选择模型作为元件,并进行获取约束等

获取任意选择模型作为元件进行操作前&#xff0c;先了解组件路径和程序集的构成&#xff1a;creo toolkit二次开发学习之程序集&#xff08;ProAsmcomp&#xff09;和装配体组件路径对象&#xff08;ProAsmcomppath&#xff09;-CSDN博客 代码如下 ProError test1() {ProError…...

sanitize-html 防止 XSS(跨站脚本攻击)

sanitize-html 是一个用于清理和验证 HTML 的 JavaScript 库&#xff0c;主要用于防止 XSS&#xff08;跨站脚本攻击&#xff09;。它允许你定义一套规则来决定哪些 HTML 标签和属性是可以被信任的&#xff0c;从而确保用户输入的内容不会包含潜在的恶意代码。 主要功能 HTML…...

【JavaEE】文件io

目录 文件类型 File概述 属性 构造方法 常用方法 Reader Writer InputStream OutputStream 字节流转字符流 通过Scanner读取InputStream 通过PrintWriter转换outputstream 示例 文件类型 从编程的角度看&#xff0c;文件类型主要就是两大类 文本&#xff08;文…...

FlinkPipelineComposer 详解

FlinkPipelineComposer 详解 原文 背景 在flink-cdc 3.0中引入了pipeline机制&#xff0c;提供了除Datastream api/flink sql以外的一种方式定义flink 任务 通过提供一个yaml文件&#xff0c;描述source sink transform等主要信息 由FlinkPipelineComposer解析&#xff0c…...

蓝桥杯-洛谷刷题-day2(C++)

目录 1.小写字母与大写字母的转换 2.使用string&#xff08;额外开一章持续补充&#xff09; i.访问字符串最后一位 3.保留N位小数输出 i.C侧 ii.C语言侧 iii.总结 4.高精度相加 i.各种数据类型转字符型 ii.三元运算符 iii.循环条件中的carry 1.小写字母与大写字母的…...

16008.行为树(五)-自定义数据指针在黑板中的传递

文章目录 1.1 背景1.2 xml文件定义1.3 代码实现1.3 执行结果1.1 背景 自定义数据结构指针,通过黑板的形式,在树的节点中进行指针的传递。 1.2 xml文件定义 xhome@ubuntu:~/opt/groot_pro$ cat unit_t1.xml<?xml version="1.0" encoding="UTF-8"?&…...

javascript Vue

DOM对象 什么是DOM DOM(Document Object Model)&#xff1a;文档对象模型&#xff0c;就是Javascript将HTML文档的各个组成部分封装为对象&#xff0c;通过修改HTML元素的内容和样式动态改变页面。 如何获取DOM对象 获取DOM中的元素对象&#xff08;Element对象/标签&…...

《揭秘观察者模式:作用与使用场景全解析》

在软件开发的世界中&#xff0c;设计模式就像是建筑师手中的蓝图&#xff0c;指导着软件系统的构建。其中&#xff0c;观察者模式是一种极为重要且广泛应用的设计模式。今天&#xff0c;我们就来深入探讨一下观察者模式的作用和使用场景。 一、观察者模式是什么&#xff1f; …...

【QT常用技术讲解】优化网络链接不上导致qt、qml界面卡顿的问题

前言 qt、qml项目经常会涉及访问MySQL数据库、网络服务器&#xff0c;并且界面打开时的初始化过程就会涉及到链接Mysql、网络服务器获取数据&#xff0c;如果网络不通&#xff0c;卡个几十秒&#xff0c;会让用户觉得非常的不爽&#xff0c;本文从技术调研的角度讲解解决此类问…...

下划线命名json数组转java对象

/*** 将驼峰式命名的字符串转换为下划线方式* @param camelCase* @return*/ private static String toUnderlineCase(String camelCase) {return StrUtil.toUnderlineCase(camelCase); }/*** 下划线-赋值给-驼峰* @param source 源数据* @param target 目标数据*/ public stati…...

实测运行容器化Nginx服务器

文章目录 前言一、拉取Nginx镜像二、创建挂载目录三、运行容器化Nginx服务器四、访问网页测试 总结 前言 运行容器化Nginx服务器&#xff0c;首先确保正确安装docker&#xff0c;并且已启动运行&#xff0c;具体安装docker方法见笔者前面的博文《OpenEuler 下 Docker 安装、配…...

显示器接口种类 | 附图片

显示器接口类型主要包括VGA、DVI、HDMI、DP和USB Type-C等。 VGA、DVI、HDMI、DP和USB Type-C 1. 观察 VGA接口:15针 DP接口&#xff1a;在DP接口旁&#xff0c;都有一个“D”型的标志。 电脑主机&#xff1a;DP(D) 显示器&#xff1a;VGA(15针) Ref https://cloud.tenc…...

C++初阶——list

一、什么是list list是一个可以在序列的任意位置进行插入和删除的容器&#xff0c;并且可以进行双向迭代。list的底层是一个双向链表&#xff0c;双向链表可以将它们包含的每个元素存储在不同且不相关的存储位置。通过将每个元素与前一个元素的链接和后一个元素的链接关联起来&…...

软件设计师-排序算法

冒泡排序 每一趟冒泡排序&#xff0c;从第0个元素开始&#xff0c;和后面的元素比较&#xff0c;如果大于就交换&#xff0c;否则不变&#xff0c;每次冒泡可以把最大的元素放到最后一个&#xff0c;第一次冒泡的终点是n-1,第二趟的是n-2,直到最后剩下一个元素。时间复杂度O(n…...

【Linux】shell脚本忽略错误继续执行

在 shell 脚本中&#xff0c;可以使用 set -e 命令来设置脚本在遇到错误时退出执行。如果你希望脚本忽略错误并继续执行&#xff0c;可以在脚本开头添加 set e 命令来取消该设置。 举例1 #!/bin/bash# 取消 set -e 的设置 set e# 执行命令&#xff0c;并忽略错误 rm somefile…...

【JavaEE】-- HTTP

1. HTTP是什么&#xff1f; HTTP&#xff08;全称为"超文本传输协议"&#xff09;是一种应用非常广泛的应用层协议&#xff0c;HTTP是基于TCP协议的一种应用层协议。 应用层协议&#xff1a;是计算机网络协议栈中最高层的协议&#xff0c;它定义了运行在不同主机上…...

Zustand 状态管理库:极简而强大的解决方案

Zustand 是一个轻量级、快速和可扩展的状态管理库&#xff0c;特别适合 React 应用。它以简洁的 API 和高效的性能解决了 Redux 等状态管理方案中的繁琐问题。 核心优势对比 基本使用指南 1. 创建 Store // store.js import create from zustandconst useStore create((set)…...

Linux相关概念和易错知识点(42)(TCP的连接管理、可靠性、面临复杂网络的处理)

目录 1.TCP的连接管理机制&#xff08;1&#xff09;三次握手①握手过程②对握手过程的理解 &#xff08;2&#xff09;四次挥手&#xff08;3&#xff09;握手和挥手的触发&#xff08;4&#xff09;状态切换①挥手过程中状态的切换②握手过程中状态的切换 2.TCP的可靠性&…...

《通信之道——从微积分到 5G》读书总结

第1章 绪 论 1.1 这是一本什么样的书 通信技术&#xff0c;说到底就是数学。 那些最基础、最本质的部分。 1.2 什么是通信 通信 发送方 接收方 承载信息的信号 解调出其中承载的信息 信息在发送方那里被加工成信号&#xff08;调制&#xff09; 把信息从信号中抽取出来&am…...

ArcGIS Pro制作水平横向图例+多级标注

今天介绍下载ArcGIS Pro中如何设置水平横向图例。 之前我们介绍了ArcGIS的横向图例制作&#xff1a;ArcGIS横向、多列图例、顺序重排、符号居中、批量更改图例符号等等&#xff08;ArcGIS出图图例8大技巧&#xff09;&#xff0c;那这次我们看看ArcGIS Pro如何更加快捷的操作。…...

是否存在路径(FIFOBB算法)

题目描述 一个具有 n 个顶点e条边的无向图&#xff0c;该图顶点的编号依次为0到n-1且不存在顶点与自身相连的边。请使用FIFOBB算法编写程序&#xff0c;确定是否存在从顶点 source到顶点 destination的路径。 输入 第一行两个整数&#xff0c;分别表示n 和 e 的值&#xff08;1…...

GO协程(Goroutine)问题总结

在使用Go语言来编写代码时&#xff0c;遇到的一些问题总结一下 [参考文档]&#xff1a;https://www.topgoer.com/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B/goroutine.html 1. main()函数默认的Goroutine 场景再现&#xff1a; 今天在看到这个教程的时候&#xff0c;在自己的电…...

加密通信 + 行为分析:运营商行业安全防御体系重构

在数字经济蓬勃发展的时代&#xff0c;运营商作为信息通信网络的核心枢纽&#xff0c;承载着海量用户数据与关键业务传输&#xff0c;其安全防御体系的可靠性直接关乎国家安全、社会稳定与企业发展。随着网络攻击手段的不断升级&#xff0c;传统安全防护体系逐渐暴露出局限性&a…...

二维FDTD算法仿真

二维FDTD算法仿真&#xff0c;并带完全匹配层&#xff0c;输入波形为高斯波、平面波 FDTD_二维/FDTD.zip , 6075 FDTD_二维/FDTD_31.m , 1029 FDTD_二维/FDTD_32.m , 2806 FDTD_二维/FDTD_33.m , 3782 FDTD_二维/FDTD_34.m , 4182 FDTD_二维/FDTD_35.m , 4793...