A Fast 8-Level Alpha Hybrid Algorithms: Optimized boundaries are limited to your knowledge, like learning

When I thought my program was good enough, a doctor randomly wrote an 8-level ALPHA hybrid algorithm to hit the face. After many years, the sound is endless.Although there are only 8 levels, it is many times faster than any level I write in fixed points. From this example, we can see the power of the algorithm and how important mathematics is. ...

Posted on Fri, 11 Oct 2019 07:31:52 -0700 by jocknerd

Write a simple TCP Server using libuv

libuv handles multiple IO events using event-based asynchronous callbacks So you can monitor a large number of files (socket and other file types) with a single thread.This callback-based programming style has poor readability of the code. Here's a review of the process. Three steps to create a TCP server: creating a TCP socket, binding IP&amp ...

Posted on Mon, 07 Oct 2019 23:58:45 -0700 by VinnyWolf

Learning Insert Sorting

Simple understanding, insertion sort, is that the original queue constantly lists a value, and has been listed all the values of a comparison, find their own position for queue insertion. The following is the insertion sort learned and their own comments on some of the code; in addition, on this basis, the queue insertion code is made into a f ...

Posted on Mon, 07 Oct 2019 08:05:14 -0700 by gillypogi

Matrix Continuous Multiplication Solution Optimization

Preface from Xudong's blog See a blog post: Solution of Matrix Continuous Multiplication Optimal Combination Dynamic Programming It's interesting. Here's a reprint. problem Matrix multiplication satisfies the law of association, but not the law of commutation. For example, matrix $A_{ab}, B_{bc}, C_{cd}$are multiplied to get matrix $S_{ac}.$ ...

Posted on Sun, 06 Oct 2019 20:34:29 -0700 by Thresher

Single Process Control of Linux C Background Service Program

introduce Usually background server programs must have and only have one process, so how to single process? This example locks the pid file of / var/run/myserver.pid record through the flock function If the lock is not normal, it means that the background service process is already running, then it will exit directly by error. If the lock is s ...

Posted on Fri, 04 Oct 2019 13:00:30 -0700 by Justin98TransAm

LeetCode380 Constant Time Insert, Delete and Get Random Elements

Subject requirements Design a data structure to support the following operations under the average time complexity O(1). insert(val): When the element Val does not exist, insert the item into the collection. remove(val): When the element val exists, remove the item from the collection. getRandom: Randomly returns an item in an existing collect ...

Posted on Mon, 30 Sep 2019 14:21:49 -0700 by tripleM

operators overloading

Catalog 1. Array operator overloading Array operator overloading Improvement of Array Class IntArray 2. Function operator overloading (function object) 3. Pointer Operator Overload and Intelligent Pointer Pointer operator overloading Intelligent pointer 4. Pre-and ...

Posted on Mon, 23 Sep 2019 08:46:26 -0700 by yuan

handy Network Library Source Reading

Simple and easy to use C++11 network library, From: https://github.com/yedf/handy In the course of sorting out the past data, we found that we have paid attention to this network library in the past, and looked at the lightweight implementation briefly. Therefore, this paper will make a simple learning trip to the library, with the goal of furt ...

Posted on Fri, 20 Sep 2019 07:55:20 -0700 by AnarKy

operators overloading

Catalog 1. The concept of operator overloading Essence of operator overloading Operator overloading rules Implementation of Operator Overloading 2. Implementation of Complex Class Operator overloading Compare operator overload Assignment operator overloading Complex ...

Posted on Thu, 19 Sep 2019 07:42:12 -0700 by elfynmcb

The troubleshooting and solution of MSVCR100.dll, MSVCR100d.dll, Msvcp100.dll, abort()R6010 and other fault modules

Introduction of Common Faults Recently, in the development of camera project (project details are not introduced due to company confidentiality), the first malfunction of msvcr100.dll appeared in the program running for five months, so the analysis began. According to Duniang's one operation, different problems appeared during the period. Now, ...

Posted on Thu, 19 Sep 2019 02:48:10 -0700 by arnoldd99