prism WPF 登录对话框登录成功后显示主界面
prism WPF 登录对话框登录成功后显示主界面
项目结构
LoginUC.xaml
<UserControl x:Class="PrismWpfApp.Views.LoginUC"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:PrismWpfApp.Views"xmlns:helper="clr-namespace:PrismWpfApp.Helper"mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800" ><UserControl.Resources><ControlTemplate TargetType="Button" x:Key="CloseButtonTemplate"><Grid Background="Transparent" Name="back"><TextBlock Text="" FontFamily="{DynamicResource iconfont}" VerticalAlignment="Center" HorizontalAlignment="Center"FontSize="14"/></Grid><ControlTemplate.Triggers><Trigger Property="IsMouseOver" Value="True"><Setter Property="Background" Value="#DDD" TargetName="back"/></Trigger></ControlTemplate.Triggers></ControlTemplate><Style TargetType="TextBox" x:Key="UsernameTextBoxStyle"><Setter Property="Template"><Setter.Value><ControlTemplate TargetType="{x:Type TextBox}"><Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"CornerRadius="5"><Grid><Grid.ColumnDefinitions><ColumnDefinition Width="40"/><ColumnDefinition/></Grid.ColumnDefinitions><Border BorderBrush="#DDD" BorderThickness="0,0,1,0" Margin="0,8,5,8"/><TextBlock Text="请输入用户名" Grid.Column="1" VerticalAlignment="Center" Foreground="#BBB"Name="markText" Visibility="Collapsed" FontSize="12" Margin="2,0"/><TextBlock Text=""FontFamily="{DynamicResource iconfont}" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center"Foreground="#DDD"/><ScrollViewer x:Name="PART_ContentHost" Focusable="false"HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"Grid.Column="1"VerticalAlignment="Center" MinHeight="20"/></Grid></Border><ControlTemplate.Triggers><Trigger Property="IsEnabled" Value="false"><Setter Property="Opacity" TargetName="border" Value="0.56"/></Trigger><Trigger Property="IsMouseOver" Value="true"><Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/></Trigger><Trigger Property="IsKeyboardFocused" Value="true"><Setter Property="BorderBrush" TargetName="border" Value="#FF569DE5"/></Trigger><DataTrigger Binding="{Binding Path=Text,RelativeSource={RelativeSource Mode=Self}}" Value=""><Setter Property="Visibility" TargetName="markText" Value="Visible"/></DataTrigger></ControlTemplate.Triggers></ControlTemplate></Setter.Value></Setter></Style><Style x:Key="PasswordBoxStyle" TargetType="{x:Type PasswordBox}"><Setter Property="Template"><Setter.Value><ControlTemplate TargetType="{x:Type PasswordBox}"><Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"CornerRadius="5"><Grid><Grid.ColumnDefinitions><ColumnDefinition Width="40"/><ColumnDefinition/></Grid.ColumnDefinitions><Border BorderBrush="#DDD" BorderThickness="0,0,1,0" Margin="0,8,5,8"/><TextBlock Text="请输入密码" Grid.Column="1" VerticalAlignment="Center" Foreground="#BBB"Name="markText" Visibility="Collapsed" FontSize="12" Margin="2,0"/><TextBlock Text="" FontFamily="{StaticResource iconfont}" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center"Foreground="#DDD"/><ScrollViewer x:Name="PART_ContentHost" Focusable="false"HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"Grid.Column="1"VerticalAlignment="Center" MinHeight="20"/></Grid></Border><ControlTemplate.Triggers><Trigger Property="IsEnabled" Value="false"><Setter Property="Opacity" TargetName="border" Value="0.56"/></Trigger><Trigger Property="IsMouseOver" Value="true"><Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/></Trigger><Trigger Property="IsKeyboardFocused" Value="true"><Setter Property="BorderBrush" TargetName="border" Value="#FF569DE5"/></Trigger><DataTrigger Binding="{Binding Path=UserModel.Password}" Value=""><Setter Property="Visibility" TargetName="markText" Value="Visible"/></DataTrigger></ControlTemplate.Triggers></ControlTemplate></Setter.Value></Setter><Style.Triggers><MultiTrigger><MultiTrigger.Conditions><Condition Property="IsInactiveSelectionHighlightEnabled" Value="true"/><Condition Property="IsSelectionActive" Value="false"/></MultiTrigger.Conditions><Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/></MultiTrigger></Style.Triggers></Style></UserControl.Resources><UserControl.Triggers><EventTrigger RoutedEvent="Window.Loaded"><BeginStoryboard><Storyboard><DoubleAnimation Duration="0:0:0.5" To="0" Storyboard.TargetName="tt"Storyboard.TargetProperty="X"/></Storyboard></BeginStoryboard></EventTrigger></UserControl.Triggers><Grid Width="740" Margin="5" Background="Transparent" MouseLeftButtonDown="Grid_MouseLeftButtonDown" ><Border Background="#F7F9FA" Margin="0,6" HorizontalAlignment="Right" Width="330" BorderBrush="#DDD" BorderThickness="0"CornerRadius="0,5,5,0"><Border.Effect><DropShadowEffect Color="Black" ShadowDepth="0" Direction="0" BlurRadius="10" Opacity="0.2"/></Border.Effect><Border.RenderTransform><TranslateTransform X="-350" x:Name="tt"/></Border.RenderTransform><Grid HorizontalAlignment="Right" Width="230" Margin="30,30,30,10"><Grid.RowDefinitions><RowDefinition Height="100"/><RowDefinition/><RowDefinition/><RowDefinition/><RowDefinition Height="60"/><RowDefinition Height="auto" MinHeight="40"/></Grid.RowDefinitions><StackPanel VerticalAlignment="Center" Margin="0,0,0,30"><TextBlock Text="XX公司" Foreground="#333" FontSize="22"/><TextBlock Text="专注于提升工业智能管理协作平台" FontSize="12" Foreground="#888" Margin="0,10,0,0"/></StackPanel><ComboBox Grid.Row="1" Height="35" Margin="0,8" FontSize="14"ItemsSource="{Binding DataList}"DisplayMemberPath="Name"SelectedValuePath="Id"SelectedItem="{Binding SelectUser, Mode=TwoWay}"/><PasswordBox Grid.Row="2" Height="35" Margin="0,8" Style="{StaticResource PasswordBoxStyle}"helper:PasswordBoxHelper.Attach="true"helper:PasswordBoxHelper.Password="{Binding SelectUser.Password,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"FontSize="14"/><!--<PasswordBox Grid.Row="2" Height="35" Margin="0,8" Style="{StaticResource PasswordBoxStyle}"FontSize="14"/>--><Button Content="登 录" Background="#FF104991" Foreground="White" Grid.Row="4" Height="30" Margin="0,8" BorderThickness="0" VerticalAlignment="Top"Command="{Binding LoginCommand}" CommandParameter="{Binding Path=.,RelativeSource={RelativeSource AncestorType=Window}}"/><!--<Button Content="登 录" Background="#FF104991" Foreground="White" Grid.Row="4" Height="30" Margin="0,8" BorderThickness="0" VerticalAlignment="Top"Command="{Binding LoginCommand}" CommandParameter="{Binding ElementName=win}"/>--><!--关闭按钮--><Button VerticalAlignment="Top" HorizontalAlignment="Right" Content="X" Margin="0,-30,-25,0"Template="{StaticResource CloseButtonTemplate}" Width="40" Height="30"Command="{Binding CloseCommand}" CommandParameter="{Binding Path=.,RelativeSource={RelativeSource AncestorType=Window}}"/><TextBlock Text="{Binding ErrorMsg}" Foreground="Red" TextWrapping="Wrap" Grid.Row="10"TextAlignment="Center"/></Grid></Border><!--图片--><Polygon Points="0 0,420 0,450 200 420 400 0 400" HorizontalAlignment="Left"><Polygon.Fill><!--Viewbox 设置图片显示的位置--><ImageBrush ImageSource="pack://application:,,,/PrismWpfApp;component/Asset/Images/login_image.jpg" Stretch="UniformToFill" Viewbox="0,0,1.4,1"></ImageBrush></Polygon.Fill><Polygon.Effect><!--设置阴影 ShadowDepth 设置偏移量10--><DropShadowEffect Color="Black" ShadowDepth="0" Direction="0" BlurRadius="10" Opacity="0.5"/></Polygon.Effect></Polygon><Polygon Points="0 0,420,0,450 200 420 400 0 400" Opacity="0.2" StrokeThickness="0" Stroke="White" HorizontalAlignment="Left"><Polygon.Fill><RadialGradientBrush><GradientStop Color="#22FFFFFF" Offset="0"/><GradientStop Color="#FF1B283C" Offset="1"/><GradientStop Color="#C6555F6E" Offset="0.617"/></RadialGradientBrush></Polygon.Fill></Polygon></Grid>
</UserControl>
LoginUCViewModel.cs
using Prism.Commands;
using Prism.Services.Dialogs;
using PrismWpfApp.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;namespace PrismWpfApp.ViewModels
{public class LoginUCViewModel : UiViewModelBase, IDialogAware{public LoginUCViewModel(){this.SystemTitle = "登录-XX系统";DataList.Clear();var user1 = new UserInfoModel(){Id = 1,Name = "操作员",Password = ""};DataList.Add(user1);SelectUser = user1;DataList.Add(new UserInfoModel(){Id = 2,Name = "工程师",Password = ""});DataList.Add(new UserInfoModel(){Id = 1,Name = "管理员",Password = ""});}public List<UserInfoModel> DataList { get; set; } = new List<UserInfoModel>();//选择的用户private UserInfoModel _selectUser;/// <summary>/// 选择的用户/// </summary>public UserInfoModel SelectUser{get{return _selectUser;}set{SetProperty(ref _selectUser, value);}}//public string UserName { get; set; } = "admin";//public string Password { get; set; } = "123456";private string _errorMsg;public string ErrorMsg{get{return _errorMsg;}set{_errorMsg = value;SetProperty(ref _errorMsg, value);}}/// <summary>/// 登录命令/// </summary>public DelegateCommand LoginCommand{get{return new DelegateCommand(()=>{var a = SelectUser;//var b = Password;//执行登录验证RequestClose?.Invoke(new DialogResult(ButtonResult.OK));});}}public string Title => "登录-XX系统";/// <summary>/// 关闭 委托/// </summary>public event Action<IDialogResult> RequestClose;/// <summary>/// 是否能关闭对话框/// </summary>/// <returns></returns>/// <exception cref="NotImplementedException"></exception>public bool CanCloseDialog(){return true;}/// <summary>/// 关闭后要处理的逻辑/// </summary>/// <exception cref="NotImplementedException"></exception>public void OnDialogClosed(){//关闭也可以传参数(但一般不这么做)DialogParameters pairs = new DialogParameters();pairs.Add("Result", 0);//RequestClose 不为null时执行RequestClose?.Invoke(new DialogResult(ButtonResult.No, pairs));//两种方法等效//if (RequestClose != null)//{// RequestClose.Invoke(new DialogResult(ButtonResult.No));//}}/// <summary>/// 打开对话框前的处理逻辑/// </summary>/// <param name="parameters"></param>/// <exception cref="NotImplementedException"></exception>public void OnDialogOpened(IDialogParameters parameters){//if (parameters.ContainsKey("Msg"))//{// Msg = parameters.GetValue<string>("Msg");//}//if (parameters.ContainsKey("UserId"))//{// UserId = parameters.GetValue<string>("UserId");//}}}
}
注册 对话框服务并重写初始化方法
App.xaml.cs
using Prism.Ioc;
using Prism.Modularity;
using Prism.Services.Dialogs;
using Prism.Unity;
using PrismWpfApp.ViewModels;
using PrismWpfApp.Views;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;namespace PrismWpfApp
{/// <summary>/// App.xaml 的交互逻辑/// </summary>public partial class App : PrismApplication{/// <summary>/// 提供主窗口的对象/// </summary>/// <returns></returns>/// <exception cref="NotImplementedException"></exception>protected override Window CreateShell(){//打开第一个窗口 ModuleWindowreturn Container.Resolve<MainWindow>();//return Container.Resolve<ModuleWindow>();//return Container.Resolve<LoginWindow>();//return new MainWindow();}/// <summary>/// 业务中所有需要注入的对象,在这个方法里注册/// </summary>/// <param name="containerRegistry"></param>/// <exception cref="NotImplementedException"></exception>protected override void RegisterTypes(IContainerRegistry containerRegistry){//注册 导航 RegisterForNavigationcontainerRegistry.RegisterForNavigation<UserControlA>();containerRegistry.RegisterForNavigation<UserControlB>();containerRegistry.RegisterForNavigation<UserControlC>();//注册 对话框服务containerRegistry.RegisterDialog<DialogView, DialogViewModel>();containerRegistry.RegisterDialog<LoginUC, LoginUCViewModel>();}/// <summary>/// 添加模块(代码引用)/// </summary>/// <param name="moduleCatalog"></param>//protected override void ConfigureModuleCatalog(IModuleCatalog moduleCatalog)//{// moduleCatalog.AddModule<ModuleAProfile>();// moduleCatalog.AddModule<ModuleBProfile>();// base.ConfigureModuleCatalog(moduleCatalog);//}/// <summary>/// 创建模块/// </summary>protected override IModuleCatalog CreateModuleCatalog(){return new DirectoryModuleCatalog() { ModulePath = @".\Modules" };}//protected override void OnStartup(StartupEventArgs e)//{// base.OnStartup(e);// if (new LoginWindow().ShowDialog() == true)// {// new MainWindow().ShowDialog();// }// Application.Current.Shutdown();//}/// <summary>/// 重写 初始化 方法/// </summary>protected override void OnInitialized(){try{var dialogService = Container.Resolve<IDialogService>();//如果没有登录就打开登录对话框dialogService.ShowDialog("LoginUC", calback =>{if (calback.Result != ButtonResult.OK){Environment.Exit(0);return;}base.OnInitialized();});}catch (Exception ex){}}}
}
相关文章:
prism WPF 登录对话框登录成功后显示主界面
prism WPF 登录对话框登录成功后显示主界面 项目结构 LoginUC.xaml <UserControl x:Class"PrismWpfApp.Views.LoginUC"xmlns"http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x"http://schemas.microsoft.com/winfx/2006/xaml…...
MySQL统计信息
1. 什么是统计信息? 统计信息就像是数据库的"地图",它告诉优化器: 每个表有多大(有多少行数据) 每个索引的"区分度"(有多少不同的值) 数据分布情况(哪些值出…...
Spark,配置hadoop集群2
编写Hadoop集群启停脚本 1.建立新文件,编写脚本程序 在hadoop101中操作,在/root/bin下新建文件:myhadoop,输入如下内容: 2.分发执行权限 保存后退出,然后赋予脚本执行权限 [roothadoop101 ~]$ chmod x /r…...
⭐算法OJ⭐重建行程【哈密尔顿路径】(C++ 实现)Reconstruct Itinerary
You are given a list of airline tickets where tickets[i] [from_i, to_i] represent the departure and the arrival airports of one flight. Reconstruct the itinerary in order and return it. All of the tickets belong to a man who departs from “JFK”, thus, t…...
大模型如何优化数字人的实时交互与情感表达
标题:大模型如何优化数字人的实时交互与情感表达 内容:1.摘要 随着人工智能技术的飞速发展,数字人在多个领域的应用愈发广泛,其实时交互与情感表达能力成为提升用户体验的关键因素。本文旨在探讨大模型如何优化数字人的实时交互与情感表达。通过分析大模…...
【含文档+PPT+源码】基于SpringBoot+Vue旅游管理网站
项目介绍 本课程演示的是一款 基于SpringBootVue旅游管理网站,主要针对计算机相关专业的正在做毕设的学生与需要项目实战练习的 Java 学习者。 1.包含:项目源码、项目文档、数据库脚本、软件工具等所有资料 2.带你从零开始部署运行本套系统 3.该项目附…...
理解OSPF Stub区域和各类LSA特点
之前学习到OSPF特殊区域和各类类型LSA的分析后,一直很混乱,在网上也难找到详细的解释,在看了 HCNP书本内容后,对这块类容理解更加清晰,本次内容,我们使用实验示例,来对OSPF特殊区域和各 类型LSA…...
AI智算-K8s如何利用GPFS分布式并行文件存储加速训练or推理
文章目录 GPFS简介核心特性存储环境介绍存储软件版本客户端存储RoCEGPFS 管理(GUI)1. 创建 CSI 用户2. 检查GUI与k8s通信文件系统配置1. 开启配额2. 启用filesetdf文件系统3. 验证文件系统配置4. 启用自动inode扩展存储集群配置1. 启用对根文件集(root fileset)配额2. igno…...
Linux如何设置bash为默认shell
大部分情况下,Linux的默认shell是bash,但某些Linux发行版,例如Kali,默认的终端是zsh,本文以Kali为例,将Kali的默认shell从zsh改为bash。 其实Kali早期的shell也是bash,2020 版本之后:…...
leetcode-代码随想录-链表-翻转链表
题目 链接:206. 反转链表 - 力扣(LeetCode) 给你单链表的头节点 head ,请你反转链表,并返回反转后的链表。 输入:head [1,2,3,4,5] 输出:[5,4,3,2,1]class Solution { public:ListNode* rev…...
CSS快速上手
第一章 CSS基础 首先来回答2个问题。 1.CSS是什么? CSS是用来控制网页外观的一门技术。 2.前端最核心的技术是什么?他们分别是用来干吗的? 前端最核心的技术有:HTML、CSS、JavaScript。 HTML用于控制网页的结构,CSS…...
虚拟现实 UI 设计:打造沉浸式用户体验
VR UI 设计基础与特点 虚拟现实技术近年来发展迅猛,其独特的沉浸式体验吸引了众多领域的关注与应用。在 VR 环境中,UI 设计扮演着至关重要的角色,它是用户与虚拟世界交互的桥梁。与传统 UI 设计相比,VR UI 设计具有显著的特点。传…...
搜索与图论 树的广度优先遍历 图中点的层次
适用性 当边的权值相等时,使用广度优先遍历,往往是求图(树)的最短路径最优方法 抽象理解 伪代码 建立队列 添加第一个起始点到队列,标记其不可访问 while(队列不为空)//开始循环{获取队列中的队首元素,获…...
DHCP之报文格式
字段说明: op (op code): 表示报文的类型,取值为 1 或 2,含义如下 1:客户端请求报 2:服务器响应报文 Secs (seconds):由客户端填充,表示从客户端开始获得 IP 地址或 IP 地址续借后所使用了的秒数,缺省值为 3600s。 F…...
Docker安装、配置Redis
1.如果没有docker-compose.yml文件的话,先创建docker-compose.yml 配置文件一般长这个样子 version: 3services:redis:image: redis:latestcontainer_name: redisports:- "6379:6379"command: redis-server --requirepass "123456"restart: a…...
空中无人机等动态目标识别2025.4.4
* 一.无人机动态数据概述* 1.1 空中动态数据定义 在无人机动态数据的范畴中, 空中动态数据 是一个核心概念。它主要包括无人机在飞行过程中产生的各种实时信息,如 位置、速度、高度、姿态 等[1]。这些数据通过传感器系统采集,并以特定格式存…...
【AI论文】通过R1-Zero类似训练改进视觉空间推理
摘要:人们越来越关注提升多模态大型语言模型(MLLMs)的推理能力。作为在物理领域中运作的人工智能代理的基石,基于视频的视觉空间智能(VSI)成为MLLMs最为关键的推理能力之一。本研究首次深入探讨了通过R1-Ze…...
游戏引擎学习第203天
回顾当前情况 在这里我将直播完成整个游戏的制作。我们现在面临一些技术上的困难,确实如此。我的笔记本电脑的电源接口坏了,所以我不得不准备了这台备用笔记本,希望它能够正常工作。我所以希望一切都还好,尽管我不完全确定是否一…...
从菜鸟到高手的提示词优化指南
如何用“说话的艺术”榨干AI潜力? ——从菜鸟到高手的提示词优化指南 一、什么是好的提示词? 核心公式:精准提问 明确需求 限定条件 示范案例 好比让AI帮你买咖啡—— ❌ 差提示:“帮我买杯咖啡”(AI可能随便…...
应对高并发的根本挑战:思维转变【大模型总结】
以下是对这篇技术总结的详细解析,以分步说明的形式呈现,帮助理解亿万并发场景下的核心策略与创新思维: 一、应对高并发的根本挑战:思维转变 1. 传统架构的局限 问题:传统系统追求零故障和强一致性,但在海…...
【Java集合】单列集合List详解
参考笔记: java 单列集合List 万字详解(通俗易懂)_java singlelist-CSDN博客 目录 前言: 一、概述 二、特点 三、使用集合的经典四部曲 四、List接口常用的方法 五、List接口实现类——ArrayList 六、List接口实现类——Ve…...
蓝桥刷题note13(排序)
1.冒泡排序 适用场景: 数据量较小:适用于数据量较小的情况,例如数组长度在 10 以内。 优点 稳定性:冒泡排序是一种稳定的排序算法,相同元素的相对顺序不会改变。 缺点 时间复杂度高:平均和最坏时间复杂度为…...
【AI模型核心流程】(一)大语言模型输入处理机制详解与常见误解辨析
一、引言 大语言模型(LLM)如GPT、BERT、LLaMA等,已成为自然语言处理领域的核心技术。然而,许多开发者对其底层输入处理机制存在误解,尤其是从自然语言文本到模型可理解的向量表示这一过程。本文将从技术细节出发&…...
如何完整迁移 Git 仓库 ?
Git 已经成为软件开发中版本控制和协作的事实上的标准。有时,开发人员可能需要将整个 Git 存储库 (包括其历史记录、分支和标记) 移动到新的位置或托管服务。在这个全面的指南中,我们将讨论在不丢失任何关键数据或历史记录的情况下无缝地重新定位完整 Gi…...
《在 Ubuntu 22.04 上安装 CUDA 11.8 和 Anaconda,并配置环境变量》
安装 CUDA 11.8 和 Anaconda 并配置环境变量 在本教程中,我们将介绍如何在 Ubuntu 22.04 上安装 CUDA 11.8 和 Anaconda,并配置相应的环境变量。我们还将配置使用 阿里云镜像源 来加速软件包更新。以下是具体步骤。 步骤 1:更新软件源 首先…...
残差神经网络(ResNet)概念解析与用法实例:简洁的图像处理任务
目录 1. 前言 2. ResNet的核心思想 2.1 残差学习 2.2 跳跃连接 3. ResNet的架构 3.1 残差块 3.2 ResNet的整体架构 4. ResNet实例:随便处理处理图像 5. 总结 1. 前言 随着深度学习的发展,神经网络的层数不断增加,但随之而来的是梯度…...
家里网络访问Github有时候打不开,解决办法
1、修改Hosts文件修改法 通过DNS查询工具(如)获取最新GitHub域名解析IP修改系统hosts文件(路径:C:\Windows\System32\drivers\etc\hosts),添加:20.205.243.166 github.com 20.27.177.113 github…...
VirtualBox 配置双网卡(NAT + 桥接)详细步骤
在 VirtualBox 中为 CentOS 虚拟机配置双网卡(NAT 桥接),使其既能访问外网(NAT),又能与宿主机(Windows 10)或局域网通信(桥接)。 步骤 1:关闭虚…...
【2023】ORIGIN或MATLAB 颜色图,等高图,颜色条——需要拟合补全中间的颜色
前言 不是我疯了,就是世界疯了。我不知道究竟是哪一个疯了。瓶口和瓶盖尺寸不符。也许该怪瓶子,也许该怪盖子。但不管怎样,尺寸不符的事实不容动摇——《1Q84》 \;\;\;\;\;\; 有十几二十个导出的曲线数据,其中第一列是频率点,大约1001个,第二列是某种数据,都在0~1之间…...
flutter 专题 七十三Flutter打包未签名的ipa
在Flutter项目开发完成之后,需要把iOS项目拿给第三方(如打包机)进行签名,那我们首先就需要准备打包好未签名的的ipa包。 打包之前,需要先从第三方获取到iOS证书(.p12)和描述文件(.mobileprovision),然后然…...
ngx_get_full_name
定义在 src\core\ngx_file.c ngx_int_t ngx_get_full_name(ngx_pool_t *pool, ngx_str_t *prefix, ngx_str_t *name) {size_t len;u_char *p, *n;ngx_int_t rc;rc ngx_test_full_name(name);if (rc NGX_OK) {return rc;}len prefix->len;#if (NGX_WIN32)if (…...
leetcode-代码随想录-链表-链表总结篇
理论基础 链表: 每个节点由两部分组成:数据域和指针域(存放指向下一个节点的指针);入口节点称为头节点;最后一个节点的指针域指向NULL(空指针)。 分类: 单链表双链表&…...
如何用Python轻松实现快速复制或剪切文件列表中的所有文件呢?
在程序开发的过程中,处理文件是我们日常工作中一个很重要的环节。想象一下,当你需要把一大堆文件从一个文件夹移动到另一个文件夹时,手工操作真的会让人觉得烦躁对吧?这时,用代码来处理这些烦恼,真是太方便…...
【棒垒球规则】全国幼儿软式棒垒球比赛规则(二)·棒球1号位
幼儿棒垒球设备 2.01 球棒 球棒使用组委会提供的泡棉发泡安全球棒,以安全环保材料制成;球棒规格:长度为 53 厘米,重量为 200 克(10 克),棒头直径为 7 厘米,握把直径为 3 厘米。 2…...
在MacOS 10.15上使用MongoDB
这次是在MacOS 10.15上使用MongoDB。先在豆包问支持MacOS 10.15的MongoDB最新版是什么,答案是MongoDB 5.0。 抱着谨慎怀疑的态度去官方网站查询了一下,答案如下 MongoDB 7.x支持的最低版本MacOS是11MongoDB 6.x支持的最低版本MacOS是10.14 又找deepsee…...
【Ragflow】11. 文件解析流程分析/批量解析实现
概述 本文继续对ragflow文档解析部分进行分析,并通过脚本的方式实现对文件的批量上传解析。 文件解析流程 文件解析的请求处理流程大致如下: 1.前端上传文件,通过v1/document/run接口,发起文件解析请求 2.后端api\apps\docum…...
企业供应链管理
企业供应链管理 企业供应链管理 企业供应链管理企业信息化信息化的作用信息化的发展阶段信息化建设的挑战 SRM(供应商关系管理)SRM架构参考图企业内部系统协作: ERP (企业资源计划)OA (办公自动化)业务功能模块:企业日常办公 EMS …...
性能测试之jmeter的基本使用
简介 Jmeter是Apache的开源项目,基于Java开发,主要用于进行压力测试。 优点:开源免费、支持多协议、轻量级、功能强大 官网:https://jmeter.apache.org/index.html 安装 安装步骤: 下载:进入jmeter的…...
常见的微信个人号二次开发功能
一、常见开发功能 1. 好友管理 好友列表维护 添加/删除好友 修改好友信息(备注、标签等) 分组管理 创建/编辑/删除标签 好友分类与筛选 2. 消息管理 信息发送 支持多类型内容:文本、图片、视频、文件、小程序、名片、URL链接等 附加功…...
Muduo网络库实现 [十三] - HttpRequest模块
目录 设计思路 成员设计 模块实现 设计思路 首先我们要先知道HTTP的请求的流程是什么样子的,不然我们会学的很迷糊。对于HTTP请求如何到来以及去往哪里,我们应该很清楚的知道 HTTP请求在服务器系统中的传递流程是一个多层次的过程: 客户端发起请求…...
探索C++11:解锁现代编程(3)
1.包装器 1.1function std::function 是 C 标准库中的一个模板类,位于 <functional> 头文件中。它用于封装可调用对象,包括普通函数、Lambda 表达式、函数对象、成员函数等。std::function 提供了极大的灵活性,使得你可以将不同类型的…...
软件工程(应试版)图形工具总结(二)
遇到的问题,都有解决方案,希望我的博客能为你提供一点帮助。 教材参考《软件工程导论(第六版)》 七、 层次图(H图)与HIPO图 1、概述 1.1、层次图(Hierarchy Chart / H图) 核心…...
人工智能在前端开发中的应用探索
一、人工智能在前端开发中的应用场景 人工智能(AI)技术的快速发展为前端开发带来了新的机遇和挑战。AI在前端开发中的应用主要集中在以下几个方面:智能代码生成、自动化测试、个性化推荐、智能交互设计以及性能优化。这些应用场景不仅提高了…...
木马学习记录
一句话木马是什么 一句话木马就是仅需要一行代码的木马,很简短且简单,木马的函数将会执行我们发送的命令 如何发送命令&发送的命令如何执行? 有三种方式:GET,POST,COOKIE,一句话木马中用$_G…...
WebSocket 也有跨域问题?如何让 Spring Boot WebSocket 允许跨域连接?
前言 在现代 Web 开发中,跨域问题一直是开发者必须面对的挑战。无论是传统的 HTTP 请求还是实时通信的 WebSocket,浏览器的同源策略(Same-Origin Policy)都可能成为功能实现的拦路虎。许多开发者对 HTTP 的跨域解决方案ÿ…...
音视频入门基础:MPEG2-PS专题(8)——使用Wireshark分析GB28181的PS流
音视频入门基础:MPEG2-PS专题系列文章: 音视频入门基础:MPEG2-PS专题(1)——MPEG2-PS官方文档下载 音视频入门基础:MPEG2-PS专题(2)——使用FFmpeg命令生成ps文件 音视频入门基础…...
Bash详解
各类资料学习下载合集 https://pan.quark.cn/s/8c91ccb5a474 Bash详解 Bash(Bourne Again SHell)是Linux和Unix系统中最常用的命令行解释器之一。它不仅提供了强大的命令行操作功能,还支持脚本编程,使得用户能够自动化任务和实现复杂的操作。本文将详细介绍Bash…...
WORD+VISIO输出PDF图片提高清晰度的方法
WORDVISIO输出PDF图片提高清晰度的方法 part 1: visio 绘图part 2: word 导出 part 1: visio 绘图 先在visio中把图片和对应的文字调整为适合插入到文章中的尺寸; 在visio中把所有元素进行组合; 把组合后的图片长和宽等比例放缩,如放大10倍…...
springMVC--Controller配置总结
控制器Controller 控制器复杂提供访问应用程序的行为,通常通过接口定义或注解定义两种方式 控制器负责解析客户的请求并转换成一个模型 在springMVC中,一个控制器类可以包含多种方法 在springMVC中,对于controller的配置有多种 实现Contr…...
JavaScript BOM核心对象、本地存储
目录 BOM 核心对象详解 一、location 对象 1. 常用属性 2. 常用方法 3. 应用场景 二、navigator 对象 1. 核心属性 2. 常用方法 3. 应用场景 三、history 对象 1. 核心属性和方法 2. 应用场景 四、兼容性与注意事项 五、总结 本地存储与复杂数据类型处理 一、本…...