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

一、chrome.fontSettings

使用 chrome.fontSettings API 管理 Chrome 的字体设置。

权限

fontSettings

要使用 Font Settings API,您必须在扩展程序中声明 "fontSettings" 权限 清单。例如:

{"name": "My Font Settings Extension","description": "Customize your fonts","version": "0.2","permissions": ["fontSettings"],...
}

概念和用法

Chrome 允许某些字体设置取决于特定的常规字体系列和语言 脚本。例如, sans-serif 简体中文使用的字体可能与该字体不同 用于 serif 日语。

Chrome 支持的通用字体系列基于 CSS 通用字体系列, GenericReference下列出。当网页指定了通用字体系列时,Chrome 会选择 根据相应设置调整字体。如果未指定通用字体系列,则 Chrome 会使用 “包量”规则的通用字体系列。

当网页指定了语言时,Chrome 会根据 相应的语言脚本。如果未指定语言,则 Chrome 会使用默认设置 或全局、脚本。

支持的语言脚本由 ISO 15924 脚本代码指定,并列在下方 ScriptCode。从技术上讲,Chrome 设置并不是严格按脚本进行设置,还取决于 语言。例如,当 网页指定了俄语,并且该字体不仅用于西里尔文字, 字体覆盖的所有内容(如拉丁文)。

示例

以下代码可获取阿拉伯语标准字体。

chrome.fontSettings.getFont({ genericFamily: 'standard', script: 'Arab' },function(details) { console.log(details.fontId); }
);

下一个代码段用于设置日语的 sans-serif 字体。

chrome.fontSettings.setFont({ genericFamily: 'sansserif', script: 'Jpan', fontId: 'MS PGothic' }
);

若要试用此 API,请安装 chrome-extension-samples 中的 fontSettings API 示例 存储库

更多参考:chrome.fontSettings  |  API  |  Chrome for Developers

二、chrome.fontSettings c++接口定义:

