容器运行应用及Docker命令

文章目录

  • 一、使用容器运行Nginx应用
    • 1_使用docker run命令运行Nginx应用
      • 1 观察下载容器镜像过程
      • 2 观察容器运行情况
    • 2_访问容器中运行的Nginx服务
      • 1 确认容器IP地址
      • 2 容器网络说明
      • 3 使用curl命令访问
  • 二、Docker命令
    • 1_Docker命令获取帮助方法
    • 2_Docker官网提供的命令说明
    • 3_docker命令应用
      • 1 docker run
      • 2 docker ps
      • 3 docker inspect
      • 4 docker exec
      • 5 docker attach
      • 6 docker stop
      • 7 docker start
      • 8 docker top
      • 9 docker rm

一、使用容器运行Nginx应用

1_使用docker run命令运行Nginx应用

1 观察下载容器镜像过程

查找本地容器镜像文件

执行命令过程一:下载容器镜像

[root@localhost ~]# docker run -d nginx:latest
Unable to find image 'nginx:latest' locally
latest: Pulling from library/nginx
a2abf6c4d29d: Downloading  1.966MB/31.36MB 下载中
a9edb18cadd1: Downloading  1.572MB/25.35MB
589b7251471a: Download complete 下载完成
186b1aaa4aa6: Download complete
b4df32aa5a72: Waiting 等待下载
a0bcbecc962e: Waiting

执行命令过程二:下载容器镜像

[root@localhost ~]# docker run -d nginx:latest
Unable to find image 'nginx:latest' locally
latest: Pulling from library/nginx
a2abf6c4d29d: Downloading  22.87MB/31.36MB
a9edb18cadd1: Downloading  22.78MB/25.35MB
589b7251471a: Waiting
186b1aaa4aa6: Waiting
b4df32aa5a72: Waiting

执行命令过程三:下载容器镜像

[root@localhost ~]# docker run -d nginx:latest
Unable to find image 'nginx:latest' locally
latest: Pulling from library/nginx
a2abf6c4d29d: Pull complete 下载完成
a9edb18cadd1: Pull complete
589b7251471a: Pull complete
186b1aaa4aa6: Pull complete
b4df32aa5a72: Waiting 等待下载

2 观察容器运行情况

[root@localhost ~]# docker run -d nginx:latest
9834c8c18a7c7c89ab0ea4119d11bafe9c18313c8006bc02ce57ff54d9a1cc0c
命令解释说明
docker run启动一个容器
-d把容器镜像中需要执行的命令以daemon(守护进程)的方式运行
nginx应用容器镜像的名称,通常表示该镜像为某一个软件
latest表示上述容器镜像的版本,表示最新版本,用户可自定义其标识,例如v1或v2等
[root@localhost ~]# docker ps
CONTAINER ID   IMAGE        COMMAND                  CREATED          STATUS        PORTS     NAMES
9834c8c18a7c   nginx:latest "/docker-entrypoint.…"   24 seconds ago   Up 23 seconds 80/tcp condescending_pare

命令解释

docker ps 类似于Linux系统的ps命令,查看正在运行的容器,如果想查看没有运行的容器,需要在此命令后使用 --all

输出内容解释

CONTAINERIDIMAGECOMMANDCREATEDSTATUSPORTSNAMES
9834c8c18a7cnginx:latest“/docker-entrypoint.…”24 seconds agoUp 23 seconds80/tcpcondescending_pare
容器ID容器镜像容器中运行的命令容器创建时间容器状态容器提供访问应用端口容器名称

2_访问容器中运行的Nginx服务

1 确认容器IP地址

实际工作中不需要此步操作,9834 是容器ID缩写。

[root@localhost ~]# docker inspect 9834c8c18a7c
 
 "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "172.17.0.2", 容器IP地址
            "IPPrefixLen": 16,
            "IPv6Gateway": "",
            "MacAddress": "02:42:ac:11:00:02",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "d3de2fdbc30ee36a55c1431ef3ae4578392e552009f00b2019b4720735fe5a60",
                    "EndpointID": "d91f47c9f756ff22dc599a207164f2e9366bd0c530882ce0f08ae2278fb3d50c",
                    "Gateway": "172.17.0.1",
                    "IPAddress": "172.17.0.2",   容器IP地址
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:11:00:02",
                    "DriverOpts": null
                }
            }
        }
    }
]

命令解释

docker inspect 为查看容器结构信息命令

