JobSchedulerService.setRequiresCharging需充电且电量大于90%才触发的现象

一、摘要

从源码看原生JobSchedulerService.setRequiresCharging 的特性,该特性竞品机器华为、Oppo也是如此。

1、应用处于前台可见,满足充电条件,立刻触发

2、应用处于后台不可见,需要设备连接USB或AC且电量大于90%,才能触发

job与充电相关的2个条件

final boolean powerConnected = mPowerTracker.isPowerConnected(); 设备连接USB或AC且Top应用且job优先级>=JobInfo.PRIORITY_DEFAULT)final boolean stablePower = mService.isBatteryCharging() && mService.isBatteryNotLow(); 设备连接USB或AC且电量大于90%

job与电量相关的3个条件:

final boolean powerConnected = mPowerTracker.isPowerConnected();final boolean stablePower = mService.isBatteryCharging() && mService.isBatteryNotLow(); 充电且电量大于90%final boolean batteryNotLow = mService.isBatteryNotLow(); 电量大于15%

二、引子

视频预下载服务,需要充电电量到90%才触发,条件太苛刻,建议优化或去掉

0

2.1 日志分析

0

2.2 原始日志

行    2: 04-16 00:59:57.350  1979  2056 D PowerManagerService: updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, oldBatteryLevel=65, mBatteryLevel=65, isOverheat=false行  260: 04-16 01:00:00.123  1979  7768 D JobScheduler: SCHEDULE: 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService行  261: 04-16 01:00:00.123  1979  7768 D JobStore: Added job status to store: JobStatus{7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService u=0 s=1000 NET CHARGING BATNOTLOW STORENOTLOW WAIT:DEV_NOT_DOZING satisfied:0x0 unsatisfied:0x1b40000b}行  262: 04-16 01:00:00.123  1979  7768 V JobScheduler.SC: wouldBeReadyWithConstraintLocked: 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService constraint=268435456 readyWithConstraint=false行  264: 04-16 01:00:00.123  1979  7768 V JobScheduler.JobStatus: Constraint 268435456 is satisfied for 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService行  265: 04-16 01:00:00.124  1979  7768 I JobScheduler.Connectivity: Connectivity CHANGED for JobStatus{7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService u=0 s=1000 NET CHARGING BATNOTLOW STORENOTLOW WAIT:DEV_NOT_DOZING satisfied:0x10000000 unsatisfied:0xb40000b}: usable=true satisfied=true行  266: 04-16 01:00:00.124  1979  7768 V JobScheduler.JobStatus: Constraint 2[CONSTRAINT_BATTERY_NOT_LOW] is satisfied for 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService行  267: 04-16 01:00:00.124  1979  7768 V JobScheduler.JobStatus: Constraint 8[CONSTRAINT_STORAGE_NOT_LOW] is satisfied for 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService行  268: 04-16 01:00:00.124  1979  7768 V JobScheduler.JobStatus: Constraint 4194304[CONSTRAINT_BACKGROUND_NOT_RESTRICTED] is satisfied for 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService行  269: 04-16 01:00:00.124  1979  7768 V JobScheduler.JobStatus: Constraint 33554432[CONSTRAINT_DEVICE_NOT_DOZING] is satisfied for 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService行  270: 04-16 01:00:00.124  1979  7768 V JobScheduler.JobStatus: Constraint 16777216[CONSTRAINT_WITHIN_QUOTA] is satisfied for 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService行  271: 04-16 01:00:00.124  1979  7768 V JobScheduler.JobStatus: Constraint 134217728[CONSTRAINT_TARE_WEALTH] is satisfied for 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService行  272: 04-16 01:00:00.124  1979  7768 V JobScheduler.SC: wouldBeReadyWithConstraintLocked: 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService constraint=268435456 readyWithConstraint=false行  273: 04-16 01:00:00.124  1979  7768 I JobScheduler.Connectivity: evaluateStateLocked finds job JobStatus{7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService u=0 s=1000 NET CHARGING BATNOTLOW STORENOTLOW satisfied:0x1b40000a unsatisfied:0x1} would not be ready.行  274: 04-16 01:00:00.124  1979  7768 V JobScheduler: isReadyToBeExecutedLocked: 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService ready=false行  685: 04-16 01:00:07.374  1979  2056 D PowerManagerService: updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, oldBatteryLevel=65, mBatteryLevel=65, isOverheat=false行  723: 04-16 01:00:17.430  1979  2056 D PowerManagerService: updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, oldBatteryLevel=65, mBatteryLevel=65, isOverheat=false行  746: 04-16 01:00:27.507  1979  2056 D PowerManagerService: updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, oldBatteryLevel=65, mBatteryLevel=66, isOverheat=false行  841: 04-16 01:00:37.508  1979  2056 D PowerManagerService: updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, oldBatteryLevel=66, mBatteryLevel=66, isOverheat=false行  853: 04-16 01:00:42.275  1979  2056 D PowerManagerService: updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, oldBatteryLevel=66, mBatteryLevel=66, isOverheat=false行  898: 04-16 01:00:47.557  1979  2056 D PowerManagerService: updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, oldBatteryLevel=66, mBatteryLevel=66, isOverheat=false行  916: 04-16 01:00:57.594  1979  2056 D PowerManagerService: updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, oldBatteryLevel=66, mBatteryLevel=66, isOverheat=false行  928: 04-16 01:01:07.644  1979  2056 D PowerManagerService: updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, oldBatteryLevel=66, mBatteryLevel=66, isOverheat=false行  970: 04-16 01:01:17.644  1979  2056 D PowerManagerService: updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, oldBatteryLevel=66, mBatteryLevel=66, isOverheat=false行 1039: 04-16 01:01:27.690  1979  2056 D PowerManagerService: updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, oldBatteryLevel=66, mBatteryLevel=66, isOverheat=false行 1057: 04-16 01:01:37.711  1979  2056 D PowerManagerService: updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, oldBatteryLevel=66, mBatteryLevel=66, isOverheat=false行 1077: 04-16 01:01:42.258  1979  2056 D PowerManagerService: updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, oldBatteryLevel=66, mBatteryLevel=66, isOverheat=false行 1084: 04-16 01:01:47.757  1979  2056 D PowerManagerService: updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, oldBatteryLevel=66, mBatteryLevel=66, isOverheat=false行 1134: 04-16 01:01:57.819  1979  2056 D PowerManagerService: updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, oldBatteryLevel=66, mBatteryLevel=66, isOverheat=false行 1146: 04-16 01:02:07.820  1979  2056 D PowerManagerService: updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, oldBatteryLevel=66, mBatteryLevel=66, isOverheat=false行 1172: 04-16 01:02:17.878  1979  2056 D PowerManagerService: updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, oldBatteryLevel=66, mBatteryLevel=66, isOverheat=false行 1183: 04-16 01:02:21.282  1979  2056 D PowerManagerService: updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, oldBatteryLevel=66, mBatteryLevel=80, isOverheat=false行 1237: 04-16 01:02:29.594  1979  2056 D PowerManagerService: updateIsPoweredLocked: wasPowered=true, mIsPowered=true, oldPlugType=2, mPlugType=2, oldBatteryLevel=80, mBatteryLevel=90, isOverheat=false行 1307: 04-16 01:02:29.617  1979  4059 V JobScheduler.JobStatus: Constraint 1 is satisfied for 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService行 1361: 04-16 01:02:29.624  1979  4059 I JobScheduler.Connectivity: Connectivity unchanged for JobStatus{7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService u=0 s=1000 NET CHARGING BATNOTLOW STORENOTLOW READY}: usable=true satisfied=true行 1455: 04-16 01:02:29.632  1979  4059 V JobScheduler: isReadyToBeExecutedLocked: 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService ready=true行 1456: 04-16 01:02:29.632  1979  4059 V JobScheduler: isReadyToBeExecutedLocked: 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService exists=true userStarted=true backingUp=false行 1457: 04-16 01:02:29.632  1979  4059 V JobScheduler: isReadyToBeExecutedLocked: 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService pending=false active=false行 1458: 04-16 01:02:29.632  1979  4059 D JobScheduler:     queued 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService行 1568: 04-16 01:02:29.651  1979  4059 D JobScheduler.Concurrency: About to run job on context 24883730, job: JobStatus{7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService u=0 s=1000 NET CHARGING BATNOTLOW STORENOTLOW READY}行 1576: 04-16 01:02:29.652  1979  4059 D JobScheduler.Battery: Prepping for 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService行 1577: 04-16 01:02:29.652  1979  4059 D JobScheduler.Quota: Prepping for 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService行 1578: 04-16 01:02:29.652  1979  4059 V JobScheduler.Quota: Starting to track 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService行 1649: 04-16 01:02:29.664  1979  1979 D JobServiceContext: handleServiceBound for 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService行 1746: 04-16 01:02:29.677  1979 10282 D JobServiceContext: doCallback of : JobStatus{7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService u=0 s=1000 NET CHARGING BATNOTLOW STORENOTLOW READY} v:VERB_STARTING行 4320: 04-16 01:04:13.310  1979  7052 D JobScheduler: CANCEL: 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService行 4321: 04-16 01:04:13.311  1979  7052 V JobScheduler.Quota: Stopping tracking of 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService行 4364: 04-16 01:04:13.329  1979  7052 D JobServiceContext: doCallback of : JobStatus{7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService u=0 s=1000 NET CHARGING BATNOTLOW STORENOTLOW READY} v:VERB_STOPPING行 4365: 04-16 01:04:13.329  1979  7052 D JobServiceContext: Cleaning up 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService reschedule=true reason=null行 4384: 04-16 01:04:13.331  1979  7052 D JobScheduler: Completed JobStatus{7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService u=0 s=1000 NET CHARGING BATNOTLOW STORENOTLOW READY}, reason=0, reschedule=true行 4385: 04-16 01:04:13.331  1979  7052 D JobStore: Couldn't remove job: didn't exist: JobStatus{7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService u=0 s=1000 NET CHARGING BATNOTLOW STORENOTLOW READY}行 4386: 04-16 01:04:13.331  1979  7052 W JobScheduler: Job didn't exist in JobStore: 7ad35a6 #1000/20240110 com.fadi.su/com.fadi.predownload.PreDownloadJobService

