《深入浅出WPF》读书笔记.11Template机制(下)

news2024/9/22 21:28:21

《深入浅出WPF》读书笔记.11Template机制(下)

背景

本文主要讲datatemplate和contenttemplate的联合使用,以及style的解析。

《深入浅出WPF》读书笔记.11Template机制(下)

代码

两者的作用域范围

datatemplate和contenttemplate的关系

两者的应用

指定目标类型模板
<Window x:Class="TemplateDemo.DataTemplate2"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:TemplateDemo"
        xmlns:c="clr-namespace:System.Collections;assembly=mscorlib"
        mc:Ignorable="d"
        Title="DataTemplate2" Height="300" Width="400">
    <Window.Resources>
        <DataTemplate DataType="{x:Type local:Unit}">
            <Grid>
                <StackPanel Orientation="Horizontal">
                    <Grid >
                        <Rectangle Width="{Binding Price}" Fill="Orange"/>
                        <TextBlock Text="{Binding Year}"/>
                    </Grid>
                    <TextBlock Text="{Binding Year}"></TextBlock>
                </StackPanel>
            </Grid>
        </DataTemplate>
        <c:ArrayList x:Key="ds">
            <local:Unit Price="100" Year="1998"></local:Unit>
            <local:Unit Price="90" Year="1999"></local:Unit>
            <local:Unit Price="80" Year="2000"></local:Unit>
        </c:ArrayList>
    </Window.Resources>
    <StackPanel>
        <ListBox ItemsSource="{StaticResource ds}"></ListBox>
        <ComboBox ItemsSource="{StaticResource ds}"></ComboBox>
    </StackPanel>
</Window>
使用xml作为数据源模板
<Window x:Class="TemplateDemo.XmlDataTemplate1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:TemplateDemo"
        xmlns:c="clr-namespace:System.Collections;assembly=mscorlib"
        mc:Ignorable="d"
        Title="XmlDataTemplate1" Height="450" Width="800">
    <Window.Resources>
        <DataTemplate DataType="Unit">
            <Grid>
                <StackPanel Orientation="Horizontal">
                    <Grid >
                        <Rectangle Width="{Binding XPath=@Price }" Fill="Orange"/>
                        <TextBlock Text="{Binding XPath=@Year}"/>
                    </Grid>
                    <TextBlock Text="{Binding XPath=@Price}"></TextBlock>
                </StackPanel>
            </Grid>
        </DataTemplate>
        <XmlDataProvider x:Key="ds" XPath="Units/Unit" IsAsynchronous="False" IsInitialLoadEnabled="True">
            <x:XData>
                <Units xmlns="">
                    <Unit Price="80" Year="1998"></Unit>
                    <Unit Price="90" Year="1999"></Unit>
                    <Unit Price="100" Year="2000"></Unit>
                </Units>
            </x:XData>
        </XmlDataProvider>
    </Window.Resources>
    <StackPanel>
        <ListBox ItemsSource="{Binding Source={StaticResource ds}}"></ListBox>
        <ComboBox ItemsSource="{Binding Source={StaticResource ds}}"></ComboBox>
    </StackPanel>
</Window>
使用xml显示层级数据
<Window x:Class="TemplateDemo.HierarchicalTemplateDemo"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:TemplateDemo"
        mc:Ignorable="d"
        Title="HierarchicalTemplateDemo" Height="450" Width="800">
    <Window.Resources>
        <XmlDataProvider x:Key="ds" Source="Data.xml" XPath="Data/Grade"/>
        <HierarchicalDataTemplate DataType="Grade" ItemsSource="{Binding XPath=Class}">
            <TextBlock Text="{Binding XPath=@Name}"></TextBlock>
        </HierarchicalDataTemplate>
        <HierarchicalDataTemplate DataType="Class" ItemsSource="{Binding XPath=Group}">
            <RadioButton Content="{Binding XPath=@Name}" GroupName="gn"></RadioButton>
        </HierarchicalDataTemplate>
        <HierarchicalDataTemplate DataType="Group" ItemsSource="{Binding XPath=Student}">
            <CheckBox Content="{Binding XPath=@Name}"></CheckBox>
        </HierarchicalDataTemplate>
        <XmlDataProvider x:Key="ds2" Source="Data.xml" XPath="Data/Operation"/>
        <HierarchicalDataTemplate DataType="Operation" ItemsSource="{Binding XPath=Operation}">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding XPath=@Name}" Margin="0,5"></TextBlock>
                <TextBlock Text="{Binding XPath=@Gesture}" Margin="0,5"></TextBlock>
            </StackPanel>
        </HierarchicalDataTemplate>
    </Window.Resources>
    <Grid>
        <TreeView x:Name="tv" Margin="5" ItemsSource="{Binding Source={StaticResource ds2}}"></TreeView>
    </Grid>
