Android中system/bin/Input命令 -- Android12

news2024/11/17 13:44:48

IMS:Android中Input命令--Android12

  • 1、Android12 Input命令更新
    • 1.1 shell脚本
    • 1.2 InputShellCommand#onCommand 命令解析
  • 2、Input相关命令参数
    • 2.1 text
    • 2.2 keyevent
    • 2.3 tap
    • 2.4 swipe
    • 2.5 draganddrop
    • 2.6 press
    • 2.7 roll
    • 2.8 motionevent
    • 2.9 keycombination
    • 2.10 默认handleDefaultCommands(arg)

android12-release


1、Android12 Input命令更新

在这里插入图片描述

ANdroid12之前可查看一下 IMS:injectInputEvent注入Input事件,Android12更新相关代码:
frameworks/base/services/core/java/com/android/server/input/InputManagerService.java
frameworks/base/services/core/java/com/android/server/input/InputShellCommand.java
frameworks/base/core/java/android/os/ShellCommand.java
frameworks/libs/modules-utils/java/com/android/modules/utils/BasicShellCommandHandler.java

emulator64_x86_64_arm64:/system/bin # input -d

Exception occurred while executing '-d':
java.lang.IllegalArgumentException: Argument expected after "-d"
        at com.android.modules.utils.BasicShellCommandHandler.getNextArgRequired(BasicShellCommandHandler.java:295)
        at com.android.server.input.InputShellCommand.getDisplayId(InputShellCommand.java:85)
        at com.android.server.input.InputShellCommand.onCommand(InputShellCommand.java:182)
        at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
        at android.os.ShellCommand.exec(ShellCommand.java:38)
        at com.android.server.input.InputManagerService.onShellCommand(InputManagerService.java:3478)
        at android.os.Binder.shellCommand(Binder.java:950)
        at android.os.Binder.onTransact(Binder.java:834)
        at android.hardware.input.IInputManager$Stub.onTransact(IInputManager.java:1125)
        at android.os.Binder.execTransactInternal(Binder.java:1184)
        at android.os.Binder.execTransact(Binder.java:1143)
255|emulator64_x86_64_arm64:/system/bin # input keyevent KEYCODE_VOLUME_UP

1.1 shell脚本

input脚本使用cmd bin执行,获取到Input服务Context.INPUT_SERVICE,通过IBinder::shellCommand(service, ......)最终调用的InputManagerService服务端onShellCommand方法
在这里插入图片描述

frameworks/base/cmds/input/input

#!/system/bin/sh
cmd input "$@"

frameworks/native/cmds/cmd/cmd.cpp

int cmdMain(const std::vector<std::string_view>& argv, TextOutput& outputLog, TextOutput& errorLog,
            int in, int out, int err, RunMode runMode) {
    sp<ProcessState> proc = ProcessState::self();
    proc->startThreadPool();

#if DEBUG
    ALOGD("cmd: starting");
#endif
    sp<IServiceManager> sm = defaultServiceManager();
    if (runMode == RunMode::kStandalone) {
        fflush(stdout);
    }
    if (sm == nullptr) {
        ALOGW("Unable to get default service manager!");
        errorLog << "cmd: Unable to get default service manager!" << endl;
        return 20;
    }

    int argc = argv.size();

    if (argc == 0) {
        errorLog << "cmd: No service specified; use -l to list all running services. Use -w to start and wait for a service." << endl;
        return 20;
    }

    if ((argc == 1) && (argv[0] == "-l")) {
        Vector<String16> services = sm->listServices();
        services.sort(sort_func);
        outputLog << "Currently running services:" << endl;

        for (size_t i=0; i<services.size(); i++) {
            sp<IBinder> service = sm->checkService(services[i]);
            if (service != nullptr) {
                outputLog << "  " << services[i] << endl;
            }
        }
        return 0;
    }

    bool waitForService = ((argc > 1) && (argv[0] == "-w"));
    int serviceIdx = (waitForService) ? 1 : 0;
    const auto cmd = argv[serviceIdx];

    Vector<String16> args;
    String16 serviceName = String16(cmd.data(), cmd.size());
    for (int i = serviceIdx + 1; i < argc; i++) {
        args.add(String16(argv[i].data(), argv[i].size()));
    }
    sp<IBinder> service;
    if(waitForService) {
        service = sm->waitForService(serviceName);
    } else {
        service = sm->checkService(serviceName);
    }

    if (service == nullptr) {
        if (runMode == RunMode::kStandalone) {
            ALOGW("Can't find service %.*s", static_cast<int>(cmd.size()), cmd.data());
        }
        errorLog << "cmd: Can't find service: " << cmd << endl;
        return 20;
    }

    sp<MyShellCallback> cb = new MyShellCallback(errorLog);
    sp<MyResultReceiver> result = new MyResultReceiver();

#if DEBUG
    ALOGD("cmd: Invoking %.*s in=%d, out=%d, err=%d",
          static_cast<int>(cmd.size()), cmd.data(), in, out, err);
#endif

    // TODO: block until a result is returned to MyResultReceiver.
    status_t error = IBinder::shellCommand(service, in, out, err, args, cb, result);
    if (error < 0) {
        const char* errstr;
        switch (error) {
            case BAD_TYPE: errstr = "Bad type"; break;
            case FAILED_TRANSACTION: errstr = "Failed transaction"; break;
            case FDS_NOT_ALLOWED: errstr = "File descriptors not allowed"; break;
            case UNEXPECTED_NULL: errstr = "Unexpected null"; break;
            default: errstr = strerror(-error); break;
        }
        if (runMode == RunMode::kStandalone) {
            ALOGW("Failure calling service %.*s: %s (%d)", static_cast<int>(cmd.size()), cmd.data(),
                  errstr, -error);
        }
        outputLog << "cmd: Failure calling service " << cmd << ": " << errstr << " (" << (-error)
                  << ")" << endl;
        return error;
    }

    cb->mActive = false;
    status_t res = result->waitForResult();
#if DEBUG
    ALOGD("result=%d", (int)res);
#endif
    return res;
}

