屏幕超时休眠-Android13

屏幕超时休眠-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]

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

八.创建和管理表

目录 1. 基础知识1.1 一条数据存储的过程1.2 标识符命名规则1.3 MySQL中的数据类型 2. 创建和管理数据库2.2 使用数据库2.3 修改数据库 3. 创建表3.1 创建方式13.2 创建方式23.4 查看数据表结构 4. 修改表4.1 追加一个列4.2 修改一个列4.3 重命名一个列4.4 删除一个列 5. 重命名…

【Docker五】使用Harbor搭建Docker私有仓库

目录 一、harbor概述 1、harbor概念&#xff1a; 2、harbor的特性 3、harbor的组件&#xff1a; 二、harbor实验&#xff1a; 1、搭建harbor 2、远程主机使用docker-harbor&#xff1a; 3、镜像同步&#xff1a; 一、harbor概述 1、harbor概念&#xff1a; harbor&…

计网01 计算机网络基础

一、计算机网络基本概念 1、什么是计算机网络 网络&#xff1a;由两台或多台计算机通过网络设备串联&#xff08;网络设备通过传输介质串联&#xff09;而形成的网络网络设备&#xff1a;计算机、路由交换、防火墙、上网行为管理等传输介质&#xff1a;双绞线&#xff08;网线…

Eclipse 一直提示 loading descriptor for 的解决方法

启动eclipse之后&#xff0c;进行相关操作时&#xff0c;弹出界面&#xff0c;提示&#xff1a;loading descriptor for xxx 解决方法&#xff1a; 在Eclipse左侧的Project Explorer 最右上角有一个小钮,鼠标移上去时提示"View Menu". 你点一下,在弹出的上下文菜单中…

JAVA主流日志框架梳理学习及使用

前言&#xff1a;目前市面上有挺多JAVA的日志框架&#xff0c;比如JUL(JDK自带的日志框架),Log4j,Logback,Log4j2等&#xff0c;有人可能有疑问说还有slf4j&#xff0c;不过slf4j不是一种日志框架的具体实现&#xff0c;而是一种日志门面&#xff08;日志门面可以理解为是一种统…

Java基于SpringBoot的二次元商城网站系统

简介 二次元商城网站的使用是更为便捷的&#xff0c;互联网的普及在这个社会是非常成功的&#xff0c;小到个人的交际交流&#xff0c;大到公司企业员工的交流&#xff0c;都已经离不开科技&#xff0c;所以&#xff0c;在这么成熟的平台上&#xff0c;各种类型的网站也就应运…

【数据结构复习之路】图(严蔚敏版)两万余字超详细讲解

专栏&#xff1a;数据结构复习之路 复习完上面四章【线性表】【栈和队列】【串】【数组和广义表】【树和二叉树】&#xff0c;我们接着复习 图&#xff0c;这篇文章我写的非常详细且通俗易懂&#xff0c;看完保证会带给你不一样的收获。如果对你有帮助&#xff0c;看在我这么辛…

计网02-计算机网络参考模型

一、OSI七层参考模型 1、分层的思想 分层模型用于网络协议的设计方法&#xff0c;本质是将网络节点间复杂的通信问题分成若干简单的问题逐一解决&#xff0c;通过网络的层次去找问题&#xff0c;将复杂问题简单化。 2、OSI参考模型 由于早期计算机厂商使用的是私有的网络模…

51单片机(STC8) -- 开发环境搭建(Keil C51)

文章目录 STC8H3K系列芯片概述STC8H3K系列芯片选型Keil C51简介Keil C51安装添加C51芯片包工程创建与编译工程烧录 STC8H3K系列芯片概述 文章中所用的芯片选型为STC8H3K64S4&#xff0c;后续STC8案例均以该芯片展开 内核 • 超高速 8051 内核&#xff08;1T&#xff09;&…

SearchWP WordPress高级网站内容搜索插件(包含所有专业扩展)

点击阅读SearchWP WordPress高级网站内容搜索插件(包含所有专业扩展)原文 SearchWP WordPress高级网站内容搜索插件是一个非常强大的工具&#xff0c;可以显着增强您网站的搜索功能。通过向网站访问者提供高度相关和精确的搜索结果&#xff0c;它可以有效地简化他们的搜索过程…

