ue5 motion matching
ue5.5 gameanimationsample
先看动画蓝图 核心两个node
第一个是根据数据选择当前的pose
第二个是缓存一段历史记录,为第一个node选择的时候提供数据。
在animinstance的update方法中 每帧都更新这个函数,每帧更新trajectory的数据
看看第一个node的执行顺序
void FAnimNode_MotionMatching::UpdateAssetPlayer(const FAnimationUpdateContext& Context)void UPoseSearchLibrary::UpdateMotionMatchingState(const FAnimationUpdateContext& Context,const TArray<TObjectPtr<const UPoseSearchDatabase>>& Databases,float BlendTime,int32 MaxActiveBlends,const FFloatInterval& PoseJumpThresholdTime,float PoseReselectHistory,float SearchThrottleTime,const FFloatInterval& PlayRate,FMotionMatchingState& InOutMotionMatchingState,EPoseSearchInterruptMode InterruptMode,bool bShouldSearch,bool bShouldUseCachedChannelData,bool bDebugDrawQuery,bool bDebugDrawCurResult){...........//这里每帧都监听第二个节点,把history trajectory传过来const IPoseHistory* PoseHistory = nullptr;if (FPoseHistoryProvider* PoseHistoryProvider = Context.GetMessage<FPoseHistoryProvider>()){PoseHistory = &PoseHistoryProvider->GetPoseHistory();}FMemMark Mark(FMemStack::Get());const UAnimInstance* AnimInstance = Cast<const UAnimInstance>(Context.AnimInstanceProxy->GetAnimInstanceObject());check(AnimInstance);const UPoseSearchDatabase* CurrentResultDatabase = InOutMotionMatchingState.CurrentSearchResult.Database.Get();if (IsInvalidatingContinuingPose(InterruptMode, CurrentResultDatabase, Databases)){InOutMotionMatchingState.CurrentSearchResult.Reset();}FSearchContext SearchContext(0.f, &InOutMotionMatchingState.PoseIndicesHistory, InOutMotionMatchingState.CurrentSearchResult, PoseJumpThresholdTime);//addSearchContext.AddRole(DefaultRole, AnimInstance, PoseHistory);.........const FSearchResult NewSearchResult = Database->Search(SearchContext);.........
}UE::PoseSearch::FSearchResult UPoseSearchDatabase::Search(UE::PoseSearch::FSearchContext& SearchContext) const{.........Result = SearchPCAKDTree(SearchContext);.........
}UE::PoseSearch::FSearchResult UPoseSearchDatabase::SearchPCAKDTree(UE::PoseSearch::FSearchContext& SearchContext) const
{.........//channelTConstArrayView<float> QueryValues = SearchContext.GetOrBuildQuery(Schema);.........
}TConstArrayView<float> FSearchContext::GetOrBuildQuery(const UPoseSearchSchema* Schema)
{QUICK_SCOPE_CYCLE_COUNTER(STAT_PoseSearch_GetOrBuildQuery);check(Schema);if (const FCachedQuery* FoundCachedQuery = CachedQueries.FindByPredicate([Schema](const FCachedQuery& CachedQuery){return CachedQuery.GetSchema() == Schema;})){return FoundCachedQuery->GetValues();}return Schema->BuildQuery(*this);
}TConstArrayView<float> UPoseSearchSchema::BuildQuery(UE::PoseSearch::FSearchContext& SearchContext) const
{QUICK_SCOPE_CYCLE_COUNTER(STAT_PoseSearch_BuildQuery);SearchContext.AddNewFeatureVectorBuilder(this);for (const TObjectPtr<UPoseSearchFeatureChannel>& ChannelPtr : GetChannels()){ChannelPtr->BuildQuery(SearchContext);}return SearchContext.EditFeatureVector();
}void UPoseSearchFeatureChannel_GroupBase::BuildQuery(UE::PoseSearch::FSearchContext& SearchContext) const
{for (const TObjectPtr<UPoseSearchFeatureChannel>& SubChannelPtr : GetSubChannels()){if (const UPoseSearchFeatureChannel* SubChannel = SubChannelPtr.Get()){SubChannel->BuildQuery(SearchContext);}}
}//subchannel就是各种channel 的数组 比如position channel,velocity channelvoid UPoseSearchFeatureChannel_Position::BuildQuery(UE::PoseSearch::FSearchContext& SearchContext) const
{..............const FVector BonePosition = SearchContext.GetSamplePosition(SampleTimeOffset, OriginTimeOffset, SchemaBoneIdx, SchemaOriginBoneIdx, SampleRole, OriginRole, PermutationTimeType, &BonePositionWorld);...........}FVector FSearchContext::GetSamplePosition(float SampleTimeOffset, float OriginTimeOffset, int8 SchemaSampleBoneIdx, int8 SchemaOriginBoneIdx, const FRole& SampleRole, const FRole& OriginRole, EPermutationTimeType PermutationTimeType, const FVector* SampleBonePositionWorldOverride)
{float PermutationSampleTimeOffset = 0.f;float PermutationOriginTimeOffset = 0.f;UPoseSearchFeatureChannel::GetPermutationTimeOffsets(PermutationTimeType, DesiredPermutationTimeOffset, PermutationSampleTimeOffset, PermutationOriginTimeOffset);const float SampleTime = SampleTimeOffset + PermutationSampleTimeOffset;const float OriginTime = OriginTimeOffset + PermutationOriginTimeOffset;return GetSamplePositionInternal(SampleTime, OriginTime, SchemaSampleBoneIdx, SchemaOriginBoneIdx, SampleRole, OriginRole, SampleBonePositionWorldOverride);
}FVector FSearchContext::GetSamplePositionInternal(float SampleTime, float OriginTime, int8 SchemaSampleBoneIdx, int8 SchemaOriginBoneIdx, const FRole& SampleRole, const FRole& OriginRole, const FVector* SampleBonePositionWorldOverride)
{if (SampleBonePositionWorldOverride){const FTransform RootBoneTransform = GetWorldBoneTransformAtTime(OriginTime, OriginRole, RootSchemaBoneIdx);if (SchemaOriginBoneIdx == RootSchemaBoneIdx){return RootBoneTransform.InverseTransformPosition(*SampleBonePositionWorldOverride);}// @todo: validate this still works for when root bone is not Identityconst FTransform OriginBoneTransform = GetWorldBoneTransformAtTime(OriginTime, OriginRole, SchemaOriginBoneIdx);const FVector DeltaBoneTranslation = *SampleBonePositionWorldOverride - OriginBoneTransform.GetTranslation();return RootBoneTransform.InverseTransformVector(DeltaBoneTranslation);}const FTransform RootBoneTransform = GetWorldBoneTransformAtTime(OriginTime, OriginRole, RootSchemaBoneIdx);const FTransform SampleBoneTransform = GetWorldBoneTransformAtTime(SampleTime, SampleRole, SchemaSampleBoneIdx);if (SchemaOriginBoneIdx == RootSchemaBoneIdx){return RootBoneTransform.InverseTransformPosition(SampleBoneTransform.GetTranslation());}const FTransform OriginBoneTransform = GetWorldBoneTransformAtTime(OriginTime, OriginRole, SchemaOriginBoneIdx);const FVector DeltaBoneTranslation = SampleBoneTransform.GetTranslation() - OriginBoneTransform.GetTranslation();return RootBoneTransform.InverseTransformVector(DeltaBoneTranslation);
}//获得过程终于用到了const IPoseHistory* PoseHistory = GetPoseHistory(SampleRole);
FTransform FSearchContext::GetWorldBoneTransformAtTime(float SampleTime, const FRole& SampleRole, int8 SchemaBoneIdx)
{// CachedQueries.Last is the query we're building check(!CachedQueries.IsEmpty());const UPoseSearchSchema* Schema = CachedQueries.Last().GetSchema();check(Schema);TConstArrayView<FBoneReference> BoneReferences = Schema->GetBoneReferences(SampleRole);check(BoneReferences[SchemaBoneIdx].HasValidSetup());const FBoneIndexType BoneIndexType = BoneReferences[SchemaBoneIdx].BoneIndex;const uint32 SampleTimeHash = GetTypeHash(SampleTime);const uint32 SampleRoleHash = GetTypeHash(SampleRole);const uint32 SampleTimeAndRoleHash = HashCombineFast(SampleTimeHash, SampleRoleHash);const uint32 BoneIndexTypeHash = GetTypeHash(BoneIndexType);const uint32 BoneCachedTransformKey = HashCombineFast(SampleTimeAndRoleHash, BoneIndexTypeHash);if (const FTransform* CachedTransform = CachedTransforms.Find(BoneCachedTransformKey)){return *CachedTransform;}FTransform WorldBoneTransform;if (BoneIndexType == RootBoneIndexType){// we already tried querying the CachedTransforms so, let's search in TrajectoryWorldBoneTransform = GetWorldRootBoneTransformAtTime(SampleTime, SampleRole);}else // if (BoneIndexType != RootBoneIndexType){// searching for RootBoneIndexType in CachedTransformsstatic const uint32 RootBoneIndexTypeHash = GetTypeHash(RootBoneIndexType); // Note: static const, since RootBoneIndexType is a constantconst uint32 RootBoneCachedTransformKey = HashCombineFast(SampleTimeAndRoleHash, RootBoneIndexTypeHash);if (const FTransform* CachedTransform = CachedTransforms.Find(RootBoneCachedTransformKey)){WorldBoneTransform = *CachedTransform;}else{WorldBoneTransform = GetWorldRootBoneTransformAtTime(SampleTime, SampleRole);}// collecting the local bone transforms from the IPoseHistoryconst IPoseHistory* PoseHistory = GetPoseHistory(SampleRole);#if WITH_EDITORif (!PoseHistory){UE_LOG(LogPoseSearch, Error, TEXT("FSearchContext::GetWorldBoneTransformAtTime - Couldn't search for bones requested by %s, because no IPoseHistory has been found!"), *Schema->GetName());}else#endif // WITH_EDITOR{check(PoseHistory);const USkeleton* Skeleton = Schema->GetSkeleton(SampleRole);FTransform LocalBoneTransform;if (!PoseHistory->GetTransformAtTime(SampleTime, LocalBoneTransform, Skeleton, BoneIndexType, RootBoneIndexType)){if (Skeleton){if (!PoseHistory->IsEmpty()){UE_LOG(LogPoseSearch, Warning, TEXT("FSearchContext::GetWorldBoneTransformAtTime - Couldn't find BoneIndexType %d (%s) requested by %s"), BoneIndexType, *Skeleton->GetReferenceSkeleton().GetBoneName(BoneIndexType).ToString(), *Schema->GetName());}}else{UE_LOG(LogPoseSearch, Warning, TEXT("FSearchContext::GetWorldBoneTransformAtTime - Schema '%s' Skeleton is not properly set"), *Schema->GetName());}}WorldBoneTransform = LocalBoneTransform * WorldBoneTransform;}}CachedTransforms.Add(BoneCachedTransformKey) = WorldBoneTransform;return WorldBoneTransform;
}//这里就是第二个节点pose history 里面有 trajectory
bool FPoseHistory::GetTransformAtTime(float Time, FTransform& OutBoneTransform, const USkeleton* BoneIndexSkeleton, FBoneIndexType BoneIndexType, FBoneIndexType ReferenceBoneIndexType, bool bExtrapolate) const
{CheckThreadSafetyRead(ReadPoseDataThreadSafeCounter);static_assert(RootBoneIndexType == 0 && ComponentSpaceIndexType == FBoneIndexType(-1) && WorldSpaceIndexType == FBoneIndexType(-2)); // some assumptionscheck(BoneIndexType != ComponentSpaceIndexType && BoneIndexType != WorldSpaceIndexType);bool bSuccess = false;const bool bApplyComponentToWorld = ReferenceBoneIndexType == WorldSpaceIndexType;FTransform ComponentToWorld = FTransform::Identity;if (bApplyComponentToWorld){//就是这个和trajectory 联系上了ComponentToWorld = Trajectory.GetSampleAtTime(Time, bExtrapolate).GetTransform();ReferenceBoneIndexType = ComponentSpaceIndexType;}const FPoseData& ReadPoseData = GetReadPoseData();const int32 NumEntries = ReadPoseData.Entries.Num();if (NumEntries > 0){int32 NextIdx = 0;int32 PrevIdx = 0;if (NumEntries > 1){const int32 LowerBoundIdx = LowerBound(ReadPoseData.Entries.begin(), ReadPoseData.Entries.end(), Time, [](const FPoseHistoryEntry& Entry, float Value) { return Value > Entry.AccumulatedSeconds; });NextIdx = FMath::Clamp(LowerBoundIdx, 1, NumEntries - 1);PrevIdx = NextIdx - 1;}const FPoseHistoryEntry& PrevEntry = ReadPoseData.Entries[PrevIdx];const FPoseHistoryEntry& NextEntry = ReadPoseData.Entries[NextIdx];bSuccess = LerpEntries(Time, bExtrapolate, PrevEntry, NextEntry, BoneIndexSkeleton, ReadPoseData.LastUpdateSkeleton.Get(), ReadPoseData.BoneToTransformMap, BoneIndexType, ReferenceBoneIndexType, OutBoneTransform);if (bApplyComponentToWorld){OutBoneTransform *= ComponentToWorld;}}else{OutBoneTransform = ComponentToWorld;}return bSuccess;
}
关于pose history
FPoseHistory 里面有 FPoseSearchQueryTrajectory Trajectory;
就是
void FAnimNode_PoseSearchHistoryCollector::Evaluate_AnyThread(FPoseContext& Output)
{DECLARE_SCOPE_HIERARCHICAL_COUNTER_ANIMNODE(Evaluate_AnyThread);ANIM_MT_SCOPE_CYCLE_COUNTER_VERBOSE(PoseSearchHistoryCollector, !IsInGameThread());check(Output.AnimInstanceProxy);Super::Evaluate_AnyThread(Output);Source.Evaluate(Output);const bool bNeedsReset = bResetOnBecomingRelevant && UpdateCounter.HasEverBeenUpdated() && !UpdateCounter.WasSynchronizedCounter(Output.AnimInstanceProxy->GetUpdateCounter());FCSPose<FCompactPose> ComponentSpacePose;ComponentSpacePose.InitPose(Output.Pose);TArray<FBoneIndexType> RequiredBones;if (bCacheBones){RequiredBones = GetRequiredBones(Output.AnimInstanceProxy);}PoseHistory.EvaluateComponentSpace_AnyThread(Output.AnimInstanceProxy->GetDeltaSeconds(), ComponentSpacePose, bStoreScales,RootBoneRecoveryTime, RootBoneTranslationRecoveryRatio, RootBoneRotationRecoveryRatio, bNeedsReset, bCacheBones, RequiredBones, Output.Curve, MakeConstArrayView(CollectedCurves));bCacheBones = false;#if ENABLE_DRAW_DEBUG && ENABLE_ANIM_DEBUGFColor Color;
#if WITH_EDITORONLY_DATAColor = DebugColor.ToFColor(true);
#else // WITH_EDITORONLY_DATAColor = FLinearColor::Red.ToFColor(true);
#endif // WITH_EDITORONLY_DATAPoseHistory.DebugDraw(*Output.AnimInstanceProxy, Color);
#endif // ENABLE_DRAW_DEBUG && ENABLE_ANIM_DEBUG
}
FPoseHistory中Trajectory能确定控件的世界空间下的 pos和rotation
再配合CollectedBones确定的骨骼的历史记录
就能确定某个骨骼的历史 的世界坐标
来作为选择某个pose的支撑数据
在FSearchContext中
const IPoseHistory* GetPoseHistory(const FRole& Role) const { return PoseHistories[RoleToIndex[Role]]; }
资产方面 最重要的是要建立 pose search database
schema最重要的是定义channel,从不同的维度去解析查找符合预期的pose
各种channel的定义
相关文章:

ue5 motion matching
ue5.5 gameanimationsample 先看动画蓝图 核心两个node 第一个是根据数据选择当前的pose 第二个是缓存一段历史记录,为第一个node选择的时候提供数据。 在animinstance的update方法中 每帧都更新这个函数,每帧更新trajectory的数据 看看第一个node的…...

【从零开始的LeetCode-算法】383. 赎金信
给你两个字符串:ransomNote 和 magazine ,判断 ransomNote 能不能由 magazine 里面的字符构成。 如果可以,返回 true ;否则返回 false 。 magazine 中的每个字符只能在 ransomNote 中使用一次。 示例 1: 输入&#…...

记录模板学习(持续更新)
目的: 学习C模板的编写,使用模板类包装一个可调用对象 可调用对象包括:普通函数, lambda表达式, 类成员函数 可以参考到QtConcurrent::run的实现,可以看到这个函数有非常多重载,其中可以接受类…...

Android hid 数据传输(device 端 )
最近一直在处理hid 数据需求,简而言之就是两台设备直接可以通过usb 线互相传递数据。 项目架构 为什么Device 端要采用HID(人机接口设备)的方式发送和接收数据呢? 主要是速度快,举个例子,就是鼠标移动&am…...

MaxEnt模型在物种分布模拟中如何应用?R语言+MaxEnt模型融合物种分布模拟、参数优化方法、结果分析制图与论文写作
目录 第一章 以问题导入的方式,深入掌握原理基础 第二章 常用数据检索与R语言自动化下载及可视化方法 第三章 R语言数据清洗与特征变量筛选 第四章 基于ArcGIS、R数据处理与进阶 第五章 基于Maxent的物种分布建模与预测 第六章 基于R语言的模型参数优化 第七…...
第3章:文本样式 --[CSS零基础入门]
CSS(层叠样式表)允许你以多种方式定制文本的外观。以下是一些常用的文本和字体相关的CSS属性: 1.字体 字体系列 当然,下面是两个使用不同字体系列的CSS示例。每个示例都展示了如何指定一个字体系列,并提供备用字体以确保在用户的系统中找不到首选字体时仍有合适的字体可…...
mysql 架构详解
MySQL的架构可以自顶向下分为多个层次,每个层次都有其特定的功能和组件。以下是对MySQL架构的详细解析: 一、整体架构概述 MySQL的整体架构包括MySQL Connectors(连接器)、MySQL Shell、连接层、服务层、存储引擎层和文件系统层…...
无代码探索AI大模型:腾讯云函数计算的卓越实践
在数字化转型的浪潮中,人工智能(AI)技术已经成为企业提升竞争力的关键。然而,对于许多业务人员来说,技术门槛高、开发周期长等问题限制了他们快速探索和应用AI大模型的能力。同时,对于缺乏GPU资源的开发者来…...
解决Ubuntu在VMware关机时,老是一个光标在那里闪动几分钟,才能关机的问题
把强制关机的等待时间缩短即可。 编辑 /etc/systemd/system.conf 文件 sudo gedit /etc/systemd/system.conf把 #DefaultTimeoutStartSec90s修改为 #DefaultTimeoutStartSec10s改完之后重载一下: sudo systemctl daemon-reload然后关机再试一下,这样…...

word poi-tl 图表功能增强,插入图表折线图、柱状图、饼状图
目录 问题解决问题poi-tl介绍 功能实现引入依赖功能介绍 功能实例饼图模版代码效果图 雷达图(模版同饼图)代码效果图 柱状图(模版同饼图)代码效果图 附加CustomCharts 工具类CustomChartSingleSeriesRenderData 数据对象CustomCha…...
常见网络钓鱼类型
网络钓鱼是一种网络攻击,是指具有恶意动机的攻击者伪装欺骗人们并收集用户名或密码等敏感信息的一系列行为。由于网络钓鱼涉及心理操纵并依赖于人为失误(而不是硬件或软件漏洞),因此被认定为是一种社会工程攻击。 1. 普通网络钓鱼(群攻&…...

数字图像处理考研考点(持续更新)
一、数字图像基本概念 1、人眼视觉特性 (1)眼睛上有两类光感受器:锥状体和杆状体 锥状体(锥细胞):约 700 万个,对颜色高度敏感,每个锥状体都连接到神经末梢,人可以充分地分辨图像细节。锥细胞…...

Spring Cloud Alibaba:一站式微服务解决方案
Spring Cloud Alibaba介绍 在当今的软件开发领域,微服务架构因其灵活性、可扩展性和独立性等优势而备受青睐。Spring Cloud Alibaba 作为一款强大的一站式微服务解决方案,为开发者提供了丰富的工具和组件,帮助他们轻松构建和管理复杂的微服务…...
ubuntu16.04部署dify教程
文章目录 1、克隆 Dify 源代码至本地环境2、加速Dify镜像文件下载3、启动 Dify4、访问 Dify5、更新 Dify6、常见问题及解决方案(1)容器restarting(2)日志文件上限(3)重置管理员密码(4࿰…...

JavaWeb文件上传
文件上传总览 文件上传主要是指将本地文件(包括但不限于图片、视频、音频等)上传到服务器,提供其他用户浏览或下载的过程。在日常生活中,我们在很多情况下都需要使用文件上传功能,比如:发微博、发朋友圈等…...

软件工程——期末复习(3)
一、题目类(老师重点提到过的题目) 1、高可靠性是否意味着高可用性?试举例证明自己的观点? 答:高可靠性不意味着高可用性 可靠性说明系统已经准备好,马上可以使用;可用性是系统可以无故障的持续运行,是一…...
apache的BeanUtils的Converter被相互污染覆盖问题
问题描述 apache的BeanUtils工具集中用来把map对象转换为java对象的BeanUtils#populate方法会因为单例的原因其转换器Converter被相互污染覆盖问题 maven依赖 <dependency><groupId>commons-beanutils</groupId><artifactId>commons-beanutils</…...

TCP的“可靠性”(上)
目录 TCP的“可靠性”(上)确认应答(可靠性传输的基础)超时重传连接管理(三次握手,四次挥手) TCP的“可靠性”(上) 想必大家都或多或少的听说过TCP的特性:有连…...

超标量处理器设计笔记(5)虚拟存储器、地址转换、page fault
虚拟存储器 概述地址转换单级页表多级页表案例最好情况:虚拟地址是连续的最差情况:每个第二级 PT 都装有一项 增加级数 Page Fault 程序保护 概述 当程序比物理内存空间更大时,无法全部装在物理内存中,需要对程序进行切片 虚拟…...

SparkSQL 读写数据攻略:从基础到实战
目录 一、输入Source 1)代码演示最普通的文件读取方式: 2) 通过jdbc读取数据库数据 3) 读取table中的数据【hive】 二、输出Sink 实战一:保存普通格式 实战二:保存到数据库中 实战三:将结果保存在h…...
ubuntu搭建nfs服务centos挂载访问
在Ubuntu上设置NFS服务器 在Ubuntu上,你可以使用apt包管理器来安装NFS服务器。打开终端并运行: sudo apt update sudo apt install nfs-kernel-server创建共享目录 创建一个目录用于共享,例如/shared: sudo mkdir /shared sud…...

