windows主机中构建适用于K8S Operator开发环境

基于win 10 打造K8S应用开发环境(wsl & kind)

一、wsl子系统安装

1.1 确认windows系统版本

cmd/powershell
在这里插入图片描述
或者win + r 运行winver
在这里插入图片描述

操作系统要>= 19044
在这里插入图片描述

1.2 开启wsl功能

控制面板 -> 程序 -> 启用或关闭Windows功能
开启适用于Linux的windows子系统 & 虚拟机平台
在这里插入图片描述
确认完成后,电脑会重启。

1.3 wsl配置

wsl
适用于 Linux 的 Windows 子系统没有已安装的分发版。
可以通过访问 Microsoft Store 来安装分发版:
https://aka.ms/wslstore#更改新分发的默认安装版本为2
wsl --set-default-version 2
#WSL 2 内核更新
wsl --update#获得有效分发列表
wsl --list --online#安装Ubuntu
wsl --install -d Ubuntu

启动ubuntu

C:\WINDOWS\system32>wsl
Provisioning the new WSL instance Ubuntu
This might take a while...
Create a default Unix user account: test
New password:
Retype new password:
passwd: password updated successfully
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.Welcome to Ubuntu 24.04.2 LTS (GNU/Linux 5.15.167.4-microsoft-standard-WSL2 x86_64)* Documentation:  https://help.ubuntu.com* Management:     https://landscape.canonical.com* Support:        https://ubuntu.com/proSystem information as of Fri Apr 11 10:27:41 CST 2025System load:  0.57                Processes:             34Usage of /:   0.1% of 1006.85GB   Users logged in:       0Memory usage: 3%                  IPv4 address for eth0: 192.168.137.113Swap usage:   0%This message is shown once a day. To disable it please create the
/home/test/.hushlogin file.

1.4 解决在WSL上虚拟机无法连通外网问题

在 WSL(Windows Subsystem for Linux)上使用 NAT(网络地址转换)模式时,虚拟机无法连通外网是一个常见问题

检查DNS:
DNS 配置问题会导致无法连接外网。可以尝试以下步骤:
1.备份并删除自动生成的文件:

sudo cp /etc/wsl.conf /etc/wsl.conf.bk
sudo cp /etc/resolv.conf /etc/resolv.conf.bk
sudo rm /etc/resolv.conf || true
sudo rm /etc/wsl.conf || true

2.重新创建配置文件:

sudo bash -c 'cat <<EOF > /etc/wsl.conf
[network]
generateResolvConf = false
EOF'

3.重新创建 DNS 配置:

sudo bash -c 'cat <<EOF > /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
EOF'

1.5 wsl命令解释

获取帮助文档

wsl --help
版权所有(c) Microsoft Corporation。保留所有权利。用法: wsl.exe [Argument] [Options...] [CommandLine]运行 Linux 二进制文件的参数:如果未提供命令行,wsl.exe 将启动默认 shell。--exec, -e <CommandLine>在不使用默认 Linux Shell 的情况下执行指定的命令。--按原样传递其余命令行。选项:--cd <Directory>将指定目录设置为当前工作目录。如果使用了 ~,则将使用 Linux 用户的主页路径。如果路径以 / 字符开头,将被解释为绝对 Linux 路径。否则,该值一定是绝对 Windows 路径。--distribution, -d <Distro>运行指定分发。--user, -u <UserName>以指定用户身份运行。管理适用于 Linux 的 Windows 子系统的参数:--help显示用法信息。--install [选项]安装额外的适用于 Linux 的 Windows 子系统分发。要获得有效分发列表,请使用“wsl --list --online”。选项:--distribution, -d [参数]按名称下载并安装分发。参数:有效分发名称(不区分大小写)。示例:wsl --install -d Ubuntuwsl --install --distribution Debian--set-default-version <Version>更改新分发的默认安装版本。--shutdown立即终止所有运行的分发及 WSL 2轻型实用工具虚拟机。--status显示适用于 Linux 的 Windows 子系统的状态。--update [Options]如果未指定任何选项,则将 WSL 2 内核更新为最新版本。选项:--rollback恢复为 WSL 2 内核的先前版本。--inbox仅更新收件箱 WSL 2 内核。不要从 Microsoft Store 下载 WSL。--web-download从 Internet 而不是 Microsoft Store 下载最新版本的 WSL。用于管理适用于 Linux 的 Windows 子系统中的分发的参数:--export <Distro> <FileName>将分发导出到 tar 文件。对于标准输出,文件名可以是 ---import <Distro> <InstallLocation> <FileName> [Options]将指定的 tar 文件作为新分发导入。对于标准输入,文件名可以是 -。选项:--version <Version>指定要用于新分发的版本。--list, -l [Options]列出分发。选项:--all列出所有分发,包括当前正在安装或卸载的分发。--running仅列出当前正在运行的分发。--quiet, -q仅显示分发名称。--verbose, -v显示所有分发的详细信息。--online, -o显示使用“wsl --install”进行安装的可用分发列表。--set-default, -s <分发>将分发设置为默认值。--set-version <分发> <版本>更改指定分发的版本。--terminate, -t <分发>终止指定的分发。--unregister <分发>注销分发并删除根文件系统。

