基于WMI的信息查询和编辑,按微软的说明一般都是

时间:2022-09-05 13:38:28
晕!这个不是很简单的东西吗?
//---------WMI----------
type
Rec_Wmi = record
ComputerName: string;
Namespace: string;
User: string;
Password: string;
WMIType: string;
Enum: IEnumVariant;
class function GetWmiEnum(WMIType: string; var AEnum: IEnumVariant; Namespace: string = 'root\cimv2';
Where: string = ''; ComputerName: string = ''; User: string = ''; Password: string = ''): string; static;
class function GetWMIProperty(Enum: IEnumVariant; WMIProperty: string; Index: integer = ): OleVariant; static;
class function SetWMIProperty(Enum: IEnumVariant; WMIProperty: string; value: string; Index: integer = ): string; static;
function GetEnum(Where: string = ''): string;
function GetProperty(WMIProperty: string; Index: integer = ): OleVariant;
function SetProperty(WMIProperty: string; value: string): string;
end; { Rec_Wmi } function Rec_Wmi.GetEnum(Where: string): string;
begin
if Self.ComputerName = '' then Self.ComputerName := '.';
if Self.Namespace = '' then Self.Namespace := 'root\cimv2';
Result := GetWmiEnum(Self.WMIType, Self.Enum, Self.Namespace, Where, Self.ComputerName, Self.User, Self.Password);
end; function Rec_Wmi.GetProperty(WMIProperty: string; Index: integer): OleVariant;
begin
Result := TrueStr;
if VarIsNull(Self.Enum) then Result := Self.GetEnum;
if Result <> TrueStr then exit('');
Result := Self.GetWMIProperty(Self.Enum, WMIProperty, Index);
end; class function Rec_Wmi.GetWmiEnum(WMIType: string; var AEnum: IEnumVariant; Namespace, Where, ComputerName, User, Password: string): string;
var
Wmi, Objs : OleVariant;
sql: string;
begin
Result := FalseStr;
try
if Where = '' then sql := 'Select * from ' + WMIType
else sql := 'Select * from ' + WMIType + ' where ' + Where;
if ComputerName = '' then ComputerName := '.';
Wmi := CreateOleObject('WbemScripting.SWbemLocator');
if (User <> '') and (Password <> '') then Objs := Wmi.ConnectServer(ComputerName, Namespace, User, Password).ExecQuery(sql)
else Objs := Wmi.ConnectServer(ComputerName, Namespace).ExecQuery(sql);
if VarIsNull(Objs) then exit('未找到 ' + WMIType);
AEnum := IEnumVariant(IUnknown(Objs._NewEnum));
Result := TrueStr;
except
on E: Exception do Result := E.Message;
end; end; class function Rec_Wmi.GetWMIProperty(Enum: IEnumVariant; WMIProperty: string; Index: integer): OleVariant;
var
obj: OleVariant;
C: Cardinal;
i: integer;
hr: HResult;
begin
Result := null;
try
Enum.Reset;
i := ;
while i <= index do
begin
hr := Enum.Next(, obj, C);
inc(i);
end;
if (hr = S_OK) then Result := obj.Properties_.Item(WMIProperty, ).value;
except
on E: Exception do Result := '';
end;
end; function Rec_Wmi.SetProperty(WMIProperty, value: string): string;
begin
Result := TrueStr;
if VarIsNull(Self.Enum) then Result := Self.GetEnum;
Result := Self.SetWMIProperty(Self.Enum, WMIProperty, value); end; class function Rec_Wmi.SetWMIProperty(Enum: IEnumVariant; WMIProperty, value: string; Index: integer): string;
var
obj: OleVariant;
C: Cardinal;
i: integer;
hr: HResult;
begin
Result := FalseStr;
try
Enum.Reset;
i := ;
while i <= Index do
begin
hr := Enum.Next(, obj, C);
inc(i);
end;
if (hr = S_OK) then
begin
obj.Properties_.Item(WMIProperty, ).value := value;
obj.Put_;
end;
Result := TrueStr;
except
on E: Exception do Result := E.Message;
end; end;
以上代码都是查阅微软文档后自己写的 测试程序 procedure TForm_Main.Button3Click(Sender: TObject);
var
Awmi: Rec_Wmi;
devIndex: integer;
arrstr: array of string;
i: integer;
ov: OleVariant;
begin
Memo_Info.Lines.Clear;
if Edit_Device_ID.text = '' then devIndex :=
else devIndex := StrToInt(Edit_Device_ID.text);
Awmi.ComputerName := Edit_Database.text;
Awmi.User := Edit_User_Name.text;
Awmi.Password := Edit_PassWord.text;
Memo_Info.Lines.Add('-----物理设备--------');
Awmi.WMIType := 'Win32_PhysicalMedia';
Memo_Info.Lines.Add('GetEnum:' + Awmi.GetEnum);
Memo_Info.Lines.Add('PhysicalMedia Caption :' + vartostr(Awmi.GetProperty('Caption', devIndex)));
Memo_Info.Lines.Add('PhysicalMedia SerialNumber :' + vartostr(Awmi.GetProperty('SerialNumber', devIndex)));
Memo_Info.Lines.Add('PhysicalMedia Description :' + vartostr(Awmi.GetProperty('Description', devIndex)));
Memo_Info.Lines.Add('PhysicalMedia Name :' + vartostr(Awmi.GetProperty('Name', devIndex))); Memo_Info.Lines.Add('------物理盘-------');
Awmi.WMIType := 'Win32_DiskDrive';
Memo_Info.Lines.Add('GetEnum:' + Awmi.GetEnum);
Memo_Info.Lines.Add('Win32_DiskDrive PNPDeviceID :' + vartostr(Awmi.GetProperty('PNPDeviceID', devIndex)));
Memo_Info.Lines.Add('Win32_DiskDrive SerialNumber :' + vartostr(Awmi.GetProperty('SerialNumber', devIndex)));
Memo_Info.Lines.Add('Win32_DiskDrive Description :' + vartostr(Awmi.GetProperty('Description', devIndex)));
Memo_Info.Lines.Add('Win32_DiskDrive DeviceID :' + vartostr(Awmi.GetProperty('DeviceID', devIndex)));
Memo_Info.Lines.Add('Win32_DiskDrive Name :' + vartostr(Awmi.GetProperty('Name', devIndex)));
// Memo_Info.Lines.Add('Win32_DiskDrive CapabilityDescriptions :' + Awmi.GetProperty('CapabilityDescriptions'));
Memo_Info.Lines.Add('Win32_DiskDrive MediaType :' + vartostr(Awmi.GetProperty('MediaType', devIndex))); Memo_Info.Lines.Add('------磁盘分区-------');
Awmi.WMIType := 'Win32_DiskPartition';
Memo_Info.Lines.Add('GetEnum:' + Awmi.GetEnum); //(' DeviceID =''Z:'''));
Memo_Info.Lines.Add('Win32_DiskPartition Caption :' + vartostr(Awmi.GetProperty('Caption', devIndex)));
Memo_Info.Lines.Add('Win32_DiskPartition Name :' + vartostr(Awmi.GetProperty('Name', devIndex)));
Memo_Info.Lines.Add('Win32_DiskPartition Description :' + vartostr(Awmi.GetProperty('Description')));
Memo_Info.Lines.Add('Win32_DiskPartition DeviceID :' + vartostr(Awmi.GetProperty('DeviceID', devIndex)));
Memo_Info.Lines.Add('Win32_DiskPartition DiskIndex :' + vartostr(Awmi.GetProperty('DiskIndex', devIndex)));
Memo_Info.Lines.Add('Win32_DiskPartition Index :' + vartostr(Awmi.GetProperty('Index', devIndex)));
Memo_Info.Lines.Add('Win32_DiskPartition PNPDeviceID :' + vartostr(Awmi.GetProperty('PNPDeviceID', devIndex)));
Memo_Info.Lines.Add('Win32_DiskPartition Purpose :' + vartostr(Awmi.GetProperty('Purpose', devIndex)));
Memo_Info.Lines.Add('Win32_DiskPartition Size :' + vartostr(Awmi.GetProperty('Size', devIndex)));
Memo_Info.Lines.Add('Win32_DiskPartition SystemName :' + vartostr(Awmi.GetProperty('SystemName', devIndex))); Memo_Info.Lines.Add('------逻辑盘-------');
Awmi.WMIType := 'Win32_LogicalDisk';
Memo_Info.Lines.Add('GetEnum:' + Awmi.GetEnum); //(' DeviceID =''Z:'''));
Memo_Info.Lines.Add('Win32_LogicalDisk PNPDeviceID :' + vartostr(Awmi.GetProperty('PNPDeviceID', devIndex)));
Memo_Info.Lines.Add('Win32_LogicalDisk Size :' + vartostr(Awmi.GetProperty('Size')));
Memo_Info.Lines.Add('Win32_LogicalDisk DeviceID :' + vartostr(Awmi.GetProperty('DeviceID', devIndex)));
Memo_Info.Lines.Add('Win32_LogicalDisk VolumeName :' + vartostr(Awmi.GetProperty('VolumeName', devIndex)));
Memo_Info.Lines.Add('Win32_LogicalDisk VolumeSerialNumber :' + vartostr(Awmi.GetProperty('VolumeSerialNumber', devIndex))); Memo_Info.Lines.Add('-----主板--------');
Awmi.WMIType := 'Win32_BaseBoard';
Memo_Info.Lines.Add('GetEnum:' + Awmi.GetEnum);
Memo_Info.Lines.Add('Win32_BaseBoard SerialNumber :' + vartostr(Awmi.GetProperty('SerialNumber')));
Memo_Info.Lines.Add('Win32_BaseBoard InstallDate :' + vartostr(Awmi.GetProperty('InstallDate')));
Memo_Info.Lines.Add('Win32_BaseBoard Product :' + vartostr(Awmi.GetProperty('Product')));
Memo_Info.Lines.Add('Win32_BaseBoard Manufacturer :' + vartostr(Awmi.GetProperty('Manufacturer')));
Memo_Info.Lines.Add('Win32_BaseBoard Caption :' + vartostr(Awmi.GetProperty('Caption')));
Memo_Info.Lines.Add('Win32_BaseBoard CreationClassName :' + vartostr(Awmi.GetProperty('CreationClassName')));
Memo_Info.Lines.Add('Win32_BaseBoard Model :' + vartostr(Awmi.GetProperty('Model')));
Memo_Info.Lines.Add('Win32_BaseBoard Name :' + vartostr(Awmi.GetProperty('Name')));
Memo_Info.Lines.Add('Win32_BaseBoard PartNumber :' + vartostr(Awmi.GetProperty('PartNumber')));
Memo_Info.Lines.Add('Win32_BaseBoard SlotLayout :' + vartostr(Awmi.GetProperty('SlotLayout')));
Memo_Info.Lines.Add('Win32_BaseBoard Version :' + vartostr(Awmi.GetProperty('Version')));
Memo_Info.Lines.Add('Win32_BaseBoard SKU :' + vartostr(Awmi.GetProperty('SKU')));
Memo_Info.Lines.Add('Win32_BaseBoard OtherIdentifyingInfo :' + vartostr(Awmi.GetProperty('OtherIdentifyingInfo')));
Memo_Info.Lines.Add('Win32_BaseBoard CreationClassName :' + vartostr(Awmi.GetProperty('CreationClassName'))); Memo_Info.Lines.Add('-----BIOS--------');
Awmi.WMIType := 'Win32_BIOS';
Memo_Info.Lines.Add('GetEnum:' + Awmi.GetEnum);
Memo_Info.Lines.Add('Win32_BIOS SerialNumber :' + vartostr(Awmi.GetProperty('SerialNumber')));
Memo_Info.Lines.Add('Win32_BIOS TargetOperatingSystem :' + vartostr(vartostr(Awmi.GetProperty('TargetOperatingSystem'))));
Memo_Info.Lines.Add('Win32_BIOS Manufacturer :' + vartostr(Awmi.GetProperty('Manufacturer')));
Memo_Info.Lines.Add('Win32_BIOS BuildNumber :' + vartostr(Awmi.GetProperty('BuildNumber')));
Memo_Info.Lines.Add('Win32_BIOS InstallDate :' + vartostr(Awmi.GetProperty('InstallDate')));
Memo_Info.Lines.Add('Win32_BIOS ReleaseDate :' + vartostr(Awmi.GetProperty('ReleaseDate')));
Memo_Info.Lines.Add('Win32_BIOS Version :' + vartostr(Awmi.GetProperty('Version')));
Memo_Info.Lines.Add('Win32_BIOS CodeSet :' + vartostr(Awmi.GetProperty('CodeSet')));
Memo_Info.Lines.Add('Win32_BIOS BIOSVersion :');
ov := Awmi.GetProperty('CodeSet');
if not VarIsNull(ov) then
begin
if VarIsArray(ov) then
begin
for i := VarArrayLowBound(ov, ) to VarArrayHighBound(ov, ) do
begin
Memo_Info.Lines.Add(vartostr(VarArrayGet(ov, [i])));
end;
end
end; Memo_Info.Lines.Add('-----网卡--------');
Awmi.WMIType := 'Win32_NetworkAdapter';
Memo_Info.Lines.Add('GetEnum:' + Awmi.GetEnum('AdapterTypeID=0'));
Memo_Info.Lines.Add('Win32_NetworkAdapter AdapterType :' + vartostr(Awmi.GetProperty('AdapterType', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapter name :' + vartostr(Awmi.GetProperty('name', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapter MACAddress :' + vartostr(Awmi.GetProperty('MACAddress', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapter Caption :' + vartostr(Awmi.GetProperty('Caption', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapter DeviceID :' + vartostr(Awmi.GetProperty('DeviceID', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapter Description :' + vartostr(Awmi.GetProperty('Description', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapter GUID :' + vartostr(Awmi.GetProperty('GUID', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapter Index :' + vartostr(Awmi.GetProperty('Index', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapter InterfaceIndex :' + vartostr(Awmi.GetProperty('InterfaceIndex', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapter Manufacturer :' + vartostr(Awmi.GetProperty('Manufacturer', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapter MaxSpeed :' + vartostr(vartostr(Awmi.GetProperty('MaxSpeed', devIndex))));
Memo_Info.Lines.Add('Win32_NetworkAdapter Speed :' + vartostr(Awmi.GetProperty('Speed', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapter NetConnectionStatus :' + vartostr(Awmi.GetProperty('NetConnectionStatus', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapter PNPDeviceID :' + vartostr(Awmi.GetProperty('PNPDeviceID', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapter ProductName :' + vartostr(Awmi.GetProperty('ProductName', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapter ServiceName :' + vartostr(Awmi.GetProperty('ServiceName', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapter SystemName :' + vartostr(Awmi.GetProperty('SystemName', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapter PermanentAddress :' + vartostr(Awmi.GetProperty('PermanentAddress', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapter NetworkAddresses :');
ov := Awmi.GetProperty('NetworkAddresses', devIndex);
if not VarIsNull(ov) then
begin
if VarIsArray(ov) then
begin
for i := VarArrayLowBound(ov, ) to VarArrayHighBound(ov, ) do
begin
Memo_Info.Lines.Add(vartostr(VarArrayGet(ov, [i])));
end;
end
end;
Memo_Info.Lines.Add('-----网卡设置--------');
Awmi.WMIType := 'Win32_NetworkAdapterConfiguration';
Memo_Info.Lines.Add('GetEnum:' + Awmi.GetEnum('IPEnabled=True'));
Memo_Info.Lines.Add('Win32_NetworkAdapterConfiguration Properties :' + vartostr(Awmi.GetProperty('Properties', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapterConfiguration Caption :' + vartostr(Awmi.GetProperty('Caption', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapterConfiguration Description :' + vartostr(Awmi.GetProperty('Description', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapterConfiguration DNSDomain :' + vartostr(Awmi.GetProperty('DNSDomain', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapterConfiguration DNSHostName :' + vartostr(Awmi.GetProperty('DNSHostName', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapterConfiguration Index :' + vartostr(Awmi.GetProperty('Index', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapterConfiguration InterfaceIndex :' + vartostr(Awmi.GetProperty('InterfaceIndex', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapterConfiguration MACAddress :' + vartostr(Awmi.GetProperty('MACAddress', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapterConfiguration ServiceName :' + vartostr(Awmi.GetProperty('ServiceName', devIndex)));
Memo_Info.Lines.Add('Win32_NetworkAdapterConfiguration DefaultIPGateway :');
ov := Awmi.GetProperty('DefaultIPGateway', devIndex);
if not VarIsNull(ov) then
begin
if VarIsArray(ov) then
begin
for i := VarArrayLowBound(ov, ) to VarArrayHighBound(ov, ) do
begin
Memo_Info.Lines.Add(vartostr(VarArrayGet(ov, [i])));
end;
end
end; Memo_Info.Lines.Add('Win32_NetworkAdapterConfiguration IPAddress :');
ov := (Awmi.GetProperty('IPAddress', devIndex));
if not VarIsNull(ov) then
begin
if VarIsArray(ov) then
begin
for i := VarArrayLowBound(ov, ) to VarArrayHighBound(ov, ) do
begin
Memo_Info.Lines.Add(vartostr(VarArrayGet(ov, [i])));
end;
end
end; Memo_Info.Lines.Add('-----CPU--------');
Awmi.WMIType := 'Win32_Processor';
Memo_Info.Lines.Add('GetEnum:' + Awmi.GetEnum); //('IPEnabled=True'));
Memo_Info.Lines.Add('Win32_Processor ProcessorId :' + vartostr(Awmi.GetProperty('ProcessorId', devIndex)));
Memo_Info.Lines.Add('Win32_Processor SerialNumber :' + vartostr(Awmi.GetProperty('SerialNumber', devIndex)));
Memo_Info.Lines.Add('Win32_Processor Version :' + vartostr(Awmi.GetProperty('Version', devIndex)));
Memo_Info.Lines.Add('Win32_Processor UniqueId :' + vartostr(Awmi.GetProperty('UniqueId', devIndex)));
Memo_Info.Lines.Add('Win32_Processor SystemName :' + vartostr(Awmi.GetProperty('SystemName', devIndex)));
Memo_Info.Lines.Add('Win32_Processor Name :' + vartostr(Awmi.GetProperty('Name', devIndex)));
Memo_Info.Lines.Add('Win32_Processor Description :' + vartostr(Awmi.GetProperty('Description', devIndex)));
Memo_Info.Lines.Add('Win32_Processor Caption :' + vartostr(Awmi.GetProperty('Caption', devIndex)));
Memo_Info.Lines.Add('Win32_Processor DeviceID :' + vartostr(Awmi.GetProperty('DeviceID', devIndex)));
Memo_Info.Lines.Add('Win32_Processor CreationClassName :' + vartostr(Awmi.GetProperty('CreationClassName', devIndex)));
Memo_Info.Lines.Add('Win32_Processor Manufacturer :' + vartostr(Awmi.GetProperty('Manufacturer', devIndex)));
Memo_Info.Lines.Add('Win32_Processor NumberOfCores :' + vartostr(Awmi.GetProperty('NumberOfCores', devIndex)));
Memo_Info.Lines.Add('Win32_Processor ThreadCount :' + vartostr(Awmi.GetProperty('ThreadCount', devIndex))); Memo_Info.Lines.Add('-----显卡-------');
Awmi.WMIType := 'Win32_VideoController';
Memo_Info.Lines.Add('GetEnum:' + Awmi.GetEnum); //('IPEnabled=True'));
Memo_Info.Lines.Add('Win32_VideoController name :' + vartostr(Awmi.GetProperty('name', devIndex)));
Memo_Info.Lines.Add('Win32_VideoController Description :' + vartostr(Awmi.GetProperty('Description', devIndex)));
Memo_Info.Lines.Add('Win32_VideoController Caption :' + vartostr(Awmi.GetProperty('Caption', devIndex)));
Memo_Info.Lines.Add('Win32_VideoController DeviceID :' + vartostr(Awmi.GetProperty('DeviceID', devIndex)));
Memo_Info.Lines.Add('Win32_VideoController CreationClassName :' + vartostr(Awmi.GetProperty('CreationClassName', devIndex)));
Memo_Info.Lines.Add('Win32_VideoController PNPDeviceID :' + vartostr(Awmi.GetProperty('PNPDeviceID', devIndex)));
Memo_Info.Lines.Add('Win32_VideoController SystemName :' + vartostr(Awmi.GetProperty('SystemName', devIndex)));
Memo_Info.Lines.Add('Win32_VideoController VideoModeDescription :' + vartostr(Awmi.GetProperty('VideoModeDescription', devIndex)));
Memo_Info.Lines.Add('Win32_VideoController VideoProcessor :' + vartostr(Awmi.GetProperty('VideoProcessor', devIndex)));
Memo_Info.Lines.Add('Win32_VideoController SystemCreationClassName :' + vartostr(Awmi.GetProperty('SystemCreationClassName', devIndex)));
Memo_Info.Lines.Add('Win32_VideoController AdapterCompatibility :' + vartostr(Awmi.GetProperty('AdapterCompatibility', devIndex)));
Memo_Info.Lines.Add('Win32_VideoController AdapterDACType :' + vartostr(Awmi.GetProperty('AdapterDACType', devIndex))); end;
基于WMI的信息查询和编辑,按微软的说明一般都是
Requirements
Minimum supported client Windows Vista
Minimum supported server Windows Server
Namespace Root\CIMV2
MOF CIMWin32.mof
DLL CIMWin32.dll 操作系统能读到的信息,都能读到.内容丰富的撑到爆.在windows域环境下,wmi是可以查看域内任意计算机信息的,不限于本机,当然需要你有相应域权限.
具体可msdn.microsoft.com搜索
比如磁盘的:
https://msdn.microsoft.com/en-us/library/aa394132%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
操作系统的:
https://msdn.microsoft.com/en-us/library/dn792258(v=vs.85).aspx
基本上windows整个体系方方面面统统可以用此方法读取和操作.这也是微软未来的方向,以前的单个api系统会慢慢被wmi统一掉.
当然XP对很多wmi不支持,Windows Vista 则几乎都没问题

基于WMI的信息查询和编辑,按微软的说明一般都是的更多相关文章

  1. C&num;:基于WMI查询USB设备信息 及 Android设备厂商VID列表

    /* ---------------------------------------------------------- 文件名称:WMIUsbQuery.cs 作者:秦建辉 MSN:splashc ...

  2. C&num;:基于WMI查询USB设备

    来源:http://blog.csdn.net/jhqin/article/details/6734673 /* ------------------------------------------- ...

  3. iOS - 苹果健康架构 &amp&semi; 基于HealthKit的健康数据的编辑

    最近公司需求,研究了一周之久的苹果健康架构,内容包括:资料调研.报告与HealthKit.framework - API,这一研习还在持续进行中.至此,主要认识到了2点:对苹果健康健康架构设计与实现原 ...

  4. python爬虫之12306网站--火车票信息查询

    python爬虫之12306网站--火车票信息查询 思路: 1.火车票信息查询是基于车站信息查询,先完成车站信息查询,然后根据车站信息查询生成的url地址去查询当前已知出发站和目的站的所有车次车票信息 ...

  5. 基于WMI获取本机真实网卡物理地址和IP地址

    using System; using System.Collections.Generic; using System.Management; using System.Runtime.Intero ...

  6. ES 入门 - 基于词项的查询

    准备 首先先声明下,我这里使用的 ES 版本 5.2.0. 为了便于理解,这里以如下 index 为格式,该格式是通过 PMACCT 抓取的 netflow 流量信息, 文中所涉及的到的例子,全基于此 ...

  7. Unix无缓冲文件操作函数、文件信息查询

    问题描述:         Unix无缓冲文件操作函数.文件信息查询 问题解决:        struct stat 结构体信息: 具体代码: 具体源文件:

  8. ExtJS4 自己定义基于配置的高级查询1

    今天在编码过程中遇到一个问题,临时还没解决,先记录下来 上面是我做的高级查询面板..字段名和值都是读取配置文件,依据用户选择不同的字段名,自己主动载入不同的值列表,关系是与或 问题来了,我在字段名那个 ...

  9. 使用Python改写的身份证信息查询小程序

    花了几天时间过了一遍python基础.真心感觉python让世界充满了爱…先简单的使用一下python好了,拿以前写的<C语言身份证信息查询系统(修改版)>开刀~ 很多东西,不需要考虑C语 ...

随机推荐

  1. 无意之间发现的Servlet3&period;0新特性&commat;WebServlet

    今天无意之间看到了一个注解,这个注解就是@WebServlet,@WebServlet 用于将一个类声明为 Servlet,该注解将会在部署时被容器处理,容器将根据具体的属性配置将相应的类部署为 Se ...

  2. python 中的map&lpar;&rpar;&comma; reduce&lpar;&rpar;&comma; filter

    据说是函数式编程的一个函数(然后也有人tucao py不太适合干这个),在我看来算是pythonic的一种写法. 简化了我们的操作,比方我们想将list中的数字都加1,最基本的可能是编写一个函数: I ...

  3. TP第一天路由解析

    路由解析:支持四种URL模式,分别是普通模式.路径模式.重写模式.兼容模式,分别用0123表示 普通模式:http://网址/index.php?m=model&c=user&a=lo ...

  4. Mac &plus; IDEA &plus; JRebel破解方法&period;

    [重要提示]---最佳人生 一.只推荐当计算机无法访问互联网时使用本破解文件. 二.如果可以访问互联网,建议直接到JRebel官网注册JRebel会员获取[正版永久免费]使用的授权码.JRebel会员 ...

  5. java&period;util&period;zip&period;GZIPInputStream&period;readUByte,Not in GZIP format错误处理

    问题一: 使用webclient抓取网页时报错:(GZIPInputStream.java:207) atjava.util.zip.GZIPInputStream.readUShort(GZIPIn ...

  6. Spring&plus;SpringMVC&plus;MyBatis&plus;easyUI整合基础篇(七)JDBC url的连接参数

    在java程序与数据库连接的编程中,mysql jdbc url格式如下: jdbc:mysql://[host:port],[host:port].../[database][?参数名1][=参数值 ...

  7. 人工智能一:Al学习路线

    想要跨入AI的大门,如何跨?终于找到了一套学习方法 努力向你靠近 2017-12-03 07:14:51 当下人工智能领域的发展已经有了燎原之势,麦肯锡全球研究院就认为人工智能促进对社会的转变速度将比 ...

  8. PLECS&lowbar;晶闸管调速系统&lowbar;9w

    3. 直流电机开环调压调速系统模型搭建 (1)电路图 (2)仿真 当 α = pi / 2.7 的时候,直流电机的稳定转速大约保持很低的速度. 随着α的减少,直流电机的速度逐渐增大.当α = pi / ...

  9. python jquery初识

     jQuery的介绍 jQuery是一个快速,小巧,功能丰富的JavaScript库.它通过易于使用的API在大量浏览器中运行,使得HTML文档遍历和操作, 事件处理动画和Ajax更加简单.通过多功能 ...

  10. ubuntu 里切换 gcc,g&plus;&plus; 的版本

    https://askubuntu.com/questions/26498/choose-gcc-and-g-version https://*.com/questions/7 ...