using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace 仿XP系统的任务栏菜单
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

private static Panel Var_Panel = new Panel();
        private static PictureBox Var_Pict = new PictureBox();
        private static int Var_i = 0;
        private Font Var_Font = new Font("宋体", 9);

private void pictureBox_1_Click(object sender, EventArgs e)
        {
            Var_i = Convert.ToInt16(((PictureBox)sender).Tag.ToString());
            switch (Var_i)
            {
                case 1:
                    {
                        Var_Panel = panel_Gut_1;
                        Var_Pict = pictureBox_1;
                        break;
                    }
                case 2:
                    {
                        Var_Panel = panel_Gut_2;
                        Var_Pict = pictureBox_2;
                        break;
                    }
                case 3:
                    {
                        Var_Panel = panel_Gut_3;
                        Var_Pict = pictureBox_3;
                        break;
                    }

}
            if (Convert.ToInt16(Var_Panel.Tag.ToString()) == 0 || Convert.ToInt16(Var_Panel.Tag.ToString()) == 2)
            {
                Var_Panel.Tag = 1;//隐藏标识
                Var_Pict.Image = null;
                Var_Pict.Image = Properties.Resources.朝下按钮;
                Var_Panel.Visible = false;
            }
            else
            {
                if (Convert.ToInt16(Var_Panel.Tag.ToString()) == 1)
                {
                    Var_Panel.Tag = 2;//显示标识
                    Var_Pict.Image = null;
                    Var_Pict.Image = Properties.Resources.朝上按钮;
                    Var_Panel.Visible = true;
                }
            }
        }

private void Form1_Load(object sender, EventArgs e)
        {
            pictureBox_1.Image = null;
            pictureBox_1.Image = Properties.Resources.朝上按钮;
            pictureBox_2.Image = null;
            pictureBox_2.Image = Properties.Resources.朝上按钮;
            pictureBox_3.Image = null;
            pictureBox_3.Image = Properties.Resources.朝上按钮;
            Var_Font = label_1.Font;
        }

private void label_1_MouseEnter(object sender, EventArgs e)
        {
            ((Label)sender).ForeColor = Color.Gray;
            ((Label)sender).Font = new Font(Var_Font, Var_Font.Style | FontStyle.Underline);
        }

