当前位置: 首页 > 编程日记 > 正文

C#精髓【月儿原创】第二讲 WMI完美秀出CPU编号厂商主频百分比等全部信息

说明:准备出一个系列,所谓精髓讲C#语言要点。这个系列没有先后顺序,不过尽量做到精。可能会不断增删整理,本系列最原始出处是csdn博客,谢谢关注。

C#精髓

第二讲 WMI完美秀出CPU编号厂商主频电压等全部信息

作者:清清月儿

主页:http://blog.csdn.net/21aspnet/           时间:2007.3.23

关于WMI MSDN有详细说明。 本文列举数例算抛砖引玉吧。WMI是个好东西,看过本文后也许你应该能举一反三参考MSDN也许自己做个优化大师也是可能的。

本文的例子在以下环境调试通过:Windows2003+AMD64双核CPU+VisualStudio2005(C#)下调试通过,无错版

首先要添加“引用”一个dll,选择“System Management”;

再引入2个命名空间:
using  System.Management;
using  System.IO;

foreach循环:声明一个迭代变量自动获取数组中每个元素的值。
String.Format:格式化字符,本站就有解释。

代码:

Form1.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Management;
using System.IO;
namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

private void button1_Click(object sender, EventArgs e)
        {
            //获取CPU编号
            ManagementClass MyClass = new ManagementClass("Win32_Processor");
            ManagementObjectCollection MyCollection = MyClass.GetInstances();
            String MyInfo = "当前系统CPU编号是:";
            string MyCPUID = "";
            foreach (ManagementObject MyObject in MyCollection)
            {
                MyCPUID = MyObject.Properties["ProcessorId"].Value.ToString();
                break;
            }
            MyInfo += MyCPUID;
            MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

private void button2_Click(object sender, EventArgs e)
        {
            //获取计算机CPU的当前电压
            String MyInfo = "计算机CPU的当前电压是:";
            ManagementObjectSearcher MySearcher = new ManagementObjectSearcher("SELECT * FROM Win32_Processor");
            foreach (ManagementObject MyObject in MySearcher.Get())
            {
                try
                {
                    MyInfo += "/n" + String.Format("CurrentVoltage : " + MyObject["CurrentVoltage"].ToString());
                    MyInfo += "/n=========================================================";
                }
                catch { }
            }
            MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

private void button3_Click(object sender, EventArgs e)
        {
            //获取计算机CPU的外部频率
            String MyInfo = "计算机CPU的外部频率是:";
            ManagementObjectSearcher MySearcher = new ManagementObjectSearcher("SELECT * FROM Win32_Processor");
            foreach (ManagementObject MyObject in MySearcher.Get())
            {
                try
                {
                    MyInfo += "/n" + String.Format("ExtClock : " + MyObject["ExtClock"].ToString());
                    MyInfo += "/n=========================================================";
                }
                catch { }
            }
            MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

private void button4_Click(object sender, EventArgs e)
        {
            //获取计算机CPU的二级缓存
            String MyInfo = "计算机CPU的二级缓存尺寸是:";
            ManagementObjectSearcher MySearcher = new ManagementObjectSearcher("SELECT * FROM Win32_Processor");
            foreach (ManagementObject MyObject in MySearcher.Get())
            {
                MyInfo += "/n" + String.Format("L2CacheSize: " + MyObject["L2CacheSize"].ToString());
                MyInfo += "/n=========================================================";
            }
            MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

private void button5_Click(object sender, EventArgs e)
        {
            //获取计算机CPU的制造商名称
            String MyInfo = "计算机CPU的制造商名称是:";
            ManagementObjectSearcher MySearcher = new ManagementObjectSearcher("SELECT * FROM Win32_Processor");
            foreach (ManagementObject MyObject in MySearcher.Get())
            {
                MyInfo += "/n" + String.Format("Manufacturer : " + MyObject["Manufacturer"].ToString());
                MyInfo += "/n=========================================================";
            }
            MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

private void button6_Click(object sender, EventArgs e)
        {
            //获取计算机CPU的产品名称
            String MyInfo = "计算机CPU的产品名称是:";
            ManagementObjectSearcher MySearcher = new ManagementObjectSearcher("SELECT * FROM Win32_Processor");
            foreach (ManagementObject MyObject in MySearcher.Get())
            {
                MyInfo += "/n" + String.Format("Name : " + MyObject["Name"].ToString());
                MyInfo += "/n=========================================================";
            }
            MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

}

private void button7_Click(object sender, EventArgs e)
        {
            //获取计算机CPU的版本信息
            String MyInfo = "计算机CPU的版本信息如下:";
            ManagementObjectSearcher MySearcher = new ManagementObjectSearcher("SELECT * FROM Win32_Processor");
            foreach (ManagementObject MyObject in MySearcher.Get())
            {
                MyInfo += "/n" + String.Format("Version: " + MyObject["Version"].ToString());
                MyInfo += "/n=========================================================";
            }
            MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

}

private void button8_Click(object sender, EventArgs e)
        {
            //获取计算机CPU的当前使用百分比 注意要把SQLserver或者其他耗CPU的软件开着否则看不到效果就一直为0
            String MyInfo = "计算机CPU的当前使用百分比是:";
            ManagementObjectSearcher MySearcher = new ManagementObjectSearcher("SELECT * FROM Win32_Processor");
            foreach (ManagementObject MyObject in MySearcher.Get())
            {
                MyInfo += "/n" + String.Format("LoadPercentage : " + MyObject["LoadPercentage"].ToString());
                MyInfo += "/n=========================================================";
            }
            MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

}

private void button9_Click(object sender, EventArgs e)
        {
            //获取计算机CPU的最大时钟频率
            String MyInfo = "计算机CPU的最大时钟频率是:";
            ManagementObjectSearcher MySearcher = new ManagementObjectSearcher("SELECT * FROM Win32_Processor");
            foreach (ManagementObject MyObject in MySearcher.Get())
            {
                MyInfo += "/n" + String.Format("MaxClockSpeed : " + MyObject["MaxClockSpeed"].ToString());
                MyInfo += "/n=========================================================";
            }
            MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

}

private void button10_Click(object sender, EventArgs e)
        {
            //获取计算机CPU的当前时钟频率
            String MyInfo = "计算机CPU的当前时钟频率是:";
            ManagementObjectSearcher MySearcher = new ManagementObjectSearcher("SELECT * FROM Win32_Processor");
            foreach (ManagementObject MyObject in MySearcher.Get())
            {
                MyInfo += "/n" + String.Format("CurrentClockSpeed : " + MyObject["CurrentClockSpeed"].ToString());
                MyInfo += "/n=========================================================";
            }
            MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

}

private void button11_Click(object sender, EventArgs e)
        {
            //获取计算机的CPU地址宽度
            String MyInfo = "当前计算机的CPU地址宽度是:";
            ManagementObjectSearcher MySearcher = new ManagementObjectSearcher("SELECT * FROM Win32_Processor");
            foreach (ManagementObject MyObject in MySearcher.Get())
            {
                MyInfo += "/n" + String.Format("AddressWidth: " + MyObject["AddressWidth"].ToString());
                MyInfo += "/n=========================================================";
            }
            MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

}

private void button14_Click(object sender, EventArgs e)
        {
            //获取计算机的CPU数据宽度
            String MyInfo = "当前计算机的CPU数据宽度是:";
            ManagementObjectSearcher MySearcher = new ManagementObjectSearcher("SELECT * FROM Win32_Processor");
            foreach (ManagementObject MyObject in MySearcher.Get())
            {
                MyInfo += "/n" + String.Format("DataWidth : " + MyObject["DataWidth"].ToString());
                MyInfo += "/n=========================================================";
            }
            MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

}
    }
}

Form1.Designer.cs

namespace WindowsApplication1
{
    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()
        {
            this.button1 = new System.Windows.Forms.Button();
            this.button2 = new System.Windows.Forms.Button();
            this.button3 = new System.Windows.Forms.Button();
            this.button4 = new System.Windows.Forms.Button();
            this.button5 = new System.Windows.Forms.Button();
            this.button6 = new System.Windows.Forms.Button();
            this.button7 = new System.Windows.Forms.Button();
            this.button8 = new System.Windows.Forms.Button();
            this.button9 = new System.Windows.Forms.Button();
            this.button10 = new System.Windows.Forms.Button();
            this.button11 = new System.Windows.Forms.Button();
            this.button14 = new System.Windows.Forms.Button();
            this.label1 = new System.Windows.Forms.Label();
            this.SuspendLayout();
            //
            // button1
            //
            this.button1.Location = new System.Drawing.Point(12, 12);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(182, 23);
            this.button1.TabIndex = 5;
            this.button1.Text = "获取CPU编号";
            this.button1.UseVisualStyleBackColor = true;
            this.button1.Click += new System.EventHandler(this.button1_Click);
            //
            // button2
            //
            this.button2.Location = new System.Drawing.Point(12, 41);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(186, 23);
            this.button2.TabIndex = 17;
            this.button2.Text = "获取计算机CPU的当前电压";
            this.button2.UseVisualStyleBackColor = true;
            this.button2.Click += new System.EventHandler(this.button2_Click);
            //
            // button3
            //
            this.button3.Location = new System.Drawing.Point(12, 70);
            this.button3.Name = "button3";
            this.button3.Size = new System.Drawing.Size(186, 23);
            this.button3.TabIndex = 18;
            this.button3.Text = "获取计算机CPU的外部频率";
            this.button3.UseVisualStyleBackColor = true;
            this.button3.Click += new System.EventHandler(this.button3_Click);
            //
            // button4
            //
            this.button4.Location = new System.Drawing.Point(12, 99);
            this.button4.Name = "button4";
            this.button4.Size = new System.Drawing.Size(186, 23);
            this.button4.TabIndex = 19;
            this.button4.Text = "获取计算机CPU的二级缓存";
            this.button4.UseVisualStyleBackColor = true;
            this.button4.Click += new System.EventHandler(this.button4_Click);
            //
            // button5
            //
            this.button5.Location = new System.Drawing.Point(12, 128);
            this.button5.Name = "button5";
            this.button5.Size = new System.Drawing.Size(186, 23);
            this.button5.TabIndex = 21;
            this.button5.Text = "获取计算机CPU的制造商名称";
            this.button5.UseVisualStyleBackColor = true;
            this.button5.Click += new System.EventHandler(this.button5_Click);
            //
            // button6
            //
            this.button6.Location = new System.Drawing.Point(204, 157);
            this.button6.Name = "button6";
            this.button6.Size = new System.Drawing.Size(206, 23);
            this.button6.TabIndex = 22;
            this.button6.Text = "获取计算机CPU的产品名称";
            this.button6.UseVisualStyleBackColor = true;
            this.button6.Click += new System.EventHandler(this.button6_Click);
            //
            // button7
            //
            this.button7.Location = new System.Drawing.Point(12, 158);
            this.button7.Name = "button7";
            this.button7.Size = new System.Drawing.Size(186, 23);
            this.button7.TabIndex = 23;
            this.button7.Text = "获取计算机CPU的版本信息";
            this.button7.UseVisualStyleBackColor = true;
            this.button7.Click += new System.EventHandler(this.button7_Click);
            //
            // button8
            //
            this.button8.Location = new System.Drawing.Point(204, 70);
            this.button8.Name = "button8";
            this.button8.Size = new System.Drawing.Size(204, 23);
            this.button8.TabIndex = 24;
            this.button8.Text = "获取计算机CPU的当前使用百分比";
            this.button8.UseVisualStyleBackColor = true;
            this.button8.Click += new System.EventHandler(this.button8_Click);
            //
            // button9
            //
            this.button9.Location = new System.Drawing.Point(204, 41);
            this.button9.Name = "button9";
            this.button9.Size = new System.Drawing.Size(204, 23);
            this.button9.TabIndex = 25;
            this.button9.Text = "获取计算机CPU的最大时钟频率";
            this.button9.UseVisualStyleBackColor = true;
            this.button9.Click += new System.EventHandler(this.button9_Click);
            //
            // button10
            //
            this.button10.Location = new System.Drawing.Point(202, 12);
            this.button10.Name = "button10";
            this.button10.Size = new System.Drawing.Size(204, 23);
            this.button10.TabIndex = 26;
            this.button10.Text = "获取计算机CPU的当前时钟频率";
            this.button10.UseVisualStyleBackColor = true;
            this.button10.Click += new System.EventHandler(this.button10_Click);
            //
            // button11
            //
            this.button11.Location = new System.Drawing.Point(204, 99);
            this.button11.Name = "button11";
            this.button11.Size = new System.Drawing.Size(204, 23);
            this.button11.TabIndex = 27;
            this.button11.Text = "获取计算机的CPU地址宽度";
            this.button11.UseVisualStyleBackColor = true;
            this.button11.Click += new System.EventHandler(this.button11_Click);
            //
            // button14
            //
            this.button14.Location = new System.Drawing.Point(204, 128);
            this.button14.Name = "button14";
            this.button14.Size = new System.Drawing.Size(204, 23);
            this.button14.TabIndex = 28;
            this.button14.Text = "获取计算机的CPU数据宽度";
            this.button14.UseVisualStyleBackColor = true;
            this.button14.Click += new System.EventHandler(this.button14_Click);
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(15, 193);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(341, 12);
            this.label1.TabIndex = 29;
            this.label1.Text = "作者:清清月儿 http://blog.csdn.net/21aspnet/  2007.3.23";
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(422, 214);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.button14);
            this.Controls.Add(this.button11);
            this.Controls.Add(this.button10);
            this.Controls.Add(this.button9);
            this.Controls.Add(this.button8);
            this.Controls.Add(this.button7);
            this.Controls.Add(this.button6);
            this.Controls.Add(this.button5);
            this.Controls.Add(this.button4);
            this.Controls.Add(this.button3);
            this.Controls.Add(this.button2);
            this.Controls.Add(this.button1);
            this.Name = "Form1";
            this.Text = "Form1";
            this.ResumeLayout(false);
            this.PerformLayout();

}

#endregion

private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Button button2;
        private System.Windows.Forms.Button button3;
        private System.Windows.Forms.Button button4;
        private System.Windows.Forms.Button button5;
        private System.Windows.Forms.Button button6;
        private System.Windows.Forms.Button button7;
        private System.Windows.Forms.Button button8;
        private System.Windows.Forms.Button button9;
        private System.Windows.Forms.Button button10;
        private System.Windows.Forms.Button button11;
        private System.Windows.Forms.Button button14;
        private System.Windows.Forms.Label label1;
    }
}

相关文章:

联邦学习,为何而生?

隐私数据是否早已泄露&#xff0c;而我们却毫无察觉&#xff1f;随着大数据、边缘计算、大型云计算平台和各种开源框架的发展&#xff0c;机器学习等人工智能技术以前所未有的速度应用到各个行业&#xff0c;人工智能技术带来了新的挑战&#xff0c;数据的隐私和安全引起了全世…

css控制非固定文本自动换行

不知道为什么一直记不住这个属性&#xff0c;趁有时间整理了下下&#xff01; 强制不换行p.www_52css_com {  white-space:nowrap;  } 自动换行p.www_52css_com {   word-wrap: break-word;   word-break: normal;   } 强制英文单词断行p.www_52css_com {  word-br…

认清Hadoop和Spark的这几点区别,学习时才能事半功倍

很多初学Hadoop开发的同学分不清Hadoop和Spark究竟有什么联系&#xff1f;搞不清Hadoop和Spark是两个独立的框架&#xff0c;还是必须相互依存才能完成工作&#xff1f;今天就给大家分析一下Hadoop和Spark几点区别。Hadoop和Spark各是什么&#xff1f;HadoopHadoop是一分布式系…

Visual Studio2005奇怪的bug及解决【月儿原创】

Visual Studio2005查看设计器打开失败的bug及解决 作者&#xff1a;清清月儿 主页&#xff1a;http://blog.csdn.net/21aspnet/ 时间&#xff1a;2007.3.23 在WinForm中报如下的错&#xff1a; Form1 可以进行设计&#xff0c;但不是文件中的第一个类。Visual …

Windows Azure Pack集成配置SPF

前面文章介绍了Windows Azure Pack&#xff08;WAP&#xff09;的安装以及功能介绍&#xff0c;当然&#xff0c;仅仅安装还是不够的&#xff0c;我们还需要让WAP与SCVMM集成起来&#xff0c;管理我们的Cloud。今天介绍WAP与私有云交互的一个重要组件&#xff0c;Service Provi…

最高3000元/人 , 助你成为C站红人 !

每天早上起床我都会看一眼富豪榜&#xff0c;如果上面没有我的名字&#xff0c;我就去上班&#xff0c;现在每天早上起床我都会看一眼CSDN红人榜,如果上面有我的名字,我就开始走上人生巅峰之路,如果没有,不可能没有!C站红人计划招募啦 &#xff01;最高3000元/人助你成为C站红人…

关闭所有cloudfoundry应用进程

for appname in $(cf a|grep started|cut -d " " -f 1) do cf stop $appname done 转载于:https://www.cnblogs.com/husbandmen/p/7419724.html

经典SQL自定义函数

1、确定某年某月有多少天 实现原理&#xff1a;先利用DATEDIFF取得当前月的第一天&#xff0c;再将月份加一取得下月第一天&#xff0c;然后减去1分钟&#xff0c;再取日期的 天数部分&#xff0c;即为当月最大日期&#xff0c;也即当月天数 CREATE FUNCTION DaysInMonth ( d…

Grep学习笔记

1. grep简介grep &#xff08;global search regular expression(RE) and print out the line,全面搜索正则表达式并把行打印出来&#xff09;是一种强大的文本搜索工具&#xff0c;它能使用正则表达式搜索文本&#xff0c;并把匹配的行打印出来。Unix的grep家族包 括grep、egr…

安永创新中心落子北京,聚焦5G技术赋能企业数字化转型

4月21日&#xff0c;安永北京wavespace旗舰创新中心开幕仪式暨企业数字化转型高峰论坛在北京卓著中心举行&#xff0c;该创新中心致力于赋能企业的创新转型、业务增长以及推进前沿技术的商业应用&#xff0c;聚焦组建生态联盟&#xff0c;纳入最新产业理念&#xff0c;通过互联…

JavaScript模块化 --- Commonjs、AMD、CMD、es6 modules

随着前端js代码复杂度的提高&#xff0c;JavaScript模块化这个概念便被提出来&#xff0c;前端社区也不断地实现前端模块化&#xff0c;直到es6对其进行了规范&#xff0c;下面就介绍JavaScript模块化。 这篇文章还是希望能给大家一个比较好的思路&#xff0c;即JavaScript模块…

关于强命名程序集

如何创建强命名程序集&#xff08;Strong Name Assembly&#xff09;创建一个强命名程序集首先需要获得一个用强命名实用工具&#xff08;Strong Name Utility&#xff0c;即SN.exe&#xff0c;.NET SDK自带&#xff09;产生的密钥。下面简要介绍一下SN.exe的一些用法。要产生一…

get the better of sb

2019独角兽企业重金招聘Python工程师标准>>> get the better of sb 克服&#xff0c;占上风&#xff0c;打败 › to defeat someone in a competition:He fought fiercely, but his opponent easily got the better of him.› If a feeling gets the better of you…

安谋中国推出“山海” S12,AIoT 安全解决方案技术全解读

近日&#xff0c;安谋中国推出了自主研发的AIoT全栈安全解决方案“山海”S12&#xff0c;可应用于智能手机、平板、智能电视及安防等行业&#xff0c;为安全解决方案如数字版权保护、AI 安全、身份认证等提供基础安全能力。 据了解&#xff0c;此前安谋中国自研处理器IP已经推出…

js canvas游戏初级demo-上下左右移动

大概流程就是监听状态变化擦除画布重绘 由于js监听时间变化的函数addEventListener只能达到每秒触发20次左右&#xff0c;也就是每秒20帧&#xff0c;看起来有点卡卡的 所以用定时器搞到每秒30帧 按上下左右键可以移动砖块 <!DOCTYPE html> <html lang"en"&…

判断一个IP区间(或IP)是否被另一个IP区间所包含

以下方法实现判断一个IP是否被一个IP区间所包含 有一些静态方法可能引用了同名空间的自定义的类&#xff0c; 至于合并两个相临的IP段&#xff0c;可对其中的最大或最小IP1 using System;using System.Text.RegularExpressions; namespace HKH.Common{ /// <summary>…

制作OpenStack上使用的CentOS系统镜像

很多进行Openstack测试的人都发现&#xff0c;自己的openstack测试环境搭建的很成功&#xff0c;安全策略也添加了&#xff0c;但是上传镜像之后&#xff0c;却出现无法Ping通&#xff0c;无法ssh到实例等问题&#xff0c;实际上这很可能是由于我们没有使用一个正确的镜像导致的…

从最强AI算力到“元脑”2.0,智算加速产业变革

作者 | Just出品 | AI科技大本营&#xff08;ID:rgznai100&#xff09;AI模型的数据量、结构的复杂程度不断增加&#xff0c;带来了大规模AI算力的庞大需求。2020年7月&#xff0c;OpenAI实验室推出拥有1750亿参数的NLP模型GPT-3&#xff0c;其训练数据集规模超过500GB&#xf…

动态规划和分治法,贪心算法以及递归的再一次深刻理解和体会

每次体会算法都有新的感觉&#xff0c;刷题越多&#xff0c;对算法的理解感觉也就越深刻。下面我们来重新体会下分治法&#xff0c;动态规划&#xff0c;贪心法&#xff0c;递归的理解。1.分治法&#xff1a;将问题分成单独的阶段&#xff0c;每个阶段互相不干扰很独立&#xf…

基于注解的设计模式

2019独角兽企业重金招聘Python工程师标准>>> http://alexradzin.blogspot.com/2013/01/annotation-based-design-patterns.html 转载于:https://my.oschina.net/heatonn1/blog/204789

提气!清华成立集成电路学院,专研“卡脖子”技术

整理 | 寇雪芹头图 | 下载于ICphoto出品 | AI科技大本营&#xff08;ID&#xff1a;rgznai100&#xff09;今天上午&#xff0c;清华大学举行了集成电路学院揭牌仪式&#xff0c;党委书记陈旭宣读了学院成立决定并致辞表示&#xff0c;集成电路学院为学校实体教学科研机构&…

第一本的java 的小总结

1.Java常见的注释有哪些,语法是怎样的? 1&#xff09;单行注释用//表示&#xff0c;编译器看到//会忽略该行//后的所文本 2&#xff09;多行注释/* */表示&#xff0c;编译器看到/*时会搜索接下来的*/,忽略掉/* */之间的文本。 3&#xff09;文档注释用/** */表示&#xff0…

WMI Series :事件预订和处理

WMI事件概述对于从事Winows编程的开发人员来说&#xff0c;事件驱动的应用程序设计是再熟悉不过了&#xff0c;但是WMI中的事件又是一个什么样的概念呢&#xff1f;对于宝贵的内存和CPU资源&#xff0c;管理员需要不断的监视其性能&#xff1b;对于磁盘而言&#xff0c;我们需要…

如何记录2秒内实现1800度转体+翻腾,百度智能云黑科技教你看懂跳水

百度智能云与中国国家跳水队协同推进人工智能与体育跨界合作再进一步&#xff0c;正在为我国AI体育的应用探索开拓一片新的大陆。4月22日&#xff0c;百度与中国国家跳水队举行合作启动仪式&#xff0c;百度智能云正式成为中国国家跳水队独家AI合作伙伴&#xff0c;助力中国跳水…

python 多线程日志切割+日志分析

楼主最近刚刚接触python&#xff0c;还是个小菜鸟&#xff0c;没有学习python之前可以说楼主的shell已经算是可以了&#xff0c;但用shell很多东西实现起来还是不可能的事情&#xff0c;例如最明显的一点大日志分析&#xff0c;由于楼主的公司&#xff0c;每天的日志量很大&…

redis入门(03)redis的配置

一、配置文件 Redis 的配置文件位于 Redis 安装目录下&#xff0c;文件名为 redis.conf。你可以通过 CONFIG 命令查看或设置配置项。 二、查看修改 1、查看配置 1.1、vi redis.conf 1.2、redis 127.0.0.1:6379> config get CONFIG_SETTING_NAME 2、修改配置 2.1、vi redis.c…

WMI Series :管理对象的信息查询和方法访问

管理对象的信息查询和方法访问在这一节内容&#xff0c;我们将通过几个实例来学习如何查询管理对象信息和访问管理对象提供的方法&#xff0c;这一部分内容将使用到我们在前面讲述到的System.Management命名空间中的相关类对象。管理对象的信息查询管理对象的信息查询有两种方式…

穿山甲发布聚合产品GroMore,为开发者变现赋能

近日&#xff0c;穿山甲发布聚合产品「GroMore」&#xff0c;该产品整合多个主流广告平台资源&#xff0c;支持App开发者将广告请求同时发送至多个平台&#xff0c;并根据各平台的出价能力&#xff0c;合理分配流量&#xff0c;最终达到广告收益最大化的目的。聚合产品在海外市…

使用SQLServer配置管理器配置SQLServer数据库引擎实例,以便侦听特定的固定1433端口。...

最近在安装SQLServer2012 SP1的时候&#xff0c;初始安装的情况下开启的是动态端口&#xff0c;为了使远程服务器连接到SQlServer我们需要开启固定的1433端口。 默认的端口状态。 开启的方法 配置相关的SQL实例的网络配置 重启SQLServer服务 查看一下端口状态 转载于:https://b…

P1194 买礼物

P1194 买礼物 题目描述 又到了一年一度的明明生日了&#xff0c;明明想要买B样东西&#xff0c;巧的是&#xff0c;这B样东西价格都是A元。 但是&#xff0c;商店老板说最近有促销活动&#xff0c;也就是&#xff1a; 如果你买了第I样东西&#xff0c;再买第J样&#xff0c;那么…