</Window>
<?xml version="1.0" encoding="utf-8" ?>
<Data xmlns="">
  <Grade Name="一年级">
    <Class Name="一班">
      <Group Name="一组"></Group>
      <Group Name="二组"></Group>
      <Group Name="三组"></Group>
    </Class>
    <Class Name="二班">
      <Group Name="一组"></Group>
      <Group Name="二组"></Group>
      <Group Name="三组"></Group>
    </Class>
  </Grade>
  <Grade Name="二年级">
    <Class Name="一班">
      <Group Name="一组"></Group>
      <Group Name="二组"></Group>
      <Group Name="三组"></Group>
    </Class>
    <Class Name="二班">
      <Group Name="一组"></Group>
      <Group Name="二组"></Group>
      <Group Name="三组"></Group>
    </Class>
  </Grade>
  <Operation Name="文件" Gesture="F">
    <Operation Name="新建" Gesture="N">
      <Operation Name="项目" Gesture="A"></Operation>
      <Operation Name="文档" Gesture="B"></Operation>
      <Operation Name="网站" Gesture="C"></Operation>
    </Operation>
    <Operation Name="保存" Gesture="D"></Operation>
    <Operation Name="修改" Gesture="E"></Operation>
    <Operation Name="删除" Gesture="F"></Operation>
  </Operation>
</Data>
通过template寻找控件
<Window x:Class="TemplateDemo.GetDataTemplate"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:TemplateDemo"
        mc:Ignorable="d"
        Title="GetDataTemplate" Height="300" Width="400">
    <Window.Resources>
        <local:Student x:Key="stu" Id="1" Name="stu" FirstName="Wang" Skill="Chinese"></local:Student>
        <DataTemplate x:Key="stuDT">
            <Border BorderBrush="Black" BorderThickness="1" CornerRadius="1">
                <StackPanel Orientation="Horizontal">
                    <TextBox Text="{Binding Id}"></TextBox>
                    <TextBox Text="{Binding Name}"></TextBox>
                    <TextBox Text="{Binding FirstName}" x:Name="tb1"></TextBox>
                    <TextBox Text="{Binding Skill}"></TextBox>
                </StackPanel>
            </Border>
        </DataTemplate>
    </Window.Resources>
    <StackPanel>
        <ContentPresenter Content="{StaticResource stu}" ContentTemplate="{StaticResource stuDT}" x:Name="cp1"></ContentPresenter>
        <Button Content="点击一下" Click="Button_Click"></Button>
    </StackPanel>
</Window>
<Window x:Class="TemplateDemo.GetDataTemplate"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:TemplateDemo"
        mc:Ignorable="d"
        Title="GetDataTemplate" Height="300" Width="400">
    <Window.Resources>
        <local:Student x:Key="stu" Id="1" Name="stu" FirstName="Wang" Skill="Chinese"></local:Student>
        <DataTemplate x:Key="stuDT">
            <Border BorderBrush="Black" BorderThickness="1" CornerRadius="1">
                <StackPanel Orientation="Horizontal">
                    <TextBox Text="{Binding Id}"></TextBox>
                    <TextBox Text="{Binding Name}"></TextBox>
                    <TextBox Text="{Binding FirstName}" x:Name="tb1"></TextBox>
                    <TextBox Text="{Binding Skill}"></TextBox>
                </StackPanel>
            </Border>
        </DataTemplate>
    </Window.Resources>
    <StackPanel>
        <ContentPresenter Content="{StaticResource stu}" ContentTemplate="{StaticResource stuDT}" x:Name="cp1"></ContentPresenter>
        <Button Content="点击一下" Click="Button_Click"></Button>
    </StackPanel>
</Window>
Gridview

Style

设置控件外观和行为。

setter
<Window x:Class="TemplateDemo.StyleDemo1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:TemplateDemo"
        mc:Ignorable="d"
        Title="StyleDemo1" Height="450" Width="800">
    <Window.Resources>
        <Style TargetType="TextBox">
            <Style.Setters>
                <Setter Property="FontSize" Value="25"></Setter>
                <Setter Property="BorderBrush" Value="Blue"></Setter>
                <Setter Property="BorderThickness" Value="2"></Setter>
            </Style.Setters>
        </Style>
    </Window.Resources>
    <StackPanel>
        <TextBox>锄禾日当午</TextBox>
        <TextBox>汗滴禾下土</TextBox>
        <TextBox Style="{x:Null}">谁知盘中餐</TextBox>
    </StackPanel>
