C#项目实战

news2024/10/5 21:17:47
事件
public delegate void NumManipulationHandler(NumEventArgs e);
// 基于上面的委托定义事件
public event NumManipulationHandler ChangeNum;
 public class Program
    {
        public static void Main()
        {

            NumEvent even = new NumEvent(0);
            even.ChangeNum += EventAction.Action;

            even.SetValue(7);
            even.SetValue(11);

            System.Console.ReadKey();
        }
    }

    public class NumEvent
    {
        private int value;

        public delegate void NumManipulationHandler(NumEventArgs e);

        public event NumManipulationHandler ChangeNum;

        public virtual void OnChangeNum(NumEventArgs e)
        {
            ChangeNum?.Invoke(e);
        }

        public NumEvent(int n)
        {
            SetValue(n);
        }

        public void SetValue(int n)
        {
            if (value != n)
            {
                NumEventArgs e = new NumEventArgs(n);
                value = n;
                OnChangeNum(e);
            }
        }
    }

    public class EventAction
    {
        public static void Action(NumEventArgs e)
        {
            System.Console.WriteLine("value : " + e.value);
        }
    }

    public class NumEventArgs : EventArgs
    {
        public int value;
        public NumEventArgs(int _value)
        {
            this.value = _value;
        }
    }
ini读写 
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Linq;
using System.Text;

namespace DEMOBus
{
    public class IniFile
    {
        private string m_FileName;

        public string FileName
        {
            get { return m_FileName; }
            set { m_FileName = value; }
        }

        [DllImport("kernel32.dll")]
        private static extern int GetPrivateProfileInt(
            string lpAppName,
            string lpKeyName,
            int nDefault,
            string lpFileName
            );

        [DllImport("kernel32.dll")]
        private static extern int GetPrivateProfileString(
            string lpAppName,
            string lpKeyName,
            string lpDefault,
            StringBuilder lpReturnedString,
            int nSize,
            string lpFileName
            );

        [DllImport("kernel32.dll")]
        private static extern int WritePrivateProfileString(
            string lpAppName,
            string lpKeyName,
            string lpString,
            string lpFileName
            );

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="aFileName">Ini文件路径</param>
        public IniFile(string aFileName)
        {
            this.m_FileName = aFileName;
        }

        /// <summary>
        /// 构造函数
        /// </summary>
        public IniFile()
        { }

        /// <summary>
        /// [扩展]读Int数值
        /// </summary>
        /// <param name="section">节</param>
        /// <param name="name">键</param>
        /// <param name="def">默认值</param>
        /// <returns></returns>
        public int ReadInt(string section, string name, int def)
        {
            return GetPrivateProfileInt(section, name, def, this.m_FileName);
        }

        /// <summary>
        /// [扩展]读取string字符串
        /// </summary>
        /// <param name="section">节</param>
        /// <param name="name">键</param>
        /// <param name="def">默认值</param>
        /// <returns></returns>
        public string ReadString(string section, string name, string def)
        {
            StringBuilder vRetSb = new StringBuilder(2048);
            GetPrivateProfileString(section, name, def, vRetSb, 2048, this.m_FileName);
            return vRetSb.ToString();
        }

        /// <summary>
        /// [扩展]写入Int数值,如果不存在 节-键,则会自动创建
        /// </summary>
        /// <param name="section">节</param>
        /// <param name="name">键</param>
        /// <param name="Ival">写入值</param>
        public void WriteInt(string section, string name, int Ival)
        {

            WritePrivateProfileString(section, name, Ival.ToString(), this.m_FileName);
        }

        /// <summary>
        /// [扩展]写入String字符串,如果不存在 节-键,则会自动创建
        /// </summary>
        /// <param name="section">节</param>
        /// <param name="name">键</param>
        /// <param name="strVal">写入值</param>
        public void WriteString(string section, string name, string strVal)
        {
            WritePrivateProfileString(section, name, strVal, this.m_FileName);
        }

