E chat SDK introduction: compiling instant messaging backend projects from source

2. Introduction to mobile rear end: E chat SDK provides a basic back-end community version source code. By compiling / modifying the back-end source code, you can achieve deeper business customization, such as file upload / download, online / offline monitoring, API permission function, cluster function, etc. The backend project uses springboot ...

Posted by aaadee on Sun, 07 Jun 2020 02:25:40 -0700

Don't know how to improve code quality?Take a look at these design patterns!

Purpose of improving code quality Programming apes do their job of writing code. Writing high-quality code should be our pursuit and our own requirement because: High quality code often means fewer BUG s, better modularity, and is the basis for our scalability and reusability High quality code also means better writing, better naming, ...

Posted by kcorless on Fri, 05 Jun 2020 17:20:40 -0700

Learning notes and development of JUC

Learning notes and development of JUC Java JUC 1 Introduction to Java JUC 2 volatile keyword - memory visibility 2.1 memory visibility 2.2 volatile keyword 3 atomic variables and CAS algorithm 3.1 atomic variables 3.1.1 atomicity of I + + 3.1.2 atomic variables 3.2 CAS algorithm 3.2.1 ABA prob ...

Posted by dstockto on Fri, 05 Jun 2020 01:12:09 -0700

Secret Context Switching

What is context switching? In fact, at the time of a single processor, the operating system can handle multithreaded concurrent tasks.The processor allocates a CPU Time Slice to each thread, and the thread executes the task within the Time Slice allocated. A CPU time slice is a period of time, typically tens of milliseconds, that the CPU alloc ...

Posted by slough on Thu, 04 Jun 2020 10:52:49 -0700

Analysis of SOEM source code of EtherCAT master station -- SM configuration of synchronization manager

This article describes how SOEM(Simple Open Source Master) configures the SM(SyncManager) register of the slave. Based on SOEM-1.3.1. 1. SM register SM configuration register starts from 0x800, and each channel uses 8 bytes, as shown in the following figure: The physical start address and control ...

Posted by shseraj on Thu, 04 Jun 2020 10:22:10 -0700

Reduce the use of if

Recently, a batch of code has been maintained, including the use of a pile of if... With 8 or 9 layers of nesting in many cases, which is extremely painful. Therefore, search for some ways to reduce if...else to improve the code and write a simple summary.     The first: Before optimization if (measuredValue > 8) return 5 * measuredVal ...

Posted by realtek on Thu, 04 Jun 2020 08:38:47 -0700

Data structure KMP algorithm -- C language implementation

To implement KMP algorithm, the first thing to solve is the next array. The essence of KMP algorithm lies in this point. However, Yan Weimin's data structure is not easy to understand at this point. Here is a video from station B. you can understand the working principle of KMP algorithm and the method ...

Posted by ca87 on Thu, 04 Jun 2020 07:42:29 -0700

JAVA concurrency's ThreadLocal source code details, 80% of people will not

summary 1. In concurrent programming, in order to control the correctness of data, we often need to use locks to ensure the execution isolation of code blocks. But in many cases, the cost of locking is too large. In some cases, our local variables are thread private, and each thread will have its own variable / quantity. At this time, we can ...

Posted by no_maam on Thu, 04 Jun 2020 07:09:00 -0700

Data structure: analyzing the read-write performance of ArrayList and LinkedList with examples

catalog background ArrayList LinkedList Case study 1. Add data 2. Insert data 3. Traversal data3.1. LinkedList traversal improvement summary background ArrayList and LinkedList are two basic data structures that are often used in Java programming. The following two features are generally explained in books: For elements that require ...

Posted by will on Wed, 03 Jun 2020 21:46:19 -0700

LinkedList source code - not commonly used methods

Here is a record of the methods that are not often used in LinkedList. Many of them are new in later versions. Learn more about the design ideas and usage of the implementation. 1. List to array /** * Returns an array containing all the elements in this list in the correct order, from the first element to the last. * The returned ar ...

Posted by teamfox20 on Wed, 03 Jun 2020 08:10:25 -0700