</Window>
trigger
<Window x:Class="TemplateDemo.TriggerDemo1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:TemplateDemo"
        mc:Ignorable="d"
        Title="TriggerDemo1" Height="450" Width="800">
    <Window.Resources>
        <Style TargetType="CheckBox">
            <Style.Triggers>
                <Trigger Property="IsChecked" Value="True">
                    <Trigger.Setters>
                        <Setter Property="FontSize" Value="20"></Setter>
                        <Setter Property="BorderThickness" Value="5"></Setter>
                    </Trigger.Setters>
                </Trigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>
    <StackPanel>
        <CheckBox Content="轻轻的我走了"></CheckBox>
        <CheckBox Content="正如我轻轻的来"></CheckBox>
        <CheckBox Content="我挥一挥衣袖"></CheckBox>
    </StackPanel>
</Window>
multitrigger
<Window x:Class="TemplateDemo.MultiTriggerDemo"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:TemplateDemo"
        mc:Ignorable="d"
        Title="MultiTriggerDemo" Height="450" Width="800">
    <Window.Resources>
        <Style TargetType="CheckBox">
            <Style.Triggers>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="Content" Value="我挥一挥衣袖"></Condition>
                        <Condition Property="IsChecked" Value="True"></Condition>
                    </MultiTrigger.Conditions>
                    <MultiTrigger.Setters>
                        <Setter Property="FontSize" Value="20"></Setter>
                        <Setter Property="BorderThickness" Value="5"></Setter>
                    </MultiTrigger.Setters>
                </MultiTrigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>
    <StackPanel>
        <CheckBox Content="轻轻的我走了"></CheckBox>
        <CheckBox Content="正如我轻轻的来"></CheckBox>
        <CheckBox Content="我挥一挥衣袖"></CheckBox>
    </StackPanel>
</Window>
datatrigger
<Window x:Class="TemplateDemo.DataTriggerDemo"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:TemplateDemo"
        mc:Ignorable="d"
        Title="DataTriggerDemo" Height="450" Width="800">
    <Window.Resources>
        <local:L2BConver x:Key="cvtr"/>
        <Style TargetType="CheckBox">
            <Style.Triggers>
                    <DataTrigger Binding="{Binding RelativeSource={x:Static RelativeSource.Self},XPath=Text.Length,Converter={StaticResource cvtr}}" Value="false" >
                        <Setter Property="FontSize" Value="20"></Setter>
                        <Setter Property="BorderThickness" Value="5"></Setter>
                    </DataTrigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>
    <StackPanel>
        <CheckBox Content="轻轻的我走了"></CheckBox>
        <CheckBox Content="正如我轻轻的来"></CheckBox>
        <CheckBox Content="我挥袖"></CheckBox>
    </StackPanel>
</Window>
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace TemplateDemo
{
    public class L2BConver : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return (int)value > 6 ? true : false;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
multidatatrigger
<Window x:Class="TemplateDemo.MultiDataTrrigerDemo1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:TemplateDemo"
        mc:Ignorable="d"
        Title="MultiDataTrrigerDemo1" Height="300" Width="400">
    <Window.Resources>
        <Style TargetType="ListBoxItem">
            <Setter Property="ContentTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding Id}"></TextBlock>
                            <TextBlock Text="{Binding Name}"></TextBlock>
                            <TextBlock Text="{Binding Skill}"></TextBlock>
                        </StackPanel>
                    </DataTemplate>

                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding Path=Id}" Value="2"></Condition>
                        <Condition Binding="{Binding Path=Name}" Value="Tom"></Condition>
                    </MultiDataTrigger.Conditions>
                    <MultiDataTrigger.Setters>
                        <Setter Property="Background" Value="Orange"></Setter>
                    </MultiDataTrigger.Setters>
                </MultiDataTrigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>
    <StackPanel>
        <ListBox x:Name="listBoxStudent" Margin="5"></ListBox>
    </StackPanel>
