屏幕超时休眠-Android13

news2024/11/27 7:40:48

屏幕超时休眠-Android13

  • 1、设置界面
    • 1.2 属性值
      • 1.2.1 默认值
      • 1.2.2 最小值限制
    • 1.3 属性值疑问 Settings.System.SCREEN_OFF_TIMEOUT
  • 2、超时灭屏
    • 2.1 锁定屏幕的超时
    • 2.2 屏幕灭屏的超时
  • 3、永不休眠
  • * 关键日志

1、设置界面

在这里插入图片描述
packages/apps/Settings/src/com/android/settings/display/ScreenTimeoutSettings.java
packages/apps/Settings/res/xml/screen_timeout_settings.xml

12-16 12:13:54.707  7976  7976 D SettingsActivity: Switching to fragment com.android.settings.display.ScreenTimeoutSettings

1.2 属性值

Settings.System.SCREEN_OFF_TIMEOUT

adb shell settings get System screen_off_timeout

packages/apps/Settings/res/values/arrays.xml

    <!-- Display settings.  The delay in inactivity before the screen is turned off. These are shown in a list dialog. -->
    <string-array name="screen_timeout_entries">
        <item>15 seconds</item>
        <item>30 seconds</item>
        <item>1 minute</item>
        <item>2 minutes</item>
        <item>5 minutes</item>
        <item>10 minutes</item>
        <item>30 minutes</item>
    </string-array>

    <!-- Do not translate. -->
    <string-array name="screen_timeout_values" translatable="false">
        <!-- Do not translate. -->
        <item>15000</item>
        <!-- Do not translate. -->
        <item>30000</item>
        <!-- Do not translate. -->
        <item>60000</item>
        <!-- Do not translate. -->
        <item>120000</item>
        <!-- Do not translate. -->
        <item>300000</item>
        <!-- Do not translate. -->
        <item>600000</item>
        <!-- Do not translate. -->
        <item>1800000</item>
    </string-array>

1.2.1 默认值

def_screen_off_timeout : frameworks/base/packages/SettingsProvider/res/values/defaults.xml

frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java

    private void loadSystemSettings(SQLiteDatabase db) {
        SQLiteStatement stmt = null;
        try {
            stmt = db.compileStatement("INSERT OR IGNORE INTO system(name,value)"
                    + " VALUES(?,?);");

            loadBooleanSetting(stmt, Settings.System.DIM_SCREEN,
                    R.bool.def_dim_screen);
            loadIntegerSetting(stmt, Settings.System.SCREEN_OFF_TIMEOUT,
                    R.integer.def_screen_off_timeout);

            // Set default cdma DTMF type
            loadSetting(stmt, Settings.System.DTMF_TONE_TYPE_WHEN_DIALING, 0);

            // Set default hearing aid
            loadSetting(stmt, Settings.System.HEARING_AID, 0);

            // Set default tty mode
            loadSetting(stmt, Settings.System.TTY_MODE, 0);

            loadIntegerSetting(stmt, Settings.System.SCREEN_BRIGHTNESS,
                    R.integer.def_screen_brightness);

            loadIntegerSetting(stmt, Settings.System.SCREEN_BRIGHTNESS_FOR_VR,
                    com.android.internal.R.integer.config_screenBrightnessForVrSettingDefault);

            loadBooleanSetting(stmt, Settings.System.SCREEN_BRIGHTNESS_MODE,
                    R.bool.def_screen_brightness_automatic_mode);

            loadBooleanSetting(stmt, Settings.System.ACCELEROMETER_ROTATION,
                    R.bool.def_accelerometer_rotation);

            loadIntegerSetting(stmt, Settings.System.USER_ROTATION, R.integer.def_user_rotation);

            loadDefaultHapticSettings(stmt);

            loadBooleanSetting(stmt, Settings.System.NOTIFICATION_LIGHT_PULSE,
                    R.bool.def_notification_pulse);

            loadUISoundEffectsSettings(stmt);

            loadIntegerSetting(stmt, Settings.System.POINTER_SPEED,
                    R.integer.def_pointer_speed);

            /*
             * IMPORTANT: Do not add any more upgrade steps here as the global,
             * secure, and system settings are no longer stored in a database
             * but are kept in memory and persisted to XML.
             *
             * See: SettingsProvider.UpgradeController#onUpgradeLocked
             */
        } finally {
            if (stmt != null) stmt.close();
        }
    }