9834 为前面生成的容器ID号前4位,使用这个ID号时,由于其较长,使用时能最短识别即可。

2 容器网络说明

在这里插入图片描述

查看系统网络接口信息

ip a s # ip addr show

docker0网桥,用于为容器提供桥接,转发到主机之外的网络

5: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:d5:c3:d4:cc brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:d5ff:fec3:d4cc/64 scope link
       valid_lft forever preferred_lft forever

与容器中的虚拟网络设备在同一个命名空间中,用于把容器中的网络连接到主机

9: veth393dece@if8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default
    link/ether 02:e3:11:58:54:0f brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::e3:11ff:fe58:540f/64 scope link
       valid_lft forever preferred_lft forever

3 使用curl命令访问

返回结果,表示访问成功!

[root@localhost ~]# curl 172.17.0.2
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

二、Docker命令

1_Docker命令获取帮助方法

[root@localhost ~]# docker -h
Flag shorthand -h has been deprecated, use --help

Usage:  docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

Common Commands:
  run         Create and run a new container from an image
  exec        Execute a command in a running container
  ps          List containers
  build       Build an image from a Dockerfile
  pull        Download an image from a registry
  push        Upload an image to a registry
  images      List images
  login       Authenticate to a registry
  logout      Log out from a registry
  search      Search Docker Hub for images
  version     Show the Docker version information
  info        Display system-wide information

Management Commands:
  builder     Manage builds
  buildx*     Docker Buildx
  compose*    Docker Compose
  container   Manage containers
  context     Manage contexts
  image       Manage images
  manifest    Manage Docker image manifests and manifest lists
  network     Manage networks
  plugin      Manage plugins
  system      Manage Docker
  trust       Manage trust on Docker images
  volume      Manage volumes

Swarm Commands:
  swarm       Manage Swarm

Commands:
  attach      Attach local standard input, output, and error streams to a running container
  commit      Create a new image from a container's changes
  cp          Copy files/folders between a container and the local filesystem
  create      Create a new container
  diff        Inspect changes to files or directories on a container's filesystem
  events      Get real time events from the server
  export      Export a container's filesystem as a tar archive
  history     Show the history of an image
  import      Import the contents from a tarball to create a filesystem image
  inspect     Return low-level information on Docker objects
  kill        Kill one or more running containers
  load        Load an image from a tar archive or STDIN
  logs        Fetch the logs of a container
  pause       Pause all processes within one or more containers
  port        List port mappings or a specific mapping for the container
  rename      Rename a container
  restart     Restart one or more containers
  rm          Remove one or more containers
  rmi         Remove one or more images
  save        Save one or more images to a tar archive (streamed to STDOUT by default)
  start       Start one or more stopped containers
  stats       Display a live stream of container(s) resource usage statistics
  stop        Stop one or more running containers
  tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
  top         Display the running processes of a container
  unpause     Unpause all processes within one or more containers
  update      Update configuration of one or more containers
  wait        Block until one or more containers stop, then print their exit codes

Global Options:
      --config string      Location of client config files (default "/root/.docker")
  -c, --context string     Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with "docker context use")
  -D, --debug              Enable debug mode
  -H, --host list          Daemon socket to connect to
  -l, --log-level string   Set the logging level ("debug", "info", "warn", "error", "fatal") (default "info")
      --tls                Use TLS; implied by --tlsverify
      --tlscacert string   Trust certs signed only by this CA (default "/root/.docker/ca.pem")
      --tlscert string     Path to TLS certificate file (default "/root/.docker/cert.pem")
      --tlskey string      Path to TLS key file (default "/root/.docker/key.pem")
      --tlsverify          Use TLS and verify the remote
  -v, --version            Print version information and quit

Run 'docker COMMAND --help' for more information on a command.

For more help on how to use Docker, head to https://docs.docker.com/go/guides/

2_Docker官网提供的命令说明

网址链接:https://docs.docker.com/reference/

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

3_docker命令应用

1 docker run

docker run -i -t --name c1 centos:latest bash
[root@948f234e22a1 /]#
命令解释
docker run运行一个命令在容器中,命令是主体,没有命令容器就会消亡
-i交互式
-t提供终端
–name c1把将运行的容器命名为c1
centos:latest使用centos最新版本容器镜像
bash在容器中执行的命令

注意看主机名

[root@948f234e22a1 /]#

查看网络信息