</Window>
eventtrigger
<Window x:Class="TemplateDemo.TriggerEventDemo1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:TemplateDemo"
        mc:Ignorable="d"
        Title="TriggerEventDemo1" Height="300" Width="400">
    <Window.Resources>
        <Style TargetType="Button">
            <Style.Triggers>
                <EventTrigger RoutedEvent="MouseEnter">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation To="150" Duration="0:0:0.2" Storyboard.TargetProperty="Width"></DoubleAnimation>
                            <DoubleAnimation To="150" Duration="0:0:0.2" Storyboard.TargetProperty="Height"></DoubleAnimation>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
                <EventTrigger RoutedEvent="MouseLeave">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetProperty="Width"></DoubleAnimation>
                            <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetProperty="Height"></DoubleAnimation>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>
    <StackPanel>
        <Button x:Name="btn1" Content="点击一下" Width="120" Height="40"></Button> 
    </StackPanel>
</Window>

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

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

相关文章

Qt常用控件——QPushButton

QPushButton介绍 QWidget中涉及到的各种属性、函数、使用方法&#xff0c;对于Qt的各种控件都是有效的 使用QPushButton表示一个按钮&#xff0c;继承自QAbstracButton&#xff0c;这个类是一个抽象类 抽象类&#xff1a;包含纯虚函数&#xff0c;无法实例化出对象&#xff0c;…

第四届长城杯部分wp

还是太菜了&#xff0c;要经常练了 1.BrickGame 通过游戏就可以得到flag 2.SQLUP 一道文件上传的题目&#xff0c;在登陆页面我用admin和1登陆成功了&#xff0c;但是按照正常的应该是要爆破&#xff0c;用bp爆破得到下面的页面 登陆成功后&#xff0c;点击头像就可以进行文…

前端 PDF 预览技巧:标签 vs 插件,如何优雅地展示 PDF 文件

前言 pdf 作为一种常用的文档格式&#xff0c;相信很多同学都在项目中遇到过需要预览 pdf 文件的情况。其实实现的方式有很多&#xff0c;包括传统的标签 iframe 或 embed 方式&#xff0c;也可以运用一些插件&#xff0c;例如 pdf.js、vue-pdf 等等&#xff0c;本文将带大家一…

FastJson、Jackson、Gson、Hutool,JSON解析哪家强?JMH基准测试来排行

首发公众号:【赵侠客】 引言 在前面《释放你九成的带宽和内存&#xff1a;GZIP在解决Redis大Key方面的应用》一文中我使用GZIP算法对JSON格式数据进行了压缩&#xff0c;可以减小88%的空间&#xff0c;文中也提到了目前JSON格式在我们项目中应用的非常广泛几乎无处不在。压缩J…

整合Redis和RedisCacheManger

整合redis springboot在现在的版本中操作Redis数据库用到了lettuce&#xff0c;而不是Jedis&#xff0c;他们各有各的特点。Jedis以Redis命令作为方法名称&#xff0c;学习成本低&#xff0c;简单实用。但是Jedis实例是线程不安全的&#xff0c;多线程环境下需要基于连接池来使…

Java实现一个简单的本地群聊。可以多开Client。

网络编程也有趣的&#xff0c;Java中有对系统网络IO操作的封装包&#xff1a;Socket。现在我们在本地电脑&#xff08;网络&#xff09;用它来模拟一个简单的群聊功能&#xff0c;以便能更好地对网络编程进行深刻的理解。 "Client"去连接"Host",可同时多有…

JavaEE 第23节 TCP的流量控制与阻塞控制详解

目录 前言&#xff08;必读&#xff09;1、滑动窗口背景运行机制 2. 流量控制作用实现机制关键目标 3. 拥塞控制作用实现机制作用 4. 流量控制和拥塞控制的区别作用对象不同触发条件不同控制方式不同 5.总结 前言&#xff08;必读&#xff09; 流量控制&#xff08;Flow Contr…

中科院院士薛其坤:通用量子计算机还得10-20年

说到量子计算机&#xff0c;很多人都抱有不切实际的幻想&#xff0c;甚至认为它无所不能&#xff0c;很快就能取代现有的电子计算机&#xff0c;但事实上&#xff0c;目前的量子计算机只能高效解决特定问题&#xff0c;不具备通用性。在2024年浦江创新论坛上&#xff0c;2023年…

linux日志备份

什么是日志文件?为什么要设立日志文件? 1、日志文件是用来记录事务对数据库的更新操作的文件。2、设立日志文件的目的是: 进行事务故障恢复;进行系统故障恢复;协助后备副本进行介质故障恢复。 但是&#xff0c;随着时间&#xff0c;日志文件内存过于增加&#xff0c;将会导…