frameworks/base/packages/SettingsProvider/res/values/defaults.xml

<integer name="def_screen_off_timeout">60000</integer>

1.2.2 最小值限制

frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java

mMinimumScreenOffTimeoutConfig = resources.getInteger(com.android.internal.R.integer.config_minimumScreenOffTimeout);
Math.max(timeout, mMinimumScreenOffTimeoutConfig);

1.3 属性值疑问 Settings.System.SCREEN_OFF_TIMEOUT

在设置屏幕超时代码代码中,最大值可以为“Long.MAX_VALUE”,属性设置Settings.System.putLong(context.getContentResolver(), SCREEN_OFF_TIMEOUT, value);,但是实质最大值只能是Integer.MAX_VALUE(2147483647);该属性实质在fwk中是Integer保存,获取方式mScreenOffTimeoutSetting = Settings.System.getIntForUser(resolver, Settings.System.SCREEN_OFF_TIMEOUT, DEFAULT_SCREEN_OFF_TIMEOUT, UserHandle.USER_CURRENT);
在这里插入图片描述

frameworks/base/packages/SettingsProvider/src/android/provider/settings/validators/SettingsValidators.javaNON_NEGATIVE_INTEGER_VALIDATOR 检查非法值
在这里插入图片描述

    private Long getMaxScreenTimeout(Context context) {
        if (context == null) {
            return Long.MAX_VALUE;
        }
        final DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class);
        if (dpm == null) {
            return Long.MAX_VALUE;
        }
        mAdmin = RestrictedLockUtilsInternal.checkIfMaximumTimeToLockIsSet(context);
        if (mAdmin != null) {
            return dpm.getMaximumTimeToLock(null /* admin */, UserHandle.myUserId());
        }
        return Long.MAX_VALUE;
    }

    private String getCurrentSystemScreenTimeout(Context context) {
        if (context == null) {
            return Long.toString(FALLBACK_SCREEN_TIMEOUT_VALUE);
        } else {
            return Long.toString(Settings.System.getLong(context.getContentResolver(),
                    SCREEN_OFF_TIMEOUT, FALLBACK_SCREEN_TIMEOUT_VALUE));
        }
    }

    private void setCurrentSystemScreenTimeout(Context context, String key) {
        try {
            if (context != null) {
                final long value = Long.parseLong(key);
                mMetricsFeatureProvider.action(context, SettingsEnums.ACTION_SCREEN_TIMEOUT_CHANGED,
                        (int) value);
                Settings.System.putLong(context.getContentResolver(), SCREEN_OFF_TIMEOUT, value);
            }
        } catch (NumberFormatException e) {
            Log.e(TAG, "could not persist screen timeout setting", e);
        }
    }

2、超时灭屏

2.1 锁定屏幕的超时

更新延时 mLockScreenTimeout 执行 mScreenLockTimeout

frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java

mLockScreenTimeout = Settings.System.getIntForUser(resolver,Settings.System.SCREEN_OFF_TIMEOUT, 0, UserHandle.USER_CURRENT);
mHandler.postDelayed(mScreenLockTimeout, mLockScreenTimeout);

    class ScreenLockTimeout implements Runnable {
        Bundle options;

        @Override
        public void run() {
            synchronized (this) {
                if (localLOGV) Log.v(TAG, "mScreenLockTimeout activating keyguard");
                if (mKeyguardDelegate != null) {
                    mKeyguardDelegate.doKeyguardTimeout(options);
                }
                mLockScreenTimerActive = false;
                mLockNowPending = false;
                options = null;
            }
        }

        public void setLockOptions(Bundle options) {
            this.options = options;
        }
    }

2.2 屏幕灭屏的超时

updateUserActivitySummaryLocked更新mUserActivitySummary的值,用户活动超时时调用updateUserActivitySummaryLocked,这里获取getScreenOffTimeoutLocked状态更新

frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java

