Android sensor列表和访问记录

命令:
dumpsys sensorservice

1.dumpsys sensorservice查看最近申请记录

dumpsys sensorservice命令输出Previous Registrations.

Previous Registrations:
23:07:43 + 0x00000008 pid=16587 uid=10397 package=com.start.testdemo.ui.udfp.fql.XsqFQLActivity samplingPeriod=66667us batchingPeriod=0us
23:07:41 - 0x00000008 pid=16587 uid=10397 package=com.start.testdemo.ui.udfp.fql.XsqFQLActivity
23:07:01 + 0x00000008 pid=16587 uid=10397 package=com.start.testdemo.ui.udfp.fql.XsqFQLActivity samplingPeriod=66667us batchingPeriod=0us
23:06:48 - 0x00000008 pid=16587 uid=10397 package=com.start.testdemo.ui.udfp.fql.XsqFQLActivity
23:06:47 + 0x00000008 pid=16587 uid=10397 package=com.start.testdemo.ui.udfp.fql.XsqFQLActivity samplingPeriod=66667us batchingPeriod=0us
23:06:15 - 0x00000008 pid=16587 uid=10397 package=com.start.testdemo.ui.udfp.fql.XsqFQLActivity
23:06:13 + 0x00000008 pid=16587 uid=10397 package=com.start.testdemo.ui.udfp.fql.XsqFQLActivity samplingPeriod=66667us batchingPeriod=0us
23:06:11 - 0x00000008 pid=16587 uid=10397 package=com.start.testdemo.ui.udfp.fql.XsqFQLActivity
23:06:11 + 0x00000008 pid=16587 uid=10397 package=com.start.testdemo.ui.udfp.fql.XsqFQLActivity samplingPeriod=66667us batchingPeriod=0us
21:19:08 - 0x00000001 pid= 3725 uid=10372 package=org.qiyi.basecore.widget.shakeguide.b
21:19:05 - 0x00000001 pid= 3725 uid=10372 package=org.qiyi.basecore.widget.shakeguide.b
21:19:05 + 0x00000001 pid= 3725 uid=10372 package=org.qiyi.basecore.widget.shakeguide.b samplingPeriod=200000us batchingPeriod=0us
21:19:03 + 0x00000001 pid= 3725 uid=10372 package=org.qiyi.basecore.widget.shakeguide.b samplingPeriod=200000us batchingPeriod=0us
21:18:28 - 0x00000001 pid=22095 uid=10339 package=dib.a

以上输出可以看出最近申请sensor的记录的PID, UID, 以及访问的组件package, 以及访问的sensor handle.

2.dumpsys sensorservice查看设备中所有的sensor信息

Sensor Device:
Total 6 h/w sensors, 6 running 0 disabled clients:
0x00000001) active-count = 1; sampling_period(ms) = {200.0}, selected = 200.00 ms; batching_period(ms) = {2000.0}, selected = 2000.00 ms
0x00000005) active-count = 2; sampling_period(ms) = {1000.0, 200.0}, selected = 200.00 ms; batching_period(ms) = {0.0, 0.0}, selected = 0.00 ms
0x00000008) active-count = 1; sampling_period(ms) = {66.7}, selected = 66.67 ms; batching_period(ms) = {0.0}, selected = 0.00 ms
Sensor List:
0x00000001) ACCELEROMETER             | stk8ba58        | ver: 1 | type: android.sensor.accelerometer(1) | perm: n/a | flags: 0x00000000
        continuous | minRate=1.00Hz | maxRate=100.00Hz | no batching | non-wakeUp | 
0x00000002) MAGNETOMETER              | MTK             | ver: 1 | type: android.sensor.magnetic_field(2) | perm: n/a | flags: 0x00000000
        continuous | minRate=5.00Hz | maxRate=50.00Hz | FIFO (max,reserved) = (4500, 600) events | non-wakeUp | 
0x00000003) ORIENTATION               | MTK             | ver: 1 | type: android.sensor.orientation(3) | perm: n/a | flags: 0x00000000
        continuous | minRate=50.00Hz | maxRate=200.00Hz | no batching | non-wakeUp | 
0x00000005) LIGHT                     | MTK             | ver: 1 | type: android.sensor.light(5) | perm: n/a | flags: 0x00000002
        on-change | minRate=1.00Hz | minDelay=0us | no batching | non-wakeUp | 
