Tagged articles
bitwise-operations
18 articles · Page 1 of 1
This article demonstrates how to store four independent notification channel switches (SMS, email, in-app, WeChat) in a single MySQL TINYINT column using bitwise operations, covering schema design, SQL queries, Java enum and utility classes, service and controller layers, MyBatis mapper, extensibility to N channels, and key considerations like indexing, concurrency, and readability.
JavaMyBatisMySQL
0 likes · 14 min read

This tutorial explains Redis bitmap fundamentals, showcases common BITSET, BITGET, and BITCOUNT commands, and provides a complete PHP example that records daily user sign‑ins and accurately counts them using Redis bit operations.
BitmapPHPbitwise-operations
0 likes · 5 min read

Learn how to use PHP's fileperms() function to obtain file permission data, interpret the returned integer with bitwise operations, and format it into a readable string using a helper function, complete with practical code examples and detailed explanations.
PHPbitwise-operationsfile permissions
0 likes · 5 min read

This guide explains how to use PHP's fileperms() function to obtain a file's permission bits, interprets the returned integer with bitwise operations, and provides a helper format_perms() routine that converts the raw value into the familiar symbolic permission string such as -rw-r--r--.
Backendbitwise-operationsfile permissions
0 likes · 4 min read

Redis bitmap commands enable efficient bit‑level storage and fast counting, and this article explains the core concepts, key commands like BITSET, BITGET, BITCOUNT, and provides a complete PHP example that tracks user sign‑ins and calculates daily totals using Predis.
BitmapPHPPredis
0 likes · 5 min read

This tutorial explains how to exchange the values of two Java variables without using a temporary variable, covering three techniques—arithmetic addition/subtraction, multiplication/division, and bitwise XOR—along with complete code examples, step‑by‑step explanations, output results, and discussion of each method’s advantages, limitations, and appropriate use cases.
ArithmeticJavaProgramming Tutorial
0 likes · 7 min read

This article explains Redis bitmap data structures, introduces the main bitmap commands (BITSET, BITGET, BITCOUNT), and provides a complete PHP example that demonstrates how to record user sign‑ins and count them efficiently using Redis bit operations.
BitmapNoSQLPHP
0 likes · 5 min read

This guide explains core C programming concepts—including bitwise operators, macro definitions, conditional compilation directives, extern declarations, typedef aliases, struct usage, and the static keyword—providing clear examples and code snippets to help developers write more efficient and maintainable code.
C++Conditional CompilationMacros
0 likes · 10 min read

This article explains Redis bitmap data structures, introduces common bitmap commands such as BITSET, BITGET, and BITCOUNT, and provides a complete PHP example that records user sign‑ins and calculates daily sign‑in counts using Redis bit operations.
BitmapPHPbitwise-operations
0 likes · 5 min read

This article introduces the fundamentals of bitwise operations, explains common operators, presents practical tricks such as parity checks, swapping without extra space, clearing and extracting the lowest set bit, and demonstrates real‑world applications like bit counting and permission management with clear C code examples.
Permission Managementbitwise-operationsc-programming
0 likes · 6 min read

This article explores how counters, especially 24‑bit timestamps, are employed in Redis’s LRU eviction algorithm and other memory‑constrained scenarios, detailing implementation tricks, precision trade‑offs, and practical code examples for efficient cyclic counters and compact storage techniques.
CountersLRUbitwise-operations
0 likes · 12 min read

This article traces the history of database development from early file systems to relational models, outlines major database categories such as hierarchical, relational, NoSQL, NewSQL, and columnar stores, and explores practical data structure designs like chain tables, bitwise operations, and circular queues for modern software engineering.
NewSQLNoSQLbitwise-operations
0 likes · 28 min read

The article explains V8 hidden classes and inline caches for faster property access, details Java’s logical versus bitwise operators and short‑circuit evaluation, and demonstrates Go’s first‑class function types such as type func() for flexible, reusable code patterns.
GoJavaJavaScript
0 likes · 16 min read

This article explains the 12306 train ticket reservation algorithm, showing how bitmaps combined with bitwise OR operations can model seat availability across multiple stations, using a simplified example of four seats and three segments to illustrate ticket allocation, conflict detection, and remaining‑ticket calculation.
12306Bitmapbitwise-operations
0 likes · 5 min read

This article explains how to use Redis Bitmap for binary state statistics such as user login status and daily sign‑in tracking, comparing memory usage with String types, and demonstrates practical commands like SETBIT, GETBIT, BITCOUNT, BITPOS, and BITOP for massive user datasets.
Binary Statebitwise-operationsdata-structures
0 likes · 10 min read

This article introduces the fundamentals of bitwise operations, explains each operator with clear rules and examples, demonstrates practical tricks such as parity checks and value swapping, and walks through classic interview problems—including addition without arithmetic, counting set bits, and finding unique numbers—complete with Java code snippets and visual illustrations.
AlgorithmInterviewbinary
0 likes · 15 min read

This article explains the purpose and practical benefits of bitwise operations in Java, describes signed number representations (sign‑magnitude, ones' complement, two's complement), shows how bits can optimize time and space, and details the seven common bitwise operators with examples and a reference table.
Javaalgorithm fundamentalsbinary representation
0 likes · 13 min read

This article walks through the reverse‑engineering of a compact JavaScript one‑liner that draws a patterned image, refactors it into readable modules, explains each transformation—including variable renaming, loop conversion, ternary expansion, bitwise operations, and switch‑case replacement—while illustrating the underlying math with graphs and code snippets.
Frontend DevelopmentHTMLJavaScript
0 likes · 18 min read