【人工智能】神经网络的优化器optimizer(二):Adagrad自适应学习率优化器
一.自适应梯度算法Adagrad概述 Adagrad(Adaptive Gradient Algorithm)是一种自适应学习率的优化算法,由Duchi等人在2011年提出。其核心思想是针对不同参数自动调整学习率,适合处理稀疏数据和不同参数梯度差异较大的场景。Adagrad通…...
基于服务器使用 apt 安装、配置 Nginx
🧾 一、查看可安装的 Nginx 版本 首先,你可以运行以下命令查看可用版本: apt-cache madison nginx-core输出示例: nginx-core | 1.18.0-6ubuntu14.6 | http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages ng…...

高频面试之3Zookeeper
高频面试之3Zookeeper 文章目录 高频面试之3Zookeeper3.1 常用命令3.2 选举机制3.3 Zookeeper符合法则中哪两个?3.4 Zookeeper脑裂3.5 Zookeeper用来干嘛了 3.1 常用命令 ls、get、create、delete、deleteall3.2 选举机制 半数机制(过半机制࿰…...

【机器视觉】单目测距——运动结构恢复
ps:图是随便找的,为了凑个封面 前言 在前面对光流法进行进一步改进,希望将2D光流推广至3D场景流时,发现2D转3D过程中存在尺度歧义问题,需要补全摄像头拍摄图像中缺失的深度信息,否则解空间不收敛…...

DIY|Mac 搭建 ESP-IDF 开发环境及编译小智 AI
前一阵子在百度 AI 开发者大会上,看到基于小智 AI DIY 玩具的演示,感觉有点意思,想着自己也来试试。 如果只是想烧录现成的固件,乐鑫官方除了提供了 Windows 版本的 Flash 下载工具 之外,还提供了基于网页版的 ESP LA…...

MySQL 8.0 OCP 英文题库解析(十三)
Oracle 为庆祝 MySQL 30 周年,截止到 2025.07.31 之前。所有人均可以免费考取原价245美元的MySQL OCP 认证。 从今天开始,将英文题库免费公布出来,并进行解析,帮助大家在一个月之内轻松通过OCP认证。 本期公布试题111~120 试题1…...

ios苹果系统,js 滑动屏幕、锚定无效
现象:window.addEventListener监听touch无效,划不动屏幕,但是代码逻辑都有执行到。 scrollIntoView也无效。 原因:这是因为 iOS 的触摸事件处理机制和 touch-action: none 的设置有关。ios有太多得交互动作,从而会影响…...

第 86 场周赛:矩阵中的幻方、钥匙和房间、将数组拆分成斐波那契序列、猜猜这个单词
Q1、[中等] 矩阵中的幻方 1、题目描述 3 x 3 的幻方是一个填充有 从 1 到 9 的不同数字的 3 x 3 矩阵,其中每行,每列以及两条对角线上的各数之和都相等。 给定一个由整数组成的row x col 的 grid,其中有多少个 3 3 的 “幻方” 子矩阵&am…...
JAVA后端开发——多租户
数据隔离是多租户系统中的核心概念,确保一个租户(在这个系统中可能是一个公司或一个独立的客户)的数据对其他租户是不可见的。在 RuoYi 框架(您当前项目所使用的基础框架)中,这通常是通过在数据表中增加一个…...