1.2 InputShellCommand#onCommand 命令解析

frameworks/base/services/core/java/com/android/server/input/InputShellCommand.java
frameworks/base/core/java/android/os/ShellCommand.java
frameworks/libs/modules-utils/java/com/android/modules/utils/BasicShellCommandHandler.java

  • "text"runText(inputSource, displayId);
  • "keyevent"runKeyEvent(inputSource, displayId);
  • "tap"runTap(inputSource, displayId);
  • "swipe"runSwipe(inputSource, displayId);
  • "draganddrop"runDragAndDrop(inputSource, displayId);
  • "press"runPress(inputSource, displayId);
  • "roll"runRoll(inputSource, displayId);
  • "motionevent"runMotionEvent(inputSource, displayId);
  • "keycombination"runKeyCombination(inputSource, displayId);
  • handleDefaultCommands(arg);
@Override
public final int onCommand(String cmd) {
    String arg = cmd;
    int inputSource = InputDevice.SOURCE_UNKNOWN;
    // Get source (optional).
    if (SOURCES.containsKey(arg)) {
        inputSource = SOURCES.get(arg);
        arg = getNextArgRequired();
    }

    // Get displayId (optional).
    int displayId = INVALID_DISPLAY;
    if ("-d".equals(arg)) {
        displayId = getDisplayId();
        arg = getNextArgRequired();
    }

    try {
        if ("text".equals(arg)) {
            runText(inputSource, displayId);
        } else if ("keyevent".equals(arg)) {
            runKeyEvent(inputSource, displayId);
        } else if ("tap".equals(arg)) {
            runTap(inputSource, displayId);
        } else if ("swipe".equals(arg)) {
            runSwipe(inputSource, displayId);
        } else if ("draganddrop".equals(arg)) {
            runDragAndDrop(inputSource, displayId);
        } else if ("press".equals(arg)) {
            runPress(inputSource, displayId);
        } else if ("roll".equals(arg)) {
            runRoll(inputSource, displayId);
        }  else if ("motionevent".equals(arg)) {
            runMotionEvent(inputSource, displayId);
        } else if ("keycombination".equals(arg)) {
            runKeyCombination(inputSource, displayId);
        } else {
            handleDefaultCommands(arg);
        }
    } catch (NumberFormatException ex) {
        throw new IllegalArgumentException(INVALID_ARGUMENTS + arg);
    }
    return 0;
}

2、Input相关命令参数

2.1 text

input text c 输入键盘字符,injectInputEvent注入KeyEvent事件

在这里插入图片描述