private void label_1_MouseLeave(object sender, EventArgs e)
        {
            ((Label)sender).ForeColor = Color.Black;
            ((Label)sender).Font = new Font(Var_Font, Var_Font.Style);
        }
    }
}
namespace 仿XP系统的任务栏菜单
{
    partial class Form1
    {
        /// <summary>
        /// 必需的设计器变量。
        /// </summary>
        private System.ComponentModel.IContainer components = null;

/// <summary>
        /// 清理所有正在使用的资源。
        /// </summary>
        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

#region Windows 窗体设计器生成的代码

/// <summary>
        /// 设计器支持所需的方法 - 不要
        /// 使用代码编辑器修改此方法的内容。
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.panel1 = new System.Windows.Forms.Panel();
            this.panel_All = new System.Windows.Forms.Panel();
            this.panel_Gut_3 = new System.Windows.Forms.Panel();
            this.label_7 = new System.Windows.Forms.Label();
            this.label_6 = new System.Windows.Forms.Label();
            this.panel_Title3 = new System.Windows.Forms.Panel();
            this.pictureBox_3 = new System.Windows.Forms.PictureBox();
            this.panel_Border_2 = new System.Windows.Forms.Panel();
            this.panel_Gut_2 = new System.Windows.Forms.Panel();
            this.label_5 = new System.Windows.Forms.Label();
            this.label_4 = new System.Windows.Forms.Label();
            this.label_3 = new System.Windows.Forms.Label();
            this.panel_Title_2 = new System.Windows.Forms.Panel();
            this.pictureBox_2 = new System.Windows.Forms.PictureBox();
            this.panel_Border_1 = new System.Windows.Forms.Panel();
            this.panel_Gut_1 = new System.Windows.Forms.Panel();
            this.label_2 = new System.Windows.Forms.Label();
            this.label_1 = new System.Windows.Forms.Label();
            this.panel_Title_1 = new System.Windows.Forms.Panel();
            this.pictureBox_1 = new System.Windows.Forms.PictureBox();
            this.panel_All.SuspendLayout();
            this.panel_Gut_3.SuspendLayout();
            this.panel_Title3.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox_3)).BeginInit();
            this.panel_Gut_2.SuspendLayout();
            this.panel_Title_2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox_2)).BeginInit();
            this.panel_Gut_1.SuspendLayout();
            this.panel_Title_1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox_1)).BeginInit();
            this.SuspendLayout();
            //
            // panel1
            //
            this.panel1.BackgroundImage = global::仿XP系统的任务栏菜单.Properties.Resources._1;
            this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.panel1.Location = new System.Drawing.Point(208, 0);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(352, 347);
            this.panel1.TabIndex = 1;
            //
            // panel_All
            //
            this.panel_All.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel_All.BackgroundImage")));
            this.panel_All.Controls.Add(this.panel_Gut_3);
            this.panel_All.Controls.Add(this.panel_Title3);
            this.panel_All.Controls.Add(this.panel_Border_2);
            this.panel_All.Controls.Add(this.panel_Gut_2);
            this.panel_All.Controls.Add(this.panel_Title_2);
            this.panel_All.Controls.Add(this.panel_Border_1);
            this.panel_All.Controls.Add(this.panel_Gut_1);
            this.panel_All.Controls.Add(this.panel_Title_1);
            this.panel_All.Dock = System.Windows.Forms.DockStyle.Left;
            this.panel_All.Location = new System.Drawing.Point(0, 0);
            this.panel_All.Name = "panel_All";
            this.panel_All.Size = new System.Drawing.Size(208, 347);
            this.panel_All.TabIndex = 0;
            //
            // panel_Gut_3
            //
            this.panel_Gut_3.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel_Gut_3.BackgroundImage")));
            this.panel_Gut_3.Controls.Add(this.label_7);
            this.panel_Gut_3.Controls.Add(this.label_6);
            this.panel_Gut_3.Dock = System.Windows.Forms.DockStyle.Top;
            this.panel_Gut_3.Location = new System.Drawing.Point(0, 262);
            this.panel_Gut_3.Name = "panel_Gut_3";
            this.panel_Gut_3.Size = new System.Drawing.Size(208, 81);
            this.panel_Gut_3.TabIndex = 7;
            this.panel_Gut_3.Tag = "0";
            //
            // label_7
            //
            this.label_7.AutoSize = true;
            this.label_7.BackColor = System.Drawing.Color.Transparent;
            this.label_7.Location = new System.Drawing.Point(43, 48);
            this.label_7.Name = "label_7";
            this.label_7.Size = new System.Drawing.Size(53, 12);
            this.label_7.TabIndex = 1;
            this.label_7.Text = "我的文档";
            this.label_7.MouseLeave += new System.EventHandler(this.label_1_MouseLeave);
            this.label_7.MouseEnter += new System.EventHandler(this.label_1_MouseEnter);
            //
            // label_6
            //
            this.label_6.AutoSize = true;
            this.label_6.BackColor = System.Drawing.Color.Transparent;
            this.label_6.Location = new System.Drawing.Point(43, 20);
            this.label_6.Name = "label_6";
            this.label_6.Size = new System.Drawing.Size(53, 12);
            this.label_6.TabIndex = 0;
            this.label_6.Text = "我的电脑";
            this.label_6.MouseLeave += new System.EventHandler(this.label_1_MouseLeave);
            this.label_6.MouseEnter += new System.EventHandler(this.label_1_MouseEnter);
            //
            // panel_Title3
            //
            this.panel_Title3.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel_Title3.BackgroundImage")));
            this.panel_Title3.Controls.Add(this.pictureBox_3);
            this.panel_Title3.Dock = System.Windows.Forms.DockStyle.Top;
            this.panel_Title3.Location = new System.Drawing.Point(0, 237);
            this.panel_Title3.Name = "panel_Title3";
            this.panel_Title3.Size = new System.Drawing.Size(208, 25);
            this.panel_Title3.TabIndex = 6;
            //
            // pictureBox_3
            //
            this.pictureBox_3.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox_3.Location = new System.Drawing.Point(171, 3);
            this.pictureBox_3.Name = "pictureBox_3";
            this.pictureBox_3.Size = new System.Drawing.Size(20, 20);
            this.pictureBox_3.TabIndex = 0;
            this.pictureBox_3.TabStop = false;
            this.pictureBox_3.Tag = "3";
            this.pictureBox_3.Click += new System.EventHandler(this.pictureBox_1_Click);
            //
            // panel_Border_2
            //
            this.panel_Border_2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel_Border_2.BackgroundImage")));
            this.panel_Border_2.Dock = System.Windows.Forms.DockStyle.Top;
            this.panel_Border_2.Location = new System.Drawing.Point(0, 227);
            this.panel_Border_2.Name = "panel_Border_2";
            this.panel_Border_2.Size = new System.Drawing.Size(208, 10);
            this.panel_Border_2.TabIndex = 5;
            //
            // panel_Gut_2
            //
            this.panel_Gut_2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel_Gut_2.BackgroundImage")));
            this.panel_Gut_2.Controls.Add(this.label_5);
            this.panel_Gut_2.Controls.Add(this.label_4);
            this.panel_Gut_2.Controls.Add(this.label_3);
            this.panel_Gut_2.Dock = System.Windows.Forms.DockStyle.Top;
            this.panel_Gut_2.Location = new System.Drawing.Point(0, 146);
            this.panel_Gut_2.Name = "panel_Gut_2";
            this.panel_Gut_2.Size = new System.Drawing.Size(208, 81);
            this.panel_Gut_2.TabIndex = 4;
            this.panel_Gut_2.Tag = "0";
            //
            // label_5
            //
            this.label_5.AutoSize = true;
            this.label_5.BackColor = System.Drawing.Color.Transparent;
            this.label_5.Location = new System.Drawing.Point(43, 59);
            this.label_5.Name = "label_5";
            this.label_5.Size = new System.Drawing.Size(53, 12);
            this.label_5.TabIndex = 2;
            this.label_5.Text = "Internet";
            this.label_5.MouseLeave += new System.EventHandler(this.label_1_MouseLeave);
            this.label_5.MouseEnter += new System.EventHandler(this.label_1_MouseEnter);
            //
            // label_4
            //
            this.label_4.AutoSize = true;
            this.label_4.BackColor = System.Drawing.Color.Transparent;
            this.label_4.Location = new System.Drawing.Point(43, 37);
            this.label_4.Name = "label_4";
            this.label_4.Size = new System.Drawing.Size(41, 12);
            this.label_4.TabIndex = 1;
            this.label_4.Text = "计算器";
            this.label_4.MouseLeave += new System.EventHandler(this.label_1_MouseLeave);
            this.label_4.MouseEnter += new System.EventHandler(this.label_1_MouseEnter);
            //
            // label_3
            //
            this.label_3.AutoSize = true;
            this.label_3.BackColor = System.Drawing.Color.Transparent;
            this.label_3.Location = new System.Drawing.Point(43, 15);
            this.label_3.Name = "label_3";
            this.label_3.Size = new System.Drawing.Size(41, 12);
            this.label_3.TabIndex = 0;
            this.label_3.Text = "记事本";
            this.label_3.MouseLeave += new System.EventHandler(this.label_1_MouseLeave);
            this.label_3.MouseEnter += new System.EventHandler(this.label_1_MouseEnter);
            //
            // panel_Title_2
            //
            this.panel_Title_2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel_Title_2.BackgroundImage")));
            this.panel_Title_2.Controls.Add(this.pictureBox_2);
            this.panel_Title_2.Dock = System.Windows.Forms.DockStyle.Top;
            this.panel_Title_2.Location = new System.Drawing.Point(0, 121);
            this.panel_Title_2.Name = "panel_Title_2";
            this.panel_Title_2.Size = new System.Drawing.Size(208, 25);
            this.panel_Title_2.TabIndex = 3;
            //
            // pictureBox_2
            //
            this.pictureBox_2.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox_2.Location = new System.Drawing.Point(171, 3);
            this.pictureBox_2.Name = "pictureBox_2";
            this.pictureBox_2.Size = new System.Drawing.Size(20, 20);
            this.pictureBox_2.TabIndex = 0;
            this.pictureBox_2.TabStop = false;
            this.pictureBox_2.Tag = "2";
            this.pictureBox_2.Click += new System.EventHandler(this.pictureBox_1_Click);
            //
            // panel_Border_1
            //
            this.panel_Border_1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel_Border_1.BackgroundImage")));
            this.panel_Border_1.Dock = System.Windows.Forms.DockStyle.Top;
            this.panel_Border_1.Location = new System.Drawing.Point(0, 111);
            this.panel_Border_1.Name = "panel_Border_1";
            this.panel_Border_1.Size = new System.Drawing.Size(208, 10);
            this.panel_Border_1.TabIndex = 2;
            //
            // panel_Gut_1
            //
            this.panel_Gut_1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel_Gut_1.BackgroundImage")));
            this.panel_Gut_1.Controls.Add(this.label_2);
            this.panel_Gut_1.Controls.Add(this.label_1);
            this.panel_Gut_1.Dock = System.Windows.Forms.DockStyle.Top;
            this.panel_Gut_1.Location = new System.Drawing.Point(0, 30);
            this.panel_Gut_1.Name = "panel_Gut_1";
            this.panel_Gut_1.Size = new System.Drawing.Size(208, 81);
            this.panel_Gut_1.TabIndex = 1;
            this.panel_Gut_1.Tag = "0";
            //
            // label_2
            //
            this.label_2.AutoSize = true;
            this.label_2.BackColor = System.Drawing.Color.Transparent;
            this.label_2.Location = new System.Drawing.Point(43, 48);
            this.label_2.Name = "label_2";
            this.label_2.Size = new System.Drawing.Size(77, 12);
            this.label_2.TabIndex = 1;
            this.label_2.Text = "客户信息录入";
            this.label_2.MouseLeave += new System.EventHandler(this.label_1_MouseLeave);
            this.label_2.MouseEnter += new System.EventHandler(this.label_1_MouseEnter);
            //
            // label_1
            //
            this.label_1.AutoSize = true;
            this.label_1.BackColor = System.Drawing.Color.Transparent;
            this.label_1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.label_1.Location = new System.Drawing.Point(43, 20);
            this.label_1.Name = "label_1";
            this.label_1.Size = new System.Drawing.Size(77, 12);
            this.label_1.TabIndex = 0;
            this.label_1.Text = "产品信息录入";
            this.label_1.MouseLeave += new System.EventHandler(this.label_1_MouseLeave);
            this.label_1.MouseEnter += new System.EventHandler(this.label_1_MouseEnter);
            //
            // panel_Title_1
            //
            this.panel_Title_1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel_Title_1.BackgroundImage")));
            this.panel_Title_1.Controls.Add(this.pictureBox_1);
            this.panel_Title_1.Dock = System.Windows.Forms.DockStyle.Top;
            this.panel_Title_1.Location = new System.Drawing.Point(0, 0);
            this.panel_Title_1.Name = "panel_Title_1";
            this.panel_Title_1.Size = new System.Drawing.Size(208, 30);
            this.panel_Title_1.TabIndex = 0;
            //
            // pictureBox_1
            //
            this.pictureBox_1.Cursor = System.Windows.Forms.Cursors.Hand;
            this.pictureBox_1.Location = new System.Drawing.Point(171, 8);
            this.pictureBox_1.Name = "pictureBox_1";
            this.pictureBox_1.Size = new System.Drawing.Size(20, 20);
            this.pictureBox_1.TabIndex = 0;
            this.pictureBox_1.TabStop = false;
            this.pictureBox_1.Tag = "1";
            this.pictureBox_1.Click += new System.EventHandler(this.pictureBox_1_Click);
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(560, 347);
            this.Controls.Add(this.panel1);
            this.Controls.Add(this.panel_All);
            this.Name = "Form1";
            this.Text = "仿XP系统的任务栏菜单";
            this.Load += new System.EventHandler(this.Form1_Load);
            this.panel_All.ResumeLayout(false);
            this.panel_Gut_3.ResumeLayout(false);
            this.panel_Gut_3.PerformLayout();
            this.panel_Title3.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox_3)).EndInit();
            this.panel_Gut_2.ResumeLayout(false);
            this.panel_Gut_2.PerformLayout();
            this.panel_Title_2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox_2)).EndInit();
            this.panel_Gut_1.ResumeLayout(false);
            this.panel_Gut_1.PerformLayout();
            this.panel_Title_1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox_1)).EndInit();
            this.ResumeLayout(false);

}

