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

Android13系统导航栏添加音量加减键按钮功能

不知道为什么拿到芯片原厂发布给我们的Android13系统源码编译后,导航栏没有音量加减键,客户有反馈这个问题,所以特意加了一下,修改记录如下:frameworks/base目录下

commit 9cb2244d61a237cab03c540bfcca6e4fac2bea2c
Author: incar <chs@incartech.cn>
Date:   Fri Jun 21 19:05:47 2024 +0800导航栏添加音量加减键Change-Id: Ia1811c7a94aa2f9e175b7725f96370925c5055ebdiff --git a/packages/SystemUI/res/drawable/ic_sysbar_volume_add_button.xml b/packages/SystemUI/res/drawable/ic_sysbar_volume_add_button.xml
new file mode 100755
index 000000000000..76a145eff0cb
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_sysbar_volume_add_button.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="?attr/singleToneColor"
+        android:pathData="M3,9v6h4l5,5L12,4L7,9L3,9zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM14,3.23v2.06c2.89,0.86 5,3.54 5,6.71s-2.11,5.85 -5,6.71v2.06c4.01,-0.91 7,-4.49 7,-8.77s-2.99,-7.86 -7,-8.77z"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_sysbar_volume_sub_button.xml b/packages/SystemUI/res/drawable/ic_sysbar_volume_sub_button.xml
new file mode 100755
index 000000000000..69d86071ce10
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_sysbar_volume_sub_button.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="28dp"
+        android:height="28dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="?attr/singleToneColor"
+        android:pathData="M18.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM5,9v6h4l5,5V4L9,9H5z"/>
+</vector>
diff --git a/packages/SystemUI/res/layout/volume_add.xml b/packages/SystemUI/res/layout/volume_add.xml
new file mode 100755
index 000000000000..882c855a3a03
--- /dev/null
+++ b/packages/SystemUI/res/layout/volume_add.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<com.android.systemui.navigationbar.buttons.KeyButtonView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:systemui="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/volume_add"
+    android:layout_width="@dimen/navigation_key_width"
+    android:layout_height="match_parent"
+    android:layout_weight="0"
+    systemui:keyCode="24"
+    android:scaleType="center"
+    android:paddingStart="@dimen/navigation_key_padding"
+    android:paddingEnd="@dimen/navigation_key_padding"
+    />
+
diff --git a/packages/SystemUI/res/layout/volume_sub.xml b/packages/SystemUI/res/layout/volume_sub.xml
new file mode 100755
index 000000000000..4b687bd52079
--- /dev/null
+++ b/packages/SystemUI/res/layout/volume_sub.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<com.android.systemui.navigationbar.buttons.KeyButtonView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:systemui="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/volume_sub"
+    android:layout_width="@dimen/navigation_key_width"
+    android:layout_height="match_parent"
+    android:layout_weight="0"
+    systemui:keyCode="25"
+    android:scaleType="center"
+    android:paddingStart="@dimen/navigation_key_padding"
+    android:paddingEnd="@dimen/navigation_key_padding"
+    />
+
diff --git a/packages/SystemUI/res/values-sw400dp/config.xml b/packages/SystemUI/res/values-sw400dp/config.xml
new file mode 100755
index 000000000000..5c37bfb34f68
--- /dev/null
+++ b/packages/SystemUI/res/values-sw400dp/config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2012, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+     for different hardware and product builds. -->
+<resources>
+
+    <!-- Nav bar button default ordering/layout -->
+    <string name="config_navBarLayout" translatable="false">left;volume_sub,back,home,recent,volume_add;right</string>
+
+</resources>
diff --git a/packages/SystemUI/res/values-sw400dp/dimens.xml b/packages/SystemUI/res/values-sw400dp/dimens.xml
old mode 100644
new mode 100755
index f19335bc6285..340697a37fcb
--- a/packages/SystemUI/res/values-sw400dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw400dp/dimens.xml
@@ -17,7 +17,8 @@<resources><!-- The width of the view containing navigation buttons -->
-    <dimen name="navigation_key_width">80dip</dimen>
+    <dimen name="navigation_key_width">50dp</dimen>
+    <dimen name="navigation_key_padding">30dp</dimen><!-- The padding on the side of the navigation bar. Must be greater than or equal tonavigation_extra_key_width -->
diff --git a/packages/SystemUI/res/values-sw410dp/dimens.xml b/packages/SystemUI/res/values-sw410dp/dimens.xml
old mode 100644
new mode 100755
index 7da47e5089be..62285f56c45f
--- a/packages/SystemUI/res/values-sw410dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw410dp/dimens.xml
@@ -26,5 +26,8 @@<dimen name="global_actions_grid_item_side_margin">12dp</dimen><dimen name="global_actions_grid_item_height">72dp</dimen>
+	
+	<dimen name="navigation_key_width">55dp</dimen>
+    <dimen name="navigation_key_padding">33dp</dimen></resources>
diff --git a/packages/SystemUI/res/values-sw600dp-land/dimens.xml b/packages/SystemUI/res/values-sw600dp-land/dimens.xml
old mode 100644
new mode 100755
index b24ce122208f..12973fe351a1
--- a/packages/SystemUI/res/values-sw600dp-land/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp-land/dimens.xml
@@ -77,4 +77,7 @@<dimen name="lockscreen_shade_keyguard_transition_vertical_offset">83dp</dimen><dimen name="notification_panel_margin_horizontal">24dp</dimen>
+	
+	<dimen name="navigation_key_width">120dp</dimen>
+    <dimen name="navigation_key_padding">50dp</dimen></resources>
diff --git a/packages/SystemUI/res/values-sw600dp/config.xml b/packages/SystemUI/res/values-sw600dp/config.xml
old mode 100644
new mode 100755
index 80628f903e76..9ea9eedb3cc5
--- a/packages/SystemUI/res/values-sw600dp/config.xml
+++ b/packages/SystemUI/res/values-sw600dp/config.xml
@@ -27,7 +27,7 @@<bool name="config_quickSettingsMediaLandscapeCollapsed">false</bool><!-- Nav bar button default ordering/layout -->
-    <string name="config_navBarLayout" translatable="false">left;back,home,recent;right</string>
+    <string name="config_navBarLayout" translatable="false">left;volume_sub,back,home,recent,volume_add;right</string><!-- orientation of the dead zone when touches have recently occurred elsewhere on screen --><integer name="navigation_bar_deadzone_orientation">0</integer>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index df3c8bedf1bb..ccc2b8c6604f 100755
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -301,7 +301,7 @@</string-array><!-- Nav bar button default ordering/layout -->
-    <string name="config_navBarLayout" translatable="false">left[.5W],back[1WC];home;recent[1WC],right[.5W]</string>
+    <string name="config_navBarLayout" translatable="false">left[.5W];volume_sub,back,home,recent,volume_add;right[.5W]</string><string name="config_navBarLayoutQuickstep" translatable="false">back[1.7WC];home;contextual[1.7WC]</string><string name="config_navBarLayoutHandle" translatable="false">back[70AC];home_handle;ime_switcher[70AC]</string>diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java
index 1ef2b3c98859..bf152b112e86 100755
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java
@@ -1187,6 +1187,21 @@ public class NavigationBar extends ViewController<NavigationBarView> implementsaccessibilityButton.setOnClickListener(this::onAccessibilityClick);accessibilityButton.setOnLongClickListener(this::onAccessibilityLongClick);updateAccessibilityStateFlags();
+        ButtonDispatcher volumeAddButton=mView.getVolumeAddButton();
+        ButtonDispatcher volumeSubButton=mView.getVolumeSubButton();
+        //boolean isShowVolumeButton = "true".equals(SystemProperties.get("ro.rk.systembar.voiceicon","true"));
+        boolean isShowVolumeButton = true;
+        if(isShowVolumeButton){
+            volumeAddButton.setVisibility(View.VISIBLE);
+            volumeSubButton.setVisibility(View.VISIBLE);
+        }else{
+            volumeAddButton.setVisibility(View.GONE);
+            volumeSubButton.setVisibility(View.GONE);
+        }
+        if (mContext.getResources().getConfiguration().smallestScreenWidthDp < 400) {
+            volumeAddButton.setVisibility(View.GONE);
+            volumeSubButton.setVisibility(View.GONE);
+        }ButtonDispatcher imeSwitcherButton = mView.getImeSwitchButton();imeSwitcherButton.setOnClickListener(this::onImeSwitcherClick);
@@ -1699,6 +1714,10 @@ public class NavigationBar extends ViewController<NavigationBarView> implementsupdateButtonLocation(region, touchRegionCache, mView.getAccessibilityButton(), inScreenSpace,useNearestRegion);
+        updateButtonLocation(region, touchRegionCache, mView.getVolumeAddButton(), inScreenSpace,
+                useNearestRegion);
+        updateButtonLocation(region, touchRegionCache, mView.getVolumeSubButton(), inScreenSpace,
+                useNearestRegion);if (includeFloatingButtons && mView.getFloatingRotationButton().isVisible()) {// Note: this button is floating so the nearest region doesn't applyupdateButtonLocation(
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
old mode 100644
new mode 100755
index 59bb2278edfe..70fb8a920ca0
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java
@@ -68,6 +68,8 @@ public class NavigationBarInflaterView extends FrameLayoutpublic static final String RIGHT = "right";public static final String CONTEXTUAL = "contextual";public static final String IME_SWITCHER = "ime_switcher";
+    public static final String VOLUME_ADD = "volume_add";
+    public static final String VOLUME_SUB = "volume_sub";public static final String GRAVITY_SEPARATOR = ";";public static final String BUTTON_SEPARATOR = ",";
@@ -99,11 +101,13 @@ public class NavigationBarInflaterView extends FrameLayoutprivate boolean mIsVertical;private boolean mAlternativeOrder;+    private int mDensity;private OverviewProxyService mOverviewProxyService;private int mNavBarMode = NAV_BAR_MODE_3BUTTON;public NavigationBarInflaterView(Context context, AttributeSet attrs) {super(context, attrs);
+        mDensity = context.getResources().getConfiguration().densityDpi;createInflaters();mOverviewProxyService = Dependency.get(OverviewProxyService.class);mNavBarMode = Dependency.get(NavigationModeController.class).addListener(this);
@@ -118,6 +122,16 @@ public class NavigationBarInflaterView extends FrameLayoutmLandscapeInflater = LayoutInflater.from(mContext.createConfigurationContext(landscape));}+    @Override
+    protected void onConfigurationChanged(Configuration newConfig) {
+        super.onConfigurationChanged(newConfig);
+        if(mDensity != newConfig.densityDpi || mDensity < 600){
+            mDensity = newConfig.densityDpi;
+            clearViews();
+            inflateLayout(mCurrentLayout);
+        }
+    }
+@Overrideprotected void onFinishInflate() {super.onFinishInflate();
@@ -387,6 +401,10 @@ public class NavigationBarInflaterView extends FrameLayoutv = inflater.inflate(R.layout.home_handle, parent, false);} else if (IME_SWITCHER.equals(button)) {v = inflater.inflate(R.layout.ime_switcher, parent, false);
+        } else if (VOLUME_ADD.equals(button)) {
+            v = inflater.inflate(R.layout.volume_add, parent, false);
+        } else if (VOLUME_SUB.equals(button)) {
+            v = inflater.inflate(R.layout.volume_sub, parent, false);} else if (button.startsWith(KEY)) {String uri = extractImage(button);int code = extractKeycode(button);
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java
old mode 100644
new mode 100755
index 97024881ca62..8c5c589fdc22
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java
@@ -45,6 +45,7 @@ import android.util.Log;import android.util.SparseArray;import android.view.ContextThemeWrapper;import android.view.Display;
+import android.view.Display.Mode;import android.view.MotionEvent;import android.view.Surface;import android.view.View;
@@ -120,6 +121,8 @@ public class NavigationBarView extends FrameLayout {private KeyButtonDrawable mHomeDefaultIcon;private KeyButtonDrawable mRecentIcon;private KeyButtonDrawable mDockedIcon;
+    private KeyButtonDrawable mVolumeAddIcon;
+    private KeyButtonDrawable mVolumeSubIcon;private Context mLightContext;private int mLightIconColor;private int mDarkIconColor;
@@ -159,6 +162,7 @@ public class NavigationBarView extends FrameLayout {* fully locked mode we only show that unlocking is blocked.*/private ScreenPinningNotify mScreenPinningNotify;
+    private boolean mIsRot0Landscape = true;/*** {@code true} if the IME can render the back button and the IME switcher button.
@@ -311,6 +315,10 @@ public class NavigationBarView extends FrameLayout {mTmpLastConfiguration = new Configuration();mConfiguration.updateFrom(context.getResources().getConfiguration());+        Display display = ((WindowManager)context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
+        Mode displayMode = display.getMode();
+        mIsRot0Landscape = displayMode.getPhysicalWidth() > displayMode.getPhysicalHeight();
+        Log.v(TAG, "PW=" + displayMode.getPhysicalWidth() + ", PH=" + displayMode.getPhysicalHeight());mScreenPinningNotify = new ScreenPinningNotify(mContext);mButtonDispatchers.put(R.id.back, new ButtonDispatcher(R.id.back));
@@ -320,6 +328,8 @@ public class NavigationBarView extends FrameLayout {mButtonDispatchers.put(R.id.ime_switcher, imeSwitcherButton);mButtonDispatchers.put(R.id.accessibility_button, accessibilityButton);mButtonDispatchers.put(R.id.menu_container, mContextualButtonGroup);
+        mButtonDispatchers.put(R.id.volume_add, new ButtonDispatcher(R.id.volume_add));
+        mButtonDispatchers.put(R.id.volume_sub, new ButtonDispatcher(R.id.volume_sub));mDeadZone = new DeadZone(this);}@@ -420,6 +430,13 @@ public class NavigationBarView extends FrameLayout {return mButtonDispatchers.get(R.id.accessibility_button);}+    public ButtonDispatcher getVolumeAddButton() {
+        return mButtonDispatchers.get(R.id.volume_add);
+    }
+
+    public ButtonDispatcher getVolumeSubButton() {
+        return mButtonDispatchers.get(R.id.volume_sub);
+    }public RotationContextButton getRotateSuggestionButton() {return (RotationContextButton) mButtonDispatchers.get(R.id.rotate_suggestion);}
@@ -464,6 +481,8 @@ public class NavigationBarView extends FrameLayout {if (orientationChange || densityChange || dirChange) {mBackIcon = getBackDrawable();}
+        mVolumeAddIcon = getDrawable(R.drawable.ic_sysbar_volume_add_button);
+        mVolumeSubIcon = getDrawable(R.drawable.ic_sysbar_volume_sub_button);}/**
@@ -607,6 +626,8 @@ public class NavigationBarView extends FrameLayout {}getHomeButton().setImageDrawable(homeIcon);getBackButton().setImageDrawable(backIcon);
+        getVolumeAddButton().setImageDrawable(mVolumeAddIcon);
+        getVolumeSubButton().setImageDrawable(mVolumeSubIcon);updateRecentsIcon();

涉及到修改的文件如下:注意别遗漏了

 packages/SystemUI/res/drawable/ic_sysbar_volume_add_button.xml    
 packages/SystemUI/res/drawable/ic_sysbar_volume_sub_button.xml     
 packages/SystemUI/res/layout/volume_add.xml                              
 packages/SystemUI/res/layout/volume_sub.xml      
 packages/SystemUI/res/values-sw400dp/config.xml        
 packages/SystemUI/res/values-sw400dp/dimens.xml   
 packages/SystemUI/res/values-sw410dp/dimens.xml         
 packages/SystemUI/res/values-sw600dp-land/dimens.xml               
 packages/SystemUI/res/values-sw600dp/config.xml                 
 packages/SystemUI/res/values/config.xml                                        
 packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java     
 packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarInflaterView.java 
 packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java     

相关文章:

Android13系统导航栏添加音量加减键按钮功能

不知道为什么拿到芯片原厂发布给我们的Android13系统源码编译后&#xff0c;导航栏没有音量加减键&#xff0c;客户有反馈这个问题&#xff0c;所以特意加了一下&#xff0c;修改记录如下&#xff1a;frameworks/base目录下 commit 9cb2244d61a237cab03c540bfcca6e4fac2bea2c …...

普及GIS知识,推动产业发展

915 GIS节&#xff1a;普及GIS知识&#xff0c;推动产业发展 自2008年起&#xff0c;每年的9月15日被定为“GIS节”&#xff0c;这一特殊的节日由超图首次发起倡议&#xff0c;旨在打造一个普及和传播GIS&#xff08;地理信息系统&#xff09;知识的平台&#xff0c;促进大众对…...

第2章-Python编程基础

#本章目标 1&#xff0c;了解什么是计算机程序 2&#xff0c;了解什么是编程语言 3&#xff0c;了解编程语言的分类 4&#xff0c;了解静态语言与脚本语言的区别 5&#xff0c;掌握IPO程序编写方法 6&#xff0c;熟练应用输出函数print与输入函数input 7&#xff0c;掌握Python…...

LDO产品的基础知识解析

低压降稳压器 (LDO)是一种用于调节较高电压输入产生的输出电压的简单方法。在大多数情况下&#xff0c;低压降稳压器都易于设计和使用。然而&#xff0c;如今的现代应用都包括各种各样的模拟和数字系统&#xff0c;而有些系统和工作条件将决定哪种LDO最适合相关电路&#xff0c…...

如何利用python画出AHP-SWOT的战略四边形(四象限图)

在企业或产业发展的相关论文分析中&#xff0c;常用到AHP-SWOT法进行定量分析&#xff0c;形成判断矩阵后&#xff0c;如何构造整洁的战略四边形是分析的最后一个环节&#xff0c;本文现将相关代码发布如下&#xff1a; import mpl_toolkits.axisartist as axisartist import …...

适用于智慧城市、智慧文旅等在线场景的轻量级3D数字人引擎MyAvatar简介

本人研发的国内首个纯面向web应用和小程序的轻量级3D虚拟人引擎MyAvatar。 功能简述 支持3D模型定制&#xff08;写实或卡通风格均可&#xff0c;人物模型需实现绑定和变形&#xff09;动画可以内置于模型中&#xff0c;也可以单独以glb或fbx格式导出并动态加载支持readyplay…...

Excel显示/隐藏批注按钮为什么是灰色?

在excel中&#xff0c;经常使用批注来加强数据信息的提示&#xff0c;有时候会把很多的批注显示出来&#xff0c;但是再想将它们隐藏起来&#xff0c;全选工作表后&#xff0c;“显示/隐藏批注”按钮是灰色的&#xff0c;不可用。 二、可操作方法 批注在excel、WPS表格中都是按…...

ArtTS系统能力-通知的学习(3.1)

上篇回顾&#xff1a; ArtTS语言基础类库-容器类库内容的学习(2.10.2&#xff09; 本篇内容&#xff1a; ArtTS系统能力-通知的学习&#xff08;3.1&#xff09; 一、 知识储备 1. 基础类型通知 按内容分成四类&#xff1a; 类型描述NOTIFICATION_CONTENT_BASIC_TEXT普通文…...

Apollo9.0 PNC源码学习之Planning模块(三)—— public_road_planner

前面文章: (1)Apollo9.0 PNC源码学习之Planning模块(一)—— 规划概览 (2)Apollo9.0 PNC源码学习之Planning模块(二)—— planning_component 1 planning_interface_base 规划接口基类: planning\planning_interface_base\planner_base\planner.h #pragma once#in…...

【Elasticsearch】linux使用supervisor常驻Elasticsearch,centos6.10安装 supervisor

背景&#xff1a; linux服务器&#xff0c;CentOS 6操作系统&#xff0c;默认版本python2.6.6&#xff0c;避免安装过多的依赖不升级python 在网上查的资料python2.6.6兼容supervisor版本 3.1.3 安装supervisor 手动在python官网下载supervisor&#xff0c;并上传到服务器 下…...

推荐系统三十六式学习笔记:原理篇.模型融合14|一网打尽协同过滤、矩阵分解和线性模型

目录 从特征组合说起FM模型1.原理2.模型训练3.预测阶段4.一网打尽其他模型5.FFM 总结 在上一篇文章中&#xff0c;我们讲到了使用逻辑回归和梯度提升决策树组合的模型融合办法&#xff0c;用于CTR预估&#xff0c;给这个组合起了个名字&#xff0c;叫“辑度组合”。这对组合中&…...

如何使用mapXplore将SQLMap数据转储到关系型数据库中

关于mapXplore mapXplore是一款功能强大的SQLMap数据转储与管理工具&#xff0c;该工具基于模块化的理念开发&#xff0c;可以帮助广大研究人员将SQLMap数据提取出来&#xff0c;并转储到类似PostgreSQL或SQLite等关系型数据库中。 功能介绍 当前版本的mapXplore支持下列功能…...

JAVA设计模式-大集合数据拆分

背景 我们在做软件开发时&#xff0c;经常会遇到把大集合的数据&#xff0c;拆分成子集合处理。例如批量数据插入数据库时&#xff0c;一次大约插入5000条数据比较合理&#xff0c;但是有时候待插入的数据远远大于5000条。这时候就需要进行数据拆分。数据拆分基本逻辑并不复杂&…...

如何使用sr2t将你的安全扫描报告转换为表格格式

关于sr2t sr2t是一款针对安全扫描报告的格式转换工具&#xff0c;全称为“Scanning reports to tabular”&#xff0c;该工具可以获取扫描工具的输出文件&#xff0c;并将文件数据转换为表格格式&#xff0c;例如CSV、XLSX或文本表格等&#xff0c;能够为广大研究人员提供一个…...

ansible自动化运维,(2)ansible-playbook

三种常见的数据格式&#xff1a; XML&#xff1a;可扩展标记语言&#xff0c;用于数据交换和配置 JSON&#xff1a;对象标记法&#xff0c;主要用来数据交换或配置&#xff0c;不支持注释 YAML&#xff1a;不是一种标记语言&#xff0c;主要用来配置&#xff0c;大小写敏感&…...

一分钟学习数据安全—自主管理身份SSI分布式标识DID介绍

SSI标准化的两大支柱&#xff0c;一个是VC&#xff0c;之前简单介绍过&#xff0c;另一个就是DID。基本层次上&#xff0c;DID就是一种新型的全局唯一标识符&#xff0c;跟浏览器的URL没有什么不同。深层次上&#xff0c;DID是互联网分布式数字身份和PKI新层级的原子构件。 一…...

[单master节点k8s部署]11.服务service

service service是一个固定接入层&#xff0c;客户端 可以访问service的ip和端口&#xff0c;访问到service关联的后端pod&#xff0c;这个service工作依赖于dns服务&#xff08;coredns&#xff09; 每一个k8s节点上都有一个组件叫做kube-proxy&#xff0c;始终监视着apiser…...

ES6面试题——箭头函数和普通函数有什么区别

1. this指向问题 <script> let obj {a: function () {console.log(this); // 打印出&#xff1a;{a: ƒ, b: ƒ}},b: () > {console.log(this); // 打印出Window {window: Window, self: Window,...}}, }; obj.a(); obj.b(); </script> 箭头函数中的this是在箭…...

WordPress中文网址导航栏主题风格模版HaoWa

模板介绍 WordPress响应式网站中文网址导航栏主题风格模版HaoWa1.3.1源码 HaoWA主题风格除行为主体导航栏目录外&#xff0c;对主题风格需要的小控制模块都开展了敞开式的HTML在线编辑器方式的作用配备&#xff0c;另外预埋出默认设置的编码构造&#xff0c;便捷大伙儿在目前…...

ThreadPoolExecutor基于ctl变量的声明周期管理

个人博客 ThreadPoolExecutor基于ctl变量的声明周期管理 | iwts’s blog 总集 想要完整了解下ThreadPoolExecutor&#xff1f;可以参考&#xff1a; 基于源码详解ThreadPoolExecutor实现原理 | iwts’s blog ctl字段的应用 线程池内部使用一个变量ctl维护两个值&#xff…...

Llama-3.2V-11B-cot惊艳案例:电影截图角色关系推演与剧情发展预测展示

Llama-3.2V-11B-cot惊艳案例&#xff1a;电影截图角色关系推演与剧情发展预测展示 1. 视觉推理工具简介 Llama-3.2V-11B-cot是基于Meta多模态大模型开发的高性能视觉推理工具&#xff0c;专为双卡4090环境深度优化。该工具不仅修复了视觉权重加载的关键问题&#xff0c;还支持…...

Docker 容器中文字体及 matplotlib 环境应用

为了避开 Noto CJK 这种复杂的 TTC(TrueType Collection)大包带来的识别问题,最理想的选择是使用独立打包的 OTF 或 TTF 字体。 0. 环境检查 # 1. 更新源并安装 fontconfig apt-get update apt-get install -y fontconfig# 2. 现在 fc-cache 命令可用了,刷新系统字体 fc-…...

OpCore Simplify:零基础黑苹果配置的智能助手

OpCore Simplify&#xff1a;零基础黑苹果配置的智能助手 【免费下载链接】OpCore-Simplify A tool designed to simplify the creation of OpenCore EFI 项目地址: https://gitcode.com/GitHub_Trending/op/OpCore-Simplify 对于许多电脑爱好者来说&#xff0c;安装黑苹…...

手把手教你用SteamCMD在Windows服务器上搭建Rust腐蚀私服(附详细参数配置)

手把手教你用SteamCMD在Windows服务器上搭建Rust腐蚀私服&#xff08;附详细参数配置&#xff09; 在生存游戏领域&#xff0c;Rust以其硬核的PVP机制和高度自由的沙盒玩法&#xff0c;持续吸引着大量玩家。对于想要掌控游戏规则、打造专属社区的管理员来说&#xff0c;自建服…...

如何安全提取Chrome浏览器密码:3种实用方法完全指南

如何安全提取Chrome浏览器密码&#xff1a;3种实用方法完全指南 【免费下载链接】chromepass Get all passwords stored by Chrome on WINDOWS. 项目地址: https://gitcode.com/gh_mirrors/chr/chromepass 在数字生活中&#xff0c;你是否遇到过忘记网站密码的困扰&…...

从新手到专家:OpenCore配置工具OCAT的实战应用指南

从新手到专家&#xff1a;OpenCore配置工具OCAT的实战应用指南 【免费下载链接】OCAuxiliaryTools Cross-platform GUI management tools for OpenCore&#xff08;OCAT&#xff09; 项目地址: https://gitcode.com/gh_mirrors/oc/OCAuxiliaryTools 如果你正在为黑苹果系…...

ABC系统实战指南:革新数字电路设计的逻辑综合与形式验证技术突破

ABC系统实战指南&#xff1a;革新数字电路设计的逻辑综合与形式验证技术突破 【免费下载链接】abc ABC: System for Sequential Logic Synthesis and Formal Verification 项目地址: https://gitcode.com/gh_mirrors/ab/abc 在现代集成电路设计流程中&#xff0c;工程师…...

HP-Socket技术债务管理会议决策记录:选项、理由与结果

HP-Socket技术债务管理会议决策记录&#xff1a;选项、理由与结果 【免费下载链接】HP-Socket High Performance TCP/UDP/HTTP Communication Component 项目地址: https://gitcode.com/gh_mirrors/hp/HP-Socket 作为一款高性能TCP/UDP/HTTP通信组件库&#xff0c;HP-So…...

3分钟掌握Chrome密码提取:ChromePass让你不再遗忘任何登录凭据

3分钟掌握Chrome密码提取&#xff1a;ChromePass让你不再遗忘任何登录凭据 【免费下载链接】chromepass Get all passwords stored by Chrome on WINDOWS. 项目地址: https://gitcode.com/gh_mirrors/chr/chromepass 你是否曾经在登录网站时&#xff0c;明明记得在Chrom…...

OpenClaw技能开发:为Qwen3-32B定制PDF摘要插件

OpenClaw技能开发&#xff1a;为Qwen3-32B定制PDF摘要插件 1. 为什么需要PDF摘要技能 去年我接手了一个研究项目&#xff0c;需要快速消化上百份行业白皮书和学术论文。每天手动翻阅PDF的日子让我意识到&#xff1a;必须开发一个能自动提取核心观点的工具。这就是我决定为Ope…...