当前位置: 首页 > news >正文

鸿蒙系统开发【网络管理】

网络管理

介绍

此Demo展示如何查询网络详情、域名解析、网络状态监听等功能。

效果预览:

1

使用说明:

1.启动应用,在点击检查网络网络详情网络连接信息后,展示对应的信息;

2.在域名解析的模块下,输入对应的域名后,点击域名解析,展示解析的域名ip地址;

3.在网络监听模块下,开启网络监听后,展示当前监听的网络信息;关闭网络监听后,停止监听网络信息。

具体实现

使用@ohos.net.connection(网络连接管理)接口实现网络的详情、域名解析、网络监听等功能。代码:Index.ets

/***  * Copyright (c) 2023 Huawei Device Co., Ltd.*  * Licensed under the Apache License, Version 2.0 (the 'License');*  * you may not use this file except in compliance with the License.*  * You may obtain a copy of the License at*  **  *     http://www.apache.org/licenses/LICENSE-2.0*  **  * Unless required by applicable law or agreed to in writing, software*  * distributed under the License is distributed on an 'AS IS' BASIS,*  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.*  * See the License for the specific language governing permissions and*  * limitations under the License.**/import { connection } from '@kit.NetworkKit';
import { BusinessError } from '@kit.BasicServicesKit';
import { CommonConstant as Const } from '../common/Constant';
import { promptAction } from '@kit.ArkUI';
import { Logger } from '../utils/Logger';@Entry
@Component
struct Index {@State networkId: string = Const.NETWORK_ID;@State netMessage: string = Const.INIT_NET_MESSAGE;@State connectionMessage: string = Const.INIT_CONNECTION_MESSAGE;@State netStateMessage: string = '';@State hostName: string = '';@State ip: string = '';private controller: TabsController = new TabsController();private netHandle: connection.NetHandle | null = null;private netCon: connection.NetConnection | null = null;scroller: Scroller = new Scroller();aboutToDisappear(): void {this.unUseNetworkRegister;}build() {Column() {Text($r('app.string.network_title')).fontSize($r('app.float.title_font_size')).fontWeight(FontWeight.Bold).textAlign(TextAlign.Start).margin({ left: Const.WebConstant_TEN_PERCENT }).width(Const.WebConstant_FULL_WIDTH)Tabs({ controller: this.controller }) {TabContent() {Column() {Scroll() {Column() {Row() {Column() {Text($r('app.string.check_network')).fontSize($r('app.float.font_size')).padding({ top: $r('app.float.md_padding_margin'), left: $r('app.float.md_padding_margin') }).fontWeight(FontWeight.Bold).align(Alignment.Start).width(Const.WebConstant_FULL_WIDTH)Text(this.networkId).fontSize($r('app.float.font_size')).padding($r('app.float.md_padding_margin')).align(Alignment.Start).opacity($r('app.float.opacity')).width(Const.WebConstant_FULL_WIDTH)}.width(Const.WebConstant_SEVENTY_PERCENT)Column() {Button($r('app.string.check')).fontSize($r('app.float.sm_font_size')).height(Const.WebConstant_BUTTON_HEIGHT).margin({ top: $r('app.float.md_padding_margin') }).width(Const.WebConstant_BUTTON_SMALL_WIDTH).buttonStyle(ButtonStyleMode.NORMAL).onClick(() => {this.isNetworkAccess();})}.align(Alignment.TopStart).height(Const.WebConstant_FULL_HEIGHT).width(Const.WebConstant_THIRTY_PERCENT)}.borderRadius($r('app.float.md_border_radius')).margin({ left: $r('app.float.md_padding_margin'), right: $r('app.float.md_padding_margin') }).width(Const.WebConstant_NINETY_PERCENT).height(Const.WebConstant_TWELVE_PERCENT).backgroundColor($r('app.color.text_background'))Row() {Column() {Text($r('app.string.network_detail')).fontSize($r('app.float.font_size')).padding({ top: $r('app.float.md_padding_margin'), left: $r('app.float.md_padding_margin') }).fontWeight(FontWeight.Bold).height(Const.WebConstant_FORTY_PERCENT).width(Const.WebConstant_FULL_WIDTH)Text(this.netMessage).fontSize($r('app.float.font_size')).padding($r('app.float.md_padding_margin')).opacity($r('app.float.opacity')).height(Const.WebConstant_SIXTY_PERCENT).width(Const.WebConstant_FULL_WIDTH)}.width(Const.WebConstant_SEVENTY_PERCENT).align(Alignment.TopStart)Column() {Button($r('app.string.detail')).fontSize($r('app.float.sm_font_size')).height(Const.WebConstant_BUTTON_HEIGHT).margin({ top: $r('app.float.md_padding_margin') }).width(Const.WebConstant_BUTTON_SMALL_WIDTH).buttonStyle(ButtonStyleMode.NORMAL).onClick(() => {this.getNetworkMessage();})}.align(Alignment.TopStart).height(Const.WebConstant_FULL_HEIGHT).width(Const.WebConstant_THIRTY_PERCENT)}.borderRadius($r('app.float.md_border_radius')).margin($r('app.float.md_padding_margin')).width(Const.WebConstant_NINETY_PERCENT).height(Const.WebConstant_FIFTEEN_PERCENT).backgroundColor($r('app.color.text_background'))Row() {Column() {Text($r('app.string.network_connection_detail')).fontSize($r('app.float.font_size')).padding($r('app.float.md_padding_margin')).fontWeight(FontWeight.Bold).width(Const.WebConstant_FULL_WIDTH).align(Alignment.Start)Text(this.connectionMessage).fontSize($r('app.float.font_size')).opacity($r('app.float.opacity')).width(Const.WebConstant_NINETY_PERCENT).align(Alignment.Start)}.width(Const.WebConstant_SEVENTY_PERCENT).justifyContent(FlexAlign.Start)Column() {Button($r('app.string.detail')).fontSize($r('app.float.sm_font_size')).height(Const.WebConstant_BUTTON_HEIGHT).margin({ top: $r('app.float.md_padding_margin') }).width(Const.WebConstant_BUTTON_SMALL_WIDTH).buttonStyle(ButtonStyleMode.NORMAL).onClick(() => {this.getConnectionProperties();})}.width(Const.WebConstant_THIRTY_PERCENT)}.alignItems(VerticalAlign.Top).borderRadius($r('app.float.md_border_radius')).margin({left: $r('app.float.md_padding_margin'),right: $r('app.float.md_padding_margin'),bottom: $r('app.float.xl_padding_margin')}).width(Const.WebConstant_NINETY_PERCENT).backgroundColor($r('app.color.text_background'))}.alignItems(HorizontalAlign.Start)}}.height(Const.WebConstant_FULL_HEIGHT).alignItems(HorizontalAlign.Start)}.tabBar(Const.FIRST_TABS_BAR)TabContent() {Column() {Search({ placeholder: Const.SEARCH_PLACEHOLDER }).margin({ left: $r('app.float.md_padding_margin'), right: $r('app.float.md_padding_margin') }).width(Const.WebConstant_NINETY_PERCENT).searchButton(Const.SEARCH_BUTTON).onSubmit((value: string) => {this.hostName = value;this.parseHostName(this.hostName);})TextArea({ text: this.ip }).fontSize($r('app.float.lg_font_size')).width(Const.WebConstant_NINETY_PERCENT).height(Const.WebConstant_FIFTY_PERCENT).margin({ top: $r('app.float.md_padding_margin') }).borderRadius($r('app.float.md_border_radius')).focusOnTouch(false)}.height(Const.WebConstant_FULL_HEIGHT).justifyContent(FlexAlign.Start)}.tabBar(Const.SECOND_TABS_BAR)TabContent() {Column() {Row() {Text(Const.MONITOR_TITLE).fontSize($r('app.float.font_size')).margin($r('app.float.md_padding_margin')).fontWeight(FontWeight.Medium)Blank()Toggle({ type: ToggleType.Switch, isOn: false }).selectedColor(Color.Blue).margin({ right: $r('app.float.md_padding_margin') }).width($r('app.float.area_width')).height(Const.WebConstant_BUTTON_HEIGHT).onChange((isOn) => {if (isOn) {this.useNetworkRegister();} else {this.unUseNetworkRegister();}})}.height($r('app.float.button_height')).borderRadius($r('app.float.md_border_radius')).margin({ left: $r('app.float.md_padding_margin'), right: $r('app.float.md_padding_margin') }).width(Const.WebConstant_NINETY_PERCENT).backgroundColor($r('app.color.text_background'))TextArea({ text: this.netStateMessage }).fontSize($r('app.float.font_size')).width(Const.WebConstant_NINETY_PERCENT).height(Const.WebConstant_FIVE_HUNDRED).margin($r('app.float.md_padding_margin')).borderRadius($r('app.float.md_border_radius')).textAlign(TextAlign.Start).focusOnTouch(false)Button($r('app.string.clear')).fontSize($r('app.float.font_size')).width(Const.WebConstant_NINETY_PERCENT).height($r('app.float.area_height')).margin({left: $r('app.float.md_padding_margin'),right: $r('app.float.md_padding_margin'),bottom: $r('app.float.xxl_padding_margin')}).onClick(() => {this.netStateMessage = '';})Blank()}.height(Const.WebConstant_FULL_HEIGHT).justifyContent(FlexAlign.Start)}.tabBar(Const.THIRD_TABS_BAR_THREE)}.barWidth(Const.WebConstant_EIGHTY_PERCENT)}.width(Const.WebConstant_FULL_WIDTH)}isNetworkAccess() {connection.hasDefaultNet((error: BusinessError) => {if (error) {this.networkId = Const.NETWORK_ERROR;Logger.error('hasDefaultNet error:' + error.message);return;}this.netHandle = connection.getDefaultNetSync();this.networkId = Const.NETWORK_ID + JSON.stringify(this.netHandle);})}getNetworkMessage() {if (this.netHandle) {connection.getNetCapabilities(this.netHandle, (error, netCap) => {if (error) {this.netMessage = Const.NETWORK_TYPE_ERROR;Logger.error('getNetCapabilities error:' + error.message);return;}let netType = netCap.bearerTypes;for (let i = 0; i < netType.length; i++) {if (netType[i] === 0) {this.netMessage = Const.CELLULAR_NETWORK;} else if (netType[i] === 1) {this.netMessage = Const.WIFI_NETWORK;} else {this.netMessage = Const.OTHER_NETWORK;}}this.netMessage += 'networkCap:' + JSON.stringify(netCap.networkCap) + '\n';})}}getConnectionProperties() {connection.getDefaultNet().then((netHandle: connection.NetHandle) => {connection.getConnectionProperties(netHandle, (error: BusinessError, connectionProperties: connection.ConnectionProperties) => {if (error) {this.connectionMessage = Const.CONNECTION_PROPERTIES_ERROR;Logger.error('getConnectionProperties error:' + error.code + error.message);return;}this.connectionMessage = Const.CONNECTION_PROPERTIES_INTERFACE_NAME + connectionProperties.interfaceName+ Const.CONNECTION_PROPERTIES_DOMAINS + connectionProperties.domains+ Const.CONNECTION_PROPERTIES_LINK_ADDRESSES + JSON.stringify(connectionProperties.linkAddresses)+ Const.CONNECTION_PROPERTIES_ROUTES + JSON.stringify(connectionProperties.routes)+ Const.CONNECTION_PROPERTIES_LINK_ADDRESSES + JSON.stringify(connectionProperties.dnses)+ Const.CONNECTION_PROPERTIES_MTU + connectionProperties.mtu + '\n';})});}parseHostName(hostName: string) {this.ip = '';connection.getAddressesByName(hostName).then((data) => {for (let i = 0; i < data.length; i++) {this.ip += data[i].address + '\n';}}).catch((error: BusinessError) => {this.ip = Const.GET_ADDRESSES_ERROR;Logger.error('getAddressesByName error:' + error.message);})}useNetworkRegister() {this.netCon = connection.createNetConnection();this.netStateMessage += Const.REGISTER_NETWORK_LISTENER;this.netCon.register((error) => {if (error) {Logger.error('register error:' + error.message);return;}promptAction.showToast({message: Const.REGISTER_NETWORK_LISTENER_MESSAGE,duration: 1000});})this.netCon.on('netAvailable', (netHandle) => {this.netStateMessage += Const.NET_AVAILABLE + netHandle.netId + '\n';})this.netCon.on('netBlockStatusChange', (data) => {this.netStateMessage += Const.NET_BLOCK_STATUS_CHANGE + data.netHandle.netId + '\n';})this.netCon.on('netCapabilitiesChange', (data) => {this.netStateMessage += Const.NET_CAPABILITIES_CHANGE_ID + data.netHandle.netId+ Const.NET_CAPABILITIES_CHANGE_CAP + JSON.stringify(data.netCap) + '\n';})this.netCon.on('netConnectionPropertiesChange', (data) => {this.netStateMessage += Const.NET_CONNECTION_PROPERTIES_CHANGE_ID + data.netHandle.netId+ Const.NET_CONNECTION_PROPERTIES_CHANGE_CONNECTION_PROPERTIES + JSON.stringify(data.connectionProperties) + '\n';})}unUseNetworkRegister() {if (this.netCon) {this.netCon.unregister((error: BusinessError) => {if (error) {Logger.error('unregister error:' + error.message);return;}promptAction.showToast({message: Const.UNREGISTER_NETWORK_LISTENER_MESSAGE,duration: 1000});this.netStateMessage += Const.UNREGISTER_NETWORK_LISTENER;})} else {this.netStateMessage += Const.UNREGISTER_NETWORK_LISTENER_FAIL;}}
}