0x00000008) PROXIMITY                 | MTK             | ver: 1 | type: android.sensor.proximity(8) | perm: n/a | flags: 0x00000003
        on-change | minRate=1.00Hz | minDelay=0us | FIFO (max,reserved) = (4500, 100) events | wakeUp | 
0x0000001b) DEVICE_ORIENTATION        | MTK             | ver: 1 | type: android.sensor.device_orientation(27) | perm: n/a | flags: 0x00000002
        on-change | minRate=1.00Hz | minDelay=0us | no batching | non-wakeUp | 
0x5f67656f) GeoMag Rotation Vector Sensor | AOSP            | ver: 3 | type: android.sensor.geomagnetic_rotation_vector(20) | perm: n/a | flags: 0x00000000
        continuous | maxDelay=0us | maxRate=100.00Hz | no batching | non-wakeUp | 
Fusion States:

从以上可知,本机一共有6个sensor, 被禁的为0.
Total 6 h/w sensors, 6 running 0 disabled clients:

其中每条输出内容如下:
以light-sensor为例,

0x00000005) LIGHT                     | MTK             | ver: 1 | type: android.sensor.light(5) | perm: n/a | flags: 0x00000002
        on-change | minRate=1.00Hz | minDelay=0us | no batching | non-wakeUp |

其输出的对应的各个字段声明如下:

  1. 0x00000005 // handle that identifies this sensors. 唯一标识符.
  2. MTK // sensor制造商Mediatek
  3. ver:1 //表示版本号
  4. type:android.sensor.light(5) // 表示light type sensor
  5. perm:n/a // 需要的访问权限,n/a表示无.
  6. flags:0x00000002 // 2表示上报方式是on_change.
  7. on-change //表示sensor数据发生变化才触发listener回调.
  8. non-wakeUp // 表示此sensor非wake up型sensor. 即light-sensor不会因为光线变化数据变化而主动唤醒屏幕.

http://aospxref.com/android-14.0.0_r2/xref/hardware/libhardware/include/hardware/sensors.h
文件中的sensor_t 结构体.


struct sensor_t {

    /* Name of this sensor.
     * All sensors of the same "type" must have a different "name".
     */
    const char*     name;

    /* vendor of the hardware part */
    const char*     vendor;

    /* version of the hardware part + driver. The value of this field
     * must increase when the driver is updated in a way that changes the
     * output of this sensor. This is important for fused sensors when the
     * fusion algorithm is updated.
     */
    int             version;

    /* handle that identifies this sensors. This handle is used to reference
     * this sensor throughout the HAL API.
     */
    int             handle;

    /* this sensor's type. */
    int             type;

    /* maximum range of this sensor's value in SI units */
    float           maxRange;

    /* smallest difference between two values reported by this sensor */
    float           resolution;

    /* rough estimate of this sensor's power consumption in mA */
    float           power;

    /* this value depends on the reporting mode:
     *
     *   continuous: minimum sample period allowed in microseconds
     *   on-change : 0
     *   one-shot  :-1
     *   special   : 0, unless otherwise noted
     */
    int32_t         minDelay;

    /* number of events reserved for this sensor in the batch mode FIFO.
     * If there is a dedicated FIFO for this sensor, then this is the
     * size of this FIFO. If the FIFO is shared with other sensors,
     * this is the size reserved for that sensor and it can be zero.
     */
    uint32_t        fifoReservedEventCount;

    /* maximum number of events of this sensor that could be batched.
     * This is especially relevant when the FIFO is shared between
     * several sensors; this value is then set to the size of that FIFO.
     */
    uint32_t        fifoMaxEventCount;

    /* type of this sensor as a string.
     *
     * If type is OEM specific or sensor manufacturer specific type
     * (>=SENSOR_TYPE_DEVICE_PRIVATE_BASE), this string must be defined with reserved domain of
     * vendor/OEM as a prefix, e.g. com.google.glass.onheaddetector
     *
     * For sensors of Android defined types, Android framework will override this value. It is ok to
     * leave it pointing to an empty string.
     */
    const char*    stringType;