mScreenOffTimeoutSetting = Settings.System.getIntForUser(resolver, Settings.System.SCREEN_OFF_TIMEOUT, DEFAULT_SCREEN_OFF_TIMEOUT, UserHandle.USER_CURRENT);

    @GuardedBy("mLock")
    private long getScreenOffTimeoutLocked(long sleepTimeout, long attentiveTimeout) {
        long timeout = mScreenOffTimeoutSetting;
        if (isMaximumScreenOffTimeoutFromDeviceAdminEnforcedLocked()) {
            timeout = Math.min(timeout, mMaximumScreenOffTimeoutFromDeviceAdmin);
        }
        if (mUserActivityTimeoutOverrideFromWindowManager >= 0) {
            timeout = Math.min(timeout, mUserActivityTimeoutOverrideFromWindowManager);
        }
        if (sleepTimeout >= 0) {
            timeout = Math.min(timeout, sleepTimeout);
        }
        if (attentiveTimeout >= 0) {
            timeout = Math.min(timeout, attentiveTimeout);
        }
        return Math.max(timeout, mMinimumScreenOffTimeoutConfig);
    }

    private void handleUserActivityTimeout() { // runs on handler thread
        synchronized (mLock) {
            if (DEBUG_SPEW) {
                Slog.d(TAG, "handleUserActivityTimeout");
            }

            mDirty |= DIRTY_USER_ACTIVITY;
            updatePowerStateLocked();
        }
    }

    /**
     * Updates the value of mUserActivitySummary to summarize the user requested
     * state of the system such as whether the screen should be bright or dim.
     * Note that user activity is ignored when the system is asleep.
     *
     * This function must have no other side-effects.
     */
    @GuardedBy("mLock")
    private void updateUserActivitySummaryLocked(long now, int dirty) {
        // Update the status of the user activity timeout timer.
        if ((dirty & (DIRTY_DISPLAY_GROUP_WAKEFULNESS | DIRTY_WAKE_LOCKS | DIRTY_USER_ACTIVITY
                | DIRTY_WAKEFULNESS | DIRTY_SETTINGS | DIRTY_ATTENTIVE)) == 0) {
            return;
        }
        mHandler.removeMessages(MSG_USER_ACTIVITY_TIMEOUT);

        final long attentiveTimeout = getAttentiveTimeoutLocked();
        final long sleepTimeout = getSleepTimeoutLocked(attentiveTimeout);
        long screenOffTimeout = getScreenOffTimeoutLocked(sleepTimeout,
                attentiveTimeout);
        final long screenDimDuration = getScreenDimDurationLocked(screenOffTimeout);
        screenOffTimeout =
                getScreenOffTimeoutWithFaceDownLocked(screenOffTimeout, screenDimDuration);
        final boolean userInactiveOverride = mUserInactiveOverrideFromWindowManager;
        long nextTimeout = -1;
        boolean hasUserActivitySummary = false;
        for (int idx = 0; idx < mPowerGroups.size(); idx++) {
            int groupUserActivitySummary = 0;
            long groupNextTimeout = 0;
            final PowerGroup powerGroup = mPowerGroups.valueAt(idx);
            final int wakefulness = powerGroup.getWakefulnessLocked();
            if (wakefulness != WAKEFULNESS_ASLEEP) {
                final long lastUserActivityTime = powerGroup.getLastUserActivityTimeLocked();
                final long lastUserActivityTimeNoChangeLights =
                        powerGroup.getLastUserActivityTimeNoChangeLightsLocked();
                if (lastUserActivityTime >= powerGroup.getLastWakeTimeLocked()) {
                    groupNextTimeout = lastUserActivityTime + screenOffTimeout - screenDimDuration;
                    if (now < groupNextTimeout) {
                        groupUserActivitySummary = USER_ACTIVITY_SCREEN_BRIGHT;
                    } else {
                        groupNextTimeout = lastUserActivityTime + screenOffTimeout;
                        if (now < groupNextTimeout) {
                            groupUserActivitySummary = USER_ACTIVITY_SCREEN_DIM;
                        }
                    }
                }
                if (groupUserActivitySummary == 0 && lastUserActivityTimeNoChangeLights
                        >= powerGroup.getLastWakeTimeLocked()) {
                    groupNextTimeout = lastUserActivityTimeNoChangeLights + screenOffTimeout;
                    if (now < groupNextTimeout) {
                        if (powerGroup.isPolicyBrightLocked() || powerGroup.isPolicyVrLocked()) {
                            groupUserActivitySummary = USER_ACTIVITY_SCREEN_BRIGHT;
                        } else if (powerGroup.isPolicyDimLocked()) {
                            groupUserActivitySummary = USER_ACTIVITY_SCREEN_DIM;
                        }
                    }
                }

                if (groupUserActivitySummary == 0) {
                    if (sleepTimeout >= 0) {
                        final long anyUserActivity = Math.max(lastUserActivityTime,
                                lastUserActivityTimeNoChangeLights);
                        if (anyUserActivity >= powerGroup.getLastWakeTimeLocked()) {
                            groupNextTimeout = anyUserActivity + sleepTimeout;
                            if (now < groupNextTimeout) {
                                groupUserActivitySummary = USER_ACTIVITY_SCREEN_DREAM;
                            }
                        }
                    } else {
                        groupUserActivitySummary = USER_ACTIVITY_SCREEN_DREAM;
                        groupNextTimeout = -1;
                    }
                }

                if (groupUserActivitySummary != USER_ACTIVITY_SCREEN_DREAM
                        && userInactiveOverride) {
                    if ((groupUserActivitySummary &
                            (USER_ACTIVITY_SCREEN_BRIGHT | USER_ACTIVITY_SCREEN_DIM)) != 0) {
                        // Device is being kept awake by recent user activity
                        if (mOverriddenTimeout == -1) {
                            // Save when the next timeout would have occurred
                            mOverriddenTimeout = groupNextTimeout;
                        }
                    }
                    groupUserActivitySummary = USER_ACTIVITY_SCREEN_DREAM;
                    groupNextTimeout = -1;
                }

                if ((groupUserActivitySummary & USER_ACTIVITY_SCREEN_BRIGHT) != 0
                        && (powerGroup.getWakeLockSummaryLocked()
                        & WAKE_LOCK_STAY_AWAKE) == 0) {
                    groupNextTimeout = mAttentionDetector.updateUserActivity(groupNextTimeout,
                            screenDimDuration);
                }

                if (isAttentiveTimeoutExpired(powerGroup, now)) {
                    groupUserActivitySummary = 0;
                    groupNextTimeout = -1;
                }

                hasUserActivitySummary |= groupUserActivitySummary != 0;

                if (nextTimeout == -1) {
                    nextTimeout = groupNextTimeout;
                } else if (groupNextTimeout != -1) {
                    nextTimeout = Math.min(nextTimeout, groupNextTimeout);
                }
            }

            powerGroup.setUserActivitySummaryLocked(groupUserActivitySummary);

            if (DEBUG_SPEW) {
                Slog.d(TAG, "updateUserActivitySummaryLocked: groupId=" + powerGroup.getGroupId()
                        + ", mWakefulness=" + wakefulnessToString(wakefulness)
                        + ", mUserActivitySummary=0x" + Integer.toHexString(
                        groupUserActivitySummary)
                        + ", nextTimeout=" + TimeUtils.formatUptime(groupNextTimeout));
            }
        }

        final long nextProfileTimeout = getNextProfileTimeoutLocked(now);
        if (nextProfileTimeout > 0) {
            nextTimeout = Math.min(nextTimeout, nextProfileTimeout);
        }

        if (hasUserActivitySummary && nextTimeout >= 0) {
            scheduleUserInactivityTimeout(nextTimeout);
        }
    }

    private void scheduleUserInactivityTimeout(long timeMs) {
        final Message msg = mHandler.obtainMessage(MSG_USER_ACTIVITY_TIMEOUT);
        msg.setAsynchronous(true);
        mHandler.sendMessageAtTime(msg, timeMs);
    }