#endregion

private System.Windows.Forms.Panel panel_All;
        private System.Windows.Forms.Panel panel_Title_1;
        private System.Windows.Forms.Panel panel_Gut_2;
        private System.Windows.Forms.Panel panel_Title_2;
        private System.Windows.Forms.Panel panel_Border_1;
        private System.Windows.Forms.Panel panel_Gut_1;
        private System.Windows.Forms.Panel panel_Border_2;
        private System.Windows.Forms.Panel panel_Title3;
        private System.Windows.Forms.Panel panel_Gut_3;
        private System.Windows.Forms.PictureBox pictureBox_1;
        private System.Windows.Forms.PictureBox pictureBox_2;
        private System.Windows.Forms.PictureBox pictureBox_3;
        private System.Windows.Forms.Label label_2;
        private System.Windows.Forms.Label label_1;
        private System.Windows.Forms.Label label_5;
        private System.Windows.Forms.Label label_4;
        private System.Windows.Forms.Label label_3;
        private System.Windows.Forms.Label label_7;
        private System.Windows.Forms.Label label_6;
        private System.Windows.Forms.Panel panel1;
    }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace 仿XP系统的任务栏菜单
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
    }
}

仿XP系统的任务栏菜单的更多相关文章

  1. Winform中实现仿XP系统的任务栏菜单效果(附代码下载)

    场景 效果 注: 博客主页: https://blog.csdn.net/badao_liumang_qizhi 关注公众号 霸道的程序猿 获取编程相关电子书.教程推送与免费下载. 实现 新建一个Fo ...

  2. 仿苹果电脑任务栏菜单&&拼图小游戏&&模拟表单控件

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  3. 手摸手,带你用vue实现后台管理权限系统及顶栏三级菜单显示

    手摸手,带你用vue实现后台管理权限系统及顶栏三级菜单显示 效果演示地址 项目demo展示 重要功能总结 权限功能的实现 权限路由思路: 根据用户登录的roles信息与路由中配置的roles信息进行比 ...

  4. xp系统下硬盘安装centos6.5

    引言: 电脑系统是Windows XP,电脑没有光驱.手头没有U盘.没有移动硬盘.电脑主板不支持U盘启动,在这种情况下想安装CentOS 6.0,有木有办法? 答案:有办法,请看下面教程! 必备工具: ...

  5. 怎么解决xp系统不能安装NET Framework4.0?

    第一步: 如果是XP系统: 1.开始——运行——输入cmd——回车——在打开的窗口中输入net stop WuAuServ 2.开始——运行——输入%windir% 3.在打开的窗口中有个文件夹叫So ...

  6. 记一些之前忘记积累的问题(fiddler 学习、XP系统不能上网、XP不能装fiddler、注册表快速找到)

    记一些之前忘记积累的问题: fiddler学习:http://www.cnblogs.com/kingwolf_JavaScript/archive/2012/11/07/FiddlerUI.html ...

  7. 用Jquery 仿VS 样式的 导航栏插件

    在开发B/S 项目过程中,根据主界面设计要求,需要做一个类似VS 左边工具栏样式的菜单导航栏,在网上搜索无果后,于是决定自已做一个. 由于前台用JQuery开发, 想到网上很多人用JQuery做插件, ...

  8. 引用 xp系统引导修复(转载)

    引用 3592wangxiaoxi 的 xp系统引导修复(转载) 原文来自百度知道a12424106关于“急需xp系统引导方面的知识!”的回复. XP系统的引导过程 如果想学习排除计算机系统故障,首先 ...

  9. “canvas画布仿window系统自带画图软件"项目的思考

    "canvas画布仿window系统自带画图软件"项目的思考 首先贴上DEMO图,并没有美化效果.对UI有要求的,请自带补脑技术. 思考一 在做项目的过程中,我发现"工具 ...