更改新分发的默认安装版本为2

wsl --set-default-version 2

WSL 2 内核更新

wsl --update

获得有效分发列表

wsl --list --online

安装额外的适用于 Linux 的 Windows 子系统分发Ubuntu

wsl --install -d Ubuntu

运行指定分发。

wsl -d Ubuntu

运行默认的分发

wsl

列出分发并显示版本

wsl -l -v

将Ubuntu分发设置为默认值

wsl --set-default Ubuntu

终止指定的分发。将Runing变成Stopped

wsl --terminate Ubuntu

注销分发并删除根文件系统。

wsl --unregister Ubuntu

显示适用于 Linux 的 Windows 子系统的状态。

wsl --status
默认分发: Ubuntu
默认版本: 2

以指定用户身份运行

wsl --user root
root@DESKTOP-KCURLDV:/mnt/c/Users/Administrator#

二、安装Docker Desktop

2.1 下载docker Desktop

https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe?utm_source=docker&utm_medium=webreferral&utm_campaign=dd-smartbutton&utm_location=module&_gl=1*5ht9ce*_gcl_au*MjQwMDkyNDQ0LjE3NDQxMTQzMzg.*_ga*MTM1ODM2MjU5NS4xNzQ0MTE0MzEx*_ga_XJWPQMJYHQ*MTc0NDExNDMxMS4xLjEuMTc0NDExNjM4OC41MC4wLjA.

2.2 安装以及设置
一步步安装就行。

docker配置如下图所示
在这里插入图片描述
在这里插入图片描述

三、Golang安装

功能:可以安装多个golang版本,可以切换golang版本

root@DESKTOP-KCURLDV:~# bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
Cloning from https://github.com/moovweb/gvm.git to /root/.gvm
No existing Go versions detected
ERROR: Missing requirements.
Installed GVM v1.0.22Please restart your terminal session or to get started right away run`source /root/.gvm/scripts/gvm`# source /root/.gvm/scripts/gvm
ERROR: Missing requirements.

如果不执行source /root/.gvm/scripts/gvm需要退出Ubuntu终端,再登入即可有gvm命令


# gvm versionCould not find bisonlinux: apt-get install bisonCould not find gcclinux: apt-get install gccCould not find makelinux: apt-get install makeERROR: Missing requirements.# apt-get update
# apt-get install bison gcc make
# gvm version
Go Version Manager v1.0.22 installed at /root/.gvm# gvm
Usage: gvm [command]Description:GVM is the Go Version ManagerCommands:version    - print the gvm version numberget        - gets the latest code (for debugging)use        - select a go version to use (--default to set permanently)diff       - view changes to Go roothelp       - display this usage textimplode    - completely remove gvminstall    - install go versionsuninstall  - uninstall go versionscross      - install go cross compilerslinkthis   - link this directory into GOPATHlist       - list installed go versionslistall    - list available versionsalias      - manage go version aliasespkgset     - manage go packages setspkgenv     - edit the environment for a package setapplymod   - apply the go version in go.mod
# gvm listallgvm gos (available)go1go1.0.1go1.0.2go1.0.3go1.1....# gvm install go1.19 -B
Installing go1.19 from binary source
# gvm install go1.20.3 -B
Installing go1.20.3 from binary source# gvm use go1.19
Now using version go1.19# gvm list
gvm gos (installed)=> go1.19go1.20.3
# gvm use go1.20.3
# gvm listgvm gos (installed)go1.19
=> go1.20.3