1、font_settings.json 接口描述文件:

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.[{"namespace": "fontSettings","description": "Use the <code>chrome.fontSettings</code> API to manage Chrome's font settings.","types": [{"id": "FontName","type": "object","description": "Represents a font name.","properties": {"fontId": {"type": "string","description": "The font ID."},"displayName": {"type": "string","description": "The display name of the font."}}},{"id": "ScriptCode","type": "string","enum": [ "Afak", "Arab", "Armi", "Armn", "Avst", "Bali", "Bamu", "Bass", "Batk","Beng", "Blis", "Bopo", "Brah", "Brai", "Bugi", "Buhd", "Cakm", "Cans","Cari", "Cham", "Cher", "Cirt", "Copt", "Cprt", "Cyrl", "Cyrs", "Deva","Dsrt", "Dupl", "Egyd", "Egyh", "Egyp", "Elba", "Ethi", "Geor", "Geok","Glag", "Goth", "Gran", "Grek", "Gujr", "Guru", "Hang", "Hani", "Hano","Hans", "Hant", "Hebr", "Hluw", "Hmng", "Hung", "Inds", "Ital", "Java","Jpan", "Jurc", "Kali", "Khar", "Khmr", "Khoj", "Knda", "Kpel", "Kthi","Lana", "Laoo", "Latf", "Latg", "Latn", "Lepc", "Limb", "Lina", "Linb","Lisu", "Loma", "Lyci", "Lydi", "Mand", "Mani", "Maya", "Mend", "Merc","Mero", "Mlym", "Moon", "Mong", "Mroo", "Mtei", "Mymr", "Narb", "Nbat","Nkgb", "Nkoo", "Nshu", "Ogam", "Olck", "Orkh", "Orya", "Osma", "Palm","Perm", "Phag", "Phli", "Phlp", "Phlv", "Phnx", "Plrd", "Prti", "Rjng","Roro", "Runr", "Samr", "Sara", "Sarb", "Saur", "Sgnw", "Shaw", "Shrd","Sind", "Sinh", "Sora", "Sund", "Sylo", "Syrc", "Syre", "Syrj", "Syrn","Tagb", "Takr", "Tale", "Talu", "Taml", "Tang", "Tavt", "Telu", "Teng","Tfng", "Tglg", "Thaa", "Thai", "Tibt", "Tirh", "Ugar", "Vaii", "Visp","Wara", "Wole", "Xpeo", "Xsux", "Yiii", "Zmth", "Zsym", "Zyyy" ],"description": "An ISO 15924 script code. The default, or global, script is represented by script code \"Zyyy\"."},{"id": "GenericFamily","type": "string","enum": ["standard", "sansserif", "serif", "fixed", "cursive", "fantasy", "math"],"description": "A CSS generic font family."},{"id": "LevelOfControl","description": "One of<br><var>not_controllable</var>: cannot be controlled by any extension<br><var>controlled_by_other_extensions</var>: controlled by extensions with higher precedence<br><var>controllable_by_this_extension</var>: can be controlled by this extension<br><var>controlled_by_this_extension</var>: controlled by this extension","type": "string","enum": ["not_controllable", "controlled_by_other_extensions", "controllable_by_this_extension", "controlled_by_this_extension"]}],"functions": [{"name": "clearFont","description": "Clears the font set by this extension, if any.","parameters": [{"name": "details","type": "object","properties": {"script": {"$ref": "ScriptCode","description": "The script for which the font should be cleared. If omitted, the global script font setting is cleared.","optional": true},"genericFamily": {"$ref": "GenericFamily","description": "The generic font family for which the font should be cleared."}}}],"returns_async": {"name": "callback","optional": true,"parameters": []}},{"name": "getFont","description": "Gets the font for a given script and generic font family.","parameters": [{"name": "details","type": "object","properties": {"script": {"$ref": "ScriptCode","description": "The script for which the font should be retrieved. If omitted, the font setting for the global script (script code \"Zyyy\") is retrieved.","optional": true},"genericFamily": {"$ref": "GenericFamily","description": "The generic font family for which the font should be retrieved."}}}],"returns_async": {"name": "callback","optional": true,"parameters": [{"name": "details","type": "object","properties": {"fontId": {"type": "string","description": "The font ID. Rather than the literal font ID preference value, this may be the ID of the font that the system resolves the preference value to. So, <var>fontId</var> can differ from the font passed to <code>setFont</code>, if, for example, the font is not available on the system. The empty string signifies fallback to the global script font setting."},"levelOfControl": {"$ref": "LevelOfControl","description": "The level of control this extension has over the setting."}}}]}},{"name": "setFont","description": "Sets the font for a given script and generic font family.","parameters": [{"name": "details","type": "object","properties": {"script": {"$ref": "ScriptCode","description": "The script code which the font should be set. If omitted, the font setting for the global script (script code \"Zyyy\") is set.","optional": true},"genericFamily": {"$ref": "GenericFamily","description": "The generic font family for which the font should be set."},"fontId": {"type": "string","description": "The font ID. The empty string means to fallback to the global script font setting."}}}],"returns_async": {"name": "callback","optional": true,"parameters": []}},{"name": "getFontList","description": "Gets a list of fonts on the system.","parameters": [],"returns_async": {"name": "callback","parameters": [{"name": "results","type": "array","items": { "$ref": "FontName" }}]}},{"name": "clearDefaultFontSize","description": "Clears the default font size set by this extension, if any.","parameters": [{"name": "details","type": "object","optional": true,"description": "This parameter is currently unused.","properties": {}}],"returns_async": {"name": "callback","optional": true,"parameters": []}},{"name": "getDefaultFontSize","description": "Gets the default font size.","parameters": [{"name": "details","type": "object","optional": true,"description": "This parameter is currently unused.","properties": {}}],"returns_async": {"name": "callback","optional": true,"parameters": [{"name": "details","type": "object","properties": {"pixelSize": {"type": "integer","description": "The font size in pixels."},"levelOfControl": {"$ref": "LevelOfControl","description": "The level of control this extension has over the setting."}}}]}},{"name": "setDefaultFontSize","description": "Sets the default font size.","parameters": [{"name": "details","type": "object","properties": {"pixelSize": {"type": "integer","description": "The font size in pixels."}}}],"returns_async": {"name": "callback","optional": true,"parameters": []}},{"name": "clearDefaultFixedFontSize","description": "Clears the default fixed font size set by this extension, if any.","parameters": [{"name": "details","type": "object","optional": true,"description": "This parameter is currently unused.","properties": {}}],"returns_async": {"name": "callback","optional": true,"parameters": []}},{"name": "getDefaultFixedFontSize","description": "Gets the default size for fixed width fonts.","parameters": [{"name": "details","type": "object","optional": true,"description": "This parameter is currently unused.","properties": {}}],"returns_async": {"name": "callback","optional": true,"parameters": [{"name": "details","type": "object","properties": {"pixelSize": {"type": "integer","description": "The font size in pixels."},"levelOfControl": {"$ref": "LevelOfControl","description": "The level of control this extension has over the setting."}}}]}},{"name": "setDefaultFixedFontSize","description": "Sets the default size for fixed width fonts.","parameters": [{"name": "details","type": "object","properties": {"pixelSize": {"type": "integer","description": "The font size in pixels."}}}],"returns_async": {"name": "callback","optional": true,"parameters": []}},{"name": "clearMinimumFontSize","description": "Clears the minimum font size set by this extension, if any.","parameters": [{"name": "details","type": "object","optional": true,"description": "This parameter is currently unused.","properties": {}}],"returns_async": {"name": "callback","optional": true,"parameters": []}},{"name": "getMinimumFontSize","description": "Gets the minimum font size.","parameters": [{"name": "details","type": "object","optional": true,"description": "This parameter is currently unused.","properties": {}}],"returns_async": {"name": "callback","optional": true,"parameters": [{"name": "details","type": "object","properties": {"pixelSize": {"type": "integer","description": "The font size in pixels."},"levelOfControl": {"$ref": "LevelOfControl","description": "The level of control this extension has over the setting."}}}]}},{"name": "setMinimumFontSize","description": "Sets the minimum font size.","parameters": [{"name": "details","type": "object","properties": {"pixelSize": {"type": "integer","description": "The font size in pixels."}}}],"returns_async": {"name": "callback","optional": true,"parameters": []}}],"events": [{"name": "onFontChanged","description": "Fired when a font setting changes.","parameters": [{"type": "object","name": "details","properties": {"fontId": {"type": "string","description": "The font ID. See the description in <code>getFont</code>."},"script": {"$ref": "ScriptCode","description": "The script code for which the font setting has changed.","optional": true},"genericFamily": {"$ref": "GenericFamily","description": "The generic font family for which the font setting has changed."},"levelOfControl": {"$ref": "LevelOfControl","description": "The level of control this extension has over the setting."}}}]},{"name": "onDefaultFontSizeChanged","description": "Fired when the default font size setting changes.","parameters": [{"type": "object","name": "details","properties": {"pixelSize": {"type": "integer","description": "The font size in pixels."},"levelOfControl": {"$ref": "LevelOfControl","description": "The level of control this extension has over the setting."}}}]},{"name": "onDefaultFixedFontSizeChanged","description": "Fired when the default fixed font size setting changes.","parameters": [{"type": "object","name": "details","properties": {"pixelSize": {"type": "integer","description": "The font size in pixels."},"levelOfControl": {"$ref": "LevelOfControl","description": "The level of control this extension has over the setting."}}}]},{"name": "onMinimumFontSizeChanged","description": "Fired when the minimum font size setting changes.","parameters": [{"type": "object","name": "details","properties": {"pixelSize": {"type": "integer","description": "The font size in pixels."},"levelOfControl": {"$ref": "LevelOfControl","description": "The level of control this extension has over the setting."}}}]}]}
]

