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

SAP学习笔记 - 开发24 - 前端Fiori开发 Filtering(过滤器),Sorting and Grouping(排序和分组)

上一章讲了SAP Fiori开发的表达式绑定,自定义格式化等内容。

SAP学习笔记 - 开发23 - 前端Fiori开发 Expression Binding(表达式绑定),Custom Formatters(自定义格式化)-CSDN博客

本章继续讲SAP Fiori开发的内容。

目录

1,Filtering(过滤器)

1),InvoiceList.view.xml

2),InvoiceList.controller.js

3),运行看结果

4), 深入看一下onFilterInvoices 方法

a),方法功能概述

b),代码解析

1. 方法定义

2. 初始化过滤器数组

3. 获取用户输入

4. 构建过滤条件

5. 应用过滤器到列表

c),关键点说明

d),完整流程示例

e),关联知识扩展

5),多字段过滤器

2,Sorting and Grouping(排序和分组)

2-1,Sorting(排序)

1),InvoiceList.view.xml

2),运行看效果

2-2,Grouping(分组)

1),InvoiceList.view.xml

2),运行看效果


下面是详细内容。

1,Filtering(过滤器)

1),InvoiceList.view.xml

<mvc:ViewcontrollerName="ui5.walkthrough.controller.InvoiceList"xmlns="sap.m"xmlns:core="sap.ui.core"xmlns:mvc="sap.ui.core.mvc"><Listid="invoiceList"headerText="{i18n>invoiceListTitle}"class="sapUiResponsiveMargin"width="auto"items="{invoice>/Invoices}"><headerToolbar><Toolbar><Title text="{i18n>invoiceListTitle}"/><ToolbarSpacer/><SearchField width="50%" search=".onFilterInvoices"/></Toolbar></headerToolbar><items><ObjectListItemcore:require="{Currency: 'sap/ui/model/type/Currency'}"title="{invoice>Quantity} x {invoice>ProductName}"number="{parts: ['invoice>ExtendedPrice','view>/currency'],type: 'Currency',formatOptions: {showMeasure: false}}"numberUnit="{view>/currency}"numberState="{= ${invoice>ExtendedPrice} > 50 ? 'Error' : 'Success' }"><firstStatus><ObjectStatuscore:require="{Formatter: 'ui5/walkthrough/model/formatter'}"text="{path: 'invoice>Status',formatter: 'Formatter.statusText.bind($controller)'}"icon="sap-icon://accept"/></firstStatus></ObjectListItem></items></List>
</mvc:View>

-  id="invoiceList":这行代码的意思是给 List 控件加个ID

   加ID 之后,在Controller端就可以找到它了,找到之后才能对它进行操作嘛

- <headerToolbar> 这里就是在列表顶部添加一个工具栏

- ToolbarSpacer:空白间隔(将搜索框推到右侧)

- SearchField:搜索框,width="50%":占工具栏 50% 宽度

- search=".onFilterInvoices":触发搜索时调用控制器的 onFilterInvoices 方法

 <headerToolbar>
  <Toolbar>
     <Title text="{i18n>invoiceListTitle}"/>
     <ToolbarSpacer/>
     <SearchField 
        width="50%" 
        search=".onFilterInvoices"/>
  </Toolbar>
 </headerToolbar>

2),InvoiceList.controller.js