四、kubectl安装

启动Docker 并指定wsl为Ubuntu后,会在Ubuntu安装docker和kubectl命令。
如果没有kubectl命令可以手动安装

curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin

Kind 只负责创建集群(会配置好 kubeconfig)

五、Golang安装下载

5.1 下载安装地址(傻瓜式)

https://www.jetbrains.com/go/download/#section=windows
在这里插入图片描述

5.2 创建Project

在这里插入图片描述

location:     \\wsl$\Ubuntu\root\aiops
GOROOT:       \\wsl$\Ubuntu\root\.gvm\gos\go1.19

在这里插入图片描述

5.3 无法访问\wsl$\Ubuntu\root\解决

在这里插入图片描述
原因分析:
因此,我查找了WSL官方文档(WSL 的文件权限 | Microsoft Learn),发现其给出如下解释
在这里插入图片描述
即Windows访问Linux的文件的权限是由WSL分发版(如Ubuntu)的默认用户决定的,安装WSL分发版时会创建一个用户,一般会使用该用户登录,因此我们需要修改默认用户。

解决方案:

C:\Users\Administrator>ubuntu config --default-user rootC:\Users\Administrator>wsl -l -vNAME              STATE           VERSION
* Ubuntu            Running         2docker-desktop    Running         2C:\Users\Administrator>wsl
test@DESKTOP-KCURLDV:/mnt/c/Users/Administrator$ cat /etc/wsl.conf
[boot]
systemd=true[user]
default=test
test@DESKTOP-KCURLDV:/mnt/c/Users/Administrator$ vi /etc/wsl.conf
test@DESKTOP-KCURLDV:/mnt/c/Users/Administrator$ sudo vi /etc/wsl.conf
[boot]
systemd=true[user]
#default=test
test@DESKTOP-KCURLDV:/mnt/c/Users/Administrator$

在终端使用如下命令将默认用户变更为root(注意:ubuntu处需要根据你安装的Linux版本改变,可用如下命令查看你的Linux发行版名称),然后使用wsl命令打开Linux终端,正常来说就会以root用户登录,同时也可以直接在Windows的资源管理器中以root身份访问Linux文件。

拥有root权限可能会对虚拟机的安全造成威胁,例如从Windows入侵Linux文件系统。因此建议在执行完相关文件上传任务后,将默认用户改为普通用户(也可以改变需要访问的文件或文件夹的权限,例如sudo chmod 777 XXX,但会相对麻烦)。


