This article mainly introduces the implementation code for js to determine whether an element exists in iframe. If you need it, refer to this article to introduce JavaScript to determine whether the element in iframe exists in code, for more information, see.
I. Pure Original Ecological js implementation method, the Code is as follows:
Script var bb = extends ument. getElementById ('apic '); if (bb) {}else {}// a
The examples in this paper describe how C # obtains random colors. Share to everyone for your reference. The implementation method is as follows: The code is as follows:public string Getrandomcolor () { Random Randomnum_first = new Random ((int) DateTime.Now.Ticks); For random numbers in C #, there's nothing to say System.Threading.Thread.Sleep (Randomnum_first.next (50)); Random randomnum_sencond = new Random ((int) DateTime.Now.Ticks);To display on a white background, try to create a dark colo
WDM APIs in the Windows Kernel, but there is a set of NDIS APIs dedicated to NICs. In fact, many of the two APIs are designed to overlap. So why are there two? Because NDIS comes out first, it must be supported for compatibility. While NDIS is only for NICs, so WDM is available again.
The disadvantage of the unfixed API is that the upgrade is very troublesome, and the peripheral kernel module maintainer is very hard. The advantage is that the updated design can be used at any time.
5. Compariso
Modify the keyboard entry in the Interrupt Descriptor Table (IDT) to implement the key record, and convert the read Keyboard Scan code to ASCII code record. I/O APIC(By ing the physical address 0xfec00000 to a virtual address, and then reading the keyboard interrupt vector, the most rare thing is that there is no xpsp2. This is the driver source code I transferred from another place. Windows XP checked build environment has been tested.
# Include
// Configure //-------------------------------------------------------------------------------------------------//// Copyright? 2001, Intel Corporation. Other brands and names may be claimed as the property of others.////// CPU counting Utility// Date: 10/30/2001// Version 1.4//////// File name: cpucount. cpp//// Note: 1) logicalnum = number of logical processors per physical processor. If you want to count// The total number of logical processors, multiply this number with the total number// Ph
1. Create a 10 Gb hard disk lvcreate-N monowall-L 10g xen_suse by using LVM to manage the hard disk in SuSE.
2. Install the configuration file cat monowall-pxe.cfg, copy to the installed machine, execute the XM create monowall-pxe.cfg
name = "monowall"
builder = "hvm"
# Virtualization Mode
memory = "2048"
# The maximum memory size is 2 GB.
disk = [
‘phy:/dev/xen_ovm/monowall,hda,w‘
,
‘file:/soft/monowall/cdrom-1.34.iso,hdc:cdrom,r‘
, ]
# Installation using a cd
vif = [
‘mac=00:00:00:00:00:01
part is from pkmap_base to fixaddr_start, which is used to map high-end memory by the kmap () function;The second part, from fixaddr_start to fixaddr_top, is a fixed-size linear address space (reference: fixed virtual addresses are needed for subsystems that need to know the virtual address at compile time such as the APIC). In the X86 architecture, fixaddr_top is statically defined as 0xffffe000, at this point, the fixed size space ends at 4 K befor
Linux KVM installation 1: first check whether the hardware supports Virtualization: execute the following command in the terminal # egrep 'svm | vmx'/proc/cpuinfo to output the following information: flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dtsacpi mmx fxsr sse %sse2 ss ht tm pbe lm %pebs %pni %monitor ds_cpl vmx est %16 xtpr pdcm movbe lahf_lm dts tpr_shadow vnmiflags: fpu vme de pse tsc msr pae mce cx8
In the SMP environment, how does one operate registers on different processors? In the SMP environment, your current code can only run on a certain processor at the same time, so how does this code operate registers on other processors? Let's take a simple example. Suppose there are four cores in my current system (this article does not show the differences between Socket, Processor, and core ), if I want to write a piece of code to initialize the PMU registers on these four cores (each core has
Obtain CPU speed
Run the following command in shell:
Sysctl-A | egrep-I 'hw. Machine | HW. model | HW. ncpu'
The output is as follows:
HW. Machine: amd64HW. Model: Intel (r) Xeon (r) CPU e5620 @ 2.40 GHzHW. ncpu: 8HW. machine_arch: amd64
The above information shows that the CPU is Intel Xeon quad-core and the frequency is 2.4 GHz.
Obtain more CPU Information
To obtain more detailed CPU information, run the following command:
Dmesg | grep-I CPUOrGrep-I CPU/var/run/dmesg. boot
The outpu
space, the CPU accesses the I/O port just like the memory. See the typical Memory Address Allocation Table for x86/x64 systems in Intel ta 719 documents:
System resource usage
------------------------------------------------------------------------
BiOS 1 m
Local APIC 4 K
Chipset reserved 2 m
Io APIC 4 K
PCI device 256 m
PCI Express device 256 m
PCI device (optional) 256 m
Show frame cache 16 MB
Tseg 1 m
F
the latest information about the physical environment of the system. Although files in/proc are virtual, they can still be viewed using any file editor or programs such as 'more', 'less ', or 'cat. When the editing program tries to open a virtual file, the file is created out of thin air by the information in the kernel. Here are some interesting results I got from my system:
$ ls -l /proc/cpuinfo-r--r--r-- 1 root root 0 Dec 25 11:01 /proc/cpuinfo$ file /proc/cpuinfo/proc/cpuinfo: empty$ cat /p
Environment: Ubuntu 12.04 Server
1. KVM Installation
First, check whether your processor supports hardware virtualization. If yes, run the following command:
Egrep '(vmx | SVM)' -- color = always/proc/cpuinfo
The following content should be displayed:
[Email protected] Ubuntu :~ # Egrep '(vmx | SVM)' -- color = always/proc/cpuinfo
Flags: fpu vme de pse tsc msr pae mce cx8 APIC Sep mtrr pge mca cmov Pat limit 36 clflush
MM
compatibility, the disadvantage is the burden is larger, have to support the old, perhaps outdated interface. For example, the Windows kernel has WDM set of APIs, but there are network adapters dedicated NDIS set of APIs. In fact, many of the 2 sets of API design goals are coincident. So why are there 2 of them? Because NDIS is first out, for compatibility, be sure to support. and NDIS only for the network card, so again out of WDM.The disadvantage of the non-fixed API is that the upgrade is cu
finally had a problem. set the BIOS and disable APIC. What is APIC? The full name is "Advanced Programmable Interrupt Controller ". I don't know how much impact it will have on the system after I turn it off, but I have to turn it off when I install Ubuntu. Www.2cto.com
The problem with the graphics board is solved. before I can be happy, the next problem will come: After I choose to install Ubuntu, the mo
路cpu(SB),NOSPLIT,$0-8 MOVL $0x01, AX // version information MOVL $0x00, BX // any leaf will do MOVL $0x00, CX // any subleaf will do // call CPUID BYTE $0x0f BYTE $0xa2 SHRQ $24, BX // logical cpu id is put in EBX[31-24] MOVQ BX, ret+0(FP) RET
Main.go
Package main import ("Flag" "FMT" "Math/rand" "OS" "Runtime" "Runtime/pprof" "Sync" "Syscall" "Time" "unsafe") Func CPU () UInt64//implemented in CPU_AMD64.S var CPUs map[uint64]int//Determine mapping f
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.