以上就是本篇文章所带来的鸿蒙开发中一小部分技术讲解;想要学习完整的鸿蒙全栈技术。可以在结尾找我可全部拿到!
下面是鸿蒙的完整学习路线,展示如下:
1

除此之外,根据这个学习鸿蒙全栈学习路线,也附带一整套完整的学习【文档+视频】,内容包含如下

内容包含了:(ArkTS、ArkUI、Stage模型、多端部署、分布式应用开发、音频、视频、WebGL、OpenHarmony多媒体技术、Napi组件、OpenHarmony内核、鸿蒙南向开发、鸿蒙项目实战)等技术知识点。帮助大家在学习鸿蒙路上快速成长!

鸿蒙【北向应用开发+南向系统层开发】文档

鸿蒙【基础+实战项目】视频

鸿蒙面经

在这里插入图片描述

为了避免大家在学习过程中产生更多的时间成本,对比我把以上内容全部放在了↓↓↓想要的可以自拿喔!谢谢大家观看!

相关文章:

鸿蒙系统开发【网络管理】

网络管理 介绍 此Demo展示如何查询网络详情、域名解析、网络状态监听等功能。 效果预览&#xff1a; 使用说明&#xff1a; 1.启动应用&#xff0c;在点击检查网络、网络详情、网络连接信息后&#xff0c;展示对应的信息&#xff1b; 2.在域名解析的模块下&#xff0c;输入…...

