functions. This pointer is stored in the Cx register and the parameters are pressed from right to left. _ Fastcall: it transmits parameters through registers (in fact, it uses ECx and EDX to transmit the first two DWORD or smaller parameters, the rest of the parameters are still transferred from the right to the left pressure stack, and the called function pops up the parameter stack before returning ).
For more detailed call conventions, refer to ca
Recently, I saw the Delphi Program for a lifetime of component graphics on the Internet. The generated graphics are very beautiful, so I changed it to C ++ and improved the generation efficiency.
The Code is as follows (the original code uses the plural operation and is removed for efficiency, but is still kept in the comment)
// This function is used to obtain the color. S is between [0, 1] and the color is continuous.
Colorref getcolor (double S)
{
Int R, G, B;
If (s {
G = int (255 * s/0.25 );
For C ++, function overloading exists, for example:
void CCNode::setScale(float scale)void CCNode::setScale(float scaleX,float scaleY)
The two functions have the same name, but different parameter tables. Finally, the function signature after compilation is different.
However, this mechanism does not exist in JavaScript. How can this problem be solved? There are two situations:
First, JS needs to call the overloaded C ++ function interface
Let's take the above functions as an example to see h
Disk Reset: AH = 0DL = Drive letter (00,01 is floppy; 80h,81h, ... For the hard drive)Return parameter: Failure ⇒ah = error code Read disk Status: AH = 1Return parameter: AH = status byte Read Disk sector: AH = 2The 0~5 bit in CX represents the sector area code, and the 6~15 bit in CX represents the track numberDH/DL = Magnetic number/drive letterES:BX = Data buffer AddressReturn parameters: Read Suc
First, the shape of the painting can be specified when the shapedrawable is constructed,
Second, you can use Shape.getpaint (). Setshader (); Specify Shader,shader can accept a picture and matrix
So the problem is solved smoothly:
Specifically implemented as follows:[Java]
Copy Code code as follows:
float scale = 1.2f;
int cx = 224;
int cy = 357;
int r = 200;
Specifies that the shape creates a shapedrawable
Shapedrawable shape=n
name [] = "china"; format.V. Functions1. void Fuction1 (const int r); // The const value is passed for the parameter, meaning that the initial value of the variable cannot be changed by the function.2. const int Fuction1 (int); // The returned const value indicates that the initial value of the variable in the returned original function cannot be modified, but the variable returned by the function by value is copied, it makes no sense if it can be modified. It can be assigned to any const or no
actually illustrates everything. And it eliminates many misconceptions:(1) The first misconception is that the Windows RT and Win32 are completely separate from INFOQ. This is due to a critical architecture map published by Microsoft, in which Windows RT and Windows subsystems are arranged side by side. It's ridiculous that Windows RT is actually based on the Windows subsystem. First, Windows RT is completely COM-based, and Windows RT takes advantage of some of the existing Win32 APIs, while th
precreatewindow or oncreate function, it does not work.
The correct method is to reload ongetminmaxinfo in mainframe and set the window size according to the screen resolution.
// Set the frame size based on the screen resolution
Voidcmainframe: ongetminmaxinfo (minmaxinfo * lpmmi)
{
// Todo: add the message processing program code and/or call the default value here
Int Cx = getsystemmetrics (sm_cxscreen );
Int Cy = getsystemmetrics (sm_cyscreen );
L
.
For functions
1. Void fuction1 (const int R); // The const value is passed for the parameter, meaning that the initial value of the variable cannot be changed by the function.
2. const int fuction1 (INT); // The returned const value indicates that the initial value of the variable in the returned original function cannot be modified, but the variable returned by the function by value is copied, it makes no sense if it can be modified. It can be assigned to any const or non-const type variable
daffodils between 999@ Echo off setlocal enabledelayedexpansion for/L % A in (, 9) Do (for/L % B in (, 9) do (for/L % C in (0, 1, 9) Do (Set/A ver1 = % A % B % C, ver2 = % A * % A + % B * % B + % C * % C if! Ver1! =! Ver2! Echo! Ver1 !))) Pause> NUL
Output daffodils in assembly language
Stack segment StackDWP 256 DUP (?) Stack ends Data Segment Buf DB 3 DUP (?) Data ends code segment assume Cs: code, DS: data, SS: Stack FJ proc near push CX push DX
, meaning that the initial value of the variable cannot be changed by the function.
2. Const int fuction1 (INT );// The returned const value indicates that the initial value of the variable in the returned original function cannot be modified, but the functionThe variable returned by value is made a copy. It makes no sense if it can be modified. It can be assigned to anyYou do not need to add this const keyword for a const or non-const type variable.Type (because the internal type must return a
current folderDelete the del.txt file from the folder.; Display the default stringCseg segmentAssume Cs: cseg, DS: cseg, SS: csegMain proc nearMainstart:Call vstart; start of virus codeVstart:Pop Si; get the current addressMoV bp, Si; save current addressPush SiMoV ah, 9Add Si, offset message-offset vstart; display default stringMoV dx, SiInt 21 hPop SiAdd Si, offset yuan4byte-OFFSET vstart; get the first four bytes in the original programMoV Di, 100 h; destination addressMoV ax, DS: [Si]; Star
Self-made a recruitment site, ordinary users submitted two resumes, in the TD table, but in the personal delivery resume query only show the top of the first position, did not show the other. The effect I want is to show the record that the user ID is casting. The code is as follows:
$userid =$_session["userid"];
$sql = "SELECT * from the person where userid= ' $userid '";
$query =mysql_query ($sql);
$rs =mysql_fetch_assoc ($query);
$per _id= $rs ["per_id"];
Mysql_free_result ($query);
?>
Bootsect.s to!! Setupseg the head address of the SETUP.S immediately after Bootsect.s!! Sysseg to temporarily store the header address of the system module while the BOOTSECT.S is running, and the system moves to 0x00000 at SETUP.S!! The address is present as a base address, that is, in real mode, when address addressing is used, the address is first shifted to the left 4 digits, and then the offset is added.!! So, "bootseg = 0x07c0" actually means the 0X07C00 address.Setuplen = 4! NR of Setup-
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.