CopyCode The Code is as follows: // obtain the CPU information of the computer
Function onlyu (){$ A = '';$ B = array ();If (function_exists ('exec ')){If (mailto :! @ Exec (/All ", $ B )){Return false;}} Elseif (function_exists ('system ')){Ob_start ();If (mailto :! @ System (/all ")){Return false;} Else {}$ B = ob_get_contents ();Ob_end_clean ();$ B = explode ("\ n", $ B); // print_r ($ B );Array_pop ($ B );} Else {Return false;}
$ All = sizeo
-superficial understanding, only to be able to use. Therefore, this document is recorded so as to facilitate the fellow human beings. Another important reason is that a lot of information on the web is a bit outdated (including official documents) and only makes people (me) circle around.Goal in the Mac OS X10.10 system successfully installed Caffe, because my Mac does not have Nvdia graphics card, so the u
Obtain the CPU serial number, hard disk ID, and nic MAC address.
Private void getinfo (){String cpuinfo = ""; // CPU serial numberManagementclass cimobject = new managementclass ("win32_processor ");Managementobjectcollection MOC = cimobject. getinstances ();Foreach (managementobject Mo in MoC){Cpuinfo = Mo. properties ["processorid"]. value. tostring ()
the voidGetcpuidex (unsignedintcpuinfo[4], unsignedintInfoType, unsignedintecxvalue) - { the #ifDefined (_msc_ver)//MSVC the #ifDefined (_win64)//Inline assembly is not supported under 64-bit. 1600:vs2010, it is said that VC2008 SP1 after the support of __cpuidex. the__cpuidex ((int*)(void*) CPUInfo, (int) InfoType, (int) ecxvalue);94 #else the if(Null==cpuinfo)return; the _asm{ the //load. Read the parameters to the register.98 mov edi, CPUInfo; About mov eax, infotype; - mov ecx,
The example in this article describes how C # obtains machine code. Share to everyone for your reference, specific as follows:
Using System.Runtime.InteropServices;
Using System.Management;
Using System;
public class Hardwareinfo {//Fetch machine name public string GetHostName () {return System.Net.Dns.GetHostName (); ///Fetch CPU number public String Getcpuid () {try {ManagementClass mc = new ManagementClass ("Win32_Processor"
); Manage
Turn from: http://dev2dev.bea.com.cn/bbs/thread.jspa?forumID=124threadID=28320messageID=171767
Java obtains the CPU serial number and the network card MAC address
/*
Using the commands of the runtime call operating system, the specific commands depend on the different operating systems, and do not invoke the Runtime.getruntime (). EXEC (String) interface to use Runtime.getruntime (). EXEC ( String[]) This i
MAC address of the NIC
Select macaddress from win32_networkadapter where (macaddress is not null) and (manufacturer
Result: 08: 00: 46: 63: FF: 8C
Serial number of the CPU
Select processorid from win32_processor
Result: 3febf9ff00000f24
Motherboard serial number
Select serialnumber from win32_bios
Result: 28362630-3700521
Obtain the hard disk IDString Hdid;Managementclass cimobject = new managemen
Hard disk
private void GetInfo (){String cpuInfo = "";//cpu serial numberManagementClass cimobject = new ManagementClass ("Win32_Processor");Managementobjectcollection MOC = Cimobject. GetInstances ();foreach (ManagementObject mo in MOC){CpuInfo = mo. properties["Processorid"]. Value.tostring ();Response.Write ("CPU serial Number:" +cpuinfo.tostring ());}
Get the hard drive IDString Hdid;ManagementClass Cim
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.