WPF显示富文本emoji表情+文本(类似微信)

祝大家端午节安康!

WPF开发者QQ群: 340500857 

前言 

      有小伙伴需要实现类似微信一样的气泡聊天emoji表情+文本。

欢迎转发、分享、点赞,谢谢大家~。  

效果预览(更多效果请下载源码体验):

一、EmojiAndTextControl.cs代码如下:

/**Github https://github.com/yanjinhuagood/WPFDevelopers.git码云 https://gitee.com/yanjinhua/WPFDevelopers.git**/
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Shapes;namespace WpfChatEmojiText
{[TemplatePart(Name = TextBlockTemplateName, Type = typeof(TextBlock))][TemplatePart(Name = WrapPanelLeftTemplateName, Type = typeof(WrapPanel))][TemplatePart(Name = BorderTemplateName, Type = typeof(Border))][TemplatePart(Name = WrapPanelRightTemplateName, Type = typeof(WrapPanel))][TemplatePart(Name = ImageBrushLeftTemplateName, Type = typeof(ImageBrush))][TemplatePart(Name = ImageBrushRightTemplateName, Type = typeof(ImageBrush))]public class EmojiAndTextControl: Control{private static readonly Type _typeofSelf = typeof(EmojiAndTextControl);private const string TextBlockTemplateName = "PART_TextBlock";private const string WrapPanelLeftTemplateName = "PART_Left";private const string BorderTemplateName = "PART_Border";private const string WrapPanelRightTemplateName = "PART_Right";private const string ImageBrushLeftTemplateName = "LeftUser";private const string ImageBrushRightTemplateName = "RightUser";private TextBlock m_textBlock;private WrapPanel leftWrapPanel;private Border border;private WrapPanel rightWrapPanel;private ImageBrush leftImageBrush;private ImageBrush rightImageBrush;private bool m_IgnoreChanges = false;public string Text{get { return (string)GetValue(TextProperty); }set { SetValue(TextProperty, value); }}static EmojiAndTextControl(){DefaultStyleKeyProperty.OverrideMetadata(_typeofSelf, new FrameworkPropertyMetadata(_typeofSelf));}public override void OnApplyTemplate(){base.OnApplyTemplate();m_textBlock = GetTemplateChild(TextBlockTemplateName) as TextBlock;leftWrapPanel = GetTemplateChild(WrapPanelLeftTemplateName) as WrapPanel;border = GetTemplateChild(BorderTemplateName) as Border;rightWrapPanel = GetTemplateChild(WrapPanelRightTemplateName) as WrapPanel;leftImageBrush = GetTemplateChild(ImageBrushLeftTemplateName) as ImageBrush;rightImageBrush = GetTemplateChild(ImageBrushRightTemplateName) as ImageBrush;UpdateEmoji();UpdateIsRight();UpdateRightImageSource();UpdateLeftImageSource();}public static readonly DependencyProperty TextProperty =DependencyProperty.Register("Text", typeof(string), typeof(EmojiAndTextControl),new UIPropertyMetadata(string.Empty, OnTextChanged));static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e){EmojiAndTextControl emoji = (EmojiAndTextControl)d;emoji.UpdateEmoji();}void UpdateEmoji(){if (m_textBlock == null) return;if (!m_IgnoreChanges){m_IgnoreChanges = true;//EmojiHelper.ParseText(m_textBlock);EmojiHelperLibrary.EmojiHelper.Instance.ParseText(m_textBlock);m_IgnoreChanges = false;}}public bool IsRight{get { return (bool)GetValue(IsRightProperty); }set { SetValue(IsRightProperty, value); }}public static readonly DependencyProperty IsRightProperty =DependencyProperty.Register("IsRight", typeof(bool), typeof(EmojiAndTextControl), new UIPropertyMetadata(OnIsRightChanged));static void OnIsRightChanged(DependencyObject d, DependencyPropertyChangedEventArgs e){EmojiAndTextControl control = (EmojiAndTextControl)d;control.UpdateIsRight();}void UpdateIsRight(){if (leftWrapPanel == null||border == null||rightWrapPanel == null) return;if (!IsRight){leftWrapPanel.Visibility = Visibility.Visible;border.Background = Brushes.White;rightWrapPanel.Visibility = Visibility.Collapsed;}}public ImageSource LeftImageSource{get { return (ImageSource)GetValue(LeftImageSourceProperty); }set { SetValue(LeftImageSourceProperty, value); }}public static readonly DependencyProperty LeftImageSourceProperty =DependencyProperty.Register("LeftImageSource", typeof(ImageSource), typeof(EmojiAndTextControl), new UIPropertyMetadata(OnLeftImageSourceChanged));private static void OnLeftImageSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e){EmojiAndTextControl control = (EmojiAndTextControl)d;control.UpdateLeftImageSource();}void UpdateLeftImageSource(){if (leftImageBrush == null) return;leftImageBrush.ImageSource = LeftImageSource;}public ImageSource RightImageSource{get { return (ImageSource)GetValue(RightImageSourceProperty); }set { SetValue(RightImageSourceProperty, value); }}public static readonly DependencyProperty RightImageSourceProperty =DependencyProperty.Register("RightImageSource", typeof(ImageSource), typeof(EmojiAndTextControl), new UIPropertyMetadata(OnRightImageSourceChanged));private static void OnRightImageSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e){EmojiAndTextControl control = (EmojiAndTextControl)d;control.UpdateRightImageSource();}void UpdateRightImageSource(){if (rightImageBrush == null) return;rightImageBrush.ImageSource = RightImageSource;}}
}

二、EmojiAndTextControlStyle.xaml代码如下:

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:local="clr-namespace:WpfChatEmojiText"><Style TargetType="local:EmojiAndTextControl"><Setter Property="Template"><Setter.Value><ControlTemplate TargetType="local:EmojiAndTextControl"><Grid><Grid.ColumnDefinitions><ColumnDefinition Width="Auto"/><ColumnDefinition/><ColumnDefinition Width="Auto"/></Grid.ColumnDefinitions><WrapPanel Grid.Column="0" Name="PART_Left" Visibility="Collapsed"><Border Width="35" Height="35" VerticalAlignment="Top"Margin="0,10"CornerRadius="4"UseLayoutRounding="True"><Border.Background><ImageBrush x:Name="LeftUser"ImageSource="{TemplateBinding LeftImageSource}" RenderOptions.BitmapScalingMode="LowQuality " Stretch="Fill"/></Border.Background></Border><Path Data="M365.714 256v512q0 14.857-10.857 25.714t-25.714 10.857-25.714-10.857l-256-256q-10.857-10.857-10.857-25.714t10.857-25.714l256-256q10.857-10.857 25.714-10.857t25.714 10.857 10.857 25.714z"Fill="White" Width="10" Height="10" Stretch="Fill"StrokeThickness="0" Grid.Column="1"VerticalAlignment="Top" Margin="0,20,-14,0"UseLayoutRounding="True" SnapsToDevicePixels="True"/></WrapPanel><Border CornerRadius="4" Background="#9EEA6A"UseLayoutRounding="True" SnapsToDevicePixels="True"Grid.Column="1" Margin="10"Name="PART_Border"><TextBlock Name="PART_TextBlock" FontSize="15" Text="{TemplateBinding Text}"Padding="6" TextWrapping="Wrap" VerticalAlignment="Center"/></Border><WrapPanel Grid.Column="2" Name="PART_Right"><Path Data="M329.143 512q0 14.857-10.857 25.714l-256 256q-10.857 10.857-25.714 10.857t-25.714-10.857-10.857-25.714v-512q0-14.857 10.857-25.714t25.714-10.857 25.714 10.857l256 256q10.857 10.857 10.857 25.714z"Fill="#9EEA6A" Width="10" Height="10" Stretch="Fill"StrokeThickness="0" VerticalAlignment="Top" Margin="-14,20,0,0"UseLayoutRounding="True" SnapsToDevicePixels="True"/><Border Width="35" Height="35"VerticalAlignment="Top"Margin="0,10"CornerRadius="4"UseLayoutRounding="True"><Border.Background><ImageBrush x:Name="RightUser"ImageSource="{TemplateBinding RightImageSource}" RenderOptions.BitmapScalingMode="LowQuality" Stretch="Fill"/></Border.Background></Border></WrapPanel></Grid><!--<ControlTemplate.Triggers><DataTrigger Binding="{Binding IsRight}" Value="false"><Setter Property="Visibility" TargetName="PART_Left" Value="Visible"/><Setter Property="Background" TargetName="PART_Border" Value="White"/><Setter Property="Visibility" TargetName="PART_Right" Value="Collapsed"/></DataTrigger></ControlTemplate.Triggers>--></ControlTemplate></Setter.Value></Setter>
</Style>
</ResourceDictionary>

三、MainWindow.xaml代码如下

<Window x:Class="WpfChatEmojiText.MainWindow"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:WpfChatEmojiText"mc:Ignorable="d"Title="WPFDevelopers" Height="800" Width="800"TextOptions.TextFormattingMode="Display" UseLayoutRounding="True"SnapsToDevicePixels="True" RenderOptions.BitmapScalingMode="NearestNeighbor"><UniformGrid Columns="2"><Grid Margin="10,0"><Grid.RowDefinitions><RowDefinition/><RowDefinition Height="100"/></Grid.RowDefinitions><RichTextBox x:Name="_LeftChat" IsReadOnly="True"><RichTextBox.Background><ImageBrush ImageSource="Images\Left.jpg" Stretch="Fill"/></RichTextBox.Background></RichTextBox><Grid Grid.Row="1"><Grid.RowDefinitions><RowDefinition Height="Auto"/><RowDefinition/></Grid.RowDefinitions><ToggleButton x:Name="LeftButtonEmoji" Margin="10,0" Content="Emoji" Width="40" HorizontalAlignment="Left"/><Popup Placement="Top" PlacementTarget="{Binding ElementName=LeftButtonEmoji}" IsOpen="{Binding ElementName=LeftButtonEmoji,Path=IsChecked}" AllowsTransparency="True" VerticalOffset="-4"><Border Margin="10" Background="White" CornerRadius="4"Width="76"><Border.Effect><DropShadowEffect ShadowDepth="0" BlurRadius="10" Opacity="0.2" Color="#80000000"/></Border.Effect><ItemsControl ItemsSource="{Binding EmojiArray,RelativeSource={RelativeSource AncestorType=local:MainWindow}}"><ItemsControl.ItemTemplate><DataTemplate><Border x:Name="PART_Border" CornerRadius="2"PreviewMouseLeftButtonDown="PART_Border_PreviewMouseLeftButtonDown"Tag="{Binding Key}"><Image Source="{Binding Value}" ToolTip="{Binding Name}"Width="30" Height="30" Margin="4"IsHitTestVisible="True"/></Border><DataTemplate.Triggers><Trigger Property="IsMouseOver" Value="True"><Setter Property="Background" TargetName="PART_Border" Value="#FFD8D1D1"/></Trigger></DataTemplate.Triggers></DataTemplate></ItemsControl.ItemTemplate><ItemsControl.ItemsPanel><ItemsPanelTemplate><WrapPanel/></ItemsPanelTemplate></ItemsControl.ItemsPanel></ItemsControl></Border></Popup><Grid Grid.Row="1"><Grid.ColumnDefinitions><ColumnDefinition/><ColumnDefinition Width="Auto"/></Grid.ColumnDefinitions><TextBox x:Name="LeftInput"/><Button Grid.Column="1" Content="发送" x:Name="LeftSend" Click="LeftSend_Click"></Button></Grid></Grid></Grid><Grid Margin="10,0"><Grid.RowDefinitions><RowDefinition/><RowDefinition Height="100"/></Grid.RowDefinitions><RichTextBox x:Name="_RightChat" IsReadOnly="True"><RichTextBox.Background><ImageBrush ImageSource="Images\Right.jpg" Stretch="Fill"/></RichTextBox.Background></RichTextBox><Grid Grid.Row="1"><Grid.RowDefinitions><RowDefinition Height="Auto"/><RowDefinition/></Grid.RowDefinitions><ToggleButton x:Name="RightButtonEmoji" Margin="10,0" Content="Emoji" Width="40" HorizontalAlignment="Left"/><Popup Placement="Top" PlacementTarget="{Binding ElementName=RightButtonEmoji}" IsOpen="{Binding ElementName=RightButtonEmoji,Path=IsChecked}" AllowsTransparency="True" VerticalOffset="-4"><Border Margin="10" Background="White" CornerRadius="4"Width="76"><Border.Effect><DropShadowEffect ShadowDepth="0" BlurRadius="10" Opacity="0.2" Color="#80000000"/></Border.Effect><ItemsControl ItemsSource="{Binding EmojiArray,RelativeSource={RelativeSource AncestorType=local:MainWindow}}"><ItemsControl.ItemTemplate><DataTemplate><Border x:Name="PART_Border" CornerRadius="2"PreviewMouseLeftButtonDown="PART_Border_RightPreviewMouseLeftButtonDown"Tag="{Binding Key}"><Image Source="{Binding Value}" ToolTip="{Binding Name}"Width="30" Height="30" Margin="4"IsHitTestVisible="True"/></Border><DataTemplate.Triggers><Trigger Property="IsMouseOver" Value="True"><Setter Property="Background" TargetName="PART_Border" Value="#FFD8D1D1"/></Trigger></DataTemplate.Triggers></DataTemplate></ItemsControl.ItemTemplate><ItemsControl.ItemsPanel><ItemsPanelTemplate><WrapPanel/></ItemsPanelTemplate></ItemsControl.ItemsPanel></ItemsControl></Border></Popup><Grid Grid.Row="1"><Grid.ColumnDefinitions><ColumnDefinition/><ColumnDefinition Width="Auto"/></Grid.ColumnDefinitions><TextBox x:Name="RightInput"/><Button Grid.Column="1" Content="发送" x:Name="RightSend" Click="RightSend_Click"></Button></Grid></Grid></Grid></UniformGrid>
</Window>

四、MainWindow.cs.xaml代码如下

using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;namespace WpfChatEmojiText
{/// <summary>/// MainWindow.xaml 的交互逻辑/// </summary>public partial class MainWindow : Window{public IEnumerable EmojiArray{get { return (IEnumerable)GetValue(EmojiArrayProperty); }set { SetValue(EmojiArrayProperty, value); }}public static readonly DependencyProperty EmojiArrayProperty =DependencyProperty.Register("EmojiArray", typeof(IEnumerable), typeof(MainWindow), new PropertyMetadata(null));public MainWindow(){InitializeComponent();var emojiModels = new List<EmojiModel>();EmojiHelperLibrary.EmojiHelper.Instance._emojiHeight = 30;EmojiHelperLibrary.EmojiHelper.Instance._emojiWidth = 30;var m_Emojis = new Dictionary<string, string>();var emojiPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "emoji");var directory = new DirectoryInfo(emojiPath);foreach (var item in directory.GetFiles()){var _key = $"[{Path.GetFileNameWithoutExtension(item.Name)}]";m_Emojis.Add(_key, item.FullName);emojiModels.Add(new EmojiModel { Name = Path.GetFileNameWithoutExtension(item.Name), Key = _key, Value = item.FullName });}EmojiHelperLibrary.EmojiHelper.Instance.m_Emojis = m_Emojis;EmojiArray = emojiModels;}private void PART_Border_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e){LeftButtonEmoji.IsChecked = false;var send = sender as Border;LeftInput.Text += send.Tag.ToString();LeftInput.Focus();LeftInput.SelectionStart = LeftInput.Text.Length;}private void LeftSend_Click(object sender, RoutedEventArgs e){LeftChat();}void LeftChat(){var leftText = new EmojiAndTextControl();leftText.IsRight = true;leftText.RightImageSource = new BitmapImage(new Uri("pack://application:,,,/Images/UserImages/jingtao.png"));leftText.Text = LeftInput.Text;var leftPara = new Paragraph();leftPara.TextAlignment = TextAlignment.Right;leftPara.Inlines.Add(leftText);_LeftChat.Document.Blocks.Add(leftPara);var rightText = new EmojiAndTextControl();rightText.IsRight = false;rightText.LeftImageSource = new BitmapImage(new Uri("pack://application:,,,/Images/UserImages/jingtao.png"));rightText.Text = LeftInput.Text;var rightPara = new Paragraph();rightPara.TextAlignment = TextAlignment.Left;rightPara.Inlines.Add(rightText);_RightChat.Document.Blocks.Add(rightPara);LeftInput.Text = string.Empty;LeftInput.Focus();}void RightChat(){var leftText = new EmojiAndTextControl();leftText.IsRight = true;leftText.RightImageSource = new BitmapImage(new Uri("pack://application:,,,/Images/UserImages/yanjinhua.png"));leftText.Text = RightInput.Text;var leftPara = new Paragraph();leftPara.TextAlignment = TextAlignment.Right;leftPara.Inlines.Add(leftText);_RightChat.Document.Blocks.Add(leftPara);var rightText = new EmojiAndTextControl();rightText.IsRight = false;rightText.LeftImageSource = new BitmapImage(new Uri("pack://application:,,,/Images/UserImages/yanjinhua.png"));rightText.Text = RightInput.Text;var rightPara = new Paragraph();rightPara.TextAlignment = TextAlignment.Left;rightPara.Inlines.Add(rightText);_LeftChat.Document.Blocks.Add(rightPara);RightInput.Text = string.Empty;RightInput.Focus();}private void RightSend_Click(object sender, RoutedEventArgs e){RightChat();}private void PART_Border_RightPreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e){RightButtonEmoji.IsChecked = false;var send = sender as Border;RightInput.Text += send.Tag.ToString();RightInput.Focus();RightInput.SelectionStart = RightInput.Text.Length;}}public class EmojiModel{public string Name { get; set; }public string Key { get; set; }public string Value { get; set; }}
}

源码地址

github:https://github.com/yanjinhuagood/WPFDevelopers.git

gitee:https://gitee.com/yanjinhua/WPFDevelopers.git

WPF开发者QQ群: 340500857 

blogs: https://www.cnblogs.com/yanjinhua

Github:https://github.com/yanjinhuagood

出处:https://www.cnblogs.com/yanjinhua

版权:本作品采用「署名-非商业性使用-相同方式共享 4.0 国际」许可协议进行许可。

转载请著名作者 出处 https://github.com/yanjinhuagood

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

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

相关文章

oracle未找到时区,Oracle ADF 未找到时区错误

最近在运行项目的时候,发现了一个问题.在初始化数据的时候,后台会报错,<_handleexception> ADF_FACES-60098:Faces 生命周期在阶段RENDER_RESPONSE 6中接收到未处理的异常错误oracle.jbo.JboException: JBO-29000: 捕获到意外的异常错误: java.sql.SQLDataException, msg…

要孩子逻辑清晰、善于思考,别忽视空间想象力的游戏锻炼!

▲数据汪特别推荐点击上图进入玩酷屋在之前的文章时&#xff0c;马斯提到数学存在一种现象叫“梯次掉队”&#xff0c;原因在于孩子的数学思维地基没有打牢。&#xff08;传送门&#xff09;提到初中孩子需要空间想象能力时&#xff0c;很多父母疑惑为何需要&#xff1f;关于这…

ORACLE数据加载加本,使用oracle sqlldr加载数据

oracle sqlldr 实验tab 分隔处理&#xff0c;空格分隔处理&#xff0c;逗号分隔处理日期列处理截断处理包含双引号处理列为空处理1.数据文件data.txt2012-01-01 10:01:01.001 "1"a"cc"2012-02-01 10:01:01.002 "2"bc"dd"2012-03-01 10…

ML.NET Cookbook:(16)什么是规范化?为什么我需要关心?

在ML.NET中&#xff0c;我们公开了许多参数和非参数算法[1]。通常&#xff0c;参数学习器对训练数据持有一定的假设&#xff0c;如果不满足这些假设&#xff0c;训练就会受到极大的阻碍&#xff08;有时甚至完全不可能&#xff09;。最常见的假设是所有特征的值大致相同&#x…

mysql查看当前连接数

命令&#xff1a; show processlist; 如果是root帐号&#xff0c;你能看到所有用户的当前连接。如果是其它普通帐号&#xff0c;只能看到自己占用的连接。 show processlist;只列出前100条&#xff0c;如果想全列出请使用show full processlist; mysql> show proce…

公摊面积取消闹乌龙,历史学家李学勤逝世,微软员工抗议国防大单,前摩拜CEO后花68万上学,这就是今天的大新闻。...

今天是2月25日农历正月廿一今天星期一大家看起来都好像很兴奋下面是今天的大新闻“公摊面积”要取消? 央视&#xff1a;这是错误理解(今日头条)近日有关“公摊面积”的新闻被刷屏。那么&#xff0c;这是否意味着&#xff0c;住宅交易面积将从建筑面积变为套内面积&#xff1f;…

oracle取位置,获取oracle trace文件路径

10g:/* 11g依然有效 */SELECT d.VALUE|| /|| LOWER (RTRIM (i.instance, CHR (0)))|| _ora_|| p.spid|| .trctrace_file_nameFROM (SELECT p.spidFROM sys.v$mystat m, sys.v$session s, sys.v$process pWHERE m.statistic# 1 AND s.sid m.sid AND p.addr s.paddr) p,(SE…

MySQL 删除数据的最好的方式

1 Drop table 命令 DROP TABLE 这个命令会删除整个表和数据&#xff0c;删除之后你就不能还原会之前的数据结构和数据了 2 DELETE * FROM Table DELETE * FROM Table 这个语句会移除数据&#xff0c;只留下自动增长的值&#xff08;id&#xff09;和其余的表结构。如果表很大那…

快手春节活动奖励未到账,被羊毛党投诉上了全国12315平台

全世界只有3.14 % 的人关注了数据与算法之美在这个获客成本越来越高的互联网时代下&#xff0c;通过现金激励的方式来拉新已经成为众多中国互联网公司的惯用手法了。今年春节&#xff0c;短视频公司快手就推出了“上快手&#xff0c;分6亿现金”的红包活动。在活动期间&#xf…

php 异常 重试,Python中异常重试的解决方案详解

前言大家在做数据抓取的时候&#xff0c;经常遇到由于网络问题导致的程序保存&#xff0c;先前只是记录了错误内容&#xff0c;并对错误内容进行后期处理。原先的流程&#xff1a;def crawl_page(url):passdef log_error(url):passurl ""try:crawl_page(url)except:…

通过脚本案例学习shell(二) --- 通过线性显示/etc/passwd内容了解while read用法

通过脚本案例学习shell&#xff08;二&#xff09;--- 通过线性显示/etc/passwd内容了解while read用法 版权声明&#xff1a; 本文遵循“署名非商业性使用相同方式共享 2.5 中国大陆”协议您可以自由复制、发行、展览、表演、放映、广播或通过信息网络传播本作品您可以根据本…

上几个WebAPI就算微服务架构?Too Young!

毋庸置疑&#xff0c;当下是微服务云原生的时代&#xff0c;这是最坏的时代&#xff0c;也是最好的时代&#xff01;机遇和挑战并行&#xff0c;技术人之间的差距在逐渐拉到&#xff01;两极分化严重早在2015年&#xff0c;微服务就已经被诸多大企业认可和推行&#xff0c;被称…

雨雪出行伴侣,优质PVC时尚鞋套,防滑/防水更耐磨

▲数据汪特别推荐点击上图进入玩酷屋随着消费升级越来越多的人愿意购买价格不菲的鞋款大街小巷里涌现出越来越多的Sneakerhead&#xff08;俗称&#xff1a;鞋子发烧友&#xff09;就比如小木每次刚入手一双新鞋就高高兴兴穿出门然而终究免不了碰上“新鞋魔咒”再怎么小心都会被…

mac下好用的php环境变量,php-mac系统 环境变量设置

php-mac环境变量设置sudo vi ~/.bash_profile# 添加一行。注意 PHP5.4.10 修改成你正在运行的 PHP 版本目录名称export PATH"/Applications/MAMP/bin/php/php5.4.10/bin:$PATH"# 保存&#xff0c;退出# 运行一下 .bash_profile 文件. .bash_profile# 确认当前正在运行…

poj 2411 Mondriaan's Dream

状态压缩DP 经典覆盖问题&#xff0c;输入n和m表示一个n*m的矩形&#xff0c;用1*2的方块进行覆盖&#xff0c;不能重叠&#xff0c;不能越出矩形边界&#xff0c;问完全覆盖完整个矩形有多少种不同的方案 其中n和m均为奇数的话&#xff0c;矩形面积就是奇数&#xff0c;可知是…

又到618,.NET 千万级秒杀架构到底有多牛

年年618&#xff0c;次次高并发。其实这不仅仅是对618下各大电商平台的考验&#xff0c;更是如今每一个互联网应用上线后&#xff0c;会遇到的一个严峻的考验&#xff0c;渡得过 965&#xff0c;渡不过 996。在这个极速膨胀的互联网世界里&#xff0c; .NET 5 正是为了应对与解…

灯泡里的钨丝是怎么放进去的,这个视频解开我20多年的疑惑!

全世界只有3.14 % 的人关注了数据与算法之美白炽灯渐渐从我们的视线里消失了&#xff0c;不得不说这个一个伟大的发明&#xff0c;试想一下要是没有灯&#xff0c;只点蜡烛会有多少人抓狂&#xff0c;那么你知道灯泡里的钨丝是怎么放进去的吗&#xff0c;这个视频给你答案。灯泡…

exp 导数oracle,指数函数 exp(x) 导数的直接求法

在我读高中的时候&#xff0c;数学课程里是没有微积分的&#xff0c;当时自学微积分&#xff0c;用的是一种很简明的数学手册&#xff0c;里面只有结果没有证明。看到指数函数求导的时候&#xff0c;怎么也想不明白这个 \( ye^x\) 的导数 \( y’e^x\) 是怎么求出来的。在当时那…

分布式和集群的概念和区别

分布式系统是当前比较热门的话题&#xff0c;说到分布式就不得不提集群和单机&#xff0c;如果要学习分布式就要先对他的概念和功能有所了解单机单机就是把做的系统部署到一台服务器上&#xff0c;所有的请求业务都由这台服务器处理。显然&#xff0c;当业务增长到一定程度的时…

渤海发现大油田,证券会提示风险,微博回应流量造假,刘国梁制定史上最严奖惩体系,这就是今天的大新闻。...

今天是2月26日农历正月廿二今天星期二有点小忙下面是今天的大新闻渤海发现可供百万人用百年的大油田&#xff08;中化新网&#xff09;中国海油昨天(25日)对外宣布&#xff0c;位于我国渤海海域的渤中19-6气田&#xff0c;测试获得优质高产油气流&#xff0c;确定天然气探明地质…