        /// <summary>
        /// 删除指定的 节
        /// </summary>
        /// <param name="section"></param>
        public void DeleteSection(string section)
        {
            WritePrivateProfileString(section, null, null, this.m_FileName);
        }

        /// <summary>
        /// 删除全部 节
        /// </summary>
        public void DeleteAllSection()
        {
            WritePrivateProfileString(null, null, null, this.m_FileName);
        }

        /// <summary>
        /// 读取指定 节-键 的值
        /// </summary>
        /// <param name="section"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public string IniReadValue(string section, string name)
        {
            StringBuilder strSb = new StringBuilder(256);
            GetPrivateProfileString(section, name, "", strSb, 256, this.m_FileName);
            return strSb.ToString();
        }

        /// <summary>
        /// 写入指定值,如果不存在 节-键,则会自动创建
        /// </summary>
        /// <param name="section"></param>
        /// <param name="name"></param>
        /// <param name="value"></param>
        public void IniWriteValue(string section, string name, string value)
        {
            WritePrivateProfileString(section, name, value, this.m_FileName);
        }
    }
}
绘图 
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Windows.Forms;

namespace _949CS//实时曲线绘制
{
    class draw
    {
        public List<Point> ptlist = new List<Point> { new Point(0, 0)};
        public PictureBox picbox = new PictureBox();
        public Bitmap mybitmap;//用于双缓冲的位图,和画布等大
        public Int32 xMoveToUp = 0, yMoveToRight = 0;     //X上移距离与Y右移距离
        public Int32 xToLeft = 5, xToRight = 10, yToUp = 5, yToDown = 5; //XY图像边距,x轴起点离左边距,终点右边距,y轴起点下边距,上边距,Y轴坐标为从上往下递增值
        public void DrawLineS(Color color, float Xmax, float Ymax)
        {
            if (ptlist.Count < 2)
            {//空返回
                return;
            }
            mybitmap = new Bitmap(picbox.Width, picbox.Height);//设定位图大小
            Graphics doublebufferg = Graphics.FromImage(mybitmap);//从位图上获取“画布”
            doublebufferg.Clear(Color.Black);//用背景色刷新

            //picbox填充为白色,便于显示图像  500*300
            Rectangle rect = new Rectangle(0, 0, picbox.Width, picbox.Height);
            doublebufferg.FillRectangle(new SolidBrush(Color.Black), rect);
             
            //画X和Y轴
            DrawXY(ref doublebufferg, picbox);
            //X轴上的刻度
            SetYAxis(ref doublebufferg, picbox, Ymax);
            //Y轴上的刻度
            SetXAxis(ref doublebufferg, picbox, Xmax);

            Point[] pt = ptlist.ToArray();
            Int32 i = 0;
            for (i = 0; i < pt.Length; i++)
            {
                pt[i].X += xToLeft + yMoveToRight;//自定义坐标转换
                pt[i].Y = picbox.Height - yToDown - xMoveToUp - pt[i].Y;
                if (i > 0)
                {
                    //要显示的实时曲线部分
                    doublebufferg.DrawLine(new Pen(color, 1), pt[i - 1], pt[i]);
                }
            }
            //将缓冲中的位图绘制到我们的窗体上
            if (!picbox.IsDisposed)
            {   //是够释放
                picbox.BackColor = Color.Black;     //背景色直接设置
                (picbox.CreateGraphics()).DrawImage(mybitmap, 0, 0);
            }
        } 
        //X上移
        public void  SetMoveX(Int32 x)
        {
            xMoveToUp = x;
        }
        //Y右移
        public void  SetMoveY(Int32 y)
        {
            yMoveToRight = y;
        }
        //完成X轴和Y轴的基本部分
        public void  DrawXY(ref Graphics g,PictureBox picbox)
        {
            Pen pen = new Pen(Color.White, 2);//画笔
            SolidBrush sb = new SolidBrush(Color.White);//话刷
            
            //X轴的箭头,实际上是绘制了一个三角形
            Int32 arrorWidth = 5, arrorHeight = 2;   //箭头的三角形中位线长与底边长一半
            Point[] xpts = new Point[3] {   //自定义坐标转换
                new Point(picbox.Width - (xToRight + arrorWidth), picbox.Height - (arrorHeight + yToDown + xMoveToUp)),
                new Point(picbox.Width - xToRight, picbox.Height - yToDown - xMoveToUp),
                new Point(picbox.Width - (xToRight + arrorWidth), picbox.Height + arrorHeight - yToDown - xMoveToUp)
                                        };

            g.DrawLine(pen, xToLeft, picbox.Height - yToDown - xMoveToUp, picbox.Width - xToRight, picbox.Height - yToDown - xMoveToUp);
            g.DrawPolygon(pen, xpts);//自定义坐标转换
            g.DrawString("X", new Font("宋体", 11), sb, picbox.Width - (xToRight), picbox.Height - (yToDown + xMoveToUp));

            //Y轴的箭头,实际上是绘制了一个三角形
            Point[] ypts = new Point[3] { //自定义坐标转换
                     new Point(xToLeft + yMoveToRight - arrorHeight, yToUp + arrorHeight),
                     new Point(xToLeft + yMoveToRight, yToUp), 
                     new Point(xToLeft + yMoveToRight + arrorHeight, yToUp + arrorHeight)
                      };

            g.DrawLine(pen, xToLeft + yMoveToRight, picbox.Height - yToDown, xToLeft + yMoveToRight, yToUp);
            g.DrawPolygon(pen, ypts);//自定义坐标转换
            g.DrawString("Y", new Font("宋体", 11), sb, yMoveToRight + xToLeft + arrorHeight, 0);
        
        }