sap.ui.define(["sap/ui/core/mvc/Controller","sap/ui/model/json/JSONModel","sap/ui/model/Filter","sap/ui/model/FilterOperator"
], (Controller, JSONModel, Filter, FilterOperator) => {"use strict";return Controller.extend("ui5.walkthrough.controller.InvoiceList", { onInit() {const oViewModel = new JSONModel({currency: "EUR"});this.getView().setModel(oViewModel, "view");},onFilterInvoices(oEvent) {// build filter arrayconst aFilter = [];const sQuery = oEvent.getParameter("query");if (sQuery) {aFilter.push(new Filter("ProductName", FilterOperator.Contains, sQuery));}// filter bindingconst oList = this.byId("invoiceList");const oBinding = oList.getBinding("items");oBinding.filter(aFilter);}});
});

这里面就是加了这个过滤方法

- onFilterInvoices(oEvent) { =》oEvent 是输入框里面的传过来的参数

- const sQuery = oEvent.getParameter("query"); =》用 query 参数名取输入框里的值

-  new Filter("ProductName", FilterOperator.Contains, sQuery) =》用ProductName字段进行过滤

- const oList = this.byId("invoiceList"); =》找到画面端的 invoiceList List列表

- const oBinding = oList.getBinding("items"); =》List列表中属性 “items" 的值

- oBinding.filter(aFilter); =》实行过滤操作

onFilterInvoices(oEvent) {
    // build filter array
    const aFilter = [];
    const sQuery = oEvent.getParameter("query");
    if (sQuery) {
        aFilter.push(new Filter("ProductName", FilterOperator.Contains, sQuery));
    }

    // filter binding
    const oList = this.byId("invoiceList");
    const oBinding = oList.getBinding("items");
    oBinding.filter(aFilter);
}

3),运行看结果

4), 深入看一下onFilterInvoices 方法

以下内容自Deepseek查询整理之后而得。

a),方法功能概述

onFilterInvoices 的作用是根据用户在搜索框输入的文本,动态过滤 List 控件中显示的数据。当用户在搜索框输入内容并触发搜索时,该方法会:

  1. 获取用户输入的搜索关键词

  2. 创建一个过滤器(Filter)

  3. 将过滤器应用到列表的数据绑定(Binding)上,实现实时过滤效果


b),代码解析

1. 方法定义

javascript

onFilterInvoices(oEvent) {
  • oEvent:搜索框触发的事件对象,包含用户输入的参数(如搜索关键词)。

2. 初始化过滤器数组

javascript

const aFilter = [];
  • 创建一个空数组 aFilter,用于存储过滤条件(支持多条件过滤)。

3. 获取用户输入

javascript

const sQuery = oEvent.getParameter("query");
  • 从事件对象中提取用户输入的搜索关键词 query(即搜索框中的文本)。

4. 构建过滤条件

javascript

if (sQuery) {aFilter.push(new Filter("ProductName", FilterOperator.Contains, sQuery));
}
  • Filter:来自 sap/ui/model/Filter,表示一个数据过滤条件。

  • FilterOperator.Contains:来自 sap/ui/model/FilterOperator,表示“包含”关系(类似 SQL 的 LIKE)。

  • 逻辑:如果用户输入了关键词(sQuery 非空),则创建一个过滤器,要求 ProductName 字段包含该关键词(不区分大小写)。

5. 应用过滤器到列表

javascript

const oList = this.byId("invoiceList");
const oBinding = oList.getBinding("items");
oBinding.filter(aFilter);
  • this.byId("invoiceList"):获取视图中 id="invoiceList"List 控件。

  • getBinding("items"):获取列表控件中 items 属性的数据绑定(绑定到 {invoice>/Invoices} 的数据集)。

  • oBinding.filter(aFilter):将过滤器数组应用到数据绑定上,触发列表的实时更新。


c),关键点说明

  1. 数据绑定与过滤机制

    • 列表的 items 属性绑定了数据模型(invoice>/Invoices),oBinding.filter() 会在原始数据基础上动态过滤,无需重新加载数据。

    • 过滤器支持多字段组合,例如可以同时过滤 ProductNameCustomerName

      javascript

      aFilter.push(new Filter({filters: [new Filter("ProductName", FilterOperator.Contains, sQuery),new Filter("ShipperName", FilterOperator.Contains, sQuery)],and: false // 表示“或”关系(任一字段匹配即可)
      }));
  2. 空查询处理

    • 当用户清空搜索框时,sQuery 为空,aFilter 数组保持为空,此时 oBinding.filter([]) 会清除所有过滤器,显示完整列表。

  3. 模型与控制器协作

    • 视图(View)中的搜索框通过 search=".onFilterInvoices" 绑定到控制器方法。

    • 控制器不直接操作数据,而是通过模型绑定的方式更新 UI,符合 MVC 模式。