nginx如何处理请求

nginx如何处理请求 注&#xff1a;内容翻译自Nginx官网文档 How nginx processes a request。 基于名称的虚拟服务器 nginx首先要决定哪个服务器应该处理请求。让我们从一个简单的配置开始&#xff0c;三个虚拟服务器都监听在端口*:80: server {listen 80;server_name e…...

换地不换IP?揭秘微博IP地址的奥秘

在这个信息飞速传递的时代&#xff0c;社交媒体成为我们生活中不可或缺的一部分。微博&#xff0c;作为其中的佼佼者&#xff0c;不仅是我们获取资讯的重要渠道&#xff0c;也是展现自我、分享生活的重要平台。然而&#xff0c;你有没有遇到过这样的情况&#xff1a;明明已经换…...

数据库事务处理技术——故障恢复

1. 数据故障恢复的宏观思路 我们知道DBMS是利用内存&#xff08;主存&#xff09;和外存&#xff08;辅存&#xff09;这样的存储体系进行数据库的管理&#xff0c;其中内存也就是我们常说的缓存是易失的。而事务时DBMS对数据库进行控制的基本单元&#xff0c;宏观上是由程序设…...

Java零基础之多线程篇:性能考虑篇

哈喽&#xff0c;各位小伙伴们&#xff0c;你们好呀&#xff0c;我是喵手。运营社区&#xff1a;C站/掘金/腾讯云&#xff1b;欢迎大家常来逛逛 今天我要给大家分享一些自己日常学习到的一些知识点&#xff0c;并以文字的形式跟大家一起交流&#xff0c;互相学习&#xff0c;一…...