        //绘制Y轴上的刻度
        public void SetYAxis(ref Graphics g,PictureBox picbox, float YMAX)
        {
            Pen p1 = new Pen(Color.Goldenrod, 1);
            Pen p2 = new Pen(Color.White, 2);
            SolidBrush sb = new SolidBrush(Color.White);

            float ykedu = YMAX / 200;//给定的最大刻度与实际像素的比例关系=,未优化,目前为1:1
            //第一个刻度的两个端点
            float xl = xToLeft - 3 + yMoveToRight, yl = picbox.Height - yToUp, xr = xToLeft + 3 + yMoveToRight, yr = picbox.Height - yToDown;//自定义坐标转换
            for (int j = 0; j < picbox.Height - (yToDown + yToUp); j += 10)
            {
                if (j % 50 == 0)//一个大的刻度,黑色,每隔50像素一个
                {
                    g.DrawLine(p2, xl, yl - j, xr, yl - j);//刻度线
                    string tempy = ((j - xMoveToUp - yToDown) * ykedu).ToString();//自定义坐标转换
                    g.DrawString(tempy, new Font("宋体", 8), sb, xl - 20, yl - j - 5);
                }
                else//小刻度,金黄色,10像素一个
                { g.DrawLine(p1, xl, yl - j, xr, yl - j); }
            }
        }



        //绘制x轴上的刻度
        public void SetXAxis(ref Graphics g,PictureBox picbox, float XMAX)
             {
              Pen p1 = new Pen(Color.Goldenrod, 1);
              Pen p2 = new Pen(Color.White, 2);
              SolidBrush sb = new SolidBrush(Color.White);

              float xkedu = XMAX / 400;  //比例关系未优化,目前为1:1
              float xt = xToLeft, yt = picbox.Height - yToDown - 3 - xMoveToUp, xb = xToLeft, yb = picbox.Height - yToDown + 3 - xMoveToUp;
              //自定义坐标转换
              for (int i = 0; i < picbox.Width - (xToLeft + xToRight); i += 10)
            {

                if (i % 50 == 0)
                {
                    g.DrawLine(p2, xt + i, yt, xb + i, yb);
                    string tempx = ((i - yMoveToRight - xToLeft) * xkedu).ToString();//自定义坐标转换
                    g.DrawString(tempx, new Font("宋体", 8), sb, xt + i - 7, picbox.Height - 25 - xMoveToUp);
                }
                else 
                { g.DrawLine(p1, xt + i, yt, xb + i, yb); }
            }
             }
        
        }

    }

