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

Android 关闭Activity切换过渡动画

Android 9.0以前关闭过渡动画效果只需要把开发者模式中过渡动画缩放设为0就可以。也就是把def_window_transition_scale改为0%

frameworks/base/packages/SettingsProvider/res/values/defaults.xml+    <fraction name="def_window_transition_scale">100%</fraction>
-    <fraction name="def_window_transition_scale">0%</fraction>

9.0以后按这种方式修改后屏幕会闪一下黑屏,整个窗口会抖动一下,感觉动画没有完全关闭。

跟下流程发现还是有些不一样的地方。

    void startActivityLocked(ActivityRecord r, ActivityRecord focusedTopActivity,boolean newTask, boolean keepCurTransition, ActivityOptions options) {TaskRecord rTask = r.getTask();final int taskId = rTask.taskId;// mLaunchTaskBehind tasks get placed at the back of the task stack.if (!r.mLaunchTaskBehind && (taskForIdLocked(taskId) == null || newTask)) {// Last activity in task had been removed or ActivityManagerService is reusing task.// Insert or replace.// Might not even be in.insertTaskAtTop(rTask, r);}TaskRecord task = null;if (!newTask) {// If starting in an existing task, find where that is...boolean startIt = true;for (int taskNdx = mTaskHistory.size() - 1; taskNdx >= 0; --taskNdx) {task = mTaskHistory.get(taskNdx);if (task.getTopActivity() == null) {// All activities in task are finishing.continue;}if (task == rTask) {// Here it is!  Now, if this is not yet visible to the// user, then just add it without starting; it will// get started when the user navigates back to it.if (!startIt) {if (DEBUG_ADD_REMOVE) Slog.i(TAG, "Adding activity " + r + " to task "+ task, new RuntimeException("here").fillInStackTrace());r.createWindowContainer();ActivityOptions.abort(options);return;}break;} else if (task.numFullscreen > 0) {startIt = false;}}}// Place a new activity at top of stack, so it is next to interact with the user.// If we are not placing the new activity frontmost, we do not want to deliver the// onUserLeaving callback to the actual frontmost activityfinal TaskRecord activityTask = r.getTask();if (task == activityTask && mTaskHistory.indexOf(task) != (mTaskHistory.size() - 1)) {mStackSupervisor.mUserLeaving = false;if (DEBUG_USER_LEAVING) Slog.v(TAG_USER_LEAVING,"startActivity() behind front, mUserLeaving=false");}task = activityTask;// Slot the activity into the history stack and proceedif (DEBUG_ADD_REMOVE) Slog.i(TAG, "Adding activity " + r + " to stack to task " + task,new RuntimeException("here").fillInStackTrace());// TODO: Need to investigate if it is okay for the controller to already be created by the// time we get to this point. I think it is, but need to double check.// Use test in b/34179495 to trace the call path.if (r.getWindowContainerController() == null) {r.createWindowContainer();}task.setFrontOfTask();if (!isHomeOrRecentsStack() || numActivities() > 0) {if (DEBUG_TRANSITION) Slog.v(TAG_TRANSITION,"Prepare open transition: starting " + r);//app设置FLAG_ACTIVITY_NO_ANIMATION,主动禁用过渡动画if ((r.intent.getFlags() & Intent.FLAG_ACTIVITY_NO_ANIMATION) != 0) {mWindowManager.prepareAppTransition(TRANSIT_NONE, keepCurTransition);mStackSupervisor.mNoAnimActivities.add(r);} else {int transit = TRANSIT_ACTIVITY_OPEN;if (newTask) {if (r.mLaunchTaskBehind) {transit = TRANSIT_TASK_OPEN_BEHIND;} else {// If a new task is being launched, then mark the existing top activity as// supporting picture-in-picture while pausing only if the starting activity// would not be considered an overlay on top of the current activity// (eg. not fullscreen, or the assistant)if (canEnterPipOnTaskSwitch(focusedTopActivity,null /* toFrontTask */, r, options)) {focusedTopActivity.supportsEnterPipOnTaskSwitch = true;}transit = TRANSIT_TASK_OPEN;}}//准备过渡动画mWindowManager.prepareAppTransition(transit, keepCurTransition);mStackSupervisor.mNoAnimActivities.remove(r);}boolean doShow = true;if (newTask) {// Even though this activity is starting fresh, we still need// to reset it to make sure we apply affinities to move any// existing activities from other tasks in to it.// If the caller has requested that the target task be// reset, then do so.if ((r.intent.getFlags() & Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED) != 0) {resetTaskIfNeededLocked(r, r);doShow = topRunningNonDelayedActivityLocked(null) == r;}} else if (options != null && options.getAnimationType()== ActivityOptions.ANIM_SCENE_TRANSITION) {doShow = false;}if (r.mLaunchTaskBehind) {// Don't do a starting window for mLaunchTaskBehind. More importantly make sure we// tell WindowManager that r is visible even though it is at the back of the stack.r.setVisibility(true);ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);} else if (SHOW_APP_STARTING_PREVIEW && doShow) {// Figure out if we are transitioning from another activity that is// "has the same starting icon" as the next one.  This allows the// window manager to keep the previous window it had previously// created, if it still had one.TaskRecord prevTask = r.getTask();ActivityRecord prev = prevTask.topRunningActivityWithStartingWindowLocked();if (prev != null) {// We don't want to reuse the previous starting preview if:// (1) The current activity is in a different task.if (prev.getTask() != prevTask) {prev = null;}// (2) The current activity is already displayed.else if (prev.nowVisible) {prev = null;}}r.showStartingWindow(prev, newTask, isTaskSwitch(r, focusedTopActivity));}} else {// If this is the first activity, don't do any fancy animations,// because there is nothing for it to animate on top of.ActivityOptions.abort(options);}}

最终通过调用next.setVisibility(true),调用到AppWindowToken中的setVisibility方法中把要切换的activity设为可见状态。

boolean setVisibility(WindowManager.LayoutParams lp,boolean visible, int transit, boolean performLayout, boolean isVoiceInteraction) {boolean delayed = false;inPendingTransaction = false;// Reset the state of mHiddenSetFromTransferredStartingWindow since visibility is actually// been set by the app now.mHiddenSetFromTransferredStartingWindow = false;// Allow for state changes and animation to be applied if:// * token is transitioning visibility state// * or the token was marked as hidden and is exiting before we had a chance to play the// transition animation// * or this is an opening app and windows are being replaced.boolean visibilityChanged = false;if (isHidden() == visible || (isHidden() && mIsExiting) || (visible && waitingForReplacement())) {final AccessibilityController accessibilityController = mService.mAccessibilityController;boolean changed = false;if (DEBUG_APP_TRANSITIONS) Slog.v(TAG_WM,"Changing app " + this + " hidden=" + isHidden() + " performLayout=" + performLayout);boolean runningAppAnimation = false;if (transit != WindowManager.TRANSIT_UNSET) {//使用动画,9.0之前该方法实现是在WindowManagerService中if (applyAnimationLocked(lp, transit, visible, isVoiceInteraction)) {delayed = runningAppAnimation = true;}final WindowState window = findMainWindow();//TODO (multidisplay): Magnification is supported only for the default display.if (window != null && accessibilityController != null&& getDisplayContent().getDisplayId() == DEFAULT_DISPLAY) {accessibilityController.onAppWindowTransitionLocked(window, transit);}changed = true;}...

看下applyAnimationLocked,有这样一段代码

boolean applyAnimationLocked(WindowManager.LayoutParams lp, int transit, boolean enter,boolean isVoiceInteraction) {//判断是否已禁用TransationAnimationif (mService.mDisableTransitionAnimation || !shouldAnimate(transit)) {if (DEBUG_APP_TRANSITIONS || DEBUG_ANIM) {Slog.v(TAG_WM, "applyAnimation: transition animation is disabled or skipped."+ " atoken=" + this);}cancelAnimation();return false;}// Only apply an animation if the display isn't frozen. If it is frozen, there is no reason...

接着看WindowManagerService

WindowManagerService(Context context, InputManagerService inputManager,boolean haveInputMethods, boolean showBootMsgs, boolean onlyCore,WindowManagerPolicy policy) {installLock(this, INDEX_WINDOW);mContext = context;mHaveInputMethods = haveInputMethods;mAllowBootMessages = showBootMsgs;mOnlyCore = onlyCore;mLimitedAlphaCompositing = context.getResources().getBoolean(com.android.internal.R.bool.config_sf_limitedAlpha);mHasPermanentDpad = context.getResources().getBoolean(com.android.internal.R.bool.config_hasPermanentDpad);mInTouchMode = context.getResources().getBoolean(com.android.internal.R.bool.config_defaultInTouchMode);mDrawLockTimeoutMillis = context.getResources().getInteger(com.android.internal.R.integer.config_drawLockTimeoutMillis);mAllowAnimationsInLowPowerMode = context.getResources().getBoolean(com.android.internal.R.bool.config_allowAnimationsInLowPowerMode);mMaxUiWidth = context.getResources().getInteger(com.android.internal.R.integer.config_maxUiWidth);//直接读取configmDisableTransitionAnimation = context.getResources().getBoolean(com.android.internal.R.bool.config_disableTransitionAnimation);mInputManager = inputManager; // Must be before createDisplayContentLocked.mDisplayManagerInternal = LocalServices.getService(DisplayManagerInternal.class);mDisplaySettings = new DisplaySettings();mDisplaySettings.readSettingsLocked();

最后尝试把config_disableTransitionAnimation改为true,验证过渡动画关闭并且没有闪屏。

相关文章:

Android 关闭Activity切换过渡动画

Android 9.0以前关闭过渡动画效果只需要把开发者模式中过渡动画缩放设为0就可以。也就是把def_window_transition_scale改为0% frameworks/base/packages/SettingsProvider/res/values/defaults.xml <fraction name"def_window_transition_scale">100%<…...

iperf3的介绍与舒勇

在 CentOS 7 中使用 iperf3 进行网络性能测试&#xff0c;分为客户端和服务器两部分。以下是使用步骤&#xff1a; 1. 安装 iperf3 首先&#xff0c;你需要在 CentOS 7 上安装 iperf3。可以通过以下命令进行安装&#xff1a; sudo yum install epel-release sudo yum install…...

Python 包管理新选择:uv

在 Python 中,uv 是由 Astral 公司开发的 Rust 高性能包管理工具,旨在替代传统 pip 并提供更快的依赖管理、Python 版本控制等功能。 https://github.com/astral-sh/uv 在 github 上已有 53k star 一、uv 的核心优势 极速性能:比 pip 快 10-100 倍。多版本 Python 管理:支…...

从需求到用例的AI路径:准确率与挑战

用工作流生成测试用例和自动化测试脚本&#xff01; 引言&#xff1a;用例的黄金起点 在软件工程中&#xff0c;“测试用例”是连接需求理解与质量保障之间的关键桥梁。一份高质量的测试用例&#xff0c;不仅是验证功能实现是否符合需求的工具&#xff0c;更是产品风险感知、用…...

JavaSE核心知识点02面向对象编程02-06(泛型)

&#x1f91f;致敬读者 &#x1f7e9;感谢阅读&#x1f7e6;笑口常开&#x1f7ea;生日快乐⬛早点睡觉 &#x1f4d8;博主相关 &#x1f7e7;博主信息&#x1f7e8;博客首页&#x1f7eb;专栏推荐&#x1f7e5;活动信息 文章目录 JavaSE核心知识点02面向对象编程02-06&#…...

xml与注解的区别

功能xml配置注解定义bean bean标签 id属性 class属性 Component Controller Service Repository ComponentScan 设置依赖注入 setter注入&#xff08;set方法&#xff09; 构造器注入&#xff08;构造方法&#xff09; Autowired Qualifier Value 配置第三方bean bean标签 静…...

进阶 DFS 学习笔记

字数&#xff1a;12017字。 文章盗的图注明了出处&#xff0c;全部出自 y 总的算法提高课。 不知道为啥这个时候才开始学这个东西&#xff0c;好像是很多同龄人都已经学完了。 进阶 DFS 具体来说好几个东西&#xff0c;所以可能内容有一些些多。 默认 DFS 和 BFS 已经掌握了…...

计算机设计大赛山东省赛区软件开发赛道线上答辩复盘

流程回顾&#xff1a; 1.抽签顺序&#xff1a; 抽签顺序并不一定代表是最终顺序&#xff0c;要注意看通知不要遗漏。 2.答辩形式&#xff1a; 线上答辩&#xff0c;加入腾讯会议&#xff0c;进会议时自己的备注是作品编号&#xff0c;等轮到自己组答辩时主持人会把人拉进来…...

第7次课 栈A

课堂学习 栈&#xff08;stack&#xff09; 是一种遵循先入后出逻辑的线性数据结构。 我们可以将栈类比为桌面上的一摞盘子&#xff0c;如果想取出底部的盘子&#xff0c;则需要先将上面的盘子依次移走。我们将盘子替换为各种类型的元素&#xff08;如整数、字符、对象等&…...

TXT编码转换工具iconv

iconv.exe是实现TXT编码转换的命令行工具&#xff0c;支持几百种编码格式的转换&#xff0c;利用它可以在自主开发程序上实现TXT文档编码的自动转换。 一、命令参数格式 Usage: iconv [-c] [-s] [-f fromcode] [-t tocode] [file ...] or: iconv -l 二、转换的示例 将UTF-8…...

基于Spring Boot + Vue的高校心理教育辅导系统

一、项目背景介绍 随着高校对学生心理健康教育的重视&#xff0c;传统的人工心理辅导与测评模式已经难以满足广大师生的个性化需求。为了提高心理服务的效率、便捷度和覆盖范围&#xff0c;本项目开发了一个高校心理教育辅导系统&#xff0c;集成心理评测、辅导预约、留言交流…...

关于甲骨文(oracle cloud)丢失MFA的解决方案

前两年&#xff0c;申请了一个招商的多币种信用卡&#xff0c;然后就从网上撸了一个oracle的免费1h1g的服务器。 用了一段时间&#xff0c;人家要启用MFA验证。 啥叫MFA验证&#xff0c;类似与短信验证吧&#xff0c;就是绑定一个手机&#xff0c;然后下载一个app&#xff0c;每…...

Linux系统管理与编程17:自动化部署ftp服务

兰生幽谷&#xff0c;不为莫服而不芳&#xff1b; 君子行义&#xff0c;不为莫知而止休。 #virtual用户管理&#xff1a;passerbyA、captain和admin三个虚拟用户 # passerbyA只能看&#xff0c;captain可看读写上传&#xff0c;但不能删除。admin全部权限 [rootshell shell]…...

C++STL——stack,queue

stack与queue 前言容器适配器deque 前言 本篇主要讲解stack与queue的底层&#xff0c;但并不会进行实现&#xff0c;stack的接口 queue的接口 &#xff0c;关于stack与queue的接口在这里不做讲解&#xff0c;因为通过前面的对STL的学习&#xff0c;这些接口都是大同小异的。 …...

HC-SR04超声波测距传感器

1.基本信息 供电电压5v,测量范围2cm~400cm,测量精度正负3mm&#xff0c;超声波频率40khz 2.连接引脚&#xff1a; 3.工作原理 TRIG引脚发送至少10us的高电平信号&#xff0c;ECHO引脚负责接受信号&#xff1b; 接受方式&#xff1a;计算测量高电平持续的时间&#xff0c;从一…...

内存安全暗战:从 CVE-2025-21298 看 C 语言防御体系的范式革命

引言 2025 年 3 月&#xff0c;美国 CERT 发布的《年度漏洞报告》揭示了触目惊心的数据&#xff1a;C/C 相关漏洞占全年高危漏洞的 68%&#xff0c;其中内存安全问题贡献了 92% 的远程代码执行风险。当 CVE-2025-21298 漏洞在某工业控制软件中被利用&#xff0c;导致欧洲某核电…...

Linux笔记---System V共享内存

1. System V共享内存简介 System V共享内存是一种在Linux系统中用于进程间通信的机制。顾名思义&#xff0c;就是申请一段可供多个进程共享的内存&#xff0c;以用于进程间通信&#xff0c;相对于管道机制要更加直接。 1.1 原理 System V共享内存通过创建和使用一个特定的IP…...

MySQL 1366 - Incorrect string value:错误

MySQL 1366 - Incorrect string value:错误 错误如何发生发生原因&#xff1a; 解决方法第一种尝试第二种尝试 错误 如何发生 在给MySQL添加数据的时候发生了下面的错误 insert into sys_dept values(100, 0, 0, 若依科技, 0, 若依, 15888888888, ryqq.com, 0,…...

慈缘基金会“蝴蝶飞”助西藏女孩白玛卓嘎“折翼重生”

历经六个月、178天的艰难治疗&#xff0c;来自西藏拉萨的15岁女孩白玛卓嘎&#xff0c;终于在4月底挺直脊梁&#xff0c;带着自信的笑容踏上了回家的路。这场跨越雪域高原与首都北京的“生命蜕变之旅”&#xff0c;不仅改写了这位藏族少女的人生轨迹&#xff0c;更见证了公益力…...

【生存技能】ubuntu 24.04 如何pip install

目录 原因解决方案说明 在接手一个新项目需要安装python库时弹出了以下提示: 原因 这个报错是因为在ubuntu中尝试直接使用 pip 安装 Python 包到系统环境中&#xff0c;ubuntu 系统 出于稳定性考虑禁止了这种操作 这里的kali是因为这台机器的用户起名叫kali,我也不知道为什么…...

TDengine 在智能制造中的核心价值

简介 智能制造与数据库技术的深度融合&#xff0c;已成为现代工业技术进步的一个重要里程碑。随着信息技术的飞速发展&#xff0c;智能制造已经成为推动工业转型升级的关键动力。在这一进程中&#xff0c;数据库技术扮演着不可或缺的角色&#xff0c;它不仅承载着海量的生产数…...

代码随想录第41天:图论2(岛屿系列)

一、岛屿数量&#xff08;Kamacoder 99&#xff09; 深度优先搜索&#xff1a; # 定义四个方向&#xff1a;右、下、左、上&#xff0c;用于 DFS 中四向遍历 direction [[0, 1], [1, 0], [0, -1], [-1, 0]]def dfs(grid, visited, x, y):"""对一块陆地进行深度…...

C语言复习--柔性数组

柔性数组是C99中提出的一个概念.结构体中的最后⼀个元素允许是未知大小的数组&#xff0c;这就叫做柔性数组成员。 格式大概如下 struct S { int a; char b; int arr[];//柔性数组 }; 也可以写成 struct S { int a; char b; int arr[0];//柔性数组 }; …...

《Python星球日记》 第55天:迁移学习与预训练模型

名人说&#xff1a;路漫漫其修远兮&#xff0c;吾将上下而求索。—— 屈原《离骚》 创作者&#xff1a;Code_流苏(CSDN)&#xff08;一个喜欢古诗词和编程的Coder&#x1f60a;&#xff09; 目录 一、迁移学习基础1. 什么是迁移学习&#xff1f;2. 迁移学习的优势3. 迁移学习的…...

Python项目75:PyInstaller+Tkinter+subprocess打包工具1.0(安排 !!)

这个打包工具包含以下功能&#xff1a; 1.主要功能&#xff1a;选择Python脚本文件&#xff0c;设置打包选项&#xff08;单文件打包、无控制台窗口&#xff09;&#xff0c;自定义程序图标&#xff0c;指定输出目录&#xff0c;实时显示打包日志。 2.自适应布局改进&#xff…...

互联网大厂Java面试实录:从基础到微服务的深度考察

互联网大厂Java面试实录&#xff1a;从基础到微服务的深度考察 面试场景 面试官&#xff1a;风清扬&#xff08;严肃且技术深厚&#xff09; 求职者&#xff1a;令狐冲&#xff08;技术扎实但偶尔含糊&#xff09; 第一轮&#xff1a;Java基础与框架 风清扬&#xff1a;令狐…...

学习黑客5 分钟深入浅出理解Linux进程管理

5 分钟深入浅出理解Linux进程管理 &#x1f5a5;️ 大家好&#xff01;今天我们将探索Linux系统中的进程管理——这是理解系统运行机制和进行安全分析的基础知识。在TryHackMe平台上进行网络安全学习时&#xff0c;了解进程如何工作以及如何监控和控制它们&#xff0c;对于识别…...

Kubernetes应用发布方式完整流程指南

Kubernetes&#xff08;K8s&#xff09;作为容器编排领域的核心工具&#xff0c;其应用发布流程体现了自动化、弹性和可观测性的优势。本文将通过一个Tomcat应用的示例&#xff0c;详细讲解从配置编写到高级发布的完整流程&#xff0c;帮助开发者掌握Kubernetes应用部署的核心步…...

JVM——即时编译器的中间表达形式

中间表达形式&#xff08;IR&#xff09;&#xff1a;编译器的核心抽象层 1. IR的本质与作用 在编译原理的体系中&#xff0c;中间表达形式&#xff08;Intermediate Representation, IR&#xff09;是连接编译器前端与后端的桥梁。前端负责将源代码转换为IR&#xff0c;而后…...

Js 判断浏览器cookie 是否启用

验证时 google浏览器 135.0.7049.117 不生效 cookie.html <!DOCTYPE html> <html lang"zh"> <head><meta charset"UTF-8"><title>Cookie 检测</title> </head> <body><h1>检测是否启用 Cookie<…...

数字相机的快门结构

数字相机(DC/DSLR等)的快门结构和传统相机有所不同,除了机械快门以外,还存在电子快门,实际上是二者的混合体。我写这篇文章大概介绍一下数字相机的快门结构,希望能抛砖引玉。 要讨论数字相机的快门结构,首先先要了解一下数字相机的结构分类,根据成像原理不同,数字相机大…...

LeetCode --- 448 周赛

题目列表 3536. 两个数字的最大乘积 3537. 填充特殊网格 3538. 合并得到最小旅行时间 3539. 魔法序列的数组乘积之和 一、两个数字的最大乘积 由于数据都是正数&#xff0c;所以乘积最大的两个数&#xff0c;本质就是找数组中最大的两个数即可&#xff0c;可以排序后直接找到…...

添加物体.

在cesium中我们可以添加物体进入地图.我们以广州塔为例 //生成广州塔的位置var position2 Cesium.Cartesian3.fromDegrees(113.3191,23.109,100)viewer.camera.setView({//指定相机位置destination: position2, 运行后如图 我们使用cesium官网提供的代码为广州塔在地图上标点…...

ABB电机控制和保护单元与Profibus DP主站转Modbus TCP网关快速通讯案例

ABB电机控制和保护单元与Profibus DP主站转Modbus TCP网关快速通讯案例 在现代工业自动化系统中&#xff0c;设备之间的互联互通至关重要。Profibus DP和Modbus TCP是两种常见的通信协议&#xff0c;分别应用于不同的场景。为了实现这两种协议的相互转换&#xff0c;Profibus …...

Yocto中`${S}`和`${WORKDIR}`的联系与区别

在Yocto项目中,${S}和${WORKDIR}是构建过程中两个核心路径变量,它们的关系及用途如下: 定义与层级关系${WORKDIR}(工作目录) 是Recipe所有任务执行的基础目录,路径结构为: build/tmp/work/<arch>/<recipe-name>/<version>/。 该目录包含源码解压后的所…...

CDGP历次主观题真题回忆

(一)【论述】 1如何设计企业的数据安全体系?活动+方法+DSMM 2如何管理公司混乱的数据质量?活动+遵循原则+建立质量维度+质量改进生命周期+高阶指标。...

Java学习手册:Spring Cloud 组件详解

一、服务发现组件 - Eureka 核心概念 &#xff1a;Eureka 是一个服务发现组件&#xff0c;包含 Eureka Server 和 Eureka Client 两部分。Eureka Server 作为服务注册中心&#xff0c;负责维护服务实例的注册信息&#xff1b;Eureka Client 则是集成在应用中的客户端&#xff0…...

【大模型】使用 LLaMA-Factory 进行大模型微调:从入门到精通

使用 LLaMA-Factory 进行模型微调&#xff1a;从入门到精通 一、环境搭建&#xff1a;奠定微调基础&#xff08;一&#xff09;安装依赖工具&#xff08;二&#xff09;创建 conda 环境&#xff08;三&#xff09;克隆仓库并安装依赖 二、数据准备&#xff1a;微调的基石&#…...

sensitive-word-admin v2.0.0 全新 ui 版本发布!vue+前后端分离

前言 sensitive-word-admin 最初的定位是让大家知道如何使用 sensitive-word&#xff0c;所以开始想做个简单的例子。 不过秉持着把一个工具做好的原则&#xff0c;也收到很多小伙伴的建议。 v2.0.0 在 ruoyi-vue&#xff08;也非常感谢若依作者多年来的无私奉献&#xff09…...

HTML属性

HTML&#xff08;HyperText Markup Language&#xff09;是网页开发的基石&#xff0c;而属性&#xff08;Attribute&#xff09;则是HTML元素的重要组成部分。它们为标签提供附加信息&#xff0c;控制元素的行为、样式或功能。本文将从基础到进阶&#xff0c;全面解析HTML属性…...

计算机网络 4-1 网络层(网络层的功能)

【考纲内容】 &#xff08;一&#xff09;网络层的功能 异构网络互连&#xff1b;路由与转发&#xff1b;SDN基本概念&#xff1b;拥塞控制 &#xff08;二&#xff09;路由算法 静态路由与动态路由&#xff1b;距离-向量路由算法&#xff1b;链路状态路由算法&#xff1b;层…...

《算法导论(第4版)》阅读笔记:p17-p27

《算法导论(第4版)》学习第 10 天&#xff0c;p17-p27 总结&#xff0c;总计 11 页。 一、技术总结 1. insertion sort (1)keys The numbers to be sorted are also known as the keys(要排序的数称为key)。 第 n 次看插入排序&#xff0c;这次有两个地方感触比较深&#…...

C++中线程安全的对多个锁同时加锁

C中线程安全的对多个锁同时加锁 C中线程安全的对两个锁同时加锁 C中线程安全的对两个锁同时加锁 参考文档&#xff1a;https://llfc.club/articlepage?id2UVOC0CihIdfguQFmv220vs5hAG 如果我们现在有一个需要互斥访问的变量 big_object&#xff0c;它的定义如下&#xff1a; …...

子串简写(JAVA)一维前缀和, 蓝桥杯

这个题用前缀和&#xff0c;开两个数组&#xff0c;一个存前n个字符数据的c1的数字个数&#xff0c;另一个前n个字符c2的数字个数&#xff0c;然后遍历一次加起来&#xff0c;有一个测试点没过去&#xff0c;把那个存最后数的换成long&#xff0c;应该是这题数据范围给的不对&a…...

数据库故障排查全攻略:从实战案例到体系化解决方案

一、引言&#xff1a;数据库故障为何是技术人必须攻克的 "心腹大患" 在数字化时代&#xff0c;数据库作为企业核心数据资产的载体&#xff0c;其稳定性直接决定业务连续性。据 Gartner 统计&#xff0c;企业每小时数据库 downtime 平均损失高达 56 万美元&#xff0…...

vllm笔记

目录 vllm简介vllm解决了哪些问题&#xff1f;1. **瓶颈&#xff1a;KV 缓存内存管理低效**2. **瓶颈&#xff1a;并行采样和束搜索中的内存冗余**3. **瓶颈&#xff1a;批处理请求中的内存碎片化** 快速开始安装vllm开始使用离线推理启动 vLLM 服务器 支持的模型文本语言模型生…...

“AI+城市治理”智能化解决方案

目录 一、建设背景 二、需求分析 三、系统设计 四、系统功能 五、应用场景 六、方案优势 七、客户价值 八、典型案例 一、建设背景 当前我国城市化率已突破65%,传统治理模式面临前所未有的挑战。一方面,城市规模扩大带来治理复杂度呈指数级增长,全国城市管理案件年…...

《医疗AI的透明革命:破解黑箱困境与算法偏见的治理之路》

医疗AI透明度困境 黑箱问题对医生和患者信任的影响&#xff1a;在医疗领域&#xff0c;AI模型往往表现为难以理解的“黑箱”&#xff0c;这会直接影响医生和患者对其诊断建议的信任度 。医生如果无法理解AI给出诊断的依据&#xff0c;就难以判断模型是否存在偏见或错误&#x…...

【论文阅读】Efficient and secure federated learning against backdoor attacks

Efficient and secure federated learning against backdoor attacks -- 高效且安全的可抵御后门攻击的联邦学习 论文来源问题背景TLDR系统及威胁模型实体威胁模型 方法展开服务器初始化本地更新本地压缩高斯噪声与自适应扰动聚合与解压缩总体算法 总结优点缺点 论文来源 名称…...

21、DeepSeekMath论文笔记(GRPO)

DeepSeekMath论文笔记 0、研究背景与目标1、GRPO结构GRPO结构PPO知识点**1. PPO的网络模型结构****2. GAE&#xff08;广义优势估计&#xff09;原理****1. 优势函数的定义**2.GAE&#xff08;广义优势估计&#xff09; 2、关键技术与方法3、核心实验结果4、结论与未来方向关键…...