Singleton Pattern
1. Concept
Wikipedia:
In software engineering, the singleton pattern is a software design pattern that restricts the instantiation of a class to one object.
Cython, CPython and Jython
Recently, I was confused with Cython and Cpython. In this blog, I will talk about Cython, CPython, Jython, and compare them with Java, C/C++ and related concepts.
Bit Maniputation Summary
1. Concept
Wikipedia:
Bit manipulation is the act of algorithmically manipulating bits or other pieces of data shorter than a word. Computer programming tasks that require bit manipulation include low-level device control, error detection and correction algorithms, data compression, encryption algorithms, and optimization. For most other tasks, modern programming languages allow the programmer to work directly with abstractions instead of bits that represent those abstractions. Source code that does bit manipulation makes use of the bitwise operations: AND, OR, XOR, NOT, and bit shifts.
Inversion of Control and Dependency Injection In Spring
Recently, I am developing Java API in Spring Boot Framework and learning this framework. I found a new feature from Spring Framework 4.3 that if a bean has only one constructor, @Autowired can be omitted. Then I planned to write a blog about Inversion of Control (IoC) and Dependency Injection (DI) in Spring. This article will only introduce basic definition of IoC and DI and how to use it, and I will write another blog to talk about the theory and implement of DI later. If you are just interested in the new feature, please jump to the last part.
快慢指针应用与证明
Fast Pointer and Slow Pointer
1. Concept
Quora:
Slow pointer and fast pointer are simply the names given to two pointer variables. The only difference is that, slow pointer travels the linked list one node at a time where as a fast pointer travels the linked list two nodes at a time.