CListCtrlEx重载 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Forms;

namespace ADT_LISTVIEW
{
    enum LIST_TYPE
    {
        NO_TYPE = -1,
        EDIT_TYPE = 0,
        CBO_TYPE = 1,
    }
    class ListViewEx : ListView
    {
        private TextBox m_tb;
        private ComboBox m_cb;
        private bool m_bCheckBox;
        private Int32[ ] m_lst = new Int32[20];     //支持最大列数20
        private string[] m_str = new string[20];       //最大列字符串20
        public void SetChekBox(bool bCheck)
        { m_bCheckBox = bCheck; }
        public void AddCboString(String str) {
            string[] param = str.Split(':');
            m_cb.Items.Clear();
            foreach (string i in param)
            {
                m_cb.Items.Add(i);
            }
            m_cb.SelectedIndex = 0;
        }
        public void SetListType(int nIndex, int type)
        {
            m_lst[nIndex] = type;        }
        public int FindStringInCbo(int nCol, string str)
        {
            if (m_lst[nCol] != 1)
            {
                return -1;
            }
            else
            {
                AddCboString(m_str[nCol]);
                return m_cb.FindString(str, -1);
            }
        }
        public ListViewEx()
        {
            m_tb = new TextBox();
            m_cb = new ComboBox();
            m_tb.Multiline = false;
            m_tb.Visible = false;
            m_cb.Visible = false;
            m_cb.DropDownStyle = ComboBoxStyle.DropDownList;
            m_cb.IntegralHeight = true;
            this.GridLines = true;
            this.CheckBoxes = true;
            this.FullRowSelect = false;
            SetChekBox(this.CheckBoxes);
            this.Controls.Add(m_tb);
            this.Controls.Add(m_cb);
            for (int i = 0; i < 20; i++)
            {
                SetListType(i, 0);
            }
            SetStyle(ControlStyles.DoubleBuffer | ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);  //解决ListView闪烁问题
        }
        public void Insert(int nIndex, ListViewItem item)
        {
            for (int i = 0; i < item.SubItems.Count; i++ )
            {   //保存所有列字符——最多20
                m_str[i] = item.SubItems[i].Text;
                if (m_str[i].IndexOf(':') > 0)
                {
                    SetListType(i, 1);
                    AddCboString(m_str[i]);
                    item.SubItems[i].Text = m_cb.Text;
                }
                else
                {
                    SetListType(i, 0);
                }
            }
            this.Items.Insert(nIndex, item);
        }
        private void EditItem(ListViewItem.ListViewSubItem subItem)
        {
            if (this.SelectedItems.Count <= 0)
            {
                return;
            }
            Rectangle _rect = subItem.Bounds;
            m_tb.Bounds = _rect;
            ListViewItem lvi = this.SelectedItems[0];   //选中的多行第0行
            if (subItem == lvi.SubItems[0] || 0 == subItem.Bounds.X)
            {   //第一列为复选框
                if (m_bCheckBox)
                {
                    return;
                }
                else
                {   //修复宽度
                    m_tb.Width = this.Columns[0].Width;
                }
            }
            m_tb.BringToFront();
            m_tb.Text = subItem.Text;
            m_tb.Leave += new EventHandler(tb_Leave);
            m_tb.TextChanged += new EventHandler(m_tb_TextChanged);
            m_tb.Visible = true;
            m_tb.Tag = subItem;
            m_tb.Select();
        }