2、font_settings.json生成的c++文件:

out\Debug\gen\chrome\common\extensions\api\font_settings.h

out\Debug\gen\chrome\common\extensions\api\font_settings.cc

3、font_settings api接口定义文件:

chrome\browser\extensions\api\font_settings\font_settings_api.h

chrome\browser\extensions\api\font_settings\font_settings_api.cc

namespace content {
class BrowserContext;
}namespace extensions {class FontSettingsEventRouter;// The profile-keyed service that manages the font_settings extension API.
// This is not an EventRouter::Observer (and does not lazily initialize) because
// doing so caused a regression in perf tests. See crbug.com/163466.
class FontSettingsAPI : public BrowserContextKeyedAPI {public:explicit FontSettingsAPI(content::BrowserContext* context);~FontSettingsAPI() override;// BrowserContextKeyedAPI implementation.static BrowserContextKeyedAPIFactory<FontSettingsAPI>* GetFactoryInstance();private:friend class BrowserContextKeyedAPIFactory<FontSettingsAPI>;// BrowserContextKeyedAPI implementation.static const char* service_name() {return "FontSettingsAPI";}static const bool kServiceIsNULLWhileTesting = true;std::unique_ptr<FontSettingsEventRouter> font_settings_event_router_;
};// fontSettings.clearFont API function.
class FontSettingsClearFontFunction : public ExtensionFunction {public:DECLARE_EXTENSION_FUNCTION("fontSettings.clearFont", FONTSETTINGS_CLEARFONT)protected:// RefCounted types have non-public destructors, as with all extension// functions in this file.~FontSettingsClearFontFunction() override {}// ExtensionFunction:ResponseAction Run() override;
};// fontSettings.getFont API function.
class FontSettingsGetFontFunction : public ExtensionFunction {public:DECLARE_EXTENSION_FUNCTION("fontSettings.getFont", FONTSETTINGS_GETFONT)protected:~FontSettingsGetFontFunction() override {}// ExtensionFunction:ResponseAction Run() override;
};// fontSettings.setFont API function.
class FontSettingsSetFontFunction : public ExtensionFunction {public:DECLARE_EXTENSION_FUNCTION("fontSettings.setFont", FONTSETTINGS_SETFONT)protected:~FontSettingsSetFontFunction() override {}// ExtensionFunction:ResponseAction Run() override;
};// fontSettings.getFontList API function.
class FontSettingsGetFontListFunction : public ExtensionFunction {public:DECLARE_EXTENSION_FUNCTION("fontSettings.getFontList",FONTSETTINGS_GETFONTLIST)protected:~FontSettingsGetFontListFunction() override {}// ExtensionFunction:ResponseAction Run() override;private:void FontListHasLoaded(base::Value::List list);ResponseValue CopyFontsToResult(const base::Value::List& fonts);
};// Base class for extension API functions that clear a browser font pref.
class ClearFontPrefExtensionFunction : public ExtensionFunction {protected:~ClearFontPrefExtensionFunction() override {}// ExtensionFunction:ResponseAction Run() override;// Implementations should return the name of the preference to clear, like// "webkit.webprefs.default_font_size".virtual const char* GetPrefName() = 0;
};// Base class for extension API functions that get a browser font pref.
class GetFontPrefExtensionFunction : public ExtensionFunction {protected:~GetFontPrefExtensionFunction() override {}// ExtensionFunction:ResponseAction Run() override;// Implementations should return the name of the preference to get, like// "webkit.webprefs.default_font_size".virtual const char* GetPrefName() = 0;// Implementations should return the key for the value in the extension API,// like "pixelSize".virtual const char* GetKey() = 0;
};// Base class for extension API functions that set a browser font pref.
class SetFontPrefExtensionFunction : public ExtensionFunction {protected:~SetFontPrefExtensionFunction() override {}// ExtensionFunction:ResponseAction Run() override;// Implementations should return the name of the preference to set, like// "webkit.webprefs.default_font_size".virtual const char* GetPrefName() = 0;// Implementations should return the key for the value in the extension API,// like "pixelSize".virtual const char* GetKey() = 0;
};// The following are get/set/clear API functions that act on a browser font
// pref.class FontSettingsClearDefaultFontSizeFunction: public ClearFontPrefExtensionFunction {public:DECLARE_EXTENSION_FUNCTION("fontSettings.clearDefaultFontSize",FONTSETTINGS_CLEARDEFAULTFONTSIZE)protected:~FontSettingsClearDefaultFontSizeFunction() override {}// ClearFontPrefExtensionFunction:const char* GetPrefName() override;
};class FontSettingsGetDefaultFontSizeFunction: public GetFontPrefExtensionFunction {public:DECLARE_EXTENSION_FUNCTION("fontSettings.getDefaultFontSize",FONTSETTINGS_GETDEFAULTFONTSIZE)protected:~FontSettingsGetDefaultFontSizeFunction() override {}// GetFontPrefExtensionFunction:const char* GetPrefName() override;const char* GetKey() override;
};class FontSettingsSetDefaultFontSizeFunction: public SetFontPrefExtensionFunction {public:DECLARE_EXTENSION_FUNCTION("fontSettings.setDefaultFontSize",FONTSETTINGS_SETDEFAULTFONTSIZE)protected:~FontSettingsSetDefaultFontSizeFunction() override {}// SetFontPrefExtensionFunction:const char* GetPrefName() override;const char* GetKey() override;
};class FontSettingsClearDefaultFixedFontSizeFunction: public ClearFontPrefExtensionFunction {public:DECLARE_EXTENSION_FUNCTION("fontSettings.clearDefaultFixedFontSize",FONTSETTINGS_CLEARDEFAULTFIXEDFONTSIZE)protected:~FontSettingsClearDefaultFixedFontSizeFunction() override {}// ClearFontPrefExtensionFunction:const char* GetPrefName() override;
};class FontSettingsGetDefaultFixedFontSizeFunction: public GetFontPrefExtensionFunction {public:DECLARE_EXTENSION_FUNCTION("fontSettings.getDefaultFixedFontSize",FONTSETTINGS_GETDEFAULTFIXEDFONTSIZE)protected:~FontSettingsGetDefaultFixedFontSizeFunction() override {}// GetFontPrefExtensionFunction:const char* GetPrefName() override;const char* GetKey() override;
};class FontSettingsSetDefaultFixedFontSizeFunction: public SetFontPrefExtensionFunction {public:DECLARE_EXTENSION_FUNCTION("fontSettings.setDefaultFixedFontSize",FONTSETTINGS_SETDEFAULTFIXEDFONTSIZE)protected:~FontSettingsSetDefaultFixedFontSizeFunction() override {}// SetFontPrefExtensionFunction:const char* GetPrefName() override;const char* GetKey() override;
};class FontSettingsClearMinimumFontSizeFunction: public ClearFontPrefExtensionFunction {public:DECLARE_EXTENSION_FUNCTION("fontSettings.clearMinimumFontSize",FONTSETTINGS_CLEARMINIMUMFONTSIZE)protected:~FontSettingsClearMinimumFontSizeFunction() override {}// ClearFontPrefExtensionFunction:const char* GetPrefName() override;
};class FontSettingsGetMinimumFontSizeFunction: public GetFontPrefExtensionFunction {public:DECLARE_EXTENSION_FUNCTION("fontSettings.getMinimumFontSize",FONTSETTINGS_GETMINIMUMFONTSIZE)protected:~FontSettingsGetMinimumFontSizeFunction() override {}// GetFontPrefExtensionFunction:const char* GetPrefName() override;const char* GetKey() override;
};class FontSettingsSetMinimumFontSizeFunction: public SetFontPrefExtensionFunction {public:DECLARE_EXTENSION_FUNCTION("fontSettings.setMinimumFontSize",FONTSETTINGS_SETMINIMUMFONTSIZE)protected:~FontSettingsSetMinimumFontSizeFunction() override {}// SetFontPrefExtensionFunction:const char* GetPrefName() override;const char* GetKey() override;
};}  // namespace extensions

