android 10车载桌面ActivityView触摸事件源码详解分析

hi,粉丝朋友们:

背景

大家好!近来居然有好几个粉丝朋友居然问到了一个虚拟屏幕触摸相关的问题,还有老版本android 10上面有个车载桌面使用的ActivityView可以正常触摸的问题。
其实这个ActivityView在最新的版本已经没有了,所以以前的话没有去重点分析这个ActivityView触摸部分的原理剖析,但是发现虽然没有了ActivityView。但是很多同学还是喜欢自己在高版本又写一个类似的ActivityView。基于这个背景下,拿出老版本的ActivityView分析一下其实现原理还是有必要哈。前面的blog本身已经分析了ActivityView的显示Activity原理部分,本节就来重点分析ActvityView是怎么在系统中正常触摸的。
为了分析这个ActivityView的触摸原理,我这边特别下载了android 10的代码编译好了一个car的模拟器进行验证分析

车载桌面的当前表现

目前车载的桌面显示如下图,绿色的“”No maps …“”这个区域就是ActivityView,他属于搞了个新的虚拟Display然后启动的Activity。所以这里的就会存在在CarLauncher上面显示两个Activity,一个是桌面自己,一个是地图绿色的Activity,但是大家注意哈,这里的绿色区域的地图Activity明显属于另一个display,这里我们是知道的触摸都是每个display独立的,即多屏display显示都是有各自display的触摸节点。
但是目前画面都显示在主屏幕display0这个屏幕,所以我们触摸绿色区域,肯定触摸事件是display0的,肯定不会到虚拟display去,这个是我们的理论分析的哈,认为如果要虚拟display有事件,必须要手动注入模拟相关的触摸事件注入到虚拟display。但事实真的是这样吗?

在这里插入图片描述

认为绿色虚拟屏幕不可能有触摸事件接受,我们来验证一下是不是触摸没有触摸事件
为了验证,在地图容器Activity的dispatchTouchEvent有日志打印,以此来确定是否有事件到Activity。
实际上在触摸绿色区域时候,发现有对于事件:


