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

IME关于输入法横屏全屏显示问题-Android14

IME关于输入法横屏全屏显示问题-Android14

  • 1、输入法全屏模式updateFullscreenMode
    • 1.1 全屏模式判断
    • 1.2 全屏模式布局设置
  • 2、应用侧关闭输入法全屏模式
    • 2.1 调用输入法的应用设置flag
    • 2.2 继承InputMethodService.java的输入法应用覆盖onEvaluateFullscreenMode方法

InputMethodManagerService启动-Android12

1、输入法全屏模式updateFullscreenMode

frameworks/base/core/java/android/inputmethodservice/InputMethodService.java

1.1 全屏模式判断

  • boolean isFullscreen = mShowInputRequested && onEvaluateFullscreenMode();: 判断是否全屏显示输入法,其中mShowInputRequested请求一般就是 true
  • onEvaluateFullscreenMode(): 默认横屏全屏模式显示,若在横屏下有EditorInfo.IME_FLAG_NO_FULLSCREEN或者EditorInfo.IME_INTERNAL_FLAG_APP_WINDOW_PORTRAIT不使用fullscreen-mode模式
/*** Override this to control when the input method should run in* fullscreen mode.  The default implementation runs in fullsceen only* when the screen is in landscape mode.  If you change what* this returns, you will need to call {@link #updateFullscreenMode()}* yourself whenever the returned value may have changed to have it* re-evaluated and applied.*/
public boolean onEvaluateFullscreenMode() {Configuration config = getResources().getConfiguration();if (config.orientation != Configuration.ORIENTATION_LANDSCAPE) {return false;}if (mInputEditorInfo != null&& ((mInputEditorInfo.imeOptions & EditorInfo.IME_FLAG_NO_FULLSCREEN) != 0// If app window has portrait orientation, regardless of what display orientation// is, IME shouldn't use fullscreen-mode.|| (mInputEditorInfo.internalImeOptions& EditorInfo.IME_INTERNAL_FLAG_APP_WINDOW_PORTRAIT) != 0)) {return false;}return true;
}

1.2 全屏模式布局设置

  • 设置mFullscreenAreaLayoutParams属性,全屏模式下lp.height = 0;lp.weight = 1;
  • 添加ExtractView,即布局frameworks/base/core/res/res/layout/input_method_extract_view.xml
/*** Re-evaluate whether the input method should be running in fullscreen* mode, and update its UI if this has changed since the last time it* was evaluated.  This will call {@link #onEvaluateFullscreenMode()} to* determine whether it should currently run in fullscreen mode.  You* can use {@link #isFullscreenMode()} to determine if the input method* is currently running in fullscreen mode.*/
public void updateFullscreenMode() {Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMS.updateFullscreenMode");boolean isFullscreen = mShowInputRequested && onEvaluateFullscreenMode();boolean changed = mLastShowInputRequested != mShowInputRequested;if (mIsFullscreen != isFullscreen || !mFullscreenApplied) {changed = true;mIsFullscreen = isFullscreen;reportFullscreenMode();mFullscreenApplied = true;initialize();LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams)mFullscreenArea.getLayoutParams();if (isFullscreen) {mFullscreenArea.setBackgroundDrawable(mThemeAttrs.getDrawable(com.android.internal.R.styleable.InputMethodService_imeFullscreenBackground));lp.height = 0;lp.weight = 1;} else {mFullscreenArea.setBackgroundDrawable(null);lp.height = LinearLayout.LayoutParams.WRAP_CONTENT;lp.weight = 0;}((ViewGroup)mFullscreenArea.getParent()).updateViewLayout(mFullscreenArea, lp);if (isFullscreen) {if (mExtractView == null) {View v = onCreateExtractTextView();if (v != null) {setExtractView(v);}}startExtractingText(false);}updateExtractFrameVisibility();}if (changed) {onConfigureWindow(mWindow.getWindow(), isFullscreen, !mShowInputRequested);mLastShowInputRequested = mShowInputRequested;}Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
}

2、应用侧关闭输入法全屏模式

2.1 调用输入法的应用设置flag

  1. 设置EditorInfo.IME_FLAG_NO_FULLSCREEN属性,而EditorInfo.IME_INTERNAL_FLAG_APP_WINDOW_PORTRAIT属性是framework内部使用。 即xml布局中 android:imeOptions="flagNoFullscreen" ,或者代码设置mEdtView.setImeOptions(EditorInfo.IME_FLAG_NO_FULLSCREEN);

  2. imeOptions 属性并不只有IME_FLAG_NO_FULLSCREEN功能:
    IME_ACTION_UNSPECIFIED actionUnspecified
    IME_ACTION_NONE actionNone
    IME_ACTION_GO actionGo
    IME_ACTION_SEARCH actionSearch
    IME_ACTION_SEND actionSend
    IME_ACTION_NEXT actionNext
    IME_ACTION_DONE actionDone
    IME_ACTION_PREVIOUS actionPrevious
    IME_FLAG_NO_PERSONALIZED_LEARNING flagNoPersonalizedLearning
    IME_FLAG_NO_FULLSCREEN flagNoFullscreen
    IME_FLAG_NAVIGATE_PREVIOUS flagNavigatePrevious
    IME_FLAG_NAVIGATE_NEXT flagNavigateNext
    IME_FLAG_NO_EXTRACT_UI flagNoExtractUi
    IME_FLAG_NO_ACCESSORY_ACTION flagNoAccessoryAction
    IME_FLAG_NO_ENTER_ACTION flagNoEnterAction
    IME_FLAG_FORCE_ASCII flagForceAscii

  3. 设置 imeOptions 属性并不一定生效,假如输入法应用覆盖了 onEvaluateFullscreenMode 方法

frameworks/base/core/java/android/view/inputmethod/EditorInfo.java

/*** Flag of {@link #imeOptions}: used to request that the IME never go* into fullscreen mode.* By default, IMEs may go into full screen mode when they think* it's appropriate, for example on small screens in landscape* orientation where displaying a software keyboard may occlude* such a large portion of the screen that the remaining part is* too small to meaningfully display the application UI.* If this flag is set, compliant IMEs will never go into full screen mode,* and always leave some space to display the application UI.* Applications need to be aware that the flag is not a guarantee, and* some IMEs may ignore it.*/
public static final int IME_FLAG_NO_FULLSCREEN = 0x2000000;/*** Masks for {@link imeOptions}** <pre>* |-------|-------|-------|-------|*                              1111 IME_MASK_ACTION* |-------|-------|-------|-------|*                                   IME_ACTION_UNSPECIFIED*                                 1 IME_ACTION_NONE*                                1  IME_ACTION_GO*                                11 IME_ACTION_SEARCH*                               1   IME_ACTION_SEND*                               1 1 IME_ACTION_NEXT*                               11  IME_ACTION_DONE*                               111 IME_ACTION_PREVIOUS*         1                         IME_FLAG_NO_PERSONALIZED_LEARNING*        1                          IME_FLAG_NO_FULLSCREEN*       1                           IME_FLAG_NAVIGATE_PREVIOUS*      1                            IME_FLAG_NAVIGATE_NEXT*     1                             IME_FLAG_NO_EXTRACT_UI*    1                              IME_FLAG_NO_ACCESSORY_ACTION*   1                               IME_FLAG_NO_ENTER_ACTION*  1                                IME_FLAG_FORCE_ASCII* |-------|-------|-------|-------|</pre>*//*** Extended type information for the editor, to help the IME better* integrate with it.*/
public int imeOptions = IME_NULL;/*** A string supplying additional information options that are* private to a particular IME implementation.  The string must be* scoped to a package owned by the implementation, to ensure there are* no conflicts between implementations, but other than that you can put* whatever you want in it to communicate with the IME.  For example,* you could have a string that supplies an argument like* <code>"com.example.myapp.SpecialMode=3"</code>.  This field is can be* filled in from the {@link android.R.attr#privateImeOptions}* attribute of a TextView.*/
public String privateImeOptions = null;/*** Masks for {@link internalImeOptions}** <pre>*                                 1 IME_INTERNAL_FLAG_APP_WINDOW_PORTRAIT* |-------|-------|-------|-------|</pre>*//*** Same as {@link android.R.attr#imeOptions} but for framework's internal-use only.* @hide*/
public int internalImeOptions = IME_NULL;

frameworks/base/core/java/android/widget/TextView.java

case com.android.internal.R.styleable.TextView_imeOptions:createEditorIfNeeded();mEditor.createInputContentTypeIfNeeded();mEditor.mInputContentType.imeOptions = a.getInt(attr,mEditor.mInputContentType.imeOptions);break;/*** Change the editor type integer associated with the text view, which* is reported to an Input Method Editor (IME) with {@link EditorInfo#imeOptions}* when it has focus.* @see #getImeOptions* @see android.view.inputmethod.EditorInfo* @attr ref android.R.styleable#TextView_imeOptions*/
public void setImeOptions(int imeOptions) {createEditorIfNeeded();mEditor.createInputContentTypeIfNeeded();mEditor.mInputContentType.imeOptions = imeOptions;
}

frameworks/base/core/res/res/values/attrs.xml

<!-- Additional features you can enable in an IME associated with an editorto improve the integration with your application.  The constantshere correspond to those defined by{@link android.view.inputmethod.EditorInfo#imeOptions}. --><attr name="imeOptions"><!-- There are no special semantics associated with this editor. --><flag name="normal" value="0x00000000" /><!-- There is no specific action associated with this editor, let theeditor come up with its own if it can.Corresponds to{@link android.view.inputmethod.EditorInfo#IME_NULL}. --><flag name="actionUnspecified" value="0x00000000" /><!-- This editor has no action associated with it.Corresponds to{@link android.view.inputmethod.EditorInfo#IME_ACTION_NONE}. --><flag name="actionNone" value="0x00000001" /><!-- The action key performs a "go"operation to take the user to the target of the text they typed.Typically used, for example, when entering a URL.Corresponds to{@link android.view.inputmethod.EditorInfo#IME_ACTION_GO}. --><flag name="actionGo" value="0x00000002" /><!-- The action key performs a "search"operation, taking the user to the results of searching for the textthe have typed (in whatever context is appropriate).Corresponds to{@link android.view.inputmethod.EditorInfo#IME_ACTION_SEARCH}. --><flag name="actionSearch" value="0x00000003" /><!-- The action key performs a "send"operation, delivering the text to its target.  This is typically usedwhen composing a message.Corresponds to{@link android.view.inputmethod.EditorInfo#IME_ACTION_SEND}. --><flag name="actionSend" value="0x00000004" /><!-- The action key performs a "next"operation, taking the user to the next field that will accept text.Corresponds to{@link android.view.inputmethod.EditorInfo#IME_ACTION_NEXT}. --><flag name="actionNext" value="0x00000005" /><!-- The action key performs a "done"operation, closing the soft input method.Corresponds to{@link android.view.inputmethod.EditorInfo#IME_ACTION_DONE}. --><flag name="actionDone" value="0x00000006" /><!-- The action key performs a "previous"operation, taking the user to the previous field that will accept text.Corresponds to{@link android.view.inputmethod.EditorInfo#IME_ACTION_PREVIOUS}. --><flag name="actionPrevious" value="0x00000007" /><!-- Used to request that the IME should not update any personalized data such as typinghistory and personalized language model based on what the user typed on this textediting object. Typical use cases are:<ul><li>When the application is in a special mode, where user's activities are expectedto be not recorded in the application's history. Some web browsers and chatapplications may have this kind of modes.</li><li>When storing typing history does not make much sense.  Specifying this flag intyping games may help to avoid typing history from being filled up with words thatthe user is less likely to type in their daily life.  Another example is that whenthe application already knows that the expected input is not a valid word (e.g. apromotion code that is not a valid word in any natural language).</li></ul><p>Applications need to be aware that the flag is not a guarantee, and some IMEs maynot respect it.</p> --><flag name="flagNoPersonalizedLearning" value="0x1000000" /><!-- Used to request that the IME never gointo fullscreen mode.  Applications need to be aware that the flag is nota guarantee, and not all IMEs will respect it.<p>Corresponds to{@link android.view.inputmethod.EditorInfo#IME_FLAG_NO_FULLSCREEN}. --><flag name="flagNoFullscreen" value="0x2000000" /><!-- Like flagNavigateNext, butspecifies there is something interesting that a backward navigationcan focus on.  If the user selects the IME's facility to backwardnavigate, this will show up in the application as an actionPreviousat {@link android.view.inputmethod.InputConnection#performEditorAction(int)InputConnection.performEditorAction(int)}.<p>Corresponds to{@link android.view.inputmethod.EditorInfo#IME_FLAG_NAVIGATE_PREVIOUS}. --><flag name="flagNavigatePrevious" value="0x4000000" /><!-- Used to specify that there is somethinginteresting that a forward navigation can focus on. This is like usingactionNext, except allows the IME to be multiline (withan enter key) as well as provide forward navigation.  Note that someIMEs may not be able to do this, especially when running on a smallscreen where there is little space.  In that case it does not need topresent a UI for this option.  Like actionNext, if theuser selects the IME's facility to forward navigate, this will show upin the application at{@link android.view.inputmethod.InputConnection#performEditorAction(int)InputConnection.performEditorAction(int)}.<p>Corresponds to{@link android.view.inputmethod.EditorInfo#IME_FLAG_NAVIGATE_NEXT}. --><flag name="flagNavigateNext" value="0x8000000" /><!-- Used to specify that the IME does not needto show its extracted text UI.  For input methods that may be fullscreen,often when in landscape mode, this allows them to be smaller and let partof the application be shown behind.  Though there will likely be limitedaccess to the application available from the user, it can make theexperience of a (mostly) fullscreen IME less jarring.  Note that whenthis flag is specified the IME may <em>not</em> be set up to be ableto display text, so it should only be used in situations where this isnot needed.<p>Corresponds to{@link android.view.inputmethod.EditorInfo#IME_FLAG_NO_EXTRACT_UI}. --><flag name="flagNoExtractUi" value="0x10000000" /><!-- Used in conjunction with a custom action, this indicates that theaction should not be available as an accessory button when theinput method is full-screen.Note that by setting this flag, there can be cases where the actionis simply never available to the user.  Setting this generally meansthat you think showing text being edited is more important than theaction you have supplied.<p>Corresponds to{@link android.view.inputmethod.EditorInfo#IME_FLAG_NO_ACCESSORY_ACTION}. --><flag name="flagNoAccessoryAction" value="0x20000000" /><!-- Used in conjunction with a custom action,this indicates that the action should not be available in-line asa replacement for the "enter" key.  Typically this isbecause the action has such a significant impact or is not recoverableenough that accidentally hitting it should be avoided, such as sendinga message.    Note that {@link android.widget.TextView} willautomatically set this flag for you on multi-line text views.<p>Corresponds to{@link android.view.inputmethod.EditorInfo#IME_FLAG_NO_ENTER_ACTION}. --><flag name="flagNoEnterAction" value="0x40000000" /><!-- Used to request that the IME should be capable of inputting ASCIIcharacters.  The intention of this flag is to ensure that the usercan type Roman alphabet characters in a {@link android.widget.TextView}used for, typically, account ID or password input.  It is expected that IMEsnormally are able to input ASCII even without being told so (such IMEsalready respect this flag in a sense), but there could be some cases theyaren't when, for instance, only non-ASCII input languages like Arabic,Greek, Hebrew, Russian are enabled in the IME.  Applications need to beaware that the flag is not a guarantee, and not all IMEs will respect it.However, it is strongly recommended for IME authors to respect this flagespecially when their IME could end up with a state that has only non-ASCIIinput languages enabled.<p>Corresponds to{@link android.view.inputmethod.EditorInfo#IME_FLAG_FORCE_ASCII}. --><flag name="flagForceAscii" value="0x80000000" /></attr>

2.2 继承InputMethodService.java的输入法应用覆盖onEvaluateFullscreenMode方法

覆盖onEvaluateFullscreenMode方法,返false就可以了。如Android14上google输入法LatinImeGoogle.apk

frameworks/base/core/java/android/inputmethodservice/InputMethodService.java

/*** Override this to control when the input method should run in* fullscreen mode.  The default implementation runs in fullsceen only* when the screen is in landscape mode.  If you change what* this returns, you will need to call {@link #updateFullscreenMode()}* yourself whenever the returned value may have changed to have it* re-evaluated and applied.*/
public boolean onEvaluateFullscreenMode() {Configuration config = getResources().getConfiguration();if (config.orientation != Configuration.ORIENTATION_LANDSCAPE) {return false;}if (mInputEditorInfo != null&& ((mInputEditorInfo.imeOptions & EditorInfo.IME_FLAG_NO_FULLSCREEN) != 0// If app window has portrait orientation, regardless of what display orientation// is, IME shouldn't use fullscreen-mode.|| (mInputEditorInfo.internalImeOptions& EditorInfo.IME_INTERNAL_FLAG_APP_WINDOW_PORTRAIT) != 0)) {return false;}return true;
}

相关文章:

IME关于输入法横屏全屏显示问题-Android14

IME关于输入法横屏全屏显示问题-Android14 1、输入法全屏模式updateFullscreenMode1.1 全屏模式判断1.2 全屏模式布局设置 2、应用侧关闭输入法全屏模式2.1 调用输入法的应用设置flag2.2 继承InputMethodService.java的输入法应用覆盖onEvaluateFullscreenMode方法 InputMethod…...

网络工程师 (11)软件生命周期与开发模型

一、软件生命周期 前言 软件生命周期&#xff0c;也称为软件开发周期或软件开发生命周期&#xff0c;是指从软件项目的启动到软件不再被使用为止的整个期间。这个过程可以细分为多个阶段&#xff0c;每个阶段都有其特定的目标、任务和产出物。 1. 问题定义与需求分析 问题定义…...

【人工智能】基于Python的机器翻译系统,从RNN到Transformer的演进与实现

《Python OpenCV从菜鸟到高手》带你进入图像处理与计算机视觉的大门! 解锁Python编程的无限可能:《奇妙的Python》带你漫游代码世界 机器翻译(Machine Translation, MT)作为自然语言处理领域的重要应用之一,近年来受到了广泛的关注。在本篇文章中,我们将详细探讨如何使…...

网络工程师 (12)软件开发与测试

一、软件设计 &#xff08;一&#xff09;定义与目的 软件设计是从软件需求出发&#xff0c;设计软件的整体结构、功能模块、实现算法及编写代码的过程&#xff0c;旨在确定系统如何完成预定任务。其目标是确保目标系统能够抽象、普遍地完成预定任务&#xff0c;并为后续的软件…...

3.Spring-事务

一、隔离级别&#xff1a; 脏读&#xff1a; 一个事务访问到另外一个事务未提交的数据。 不可重复读&#xff1a; 事务内多次查询相同条件返回的结果不同。 幻读&#xff1a; 一个事务在前后两次查询同一个范围的时候&#xff0c;后一次查询看到了前一次查询没有看到的行。 二…...

Python字典详解:从入门到实践

Python字典详解&#xff1a;从入门到实践 字典&#xff08;Dictionary&#xff09;是Python中最重要且最常用的数据结构之一。本文将深入讲解字典的特性、操作方法和实际应用案例。 1. 字典简介 字典是可变的、无序的键值对集合&#xff0c;使用{}创建。每个元素由key: valu…...

91,【7】 攻防世界 web fileclude

进入靶场 <?php // 包含 flag.php 文件 include("flag.php");// 以高亮语法显示当前文件&#xff08;即包含这段代码的 PHP 文件&#xff09;的内容 // 方便查看当前代码结构和逻辑&#xff0c;常用于调试或给解题者提示代码信息 highlight_file(__FILE__);// 检…...

41【文件名的编码规则】

我们在学习的过程中&#xff0c;写出数据或读取数据时需要考虑编码类型 火山采用&#xff1a;UTF-16 易语言采用&#xff1a;GBK php采用&#xff1a;UTF-8 那么我们写出的文件名应该是何种编码的&#xff1f;比如火山程序向本地写出一个“测试.txt”&#xff0c;理论上这个“测…...

蓝桥杯备赛经验帖

蓝桥杯备赛经验帖 作者&#xff1a;blue 时间&#xff1a;2025.2.1 文章目录 蓝桥杯备赛经验帖1.为什么有这篇文章2.赛制3.比赛流程4.如何准备5.其他建议6.一些感悟 1.为什么有这篇文章 ​ 笔者近期发现&#xff0c;观看我写的两道第十五届蓝桥杯题解的人数逐渐增多&#xf…...

一文大白话讲清楚webpack基本使用——17——Tree Shaking

文章目录 一文大白话讲清楚webpack基本使用——17——Tree Shaking1. 建议按文章顺序从头看&#xff0c;一看到底&#xff0c;豁然开朗2. 啥叫Tree Shaking3. 什么是死代码&#xff0c;怎么来的3. Tree Shaking的流程3.1 标记3.2 利用Terser摇起来 4. 具体使用方式4.1 适用前提…...

【C++ 区间位运算】3209. 子数组按位与值为 K 的数目|2050

本文涉及知识点 位运算、状态压缩、枚举子集汇总 LeetCode3209. 子数组按位与值为 K 的数目 给你一个整数数组 nums 和一个整数 k &#xff0c;请你返回 nums 中有多少个子数组 满足&#xff1a;子数组中所有元素按位 AND 的结果为 k 。 示例 1&#xff1a; 输入&#xff1a…...

8 比例缩放(scale.rs)

scale.rs代码是几何变换库euclid中典型的数据结构和方法的例子&#xff0c;用于处理二维和三维空间中的缩放变换。 一、scale.rs文件源码 //! A type-checked scaling factor between units.use crate::num::One;use crate::approxord::{max, min}; use crate::{Box2D, Box3D…...

二分 机器人的跳跃问题

二段性:找到一个值&#xff0c;大于此值的时候都成立&#xff0c;小于的时候都不成立 更新的方式只有两种&#xff0c;左边的mid更新不需要1&#xff1b;右边的mid更新需要1 //对能量进行二分&#xff0c;确定能量的范围 //特判防止溢出int #include<bits/stdc.h> using…...

Hive:复杂数据类型之Map函数

Map函数 是Hive里面的一种复杂数据类型, 用于存储键值对集合。Map中的键和值可以是基础类型或复合类型&#xff0c;这使得Map在处理需要关联存储信息的数据时非常有用。 定义map时,需声明2个属性: key 和 value , map中是 key value 组成一个元素 key-value, key必须为原始类…...

R 字符串:深入理解与高效应用

R 字符串:深入理解与高效应用 引言 在R语言中,字符串是数据处理和编程中不可或缺的一部分。无论是数据清洗、数据转换还是数据分析,字符串的处理都是基础技能。本文将深入探讨R语言中的字符串概念,包括其基本操作、常见函数以及高效应用方法。 字符串基本概念 字符串定…...

设计模式Python版 桥接模式

文章目录 前言一、桥接模式二、桥接模式示例三、桥接模式与适配器模式的联用 前言 GOF设计模式分三大类&#xff1a; 创建型模式&#xff1a;关注对象的创建过程&#xff0c;包括单例模式、简单工厂模式、工厂方法模式、抽象工厂模式、原型模式和建造者模式。结构型模式&…...

记5(一元逻辑回归+线性分类器+多元逻辑回归

目录 1、一元逻辑回归2、线性可分&线性不可分3、Iris数据集实现多元逻辑回归4、绘制分类图5、鸢尾花分类图6、多分类问题&#xff1a;&#xff08;softmax回归&#xff09;6.1、编码&#xff1a;自然顺序码、独热编码、独冷编码6.2、二/多分类问题&#xff1a;6.3、softmax…...

【Python】第七弹---Python基础进阶:深入字典操作与文件处理技巧

✨个人主页&#xff1a; 熬夜学编程的小林 &#x1f497;系列专栏&#xff1a; 【C语言详解】 【数据结构详解】【C详解】【Linux系统编程】【MySQL】【Python】 目录 1、字典 1.1、字典是什么 1.2、创建字典 1.3、查找 key 1.4、新增/修改元素 1.5、删除元素 1.6、遍历…...

Nginx 运维开发高频面试题详解

一、基础核心问题 原文链接&#xff1a;https://blog.csdn.net/weixin_51146329/article/details/142963853 1、什么是Nginx&#xff1f; Nginx 是一个高性能的 HTTP 和反向代理服务器&#xff0c;它以轻量级和高并发处理能力而闻名。Nginx 的反向代理功能允许它作为前端服务…...

下载OpenJDK

由于Oracle需要付费&#xff0c;并且之前我在寻找openJDK的时候&#xff0c;我不知道网址&#xff0c;并且也不知道在这个openjdk这个网址里点击哪个模块进行下载。最近我在看虚拟机相关的书籍的时候&#xff0c;找到了相关的网址。 注意&#xff1a;下面的下载都是基于可以科…...

Web3.js详解

Web1&Web2&Web3 以下是Web1、Web2和Web3的详细介绍&#xff0c;以及一个对比表格&#xff1a; Web1 定义&#xff1a;Web1指的是有着固定内容的非许可的开源网络。特点&#xff1a;在Web1时代&#xff0c;网站内容主要由网站管理员或创建者提供&#xff0c;用户只能…...

学习串行通信

本文来源&#xff1a; [8-1] 串口通信_哔哩哔哩_bilibili 智谱清言 ------------ 串口&#xff08;Serial Port&#xff09;&#xff1a; 串口是一种应用非常广泛的通讯接口&#xff0c;串口成本低&#xff0c;容易使用&#xff0c;通信线路简单&#xff0c;可实现两个设…...

【leetcode强化练习·二叉树】同时运用两种思维解题

本文参考labuladong算法笔记[【强化练习】同时运用两种思维解题 | labuladong 的算法笔记] 有的题目可以同时用「遍历」和「分解问题」两种思路来解&#xff0c;你可以利用这些题目训练自己的思维。 559. N 叉树的最大深度 | 力扣 | LeetCode | 给定一个 N 叉树&#xff0c;…...

Rank-analysis-1.2——一款基于LCU API的排位分析工具,大四学生独立开发

LOL Rank Record Analysis&#xff1a;一款基于LCU API的排位分析工具&#xff0c;大四学生独立开发&#xff01; 大家好&#xff01;我是河南科技学院的大四学生&#xff0c;今天给大家分享一个我自己开发的软件——LOL Rank Record Analysis。这是一个基于 Riot 提供的 LCU …...

什么是门控循环单元?

一、概念 门控循环单元&#xff08;Gated Recurrent Unit&#xff0c;GRU&#xff09;是一种改进的循环神经网络&#xff08;RNN&#xff09;&#xff0c;由Cho等人在2014年提出。GRU是LSTM的简化版本&#xff0c;通过减少门的数量和简化结构&#xff0c;保留了LSTM的长时间依赖…...

Google Chrome-便携增强版[解压即用]

Google Chrome-便携增强版 链接&#xff1a;https://pan.xunlei.com/s/VOI0OyrhUx3biEbFgJyLl-Z8A1?pwdf5qa# a 特点描述 √ 无升级、便携式、绿色免安装&#xff0c;即可以覆盖更新又能解压使用&#xff01; √ 此增强版&#xff0c;支持右键解压使用 √ 加入Chrome增强…...

智慧园区综合管理系统如何实现多个维度的高效管理与安全风险控制

内容概要 在当前快速发展的城市环境中&#xff0c;智慧园区综合管理系统正在成为各类园区管理的重要工具&#xff0c;无论是工业园、产业园、物流园&#xff0c;还是写字楼与公寓&#xff0c;都在积极寻求如何提升管理效率和保障安全。通过快鲸智慧园区管理系统&#xff0c;用…...

【PyTorch】7.自动微分模块:开启神经网络 “进化之门” 的魔法钥匙

目录 1. 梯度基本计算 2. 控制梯度计算 3. 梯度计算注意 4. 小节 个人主页&#xff1a;Icomi 专栏地址&#xff1a;PyTorch入门 在深度学习蓬勃发展的当下&#xff0c;PyTorch 是不可或缺的工具。它作为强大的深度学习框架&#xff0c;为构建和训练神经网络提供了高效且灵活…...

从0开始使用面对对象C语言搭建一个基于OLED的图形显示框架(协议层封装)

目录 协议层设计&#xff0c;以IIC为例子 关于软硬件IIC 设计的一些原则 完成协议层的抽象 刨析我们的原理 如何完成我们的抽象 插入几个C语言小技巧 完成软件IIC通信 开始我们的IIC通信 结束我们的IIC通信 发送一个字节 &#xff08;重要&#xff09;完成命令传递和…...

Mac M1 源码安装FFmpeg,开启enable-gpl 和 lib x264

1、第一步&#xff1a;下载并安装minicoda curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.shsh Miniconda3-latest-MacOSX-arm64.sh2、第二步&#xff1a;安装必要的依赖 conda install -c conda-forge gcc make nasm yasm3、第三步&#xff…...