三、总结:

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

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

相关文章

FastAPI性能对比:同步vs异步

大家好&#xff0c;FastAPI已成为构建Python API的最流行框架之一&#xff0c;因其速度和易用性而广受欢迎。但在构建高性能应用程序时&#xff0c;使用同步&#xff08;sync&#xff09;还是异步&#xff08;async&#xff09;代码执行是很重要的问题。本文将通过现实世界的性…

wx.setNavigationBarColor动态设置导航栏颜色无效(亲测有效)

wx.setNavigationBarColor动态设置导航栏颜色无效&#xff08;亲测有效&#xff09; 问题描述问题分析问题解决注意 问题描述 wx.setNavigationBarColor({frontColor: #E6E6E6,backgroundColor: #E6E6E6 })上面的代码设置后导航栏颜色没有变化&#xff0c;查看了app.json 以及…

Blender进阶:贴图与UV

9 UV 9.1 贴图与UV UV&#xff0c;指定每个面顶点在贴图上的坐标 演示&#xff1a; 1、添加物体 2、添加贴图&#xff0c;即图片纹理节点 3、进入UV Edit工作区 4、右边&#xff0c;选择一个面 5、左边&#xff0c;选择一个面&#xff0c;移动这个面 9.2 电子表格 电子…

利用LangChain与LLM打造个性化私有文档搜索系统