    /* permission required to see this sensor, register to it and receive data.
     * Set to "" if no permission is required. Some sensor types like the
     * heart rate monitor have a mandatory require_permission.
     * For sensors that always require a specific permission, like the heart
     * rate monitor, the android framework might overwrite this string
     * automatically.
     */
    const char*    requiredPermission;

    /* This value is defined only for continuous mode and on-change sensors. It is the delay between
     * two sensor events corresponding to the lowest frequency that this sensor supports. When lower
     * frequencies are requested through batch()/setDelay() the events will be generated at this
     * frequency instead. It can be used by the framework or applications to estimate when the batch
     * FIFO may be full.
     *
     * NOTE: 1) period_ns is in nanoseconds where as maxDelay/minDelay are in microseconds.
     *              continuous, on-change: maximum sampling period allowed in microseconds.
     *              one-shot, special : 0
     *   2) maxDelay should always fit within a 32 bit signed integer. It is declared as 64 bit
     *      on 64 bit architectures only for binary compatibility reasons.
     * Availability: SENSORS_DEVICE_API_VERSION_1_3
     */
    #ifdef __LP64__
       int64_t maxDelay;
    #else
       int32_t maxDelay;
    #endif

    /* Flags for sensor. See SENSOR_FLAG_* above. Only the least significant 32 bits are used here.
     * It is declared as 64 bit on 64 bit architectures only for binary compatibility reasons.
     * Availability: SENSORS_DEVICE_API_VERSION_1_3
     */
    #ifdef __LP64__
       uint64_t flags;
    #else
       uint32_t flags;
    #endif

    /* reserved fields, must be zero */
    void*           reserved[2];
};

struct sensor_t结构体的数据对接HAL层的SensorInfo的结构体, 数据来源于HAL层的注册.

http://aospxref.com/android-14.0.0_r2/xref/hardware/interfaces/sensors/1.0/types.hal

struct SensorInfo {
    /**
     * handle that identifies this sensors. This handle is used to reference
     * this sensor throughout the HAL API.
     */
    int32_t sensorHandle;

    /**
     * Name of this sensor.
     * All sensors of the same "type" must have a different "name".
     */
    string name;

    /** vendor of the hardware part */
    string vendor;

    /**
     * version of the hardware part + driver. The value of this field
     * must increase when the driver is updated in a way that changes the
     * output of this sensor. This is important for fused sensors when the
     * fusion algorithm is updated.
     */
    int32_t version;

    /** this sensor's type. */
    SensorType type;

    /**
     * type of this sensor as a string.
     *
     * When defining an OEM specific sensor or sensor manufacturer specific
     * sensor, use your reserve domain name as a prefix.
     * e.g. com.google.glass.onheaddetector
     *
     * For sensors of known type defined in SensorType (value <
     * SensorType::DEVICE_PRIVATE_BASE), this can be an empty string.
     */
    string typeAsString;

    /** maximum range of this sensor's value in SI units */
    float maxRange;

    /** smallest difference between two values reported by this sensor */
    float resolution;

    /** rough estimate of this sensor's power consumption in mA */
    float power;

    /**
     * this value depends on the reporting mode:
     *
     *   continuous: minimum sample period allowed in microseconds
     *   on-change : 0
     *   one-shot  :-1
     *   special   : 0, unless otherwise noted
     */
    int32_t minDelay;

    /**
     * number of events reserved for this sensor in the batch mode FIFO.
     * If there is a dedicated FIFO for this sensor, then this is the
     * size of this FIFO. If the FIFO is shared with other sensors,
     * this is the size reserved for that sensor and it can be zero.
     */
    uint32_t fifoReservedEventCount;

    /**
     * maximum number of events of this sensor that could be batched.
     * This is especially relevant when the FIFO is shared between
     * several sensors; this value is then set to the size of that FIFO.
     */
    uint32_t fifoMaxEventCount;

    /**
     * permission required to see this sensor, register to it and receive data.
     * Set to "" if no permission is required. Some sensor types like the
     * heart rate monitor have a mandatory require_permission.
     * For sensors that always require a specific permission, like the heart
     * rate monitor, the android framework might overwrite this string
     * automatically.
     */
    string requiredPermission;