        private void EditItem(ListViewItem.ListViewSubItem subItem, Rectangle rt)
        {
            if (this.SelectedItems.Count <= 0)
            {
                return;
            }
            Rectangle _rect = rt;
            m_cb.Bounds = _rect;
            m_cb.BringToFront();
           // m_cb.Items.Add(subItem.Text);
            m_cb.Text = subItem.Text;
            m_cb.Leave += new EventHandler(lstb_Leave);
            m_cb.TextChanged += new EventHandler(m_lstb_TextChanged);
            m_cb.DropDownClosed += new EventHandler(m_lstb_TextChanged);
            m_cb.DropDown += new EventHandler(m_lstb_DropDown);
            m_cb.LostFocus += new EventHandler(lstb_Lost);
            m_cb.Visible = true;
            m_cb.Tag = subItem;
            m_cb.Select();
        }

        protected override void OnKeyDown(KeyEventArgs e)
        {
//             if (e.KeyCode == Keys.F2)
//             {
// 
//                 if (this.SelectedItems.Count > 0)
//                 {
//                     this.SelectedItems[1].BeginEdit();
//                     ListViewItem lvi = this.SelectedItems[0];
//                     EditItem(lvi.SubItems[0], new Rectangle(lvi.Bounds.Left, lvi.Bounds.Top, this.Columns[0].Width, lvi.Bounds.Height - 2));
//                 }
//             }
            base.OnKeyDown(e);
        }

        protected override void OnSelectedIndexChanged(EventArgs e)
        {
            this.m_tb.Visible = false;
            this.m_cb.Visible = false;
            base.OnSelectedIndexChanged(e);
        }
        protected override void OnDoubleClick(EventArgs e)
        {
            Point tmpPoint = this.PointToClient(Cursor.Position);
            ListViewItem.ListViewSubItem subitem = this.HitTest(tmpPoint).SubItem;
            ListViewItem item = this.HitTest(tmpPoint).Item;
            if (subitem != null)
            {
                int nIndex = 0;
                item.Checked = !item.Checked;       //修复双击时反选功能
                if (0 == subitem.Bounds.X)
                {//修复第一列
                    nIndex = 0;
                }
                else
                {
                    nIndex = this.SelectedItems[0].SubItems.IndexOf(subitem);
                    if (nIndex > this.Columns.Count)
                    {   //修复频繁点击时索引不更新bug
                        base.OnDoubleClick(e);
                        return;
                    }
                 }
                if (0 == m_lst[nIndex])
                 {  //类型选择,编辑框
                     EditItem(subitem);
                 }
                else if (1 == m_lst[nIndex])
                 {  //组合框
                     AddCboString(m_str[nIndex]);
                     EditItem(subitem, new Rectangle(subitem.Bounds.Left, subitem.Bounds.Top, this.Columns[nIndex].Width, subitem.Bounds.Height - 2));
                 }
                else
                {
                    ;
                }
                //item.Checked = !item.Checked;
            }
            base.OnDoubleClick(e);
        }
//         protected override void OnDrawColumnHeader(DrawListViewColumnHeaderEventArgs e)
//         {
//             m_cb.Hide();
//             base.OnDrawColumnHeader(e);
//         }
        protected override void WndProc(ref   Message m)
        {
            if (m.Msg == 0x115 || m.Msg == 0x114)
            {
                this.m_tb.Visible = false;
                this.m_cb.Visible = false;
            }
            base.WndProc(ref   m);
        }

        private void tb_Leave(object sender, EventArgs e)
        {
            m_tb.TextChanged -= new EventHandler(m_tb_TextChanged);
            (sender as TextBox).Visible = false;
        }

        private void m_tb_TextChanged(object sender, EventArgs e)
        {
            if ((sender as TextBox).Tag is ListViewItem.ListViewSubItem)
            {
                (this.m_tb.Tag as ListViewItem.ListViewSubItem).Text = this.m_tb.Text;
            }

        }
        private void lstb_Leave(object sender, EventArgs e)
        {
            m_cb.TextChanged -= new EventHandler(m_lstb_TextChanged);
            m_cb.DropDownClosed -= new EventHandler(m_lstb_TextChanged);
            m_cb.DropDownClosed -= new EventHandler(m_lstb_DropDown);
            m_cb.DropDown -= new EventHandler(m_lstb_DropDown);
            m_cb.LostFocus -= new EventHandler(lstb_Lost);
        }