我们知道LLM&#xff08;大语言模型&#xff09;的底模是基于已经过期的公开数据训练出来的&#xff0c;对于新的知识或者私有化的数据LLM一般无法作答&#xff0c;此时LLM会出现“幻觉”。针对“幻觉”问题&#xff0c;一般的解决方案是采用RAG做检索增强。 但是我们不可能把…

PostgreSQL-06-入门篇-集合运算

文章目录 1. UNION 组合多个查询的结果集简介带有 ORDER BY 子句的 UNION设置样例表PostgreSQL UNION 示例1) 简单的 PostgreSQL UNION 示例2) PostgreSQL UNION ALL 示例3) 带 ORDER BY 子句 UNION ALL 示例 2. INTERSECT 取交集简介带 ORDER BY 子句的 INTERSECT 操作Postgre…

云计算作业二Spark:问题解决备忘

安装spark 教程源地址&#xff1a;https://blog.csdn.net/weixin_52564218/article/details/141090528 镜像下载 教程给的官网下载地址很慢&#xff0c;https://archive.apache.org/dist/spark/spark-3.1.1/ 这里的镜像快很多&#xff1a; 清华软件源&#xff1a;https://mi…

(51)MATLAB迫零均衡器系统建模与性能仿真

文章目录 前言一、迫零均衡器性能仿真说明二、迫零均衡器系统建模与性能仿真代码1.仿真代码2.代码说明3.迫零均衡器zf_equalizer的MATLAB源码 三、仿真结果1.信道的冲击响应2.频率响应3.迫零均衡器的输入和输出 前言 使用MATLAB对迫零均衡器系统进行建模仿真&#xff0c;完整的…