d),完整流程示例

  1. 用户在搜索框输入 "Apple" 并按下搜索按钮。

  2. 触发 onFilterInvoices 方法:

    • 创建过滤器:ProductName Contains "Apple"

    • 应用过滤器到列表绑定。

  3. 列表仅显示 ProductName 包含 "Apple" 的发票条目。


e),关联知识扩展

  • FilterOperator 的其他选项

    • StartsWithEndsWithEQ(等于)、BT(介于)等。

  • 多条件过滤
    通过组合 Filterand/or 逻辑实现复杂查询。

  • 后端过滤
    如果数据量很大,可以通过 OData 服务的 $filter 参数将过滤逻辑推到后端执行。

这个方法体现了 SAP UI5 数据绑定的强大之处——通过声明式绑定和编程式过滤的结合,实现高效的前端数据交互。

5),多字段过滤器

按照上面4)里面的提示,弄一下多字段 [或/Or] 的过滤器试试看 

a),InvoiceList.controller.js

sap.ui.define(["sap/ui/core/mvc/Controller","sap/ui/model/json/JSONModel","sap/ui/model/Filter","sap/ui/model/FilterOperator"
], (Controller, JSONModel, Filter, FilterOperator) => {"use strict";return Controller.extend("ui5.walkthrough.controller.InvoiceList", { onInit() {const oViewModel = new JSONModel({currency: "EUR"});this.getView().setModel(oViewModel, "view");},onFilterInvoices(oEvent) {// build filter arrayconst aFilter = [];const sQuery = oEvent.getParameter("query");if (sQuery) {aFilter.push(new Filter({filters: [new Filter("ProductName", FilterOperator.Contains, sQuery),new Filter("ShipperName", FilterOperator.Contains, sQuery)],and: false // 表示“或”关系(任一字段匹配即可)}));}// filter bindingconst oList = this.byId("invoiceList");const oBinding = oList.getBinding("items");oBinding.filter(aFilter);}});
});

b),InoiceList.view.xml

加上 intro 属性,绑定 intro="{invoice>ShipperName}"

<mvc:ViewcontrollerName="ui5.walkthrough.controller.InvoiceList"xmlns="sap.m"xmlns:core="sap.ui.core"xmlns:mvc="sap.ui.core.mvc"><Listid="invoiceList"headerText="{i18n>invoiceListTitle}"class="sapUiResponsiveMargin"width="auto"items="{path : 'invoice>/Invoices',sorter : {path : 'ShipperName',group : true}}"><headerToolbar><Toolbar><Title text="{i18n>invoiceListTitle}"/><ToolbarSpacer/><SearchField width="50%" search=".onFilterInvoices"/></Toolbar></headerToolbar><items><ObjectListItemcore:require="{Currency: 'sap/ui/model/type/Currency'}"title="{invoice>Quantity} x {invoice>ProductName}"intro="{invoice>ShipperName}"number="{parts: ['invoice>ExtendedPrice','view>/currency'],type: 'Currency',formatOptions: {showMeasure: false}}"numberUnit="{view>/currency}"numberState="{= ${invoice>ExtendedPrice} > 50 ? 'Error' : 'Success' }"><firstStatus><ObjectStatuscore:require="{Formatter: 'ui5/walkthrough/model/formatter'}"text="{path: 'invoice>Status',formatter: 'Formatter.statusText.bind($controller)'}"icon="sap-icon://accept"/></firstStatus></ObjectListItem></items></List>
</mvc:View>

c),运行看效果

用 M 检索,3 x Canned Beans 里面虽然没有 M,但是 ShipperName里面有啊,也检出来了 

2,Sorting and Grouping(排序和分组)

SAPUI5 SDK - Demo Kit

2-1,Sorting(排序)

1),InvoiceList.view.xml