CSP 初赛复习 :计算机网络基础

计算机网络的基础和网络的拓扑结构是计算机网络设计和实施的关键要素。‌ 计算机网络的基础涉及多个方面&#xff0c;‌包括网络层协议&#xff08;‌如IP、‌ICMP、‌IGMP等&#xff09;‌、‌传输层协议&#xff08;‌TCP、‌UDP等&#xff09;‌以及应用层协议&#xff08;‌…...

【Docker应用】快速搭建Plik服务结合内网穿透无公网IP远程访问传输文件

文章目录 前言1. Docker部署Plik2. 本地访问Plik3. Linux安装Cpolar4. 配置Plik公网地址5. 远程访问Plik6. 固定Plik公网地址7. 固定地址访问Plik 前言 本文介绍如何使用Linux docker方式快速安装Plik并且结合Cpolar内网穿透工具实现远程访问&#xff0c;实现随时随地在任意设…...

记录使用FlinkSql进行实时工作流开发

使用FlinkSql进行实时工作流开发 引言Flink SQL实战常用的Connector1. MySQL-CDC 连接器配置2. Kafka 连接器配置3. JDBC 连接器配置4. RabbitMQ 连接器配置5. REST Lookup 连接器配置6. HDFS 连接器配置 FlinkSql数据类型1. 基本数据类型2. 字符串数据类型3. 日期和时间数据类…...

