mobile wallpaper 1mobile wallpaper 2mobile wallpaper 3mobile wallpaper 4
Getting Started with TypeScript
2024-11-04
428 words
TypeScript basics include the type system, interfaces, classes, decorators, and more. It supports many primitive types such as number, string, and boolean, and also provides features such as type annotations, generics, union types, and type aliases. Decorators are used to apply metadata to classes and methods, while modules and namespaces help organize code.
Cover Image of the Post
Personal Online Scam 01: Scam Analysis
2024-08-19
1045 words
This post analyzes how an online scam operated, including attracting traffic through social platforms, inducing users to pay, and exploiting human greed. Although multiple loopholes were noticed, the author still fell for the scam due to the desire for money. It emphasizes the importance of rational investing and reminds readers to stay calm when facing temptation and to evaluate investment risks and returns.
Cover Image of the Post
Sunflower: A Coming-of-Age Story from Child to Adult
2024-07-04
724 words
This story explores the process of growing from a child into an adult, emphasizing the longing for the future and the importance of cherishing precious things. The characters influence each other while facing fragility and the challenges of growth, involving themes such as viruses, inherited memories, and intertwined human destinies. In the end, the characters seek hope and redemption amid complex emotions and fate.
Cover Image of the Post
Java IO
2024-02-05
3631 words
Java IO covers the basic concepts of input and output streams, including the classification of byte streams and character streams and their common classes such as InputStream, OutputStream, Reader, and Writer. Byte streams are used for raw byte data, while character streams are used for character data. Buffered streams improve performance by reducing the number of IO operations. Adapter and decorator patterns are widely used in Java IO streams to enhance functionality and coordinate different interfaces. Java IO models include synchronous blocking IO, non-blocking IO, and asynchronous IO, each suited to different scenarios.
Cover Image of the Post
Java NIO
2024-02-05
1705 words
NIO (New I/O) is the non-blocking I/O model introduced in Java 1.4 to solve performance bottlenecks of traditional BIO. Its core components include Buffer, Channel, and Selector, allowing a small number of threads to handle multiple connections. NIO also supports zero-copy techniques to improve I/O efficiency, and NIO-based frameworks such as Netty are recommended to simplify network programming.
Cover Image of the Post
Java Atomic Classes and Common Concurrent Containers
2024-02-04
698 words
This article introduces Java atomic classes and common concurrent containers, including atomic classes for primitive types (such as AtomicInteger, AtomicLong, and AtomicBoolean), atomic array classes, atomic reference classes, and atomic field updater classes. It also explains the features and usage scenarios of concurrent containers such as ConcurrentHashMap, CopyOnWriteArrayList, ConcurrentLinkedQueue, BlockingQueue, and ConcurrentSkipListMap.
Cover Image of the Post
Java threadLocal
2024-02-04
2227 words
ThreadLocal provides thread-local variables, allowing each thread to have an independent copy and avoid interference with other threads. Key points include the data structure of ThreadLocalMap, the hash algorithm, conflict resolution, cleanup of expired keys, and the implementation principles of the set and get methods. InheritableThreadLocal can share parent thread local variables with child threads to solve data propagation in asynchronous scenarios. In practice, ThreadLocal can be used for logging and traceId propagation in distributed systems.
Cover Image of the Post
Java AQS
2024-02-03
2275 words
AQS (AbstractQueuedSynchronizer) is an abstract class in Java mainly used to build locks and synchronizers. Its core principle relies on a CLH-style queue to implement thread blocking, waiting, and wake-up mechanisms. AQS supports both exclusive and shared resource access modes. Common synchronization utilities include Semaphore and CountDownLatch, which are used to control the number of threads accessing resources and to wait for multiple threads to finish tasks. CyclicBarrier allows a group of threads to block at a synchronization point until the last thread arrives.
Cover Image of the Post

Table of Contents