Recently, I had the idea of building a reusable multi-threaded framework and tried to implement it.
1. Thread Management
The thread pool is essential. For the sake of development time, glib's thread pool API is used as the underlying layer for
1. How does hibernate connect to the database?
The configuration class uses the XML Parser of dom4j to set the XML parsing environment. Then, these environment attributes are used to produce sessionfactory. Then session is produced.
2. How does
@ Component: Mark a common spring Bean class
@ Controller: Mark A Controller component class
@ Service: Mark a business logic component class
@ Repository: Mark a DaO component class
The Convention is to change the first letter of the bean class
Hbm2java automatically generates Java source files based on the ing File
Hbm2ddl automatically generates database schema Based on the ing file.
XDoclet generates a ing File Based on the Java source file marked with XDoclet
Middlegen
Environment: Eclipse 3.2m3 (http://www.eclipse.org) HibernateTools-3.1.0.beta2 (http://www.hibernate.org/255.html) Plug-in installation don't have to say it. 1. Create the cfg file.
CTRL + n to bring out the following form.Select the hibernate
1. Concept of Team ManagementWhat is team management? A simple example: if a car sand stone falls down from the top of the building, the impact on the ground is not very big, if a whole vehicle has been solidified into a whole block of concrete from
■ Question 1: if there is a restaurant near your home, which is expensive and difficult to eat, and the table is still crawling around, will you come over and over again because it is very close and convenient?
A: You will definitely say that this
MFC provides a variety of synchronization objects. The following describes the four most common types:
Critical section ccriticalsection
Event cevent
Mutex
Semaphores csemaphore
This section describes the critical section.
The procedure for using
Store is a storage container that provides record objects for ext devices. Its behavior and attributes are similar to data tables.
Method: do not list inherited methodsStore (Object config)Constructor. config is defined {Autoload: Boolean/object, //
We know that in spring2.0, there are two types of beans except singleton and prototype. By default, three types of beans are added: request, session, and global session. The added beans are mainly used in Web applications. This article does not want
1. View UUIDLinux @ Linux-desktop :~ $ Sudo blkid # view the uuid of the disk partition[Sudo] password for Linux:/Dev/sda1: UUID = "f6cc0f08cc0ec33b" type = "NTFS"/Dev/sda5: UUID = "e250ef0650eedff1" type = "NTFS"/Dev/sda6: UUID = "30bc0207bc01c7f4"
Level 1 cache:
Session cache. When the program calls the SAVE (), upadte (), saveorupdate (), get (), load (), and list () that calls the query interface (), iterator (), filter (). If the object does not exist in the session cache, Hibernate will
The concept of a transaction: The work of a transaction value in a unit, which is either completed or not completed.
ACID properties of transactions: atomicity, consistency, isolation, and Durability
Simple understanding:
1. either completed or not
Document directory
Connection timeout
In highly concurrent network programming, if the socket timeout is not controlled, the program will die very hard.
Here, the timeout time must be controlled in three parts: Connection timeout, read timeout,
Inheritance relationship
1. One data table for each subclass
XML: Contains attributes of the subclass and parent class in the HBM. xml file of the subclass.
Anno: parent class @ mappedsuperclass
2. One data table for each class
XML: is used in the
Trylock is a good choice when non-blocking locks are required, but some problems are encountered during use:
You need to use pthread_mutex_errorcheck_np to define an error lock, but it cannot be compiled anyway. Even if-d_gnu_source is added
The POP3 command code is as follows:Command Parameter status description------------------------------------------User Username recognizes that if this command is successful with the following PASS Command, status conversion will occur.Pass password
Server (acceptor) Program:
1. Create a socket)
2. Bind the socket to a local address and port (BIND)
3. Data to be received (recvfrom)
4. Disable socket.
Client (sender) Program
1. Create a socket)
2. Send data (sendto) to the server)
3. Close the
# Include // load the header file
# Include // load the standard input/output header file
# Pragma comment (Lib, "ws2_32.lib ")
Void main ()
{
Word wversionrequested ;//
Wsadata;
Int err;
Wversionrequested = makeword (1.1); // socket
Err =
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