3、永不休眠

    1. PowerManagerServicePhoneWindowManager 处理
    1. 直接配置 Settings.System.SCREEN_OFF_TIMEOUTInteger.MAX_VALUE2147483647 = 24.855 天 一般没有这么长时间亮屏待机 ),设置更长时间替换 Settings.System.SCREEN_OFF_TIMEOUT属性 VALIDATORS.put(System.SCREEN_OFF_TIMEOUT, NON_NEGATIVE_INTEGER_VALIDATOR)NON_NEGATIVE_INTEGER_VALIDATOR检测为NONE_NEGATIVE_LONG_VALIDATOR

* 关键日志

SettingsActivity:|SubSettings: Launching fragment|start u|ScreenTimeout:|sysui_multi_action: \[757,1754|screen_toggled:|sysui_multi_action:.*screen_timeout|power_screen_state:|PowerManagerService: Waking up|PowerManagerService: Going to sleep

sysui_multi_action: [757,1754,758,4,759,15000]
sysui_multi_action: [757,1754,758,4,759,30000]
sysui_multi_action: [757,1754,758,4,759,60000]
sysui_multi_action: [757,1754,758,4,759,120000]
sysui_multi_action: [757,1754,758,4,759,300000]
sysui_multi_action: [757,1754,758,4,759,600000]
sysui_multi_action: [757,1754,758,4,759,1800000]

12-17 07:13:37.536   645   678 I ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000100 cmp=com.google.android.apps.nexuslauncher/.NexusLauncherActivity (has extras)} from uid 0
12-17 07:13:40.128   645  2427 I ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.settings/.Settings bnds=[581,351][858,771]} from uid 10149
12-17 07:13:46.309   645  2510 I ActivityTaskManager: START u0 {act=android.intent.action.MAIN cmp=com.android.settings/.SubSettings (has extras)} from uid 1000
12-17 07:13:46.408  7976  7976 D SettingsActivity: Switching to fragment com.android.settings.DisplaySettings
12-17 07:13:46.409  7976  7976 D SubSettings: Launching fragment com.android.settings.DisplaySettings
12-17 07:13:48.942  7976  7976 I sysui_multi_action: [757,830,758,4,833,0,854,screen_timeout,1089,0]
12-17 07:13:48.948   645  1716 I ActivityTaskManager: START u0 {act=android.intent.action.MAIN cmp=com.android.settings/.SubSettings (has extras)} from uid 1000
12-17 07:13:49.036  7976  7976 D SettingsActivity: Switching to fragment com.android.settings.display.ScreenTimeoutSettings
12-17 07:13:49.037  7976  7976 D SubSettings: Launching fragment com.android.settings.display.ScreenTimeoutSettings
12-17 07:13:50.690  7976  7976 I sysui_multi_action: [757,1754,758,4,759,15000]
12-17 07:13:52.884  7976  7976 I sysui_multi_action: [757,1754,758,4,759,30000]
12-17 07:13:54.152  7976  7976 I sysui_multi_action: [757,1754,758,4,759,60000]
12-17 07:13:55.559  7976  7976 I sysui_multi_action: [757,1754,758,4,759,120000]
12-17 07:13:57.041  7976  7976 I sysui_multi_action: [757,1754,758,4,759,300000]
12-17 07:13:58.400  7976  7976 I sysui_multi_action: [757,1754,758,4,759,600000]
12-17 07:13:59.653  7976  7976 I sysui_multi_action: [757,1754,758,4,759,1800000]
12-17 07:14:01.446  7976  7976 I sysui_multi_action: [757,1754,758,4,759,15000]
12-17 07:14:16.400   645   708 I PowerManagerService: Going to sleep due to timeout (uid 1000)...
12-17 07:14:17.032   645   645 I power_screen_state: [0,3,0,0,628]
12-17 07:14:17.032   645   645 I screen_toggled: 0
12-17 07:14:17.032   645   645 I sysui_multi_action: [757,804,799,screen_timeout,801,15,802,1]
12-17 07:14:28.765   645   793 I PowerManagerService: Waking up from Asleep (uid=1000, reason=WAKE_REASON_POWER_BUTTON, details=android.policy:POWER)...
12-17 07:14:28.770   645   645 I screen_toggled: 1
12-17 07:14:28.905   645   645 I power_screen_state: [1,0,0,0,110]

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

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