<mvc:ViewcontrollerName="ui5.walkthrough.controller.InvoiceList"xmlns="sap.m"xmlns:core="sap.ui.core"xmlns:mvc="sap.ui.core.mvc"><Listid="invoiceList"headerText="{i18n>invoiceListTitle}"class="sapUiResponsiveMargin"width="auto"items="{path : 'invoice>/Invoices',sorter : {path : 'ProductName' }}"><headerToolbar><Toolbar><Title text="{i18n>invoiceListTitle}"/><ToolbarSpacer/><SearchField width="50%" search=".onFilterInvoices"/></Toolbar></headerToolbar><items><ObjectListItemcore:require="{Currency: 'sap/ui/model/type/Currency'}"title="{invoice>Quantity} x {invoice>ProductName}"intro="{invoice>ShipperName}"number="{parts: ['invoice>ExtendedPrice','view>/currency'],type: 'Currency',formatOptions: {showMeasure: false}}"numberUnit="{view>/currency}"numberState="{= ${invoice>ExtendedPrice} > 50 ? 'Error' : 'Success' }"><firstStatus><ObjectStatuscore:require="{Formatter: 'ui5/walkthrough/model/formatter'}"text="{path: 'invoice>Status',formatter: 'Formatter.statusText.bind($controller)'}"icon="sap-icon://accept"/></firstStatus></ObjectListItem></items></List>
</mvc:View>

- 排序针对的就是 List组件的 items 属性,所以就在 items 里面加了个 sorter,然后用path指定排序

 items="{
  path : 'invoice>/Invoices',
  sorter : {
     path : 'ProductName' 
  }}"> 

2),运行看效果

现在就根据 ProductName 来进行排序了

2-2,Grouping(分组)

1),InvoiceList.view.xml

<mvc:ViewcontrollerName="ui5.walkthrough.controller.InvoiceList"xmlns="sap.m"xmlns:core="sap.ui.core"xmlns:mvc="sap.ui.core.mvc"><Listid="invoiceList"headerText="{i18n>invoiceListTitle}"class="sapUiResponsiveMargin"width="auto"items="{path : 'invoice>/Invoices',sorter : {path : 'ShipperName',group : true}}"><headerToolbar><Toolbar><Title text="{i18n>invoiceListTitle}"/><ToolbarSpacer/><SearchField width="50%" search=".onFilterInvoices"/></Toolbar></headerToolbar><items><ObjectListItemcore:require="{Currency: 'sap/ui/model/type/Currency'}"title="{invoice>Quantity} x {invoice>ProductName}"intro="{invoice>ShipperName}"number="{parts: ['invoice>ExtendedPrice','view>/currency'],type: 'Currency',formatOptions: {showMeasure: false}}"numberUnit="{view>/currency}"numberState="{= ${invoice>ExtendedPrice} > 50 ? 'Error' : 'Success' }"><firstStatus><ObjectStatuscore:require="{Formatter: 'ui5/walkthrough/model/formatter'}"text="{path: 'invoice>Status',formatter: 'Formatter.statusText.bind($controller)'}"icon="sap-icon://accept"/></firstStatus></ObjectListItem></items></List>
</mvc:View>

- 其实就是加了个 group 属性。

  但是这里需要注意的是,既然你要根据某个字段进行分组,那么你首先得根据它进行排序嘛

sorter : {
    path : 'ShipperName',
    group : true

2),运行看效果

叠加Filter 也是没有问题的

以上就是本篇的全部内容。

更多SAP顾问业务知识请点击下面目录链接或东京老树根的博客主页

https://blog.csdn.net/shi_ly/category_12216766.html

东京老树根-CSDN博客

相关文章:

SAP学习笔记 - 开发24 - 前端Fiori开发 Filtering(过滤器),Sorting and Grouping(排序和分组)

上一章讲了SAP Fiori开发的表达式绑定&#xff0c;自定义格式化等内容。 SAP学习笔记 - 开发23 - 前端Fiori开发 Expression Binding&#xff08;表达式绑定&#xff09;&#xff0c;Custom Formatters&#xff08;自定义格式化&#xff09;-CSDN博客 本章继续讲SAP Fiori开发…...

【Flask】:轻量级Python Web框架详解