creating chat agent with langchain and openai getting no attribute error

题意&#xff1a; 使用 LangChain 和 OpenAI 创建聊天代理时遇到“没有属性错误”&#xff08;Getting "no attribute" error when creating a chat agent with LangChain and OpenAI&#xff09; 问题背景&#xff1a; Im trying to test a chat agent using the …

基于springboot+vue的工作量统计系统(全套)

传统办法管理信息首先需要花费的时间比较多&#xff0c;其次数据出错率比较高&#xff0c;而且对错误的数据进行更改也比较困难&#xff0c;最后&#xff0c;检索数据费事费力。因此&#xff0c;在计算机上安装工作量统计系统软件来发挥其高效地信息处理的作用&#xff0c;可以…

java后端开发的DO、DTO、BO、AO、VO、POJO定义

1.常用文件夹命名规则 pojo&#xff1a; &#xff08;1&#xff09;vo &#xff08;与前端交互的所有对象&#xff0c;包括接参和返回&#xff09; &#xff08;2&#xff09;query &#xff08;查询的筛选条件&#xff0c;前端传参和后端内部传参通用&#xff09; &#x…

[计算机基础四大件学习笔记]计算机组成原理

文章总览&#xff1a;YuanDaiMa2048博客文章总览 计算机基础四大件学习笔记 说明&#xff1a;虽然学习过计算机组成与系统结构、操作系统、计算机网络以及数据结构这四门课程&#xff0c;但是对于这四门课的结合和实际中的应用还是模糊的&#xff0c;因此x想通过网上的一些视频…

Rust语言初探:WebAssembly 入门

Rust语言初探&#xff1a;WebAssembly 入门 前言 在我的印象中&#xff0c;Rust 一直是比较底层的语言&#xff0c;例如在操作系统底层、高性能中间件等底层场景才会看到它的身影。 然而&#xff0c;随着技术的发展&#xff0c;Rust 也开始在前端场景如 WebAssembly 中崭露头…

大数据Flink(一百一十五):Flink SQL的基本概念

文章目录 Flink SQL的基本概念 一、​​​​​​​SQL 中表的概念 二、​​​​​​​​​​​​​​SQL 临时表、永久表 三、​​​​​​​​​​​​​​SQL表类型的定义 四、​​​​​​​​​​​​​​常见的连接器 五、​​​​​​SQL数据视图 1、​​​​​​…

校园气膜馆助力青少年体质发展:少年强则国强—轻空间

青少年是国家的未来&#xff0c;体质的强健与否&#xff0c;直接关系到国家的竞争力和可持续发展。在现代社会&#xff0c;学习和压力并存&#xff0c;青少年的体育锻炼时间不断被压缩&#xff0c;如何提供更为优质的体育设施&#xff0c;帮助他们增强体质&#xff0c;成为学校…

【C/C++】“秒懂”学C/C++不可错过的“经典编程题” — 日期类的经典运用 (含题链接)

“秒懂”学C/C不可错过的“经典编程题” — 日期类的经典运用 (含题链接&#xff09; 1. 计算日期到天数转换(1). 解题思路&#xff1a;(2). 代码实现&#xff1a; 2. 打印日期(1). 解题思路&#xff1a;(2). 代码实现&#xff1a; 3. 日期累加(1). 解题思路&#xff1a;(2). 代…

Java 设计模式-状态模式

目录 一. 概述 二. 主要角色 三. 代码示例 四. 优缺点 优点&#xff1a; 缺点&#xff1a; 五. 常见应用场景 一. 概述 状态模式是一种行为设计模式&#xff0c;它允许一个对象在其内部状态改变时改变它的行为。对象看起来好像修改了它的类。状态模式把所有的与一个特定…

AES算法与接口解密

文章目录 AES算法基本介绍加密模式模式与IV 接口响应AES解密 AES算法 基本介绍 高级加密标准(AES,Advanced Encryption Standard)为最常见的对称加密算法。 对称加密算法中加解密密钥都是一样的。 AES 的主要特性&#xff1a; 块加密&#xff1a;AES 是一种分组加密算法&…

Vue day-04

目录 一. vue组件 1.1 为什么用组件 1.2 vue组件 1.3 基础使用 1.4 全局 - 注册使用 1.5 局部 - 注册使用 1.4 用less写的样式 二. Vue组件之间传值(重点) 2.1 父组件向子组件传值 2.2 子组件向父组件传值 2.3 兄弟之间的传递 三. vue生命周期 3.1 含义 3.2 钩子…