private void sendText(int source, final String text, int displayId) {
    final StringBuilder buff = new StringBuilder(text);
    boolean escapeFlag = false;
    for (int i = 0; i < buff.length(); i++) {
        if (escapeFlag) {
            escapeFlag = false;
            if (buff.charAt(i) == 's') {
                buff.setCharAt(i, ' ');
                buff.deleteCharAt(--i);
            }
        }
        if (buff.charAt(i) == '%') {
            escapeFlag = true;
        }
    }

    final char[] chars = buff.toString().toCharArray();
    final KeyCharacterMap kcm = KeyCharacterMap.load(KeyCharacterMap.VIRTUAL_KEYBOARD);
    final KeyEvent[] events = kcm.getEvents(chars);
    for (int i = 0; i < events.length; i++) {
        KeyEvent e = events[i];
        if (source != e.getSource()) {
            e.setSource(source);
        }
        e.setDisplayId(displayId);
        injectKeyEvent(e);
    }
}

2.2 keyevent

input keyevent KEYCODE_VOLUME_UP KeyEvent中对应的KEYCODE_*事件,injectInputEvent注入KeyEvent事件
在这里插入图片描述

在这里插入图片描述

private void runKeyEvent(int inputSource, int displayId) {
    String arg = getNextArgRequired();
    final boolean longpress = "--longpress".equals(arg);
    if (longpress) {
        arg = getNextArgRequired();
    } else {
        final boolean doubleTap = "--doubletap".equals(arg);
        if (doubleTap) {
            arg = getNextArgRequired();
            final int keycode = KeyEvent.keyCodeFromString(arg);
            sendKeyDoubleTap(inputSource, keycode, displayId);
            return;
        }
    }

    do {
        final int keycode = KeyEvent.keyCodeFromString(arg);
        sendKeyEvent(inputSource, keycode, longpress, displayId);
    } while ((arg = getNextArg()) != null);
}

private void sendKeyEvent(int inputSource, int keyCode, boolean longpress, int displayId) {
    final long now = SystemClock.uptimeMillis();

    KeyEvent event = new KeyEvent(now, now, KeyEvent.ACTION_DOWN, keyCode, 0 /* repeatCount */,
            0 /*metaState*/, KeyCharacterMap.VIRTUAL_KEYBOARD, 0 /*scancode*/, 0 /*flags*/,
            inputSource);
    event.setDisplayId(displayId);

    injectKeyEvent(event);
    if (longpress) {
        // Some long press behavior would check the event time, we set a new event time here.
        final long nextEventTime = now + ViewConfiguration.getGlobalActionKeyTimeout();
        injectKeyEvent(KeyEvent.changeTimeRepeat(event, nextEventTime, 1 /* repeatCount */,
                KeyEvent.FLAG_LONG_PRESS));
    }
    injectKeyEvent(KeyEvent.changeAction(event, KeyEvent.ACTION_UP));
}

2.3 tap

input tap 1000 2000 坐标点(x, y)的MotionEvent点解事件,injectInputEvent注入MotionEvent事件

在这里插入图片描述

private void runTap(int inputSource, int displayId) {
    inputSource = getSource(inputSource, InputDevice.SOURCE_TOUCHSCREEN);
    sendTap(inputSource, Float.parseFloat(getNextArgRequired()),
            Float.parseFloat(getNextArgRequired()), displayId);
}

private void sendTap(int inputSource, float x, float y, int displayId) {
    final long now = SystemClock.uptimeMillis();
    injectMotionEvent(inputSource, MotionEvent.ACTION_DOWN, now, now, x, y, 1.0f,
            displayId);
    injectMotionEvent(inputSource, MotionEvent.ACTION_UP, now, now, x, y, 0.0f, displayId);
}

2.4 swipe

input swipe 1000 2000 100 200 从坐标点(x1, y1)滑动到坐标点(x2, y2)的MotionEvent事件,injectInputEvent注入MotionEvent事件

在这里插入图片描述

private void runSwipe(int inputSource, int displayId) {
    inputSource = getSource(inputSource, InputDevice.SOURCE_TOUCHSCREEN);
    sendSwipe(inputSource, displayId, false);
}