什么是Flask&#xff1f; Flask是一个用Python编写的轻量级Web应用框架。它被称为"微框架"(microframework)&#xff0c;因为它核心简单但可扩展性强&#xff0c;不强制使用特定的项目结构或库。Flask由Armin Ronacher开发&#xff0c;基于Werkzeug WSGI工具包和Jin…...

自建 dnslog 回显平台:渗透测试场景下的隐蔽回显利器

&#x1f50d; 背景介绍 在渗透测试与红队评估过程中&#xff0c;DNS 外带&#xff08;DNS Exfiltration&#xff09; 是一种常见且隐蔽的通信通道。由于多数目标环境默认具备外网 DNS 解析能力&#xff0c;即便在 无回显、无文件上传权限 的条件下&#xff0c;仍可通过 DNS 请…...

Digital IC Design Flow

Flow介绍 1.设计规格 架构师根据市场需求制作算法模型(Algorithm emulation)及芯片架构(Chip architecture),确定芯片设计规格书(Chip design specification) 原型验证 原型验证(Prototype Validation)通常位于产品开发流程的前期阶段,主要是在设计和开发的初步阶…...

设备健康管理的范式革命:中讯烛龙全链路智能守护系统

当工业设备的“亚健康”状态导致隐性产能损失高达23%时&#xff0c;中讯烛龙推出 ​​“感知-诊断-决策-闭环”四位一体解决方案&#xff0c;让设备全生命周期健康管理成为企业增长的隐形引擎。 一、行业痛点&#xff1a;传统运维的三大断层 1. 健康感知盲区 某风电场因无法捕…...

循环神经网络(RNN):从理论到翻译

循环神经网络&#xff08;RNN&#xff09;是一种专为处理序列数据设计的神经网络&#xff0c;如时间序列、自然语言或语音。与传统的全连接神经网络不同&#xff0c;RNN具有"记忆"功能&#xff0c;通过循环传递信息&#xff0c;使其特别适合需要考虑上下文或顺序的任…...

Redis:常用数据结构 单线程模型

&#x1f308; 个人主页&#xff1a;Zfox_ &#x1f525; 系列专栏&#xff1a;Redis &#x1f525; 常用数据结构 &#x1f433; Redis 当中常用的数据结构如下所示&#xff1a; Redis 在底层实现上述数据结构的过程中&#xff0c;会在源码的角度上对于上述的内容进行特定的…...

夏普比率(Sharpe ratio)​

具有投资常识的人都明白&#xff0c;投资光看收益是不够的&#xff0c;还要看承受的风险&#xff0c;也就是收益风险比。 夏普比率描述的正是这个概念&#xff0c;即每承受一单位的总风险&#xff0c;会产生多少超额的报酬。 用数学公式描述就是&#xff1a; 其中&#xff1…...

【优选算法】模拟 问题算法

​一&#xff1a;替换所有的问号 class Solution { public:string modifyString(string s) {int n s.size();for(int i 0; i < n; i){if(s[i] ?){for(char ch a; ch < z; ch){if((i0 && ch !s[i1]) || (in-1 && ch ! s[i-1]) || ( i>0 &&…...

Flask+LayUI开发手记(八):通用封面缩略图上传实现

前一节做了头像上传的程序&#xff0c;应该说&#xff0c;这个程序编写和操作都相当繁琐&#xff0c;实际上&#xff0c;头像这种缩略图在很多功能中都会用到&#xff0c;屏幕界面有限&#xff0c;绝不会给那么大空间摆开那么大一个界面&#xff0c;更可能的处理&#xff0c;就…...

低代码采购系统搭建:鲸采云+能源行业订单管理自动化案例

在能源行业数字化转型浪潮下&#xff0c;某大型能源集团通过鲸采云低代码平台&#xff0c;仅用3周时间就完成了采购订单管理系统的定制化搭建。本文将揭秘这一成功案例的实施路径与关键成效。 项目背景与挑战 该企业面临&#xff1a; 供应商分散&#xff1a;200供应商使用不同…...