    /**
     * This value is defined only for continuous mode and on-change sensors.
     * It is the delay between two sensor events corresponding to the lowest
     * frequency that this sensor supports. When lower frequencies are requested
     * through batch()/setDelay() the events will be generated at this frequency
     * instead.
     * It can be used by the framework or applications to estimate when the
     * batch FIFO may be full.
     *
     * NOTE: periodNs is in nanoseconds where as maxDelay/minDelay are in
     *       microseconds.
     *
     *       continuous, on-change: maximum sampling period allowed in
     *                              microseconds.
     *
     *          one-shot, special : 0
     */
    int32_t maxDelay;

    /** Bitmask of SensorFlagBits */
    bitfield<SensorFlagBits> flags;
};

以上dump输出对应代码:
/android-14.0.0_r2/xref/frameworks/native/services/sensorservice/SensorList.cpp
在这里插入图片描述

3.当前正在被访问的sensor

Active sensors:
ACCELEROMETER (handle=0x00000001, connections=1)
LIGHT (handle=0x00000005, connections=2)
PROXIMITY (handle=0x00000008, connections=1)
Socket Buffer size = 984 events
WakeLock Status: not held 
Mode : NORMAL
Sensor Privacy: disabled
4 active connections
Connection Number: 0 
        Operating Mode: NORMAL
         c.d.a.b.b | WakeLockRefCount 0 | uid 1000 | cache size 0 | max cache size 0
         LIGHT 0x00000005 | status: active | pending flush events 0 
Connection Number: 1 
        Operating Mode: NORMAL
         com.android.server.power.FaceDownDetector | WakeLockRefCount 0 | uid 1000 | cache size 0 | max cache size 0
         ACCELEROMETER 0x00000001 | status: active | pending flush events 0 
Connection Number: 2 
        Operating Mode: NORMAL
         com.xsq.server.display.XsqWidgetObserver | WakeLockRefCount 0 | uid 1000 | cache size 0 | max cache size 0
         LIGHT 0x00000005 | status: active | pending flush events 0 
Connection Number: 3 
        Operating Mode: NORMAL
         com.start.testdemo.ui.udfp.fql.XsqFQLActivity | WakeLockRefCount 0 | uid 10397 | cache size 0 | max cache size 0
         PROXIMITY 0x00000008 | status: active | pending flush events 0 
0 direct connections

从以上可知,在执行dumpsys sensorservice时刻,有三个sensor正在被监听工作状态.
其中Proximity-sensor正在被自写的测试APP(com.start.testdemo)持有.

4.Psensor PROXIMITY_SCREEN_OFF_WAKE_LOCK用法

自研程序可以通过申请PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK来实现亮灭屏.

demo

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.udfp_quick_launch_layout);

        PowerManager powerManager = (PowerManager) getSystemService(Context.POWER_SERVICE);
        if (powerManager.isWakeLockLevelSupported(PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK)) {
            // 可以控制屏幕亮灭,只是关闭屏幕背光,不会导致PowerManagerService和通知PhoneWindowManager进行锁屏通知
            mProximitySensorWakeLock = powerManager.newWakeLock(PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK, "SensorTestActivity:mProximitySensorWakeLock");
        }
    }

    private PowerManager.WakeLock mProximitySensorWakeLock;

    private void enableProximitySensor() {
        if (null == mProximitySensorWakeLock) {
            return;
        }
        if (!mProximitySensorWakeLock.isHeld()) {
            Log.d(TAG, "enableProximitySensor: acquiring proximity wake lock");
            mProximitySensorWakeLock.acquire();
        } else {
            Log.d(TAG, "enableProximitySensor: proximity sensor is held.");
        }
    }

    private void disableProximitySensor() {
        if (null == mProximitySensorWakeLock) {
            return;
        }
        if (mProximitySensorWakeLock.isHeld()) {
            Log.d(TAG, "disableProximitySensor: release proximity wake lock");
            mProximitySensorWakeLock.release(PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK);
        }
    }

这里需要注意,申请该WAKE_LOCK的黑屏仅仅是关闭屏幕背光,并不会直接通知PowerManager和Keyguard去上锁屏幕.

其申请sensor的角色也变成了System_server中的DisplayPowerController.

Previous Registrations:
00:11:02 + 0x00000008 pid= 1351 uid= 1000 package=com.android.server.display.DisplayPowerController samplingPeriod=200000us batchingPeriod=0us
00:09:15 - 0x00000008 pid=16587 uid=10397 package=com.start.testdemo.ui.udfp.fql.XsqFQLActivity