[root@948f234e22a1 /]# ip a s
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
12: eth0@if13: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:ac:11:00:03 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 172.17.0.3/16 brd 172.17.255.255 scope global eth0
       valid_lft forever preferred_lft forever

查看进程

[root@948f234e22a1 /]# ps aux
USER        PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root          1  0.0  0.1  12036  2172 pts/0    Ss   09:58   0:00 bash
root         16  0.0  0.0  44652  1784 pts/0    R+   10:02   0:00 ps aux

查看用户

[root@948f234e22a1 /]# cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
games:x:12:100:games:/usr/games:/sbin/nologin
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:65534:65534:Kernel Overflow User:/:/sbin/nologin
dbus:x:81:81:System message bus:/:/sbin/nologin
systemd-coredump:x:999:997:systemd Core Dumper:/:/sbin/nologin
systemd-resolve:x:193:193:systemd Resolver:/:/sbin/nologin

查看目录(跟我们系统基本一样)

[root@948f234e22a1 /]# pwd
/
[root@948f234e22a1 /]# ls
bin  etc   lib    lost+found  mnt  proc  run   srv  tmp  var
dev  home  lib64  media       opt  root  sbin  sys  usr

退出命令执行,观察容器运行情况

[root@948f234e22a1 /]# exit
exit
[root@localhost ~]#

2 docker ps

[root@localhost ~]# docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

命令解释

docker ps 查看正在运行的容器,本案例由于没有命令在容器中运行,因此容器被停止了,所以本次查看没有结果。

[root@localhost ~]# docker ps --all
CONTAINER ID   IMAGE           COMMAND     CREATED             STATUS                         PORTS     NAMES
948f234e22a1   centos:latest   "bash"    10 minutes ago      Exited (0) 2 minutes ago                    c1
CONTAINERIDIMAGECOMMANDCREATEDSTATUSPORTSNAMES
948f234e22a1centos:latest“bash”10 minutes agoExited (0) 2 minutes agoc1

命令解释

docker ps --all 可以查看正在运行的和停止运行的容器

3 docker inspect

[root@localhost ~]# docker run -it --name c2 centos:latest bash
[root@b4182fd1f2cc /]# 

操作说明

在上述提示符处按住ctrl键,再按p键与q键,可以退出交互式的容器,容器会处于运行状态。

[root@localhost ~]# docker ps
CONTAINER ID   IMAGE           COMMAND   CREATED              STATUS              PORTS     NAMES
b4182fd1f2cc   centos:latest   "bash"    About a minute ago   Up About a minute             c2

命令解释

可以看到容器处于运行状态

[root@localhost ~]# docker inspect c2
"Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "d3de2fdbc30ee36a55c1431ef3ae4578392e552009f00b2019b4720735fe5a60",
                    "EndpointID": "d1a2b7609f2f73a6cac67229a4395eef293f695c0ac4fd6c9c9e6913c9c85c1c",
                    "Gateway": "172.17.0.1",
                    "IPAddress": "172.17.0.2",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:11:00:02",
                    "DriverOpts": null
                }
            }
        }
    }
]

命令解释

docker inpect 查看容器详细信息

4 docker exec

[root@localhost ~]# docker exec -it c2 ls /root
anaconda-ks.cfg  anaconda-post.log  original-ks.cfg
命令解释
docker exec在容器外实现与容器交互执行某命令
-it交互式
c2正在运行的容器名称
ls /root在正在运行的容器中运行相关的命令

下面命令与上面命令执行效果一致

[root@localhost ~]# docker exec c2 ls /root
anaconda-ks.cfg
anaconda-post.log
original-ks.cfg

5 docker attach

查看正在运行的容器

[root@localhost ~]# docker ps
CONTAINER ID   IMAGE           COMMAND   CREATED         STATUS         PORTS     NAMES
b4182fd1f2cc   centos:latest   "bash"    8 minutes ago   Up 8 minutes             c2
ef02ada6ba49   nginx:latest    "/docker-entrypoint.…"   2 hours ago      Up 4 seconds   80/tcp    cool_bardeen

进入容器内部

[root@localhost ~]# docker attach c2
[root@b4182fd1f2cc /]# 
命令解释
docker attach类似于ssh命令,可以进入到容器中
c2正在运行的容器名称

说明

docker attach 退出容器时,如不需要容器再运行,可直接使用exit退出;如需要容器继续运行,可使用ctrl+p+q