        private void m_lstb_TextChanged(object sender, EventArgs e)
        {
            if ((sender as ComboBox).Tag is ListViewItem.ListViewSubItem)
            {
                (this.m_cb.Tag as ListViewItem.ListViewSubItem).Text = this.m_cb.Text;
            }
        }
        private void m_lstb_DropDown(object sender, EventArgs e)
        {
            if ((sender as ComboBox).Tag is ListViewItem.ListViewSubItem)
            {
                this.m_cb.Text = (this.m_cb.Tag as ListViewItem.ListViewSubItem).Text;
            }
        }
        private void lstb_Lost(object sender, EventArgs e)
        {
            m_cb.Hide();    //隐藏
            lstb_Leave(sender, e);
        }
        
    }
}

 

参考

FastTunnel: 开源免费跨平台 内网穿透 远程内网电脑 自定义域名访问内网站点 反向代理内网服务 http代理 类花生壳 端口转发 微信 小程序 frp NAT ssh proxy tunnel ngork

GitHub - HandyOrg/HandyControl: Contains some simple and commonly used WPF controls 

https://github.com/OfficeDev/Image-FileHandler

https://github.com/probot/no-response

https://github.com/dotnet/Open-XML-SDK

https://github.com/OfficeDev/PnP-WOPI

https://github.com/OfficeDev/Open-XML-SDK

https://github.com/OfficeDev/Excel-IO

GitHub - cnxy/files-uwp: A modern file explorer that pushes the boundaries of the platform.

GitHub - OfficeDev/office-fluent-ui-command-identifiers: Office Fluent User Interface Control Identifiers

Code of Conduct | Microsoft Open Source

https://github.com/CollaboratingPlatypus/PetaPoco

https://www.cnblogs.com/zhangweizhong/p/3718549.html

NuGet Gallery | PetaPoco 5.1.304

https://www.cnblogs.com/zhangweizhong/category/855479.html

https://www.cnblogs.com/zhangweizhong/category/771056.html

https://github.com/LonelyCodelang?tab=repositories

https://worktile.com/share/files/64a3b9c8ec0a4d3d81b89a630177c880

https://github.com/statianzo/PostLog

https://www.cnblogs.com/zhangweizhong/category/771055.html

https://github.com/statianzo/Fleck

https://github.com/EasyHttp/EasyHttp

GitHub - Tencent/xLua: xLua is a lua programming solution for C# ( Unity, .Net, Mono) , it supports android, ios, windows, linux, osx, etc.

QJ_FileCenter: 企捷Lotus文件管理平台是开源文档管理平台/企业网盘,支持企业文件、个人文件等文件分库管理,平台能够满足统一存储、文件共享功能。并提供文件上传、目录维护、重命名、移动、复制、删除、预览、等功能。

需ngnix反向代理,账号admin,密码abc123.搭建个人云盘

企捷科技 - 企捷科技

https://gitee.com/dotnetchina/BootstrapAdmin

dotNET China: 让 .NET 开发更简单,更通用,更流行。

GitHub - files-community/Files: Building the best file manager for Windows

GitHub - MMmmmoko/Bongo-Cat-Mver: An Bongo Cat overlay written in C++


创作不易,小小的支持一下吧!

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

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

相关文章

如何在 Windows 11/10/8/7 中恢复已删除的文件

经历文件一键消失&#xff08;无论出于何种原因&#xff09;可能是最大的噩梦之一。即使您自己删除了文件以释放一些空间&#xff0c;有时您最终还是需要一劳永逸地删除的文件。无论您只是想减轻系统存储的负担并让其容纳最新的数据&#xff0c;还是发现它无关紧要&#xff08;…

开源VisualFreebasic中文版,vb7 IDE,VB6升级64位跨平台开发安卓APP,Linux程序