4 active connections
Connection Number: 0
Operating Mode: NORMAL
com.android.server.display.DisplayPowerController | WakeLockRefCount 0 | uid 1000 | cache size 0 | max cache size 0
PROXIMITY 0x00000008 | status: active | pending flush events 0

5.sensorservice服务的注册

在这里插入图片描述

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

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

相关文章

智慧分流:探索互联网与物联网的负载均衡技术

数字化时代&#xff0c;个人认为&#xff0c;无论是互联网还是物联网&#xff0c;还是其他网&#xff0c;在各个层级&#xff0c;都对系统的稳定性和效率提出了更高的要求。负载均衡技术作为保障系统平稳运行的关键&#xff0c;其重要性不言而喻。在数字世界的海洋中&#xff0…

仅靠独立网站也能赚到100万,真的太牛了

你听说过 Photopea 吗&#xff1f;这是一个免费的类似 Photoshop 的图像编辑器。 这个项目&#xff1a; 每月1300万访问量每月150万用户使用小时每月10万美元的广告收入 Photopea 项目的天才创造者是 Ivan Kutskir。 令人惊讶的是&#xff0c;他独自处理了每日50万用户&…

gt9x双击唤醒屏幕

里面可以看到irq 和 rst的gpio引脚从设备树获取失败&#xff0c;排查设备树发现是属性名写错了&#xff1a; c &i2c1 {status "okay";goodix_ts5d {compatible "goodix,gt9xx";reg <0x5d>;// tp-size <89>;touchscreen-size-x <12…

JINGWHALE WH 迭代思维法:科学优化问题解析、任务策略规划与高效工作汇报的赋能艺术

JINGWHALE 对此论文相关未知以及已知概念、定理、公式、图片等内容的感悟、分析、创新、创造等拥有作品著作权。未经 JINGWHALE 授权&#xff0c;禁止转载与商业使用。

怎样搭建serveru ftp个人服务器

首先说说什么是ftp&#xff1f; FTP协议是专门针对在两个系统之间传输大的文件这种应用开发出来的&#xff0c;它是TCP/IP协议的一部分。FTP的意思就是文件传输协议&#xff0c;用来管理TCP/IP网络上大型文件的快速传输。FTP早也是在Unix上开发出来的&#xff0c;并且很长一段…

混淆矩阵-召回率、精确率、准确率

混淆矩阵 1 混淆矩阵2 混淆矩阵指标2.1 准确率2.2 精确率2.3 召回率2.4 特异度2.4 假正率2.5 假负率2.6 F1 分数 3 总结 1 混淆矩阵 混淆矩阵是一种用于评估分类模型性能的重要工具。它通过矩阵形式清晰地展示了模型对样本进行分类的结果&#xff0c;帮助我们理解模型在不同类…

第十七篇——交叉熵:如何避免制订出与事实相反的计划?

目录 一、背景介绍二、思路&方案三、过程1.思维导图2.文章中经典的句子理解3.学习之后对于投资市场的理解4.通过这篇文章结合我知道的东西我能想到什么&#xff1f; 四、总结五、升华 一、背景介绍 任何事情&#xff0c;都需要我们制订计划执行计划&#xff1b;而制订计划…

AI 能否自行设计和制造芯片?

一、背景 AI在芯片设计和制造方面的潜力极其巨大&#xff0c;可以从以下几个方面探讨&#xff1a; 芯片设计阶段 自动化设计优化&#xff1a; AI可以实现芯片架构的自动化设计和优化&#xff0c;通过机器学习算法探索庞大的设计空间&#xff0c;找到性能、功耗、面积等方面的…

软件测试---基础知识

目录 一、概念 1、需求 2、测试用例 3、软件错误--BUG 4、软件生命周期 5、软件开发模型 6、测试模型 7、软件测试生命周期 二、基础 1、描述一个bug 2、定义bug的级别 3、bug的生命周期 4、开始第一次测试 5、解决争执 三、测试用例基础知识 1、用例基本要素 …

k8s实战案例之部署nginx+Tomcat+nfs实现动静分离