另外由于另外一个 nginx 容器并不是交互式的,所以不允许我们进入内部,如果尝试的话会卡住

docker attach cool_bardeen # 卡住,并且Ctrl+c退出时容器也会随之停止

6 docker stop

[root@localhost ~]# docker ps
CONTAINER ID   IMAGE           COMMAND   CREATED          STATUS          PORTS     NAMES
b4182fd1f2cc   centos:latest   "bash"    11 minutes ago   Up 11 minutes             c2
[root@localhost ~]# docker stop b4182
b4182
[root@localhost ~]# docker ps --all
CONTAINER ID   IMAGE           COMMAND                   CREATED             STATUS                         PORTS     NAMES
b4182fd1f2cc   centos:latest   "bash"                    12 minutes ago      Exited (0) 28 seconds ago                c2

支持批量停止以及使用容器名称

7 docker start

[root@localhost ~]# docker ps --all
CONTAINER ID   IMAGE           COMMAND                   CREATED             STATUS                         PORTS     NAMES
b4182fd1f2cc   centos:latest   "bash"                    12 minutes ago      Exited (0) 28 seconds ago                c2
[root@localhost ~]# docker start b4182
b4182
[root@localhost ~]# docker ps
CONTAINER ID   IMAGE           COMMAND   CREATED          STATUS          PORTS     NAMES
b4182fd1f2cc   centos:latest   "bash"    14 minutes ago   Up 16 seconds             c2

还可以批量开启,以及使用容器名称代替容器ID

8 docker top

在Docker Host查看容器中运行的进程信息

docker top c2

如下输出

UIDPIDPPIDCSTIMETTYTIMECMD
root394835394784018:37pts/000:00:00bash

命令解释

输出信息说明
UID容器中运行的命令用户ID
PID容器中运行的命令PID
PPID容器中运行的命令父PID,由于PPID是一个容器,此可指为容器在Docker Host中进程ID
C占用CPU百分比
STIME启动时间
TTY运行所在的终端
TIME运行时间
CMD执行的命令
[root@localhost ~]# ps aux | grep 394784
root      394784  0.0  0.4 1237928 15756 ?       Sl   05:43   0:00 /usr/bin/containerd-shim-runc-v2 -namespace moby -id b4182fd1f2ccfea5799bd63206ed562c38e53b18c93def3a56262fd73122e8ab -address /run/containerd/containerd.sock
root      408828  0.0  0.0 221680  2304 pts/0    S+   05:47   0:00 grep --color=auto 394784
[root@localhost ~]# ps aux | grep 394835
root      394835  0.0  0.0  12052  3200 pts/0    Ss+  05:43   0:00 bash
root      399829  0.0  0.0 221680  2304 pts/0    S+   05:44   0:00 grep --color=auto 394835
[root@localhost ~]# docker exec -it c2 ps -ef
UID          PID    PPID  C STIME TTY          TIME CMD
root           1       0  0 21:43 pts/0    00:00:00 bash
root          14       0  0 21:45 pts/1    00:00:00 ps -ef

docker top 查看container内进程信息,指在docker host上查看,与docker exec -it c2 ps -ef不同。

另外一个容器中运行多个进程也是存在的,可以尝试去访问 nginx 看看。

9 docker rm

如果容器已停止,使用此命令可以直接删除;如果容器处于运行状态,则需要提前关闭容器后,再删除容器。

下面演示容器正在运行关闭后删除的方法。

指定删除容器

[root@localhost ~]# docker ps
CONTAINER ID   IMAGE           COMMAND   CREATED          STATUS          PORTS     NAMES
b4182fd1f2cc   centos:latest   "bash"    30 minutes ago   Up 16 minutes             c2

停止容器

docker stop c2 # 或 docker stop b4182fd1f2cc

删除容器

docker rm c2 # 或 docker rm b4182fd1f2cc

批量删除容器

-a--all 是等价的

[root@localhost ~]# docker ps -a 
CONTAINER ID   IMAGE           COMMAND                   CREATED             STATUS                        PORTS     NAMES
3bd60ca310ca   centos:latest   "bash"                    About an hour ago   Exited (127) 48 minutes ago             c1
c71fb30f25da   nginx:latest    "/docker-entrypoint.…"   2 hours ago         Exited (0) 2 hours ago                  zen_swirles
ef02ada6ba49   nginx:latest    "/docker-entrypoint.…"   2 hours ago         Exited (0) 20 minutes ago               cool_bardeen