IP地址与实时位置之间的关系

在互联网的普及和信息技术的快速发展中&#xff0c;IP地址作为一种标识符&#xff0c;已经深入到我们的日常生活和工作中。然而&#xff0c;对于IP地址与实时位置的关系&#xff0c;许多人存在误解。本文将对此进行澄清&#xff0c;阐述IP地址与实时位置之间的关系。 首先&…

ORA-00257: 归档程序错误在释放之前仅限于内部连接

Oracle在windows服务器下异常断电或者长时间运行情况下&#xff0c;容易发生ORA-00257: 归档程序错误 “ORA-00257: 归档程序错误。在释放之前仅限于内部连接”错误由于由于归档日志占满了空间&#xff0c;此空间大小限制由参数&#xff1a;db_recovery_file_dest_size来指定…

双指针算法(二)

三数之和 三数之和 给你一个整数数组 nums &#xff0c;判断是否存在三元组 [nums[i], nums[j], nums[k]] 满足 i ! j、i ! k 且 j ! k &#xff0c;同时还满足 nums[i] nums[j] nums[k] 0 。请 你返回所有和为 0 且不重复的三元组。 注意&#xff1a;答案中不可以包含重…

【gojs】Invalid div id; div already has a Diagram associated with it

刷新gojs&#xff0c;控制台报错 <div id"myDiagramDiv"></div>import go from "gojs"; data() {return {myDiagram: null,} }, mounted() {this.drawTopo(); }, method() {drawTopo() {const $ go.GraphObject.make;this.myDiagram $(go.Di…

【C++】POCO学习总结(十九):哈希、URL、UUID、配置文件、日志配置、动态库加载

【C】郭老二博文之&#xff1a;C目录 1、哈希 1.1 说明 std::map和std::set 的性能是&#xff1a;O(log n) POCO哈希的性能比STL容器更好&#xff0c;大约快两&#xff1b; POCO中对应std::map的是&#xff1a;Poco::HashMap&#xff1b; POCO中对应std::set的是 Poco::Hash…

推荐几款值得收藏的3DMAX插件

推荐几款值得收藏的3DMAX插件 StairGenerator StairGenerator一键楼梯插件&#xff0c;不需要花费太多的时间&#xff0c;轻松从2D平面图生成3D楼梯模型&#xff0c;生成的楼梯模型细节丰富真实。 【主要功能】 1.简单&#xff1a;轻松实现2D到3D建模。 2.具有最详细三维结…

接口优化的常见方案实战经验

一、背景 针对老项目&#xff0c;去年做了许多降本增效的事情&#xff0c;其中发现最多的就是接口耗时过长的问题&#xff0c;就集中搞了一次接口性能优化。本文将给小伙伴们分享一下接口优化的通用方案。 二、接口优化方案总结 1.批处理 批量思想&#xff1a;批量操作数据库…

css3实现动态心电图折线

css3实现动态心电图折线 M&#xff08;moveto&#xff09;&#xff1a;需要两个参数&#xff08;x轴和y轴坐标&#xff0c;移动到的点的x轴和y轴的坐标L&#xff08;lineto&#xff09;&#xff1a;需要两个参数&#xff08;x轴和y轴坐标&#xff09;&#xff0c;它会在当前位置…

Windows使用VNC Viewer远程桌面Ubuntu【内网穿透】

文章目录 前言1. ubuntu安装VNC2. 设置vnc开机启动3. windows 安装VNC viewer连接工具4. 内网穿透4.1 安装cpolar【支持使用一键脚本命令安装】4.2 创建隧道映射4.3 测试公网远程访问 5. 配置固定TCP地址5.1 保留一个固定的公网TCP端口地址5.2 配置固定公网TCP端口地址5.3 测试…

LSTM ——作业

习题6-4 推导LSTM网络中参数的梯度&#xff0c; 并分析其避免梯度消失的效果 习题6-3P 编程实现下图LSTM运行过程 1. 使用Numpy实现LSTM算子 import numpy as np # 创建一个numpy数组x&#xff0c;它是一个4x4的矩阵&#xff0c;包含9个元素 x np.array([[1, 0, 0, 1],[3, …