private void sendSwipe(int inputSource, int displayId, boolean isDragDrop) {
    // Parse two points and duration.
    final float x1 = Float.parseFloat(getNextArgRequired());
    final float y1 = Float.parseFloat(getNextArgRequired());
    final float x2 = Float.parseFloat(getNextArgRequired());
    final float y2 = Float.parseFloat(getNextArgRequired());
    String durationArg = getNextArg();
    int duration = durationArg != null ? Integer.parseInt(durationArg) : -1;
    if (duration < 0) {
        duration = 300;
    }

    final long down = SystemClock.uptimeMillis();
    injectMotionEvent(inputSource, MotionEvent.ACTION_DOWN, down, down, x1, y1, 1.0f,
            displayId);
    if (isDragDrop) {
        // long press until drag start.
        try {
            Thread.sleep(ViewConfiguration.getLongPressTimeout());
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }
    long now = SystemClock.uptimeMillis();
    final long endTime = down + duration;
    while (now < endTime) {
        final long elapsedTime = now - down;
        final float alpha = (float) elapsedTime / duration;
        injectMotionEvent(inputSource, MotionEvent.ACTION_MOVE, down, now,
                lerp(x1, x2, alpha), lerp(y1, y2, alpha), 1.0f, displayId);
        now = SystemClock.uptimeMillis();
    }
    injectMotionEvent(inputSource, MotionEvent.ACTION_UP, down, now, x2, y2, 0.0f,
            displayId);
}

2.5 draganddrop

input draganddrop 1000 2000 100 200 与参数swipe 不同的是isDragDrop=true从坐标点(x1, y1)拖拽到坐标点(x2, y2)的MotionEvent事件,injectInputEvent注入MotionEvent事件

private void sendSwipe(int inputSource, int displayId, boolean isDragDrop) {
    // Parse two points and duration.
    final float x1 = Float.parseFloat(getNextArgRequired());
    final float y1 = Float.parseFloat(getNextArgRequired());
    final float x2 = Float.parseFloat(getNextArgRequired());
    final float y2 = Float.parseFloat(getNextArgRequired());
    String durationArg = getNextArg();
    int duration = durationArg != null ? Integer.parseInt(durationArg) : -1;
    if (duration < 0) {
        duration = 300;
    }

    final long down = SystemClock.uptimeMillis();
    injectMotionEvent(inputSource, MotionEvent.ACTION_DOWN, down, down, x1, y1, 1.0f,
            displayId);
    if (isDragDrop) {
        // long press until drag start.
        try {
            Thread.sleep(ViewConfiguration.getLongPressTimeout());
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }
    long now = SystemClock.uptimeMillis();
    final long endTime = down + duration;
    while (now < endTime) {
        final long elapsedTime = now - down;
        final float alpha = (float) elapsedTime / duration;
        injectMotionEvent(inputSource, MotionEvent.ACTION_MOVE, down, now,
                lerp(x1, x2, alpha), lerp(y1, y2, alpha), 1.0f, displayId);
        now = SystemClock.uptimeMillis();
    }
    injectMotionEvent(inputSource, MotionEvent.ACTION_UP, down, now, x2, y2, 0.0f,
            displayId);
}

private void runDragAndDrop(int inputSource, int displayId) {
    inputSource = getSource(inputSource, InputDevice.SOURCE_TOUCHSCREEN);
    sendSwipe(inputSource, displayId, true);
}

2.6 press

input press 与参数tap不同的是规定固定在(0,0)的SOURCE_TRACKBALL事件,injectInputEvent注入MotionEvent事件

private void sendTap(int inputSource, float x, float y, int displayId) {
    final long now = SystemClock.uptimeMillis();
    injectMotionEvent(inputSource, MotionEvent.ACTION_DOWN, now, now, x, y, 1.0f,
            displayId);
    injectMotionEvent(inputSource, MotionEvent.ACTION_UP, now, now, x, y, 0.0f, displayId);
}

private void runPress(int inputSource, int displayId) {
    inputSource = getSource(inputSource, InputDevice.SOURCE_TRACKBALL);
    sendTap(inputSource, 0.0f, 0.0f, displayId);
}

2.7 roll

input roll 1000 2000 就是MotionEvent.ACTION_MOVE事件,injectInputEvent注入MotionEvent事件

在这里插入图片描述

private void runRoll(int inputSource, int displayId) {
    inputSource = getSource(inputSource, InputDevice.SOURCE_TRACKBALL);
    sendMove(inputSource, Float.parseFloat(getNextArgRequired()),
            Float.parseFloat(getNextArgRequired()), displayId);
}

/**
 * Sends a simple zero-pressure move event.
 *
 * @param inputSource the InputDevice.SOURCE_* sending the input event
 * @param dx change in x coordinate due to move
 * @param dy change in y coordinate due to move
 */
private void sendMove(int inputSource, float dx, float dy, int displayId) {
    final long now = SystemClock.uptimeMillis();
    injectMotionEvent(inputSource, MotionEvent.ACTION_MOVE, now, now, dx, dy, 0.0f,
            displayId);
}

2.8 motionevent

input motionevent DOWN 1000 2000/input motionevent UP 1000 2000 就是MotionEvent各种事件,injectInputEvent注入MotionEvent事件

在这里插入图片描述

private int getAction() {
    String actionString = getNextArgRequired();
    switch (actionString.toUpperCase()) {
        case "DOWN":
            return MotionEvent.ACTION_DOWN;
        case "UP":
            return MotionEvent.ACTION_UP;
        case "MOVE":
            return MotionEvent.ACTION_MOVE;
        case "CANCEL":
            return MotionEvent.ACTION_CANCEL;
        default:
            throw new IllegalArgumentException("Unknown action: " + actionString);
    }
}

private void runMotionEvent(int inputSource, int displayId) {
    inputSource = getSource(inputSource, InputDevice.SOURCE_TOUCHSCREEN);
    int action = getAction();
    float x = 0, y = 0;
    if (action == MotionEvent.ACTION_DOWN
            || action == MotionEvent.ACTION_MOVE
            || action == MotionEvent.ACTION_UP) {
        x = Float.parseFloat(getNextArgRequired());
        y = Float.parseFloat(getNextArgRequired());
    } else {
        // For ACTION_CANCEL, the positions are optional
        String xString = getNextArg();
        String yString = getNextArg();
        if (xString != null && yString != null) {
            x = Float.parseFloat(xString);
            y = Float.parseFloat(yString);
        }
    }

    sendMotionEvent(inputSource, action, x, y, displayId);
}

private void sendMotionEvent(int inputSource, int action, float x, float y,
        int displayId) {
    float pressure = NO_PRESSURE;

    if (action == MotionEvent.ACTION_DOWN || action == MotionEvent.ACTION_MOVE) {
        pressure = DEFAULT_PRESSURE;
    }

    final long now = SystemClock.uptimeMillis();
    injectMotionEvent(inputSource, action, now, now, x, y, pressure, displayId);
}

2.9 keycombination

input keycombination KEYCODE_POWER KEYCODE_VOLUME_DOWN KeyEvent的组合按键,injectInputEvent连续注入KeyEvent事件

在这里插入图片描述

private void runKeyCombination(int inputSource, int displayId) {
    String arg = getNextArgRequired();
    ArrayList<Integer> keyCodes = new ArrayList<>();

    while (arg != null) {
        final int keyCode = KeyEvent.keyCodeFromString(arg);
        if (keyCode == KeyEvent.KEYCODE_UNKNOWN) {
            throw new IllegalArgumentException("Unknown keycode: " + arg);
        }
        keyCodes.add(keyCode);
        arg = getNextArg();
    }

    // At least 2 keys.
    if (keyCodes.size() < 2) {
        throw new IllegalArgumentException("keycombination requires at least 2 keycodes");
    }

    sendKeyCombination(inputSource, keyCodes, displayId);
}

private void injectKeyEventAsync(KeyEvent event) {
    InputManager.getInstance().injectInputEvent(event,
            InputManager.INJECT_INPUT_EVENT_MODE_ASYNC);
}

private void sendKeyCombination(int inputSource, ArrayList<Integer> keyCodes, int displayId) {
    final long now = SystemClock.uptimeMillis();
    final int count = keyCodes.size();
    final KeyEvent[] events = new KeyEvent[count];
    for (int i = 0; i < count; i++) {
        final KeyEvent event = new KeyEvent(now, now, KeyEvent.ACTION_DOWN, keyCodes.get(i), 0,
                0 /*metaState*/, KeyCharacterMap.VIRTUAL_KEYBOARD, 0 /*scancode*/, 0 /*flags*/,
                inputSource);
        event.setDisplayId(displayId);
        events[i] = event;
    }

    for (KeyEvent event: events) {
        // Use async inject so interceptKeyBeforeQueueing or interceptKeyBeforeDispatching could
        // handle keys.
        injectKeyEventAsync(event);
    }

    try {
        Thread.sleep(ViewConfiguration.getTapTimeout());
    } catch (InterruptedException e) {
        e.printStackTrace();
    }

    for (KeyEvent event: events) {
        injectKeyEventAsync(KeyEvent.changeAction(event, KeyEvent.ACTION_UP));
    }
}

2.10 默认handleDefaultCommands(arg)

  • dump
    在这里插入图片描述 在这里插入图片描述

  • help
    在这里插入图片描述 在这里插入图片描述

  • "Unknown command: " 不识别
    在这里插入图片描述

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

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

相关文章

2023 WAIC图技术激活数据要素论坛圆满召开!

7月6日&#xff0c;以“智联世界 生成未来”为主题的2023世界人工智能大会&#xff08;WAIC 2023&#xff09;在上海隆重开幕。作为大会唯一的图技术论坛&#xff0c;“图技术激活数据要素论坛”也如期举行。 论坛现场&#xff0c;学术界专家学者、头部银行代表、产业界大咖齐聚…

二分图博弈(知识总结+例题)

思路来源 gzchenben的ppt 算法学习笔记(74): 二分图博弈 - 知乎 https://www.cnblogs.com/Zeardoe/p/16534557.html 知识点总结 以下部分摘自知乎&#xff1a;算法学习笔记(74): 二分图博弈 - 知乎 二分图博弈模型 给出一张二分图和起始点 H &#xff0c; A和B轮流操作…

Endnotes引用

准备不用zetro了&#xff0c;主要学校endnotes免费 该说不说&#xff0c;zetro拖入pdf直接识别并导入的功能是真的好用&#xff0c;添加备注也方便 可惜文献太多放不下了&#xff0c;扩容要加钱。 啧。算了算了。 这里主要介绍Endnotes中的文献怎么在word内引用&#xff0c…

SpringBoot 插件化开发模式,强烈推荐!

一、前言 插件化开发模式正在很多编程语言或技术框架中得以广泛的应用实践&#xff0c;比如大家熟悉的jenkins&#xff0c;docker可视化管理平台rancher&#xff0c;以及日常编码使用的编辑器idea&#xff0c;vscode等&#xff0c;随处可见的带有热插拔功能的插件&#xff0c;…

BitLocker 驱动器加密管理

为了有效地保护数字数据&#xff0c;应对其进行加密&#xff0c;以便只有授权用户才能访问。BitLocker 是某些 Windows 操作系统上可用的本机加密工具&#xff0c;可以为个人用户轻松加密Windows计算机。 什么是 BitLocker 加密 BitLocker 加密是 Windows 操作系统的内置安全…

STM32实现气压传感器测量(BMP180)

目录 0.接线设计 1.功能描述 2.四种方式实现大气压采集 3.模块选择 4.编程环境 5.模块主要参数 6.代码实现 1&#xff09;标准库模拟IIC实现气压值采集 2&#xff09;标准库硬件IIC实现气压值采集 3&#xff09;HAL库模拟IIC实现气压值采集 4&#xff09;HAL库硬件IIC实…

分享一次腾讯云轻量应用服务器被攻击

腾讯云轻量应用服务器&#xff0c;centOS。在上面装了redis、rabbit mq等服务&#xff0c;开着端口&#xff0c;结果被入侵了。 发现问题是通过腾讯云发来的邮件&#xff0c; 首先进到主机安全控制台&#xff0c;左侧这里进主机列表 然后可以看到自己的主机情况&#xff0c;防…

ROS:机器人系统仿真

目录 一、概念二、作用2.1仿真优势:2.2仿真缺陷: 三、组件3.1URDF3.2rviz3.3gazebo 一、概念 通过计算机对实体机器人系统进行模拟的技术&#xff0c;在 ROS 中&#xff0c;仿真实现涉及的内容主要有三:对机器人建模(URDF)、创建仿真环境(Gazebo)以及感知环境(Rviz)等系统性实…

HTML特性(attribute)和DOM属性(property)

文章目录 定义位置不同attributeproperty 范围不同属性映射行为区别数据类型不同大小写敏感区别相同属性返回值可能不同DOM 属性具有写保护 定义位置不同 attribute 是 HTML 标签上的某个属性&#xff0c;如 id、class、value 等以及自定义属性,定义后会呈现在标签上 proper…

赛效:如何在线编辑图片

1&#xff1a;点击导航栏里的“图片编辑”。 2&#xff1a;点击打开图片或者拖放打开图片。 3&#xff1a;左侧几十种工具&#xff0c;你可以用来在线编辑图片。 4&#xff1a;编辑完成后点击页面右上角的“下载”按钮&#xff0c;根据提示登录账号下载图片就可以了。 如果你想…

2023广州建博会:鸿雁总裁王米成详解全屋智能的发展脉络

全屋智能落地的模式有很多&#xff0c;但鸿雁依托其智能面板优势&#xff0c;逐渐探索出一条属于鸿雁的全屋智能发展路径和商业模式。 智哪儿创始人、总编彭安军&#xff08;左&#xff09;&#xff0c;鸿雁电器总裁王米成&#xff08;右&#xff09; 在2023年的广州建博会上&a…

【Linux从入门到放弃】进程状态的理解以及什么是僵尸进程和孤儿进程?

&#x1f9d1;‍&#x1f4bb;作者&#xff1a; 情话0.0 &#x1f4dd;专栏&#xff1a;《Linux从入门到放弃》 &#x1f466;个人简介&#xff1a;一名双非编程菜鸟&#xff0c;在这里分享自己的编程学习笔记&#xff0c;欢迎大家的指正与点赞&#xff0c;谢谢&#xff01; 文…

你知道什么是基于StyleNeRF的conditional GAN模型吗

随着深度学习技术的不断发展&#xff0c;生成对抗网络&#xff08;GAN&#xff09;已经成为了人工智能研究和应用中的重要组成部分。其中&#xff0c;GAN可以被用来生成高质量的图像、视频等内容&#xff0c;这为娱乐产业和数字化制作带来了新的机遇和挑战。本文将介绍一种基于…

numpy 笔记 pad

1 基本介绍 对原本的矩阵进行填充 numpy.pad(array, pad_width, modeconstant, **kwargs) array待填充的矩阵pad_width要填充的位置mode填充方式 2 参数举例 2.0 使用的数据 import numpy as np anp.arange(12).reshape(3,4) aarray([[ 0, 1, 2, 3],[ 4, 5, 6, 7],…

【分布式 】 ELK 企业级日志分析系统

目录 一、ELK概述1.1 ELK简介1.2 为什么要使用ELK1.3 完整日志系统基本特征1.4 ELK的工作原理 二、搭建ELK2.1 ELK Elasticsearch 集群部署&#xff08;在Node1、Node2节点上操作&#xff09;node1 操作node2 同node1操作 2.2 安装 Elasticsearch-head 插件ELK Logstash 部署&a…

作为一个测试工程师,你选择python还是java?

问&#xff1a;“你平时工作中&#xff0c;用java多还是用python多”&#xff1f; 答&#xff1a;“都还可以&#xff0c;根据具体的场景选择不同的语言”。 问&#xff1a;“比如说呢”&#xff1f; 答&#xff1a;“开发自己的测试平台&#xff0c;肯定会选择java&#xf…

Stable Diffusion - ControlNet 插件中扩展局部重绘 InpaintOnly + LaMa 的算法与应用

欢迎关注我的CSDN&#xff1a;https://spike.blog.csdn.net/ 本文地址&#xff1a;https://spike.blog.csdn.net/article/details/131643131 LaMa: https://github.com/advimman/lama Paper: Resolution-robust Large Mask Inpainting with Fourier Convolutions LaMa: Large…

ActiveMQ详细入门教程系列

一、什么是消息中间件 两个系统或两个客户端之间进行消息传送&#xff0c;利用高效可靠的消息传递机制进行平台无关的数据交流&#xff0c;并基于数据通信来进行分布式系统的集成。通过提供消息传递和消息排队模型&#xff0c;它可以在分布式环境下扩展进程间的通信。 消息中…

ABeam中国2023社招 | ABeam旗下德硕管理咨询(深圳)招贤纳士

岗位需求 SAP Basis顾问 岗位职责 ■ 参与公司的SAP售前项目&#xff0c;负责Basis相关工作的方案制定 ■ 参与公司既有SAP运维项目&#xff0c;负责Basis相关的课题对应&#xff0c;系统改善等 ■ 负责SAP系统的Basis实施&#xff0c;SAP产品系统安装、升级、迁移、数据归档…

spring-java面向切面拦截器

切面&#xff0c;就是可以在代码执行的时候&#xff0c;在它执行的前面添加一个东西&#xff0c;一般我们用来做登陆拦截器验证以及敏感词的过滤。 他就3个东西&#xff0c;指定切点&#xff08;要执行的代码&#xff09;&#xff0c;before代码执行前面加东西。after代码后加东…