随机推荐

  1. app 开发

    移动APP开发   ios  Android 中国人写的 MUI 布局框架 HTML5plus 硬件驱动调用(打开摄像头,闪光灯,震动) 和 系统调用(打开相册,通讯录,message) http:/ ...

  2. web前端开发学习路线图

    Web前端是一个入行门槛较低的开发技术,但更是近几年热门的职业,web前端不仅薪资高发展前景好,是很多年轻人向往的一个职业,想学习web前端,那么你得找到好的学习方法,以下就给大家分享一份适合新手小白 ...

  3. 判断(if)语句

    目标 开发中的应用场景 if语句体验 if语句进阶 综合应用 一 开发中的应用场景 转换成代码 判断的定义 如果 条件满足,才能做某件事 如果 条件不满足,就做另外一件事,或者什么也不做 判断语句 又 ...

  4. 在vue项目中 如何定义全局变量 全局函数

    如题,在项目中,经常有些函数和变量是需要复用,比如说网站服务器地址,从后台拿到的:用户的登录token,用户的地址信息等,这时候就需要设置一波全局变量和全局函数 定义全局变量 原理: 设置一个专用的的 ...

  5. Tomcat报错: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myApp]]

    Tomcat报错:严重: A child container failed during startjava.util.concurrent.ExecutionException: org.apach ...

  6. dart字符串处理

    1.字符串创建(1)使用单引号,双引号创建字符串(2)使用三个引号或双引号创建多行字符串(3)使用r创建原始raw字符串(转义字符等特殊字符会输出出来,而不会自动被转义) (1)例如:String s ...

  7. 什么是DNS攻击?它是如何工作的?

    什么是DNS攻击?它是如何工作的? DNS攻击是一种利用域名系统中的弱点或漏洞的网络攻击.今天,互联网已成为我们生活中不可或缺的一部分.从社交到金融.购物再到旅游,我们生活的方方面面都是互联网.由于互 ...

  8. php在cli模式下取得命令行中的参数的方法-getopt命令行可传递数组-简单自定义方法取命令行参数

    在cli模式下执行PHP时,自动给脚本文件传递了一个变量$argv,其值即是一个命令中所有值组成的数组(以空格区分),在PHP程序中接收参数有3种方法1.直接使用argv变量数组. 2.使用$_SER ...

  9. Python 匿名变量

    匿名变量的使用 calc = lambda x:x*3 print(calc(3)) 注:匿名变量是没有名字的变量 注:使用:lambda 创建.

  10. 剑指offer(45)扑克牌顺子

    题目描述 LL今天心情特别好,因为他去买了一副扑克牌,发现里面居然有2个大王,2个小王(一副牌原本是54张^_^)...他随机从中抽出了5张牌,想测测自己的手气,看看能不能抽到顺子,如果抽到的话,他决 ...