【C#】编写计算机选课程序

文章目录 一、引言二、程序概述三、程序设计四、 界面设计五、代码实现六、为每一个选项添加事件七、事件处理八、完成展示 一、引言 在这篇文章中&#xff0c;我将介绍如何开发一个简单的计算机选课程序。这个程序将允许学生根据自己的需求选择不同等级的课程&#xff0c;并即…

【AIGC】AI工作流workflow实践:构建日报

workflow实践 引言实现步骤分析实践创建 dify workflow 应用创建工作流内部节点1、设置输入字段2、创建两个LLM节点3、设置结束节点 运行工作流 结语 引言 工作流 workflow 是现在 LLM 很重要的一个概念&#xff0c;因为对于一个模型来说&#xff0c;非常复杂的问题很难一次性…

无人机飞手考证热,装调检修技术详解

随着无人机技术的飞速发展和广泛应用&#xff0c;无人机飞手考证热正在持续升温。无人机飞手不仅需要掌握飞行技能&#xff0c;还需要具备装调检修技术&#xff0c;以确保无人机的安全、稳定和高效运行。以下是对无人机飞手考证及装调检修技术的详细解析&#xff1a; 一、无人机…

034_Structural_Transient_In_Matlab结构动力学问题求解

结构动态问题 问题描述 我们试着给前面已经做过的问题上加一点有趣的东西。 结构静力学求解 当时求解这个问题&#xff0c;在最外面的竖直切面加载了一个静态的固定的力。下面我们试试看在上方的表面增加一个脉冲压力载荷。 采用统一的有限元框架&#xff0c;定义问题&…

