IOS UinavigationController and UITABBARController combined

2023-01-23   ES  

1, Linux common sense summary:

gnu = gnu ‘s not unix, in order to distinguish the unix system;

Linux is a UNIX operating system. Free and open source is its biggest feature. It is a multi -user multi -task and meets the POSIX standard operating system;

target: non -private, open operating system;

Terms

: GPL = General Public Licence;

Unix and Linux Differential: Unix is mostly matched with hardware, and Linux can run on a variety of hardware platforms;

1991 was developed by Linus Torvalds, and released Linux 1.0 in 1994;

linux2.6.10: 2 is the main version number, 6 is the second version number, the number indicates the stable version, the odd number indicates the unstable version, 10 represents the 10th revision;

linux development direction: server field (main), embedded system field, desktop application;

The five pillars of

Linux: Unix OS, Minix OS, GNU Plan, POSIX standard and Internet.

linux programming language: C, C ++, Java, Perl, Python, Rudy, PHP ……

2. The control structure is the cornerstone of C language:

GOTO statement basic functions: unconditional jump, error treatment (core idea: the order of releasing resources is opposite to the order of application resources)

Short -circuit calculation: Only calculate the first expression to determine the method of the entire expression to become a short -circuit calculation. Common, such as “and”, “Non”

C language Cycle structure: While and for are equivalent inside the machine; do.. Wook must perform at least once a cycle statement, which is the difference between the While.

SWITCH statement: To achieve the jump of the program, the difference is that its execution efficiency is higher than if .lse, but in the space occupied in the program, it is necessary to maintain a jump table. Essence

3. Optimized control structure:

Expressive optimization: multiplication method, constant folding, use mathematical formula, storage problem in the replacement program

branch optimization: change the order of judgment, use SWITCH statement

cycle optimization: disposable calculation (some calculations in the cycle are unchanged multiple times, such as constant assignment)

Note: Adding and subtraction method, bit operation, displacement operation-> multiplication operation-> Except operation, speed from fast to slow.

4. The essence of the function:

Function is a special control process. Only by understanding the nature of the function can we understand the ideas of the storage category and modular program design in the program.

The essence of

Function: a machine instruction code (a binary executable code, these codes are some instructions that can be directly executed by the machine).

The essence of

Function name: a label, the value of the label is equal to the first address of the memory space of the memory space in the memory.

5. The initial value of the variable:

For global variables, if a global variable is not initialized, the initial value is automatically set to 0 by the compiler. Therefore, when using a global variable, it is not necessary to consider its initial value problem, and it can be used directly. Global variables belong to a source program file.

For local variables, after defining local variables, the compiler does not initialize it to 0, but uses the original value of the memory space it occupied. At this time, the value is a random value, which has nothing to do with this program. Local variables are stored in the stack of memory. Therefore, it is dangerous to reference directly if the local variable is not initialized.

Summary: The local variables in the C language program are stored on the stack, and the global variables are stored on the data segment.

source

Related Posts

UI thread

Certificate revoked list CRL use

(2) Install and configure Eclipse and JDKGZJASON under MAC

Computer network (9) -Py physical layer (supplement)-Fourier transformation-channel reuse

IOS UinavigationController and UITABBARController combined

Random Posts

Enhanced for loop

Solution Introduction to mybatis-plus calls SelectByid and Selectlist.

lightoj 1245 Harmonic Number (II) (simple theory)

The functions between the two JS call each other

Blind webhooks