​​​​​ k8s实战案例之部署NginxTomcatNFS实现动静分离 1、基于镜像分层构建及自定义镜像运行Nginx及Java服务并基于NFS实现动静分离 1.1、业务镜像设计规划 根据业务的不同&#xff0c;我们可以导入官方基础镜像&#xff0c;在官方基础镜像的基础上自定义需要用的工具和…

结构设计模式 - 桥接设计模式 - JAVA

桥接设计模式 一. 介绍二. 桥接模式示例2.1 定义实现部分和具体实现2.2 定义抽象部分和细化抽象部分2.3 测试2.4 解释 三. 结论 前言 这是我在这个网站整理的笔记,有错误的地方请指出&#xff0c;关注我&#xff0c;接下来还会持续更新。 作者&#xff1a;神的孩子都在歌唱 一.…

爬虫初学篇

初次学习爬虫&#xff0c;知识笔记小想 目录&#x1f31f; 一、&#x1f349;基础知识二、&#x1f349;http协议&#xff1a;三、&#x1f349;解析网页(1) xpath的用法&#xff1a;(2) bs4解析器的解释&#xff1a;(3) python字符编码的错误&#xff1a;(4) 正则表达式&#…

HTML静态网页成品作业(HTML+CSS)——中华传统美德介绍网页(2个页面)

&#x1f389;不定期分享源码&#xff0c;关注不丢失哦 文章目录 一、作品介绍二、作品演示三、代码目录四、网站代码HTML部分代码 五、源码获取 一、作品介绍 &#x1f3f7;️本套采用HTMLCSS&#xff0c;表格布局&#xff0c;未使用Javacsript代码&#xff0c;共有2个页面。…

python GUI开发: tkinter事件处理的几种方式详解与应用实战

✨✨ 欢迎大家来到景天科技苑✨✨ &#x1f388;&#x1f388; 养成好习惯&#xff0c;先赞后看哦~&#x1f388;&#x1f388; &#x1f3c6; 作者简介&#xff1a;景天科技苑 &#x1f3c6;《头衔》&#xff1a;大厂架构师&#xff0c;华为云开发者社区专家博主&#xff0c;…

分布式之日志系统平台ELK

ELK解决了什么问题 我们开发完成后发布到线上的项目出现问题时(中小型公司),我们可能需要获取服务器中的日志文件进行定位分析问题。但在规模较大或者更加复杂的分布式场景下就显得力不从心。因此急需通过集中化的日志管理,将所有服务器上的日志进行收集汇总。所以ELK应运而生…

【C/C++】【学生成绩管理系统】深度剖析

可接各类C/C管理系统课设 目录 实现功能 部分1&#xff1a;系统设置和主菜单 1. 引入头文件 2. 定义结构体 3. 函数声明 4. 主函数 部分2&#xff1a;添加学生信息 部分3&#xff1a;删除学生信息 部分4&#xff1a;修改学生信息 部分5&#xff1a;查询学生信息 部分…

MySQL实现排名

数据准备 Create table If Not Exists Scores (id int, score DECIMAL(3,2)) Truncate table Scores insert into Scores (id, score) values (1, 3) insert into Scores (id, score) values (2, 3) insert into Scores (id, score) values (3, 4.0) insert into Scores (id, …

虾皮平台API:获取商品买家评论数据

一、接口核心功能 在电商领域&#xff0c;买家评论对于商品的销售和商家的口碑至关重要。虾皮作为东南亚地区知名的电商平台&#xff0c;为商家提供了丰富的商品买家评论数据。为了方便商家获取这些数据&#xff0c;我们的API接口服务其核心功能就是获取商品买家评论数据信息。…

使用pip2pi和nginx搭建私有pip镜像源方法

在内网环境下部署python开发环境&#xff0c;安装python第三方库比较麻烦&#xff0c;特别是安装需要多个依赖的库。一种比较好的解决方案是搭建一个本地的私有pip镜像源&#xff0c;有多个方案可以选择&#xff0c;比如pypiserver、pip2pi等&#xff0c;本文介绍使用python的p…

vue3轮播图怎么做

先看效果 实现代码 <n-carouseleffect"card"dot-type"line"draggable:autoplay"!isHovered":current-index"currentIndex"prev-slide-style"transform: translateX(-150%) translateZ(-450px);opacity:1"next-slide-st…