Android 12 客制化修改初探-Launcher/Settings/Bootanimation

news2024/11/15 9:37:30

在这里插入图片描述
Android 12

    使用 Material You 打造的全新系统界面,富有表现力、活力和个性。使用重新设计的微件、AppSearch、游戏模式和新的编解码器扩展您的应用。支持隐私信息中心和大致位置等新的保护功能。使用富媒体内容插入功能、更简便的模糊处理功能、经过改进的原生调试功能等提高工作效率.


-----------------------------正文-------------------------------

平台: RK3588 + Android 12
本文用于记录一些基于RK3588 Android12 的客制化修改内容


Launcher & 导航栏

12带来的一个巨大的变化之一就是导航栏从SystemUI整合到了Launcher3QuickStep
在这里插入图片描述
众所周知, 曾经的SystemUI才是导航栏的拥有者, 把导航栏交给Launcher这意味着, 以后的Launcher, 不是你想动就能动的了.
要替换Launcher的就好好考虑清楚了.

从布局上看, 位于底部, 占满宽度:

packages/apps/Launcher3/quickstep/res/layout/taskbar.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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.launcher3.taskbar.TaskbarDragLayer
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/taskbar_container"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:clipChildren="false">

    <com.android.launcher3.taskbar.TaskbarView
        android:id="@+id/taskbar_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:forceHasOverlappingRendering="false"
        android:layout_gravity="bottom"
        android:clipChildren="false" />

    <com.android.launcher3.taskbar.TaskbarScrimView
        android:id="@+id/taskbar_scrim"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

    <FrameLayout
        android:id="@+id/navbuttons_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom">

        <FrameLayout
            android:id="@+id/start_contextual_buttons"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:paddingLeft="@dimen/taskbar_nav_buttons_spacing"
            android:paddingRight="@dimen/taskbar_nav_buttons_spacing"
            android:paddingTop="@dimen/taskbar_contextual_padding_top"
            android:gravity="center_vertical"
            android:layout_gravity="start"/>

        <LinearLayout
            android:id="@+id/end_nav_buttons"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:orientation="horizontal"
            android:paddingLeft="@dimen/taskbar_nav_buttons_spacing"
            android:paddingRight="@dimen/taskbar_nav_buttons_spacing"
            android:layout_marginEnd="@dimen/taskbar_contextual_button_margin"
            android:gravity="center_vertical"
            android:layout_gravity="end"/>

        <FrameLayout
            android:id="@+id/end_contextual_buttons"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:paddingLeft="@dimen/taskbar_nav_buttons_spacing"
            android:paddingRight="@dimen/taskbar_nav_buttons_spacing"
            android:paddingTop="@dimen/taskbar_contextual_padding_top"
            android:gravity="center_vertical"
            android:layout_gravity="end"/>
    </FrameLayout>

    <com.android.launcher3.taskbar.StashedHandleView
        android:id="@+id/stashed_handle"
        tools:comment1="The actual size and shape will be set as a ViewOutlineProvider at runtime"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/taskbar_stashed_handle_dark_color"
        android:clipToOutline="true"
        android:layout_gravity="bottom"/>

</com.android.launcher3.taskbar.TaskbarDragLayer>

end_nav_buttons 里包含了3个功能键, 动态增加按键控件