吴涛老矣&#xff0c;社区苦无64位易语言&#xff0c;用注入DLL增强菜单&#xff0c;做成VS一样的界面 终归是治标不治本&#xff0c;一来会报毒&#xff0c;二来闭源20年没更新了 开源的VB7&#xff0c;欢迎易语言的铁粉进群&#xff1a;1032313876 【Freebasic编程语言】编绎…

算法金 | AI 基石,无处不在的朴素贝叶斯算法

大侠幸会&#xff0c;在下全网同名「算法金」 0 基础转 AI 上岸&#xff0c;多个算法赛 Top 「日更万日&#xff0c;让更多人享受智能乐趣」 历史上&#xff0c;许多杰出人才在他们有生之年默默无闻&#xff0c; 却在逝世后被人们广泛追忆和崇拜。 18世纪的数学家托马斯贝叶斯…

【python】python GUI编程--tkinter模块初探

✨✨ 欢迎大家来到景天科技苑✨✨ &#x1f388;&#x1f388; 养成好习惯&#xff0c;先赞后看哦~&#x1f388;&#x1f388; &#x1f3c6; 作者简介&#xff1a;景天科技苑 &#x1f3c6;《头衔》&#xff1a;大厂架构师&#xff0c;华为云开发者社区专家博主&#xff0c;…

【RabbitMQ】RabbitMQ配置与交换机学习

【RabbitMQ】RabbitMQ配置与交换机学习 文章目录 【RabbitMQ】RabbitMQ配置与交换机学习简介安装和部署1. 安装RabbitMQ2.创建virtual-host3. 添加依赖4.修改配置文件 WorkQueues模型1.编写消息发送测试类2.编写消息接收&#xff08;监听&#xff09;类3. 实现能者多劳 交换机F…

特种设备起重机指挥题库附答案

1、【多选题】力的三要素是指:( )。(ACD) A、力的大小 B、力的单位 C、力的方向 D、力的作用点 2、【多选题】司索作业规范正确的要求是( )(ABC) A、吊点正确 B、吊索挂设合理 C、绑扎牢靠 D、吊索长短一致 3、【多选题】圆柱形物体兜吊时&#xff0c;一定要放空圈&#…

LearnDash+BuddyBoss:终极在线课程社区组合

您是否希望使用 WordPress 建立在线课程社区&#xff1f; 如果是这样&#xff0c;没有比LearnDash和BuddyBoss在线课程社区更好的组合了。使用这两款产品&#xff0c;您可以创建和销售在线课程、创建群组和讨论&#xff0c;并为您的学生提供整个社交网络&#xff0c;所有这些都…

用咖啡来理解springboot3的自动配置机制

大家好&#xff0c;这里是教授.F 目录 前提知识&#xff1a; 场景引入&#xff1a; 1.Starter依赖&#xff1a; 2.默认配置&#xff1a; 3.自定义配置&#xff1a; 4.条件化配置&#xff1a; 5.自动装配&#xff1a; 具体过程&#xff1a; 扫包路径的配置&#xff1a; 配置…

JVisuaIVM监控Jstatd启动时报错

一、 启动监控Jstatd报错 当我们在windows系统上面启动的时候好好的&#xff0c;在linux上面启动报错&#xff0c;提示报错如下&#xff0c;好像每一什么权限之类的 在tomcat下面查看你的项目使用的java版本&#xff0c;vi /usr/local/tomcat7-8083/bin/catalina.sh 查看我的…

shell编程(三)—— 运算符

和其他编程语言一样&#xff0c;bash也有多种类型的运算符&#xff0c;本篇对bash的相关运算符做简单介绍。 一、运算符 1.1 算术运算符 常见的算术运算符&#xff0c;如加&#xff08;&#xff09;、减&#xff08;-&#xff09;、乘&#xff08;*&#xff09;、除&#xf…

使用Leaflet-canvas-label进行个性化标注实践详解

