Tag

Code Example

0 views collected around this technical thread.

Architect's Guide
Architect's Guide
Jun 7, 2025 · Backend Development

How to Build a Flexible Java Rule Engine with AND/OR Logic

This article walks through designing and implementing a Java rule engine that supports both AND and OR logical relationships, showing the core rule abstractions, concrete rule examples, the builder pattern for composing rules, and a discussion of its advantages and drawbacks.

Code ExampleJavabackend
0 likes · 8 min read
How to Build a Flexible Java Rule Engine with AND/OR Logic
php中文网 Courses
php中文网 Courses
May 29, 2025 · Backend Development

Using PHP’s array_flip() Function to Swap Keys and Values

This article explains PHP’s array_flip() function, detailing its syntax, behavior with duplicate values, and practical usage through examples that demonstrate swapping array keys and values, locating keys by value, and improving code efficiency in backend development.

Code ExamplePHParray_flip
0 likes · 6 min read
Using PHP’s array_flip() Function to Swap Keys and Values
php中文网 Courses
php中文网 Courses
May 26, 2025 · Backend Development

Using PHP file() Function to Read Files into an Array

This article explains how the PHP file() function reads a file’s contents into an array, describes its parameters, demonstrates basic usage and advanced options such as ignoring newline characters, and provides complete code examples for practical implementation.

Code ExamplePHParray
0 likes · 5 min read
Using PHP file() Function to Read Files into an Array
JD Tech Talk
JD Tech Talk
May 21, 2025 · Fundamentals

Aho-Corasick Automaton: Efficient Multi‑Pattern Text Search and Real‑Time Highlighting

This article explains the Aho‑Corasick automaton, a classic multi‑pattern matching algorithm that builds a Trie with fail pointers to achieve linear‑time search over massive keyword sets, and demonstrates a Java implementation for highlighting keywords in HTML documents.

Aho-CorasickCode ExampleJava
0 likes · 10 min read
Aho-Corasick Automaton: Efficient Multi‑Pattern Text Search and Real‑Time Highlighting
php中文网 Courses
php中文网 Courses
May 19, 2025 · Backend Development

Understanding and Using PHP’s dirname() Function

This article explains PHP’s built‑in dirname() function, detailing its purpose, syntax, parameters, return values, and provides multiple code examples demonstrating how to extract directory paths from absolute, relative, and Windows file paths, including handling of edge cases.

Code ExamplePHPbackend development
0 likes · 5 min read
Understanding and Using PHP’s dirname() Function
php中文网 Courses
php中文网 Courses
May 7, 2025 · Backend Development

Understanding PHP’s array_udiff() Function: Syntax, Parameters, and Example Usage

This article explains PHP’s array_udiff() function, detailing its purpose of comparing arrays, the required parameters and callback, provides the function syntax, discusses performance considerations, and demonstrates a practical example that highlights how to retrieve differing elements between two arrays.

Array ComparisonCode ExamplePHP
0 likes · 4 min read
Understanding PHP’s array_udiff() Function: Syntax, Parameters, and Example Usage
Top Architect
Top Architect
Apr 26, 2025 · Backend Development

Understanding Java 8 Stream API with Practical PO Examples

This article introduces Java 8 Stream API, explains its core operations such as filter, map, sorted, forEach, collect, statistics, and parallelStream, and demonstrates their usage with a UserPo class through comprehensive code examples, while also noting unrelated promotional offers.

Code ExampleFunctional ProgrammingJava
0 likes · 11 min read
Understanding Java 8 Stream API with Practical PO Examples
php中文网 Courses
php中文网 Courses
Apr 23, 2025 · Backend Development

Using PHP's array_replace_recursive() Function to Recursively Merge Arrays

This article explains PHP's array_replace_recursive() function, detailing its syntax, recursive merging behavior, example code, output interpretation, and important usage notes, while comparing it with array_merge_recursive for handling array key conflicts in PHP development.

Code ExamplePHParray_replace_recursive
0 likes · 4 min read
Using PHP's array_replace_recursive() Function to Recursively Merge Arrays
Java Captain
Java Captain
Apr 23, 2025 · Fundamentals

Understanding Recursion in Java: Concepts, Pros/Cons, and Practical Examples

This article explains the fundamentals of recursion in Java, covering its definition, advantages and disadvantages, differences from iteration, and provides practical examples such as traversing comment and department trees, along with code snippets, performance considerations, and improvement strategies using depth control and Stream API.

Code ExampleJavaTree Traversal
0 likes · 7 min read
Understanding Recursion in Java: Concepts, Pros/Cons, and Practical Examples
php中文网 Courses
php中文网 Courses
Apr 18, 2025 · Backend Development

Using PHP's is_callable() Function to Verify Callability of Functions and Methods

This article explains PHP's is_callable() function, shows how it checks whether functions or methods are callable with one or two arguments, and provides clear code examples demonstrating its use with a simple function and a class method to improve code robustness.