packages/apps/Launcher3/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java

    private void initButtons(ViewGroup navContainer, ViewGroup endContainer,
            TaskbarNavButtonController navButtonController) {

        mBackButton = addButton(R.drawable.ic_sysbar_back, BUTTON_BACK,
                mNavButtonContainer, mControllers.navButtonController, R.id.back);
        mPropertyHolders.add(new StatePropertyHolder(mBackButton,
                flags -> {
                    // Show only if not disabled, and if not on the keyguard or otherwise only when
                    // the bouncer or a lockscreen app is showing above the keyguard
                    boolean showingOnKeyguard = (flags & FLAG_KEYGUARD_VISIBLE) == 0 ||
                            (flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0 ||
                            (flags & FLAG_KEYGUARD_OCCLUDED) != 0;
                    return (flags & FLAG_DISABLE_BACK) == 0
                            && ((flags & FLAG_KEYGUARD_VISIBLE) == 0 || showingOnKeyguard);
                }));
        boolean isRtl = Utilities.isRtl(mContext.getResources());
        mPropertyHolders.add(new StatePropertyHolder(
                mBackButton, flags -> (flags & FLAG_IME_VISIBLE) != 0, View.ROTATION,
                isRtl ? 90 : -90, 0));
        // Translate back button to be at end/start of other buttons for keyguard
        int navButtonSize = mContext.getResources().getDimensionPixelSize(
                R.dimen.taskbar_nav_buttons_size);
        mPropertyHolders.add(new StatePropertyHolder(
                mBackButton, flags -> (flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0
                        || (flags & FLAG_KEYGUARD_VISIBLE) != 0,
                VIEW_TRANSLATE_X, navButtonSize * (isRtl ? -2 : 2), 0));


        // home and recents buttons
        View homeButton = addButton(R.drawable.ic_sysbar_home, BUTTON_HOME, navContainer,
                navButtonController, R.id.home);
        mPropertyHolders.add(new StatePropertyHolder(homeButton,
                flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0 &&
                        (flags & FLAG_DISABLE_HOME) == 0));
        View recentsButton = addButton(R.drawable.ic_sysbar_recent, BUTTON_RECENTS,
                navContainer, navButtonController, R.id.recent_apps);
        mPropertyHolders.add(new StatePropertyHolder(recentsButton,
                flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0 &&
                        (flags & FLAG_DISABLE_RECENTS) == 0));
    

按键的点击处理:

packages/apps/Launcher3/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java

    public void onButtonClick(@TaskbarButton int buttonType) {
        switch (buttonType) {
            case BUTTON_BACK:
                executeBack();
                break;
            case BUTTON_HOME:
                navigateHome();
                break;
            case BUTTON_RECENTS:
                navigateToOverview();
                break;
            case BUTTON_IME_SWITCH:
                showIMESwitcher();
                break;
            case BUTTON_A11Y:
                notifyA11yClick(false /* longClick */);
                break;
        }
    }

    private void navigateHome() {
        mService.getOverviewCommandHelper().addCommand(OverviewCommandHelper.TYPE_HOME);
    }

    private void navigateToOverview() {
        if (mScreenPinned) {
            return;
        }
        TestLogging.recordEvent(TestProtocol.SEQUENCE_MAIN, "onOverviewToggle");
        mService.getOverviewCommandHelper().addCommand(OverviewCommandHelper.TYPE_TOGGLE);
    }

    private void executeBack() {
        mSystemUiProxy.onBackPressed();
    }

packages/apps/Launcher3/quickstep/src/com/android/quickstep/OverviewCommandHelper.java

    /**
     * Adds a command to be executed next, after all pending tasks are completed
     */
    @BinderThread
    public void addCommand(int type) {
        CommandInfo cmd = new CommandInfo(type);
        MAIN_EXECUTOR.execute(() -> addCommand(cmd));
    }

在Launcher3QuickStep存在以下服务:

packages/apps/Launcher3/quickstep/AndroidManifest.xml

        <service android:name="com.android.quickstep.TouchInteractionService"
             android:permission="android.permission.STATUS_BAR_SERVICE"
             android:directBootAware="true"
             android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.QUICKSTEP_SERVICE"/>
            </intent-filter>
        </service>

导航栏离不开SystemUI, 该服务由SystemUI绑定:

frameworks/base/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java

    private void internalConnectToCurrentUser() {
        disconnectFromLauncherService();

        // If user has not setup yet or already connected, do not try to connect
        if (!isEnabled()) {
            Log.v(TAG_OPS, "Cannot attempt connection, is enabled " + isEnabled());
            return;
        }
        mHandler.removeCallbacks(mConnectionRunnable);
        Intent launcherServiceIntent = new Intent(ACTION_QUICKSTEP)
                .setPackage(mRecentsComponentName.getPackageName());
        try {
            mBound = mContext.bindServiceAsUser(launcherServiceIntent,
                    mOverviewServiceConnection,
                    Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE_WHILE_AWAKE,
                    UserHandle.of(getCurrentUserId()));
        } catch (SecurityException e) {
            Log.e(TAG_OPS, "Unable to bind because of security error", e);
        }
        if (mBound) {
            // Ensure that connection has been established even if it thinks it is bound
            mHandler.postDelayed(mDeferredConnectionCallback, DEFERRED_CALLBACK_MILLIS);
        } else {
            // Retry after exponential backoff timeout
            retryConnectionWithBackoff();
        }
    }

替换Launcher
前面提过, 要替换Launcher需要考虑的比以前更多的, 首先, Launcher3QuickStep不能删除, 在设置中依然可以选择默认的Launcher,(这和现在某些国内的手机厂商不一样).
Settings > Apps > Default Apps > Home app
在这里插入图片描述
Launcher3QuickStep 默认桌面图标
去掉所有的桌面图标

packages/apps/Launcher3/res/xml/default_workspace_6x5.xml

diff --git a/packages/apps/Launcher3/res/xml/default_workspace_6x5.xml b/packages/apps/Launcher3/res/xml/default_workspace_6x5.xml
index b078cfd7f8..4300258cc4 100644
--- a/packages/apps/Launcher3/res/xml/default_workspace_6x5.xml
+++ b/packages/apps/Launcher3/res/xml/default_workspace_6x5.xml
@@ -15,10 +15,10 @@
 -->
 
 <favorites xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3">
-
+       <!--AnsonCode remove appicons-->
     <!-- Hotseat (We use the screen as the position of the item in the hotseat) -->
     <!-- Mail Calendar Gallery Store Internet Camera -->
-    <resolve
+    <!--resolve
         launcher:container="-101"
         launcher:screen="0"
         launcher:x="0"
@@ -61,9 +61,9 @@
         <favorite
             launcher:uri="#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_BROWSER;end" />
         <favorite launcher:uri="http://www.example.com/" />
-    </resolve>
+    </resolve-->
 
-    <!-- Resolve camera intent if GoogleCamera is not available e.g. on emulator -->
+    <!-- Resolve camera intent if GoogleCamera is not available e.g. on emulator >
     <resolve
         launcher:container="-101"
         launcher:screen="5"
@@ -71,6 +71,6 @@
         launcher:y="0" >
         <favorite launcher:uri="#Intent;action=android.media.action.STILL_IMAGE_CAMERA;end" />
         <favorite launcher:uri="#Intent;action=android.intent.action.CAMERA_BUTTON;end" />
-    </resolve>
+    </resolve-->
 
 </favorites>

Bootanimation

修改动画文件检测路径:

frameworks/base/cmds/bootanimation/BootAnimation.cpp


static const char OEM_BOOTANIMATION_FILE[] = "/cache/bootanimation.zip";
static const char PRODUCT_BOOTANIMATION_DARK_FILE[] = "/product/media/bootanimation-dark.zip";
static const char PRODUCT_BOOTANIMATION_FILE[] = "/data/bootanimation.zip";
static const char SYSTEM_BOOTANIMATION_FILE[] = "/system/media/bootanimation.zip";
static const char APEX_BOOTANIMATION_FILE[] = "/apex/com.android.bootanimation/etc/bootanimation.zip";
static const char PRODUCT_ENCRYPTED_BOOTANIMATION_FILE[] = "/product/media/bootanimation-encrypted.zip";
static const char SYSTEM_ENCRYPTED_BOOTANIMATION_FILE[] = "/system/media/bootanimation-encrypted.zip";
static const char OEM_SHUTDOWNANIMATION_FILE[] = "/odm/media/shutdownanimation.zip";
static const char PRODUCT_SHUTDOWNANIMATION_FILE[] = "/product/media/shutdownanimation.zip";
static const char SYSTEM_SHUTDOWNANIMATION_FILE[] = "/system/media/shutdownanimation.zip";

一个小插曲: /data/bootanimation.zip 开机时读取不到. 开完机后, 调试过程中通过命令启动动画, 又可以正常读取, 很是怪异.
启动命令:

setprop ctl.start bootanim

/data/local/bootanimation.ts开机视频读取正常, 于是尝试把检测开机.zip动画的函数放到视频检测里:

void BootAnimation::checkVideoFile() {
    // add for boot video
    mVideoAnimation = false;
    if (access(SYSTEM_BOOTVIDEO_FILE, R_OK) == 0) {
        mVideoFile = (char*)SYSTEM_BOOTVIDEO_FILE;
    }
    if (access(DATA_BOOTVIDEO_FILE, R_OK) == 0) {
        mVideoFile = (char*)DATA_BOOTVIDEO_FILE;
    }
    //增加一行用于检测开机 ZIP 动画.
	findBootAnimationFile();
    std::string bootVideoEnable = android::base::GetProperty("persist.sys.bootvideo.enable", "false");
    std::string showTime = android::base::GetProperty("persist.sys.bootvideo.showtime", "-1");
    ALOGD("checkVideoFile()-->bootvideo.enable=%s, showtime=%s", bootVideoEnable.c_str(), showTime.c_str());
    if (mVideoFile != NULL && !strcmp(bootVideoEnable.c_str(), "true") && (atoi(showTime.c_str()) != 0)) {
        mVideoAnimation = true;
        ALOGD("mVideoAnimation = true");
    } else {
        ALOGD("bootvideo:No boot video animation,EXIT_VIDEO_NAME:%s,bootvideo.showtime:%s\n",
        bootVideoEnable.c_str(), showTime.c_str());
    }
    // add end
}

PS: 未解

  • ZIP动画文件检测需要放在checkVideoFile
  • /cache/bootanimation.zip 死活读不到.

Activity/Service 保持高优先级运行

首先可以编写一个简单的Activity

new Thread(){
	public void run(){
		while(true){
			//print....
			sleep(1);
		}
	}
}

实际测试会发现, 当Activity切到后台后, sleep的实际时间被拉长了, 线程优先级降下来了.
可以尝试修改保证Activity的线程优先级:

frameworks/base/services/core/java/com/android/server/am/ProcessStateRecord.java

    void setCurrentSchedulingGroup(int curSchedGroup) {
		//增加代码,
		//比如修改为前台APP:
		//curSchedGroup = ProcessList.SCHED_GROUP_TOP_APP;
        mCurSchedGroup = curSchedGroup;
        mApp.getWindowProcessController().setCurrentSchedulingGroup(curSchedGroup);
    }

Settings

  • 去除Usb调试开关

packages/apps/Settings/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java

    public void onActivityCreated(Bundle icicle) {
        super.onActivityCreated(icicle);
        //......
		PreferenceCategory cat = (PreferenceCategory)getPreferenceScreen().findPreference("debug_debugging_category");
		cat.removePreference(cat.findPreference("enable_adb"));
    }

单独写出来是因为刚开始写成了:

    getPreferenceScreen().findPreference("enable_adb");

正确的方式, 是先找到对应的PreferenceCategory, 在调用findPreference

  • 增加屏幕信息显示

packages/apps/Settings/res/xml/my_device_info.xml

//....
    <PreferenceCategory
        android:key="device_detail_category"
        android:selectable="false"
        android:title="@string/my_device_info_device_details_category_title">

		<Preference
            android:key="screen_info"
            android:order="19"
            android:title="屏幕信息"
            android:summary="分辨率1920x1080 DPI 240"/>

        <!-- SIM status -->
        <Preference
            android:key="sim_status"
            android:order="18"
            android:title="@string/sim_status_title"
            settings:keywords="@string/keywords_sim_status"
            android:summary="@string/summary_placeholder"
            settings:enableCopying="true"/>
//...            

packages/apps/Settings/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java

    private void initHeader() {
        //.....
        //增加代码
		androidx.preference.PreferenceCategory cat = (androidx.preference.PreferenceCategory)getPreferenceScreen().findPreference("device_detail_category");
		android.hardware.display.DisplayManager displayMgr = (android.hardware.display.DisplayManager)getContext().getSystemService(Context.DISPLAY_SERVICE);
		android.view.Display[] displays = displayMgr.getDisplays();
		int x = 0;
		int y = 0;
		int dpi = 0;
		if(displays != null && displays.length > 0){
			android.graphics.Point rSize = new android.graphics.Point();
            displays[0].getRealSize(rSize);
			android.util.DisplayMetrics dmOut = new android.util.DisplayMetrics();
            displays[0].getMetrics(dmOut);
			x = rSize.x;
			y = rSize.y;
			dpi = dmOut.densityDpi;
		}
		cat.findPreference("screen_info").setSummary("分辨率 " + x + "x" + y + " DPI " + dpi);
    }

其他

系统存储分区

device/rockchip/common/scripts/fstab_tools/fstab.in

# Android fstab file.
#<src>                                          <mnt_point>         <type>    <mnt_flags and options>                       <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
${_block_prefix}system  /system   ext4 ro,barrier=1 ${_flags_vbmeta},first_stage_mount${_flags_avbpubkey}
${_block_prefix}vendor  /vendor   ext4 ro,barrier=1 ${_flags},first_stage_mount
${_block_prefix}odm     /odm      ext4 ro,barrier=1 ${_flags},first_stage_mount

/dev/block/by-name/boot     /boot       emmc defaults     ${_flags_chained}first_stage_mount
/dev/block/by-name/cache    /cache      ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard    wait,check
/dev/block/by-name/metadata /metadata   ext4 nodev,noatime,nosuid,discard,sync                          wait,formattable,first_stage_mount,check
/dev/block/by-name/misc     /misc       emmc defaults     defaults

/devices/platform/*usb*   auto vfat defaults      voldmanaged=usb:auto

# For sata
/devices/platform/*.sata* auto vfat defaults voldmanaged=sata:auto

# For pcie ssd
/devices/platform/*.pcie* auto vfat defaults voldmanaged=pcie:auto

/dev/block/zram0                                none                swap      defaults                                              zramsize=50%
# For sdmmc
/devices/platform/${_sdmmc_device}/mmc_host*        auto  auto    defaults        voldmanaged=sdcard1:auto
#  Full disk encryption has less effect on rk3326, so default to enable this.
/dev/block/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,reserve_root=32768,resgid=1065 latemount,wait,check,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized,keydirectory=/metadata/vold/metadata_encryption,quota,formattable,reservedsize=128M,checkpoint=fs
# for ext4
#/dev/block/by-name/userdata    /data      ext4    discard,noatime,nosuid,nodev,noauto_da_alloc,data=ordered,user_xattr,barrier=1    latemount,wait,formattable,check,fileencryption=software,quota,reservedsize=128M,checkpoint=block

默认关闭USB调试
默认persist.sys.usb.config的属性值去掉adb
如果打开了ro.debuggable, 以下代码会重新加回去.

system/core/init/property_service.cpp

static void update_sys_usb_config() {
    bool is_debuggable = android::base::GetBoolProperty("ro.debuggable", false);
    std::string config = android::base::GetProperty("persist.sys.usb.config", "");
    // b/150130503, add (config == "none") condition here to prevent appending
    // ",adb" if "none" is explicitly defined in default prop.
    if (config.empty() || config == "none") {
        InitPropertySet("persist.sys.usb.config", is_debuggable ? "adb" : "none");
    } else if (is_debuggable && config.find("adb") == std::string::npos &&
               config.length() + 4 < PROP_VALUE_MAX) {
        config.append(",adb");
        InitPropertySet("persist.sys.usb.config", config);
    }
}

参考

  1. Android进程管理1—进程优先级adj

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1212193.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

SDL2 播放音频数据(PCM)

1.简介 这里以常用的视频原始数据PCM数据为例&#xff0c;展示音频的播放。 SDL播放音频的流程如下&#xff1a; 初始化音频子系统&#xff1a;SDL_Init()。设置音频参数&#xff1a;SDL_AudioSpec。设置回调函数&#xff1a;SDL_AudioCallback。打开音频设备&#xff1a;SD…

免费IDEA插件分享:Apipost-Helper

今天给大家推荐一款IDEA插件&#xff1a;Apipost-Helper-2.0&#xff0c;写完代码IDEA内一键生成API文档&#xff0c;无需安装、打开任何其他软件&#xff1b;写完代码IDEA内一键调试&#xff0c;无需安装、打开任何其他软件&#xff1b;生成API目录树&#xff0c;双击即可快速…

使用naive-ui做一个标签页展示列表

目录 零、引言 一、引入所需组件 二、引入数据 三、使用动态样式控制列表条纹 四、全部代码 五、设计思路 5.1组件设计思路 5.2背景颜色控制思路 5.3说明 六。最终效果 零、引言 有时候我们会有很多数据&#xff0c;分成好几类 每一类都需要展示&#xff0c;那么这时…

win10配置单一python版本的sublime运行环境

①新建test.py输入下面代码 import sys print ("Python Version {}".format(str(sys.version).replace(\n, ))) ②Ctrlshiftp选择python ③按下CtrlB

中国唯一!华为入选Gartner®企业低代码应用平台魔力象限

近日&#xff0c;全球咨询机构Gartner发布 《Magic Quadrant™ for Enterprise Low-Code Application Platforms》报告&#xff0c;华为入选该象限&#xff0c;作为中国唯一入选厂商&#xff0c;华为已连续两年入选Gartner企业低代码应用平台魔力象限。 华为云Astro低代码平台采…

二百零三、Flume——Flume实时采集数据频率为1s的高频率Kafka数据直接写入ODS层表的HDFS文件路径下

一、目的 在离线数仓中&#xff0c;需要用Flume去采集Kafka中的数据&#xff0c;然后写入HDFS中。 由于每种数据类型的频率、数据大小、数据规模不同&#xff0c;因此每种数据的采集需要不同的Flume配置文件。玩了几天Flume&#xff0c;感觉Flume的使用难点就是配置文件 二、…

半平面求交 - 洛谷 - P3194 [HNOI2008] 水平可见直线

欢迎关注更多精彩 关注我&#xff0c;学习常用算法与数据结构&#xff0c;一题多解&#xff0c;降维打击。 往期相关背景点击前往 题目大意 题目链接 https://www.luogu.com.cn/problem/P3194 在直角坐标系中给定一些直线&#xff0c;然后从Y轴无穷大处往0处看&#xff0c;…

人工智能-深度学习之残差网络(ResNet)

随着我们设计越来越深的网络&#xff0c;深刻理解“新添加的层如何提升神经网络的性能”变得至关重要。更重要的是设计网络的能力&#xff0c;在这种网络中&#xff0c;添加层会使网络更具表现力&#xff0c; 为了取得质的突破&#xff0c;我们需要一些数学基础知识。 ResNet沿…

计算机毕业设计基于java+springboot+vue的实验室管理系统

项目介绍 系统中的功能模块主要是实现管理员&#xff1b;首页、个人中心、实验室管理、用户管理、实验室申请管理、设备管理、设备报备管理、设备申请管理、消耗品管理、消耗品领取管理、论坛管理、系统管理&#xff0c;用户前台&#xff1b;首页、实验室、设备、消耗品、论坛…

MySQL-- INNODB 引擎

1、INNODB引擎的逻辑存储的结构&#xff1a; 第一层的逻辑结构&#xff1a;表空间 一个mysql实例可以对应多个表空间&#xff0c;用于存储记录&#xff0c;索引数据。 第二层逻辑结构&#xff1a;段 分为数据段、索引段、回滚段、innodb是索引组织表&#xff0c;数据段是BTre…

基于JavaWeb+SpringBoot+Vue电子商城微信小程序系统的设计和实现

基于JavaWebSpringBootVue电子商城微信小程序系统的设计和实现 源码获取入口前言系统设计功能截图Lun文目录订阅经典源码专栏Java项目精品实战案例《500套》 源码获取 源码获取入口 前言 身处互联网时代&#xff0c;互联网无形中影响着人们的吃穿住行&#xff0c;人们享受着不…

2024年春季3月退役的大学生士兵免试专升本单独报名的新政策

关于2024年春季3月退役大学生士兵专升本免试单独报名安排的通知 2024年3月退役的符合条件的大学生士兵单独组织一次报名&#xff0c;网上报名时间另行通知&#xff0c;履行网上报名和信息确认手续&#xff0c;根据要求上传本人头像照片、身份证照片&#xff0c;以及《入伍通知书…

WorkPlus Meet视频会议系统,可私有化部署,保障内部数据安全

WorkPlus Meet作为一款私有化音视频会议平台&#xff0c;具有高度安全性和部署灵活性&#xff0c;能够根据参会人数进行灵活的调配&#xff0c;这样企业可以有效控制会议成本&#xff0c;避免资源浪费。同时&#xff0c;WorkPlus Meet平台支持多种功能&#xff0c;满足不同场景…

做决策、定战略、带团队:顶级高手常用的16个思维模型

01 做决策 1.沃伦巴菲特的双目标清单系统&#xff08;Two-List System&#xff09; 弗林特当了巴菲特的私人飞行员十年之久&#xff0c;还曾为美国四任总统开过飞机&#xff0c;但他在事业上依然有更多追求。有一次&#xff0c;他和巴菲特在探讨他的职业生涯目标时&#xff0…

第三方软件测试服务有哪些形式?选择时如何避雷?

高新技术的快速发展&#xff0c;人们对于软件产品越来越依赖&#xff0c;因此软件质量对于软件企业来说至关重要。产品质量的好坏需要通过检测才得知&#xff0c;软件企业为了获得更客观公正的检验结果&#xff0c;会将软件测试交由第三方软件测试服务机构进行?那么有哪些形式…

python采集小破站视频弹幕

嗨喽~大家好呀&#xff0c;这里是魔王呐 ❤ ~! python更多源码/资料/解答/教程等 点击此处跳转文末名片免费获取 环境使用]: Python 3.8 Pycharm模块使用]: import requests 数据请求 import jieba 分词 import wordcloud 词云 import re 正则通过爬虫程序采集数据 分析数…

ubuntu22.04下hadoop3.3.6+hbase2.5.6+phoenix5.1.3开发环境搭建

一、涉及软件包资源清单 1、java 这里使用的是openjdk 2、hadoop-3.3.6.tar.gz 3、hbase-2.5.6-hadoop3-bin.tar.gz 4、phoenix-hbase-2.5-5.13-bin.tar.gz 5、apache-zookeeper-3.8.3-bin.tar.gz 6、openssl-3.0.12.tar.gz 二、安装 1、操作系统环境准备 换源 sudo vim /et…

小黑完成了最后一节健身课,顺利完成了跳绳比赛,乘飞机到达南京准备第二天领物资和南京城内闲逛的leetcode之旅:215. 数组中的第K个最大元素

小黑代码 class Solution:def findKthLargest(self, nums: List[int], k: int) -> int:# 数组长度n len(nums)nums list(map(lambda x:-x, nums))q []for i in range(n):heapq.heappush(q, nums[i])# 出堆target -1for i in range(k):target heapq.heappop(q)return -…

Python数据结构:字典(dict)详解

1.字典概念 字典在其他语言中可能会被称为“关联存储”或“关联数组”。   在Python中&#xff0c;字典&#xff08;Dictionary&#xff09;是一种可变、无序且键值对&#xff08;key-value pairs&#xff09;唯一的数据结构。   字典也是一种标准映射类型&#xff0c;mapp…