批量删除容器:

docker ps --all | awk '{if (NR>=2){print $1}}' | xargs docker rm

上述命令可以把第一个命令执行的结果看作文本作为 awk 输入;awk 将从第二行开始,每行的第一个元素(元素以空格作为分隔)输出作为 xargs 的输入。


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

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

相关文章

网络(TCP)

目录 TCP socket API 详解 套接字有哪些类型&#xff1f;socket有哪些类型&#xff1f; 图解TCP四次握手断开连接 图解TCP数据报结构以及三次握手&#xff08;非常详细&#xff09; socket缓冲区以及阻塞模式详解 再谈UDP和TCP bind(): 我们的程序中对myaddr参数是这样…

如何将快捷指令添加到启动台

如何将快捷指令添加到启动台/Finder/访达&#xff08;Mac&#xff09; 1. 打开快捷指令创建快捷指令 示例创建了一个文件操作测试的快捷指令。 2. 右键选择添加到程序坞 鼠标放在待添加的快捷指令上。 3. 右键添加到访达 鼠标放在待添加的快捷指令上。 之后就可以在启…

4.5 TCP 报文段的首部格式

欢迎大家订阅【计算机网络】学习专栏&#xff0c;开启你的计算机网络学习之旅&#xff01; 文章目录 前言1 TCP 报文段的基本结构2 固定部分2.1 源端口与目的端口2.2 序号2.3 确认号2.4 数据偏移2.5 保留字段2.6 控制位2.7 窗口2.8 检验和2.9 紧急指针 3 可变部分3.1 选项3.2 填…

计算机视觉——相机标定(Camera Calibration)

文章目录 1. 简介2. 原理3. 相机模型3.1 四大坐标系3.2 坐标系间的转换关系3.2.1 世界坐标系到相机坐标系3.2.2 相机坐标系到图像坐标系3.2.3 像素坐标系转换为图像坐标系3.2.4 世界坐标转换为像素坐标 3.3 畸变3.3.1 畸变类型3.3.1.1 径向畸变&#xff08;Radial Distortion&a…

线程条件变量 生产者消费者模型 Linux环境 C语言实现

只能用来解决同步问题&#xff0c;且不能独立使用&#xff0c;必须配合互斥锁一起用 头文件&#xff1a;#include <pthread.h> 类型&#xff1a;pthread_cond_t PTHREAD_COND_INITIALIZER 初始化 初始化&#xff1a;int pthread_cond_init(pthread_cond_t * cond, NULL);…

Springboot美食分享平台

私信我获取源码和万字论文&#xff0c;制作不易&#xff0c;感谢点赞支持。 Springboot美食分享平台 一、 绪论 1.1 研究意义 当今社会作为一个飞速的发展社会&#xff0c;网络已经完全渗入人们的生活&#xff0c; 网络信息已成为传播的第一大媒介&#xff0c; 可以毫不夸张…

爬虫(JAVA笔记第四十期)

p.s.这是萌新自己自学总结的笔记&#xff0c;如果想学习得更透彻的话还是请去看大佬的讲解 目录 正则表达式爬虫 正则表达式 正则表达式可以用来校验字符串是否满足一定的规则&#xff0c;并用来校验数据格式的合法性&#xff1b;也可以在一段文本中查找满足要求的内容 单字符…

【实战教程】小目标检测利器:使用YOLOv8和SAHI进行视频检测,检测效果真心不错

《------往期经典推荐------》 一、AI应用软件开发实战专栏【链接】 项目名称项目名称1.【人脸识别与管理系统开发】2.【车牌识别与自动收费管理系统开发】3.【手势识别系统开发】4.【人脸面部活体检测系统开发】5.【图片风格快速迁移软件开发】6.【人脸表表情识别系统】7.【…

Hbase整合Mapreduce案例1 hdfs数据上传至hbase中——wordcount

目录 整合结构准备java API 编写pom.xmlMain.javaMap.javaReduce 运行 整合结构 准备 上传hdfs data.txt数据 data.txt I am wunaiieq QAQ 123456 Who I am In todays interconnected world the role of technology cannot be overstated It has revolutionized the way we …

【机器学习】—Transformers的扩展应用:从NLP到多领域突破