目录 前言 一、leaflet-canvas-label属性 1、地图展示属性 2、Canvas文本标注属性 3、事件列表 二、属性设置实战 1、标注放大比例 2、字体颜色和方向偏移 3、标注文字透明色设置 4、标注显示层级 三、事件绑定 1、颜色改变 2、事件绑定解析 3、标记初始化的一个小…

html5实现个人网站源码

文章目录 1.设计来源1.1 网站首页页面1.2 个人工具页面1.3 个人日志页面1.4 个人相册页面1.5 给我留言页面 2.效果和源码2.1 动态效果2.2 目录结构 源码下载 作者&#xff1a;xcLeigh 文章地址&#xff1a;https://blog.csdn.net/weixin_43151418/article/details/139564407 ht…

427. 建立四叉树

427. 建立四叉树 题目难度-中等1. dfs分治 题目难度-中等 给你一个 n * n 矩阵 grid &#xff0c;矩阵由若干 0 和 1 组成。请你用四叉树表示该矩阵 grid 。 你需要返回能表示矩阵 grid 的 四叉树 的根结点。 四叉树数据结构中&#xff0c;每个内部节点只有四个子节点。此外…

音程与和弦 音程协和度

2个音符之间的音程计算 1234567&#xff0c;1到7的音程是7度&#xff0c;音程是计算总长度&#xff0c;看音级的个数。 Cubase中的音程计算 下面一个是4度&#xff0c;一个是3度&#xff0c;格子中深色的行就是黑键行。 根据半音数量来确定对应音程的专业术语叫法 旋律音程、…

国产嵌入式仪器模块:电子负载模块及自动化测试软件

• 输入电流在 0–5 A 范围内线性可调 • 最大功率达 150 W&#xff0c;满足多种定制化应用场景 • 支持 CC/CR/CV 多种工作模式 • 支持多种辅助模块&#xff08;如 PD 控制、信号调制、二维码扫描&#xff09; 应用场景 • 负载能力测试&#xff08;电源或信号&#xff0…

opencv--使用opencv实现旋转角度的模板匹配

下面的例子是简单的使用opencv 实现的模板匹配流程&#xff0c;其中时间性能和精确度还需要调整&#xff0c;如果直接使用会出问题&#xff0c;所以这个只是例子&#xff0c;根据代码原理可以实现尺度变化的模板匹配和旋转尺度变化同时&#xff0c;具体根据实现的旋转代码进一步…

【Unity学习笔记】反射

文章目录 前言反射通过反射获取类型 Unity中的反射用反射在Unity中动态加载 前言 在我平时做项目的时候&#xff0c;由于我们做的项目都是很简单的&#xff0c;所以不怎么接触反射机制。最早了解反射机制是关于Invoke的时候&#xff0c;知道可以通过方法名来直接进行Invoke调用…

【会议征稿,IEEE出版】第三届能源与电力系统国际学术会议 (ICEEPS 2024,7月14-16)

如今&#xff0c;全球能源行业正面临着前所未有的挑战。一方面&#xff0c;加快向清洁、可再生能源转型是遏制能源环境污染问题的最佳途径之一&#xff1b;另一方面&#xff0c;电力系统中新能源发电、人工智能技术、电力电子装备等被广泛应用和期待&#xff0c;以提高能源可持…

汇编:结构体

在32位汇编中&#xff0c;结构体&#xff08;structures&#xff09;用于组织和管理复杂的数据类型&#xff0c;结构体可以包含多个不同类型的数据项&#xff08;成员&#xff09;&#xff1b;在MASM&#xff08;Microsoft Macro Assembler&#xff09;中&#xff0c;使用结构体…

Qt——升级系列(Level Four):控件概述、QWidget 核心属性、按钮类控件

目录 控件概述 QWidget 核心属性 核心属性概览 enabled geometry windowTitle windowIcon windowOpacity cursor font toolTip focusPolicy styleSheet 按钮类控件 Push Button Radio Buttion Check Box Tool Button 控件概述 Widget 是 Qt 中的核⼼概念. 英⽂原义是 "…