android关于pthread的使用过程

文章目录 简介代码流程pthread使用hello_test.cppAndroid.bp 编译过程报错处理验证过程 简介 android开发经常需要使用pthread来编写代码实现相关的业务需求 代码流程 pthread使用 需要查询某个linux函数的方法使用&#xff0c;可以使用man 函数名 // $ man pthread_crea…...

Faiss vs Milvus 深度对比:向量数据库技术选型指南

Faiss vs Milvus 深度对比&#xff1a;向量数据库技术选型指南 引言&#xff1a;向量数据库的时代抉择 在AI应用爆发的今天&#xff0c;企业和开发者面临着如何存储和检索海量向量数据的重大技术选择。作为当前最受关注的两大解决方案&#xff0c;Faiss和Milvus代表了两种不同…...

慢慢欣赏linux 之 last = switch_to(prev, next)分析

last switch_to(prev, next); 为什么需要定义last作为调用switch_to之前的prev的引用 原因如下&#xff1a; struct task_struct * switch_to(struct task_struct *prev,struct task_struct *next) {... ...return cpu_switch_to(prev, next);> .global cpu_switch_tocpu_…...

如何用 HTML 展示计算机代码

原文&#xff1a;如何用 HTML 展示计算机代码 | w3cschool笔记 &#xff08;请勿将文章标记为付费&#xff01;&#xff01;&#xff01;&#xff01;&#xff09; 在编程学习和文档编写过程中&#xff0c;清晰地展示代码是一项关键技能。HTML 作为网页开发的基础语言&#x…...

2025年ESWA SCI1区TOP,自适应学习粒子群算法AEPSO+动态周期调节灰色模型,深度解析+性能实测

目录 1.摘要2.粒子群算法PSO原理3.改进策略4.结果展示5.参考文献6.代码获取7.算法辅导应用定制读者交流 1.摘要 能源数据的科学预测对于能源行业决策和国家经济发展具有重要意义&#xff0c;尤其是短期能源预测&#xff0c;其精度直接影响经济运行效率。为了更好地提高预测模型…...

LeetCode - 53. 最大子数组和

目录 题目 Kadane 算法核心思想 Kadane 算法的步骤分析 读者可能的错误写法 正确的写法 题目 53. 最大子数组和 - 力扣&#xff08;LeetCode&#xff09; Kadane 算法核心思想 定义状态变量: currentSum: 表示以当前元素为结束的子数组的最大和。 maxSum: 记录全局最大…...

稻米分类和病害检测数据集(猫脸码客第237期)

稻米分类图像数据集&#xff1a;驱动农业智能化发展的核心资源 引言 在全球农业体系中&#xff0c;稻米作为最关键的粮食作物之一&#xff0c;其品种多样性为人类饮食提供了丰富选择。然而&#xff0c;传统稻米分类方法高度依赖人工经验&#xff0c;存在效率低、主观性强等缺…...

DOM(文档对象模型)深度解析

DOM(文档对象模型)深度解析 DOM 是 HTML/XML 文档的树形结构表示,提供了一套让 JavaScript 动态操作网页内容、结构和样式的接口。 一、DOM 核心概念 1. 节点(Node)类型 类型值说明示例ELEMENT_NODE1元素节点<div>, <p>TEXT_NODE3文本节点元素内的文字COMMEN…...

四、Sqoop 导入表数据子集

作者&#xff1a;IvanCodes 日期&#xff1a;2025年6月4日 专栏&#xff1a;Sqoop教程 当不需要将关系型数据库中的整个表一次性导入&#xff0c;而是只需要表中的一部分数据时&#xff0c;Sqoop 提供了多种方式来实现数据子集的导入。这通常通过过滤条件或选择特定列来完成。 …...

【读代码】从预训练到后训练:解锁语言模型推理潜能——Xiaomi MiMo项目深度解析