韶音开放式耳机怎么样?韶音、西圣、QCY热门款实测横评

开放式耳机是目前最火爆的的耳机市场细分赛道&#xff0c;开放式耳机的优点包括健康卫生&#xff0c;佩戴舒适性高&#xff0c;方便我们接收外部环境音等等&#xff0c;以上这些优势使得开放式耳机特别适配户外运动场景&#xff0c;在工作、日常生活等场景下使用也是绰绰有余。…...

求值(河南萌新2024)

我真的服了&#xff0c;注意数据范围&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#…...

【Linux】文件描述符 fd

目录 一、C语言文件操作 1.1 fopen和fclose 1.2 fwrite和fread 1.3 C语言中的输入输出流 二、Linux的文件系统调用 2.1 open和文件描述符 2.2 close 2.3 read 2.4 write 三、Linux内核数据结构与文件描述符 一、C语言文件操作 在C语言中我们想要打开一个文件并对其进…...

带通采样定理

一、采样定理 1.1 低通采样定理(奈奎斯特采样) 低通采样定理&#xff08;奈奎斯特采样&#xff09;是要求大于信号的最高上限频率的两倍 1.2 带通采样定理 带通信号的采样频率在某个时间小于采样频率也能无失真恢复原信号 二、频谱混叠 对一个连续时域信号&#xff0c;采…...

运维工作中的事件、故障排查处理思路

一、运维工作中的事件 https://www.51cto.com/article/687753.html 二、运维故障排查 一&#xff09;故障排查步骤 1、明确故障 故障现象的直接表现故障发生的时间、频率故障发生影响哪些系统故障发生是否有明确的触发条件   故障举例&#xff1a;无法通过ssh登录系统 影响…...

深入源码P3C-PMD:使用流程(1)

PMD开源组件启动流程介绍 在软件开发领域&#xff0c;代码质量是项目成功的关键因素之一。为了提升代码质量&#xff0c;开发者们常常借助各种工具进行代码分析和检查。PMD作为一款开源的静态代码分析工具&#xff0c;在Java、JavaScript、PLSQL等语言项目中得到了广泛应用。本…...

java~反射

反射 使用的前提条件&#xff1a;必须先得到代表的字节码的Class&#xff0c;Class类用于表示.class文件&#xff08;字节码&#xff09; 原理图 加载完类后&#xff0c;在堆中就产生了一个Class类型的对象&#xff08;一个类只有一个Class对象&#xff09;&#xff0c;这个对…...

【Linux】(26) 详解磁盘与文件系统:从物理结构到inode机制

目录 1.认识磁盘、 1.1 理论 1.2 磁盘的物理结构 CHS 寻址 1.3 磁盘的逻辑抽象结构 2. inode 结构 1.Boot Block 启动块 2.Super Block&#xff08;超级块&#xff09; 3.Group Descriptor Block&#xff08;块组描述符&#xff09; 4.Data Blocks (数据块) 5.Inode…...

8.1 字符串中等 43 Multiply Strings 38 Count and Say

43 Multiply Strings【默写】 那个难点我就没想先解决&#xff0c;原本想法是先想其他思路&#xff0c;但也没想出。本来只想chat一下使用longlong数据类型直接stoi()得不得行&#xff0c;然后就看到了答案&#xff0c;直接一个默写的大动作。但这道题确实考察的是还原乘法&…...

upload-labs靶场:1—10通关教程

目录 Pass-01&#xff08;JS 验证&#xff09; Pass-02&#xff08;MIME&#xff09; Pass-03&#xff08;黑名单绕过&#xff09; Pass-04&#xff08;.htaccess 绕过&#xff09; Pass-05&#xff08;大小写绕过&#xff09; Pass-06&#xff08;空格绕过&#xff09; …...

Hive3:一键启动、停止、查看Hive的metastore和hiveserver2两个服务的脚本(好用)

脚本内容 #!/bin/bash # 一键启动、停止、查看Hive的metastore和hiveserver2两个服务的脚本 function start_metastore {# 启动Hive metastore服务hive --service metastore >/dev/null 2>&1 &for i in {1..30}; doif is_metastore_running; thenecho "Hiv…...