C:\Users\Administrator>wsl -l -vNAME              STATE           VERSION
* Ubuntu            Running         2docker-desktop    Running         2如果执行以上命令后仍未变更默认用户,则可能是在Linux中使用了配置文件,使用如下命令查看并注释掉相关配置即可。(有时可能需要重启wsl)
```bash
C:\Users\Administrator>wsl --terminate Ubuntu
操作成功完成。C:\Users\Administrator>wsl
root@DESKTOP-KCURLDV:/mnt/c/Users/Administrator#

5.4 编写test.go并运行

在这里插入图片描述

package mainimport "fmt"func main() {fmt.Println("Hello World")
}

在这里插入图片描述

在这里插入图片描述

如果出现报错
package test is not in GOROOT

解决:GO111MODULE修改为on
命令为go env -w GO111MODULE=on

root@DESKTOP-KCURLDV:~/aiops# go env
GO111MODULE="on" # 修改为on
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/root/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/root/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/root/.gvm/gos/go1.19"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/root/.gvm/gos/go1.19/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/root/aiops/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3377041513=/tmp/go-build -gno-record-gcc-switches"       

六、kind安装

Kind是Kubernetes In Docker的缩写,顾名思义,看起来是把k8s放到docker的意思。
kind创建k8s集群的基本原理就是:提前准备好k8s节点的镜像,通过docker启动容器,来模拟k8s的节点,从而组成完整的k8s集群。
需要注意,kind创建的集群仅可用于开发、学习、测试等
不能用于生产环境。

创建、启动k8s集群非常快速,资源消耗较低。
支持创建多节点的k8s集群,包括高可用模式。
kind 支持Linux,macos and windows
它是CNCF认证的k8s集群安装方式之一。
在这里插入图片描述安装kind:

#通过设置 gvm use 命令的 --default 参数来指定默认的 Go 版本,这样每次新建终端时就不需要手动指定了
# gvm use go1.19 --default 
Now using version go1.19# go install sigs.k8s.io/kind@latest
go: downloading sigs.k8s.io/kind v0.27.0
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/spf13/cobra v1.8.0
go: downloading al.essio.dev/pkg/shellescape v1.5.1
go: downloading github.com/pkg/errors v0.9.1
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/pelletier/go-toml v1.9.5
go: downloading github.com/mattn/go-isatty v0.0.20
go: downloading sigs.k8s.io/yaml v1.4.0
go: downloading github.com/BurntSushi/toml v1.4.0
go: downloading github.com/evanphx/json-patch/v5 v5.6.0
go: downloading github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2
go: downloading golang.org/x/sys v0.6.0
# kind version
kind v0.27.0 go1.19 linux/amd64# kind -h
kind creates and manages local Kubernetes clusters using Docker container 'nodes'Usage:kind [command]Available Commands:build       Build one of [node-image]completion  Output shell completion code for the specified shell (bash, zsh or fish)create      Creates one of [cluster]delete      Deletes one of [cluster]export      Exports one of [kubeconfig, logs]get         Gets one of [clusters, nodes, kubeconfig]help        Help about any commandload        Loads images into nodesversion     Prints the kind CLI versionFlags:-h, --help              help for kind-q, --quiet             silence all stderr output-v, --verbosity int32   info log verbosity, higher value produces more output--version           version for kindUse "kind [command] --help" for more information about a command.

注意docker版本和kind版本的兼容问题,如果部署失败可能是k8s版本过低

七、使用kind实现单节点k8s集群部署

在这里插入图片描述
kind部署的k8s与docker中的k8s无关.

# kind create cluster --name k8s-1 --image kindest/node:v1.25.16Creating cluster "k8s-1" ...✓ Ensuring node image (kindest/node:v1.25.16) 🖼✓ Preparing nodes 📦✓ Writing configuration 📜✓ Starting control-plane 🕹️✓ Installing CNI 🔌✓ Installing StorageClass 💾
Set kubectl context to "k8s-1-kind"
You can now use your cluster with:kubectl cluster-info --context kind-kindNot sure what to do next? 😅  Check out https://kind.sigs.k8s.io/docs/user/quick-start/# kubectl cluster-info --context kind-kind
Kubernetes control plane is running at https://127.0.0.1:38317
CoreDNS is running at https://127.0.0.1:38317/api/v1/namespaces/kube-system/services/kube-dns:dns/proxyTo further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.# kind get clusters
kind# kubectl get node
NAME                 STATUS   ROLES           AGE     VERSION
kind-control-plane   Ready    control-plane   5m37s   v1.25.16# kubectl get po -n kube-system
NAME                                         READY   STATUS    RESTARTS        AGE
coredns-565d847f94-6kvst                     1/1     Running   0               6m
coredns-565d847f94-d7nt8                     1/1     Running   0               6m
etcd-kind-control-plane                      1/1     Running   0               6m12s
kindnet-cxk26                                1/1     Running   0               6m
kube-apiserver-kind-control-plane            1/1     Running   0               6m15s
kube-controller-manager-kind-control-plane   1/1     Running   1 (5m16s ago)   6m15s
kube-proxy-h8g6p                             1/1     Running   0               6m
kube-scheduler-kind-control-plane            1/1     Running   1 (5m18s ago)   6m12s# kind delete clusters kind 
Deleted nodes: ["kind-control-plane"]
Deleted clusters: ["kind"]

八、使用kind实现多节点k8s集群部署

# cat <<EOF > kind.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
EOF# kind create cluster --image kindest/node:v1.25.16 --name kind --config kind.yaml
Creating cluster "kind" ...✓ Ensuring node image (kindest/node:v1.25.16) 🖼✓ Preparing nodes 📦 📦 📦✓ Writing configuration 📜✓ Starting control-plane 🕹️✓ Installing CNI 🔌✓ Installing StorageClass 💾✓ Joining worker nodes 🚜
Set kubectl context to "kind-kind"
You can now use your cluster with:kubectl cluster-info --context kind-kindNot sure what to do next? 😅  Check out https://kind.sigs.k8s.io/docs/user/quick-start/# kubectl get node
NAME                 STATUS   ROLES           AGE    VERSION
kind-control-plane   Ready    control-plane   2m1s   v1.25.16
kind-worker          Ready    <none>          86s    v1.25.16
kind-worker2         Ready    <none>          85s    v1.25.16# cat <<EOF > kind1.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
networking:disableDefaultCNI: truekubeProxyMode: "ipvs"
EOF# kind create cluster --image kindest/node:v1.25.16 --name kind1 --config kind1.yaml
Creating cluster "kind1" ...✓ Ensuring node image (kindest/node:v1.25.16) 🖼✓ Preparing nodes 📦 📦 📦✓ Writing configuration 📜✓ Starting control-plane 🕹️✓ Installing StorageClass 💾✓ Joining worker nodes 🚜
Set kubectl context to "kind-kind1"
You can now use your cluster with:kubectl cluster-info --context kind-kind1Not sure what to do next? 😅  Check out https://kind.sigs.k8s.io/docs/user/quick-start/#kubectl config current-context
kind-kind1
#kubectl config use-context kind-kind# kind delete clusters kind1
Deleted nodes: ["kind1-control-plane" "kind1-worker2" "kind1-worker"]
Deleted clusters: ["kind1"]# kind delete clusters kind
Deleted nodes: ["kind-control-plane" "kind-worker2" "kind-worker"]
Deleted clusters: ["kind"]

也可以创建多套K8S集群
使用–name 指定集群名称
使用kubectl config use-context 集群上下文名称即可切换集群。

# cat <<EOF > kind2.yaml
# a cluster with 3 control-plane nodes and 3 workers
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: control-plane
- role: control-plane
- role: worker
- role: worker
- role: worker
EOF#kind create cluster --image kindest/node:v1.25.16 --name kind2 --config kind2.yaml
Creating cluster "kind2" ...✓ Ensuring node image (kindest/node:v1.25.16) 🖼✓ Preparing nodes 📦 📦 📦 📦 📦 📦✓ Configuring the external load balancer ⚖️✓ Writing configuration 📜✓ Starting control-plane 🕹️✓ Installing CNI 🔌✓ Installing StorageClass 💾✓ Joining more control-plane nodes 🎮✓ Joining worker nodes 🚜
Set kubectl context to "kind-kind2"
You can now use your cluster with:#kubectl cluster-info --context kind-kind2Not sure what to do next? 😅  Check out https://kind.sigs.k8s.io/docs/user/quick-start/
root@DESKTOP-KCURLDV:~# kubectl cluster-info --context kind-kind2Kubernetes control plane is running at https://127.0.0.1:41983
CoreDNS is running at https://127.0.0.1:41983/api/v1/namespaces/kube-system/services/kube-dns:dns/proxyTo further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.# kubectl get nodes
NAME                   STATUS   ROLES           AGE     VERSION
kind2-control-plane    Ready    control-plane   4m27s   v1.25.16
kind2-control-plane2   Ready    control-plane   3m53s   v1.25.16
kind2-control-plane3   Ready    control-plane   2m17s   v1.25.16
kind2-worker           Ready    <none>          83s     v1.25.16
kind2-worker2          Ready    <none>          83s     v1.25.16
kind2-worker3          Ready    <none>          83s     v1.25.16

九、通过goland开发 部署描述文件,并部署到k8s集群

在这里插入图片描述

编写yaml

apiVersion: apps/v1
kind: Deployment
metadata:name: nginx
spec:selector:matchLabels:app: nginxtemplate:metadata:labels:app: nginxspec:containers:- name: nginximage: nginx:latestimagePullPolicy: IfNotPresentrestartPolicy: Always
# kubectl apply -f aiops/nginx.yaml
deployment.apps/nginx configured
# kubectl get po
NAME                    READY   STATUS    RESTARTS   AGE
nginx-d5f959df4-kcqq4   1/1     Running   0          4m12s

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

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

相关文章

计算机视觉色彩空间全解析:RGB、HSV与Lab的实战对比

计算机视觉色彩空间全解析&#xff1a;RGB、HSV与Lab的实战对比 一、前言二、RGB 色彩空间​2.1 RGB 色彩空间原理​2.1.1 基本概念​2.1.2 颜色混合机制​ 2.2 RGB 在计算机视觉中的应用​2.2.1 图像读取与显示​2.2.2 颜色识别​2.2.3 RGB 色彩空间的局限性​ 三、HSV 色彩空…

PyTorch多GPU训练实战:从零实现到ResNet-18模型

本文将介绍如何在PyTorch中实现多GPU训练&#xff0c;涵盖从零开始的手动实现和基于ResNet-18的简洁实现。代码完整可直接运行。 1. 环境准备与库导入 import torch from torch import nn from torch.nn import functional as F from d2l import torch as d2l from torchvisio…

micro介绍

micro介绍 Micro 的首要特点是易于安装&#xff08;它只是一个静态的二进制文件&#xff0c;没有任何依赖关系&#xff09;和易于使用Micro 支持完整的插件系统。插件是用 Lua 编写的&#xff0c;插件管理器可自动为你下载和安装插件。使用简单的 json 格式配置选项&#xff0…

Linux内核分页——线性地址结构

每个进程通过一个指针&#xff08;即进程的mm_struct→pgd&#xff09;指向其专属的页全局目录&#xff08;PGD&#xff09;&#xff0c;该目录本身存储在一个物理页框中。这个页框包含一个类型为pgd_t的数组&#xff0c;该类型是与架构相关的数据结构&#xff0c;定义在<as…

微信小程序开发:微信小程序上线发布与后续维护

微信小程序上线发布与后续维护研究 摘要 微信小程序作为移动互联网的重要组成部分,其上线发布与后续维护是确保其稳定运行和持续优化的关键环节。本文从研究学者的角度出发,详细探讨了微信小程序的上线发布流程、后续维护策略以及数据分析与用户反馈处理的方法。通过结合实…

分享一些使用DeepSeek的实际案例

文章目录 前言职场办公领域生活领域学习教育领域商业领域技术开发领域 前言 以下是一些使用 DeepSeek 的实际案例&#xff1a; DeepSeek使用手册资源链接&#xff1a;https://pan.quark.cn/s/fa502d9eaee1 职场办公领域 行业竞品分析&#xff1a;刚入职的小李被领导要求一天内…

flink iceberg写数据到hdfs,hive同步读取

目录 1、组件版本 环境变量配置 2、hadoop配置 hadoop-env.sh core-site.xml hdfs-site.xml mapred-site.xml yarn-site.xml 3、hive配置 hive-env.sh hive-site.xml HIVE LIB 原始JAR 4、flink配置集成HDFS和YARN 修改iceberg源码 编译iceberg-flink-runtime-1…

qq邮箱群发程序

1.界面设计 1.1 环境配置 在外部工具位置进行配置 1.2 UI界面设计 1.2.1 进入QT的UI设计界面 在pycharm中按顺序点击&#xff0c;进入UI编辑界面&#xff1a; 点击第三步后进入QT的UI设计界面&#xff0c;通过点击按钮进行界面设计&#xff0c;设计后进行保存到当前Pycharm…

【C++游戏引擎开发】第10篇:AABB/OBB碰撞检测

一、AABB(轴对齐包围盒) 1.1 定义 ​最小点: m i n = ( x min , y min , z min ) \mathbf{min} = (x_{\text{min}}, y_{\text{min}}, z_{\text{min}}) min=(xmin​,ymin​,zmin​)​最大点: m a x = ( x max , y max , z max ) \mathbf{max} = (x_{\text{max}}, y_{\text{…

大模型是如何把向量解码成文字输出的

hidden state 向量 当我们把一句话输入模型后&#xff0c;例如 “Hello world”&#xff1a; token IDs: [15496, 995]经过 Embedding Transformer 层后&#xff0c;会得到每个 token 的中间表示&#xff0c;形状为&#xff1a; hidden_states: (batch_size, seq_len, hidd…

C++指针(三)

个人主页:PingdiGuo_guo 收录专栏&#xff1a;C干货专栏 文章目录 前言 1.字符指针 1.1字符指针的概念 1.2字符指针的用处 1.3字符指针的操作 1.3.1定义 1.3.2初始化 1.4字符指针使用注意事项 2.数组参数&#xff0c;指针参数 2.1数组参数 2.1.1数组参数的概念 2.1…

生命篇---心肺复苏、AED除颤仪使用、海姆立克急救法、常见情况急救简介

生命篇—心肺复苏、AED除颤仪使用、海姆立克急救法、常见情况急救简介 文章目录 生命篇---心肺复苏、AED除颤仪使用、海姆立克急救法、常见情况急救简介一、前言二、急救1、心肺复苏&#xff08;CPR&#xff09;&#xff08;1&#xff09;适用情况&#xff08;2&#xff09;操作…

基于神经环路的神经调控可增强遗忘型轻度认知障碍患者的延迟回忆能力

简要总结 这篇文章提出了一种名为CcSi-MHAHGEL的框架&#xff0c;用于基于多站点、多图谱fMRI的功能连接网络&#xff08;FCN&#xff09;分析&#xff0c;以辅助自闭症谱系障碍&#xff08;ASD&#xff09;的识别。该框架通过多视图超边感知的超图嵌入学习方法&#xff0c;整合…

[WUSTCTF2020]level1

关键知识点&#xff1a;for汇编 ida64打开&#xff1a; 00400666 55 push rbp .text:0000000000400667 48 89 E5 mov rbp, rsp .text:000000000040066A 48 83 EC 30 sub rsp, 30h .text:000000…

cpp自学 day20(文件操作)

基本概念 程序运行时产生的数据都属于临时数据&#xff0c;程序一旦运行结束都会被释放 通过文件可以将数据持久化 C中对文件操作需要包含头文件 <fstream> 文件类型分为两种&#xff1a; 文本文件 - 文件以文本的ASCII码形式存储在计算机中二进制文件 - 文件以文本的…

Gartner发布软件供应链安全市场指南:软件供应链安全工具的8个强制功能、9个通用功能及全球29家供应商

攻击者的目标是由开源和商业软件依赖项、第三方 API 和 DevOps 工具链组成的软件供应链。软件工程领导者可以使用软件供应链安全工具来保护他们的软件免受这些攻击的连锁影响。 主要发现 越来越多的软件工程团队现在负责解决软件供应链安全 (SSCS) 需求。 软件工件、开发人员身…

备赛蓝桥杯-Python-考前突击

额&#xff0c;&#xff0c;离蓝桥杯开赛还有十个小时&#xff0c;最近因为考研复习节奏的问题&#xff0c;把蓝桥杯的优先级后置了&#xff0c;突然才想起来还有一个蓝桥杯呢。。 到目前为止python基本语法熟练了&#xff0c;再补充一些常用函数供明天考前再背背&#xff0c;算…

榕壹云外卖跑腿系统:基于Spring Boot+MySQL+UniApp的智慧生活服务平台

项目背景与需求分析 随着本地生活服务需求的爆发式增长&#xff0c;外卖、跑腿等即时配送服务成为现代都市的刚性需求。传统平台存在开发成本高、功能定制受限等问题&#xff0c;中小企业及创业团队极需一款轻量级、可快速部署且支持二次开发的外卖跑腿系统。榕壹云外卖跑腿系统…

使用Docker安装Gogs

1、拉取镜像 docker pull gogs/gogs 2、运行容器 # 创建/var/gogs目录 mkdir -p /var/gogs# 运行容器 # -d&#xff0c;后台运行 # -p&#xff0c;端口映射&#xff1a;(宿主机端口:容器端口)->(10022:22)和(10880:3000) # -v&#xff0c;数据卷映射&#xff1a;(宿主机目…

【antd + vue】Modal 对话框:修改弹窗标题样式、Modal.confirm自定义使用

一、标题样式 1、目标样式&#xff1a;修改弹窗标题样式 2、问题&#xff1a; 直接在对应css文件中修改样式不生效。 3、原因分析&#xff1a; 可能原因&#xff1a; 选择器权重不够&#xff0c;把在控制台找到的选择器直接复制下来&#xff0c;如果还不够就再加&#xff…