相关文章

(已解决)如何使用matplotlib绘制小提琴图

网上很多人使用seaborn绘制小提琴图&#xff0c;本人暂时不想学新的东西&#xff0c;就是懒。本文介绍如何使用matplotlib绘制小提琴图&#xff0c;很多其他博客只是使用最简单的语法&#xff0c;默认小提琴颜色会是蓝色&#xff0c;根本改不了。本文使用了一点高级的用法&…

深度学习环境配置超详细教程【Anaconda+Pycharm+PyTorch(GPU版)+CUDA+cuDNN】

在宇宙的浩瀚中&#xff0c;我们是微不足道的&#xff0c;但我们的思维却可以触及无尽的边界。 目录 关于Anaconda&#xff1a; 关于Pycharm&#xff1a; 关于Pytorch&#xff1a; 关于CUDA&#xff1a; 关于Cudnn&#xff1a; 一、&#x1f30e;前言&#xff1a; 二、&…

如何用 Cargo 管理 Rust 工程系列 戊

以下内容为本人的学习笔记&#xff0c;如需要转载&#xff0c;请声明原文链接 微信公众号「ENG八戒」https://mp.weixin.qq.com/s/-OiWtUCUc3FmKIGMBEYfHQ 单元和集成测试 Rust 为单元测试提供了非常好的原生支持。 创建库工程时&#xff0c;cargo 生成的源码文件 lib.rs 自带…