项目开源地址:https://github.com/XiaomiMiMo/MiMo 一、基本介绍 Xiaomi MiMo是小米公司开源的7B参数规模语言模型系列,专为复杂推理任务设计。项目包含基础模型(MiMo-7B-Base)、监督微调模型(MiMo-7B-SFT)和强化学习模型(MiMo-7B-RL)等多个版本。其核心创新在于通过…...

DROPP算法详解:专为时间序列和空间数据优化的PCA降维方案

DROPP (Dimensionality Reduction for Ordered Points via PCA) 是一种专门针对有序数据的降维方法。本文将详细介绍该算法的理论基础、实现步骤以及在降维任务中的具体应用。 在现代数据分析中&#xff0c;高维数据集普遍存在特征数量庞大的问题。这种高维特性不仅增加了计算…...

DeepSeek11-Ollama + Open WebUI 搭建本地 RAG 知识库全流程指南

&#x1f6e0;️ Ollama Open WebUI 搭建本地 RAG 知识库全流程指南 &#x1f4bb; 一、环境准备 # 1. 安装 Docker 和 Docker Compose sudo apt update && sudo apt install docker.io docker-compose -y# 2. 添加用户到 docker 组&#xff08;避免 sudo 权限&…...

【AI大模型】Transformer架构到底是什么?

引言 —— 想象一台能瞬间读懂整本《战争与和平》、精准翻译俳句中的禅意、甚至为你的设计草图生成前端代码的机器——这一切并非科幻&#xff0c;而是过去七年AI领域最震撼的技术革命&#xff1a;Transformer架构创造的奇迹。 当谷歌在2017年揭开Transformer的神秘面纱时&…...

code-server安装使用,并配置frp反射域名访问

为什么使用 code-server是VSCode网页版开发软件&#xff0c;可以在浏览器访问编程&#xff0c;可以使用vscode中的插件。如果有自己的服务器&#xff0c;使用frp透传后&#xff0c;域名访问在线编程&#xff0c;使用方便&#xff0c;打开的服务端口不需要单独配置&#xff0c;可…...

MTK-Android12-13 Camera2 设置默认视频画质功能实现

MTK-Android12-13 Camera2 设置默认视频画质功能实现 场景&#xff1a;部分客户使用自己的mipi相机安装到我们主板上&#xff0c;最大分辨率为1280720&#xff0c;但是视频画质默认的是640480。实际场景中&#xff0c;在默认视频分辨率情况下拍出来的视频比较模糊、预览也不清晰…...

Kafka 消息模式实战:从简单队列到流处理(一)

一、Kafka 简介 ** Kafka 是一种分布式的、基于发布 / 订阅的消息系统&#xff0c;由 LinkedIn 公司开发&#xff0c;并于 2011 年开源&#xff0c;后来成为 Apache 基金会的顶级项目。它最初的设计目标是处理 LinkedIn 公司的海量数据&#xff0c;如用户活动跟踪、消息传递和…...

Linux知识回顾总结----进程状态

本章将会介绍进程的一些概念&#xff1a;冯诺伊曼体系结构、进程是什么&#xff0c;怎么用、怎么表现得、进程空间地址、物理地址、虚拟地址、为什么存在进程空间地址、如何感性得去理解进程空间地址、环境变量是如何使用的。 目录 1. 冯诺伊曼体系结构 1.1 是什么 1.2 结论 …...

Linux 进程管理学习指南:架构、计划与关键问题全解

Linux 进程管理学习指南&#xff1a;架构、计划与关键问题全解 本文面向初学者&#xff0c;旨在帮助你从架构视角理解 Linux 进程管理子系统&#xff0c;构建系统化学习路径&#xff0c;并通过结构化笔记方法与典型问题总结&#xff0c;夯实基础、明确方向&#xff0c;逐步掌握…...

【异常】极端事件的概率衰减方式(指数幂律衰减)

在日常事件中,极端事件的概率衰减方式并非单一模式,而是取决于具体情境和数据生成机制。以下是科学依据和不同衰减形式的分析: 1. 指数衰减(Exponential Decay) 典型场景:当事件服从高斯分布(正态分布)或指数分布时,极端事件的概率呈指数衰减。 数学形式:概率密度函数…...