Summary of scattered knowledge points

Source: Internet
Author: User

Database:

1. At the conceptual design stage, the most commonly used data model is (E-R model).

2. (transaction) is the basic unit of the DBMS, which is the set of operations that construct a single logical unit of work.

3. (mode) is used to describe the global logical structure and characteristics of the database's entire data.

4. To ensure the data independence of the database, it needs to be modified (two-layer mapping between level three modes).

5. The three elements of a relational data model are (entity integrity), (referential integrity), (user-defined integrity).

6. In relational algebra operations, special relational operations have (selection), (projection), (connection).

The four table-level constraints for a 7.t-sql language base table are (primary KEY constraints), (foreign KEY constraints), (Uniqueness constraints), (check constraints).

In 8.SQL, the operator with the ' not ' equivalent is (' <>all ').

9. To manipulate a table in a database, and to operate on another table, you can put operations that manipulate multiple tables into a transaction for processing.

10. If the database log is full, you can only perform read operations such as queries, and cannot perform write operations such as changes, backups, etc., because any write operations are logged.

Other

The 1.windows message scheduling mechanism is (Message Queuing).

2.CSingleLock is used to synchronize simultaneous access of multiple threads to a data class.

3. Other data type conversions to CString can be converted with format, so CString in MFC is not a type-safe class.

4. About Const

1) using const in parameters should use references and pointers instead of generic object instances.

2) If a member function does not modify a data member, it is best to declare it as const to prevent modifications to the data members and improve robustness.

3) When a class contains a const member variable, the constructor of the base class needs to initialize the list of members.

4) const int A; A is a constant integer type

const int *a; A is a pointer to a constant integral type. Pointer can be modified, integral type cannot be modified

int *const A; A is a constant pointer that executes an integer variable. The integer number can be modified and the pointer cannot be modified.

5. The compiler automatically aligns memory in order to improve program performance. Access to unaligned memory processors takes two memory accesses, while aligned memory accesses are required only once.

6. Using a thread pool prevents large peaks in threads, which can improve scheduling efficiency and limit resources at the same time. When a thread in the thread pool reaches the maximum number of threads, the other threads wait.

7. About Stacks

1) stack (local variable), (function parameter), (function return value), (function return address).

2) to Stack s operation: push (1), push (5), pop (), push (2), Pop (), pop (), the stack is empty at this time.

8. About the heap

1) New and malloc apply for the memory on the heap.

9. Negative numbers in memory in the form of an integer take the inverse plus one. 1 in memory in the form of 1111 1111, that is 0000 0001 take the reverse 1111 1110 plus 11,111 1111.

10. About pointers

1) If there is a function of Max (A, A, a, b) and the function pointer variable p has pointed to the function, the call method is (*p) (A, B) when the function is called.

2) The null pointer differs from the uninitialized pointer, and the null pointer ensures that no object or function is pointed to, and the uninitialized pointer can point to any object or function.

3) The callback function is a function called by the function pointer, if the function pointer is passed as a parameter to another function, when the pointer is called, it is the callback function.

4) Int (* (*f) (int, int)) (int), f is a function pointer to a function with two parameters and returns a function pointer, the returned function pointer points to a function that has a parameter and returns a value of int.

5) A good habit, set the pointer to Null:str = NULL after free;

Each. (void *) PTR and (* (void *)) PTR values are the same.

12. Linked List

1) The difference between an array and a linked list is: The array data is stored sequentially, fixed size, and the list can be stored randomly, and the size can be changed dynamically.

13. About Virtual functions

1) Pure virtual function: virtual void f () = 0; Subclasses must be implemented.

14. About Macros

1) The number of elements in the array data defined by the macro: #define NTBL (sizeof)/(sizeof (ARRAY[0)))

2) Determine whether a program is compiled by the C compiler or the C + + compiler:

#ifdef _cplusplus

cout<< "C + +";

#else

cout<< "C";

#endif

3) Define how many seconds are in a year: #define Sec_per_year (365*24*60*60) UL

4) Two decimal values: #define MIN (A) (A) <= (B)? (A): (B))

5) Capitalize the letters: #define UPCASE (c) (((c) > "A" && (c) < "Z")? ((c)-0x20): (c))

15. The constructor for the global object is executed before the main function.

16.float type variables are compared with 0: if (a<0.000001 && a>-0.000001).

17. Print the current source file name and the current line number of the source file:cout<<_file_;cout<<_line_;

18. Memory operation

1) to determine whether to apply for memory success, because the memory may run out did not apply to.

2) Assign the memory address "0x12345678" to 0:long *p; p = (long*) 0x12345678; *p = 0;

19. Include header file,<> to find and reference header files from the standard library path; "" First find and apply the header file from the current working path, if not found, then look from the standard library.

20. keyword extern

1) is a keyword that indicates the scope of functions and global variables in the C/S language, which tells the compiler that its declared functions and variables can be used in this module and in other modules.

2) in C + + to declare a const void F () function as a library function of a C program, you should add an extern "C" declaration before the function.

21. About TCP/IP

1) The main hierarchical structure of TCP/IP protocol is: Application layer, Transport layer, network layer, data link layer, physical layer.

22. Other Agreements

1) The Internet Physical address and IP address translation uses the ARP Address Resolution protocol.

21. Write the Dead loop in C: while (1) {} or for (;;) {}

22. The empty class occupies 1 space, and the space occupied by the multiple inheritance is 1, the virtual inheritance involves the virtual table, and the size is 4.

23. The array is passed as a parameter to the function simultaneous pointer to the first address of the array, fun (Char[8]), Fun (char[]), fun (char*) equivalent.

Char var[10];

int Test (char var[])

{

return sizeof (VAR); Returns 4

}

24. Basic object-oriented concepts; classes, objects, inheritance.

25.c++ Hollow Class The class member functions generated by default are: constructors, destructors, default constructors, assignment functions.

26. The definition of int z:33 is incorrect, z is an integer variable and cannot exceed 32 bits.

27. An unsigned auto-decrement operation will cause a dead loop.

28.switch statement, the break statement is used to jump out of the switch statement and continue executing the statement after the switch statement.

The continue statement jumps out of the statement that has not yet been executed in the loop body, and then performs the next loop judgment.

Summary of scattered knowledge points

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.