江协科技STM32学习- P23 DMA 直接存储器存取

&#x1f680;write in front&#x1f680; &#x1f50e;大家好&#xff0c;我是黄桃罐头&#xff0c;希望你看完之后&#xff0c;能对你有所帮助&#xff0c;不足请指正&#xff01;共同学习交流 &#x1f381;欢迎各位→点赞&#x1f44d; 收藏⭐️ 留言&#x1f4dd;​…

「Math」高等数学知识点大纲(占位待处理)

✨博客主页何曾参静谧的博客&#x1f4cc;文章专栏「C/C」C/C程序设计&#x1f4da;全部专栏「VS」Visual Studio「C/C」C/C程序设计「UG/NX」BlockUI集合「Win」Windows程序设计「DSA」数据结构与算法「UG/NX」NX二次开发「QT」QT5程序设计「File」数据文件格式「PK」Parasoli…

linux-UART

参考博客 https://blog.csdn.net/m0_38106923/article/details/126024970?sharetypeblog&shareId126024970&sharereferAPP&sharesourceweixin_40933496&sharefromlink 1.串口 UART的全称是Universal Asynchronous Receiver and Transmitter&#xff0c;即异步…

mac如何下载 测试旧版chrome兼容问题

mac安装低版本的chrome 下载地址&#xff1a; Download older versions of Google Chrome for Windows, Linux and Mac 下载需要模拟的浏览器版本 记住版本号 1、下载后安装 安装时提醒 保留两者 2、可能会提醒无法验证 3、设置允许 就可以打开 4、打开后发现还是新版本的浏…

【软服之家-注册安全分析报告-无验证方式导致安全隐患】

前言 由于网站注册入口容易被黑客攻击&#xff0c;存在如下安全问题&#xff1a; 1. 暴力破解密码&#xff0c;造成用户信息泄露 2. 短信盗刷的安全问题&#xff0c;影响业务及导致用户投诉 3. 带来经济损失&#xff0c;尤其是后付费客户&#xff0c;风险巨大&#xff0c;造…

数据治理,数据提取,大数据中心建设,大数据治理总体解决方案书(word,ppt原件)

1. 数据管理的现状 2. 数据治理的概述 1.1数据治理概念 2.2数据治理目标 3. 数据治理体系 4. 数据治理核心领域 1.1 数据模型 1.2 数据生命周期 &#xff08;1&#xff09;数据生成及传输 &#xff08;2&#xff09;数据存储 &#xff08;3&#xff09;数据处理和应用…

C++设计模式结构型模式———桥接模式

文章目录 一、引言二、桥接模式三、总结 一、引言 桥接&#xff08;Bridge&#xff09;模式也叫桥梁模式&#xff0c;简称桥模式&#xff0c;是一种结构型模式。该模式所解决的问题非常简单&#xff0c;即根据单一职责原则&#xff0c;在一个类中&#xff0c;不要做太多事&…

Rust 力扣 - 48. 旋转图像

文章目录 题目描述题解思路题解代码题目链接 题目描述 题解思路 我们可以将原矩阵进行水平翻转&#xff0c;然后在沿主对角线进行翻转&#xff0c;就能完成原矩阵沿顺时针方向旋转90o的变换 题解代码 impl Solution {pub fn rotate(matrix: &mut Vec<Vec<i32>&…

SQL 基础语法(一)

文章目录 1. SQL 分类2. 数据库操作3. 数据表操作4. 增删改操作5. 查询操作6. 用户管理7. 权限控制 1. SQL 分类 2. 数据库操作 #创建数据库 create database if not exists test;#查询所有数据库 show databases;#查询当前数据库 select database();#删除数据库 drop databas…