```bash
11-13 00:29:48.738  3638  3638 I lsm11   : dispatchTouchEvent ev MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=188.97656, y[0]=107.98242, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=2719884, downTime=2719884, deviceId=0, source=0x1002, displayId=0 }

11-13 00:29:48.851  3638  3638 I lsm11   : dispatchTouchEvent ev MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=188.97656, y[0]=107.98242, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=2719996, downTime=2719884, deviceId=0, source=0x1002, displayId=0 }

看到结果是不是感觉自己被狠狠打脸了。。。。。
为啥可以收到触摸主屏幕触摸事件呢,activity明明显示在另一个display

问题追踪分析线索:

怀疑线索1:

11-13 00:29:48.738 3638 3638 I lsm11 : dispatchTouchEvent ev MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=188.97656, y[0]=107.98242, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=2719884, downTime=2719884, deviceId=0, source=0x1002, displayId=0 }

看这里触摸事件时候大家是不是发现明明这个displayId居然还是0,明显不太和逻辑是吧,,,正常触摸事件是不是应该为displayId = 1(假设虚拟屏幕是displayId = 1)
不过换着想一下这个displayId决定是inputreader,即说明在inputreader时候就认为是主屏幕事件,故立马吧方向就不用放到inputreader部分

线索2:
dumpsys input

INPUT MANAGER (dumpsys input)

Input Manager State:
  Interactive: true
  System UI Visibility: 0x8008
  Pointer Speed: 0
  Pointer Gestures Enabled: true
  Show Touches: false
  Pointer Capture Enabled: false

Event Hub State:
  BuiltInKeyboardId: 2
  Devices:
    -1: Virtual
      Classes: 0x40000023
      Path: <virtual>
      Enabled: true
      Descriptor: a718a782d34bc767f4689c232d64d527998ea7fd
      Location: 
      ControllerNumber: 0
      UniqueId: <virtual>
      Identifier: bus=0x0000, vendor=0x0000, product=0x0000, version=0x0000
      KeyLayoutFile: /system/usr/keylayout/Generic.kl
      KeyCharacterMapFile: /system/usr/keychars/Virtual.kcm
      ConfigurationFile: 
      HaveKeyboardLayoutOverlay: false
      VideoDevice: <none>
    1: Power Button
      Classes: 0x00000001
      Path: /dev/input/event0
      Enabled: true
      Descriptor: 26d13db3fa0f6bd5d05831266fb01ea6c500b88c
      Location: LNXPWRBN/button/input0
      ControllerNumber: 0
      UniqueId: 
      Identifier: bus=0x0019, vendor=0x0000, product=0x0001, version=0x0000
      KeyLayoutFile: /system/usr/keylayout/Generic.kl
      KeyCharacterMapFile: /system/usr/keychars/Generic.kcm
      ConfigurationFile: 
      HaveKeyboardLayoutOverlay: false
      VideoDevice: <none>
    2: qwerty2 (aka device 0 - built-in keyboard)
      Classes: 0x000000bd
      Path: /dev/input/event1
      Enabled: true
      Descriptor: 04c0f71d9920e1e448166e8a4feebf80d1849c2f
      Location: 
      ControllerNumber: 0
      UniqueId: 
      Identifier: bus=0x0019, vendor=0x0000, product=0x0000, version=0x0000
      KeyLayoutFile: /system/usr/keylayout/qwerty.kl
      KeyCharacterMapFile: /system/usr/keychars/qwerty2.kcm
      ConfigurationFile: /system/usr/idc/qwerty2.idc
      HaveKeyboardLayoutOverlay: false
      VideoDevice: <none>
    3: goldfish_rotary
      Classes: 0x00001000
      Path: /dev/input/event2
      Enabled: true
      Descriptor: 9286b20e4aaa6bcaca619b728b030e3f7b422ee6
      Location: 
      ControllerNumber: 0
      UniqueId: 
      Identifier: bus=0x0019, vendor=0x0000, product=0x0000, version=0x0000
      KeyLayoutFile: 
      KeyCharacterMapFile: 
      ConfigurationFile: /vendor/usr/idc/goldfish_rotary.idc
      HaveKeyboardLayoutOverlay: false
      VideoDevice: <none>
  Unattached video devices:
    <none>

Input Reader State:
  Device -1: Virtual
    Generation: 2
    IsExternal: false
    AssociatedDisplayPort: <none>
    HasMic:     false
    Sources: 0x00000301
    KeyboardType: 2
    Keyboard Input Mapper:
      Parameters:
        OrientationAware: false
        HandlesKeyRepeat: false
      KeyboardType: 2
      Orientation: 0
      KeyDowns: 0 keys currently down
      MetaState: 0x0
      DownTime: 0
  Device 0: qwerty2
    Generation: 12
    IsExternal: false
    AssociatedDisplayPort: <none>
    HasMic:     false
    Sources: 0x80011307
    KeyboardType: 1
    Motion Ranges:
      X: source=0x00010004, min=-1.000, max=1.000, flat=0.000, fuzz=0.167, resolution=0.000
      Y: source=0x00010004, min=-1.000, max=1.000, flat=0.000, fuzz=0.167, resolution=0.000
      PRESSURE: source=0x00010004, min=0.000, max=1.000, flat=0.000, fuzz=0.000, resolution=0.000
      X: source=0x00001002, min=0.000, max=799.000, flat=0.000, fuzz=0.000, resolution=0.000
      Y: source=0x00001002, min=0.000, max=479.000, flat=0.000, fuzz=0.000, resolution=0.000
      PRESSURE: source=0x00001002, min=0.000, max=1.000, flat=0.000, fuzz=0.000, resolution=0.000
      SIZE: source=0x00001002, min=0.000, max=1.000, flat=0.000, fuzz=0.000, resolution=0.000
      TOUCH_MAJOR: source=0x00001002, min=0.000, max=932.952, flat=0.000, fuzz=0.000, resolution=0.000
      TOUCH_MINOR: source=0x00001002, min=0.000, max=932.952, flat=0.000, fuzz=0.000, resolution=0.000
      TOOL_MAJOR: source=0x00001002, min=0.000, max=932.952, flat=0.000, fuzz=0.000, resolution=0.000
      TOOL_MINOR: source=0x00001002, min=0.000, max=932.952, flat=0.000, fuzz=0.000, resolution=0.000
    Switch Input Mapper:
      SwitchValues: 0
    Keyboard Input Mapper:
      Parameters:
        OrientationAware: true
        HandlesKeyRepeat: false
      KeyboardType: 1
      Orientation: 0
      KeyDowns: 0 keys currently down
      MetaState: 0x0
      DownTime: 0
    Cursor Input Mapper:
      Parameters:
        HasAssociatedDisplay: true
        Mode: navigation
        OrientationAware: true
      XScale: 0.167
      YScale: 0.167
      XPrecision: 6.000
      YPrecision: 6.000
      HaveVWheel: false
      HaveHWheel: false
      VWheelScale: 1.000
      HWheelScale: 1.000
      Orientation: 0
      ButtonState: 0x00000000
      Down: false
      DownTime: 0
    Touch Input Mapper (mode - direct):
      Parameters:
        GestureMode: multi-touch
        DeviceType: touchScreen
        AssociatedDisplay: hasAssociatedDisplay=true, isExternal=false, displayId=''
        OrientationAware: true
      Raw Touch Axes:
        X: min=0, max=32767, flat=0, fuzz=0, resolution=0
        Y: min=0, max=32767, flat=0, fuzz=0, resolution=0
        Pressure: min=0, max=256, flat=0, fuzz=0, resolution=0
        TouchMajor: min=0, max=2147483647, flat=0, fuzz=0, resolution=0
        TouchMinor: unknown range
        ToolMajor: unknown range
        ToolMinor: unknown range
        Orientation: unknown range
        Distance: unknown range
        TiltX: unknown range
        TiltY: unknown range
        TrackingId: min=0, max=10, flat=0, fuzz=0, resolution=0
        Slot: min=0, max=9, flat=0, fuzz=0, resolution=0
      Calibration:
        touch.size.calibration: geometric
        touch.pressure.calibration: physical
        touch.orientation.calibration: none
        touch.distance.calibration: none
        touch.coverage.calibration: none
      Affine Transformation:
        X scale: 1.000
        X ymix: 0.000
        X offset: 0.000
        Y xmix: 0.000
        Y scale: 1.000
        Y offset: 0.000
      Viewport INTERNAL: displayId=0, uniqueId=local:0, port=0, orientation=0, logicalFrame=[0, 0, 800, 480], physicalFrame=[0, 0, 800, 480], deviceSize=[800, 480]
      SurfaceWidth: 800px
      SurfaceHeight: 480px
      SurfaceLeft: 0
      SurfaceTop: 0
      PhysicalWidth: 800px
      PhysicalHeight: 480px
      PhysicalLeft: 0
      PhysicalTop: 0
      SurfaceOrientation: 0
      Translation and Scaling Factors:
        XTranslate: 0.000
        YTranslate: 0.000
        XScale: 0.024
        YScale: 0.015
        XPrecision: 40.960
        YPrecision: 68.267
        GeometricScale: 0.020
        PressureScale: 0.004
        SizeScale: 0.000
        OrientationScale: 0.000
        DistanceScale: 0.000
        HaveTilt: false
        TiltXCenter: 0.000
        TiltXScale: 0.000
        TiltYCenter: 0.000
        TiltYScale: 0.000
      Last Raw Button State: 0x00000000
      Last Raw Touch: pointerCount=0
      Last Cooked Button State: 0x00000000
      Last Cooked Touch: pointerCount=0
      Stylus Fusion:
        ExternalStylusConnected: false
        External Stylus ID: -1
        External Stylus Data Timeout: 9223372036854775807
      External Stylus State:
        When: 9223372036854775807
        Pressure: 0.000000
        Button State: 0x00000000
        Tool Type: 0
  Device 1: Power Button
    Generation: 9
    IsExternal: false
    AssociatedDisplayPort: <none>
    HasMic:     false
    Sources: 0x00000101
    KeyboardType: 1
    Keyboard Input Mapper:
      Parameters:
        OrientationAware: false
        HandlesKeyRepeat: false
      KeyboardType: 1
      Orientation: 0
      KeyDowns: 0 keys currently down
      MetaState: 0x0
      DownTime: 0
  Device 3: goldfish_rotary
    Generation: 4
    IsExternal: false
    AssociatedDisplayPort: <none>
    HasMic:     false
    Sources: 0x00400000
    KeyboardType: 0
    Motion Ranges:
      26: source=0x00400000, min=-1.000, max=1.000, flat=0.000, fuzz=0.000, resolution=0.791
    Rotary Encoder Input Mapper:
      HaveWheel: true
  Configuration:
    ExcludedDeviceNames: []
    VirtualKeyQuietTime: 0.0ms
    PointerVelocityControlParameters: scale=1.000, lowThreshold=500.000, highThreshold=3000.000, acceleration=3.000
    WheelVelocityControlParameters: scale=1.000, lowThreshold=15.000, highThreshold=50.000, acceleration=4.000
    PointerGesture:
      Enabled: true
      QuietInterval: 100.0ms
      DragMinSwitchSpeed: 50.0px/s
      TapInterval: 150.0ms
      TapDragInterval: 300.0ms
      TapSlop: 20.0px
      MultitouchSettleInterval: 100.0ms
      MultitouchMinDistance: 15.0px
      SwipeTransitionAngleCosine: 0.3
      SwipeMaxWidthRatio: 0.2
      MovementSpeedRatio: 0.8
      ZoomSpeedRatio: 0.3
      Viewports:
        Viewport INTERNAL: displayId=0, uniqueId=local:0, port=0, orientation=0, logicalFrame=[0, 0, 800, 480], physicalFrame=[0, 0, 800, 480], deviceSize=[800, 480]

Input Classifier State:
  Motion Classifier:
    <nullptr>

Input Dispatcher State:
  DispatchEnabled: true
  DispatchFrozen: false
  InputFilterEnabled: false
  FocusedDisplayId: 2
  FocusedApplications:
    displayId=3, name='AppWindowToken{34ea2d9 token=Token{6cc1920 ActivityRecord{e2df023 u10 android.car.cluster/.FakeFreeNavigationActivity t1000019}}}', dispatchingTimeout=5000.000ms
    displayId=2, name='AppWindowToken{7f21912 token=Token{601109d ActivityRecord{c985374 u10 com.android.car.mapsplaceholder/.MapsPlaceholderActivity t1000018}}}', dispatchingTimeout=5000.000ms
    displayId=1, name='AppWindowToken{ba4478b token=Token{f67795a ActivityRecord{aba2505 u0 android.car.cluster/.MainClusterActivity t5}}}', dispatchingTimeout=5000.000ms
    displayId=0, name='AppWindowToken{b53bbef token=Token{3bc30ce ActivityRecord{f6201c9 u10 com.android.car.carlauncher/.CarLauncher t1000002}}}', dispatchingTimeout=5000.000ms
  FocusedWindows:
    displayId=0, name='Window{71ec913 u10 com.android.car.carlauncher/com.android.car.carlauncher.CarLauncher}'
    displayId=2, name='Window{36a3ea8 u10 com.android.car.mapsplaceholder/com.android.car.mapsplaceholder.MapsPlaceholderActivity}'
    displayId=3, name='Window{752545a u10 android.car.cluster/android.car.cluster.FakeFreeNavigationActivity}'
    displayId=1, name='Window{96a3c94 u0 android.car.cluster/android.car.cluster.MainClusterActivity}'
  TouchStates: <no displays touched>
  Display: 3
    Windows:
      0: name='Window{752545a u10 android.car.cluster/android.car.cluster.FakeFreeNavigationActivity}', displayId=3, portalToDisplayId=-1, paused=false, hasFocus=true, hasWallpaper=false, visible=true, canReceiveKeys=true, flags=0x01810520, type=0x00000001, layer=0, frame=[0,0][1280,520], globalScale=1.000000, windowScale=(1.000000,1.000000), touchableRegion=[0,0][1280,520], inputFeatures=0x00000000, ownerPid=3735, ownerUid=1001000, dispatchingTimeout=5000.000ms
  Display: 2
    Windows:
      0: name='Window{36a3ea8 u10 com.android.car.mapsplaceholder/com.android.car.mapsplaceholder.MapsPlaceholderActivity}', displayId=2, portalToDisplayId=-1, paused=false, hasFocus=true, hasWallpaper=false, visible=true, canReceiveKeys=true, flags=0x81810120, type=0x00000001, layer=0, frame=[12,69][474,384], globalScale=1.000000, windowScale=(1.000000,1.000000), touchableRegion=[12,69][474,384], inputFeatures=0x00000000, ownerPid=3638, ownerUid=1010066, dispatchingTimeout=5000.000ms
  Display: 1
    Windows:
      0: name='Window{96a3c94 u0 android.car.cluster/android.car.cluster.MainClusterActivity}', displayId=1, portalToDisplayId=-1, paused=false, hasFocus=true, hasWallpaper=false, visible=true, canReceiveKeys=true, flags=0x01810520, type=0x00000001, layer=0, frame=[0,0][1280,720], globalScale=1.000000, windowScale=(1.000000,1.000000), touchableRegion=[0,0][1280,720], inputFeatures=0x00000000, ownerPid=3472, ownerUid=1000, dispatchingTimeout=5000.000ms
  Display: 0
    Windows:
      0: name='Window{263dc87 u0 CarNavigationBar}', displayId=0, portalToDisplayId=-1, paused=false, hasFocus=false, hasWallpaper=false, visible=true, canReceiveKeys=false, flags=0x01840028, type=0x000007e3, layer=0, frame=[0,396][800,480], globalScale=1.000000, windowScale=(1.000000,1.000000), touchableRegion=[0,396][800,480], inputFeatures=0x00000000, ownerPid=2020, ownerUid=10099, dispatchingTimeout=5000.000ms
      1: name='Window{586637c u0 StatusBar}', displayId=0, portalToDisplayId=-1, paused=false, hasFocus=false, hasWallpaper=false, visible=true, canReceiveKeys=false, flags=0x81840048, type=0x000007d0, layer=0, frame=[0,0][800,57], globalScale=1.000000, windowScale=(1.000000,1.000000), touchableRegion=[0,0][800,57], inputFeatures=0x00000000, ownerPid=2020, ownerUid=10099, dispatchingTimeout=5000.000ms
      2: name='Window{71ec913 u10 com.android.car.carlauncher/com.android.car.carlauncher.CarLauncher}', displayId=0, portalToDisplayId=-1, paused=false, hasFocus=true, hasWallpaper=true, visible=true, canReceiveKeys=true, flags=0x81910120, type=0x00000001, layer=0, frame=[0,0][800,480], globalScale=1.000000, windowScale=(1.000000,1.000000), touchableRegion=[0,0][800,69]|[0,69][12,384]|[474,69][800,384]|[0,384][800,480], inputFeatures=0x00000000, ownerPid=3531, ownerUid=1001000, dispatchingTimeout=5000.000ms
      3: name='Surface(name=ActivityViewVirtualDisplay)/@0x8f6acba', displayId=0, portalToDisplayId=2, paused=false, hasFocus=false, hasWallpaper=false, visible=true, canReceiveKeys=false, flags=0x00800028, type=0x00000000, layer=0, frame=[12,69][474,384], globalScale=1.000000, windowScale=(1.000000,1.000000), touchableRegion=[12,69][474,384], inputFeatures=0x00000000, ownerPid=1875, ownerUid=1000, dispatchingTimeout=0.000ms
      4: name='Window{5bed72e u10 com.android.systemui.ImageWallpaper}', displayId=0, portalToDisplayId=-1, paused=false, hasFocus=false, hasWallpaper=false, visible=true, canReceiveKeys=false, flags=0x00014318, type=0x000007dd, layer=0, frame=[0,0][963,480], globalScale=1.000000, windowScale=(2.666667,2.666667), touchableRegion=[0,0][361,180], inputFeatures=0x00000000, ownerPid=2528, ownerUid=1010099, dispatchingTimeout=5000.000ms
  


这里我们仔细看我们发现主屏幕display 0有一个Window:

 3: name='Surface(name=ActivityViewVirtualDisplay)/@0x8f6acba', displayId=0, portalToDisplayId=2, paused=false, hasFocus=false, hasWallpaper=false, visible=true, canReceiveKeys=false, flags=0x00800028, type=0x00000000, layer=0, frame=[12,69][474,384], globalScale=1.000000, windowScale=(1.000000,1.000000), touchableRegion=[12,69][474,384], inputFeatures=0x00000000, ownerPid=1875, ownerUid=1000, dispatchingTimeout=0.000ms

这个Surface(name=ActivityViewVirtualDisplay)就是ActivityView专门创建的一个input层面的window,仔细分析他的时候发现有一个变量引起我们的注意:
portalToDisplayId=2,

明显其他窗口都是 -1,他是2,而且这个2又刚好是我们的虚拟display的Id,哈哈哈到了这里大家就是不是找到核心问题点。

原理流程分析:

寻找触摸事件接受窗口时候会根据判断这个portalToDisplayId值,如果有这个值,会重新遍历这个displayId上的window代替自己这个display的window。即实现了Surface(name=ActivityViewVirtualDisplay)/@0x8f6acba这窗口的触摸事件接受都转到了displayId = portalToDisplayId的window上:
0: name=‘Window{36a3ea8 u10 com.android.car.mapsplaceholder/com.android.car.mapsplaceholder.MapsPlaceholderActivity}’, displayId=2,
在这里插入图片描述

那么这个portalToDisplayId谁设置的呢?
其实是ActivityView调用的reparentDisplayContent
在这里插入图片描述

接下来到了wms中执行:
在这里插入图片描述

这里调用到了DisplayContent:
在这里插入图片描述

好那么今天就把ActivityView的触摸部分就原理剖析完成,弥补了网络上这块的技术空白,方便大家学习,大家想要学习更多framework高深干货技术,那就跟着马哥很多干货课程,需要的课程优惠的可以+v(androidframework007)
在这里插入图片描述

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

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

相关文章

视觉大模型DINOv2:自我监督学习的新领域

1 DINOv2 1.1 DINOv2特点 前段时间&#xff0c;Meta AI 高调发布了 Segment Anything&#xff08;SAM&#xff09;&#xff0c;SAM 以交互式方式快速生成 Mask&#xff0c;并可以对从未训练过的图片进行精准分割&#xff0c;可以根据文字提示或使用者点击进而圈出图像中的特定…

基于springboot实现结合疫情情况的婚恋系统【项目源码】

基于springboot实现结合疫情情况的婚恋系统演示 SpringBoot框架 SpringBoot是一个全新开源的轻量级框架。基于Spring4.0设计&#xff0c;其不仅继承了Spring框架原来有的优秀特性&#xff0c;而且还通过简化配置文件来进一步简化了Spring应用的整个搭建以及开发过程。另外在原…

Resources接口和实现类

Spring Resources概述 Java的标准iava.net.URL类和各种URL前缀的标准处理程序无法满足所有对low-evel资源的访问&#xff0c;比如: 没有标准化的URL实现可用于访问需要从类路径或相对于 ServletContext 获取的资源。并且缺少某些Spring所需要的功能&#xff0c;例如检测某资源…

RK3399平台开发系列讲解(应用篇)文件属性 stat 函数

🚀返回专栏总目录 文章目录 一、struct stat 结构体二、st_mode 变量三、struct timespec 结构体沉淀、分享、成长,让自己和他人都能有所收获!😄 📢Linux 下可以使用 stat 命令查看文件的属性,其实这个命令内部就是通过调用 stat()函数来获取文件属性的,stat 函数是 …

基于XML的声明式事务

场景模拟 参考基于注解的声明式事务 修改Spring的配置文件 将Spring配置文件中去掉tx:annotation-driven标签&#xff0c;并添加配置&#xff1a; <?xml version"1.0" encoding"UTF-8"?> <beans xmlns"http://www.springframework.org…

基于springboot实现沁园健身房预约管理系统【项目源码】计算机毕业设计

基于springboot实现沁园健身房预约管理系统演示 B/S架构 B/S结构是目前使用最多的结构模式&#xff0c;它可以使得系统的开发更加的简单&#xff0c;好操作&#xff0c;而且还可以对其进行维护。使用该结构时只需要在计算机中安装数据库&#xff0c;和一些很常用的浏览器就可以…

CSS特效007:绘制3D文字,类似PS效果

css实战中&#xff0c;怎么绘制3D文字呢&#xff1f; 实际上理论很简单&#xff0c;使用text-shadow&#xff0c;根据需要调整阴影的颜色、大小、偏移量等参数&#xff0c;以达到你想要的立体效果。下面是一个简单的示例。关键点就是知道如何设置text-shadow。 效果图 源代码 …

【debug】解决Kali虚拟机开机黑屏,左上角光标一直闪动无法开机问题

做网络攻防实验时&#xff0c;突然Kali无法打开&#xff0c;遇到这个问题。。。。。。 遇到的问题 突然kali虚拟机变成如下黑屏&#xff0c;无法开机&#xff0c;左上角光标闪动&#xff0c;重启无效。 解决办法 在上图界面&#xff0c;按Ctrl F3&#xff08;不同电脑快捷键…

C++进阶篇4---番外-红黑树

一、红黑树的概念 红黑树&#xff0c;是一种二叉搜索树&#xff0c;但在每个结点上增加一个存储位表示结点的颜色&#xff0c;可以是Red或 Black。 通过对任何一条从根到叶子的路径上各个结点着色方式的限制&#xff0c;红黑树确保没有一条路 径会比其他路径长出俩倍&#xff0…

[笔记]深入解析Windows操作系统《番外》windows关键进程解释

文章目录 前言一、Linux起源与发展二、什么是shell1.什么是Shell 总结 前言 一、Linux起源与发展 二、什么是shell 1.什么是Shell 总结 以上就是今天要讲的内容&#xff0c;本文仅仅简单介绍了linux命令行的使用。 参考&#xff1a; shells 概念 centOS7中的几个Ctrl组合…

Spring Cloud学习(七)【Docker 容器】

文章目录 初识 DockerDocker 介绍Docker与虚拟机Docker架构安装 Docker Docker 基本操作镜像相关命令容器相关命令数据卷 Dockerfile 自定义镜像镜像结构Dockerfile DockerComposeDockerCompose介绍安装DockerCompose Docker镜像仓库常见镜像仓库服务私有镜像仓库 初识 Docker …

【机器学习】八、规则学习

知识图谱与基本概念 基本概念 规则学习定义&#xff1a;从训练数据中学习出一组能用于对未见示例进行判别的规则。 规则定义&#xff1a;规则一般是&#xff1a;语义明确、能描述数据分布所隐含的客观规律或领域概念。 逻辑规则定义&#xff1a;⊕←?1⋀?2⋀?3…⋀??⊕…

Redis 5大数据类型命令解读

目录 Redis key的命令 1、redis字符串&#xff08;String&#xff09; 2、redis列表(List) 3、redis哈希表(Hash) 4、redis集合(Set) 5、redis有序集合(ZSet) Redis 命令网站&#xff1a;redis中文文档 Redis key的命令 命令说明示例keys *查看当前库所有的keykeys *…

Please No More Sigma(构造矩阵)

Please No More Sigma 给f(n)定义如下&#xff1a; f(n)1 n1,2; f(n)f(n-1)f(n-2) n>2; 给定n&#xff0c;求下式模1e97后的值 Input 第一行一个数字T&#xff0c;表示样例数 以下有T行&#xff0c;每行一个数&#xff0c;表示n。 保证T<100&#xff0c;n<100000…

linux安装并配置git连接github

git安装 sudo apt-get install git git信息配置 git config --global uer.name "yourname" git config --global user.email "youremail" 其中&#xff0c;yourname是你在github上配置的用户名&#xff0c;youremail是你在github上设置的邮箱 查看git…

计算机指令考前小记

RTL寄存器传送语言&#xff1a;简化对指令功能的说明 R[r]&#xff1a;存储器r的内容M[addr]&#xff1a;存储单元addr的内容M[R[r]]&#xff1a;寄存器r的内容所指的存储单元的内容 汇编指令movw 4(%ebp),%ax的RTL语言为&#xff1a;R[ax] <- M[R[ebp]4] 将寄存器EBP的内…

sqli-labs关卡14(基于post提交的双引号闭合的报错注入)通关思路

文章目录 前言一、回顾上一关知识点二、靶场第十四关通关思路1、判断注入点2、爆显位3、爆数据库名4、爆数据库表5、爆数据库列6、爆数据库关键信息 总结 前言 此文章只用于学习和反思巩固sql注入知识&#xff0c;禁止用于做非法攻击。注意靶场是可以练习的平台&#xff0c;不…

3D模型人物换装系统二(优化材质球合批降低DrawCall)

3D模型人物换装系统 介绍原理合批材质对比没有合批材质核心代码完整代码修改总结 介绍 本文使用2018.4.4和2020.3.26进行的测试 本文没有考虑法线贴图合并的问题&#xff0c;因为生成法线贴图有点问题&#xff0c;放在下一篇文章解决在进行优化 如果这里不太明白换装的流程可以…

SpringBoot之手写starter

SpringBoot之手写starter 在开始之前呢&#xff0c;我们需要了解一些概念 1、starter介绍 spring boot 在配置上相比spring要简单许多, 其核心在于spring-boot-starter, 在使用spring boot来搭建一个项目时, 只需要引入官方提供的starter, 就可以直接使用, 免去了各种配置。…

2390 高校实验室预约系统JSP【程序源码+文档+调试运行】

摘要 本文介绍了一个高校实验室预约系统的设计和实现。该系统包括管理员、教师和学生三种用户&#xff0c;具有基础数据管理、学生管理、教师管理、系统公告管理、实验室管理、实验室预约管理和系统管理等模块。通过数据库设计和界面设计&#xff0c;实现了用户友好的操作体验…