32、应急响应——linux

文章目录 一、linux进程排查二、linux文件排查三、linux用户排查四、linux持久化排查4.1 历史命令4.2 定时任务排查4.3 开机启动项排查 五、linux日志分析六、工具应用 一、linux进程排查 查看资源占用&#xff1a;top查看所有进程&#xff1a;ps -ef根据进程PID查看进程详细信…

不做数据采集,不碰行业应用,专注数字孪生PaaS平台,飞渡科技三轮融资成功秘诀

12月15日&#xff0c;飞渡科技在北京举行2023年度投资人媒体见面会&#xff0c;全面分享其产品技术理念与融资之路。北京大兴经开区党委书记、管委会主任常学智、大兴经开区副总经理梁萌、北京和聚百川投资管理有限公司&#xff08;以下简称“和聚百川”&#xff09;投资总监严…

头部游戏厂商鸿蒙合作,开发岗又‘缺人‘

12月18日&#xff0c;米哈游宣布将基于HarmonyOS NEXT启动鸿蒙原生应用开发&#xff0c;成为又一家启动鸿蒙原生应用开发的头部游戏厂商。 作为一家创立于2011年的科技型文创企业&#xff0c;上海米哈游网络科技股份有限公司推出了众多高品质人气产品&#xff0c;其中包括《崩坏…

Meta与Ray-Ban合作推出了一款全新智能眼镜外观时尚,而且搭载了能够“看到“你所看到的一切的人工智能技术

每周跟踪AI热点新闻动向和震撼发展 想要探索生成式人工智能的前沿进展吗&#xff1f;订阅我们的简报&#xff0c;深入解析最新的技术突破、实际应用案例和未来的趋势。与全球数同行一同&#xff0c;从行业内部的深度分析和实用指南中受益。不要错过这个机会&#xff0c;成为AI领…

adb详细教程(五)-复制文件、截屏、录屏

adb对于安卓移动端来说&#xff0c;是个非常重要的调试工具。在进行安卓端的开发或测试过程中&#xff0c;有时需要了截屏或录屏&#xff0c;在设备上操作完成后再将文件导入电脑非常繁琐。​如果使用adb指令在进行截屏或录屏则会便捷许多。此篇文章介绍了如何使用adb指令进行文…

LLMs 玩狼人杀:清华大学验证大模型参与复杂交流博弈游戏的能力

作者&#xff1a;彬彬 编辑&#xff1a;李宝珠&#xff0c;三羊 清华大学研究团队提出了一种用于交流游戏的框架&#xff0c;展示了大语言模型从经验中学习的能力&#xff0c;还发现大语言模型具有非预编程的策略行为&#xff0c;如信任、对抗、伪装和领导力。 近年来&#x…

React系列:配置@别名路径并配置联想

&#x1f341; 作者&#xff1a;知识浅谈&#xff0c;CSDN签约讲师&#xff0c;CSDN博客专家&#xff0c;华为云云享专家&#xff0c;阿里云专家博主 &#x1f4cc; 擅长领域&#xff1a;全栈工程师、爬虫、ACM算法 &#x1f492; 公众号&#xff1a;知识浅谈 &#x1f525;网站…

