Face questions Summary:
Affairs?
Services: a unified set of operations performed, atomicity, consistency
lock?
Shared lock (can be read with a database) Exclusive lock (our only read or modify)
pessimistic locking (creates a row-level locking, does not allow other users to modify other people access clogs) optimistic locking (multiple people can modify , consistency is not guaranteed) data
deadlock (each waiting for the other to release resources, mutual wish to hold other resources)
index?
Index Similarly directory
polymerization Index: physical sorting, data from the physical order of storage, a table containing a (polymerization index lookup by key in the primary key tree, to find the specified data)
non-polymeric index: logical order, KEY paired leaf node pointer to the data block (polymerization index different non-polymeric nodes stored as an index key, to find polymerization index key in the primary key index tree, called a back table)
Extended :( cited article, https://www.cnblogs.com/sujing/p/11110292.html Thank you for your pay!)
For binary tree of understanding, for the understanding of memory pages
inquiry mode:
Binary Tree
Balanced binary tree (root node holding an intermediate value)
b-tree (there are a plurality of child nodes of each node, Key, value exist)
b + tree (save non-child node, the value of the sub-node stores Key)
Storage Page:
Insert a new row in a page, in order not to reduce mobile data, usually back into the current line or deleted rows to stay in space, so within one page of data and are not fully ordered , and However, in order for sequential data access, in each record has a record pointer points to the next, and thus constitutes a one-way sorted linked list,
From the browser sends a request step of:
Request a step interface?
1. DNS resolution to resolve domain name, the first analysis of local, then look for a higher level DNS domain name server to find
2.TCP / IP three-way handshake
1. Display the client sends a SYN to the server
2. The server returns SYN / ACK packet
3. The client then sends ACK indicates success
3. HTTP request
1. established socket, and sends a request
2 transmission request header
3. return state 200, etc.
4. The return request header
5. The return body
6 closes the connection
WCF and WEB API should I choose? (See communication protocol to the SOAP)
1, when you want to create a support message, the message queue service, duplex communication, you should choose WCF
2, when you want to create a service, you can use faster transmission channels, like TCP, Named Pipes or even UDP (in WCF4.5), while the rest of the transmission channel may be unavailable to support HTTP.
3. When you want to create a resource for HTTP-based service and can use all the features of HTTP (such as URIs, request / response header, cached, version control , a variety of content formats), you should choose the API Web
4, when when you want your service for browsing, mobile phones, iPhone and tablets, you should select the Web API
Stored procedures?
Sql set operation,
only little maintenance, not in a program written in a plurality of times
only opened once the database connection, the performance of reducing the consumption of
reducing data transmission
C # database connection with the class?
The Command
the DataReader
dataSet
the DataAdapter
Connection
WebService?
Is a set of interfaces, API with similar handwriting, transmission of information between each other
Object-oriented?
Polymorphism package inheritance
Commissioned?
The method goes parameters, function pointer, the transaction is not a delegate
XML?
A data format XML JSON
Interface Interface?
Interface can be multiple inheritance, a class can only inherit a single
interface declares, is not achieved, the heir must implement the interface is a multi-state implementation
New use?
Class is instantiated
override method
reflection?
The method of Example reflected dynamically created objects, access to classes, attributes,
Unpacking boxes?
Unpacking: Object reference value into an object
Packing: value object into an object reference
Overloaded rewrite?
Overloaded: the same method name, parameters different polymorphic
rewritten: overwrite the existing method
protected?
within the class visit, the derived class access
internal?
Assembly within access
sealed?
Sealed class, do not allow inheritance
structure, the seal itself
can be prevented from rewriting others, overloads
Value type? Reference type?
Value Type: on the stack, when assigned to other objects, only a copy of the value, modify the value of other objects will not modify the current value of the object, derived from ValueType
reference types: on the heap, the stack pointer stored derived since object
Interface authentication?
Token authentication and encryption, the memory cache redis, keyvalue
Threads, processes?
A process contains multiple threads
an object's methods only one thread access
request is a process
HashMap? Hashtable?
hasmap lightweight hashtable non-thread-safe value can be null
after the realization lock (this._table.SyncRoot) hashtable non-thread-safe for the thread, the new version also has security methods
Collections?
Collection class helper,
Const readOnly?
Const: static constant, is the constant declaration, must be assigned
ReadOnly: Read-only variables
Ienumerable?
Objects must inherit Ienumerable to facilitate
Bubble Sort?
int [] array = new int [ *];
int temp = 0 ;
for (int i = 0 ; i < array.Length - 1 ;i++)
{
for (int j = i + 1 ; j < array.Length ;j++)
{
if (array[j] < array[i])
{
temp = array[i] ;
array[i] = array[j] ;
array[j] = temp ;
}
}
}
Lock?
whether the lock will be locked in a recursive, the
need to see the parameters, if the argument is not a value type, reference will be locked
Session?
IIS application pool recycling mechanism will lead to loss of load fail to
Cookie?
Easily modified in the browser memory
Life Cycle ASP.NET server controls?
Initialization - "load view state postback data processing -" Load - "Send postback change notifications -" handling postback events - "pre-rendered -" save state - "present -" disposal - "Uninstall
a = 10, b = 15, without a third party under the premise of variables, the a, b values of swap?
a = a + b; b = ab; a = ab;
a = 10, b = 15, under the premise of do not need a third-party variable code is the shortest it?
1) a ^ = b ^ ( b ^ = a ^ b); // 13 bytes
2) a = b + (b = a) * 0; // 11 bytes