好久不见&#xff01;喜欢就关注吧~ 云边有个稻草人-CSDN博客 目录 引言 一、Transformer架构解析 &#xff08;一&#xff09;、核心组件 &#xff08;二&#xff09;、架构图 二、领域扩展&#xff1a;从NLP到更多场景 1. 自然语言处理&#xff08;NLP&#xff09; 2…

AMEYA360 | 杭晶电子:晶振在AR/VR中的应用

晶振在AR/VR设备中扮演重要角色&#xff0c;为其核心电子系统提供稳定的时钟信号&#xff0c;确保设备的高性能运行。 以下是晶振在AR/VR应用中的具体作用&#xff1a; 01、图像处理与同步 1、晶振为图形处理单元(GPU)和显示芯片提供精准的时钟信号&#xff0c;支持高速图像渲染…

肝硬化腹水的症状表现

‌肝硬化腹水的症状表现多样‌&#xff1a; ‌全身症状‌ 疲倦乏力&#xff0c;体力明显下降。 皮肤干枯粗糙&#xff0c;面色灰暗黝黑&#xff0c;有时可见黄疸。 双下肢浮肿&#xff0c;甚至出现蜘蛛痣、肝掌等体征‌ ‌消化道症状‌ 食欲减退&#xff0c;常伴有恶心、呕…

困扰解决:mfc140u.dll丢失的解决方法,多种有效解决方法全解析

当电脑提示“mfc140u.dll丢失”时&#xff0c;这可能会导致某些程序无法正常运行&#xff0c;给用户带来不便。不过&#xff0c;有多种方法可以尝试解决这个问题。这篇文章将以“mfc140u.dll丢失的解决方法”为主题&#xff0c;教大家有效解决mfc140u.dll丢失。 判断是否是“mf…

汽车IVI中控开发入门及进阶(三十六):QML调用蓝牙sdk的架构

Qt/QML本身在做GUI界面工程时,除了各种界面上的按钮、图片、工具条等元素之外,最方便的就是可以通过C++实现界面各种复杂逻辑,而实现上不可避免就需要一些外部库的支持,不管是静态库.a还是动态库.so,比如蓝牙模块。 而QML/C++启动一个蓝牙协议栈SDK作为一个进程,然后启动…

【SARL】单智能体强化学习(Single-Agent Reinforcement Learning)《纲要》

&#x1f4e2;本篇文章是博主强化学习&#xff08;RL&#xff09;领域学习时&#xff0c;用于个人学习、研究或者欣赏使用&#xff0c;并基于博主对相关等领域的一些理解而记录的学习摘录和笔记&#xff0c;若有不当和侵权之处&#xff0c;指出后将会立即改正&#xff0c;还望谅…

ES常见问题汇总

ES常见问题汇总 1.Es的作用&#xff08;elasticsearch&#xff09; 作用&#xff1a; elasticsearch是一款非常强大的开源搜索引擎&#xff0c;具备非常多强大功能&#xff0c;可以帮助我们从海量数据中快速找到需要的内容 ELK技术栈 elasticsearch结合kibana、Logstash&…

C# 动态类型 Dynamic

文章目录 前言1. 什么是 Dynamic&#xff1f;2. 声明 Dynamic 变量3. Dynamic 的运行时类型检查4. 动态类型与反射的对比5. 使用 Dynamic 进行动态方法调用6. Dynamic 与 原生类型的兼容性7. 动态与 LINQ 的结合8. 结合 DLR 特性9. 动态类型的性能考虑10. 何时使用 Dynamic&…

【08】MySQL复杂查询:子查询语句详解与示例

文章目录 一、子查询的基本概念子查询的基本结构子查询的类型 二、标量子查询示例 1&#xff1a;标量子查询示例 2&#xff1a;标量子查询与IN组合 三、多行子查询示例 1&#xff1a;多行子查询与IN示例 2&#xff1a;多行子查询与ANY 四、多列子查询示例 1&#xff1a;多列子查…

ApiPost调试问题

在使用ApiPost调试接口时&#xff0c;发现传参老是传不过去&#xff0c;最后发现json格式中开头需要小写(哪怕后端名称是大写)

微信 创建小程序码-有数量限制

获取小程序码&#xff1a;小程序码为圆图&#xff0c;有数量限制。 目录 文档 接口地址 功能描述 注意事项 请求参数 对接 获取小程序码 调用获取 小程序码示例 总结 文档 接口地址 https://api.weixin.qq.com/wxa/getwxacode?access_tokenaccess_token 功能描述 …