【NI-RIO入门】扫描模式

于NI KB摘录 所有CompactRIO设备都可以访问CompactRIO扫描引擎和LabVIEW FPGA。 CompactRIO 904x 系列是第一个引入 DAQmx 功能的产品线。 扫描引擎&#xff08;IO 变量&#xff09; – 主要为迁移和初始开发而设计。控制循环频率高达 1 kHz1&#xff0c;性能控制器上的频率更…

mysql使用全文索引+ngram全文解析器进行全文检索

表结构&#xff1a;表名 gamedb 主键 id 问题类型 type 问题 issue 答案 answer 需求 现在有个游戏资料库储存在mysql中&#xff0c;客户端进行搜索&#xff0c;需要对三个字段进行匹配&#xff0c;得到三个字段的相关性&#xff0c;选出三个字段中相关性最大的值进…

干货,教你服务号改为订阅号

服务号和订阅号有什么区别&#xff1f;服务号转为订阅号有哪些作用&#xff1f;我们都知道&#xff0c;服务号一个月只能发4次文章&#xff0c;但是订阅号每天都能发文章。不过在接收消息这一方面&#xff0c;服务号群发的消息有消息提醒&#xff0c;并显示在对话框&#xff1b…

客观题测试-第7章查找

第1关&#xff1a;查找客观题测试&#xff08;一&#xff09; 1、关键字可以唯一地标识一个数据元素。 A、对 B、错 2、二叉排序树是一个动态查找表。 A、对 B、错 3、如果顺序表中各元素的查找概率相同&#xff0c;在顺序查找时&#xff0c;查找不成功的平均查找长度因…

回归预测 | MATLAB实现SABO-LSTM基于减法平均优化器优化长短期记忆神经网络的多输入单输出数据回归预测模型 (多指标,多图)

回归预测 | MATLAB实现SABO-LSTM基于减法平均优化器优化长短期记忆神经网络的多输入单输出数据回归预测模型 &#xff08;多指标&#xff0c;多图&#xff09; 目录 回归预测 | MATLAB实现SABO-LSTM基于减法平均优化器优化长短期记忆神经网络的多输入单输出数据回归预测模型 &a…

Linux线程——常用API

线程创建 函数原型及头文件 #include <pthread.h> int pthread_create(pthread_t *restrict tidp, const pthread_attr_t *restrict attr, void *(*start_rtn)(void *), void *restrict arg);参数解读 tidp当pthread_create成功返回时&#xff0c;由tidp指向的内存单元…

通过基准配置文件(Baseline Profiles)提升你的Android应用性能

通过基准配置文件提升你的Android应用性能 应用程序性能与用户体验直接相关&#xff0c;具有至关重要的意义。在开发者社区中&#xff0c;存在许多方法来提高应用程序性能。在本文中&#xff0c;您将通过利用基准配置文件&#xff08;Baseline Profile&#xff09;深入了解其中…

采购oled屏幕,应注意什么

在采购OLED屏幕时&#xff0c;应注意以下几点&#xff1a; 规格和参数&#xff1a;了解OLED屏幕的规格和参数&#xff0c;包括尺寸、分辨率、亮度、对比度、响应时间等。确保所采购的屏幕符合项目的需求和预期效果。 品质和可靠性&#xff1a;选择具有可靠品质和稳定性的OLED屏…

Spirng02

一、Spring中Bean的生命周期 当我们启动Spring项目的时候,就会初始化Spring的容器,Spring就会扫描启动引导类所在包及其子包中类的注解,并调用这些加了注解的类的构造方法创建对象(控制翻转),再创建了这些类的对象之后,就会找使用了Autowired注解的地方进行赋值(依赖注入)。随后…

如何访问AWS私有网络中的RDS (Mysql)

文章目录 小结问题及解决连接问题如何使用本地的Mysql Workbench对RDS进行访问 参考 小结 在AWS私有网络中部署了RDS (Mysql), 尝试通过外网成功地进行了访问. 问题及解决 连接问题 在AWS私有网络中部署了RDS (Mysql), 进行外网进行访问碰到了各种问题. 以下连接超时&…