遗传算法与深度学习实战——生命模拟及其应用

遗传算法与深度学习实战——生命模拟及其应用 0. 前言1. 康威生命游戏1.1 康威生命游戏的规则1.2 实现康威生命游戏1.3 空间生命和智能体模拟 2. 实现生命模拟3. 生命模拟应用小结系列链接 0. 前言 生命模拟是进化计算的一个特定子集&#xff0c;模拟了自然界中所观察到的自然…...

19c补丁后oracle属主变化,导致不能识别磁盘组

补丁后服务器重启&#xff0c;数据库再次无法启动 ORA01017: invalid username/password; logon denied Oracle 19c 在打上 19.23 或以上补丁版本后&#xff0c;存在与用户组权限相关的问题。具体表现为&#xff0c;Oracle 实例的运行用户&#xff08;oracle&#xff09;和集…...

postgresql|数据库|只读用户的创建和删除(备忘)

CREATE USER read_only WITH PASSWORD 密码 -- 连接到xxx数据库 \c xxx -- 授予对xxx数据库的只读权限 GRANT CONNECT ON DATABASE xxx TO read_only; GRANT USAGE ON SCHEMA public TO read_only; GRANT SELECT ON ALL TABLES IN SCHEMA public TO read_only; GRANT EXECUTE O…...

P3 QT项目----记事本(3.8)

3.8 记事本项目总结 项目源码 1.main.cpp #include "widget.h" #include <QApplication> int main(int argc, char *argv[]) {QApplication a(argc, argv);Widget w;w.show();return a.exec(); } 2.widget.cpp #include "widget.h" #include &q…...

CocosCreator 之 JavaScript/TypeScript和Java的相互交互

引擎版本&#xff1a; 3.8.1 语言&#xff1a; JavaScript/TypeScript、C、Java 环境&#xff1a;Window 参考&#xff1a;Java原生反射机制 您好&#xff0c;我是鹤九日&#xff01; 回顾 在上篇文章中&#xff1a;CocosCreator Android项目接入UnityAds 广告SDK。 我们简单讲…...

redis和redission的区别

Redis 和 Redisson 是两个密切相关但又本质不同的技术&#xff0c;它们扮演着完全不同的角色&#xff1a; Redis: 内存数据库/数据结构存储 本质&#xff1a; 它是一个开源的、高性能的、基于内存的 键值存储数据库。它也可以将数据持久化到磁盘。 核心功能&#xff1a; 提供丰…...

软件工程 期末复习

瀑布模型&#xff1a;计划 螺旋模型&#xff1a;风险低 原型模型: 用户反馈 喷泉模型:代码复用 高内聚 低耦合&#xff1a;模块内部功能紧密 模块之间依赖程度小 高内聚&#xff1a;指的是一个模块内部的功能应该紧密相关。换句话说&#xff0c;一个模块应当只实现单一的功能…...

阿里云Ubuntu 22.04 64位搭建Flask流程(亲测)

cd /home 进入home盘 安装虚拟环境&#xff1a; 1、安装virtualenv pip install virtualenv 2.创建新的虚拟环境&#xff1a; virtualenv myenv 3、激活虚拟环境&#xff08;激活环境可以在当前环境下安装包&#xff09; source myenv/bin/activate 此时&#xff0c;终端…...

高分辨率图像合成归一化流扩展

大家读完觉得有帮助记得关注和点赞&#xff01;&#xff01;&#xff01; 1 摘要 我们提出了STARFlow&#xff0c;一种基于归一化流的可扩展生成模型&#xff0c;它在高分辨率图像合成方面取得了强大的性能。STARFlow的主要构建块是Transformer自回归流&#xff08;TARFlow&am…...

游戏开发中常见的战斗数值英文缩写对照表

游戏开发中常见的战斗数值英文缩写对照表 基础属性&#xff08;Basic Attributes&#xff09; 缩写英文全称中文释义常见使用场景HPHit Points / Health Points生命值角色生存状态MPMana Points / Magic Points魔法值技能释放资源SPStamina Points体力值动作消耗资源APAction…...

Easy Excel

Easy Excel 一、依赖引入二、基本使用1. 定义实体类&#xff08;导入/导出共用&#xff09;2. 写 Excel3. 读 Excel 三、常用注解说明&#xff08;完整列表&#xff09;四、进阶&#xff1a;自定义转换器&#xff08;Converter&#xff09; 其它自定义转换器没生效 Easy Excel在…...