Implementation of java deep copy
In some business scenarios, we need two identical but unrelated java objects. For example, using prototype mode, multi-threaded programming, etc. java provides the concept of deep copy. Through deep copy, a target object can be perfectly copied from the source object, which is the same but independent of the source object. Same here means that ...
Posted by blueman378 on Fri, 23 Aug 2019 16:43:25 +0200
oracle multi-table Association query and sub-query
I. Multi-table Association Query
Example:
SQL> create table student1
(
sid varchar(3),
sname varchar(6),
sage number(3));
Table created.
SQL> create table course1
(
sid varchar(3),
cname varchar(8),
cno number(3));
Table created.
student1 table
SQL> select * from student1;
SID SNAME SAGE
--- ------ ...
Posted by jaydeesmalls on Fri, 23 Aug 2019 10:08:23 +0200
[Learning Notes - Java Collection - 16] Queue - LinkedBlockingQueue Source Analysis
introduce
LinkedBlockingQueue is the next blocked queue implemented as a single-chain table in a java Concurrent package. It is thread-safe. As to whether it is bounded, see the analysis below.
Source Code Analysis
Main attributes
// capacity
private final int capacity;
// Number of elements
private final AtomicInteger count = new AtomicIntege ...
Posted by jc94062 on Wed, 21 Aug 2019 19:05:41 +0200
Thread - Thread Implementation and Thread Properties
Processes and threads
Process is the basic unit that can run independently and allocate resources in a computer system. It is composed of PCB (process control block), data segment and code segment. It is a basic unit that can run independently. The creation, scheduling and allocation of processes require large time and space overhead. Threads ...
Posted by Sonu Kapoor on Wed, 21 Aug 2019 11:41:45 +0200
[Learning Notes - Java Collection - 14] Queue - PriorityQueue Source Analysis
introduce
A priority queue is a collection of 0 or more elements in which each element has a weight value and each time it leaves the queue, the element with the highest or lowest priority pops up.
Generally speaking, priority queues are implemented using heaps.
Source Code Analysis
Main attributes
// Default capacity
private static fina ...
Posted by btubalinal on Tue, 20 Aug 2019 18:12:05 +0200
Data Exploration Visualization Library yellowbrick-tutorial for Python Machine Learning
Background introduction
When learning sklearn er, besides the difficulty of algorithm, we have to learn matplotlib visualization. For my practical application, visualization is more important. However, the ease of use and aesthetics of matplotlib are not complimentary. One after another, plotly and seaborn have been used and finally fixed in Bo ...
Posted by koddos on Tue, 20 Aug 2019 11:27:31 +0200
session and cookie,django Middleware
0819 self-summary
session and cookie
1.django sets session
request.session['name'] = username
request.session['age'] = 13
A session ID of key: {"name":'username','age': 12} is automatically generated and encrypted in the latter part of django.
2. Get session
request.session.get('name')
3. Five session settings in Django
1. Datab ...
Posted by toledojimenez on Mon, 19 Aug 2019 13:44:50 +0200
Solution and analysis of the problem that sem_timedwait function has been blocked by modifying system time
Solution and analysis of the problem that sem_timedwait has been blocked by modifying system time
introduce
When recently fixing a project problem, it was found that when the system time was modified forward, the sem_timedwait function would be blocked all the time. By searching, it is found that int sem_time dwait (sem_t*sem, const struct tim ...
Posted by trev on Sun, 18 Aug 2019 16:14:31 +0200
20 Enterprise Tuning 2-Table Optimization
1. Small and large tables join
1.Definition
//Keys are relatively dispersed and tables with small amounts of data are placed on the left side of the join, which effectively reduces the chance of memory overflow errors.
//Further, you can use map ...
Posted by BigMike on Sun, 18 Aug 2019 04:24:46 +0200
[Learning Notes - Java Collection - 8] Map - Concurrent HashMap Source Code Analysis
Delete elements
Like adding elements, deleting elements first finds the bucket in which the elements are located, then uses the idea of sectional locking to lock the whole bucket, and then carries on the operation.
public V remove(Object key) {
// Call the Replacement Node Method
return replaceNode(key, null, null);
}
final V replaceN ...
Posted by JackW on Sat, 17 Aug 2019 11:12:25 +0200