Code ExamplePHPbackend
0 likes · 4 min read
Using PHP's is_callable() Function to Verify Callability of Functions and Methods
IT Services Circle
IT Services Circle
Apr 12, 2025 · Fundamentals

MoonBit Language: Ten Key Features

MoonBit is an AI‑native, general‑purpose programming language that blends Rust and Scala concepts, offering garbage collection, WebAssembly compilation, rich type system, pattern matching, traits, operator overloading, testing support, and functional programming features, illustrated through a chess‑board modeling example.

Code ExampleFunctional ProgrammingMoonBit
0 likes · 18 min read
MoonBit Language: Ten Key Features
php中文网 Courses
php中文网 Courses
Apr 10, 2025 · Backend Development

How to Use PHP's ceil() Function to Round Numbers Up

This article explains PHP's ceil() function, shows its syntax, and provides three code examples demonstrating how to round floating‑point numbers and integers upward, including the resulting outputs and a brief discussion of each case.

Code ExamplePHPbackend development
0 likes · 4 min read
How to Use PHP's ceil() Function to Round Numbers Up
php中文网 Courses
php中文网 Courses
Apr 9, 2025 · Backend Development

Using PHP's array_filter() Function to Filter Arrays

This article explains how PHP's array_filter() function works, details its parameters, and provides clear code examples for filtering even numbers and removing empty values from associative arrays, helping developers apply flexible array filtering in real-world backend projects.

Code ExamplePHParray filtering
0 likes · 4 min read
Using PHP's array_filter() Function to Filter Arrays
php中文网 Courses
php中文网 Courses
Apr 8, 2025 · Backend Development

Using PHP is_numeric() to Determine if a Variable Is Numeric

This article explains the PHP is_numeric() function, shows how it checks whether a variable (including integers, floats, or numeric strings) is numeric, provides code examples for direct usage and form validation, and notes special cases to watch out for.

Code ExamplePHPbackend development
0 likes · 4 min read
Using PHP is_numeric() to Determine if a Variable Is Numeric
Architect's Guide
Architect's Guide
Mar 30, 2025 · Backend Development

Design and Implementation of a Unified Log Recording Framework for Java Backend Systems

This article introduces a unified log recording solution for Java backend services, covering the background need, expected UI effects, database schema, core principles, detailed annotation and service implementations, and multiple usage scenarios including simple log objects, inheritance, and nested objects.

AnnotationsCode ExampleJava
0 likes · 11 min read
Design and Implementation of a Unified Log Recording Framework for Java Backend Systems
php中文网 Courses
php中文网 Courses
Mar 27, 2025 · Backend Development

Using PHP's is_bool() Function to Check Boolean Variables

This article explains how the PHP is_bool() function determines whether a variable holds a boolean value, provides a complete code example with four different variables, shows the resulting output, and discusses why only true and false are recognized as booleans.

Code ExamplePHPbackend development
0 likes · 4 min read
Using PHP's is_bool() Function to Check Boolean Variables
Python Programming Learning Circle
Python Programming Learning Circle
Mar 24, 2025 · Fundamentals

Python File Operations: Opening, Reading, Writing, and Appending Files

This guide explains Python file I/O fundamentals, covering encoding, opening files with different modes, reading methods (read, readline, readlines), writing and flushing data, automatic closing with context managers, and practical examples such as word counting, all illustrated with clear code snippets.

Code ExampleFile IOPython
0 likes · 7 min read
Python File Operations: Opening, Reading, Writing, and Appending Files
php中文网 Courses
php中文网 Courses
Mar 24, 2025 · Backend Development

Understanding PHP dirname() Function with Practical Examples

This article explains the purpose, syntax, parameters, and return value of PHP's dirname() function and demonstrates its usage through four detailed code examples covering absolute, relative, and Windows paths as well as edge cases.

Code ExamplePHPbackend development
0 likes · 4 min read
Understanding PHP dirname() Function with Practical Examples
Python Programming Learning Circle
Python Programming Learning Circle
Mar 19, 2025 · Fundamentals

Understanding Python Magic Methods: A Comprehensive Guide

This article explains Python's magic (dunder) methods, detailing their purpose, common special methods for initialization, comparison, arithmetic, container protocols, and other operations, and provides a practical code example to illustrate how they enable custom class behavior.

Code ExampleDunderMagic Methods
0 likes · 6 min read
Understanding Python Magic Methods: A Comprehensive Guide
Laravel Tech Community
Laravel Tech Community
Mar 18, 2025 · Backend Development

Using devkeep/tools PHP Package: Installation, Utility Functions, and Example Usage

This article introduces the devkeep/tools PHP package, explains how to install it, lists its extensive utility functions for data handling, and provides concrete code examples demonstrating tasks such as array sorting, tree classification, Excel export, QR code generation, and email sending.

Code ExamplePHPdevkeep
0 likes · 4 min read
Using devkeep/tools PHP Package: Installation, Utility Functions, and Example Usage