三、相关源码

90%相关的逻辑,因为 JobSchedulerService 的充放电是监听 BatteryManager.ACTION_CHARGING和BatteryManager.ACTION_DISCHARGING的广播。

其中BatteryManager.ACTION_CHARGING和90%电量有关

3.1 JobSchedulerService

public class JobSchedulerService extends com.android.server.SystemServiceimplements StateChangedListener, JobCompletedListener {                } else if (BatteryManager.ACTION_CHARGING.equals(action)) {if (DEBUG) {                        Slog.d(TAG, "Battery charging @ " + sElapsedRealtimeClock.millis());                    }if (!mCharging) {                        mCharging = true;                        changed = true;                    }                } else if (BatteryManager.ACTION_DISCHARGING.equals(action)) {if (DEBUG) {                        Slog.d(TAG, "Battery discharging @ " + sElapsedRealtimeClock.millis());                    }if (mCharging) {                        mCharging = false;                        changed = true;                    }                }​

3.2 BatteryController

/master_sm8650/android/qssi/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/controllers/BatteryController.java

203  204          for (int i = mTrackedTasks.size() - 1; i >= 0; i--) {205              final JobStatus ts = mTrackedTasks.valueAt(i);206              if (ts.hasChargingConstraint()) {207                  if (hasTopExemptionLocked(ts)208                          && ts.getEffectivePriority() >= JobInfo.PRIORITY_DEFAULT) {209                      // If the job started while the app was on top or the app is currently on top,210                      // let the job run as long as there's power connected, even if the device isn't211                      // officially charging.212                      // For user requested/initiated jobs, users may be confused when the task stops213                      // running even though the device is plugged in.214                      // Low priority jobs don't need to be exempted.215                      if (ts.setChargingConstraintSatisfied(nowElapsed, powerConnected)) {// top应用满足充电条件,立刻触发216                          mChangedJobs.add(ts);217                      }218                  } else if (ts.setChargingConstraintSatisfied(nowElapsed, stablePower)) { //  后台应用设备连接USB或AC且电量大于90%219                      mChangedJobs.add(ts);220                  }221              }222              if (ts.hasBatteryNotLowConstraint()223                      && ts.setBatteryNotLowConstraintSatisfied(nowElapsed, batteryNotLow)) {224                  mChangedJobs.add(ts);225              }226          }                          ​

3.3 BatteryStatsImpl

14838              } else {14839                  if (level >= 90) {14840                      // If the battery level is at least 90%, always consider the device to be14841                      // charging even if it happens to go down a level.14842                      changed |= setChargingLocked(true);15484  15485      boolean setChargingLocked(boolean charging) {15486          // if the device is no longer charging, remove the callback15487          // if the device is now charging, it means that this is either called15488          // 1. directly when level >= 9015489          // 2. or from within the runnable that we deferred15490          // For 1. if we have an existing callback, remove it, since we will immediately send a15491          // ACTION_CHARGING15492          // For 2. we remove existing callback so we don't send multiple ACTION_CHARGING15493          mHandler.removeCallbacks(mDeferSetCharging);15494          if (mCharging != charging) {15495              mCharging = charging;15496              if (charging) {15497                  mHistoryCur.states2 |= HistoryItem.STATE2_CHARGING_FLAG;15498              } else {15499                  mHistoryCur.states2 &= ~HistoryItem.STATE2_CHARGING_FLAG;15500              }15501              mHandler.sendEmptyMessage(MSG_REPORT_CHARGING);15502              return true;15503          }15504          return false;15505      }435                  case MSG_REPORT_CHARGING:436                      if (cb != null) {437                          final String action;438                          synchronized (BatteryStatsImpl.this) {439                              action = mCharging ? BatteryManager.ACTION_CHARGING440                                      : BatteryManager.ACTION_DISCHARGING;441                          }442                          Intent intent = new Intent(action);443                          intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);444                          cb.batterySendBroadcast(intent);​

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

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

挂个人-CSDN Java优秀内容博主rundreamsFly抄袭

事件起因 今天点开自己的CSDN博客,发现给我推了一篇文章抄袭我自己昨天18点发的文章。 就是这篇,一字不差,博主昵称是:rundreamsFly,账号是rundreams。 抄袭者文章 发布于2024-8-26 19:37:41秒,比我发布…

C的温故而知新:位操作(C Primer Plus第十五章)

第十五章:位操作 这一章的篇幅不是很长,但既然能单独作为一章来讲的话,应该蛮重要的,但是我貌似没有总结出多少需要注意、加强记忆的东西,可见在JAVA的日常开发过程中基本不太遇见有关位操作的内容,所以我…

FSQ26信号分析仪RS FSU26 20HZ-26.5G频谱分析仪

罗德与施瓦茨Rohde & Schwarz FSQ26信号分析仪,20 Hz - 26.5 GHz ​R&S FSQ26 信号分析仪集两种仪器于一身。它提供高达 120 MHz 解调带宽的信号分析,并具有高端频谱分析仪的动态范围。 频率范围:20 Hz 至 26.5 GHz 高端频谱分析仪…

神经网络—卷积层

1.讲解 Conv2d out_channels 参数为2时,会生成两个卷积核,分别与输入进行卷积。得到的两个输出为输出 新生成的卷积核和原来的卷积核不一定相同 in_channels (int) – Number of channels in the input image out_channels (int) – Number of channels…

ARM32开发——(六)GPIO_USART通信原理

1. 串行通信和并行通信 1.1 串行通信 串行通信是一种数据传输的方式,它是指将数据按照一位一位的顺序依次发送和接收,常用于远距离通信、嵌入式系统和低带宽传输场景下。串行通信相对于并行通信而言,只需要传输一条数据线,相对简…

一文了解机器学习顶会ICML 2024的研究热点

对人工智能研究领域前沿方向的跟踪是提高科研能力和制定科研战略的关键。本文通过图文并茂的方式介绍了ICML 2024的研究热点,帮助读者了解和跟踪机器学习和人工智能的前沿研究方向。本推文的作者是许东舟,审校为邱雪和黄星宇。 1 会议介绍 ICML&#x…

运放阻抗和噪声(同相放大器的输入/输出阻抗 + 电压跟随器阻抗 + 噪声 +信噪比)

2024-8-27,星期一,21:03,天气:阴雨,心情:晴。培训终于结束啦,开始轮岗了,看了两天PPT,加油加油,继续学习。 今天继续学习第六章运算放大器,主要学…

一文带你从零到实战,学会gcc和Makefile,多文件编译神器的使用与编写

目录: 目录: 一、什么是Makefile 1.1 makefile的作用: 1.2 makefile的基本组成: 二、Linux编译过程: 2.1 linux编译过程: 2.1.1 预处理(Preprocessing) 2.1.2 编译(Compilation&am…

Android Studio 自定义字体大小

常用编程软件自定义字体大全首页 文章目录 前言具体操作1. 打开设置对话框2. 选择外观字体 前言 Android Studio 自定义字体大小,统一设置为 JetBrains Mono ,大小为 14 具体操作 【File】>【Settings...】>【Appearance & Behavior】>【…

二、设置地图配置表

一、导入一个背景图 由于背景图比较大,需要缩小至0.73 二、写配置文件(SO) 使用List需要一个命名空间 写一个类,声明房间的出现数量和种类;将它实例化出来 三、枚举变量的多选 在枚举变量中标记命名空间&#xff…

docker 多线成服务,比如gunicorn服务启动报错解决办法

docker执行的时候报错,排查是线程创建权限不足导致的,报错如下。 解决办法 docker run -e OPENBLAS_NUM_THREADS1 your_image

Unity XR Interaction Toolkit 踩坑记录

1:按下 grap/select 键 物品直接飞到手上 2 按下 grap/select 键 物品一点点的想自己移动

OpenCV杂项图像变换(2)线性混合函数blendLinear()的使用

操作系统:ubuntu22.04 OpenCV版本:OpenCV4.9 IDE:Visual Studio Code 编程语言:C11 算法描述 执行两个图像的线性混合: dst ( i , j ) weights1 ( i , j ) ∗ src1 ( i , j ) weights2 ( i , j ) ∗ src2 ( i , j ) \texttt{…

关于多线程你了解多少?

或许是执念太重,又或许是性格缺陷,我对java中一些知识的坚持,已经到了让人无法接受的地步。有些人甚至因此在背后骂我神经病、傻瓜。但我依旧我行我素,即使中间懈怠了很长时间,重新开始时我依旧会以这些知识为起点。不…

Ubuntu上搭建Nginx环境

1. 软件包下载 nginx下载地址 下载linux版本的nginx,如图圈示 2. 将下载好的软件包上传至Linux服务器 假设上传到 /opt/nginx 目录,进入目录 cd /opt/nginx解压,根据版本自行修改版本号 tar zxvf nginx-1.16.0.tar.gz3.安装 安装编译所需的依赖&a…

前端算法 === 力扣 111 二叉树的最小深度

目录 问题描述 DFS(深度优先搜索)方案 BFS(广度优先搜索)方案 总结 力扣(LeetCode)上的题目111是关于二叉树的最小深度问题。这个问题可以通过深度优先搜索(DFS)和广度优先搜索&…

QJson的写入和解析基本操作

一、QJson简介 QJson 是一个用于处理 JSON(JavaScript Object Notation)数据的 C 库 JSON(JavaScript Object Notation)是一种轻量级的数据交换格式 JSON 的语法简洁明了,使用人类可读的文本格式来表示数据 它由键值…

分块矩阵的转置

证明 则 证明:令,有,对它做一个分块使得和后面的分块矩阵中的是同型矩阵,要证明(任意的),需要证明1)是一个的矩阵 2)任意的 首先证明1)我们先定义两个函…

Getting RateLimitError while implementing openai GPT with Python

题意:“在使用 Python 实现 OpenAI GPT 时遇到 RateLimitError 错误。” 问题背景: I have started to implement openai gpt model in python. I have to send a single request in which I am getting RateLimitError. “我开始在 Python 中实现 Ope…

SSH弱口令爆破服务器

一、实验背景 1、概述 使用kali的hydra进行ssh弱口令爆破,获得服务器的用户名和口令,通过 ssh远程登录服务器。 2、实验环境 kali攻击机:192.168.1.107 centos服务器:192.168.1.105 二、前置知识 1、centos设置用户并设置弱…