Tag

code examples

1 views collected around this technical thread.

Code Mala Tang
Code Mala Tang
Jun 10, 2025 · Frontend Development

7 Powerful Ways to Compare JavaScript Arrays (Including Deep Equality)

This guide explains eight practical techniques—from strict reference checks to deep recursive comparisons and Lodash utilities—for accurately comparing JavaScript arrays, handling simple values, nested structures, unordered elements, and finding differences or common items.

Array ComparisonDeep EqualityJavaScript
0 likes · 7 min read
7 Powerful Ways to Compare JavaScript Arrays (Including Deep Equality)
php中文网 Courses
php中文网 Courses
Jun 10, 2025 · Backend Development

Master PHP’s is_resource(): Detect Resource Types with Real Code Examples

This article explains how PHP's is_resource() function checks whether a variable represents an external resource such as a file handle, database connection, or image, and provides clear code samples demonstrating its practical use in each scenario.

PHPbackend developmentcode examples
0 likes · 4 min read
Master PHP’s is_resource(): Detect Resource Types with Real Code Examples
Test Development Learning Exchange
Test Development Learning Exchange
Jun 9, 2025 · Fundamentals

Master Python Control Flow: If/Else, For, While & Practical Tips

This article introduces Python control flow, explaining conditional statements (if, elif, else) and loop constructs (for, while) with clear syntax, practical examples, tips, and exercises to help readers master decision‑making and iteration in their programs.

Pythoncode examplescontrol flow
0 likes · 7 min read
Master Python Control Flow: If/Else, For, While & Practical Tips
Test Development Learning Exchange
Test Development Learning Exchange
Jun 6, 2025 · Fundamentals

Unlock Python’s Power: 8 Essential functools Tools You Must Know

Explore the Python functools module’s most useful utilities—including reduce, partial, lru_cache, wraps, total_ordering, cmp_to_key, singledispatch, and cache—through clear explanations and practical code examples that demonstrate how each tool can simplify functional programming and improve code efficiency.

CachingFunctional ProgrammingPython
0 likes · 6 min read
Unlock Python’s Power: 8 Essential functools Tools You Must Know
php中文网 Courses
php中文网 Courses
Jun 6, 2025 · Backend Development

Master PHP’s str_split(): Split Strings into Characters Easily

Learn how to use PHP’s str_split() function to divide strings into individual characters or custom-sized chunks, with clear syntax explanations, practical examples—including splitting “Hello World” and generating numeric codes—plus tips for handling default and optional parameters.

PHPbackendcode examples
0 likes · 4 min read
Master PHP’s str_split(): Split Strings into Characters Easily
php中文网 Courses
php中文网 Courses
May 30, 2025 · Backend Development

Understanding PHP’s array_fill() Function: Syntax, Parameters, Return Values, and Examples

This article explains PHP’s array_fill() function, detailing its purpose, parameters (start_index, num, value), return behavior, and provides multiple code examples—including simple one-dimensional and nested two-dimensional array fills—to illustrate how to create and populate arrays efficiently.

FunctionsPHParray_fill
0 likes · 5 min read
Understanding PHP’s array_fill() Function: Syntax, Parameters, Return Values, and Examples
macrozheng
macrozheng
May 23, 2025 · Backend Development

Boost Java Productivity: 17 Essential Utility Classes Every Backend Developer Should Know

This article introduces 17 practical Java utility classes—including Collections, CollectionUtils, Lists, Objects, BooleanUtils, StringUtils, Assert, IOUtils, MDC, ClassUtils, BeanUtils, ReflectionUtils, Base64Utils, StandardCharsets, DigestUtils, SerializationUtils, and HttpStatus—showing how to use them with clear code examples to streamline everyday development tasks.

JavaSpringbackend
0 likes · 30 min read
Boost Java Productivity: 17 Essential Utility Classes Every Backend Developer Should Know
php中文网 Courses
php中文网 Courses
May 22, 2025 · Backend Development

Using PHP is_int() Function to Check Integer Variables

This article explains the PHP is_int() function, its syntax, return values, and provides two practical code examples demonstrating how to determine whether variables are integers, helping developers handle different data types correctly.

PHPbackend developmentcode examples
0 likes · 4 min read
Using PHP is_int() Function to Check Integer Variables
Test Development Learning Exchange
Test Development Learning Exchange
May 17, 2025 · Fundamentals

Understanding Python Generator Functions: Syntax, Usage, and Practical Examples

Python generator functions, using the yield keyword, enable lazy evaluation and memory-efficient data processing, with examples covering basic syntax, differences from regular functions, Fibonacci sequence generation, large file reading, two-way communication via send(), and control methods like throw() and close(), highlighting their advantages.

GeneratorIteratorsMemory Efficiency
0 likes · 4 min read
Understanding Python Generator Functions: Syntax, Usage, and Practical Examples
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
May 16, 2025 · Backend Development

Explore 8 Ways to Define Web Interfaces in Spring Boot 3 – Practical Code Samples

This article presents a comprehensive collection of 124 Spring Boot 3 practical cases, detailing eight distinct methods for defining web interfaces—including @Controller, @RestController, HttpRequestHandler, ServletRegistrationBean, HandlerFunction, @HttpExchange, and static resource registration—complete with code snippets, configuration steps, and usage explanations.

JavaSpring BootWeb Interface
0 likes · 11 min read
Explore 8 Ways to Define Web Interfaces in Spring Boot 3 – Practical Code Samples
php中文网 Courses
php中文网 Courses
May 7, 2025 · Backend Development

Using PHP's array_sum() Function to Sum Array Elements

This article explains the built‑in PHP array_sum() function, demonstrates how to use it with both indexed and associative arrays, shows how to combine it with other functions like array_map() for more complex calculations, and highlights its performance and coding advantages.

FunctionsPHParray_sum
0 likes · 5 min read
Using PHP's array_sum() Function to Sum Array Elements
Python Programming Learning Circle
Python Programming Learning Circle
Apr 24, 2025 · Fundamentals

50 Essential Python Built-in Functions and Their Usage

This article introduces fifty essential Python built-in functions, covering type conversion, numeric operations, sequence handling, I/O, string manipulation, and utility functions, each with concise explanations and code examples to help readers quickly understand and apply these fundamental tools in their programs.

Data TypesProgramming BasicsPython
0 likes · 9 min read
50 Essential Python Built-in Functions and Their Usage
php中文网 Courses
php中文网 Courses
Apr 24, 2025 · Backend Development

Using PHP explode() to Split Strings: Syntax, Parameters, and Practical Examples

This article explains PHP's explode() function, detailing its syntax, parameters, and return value, and provides three practical code examples that demonstrate splitting strings by spaces, commas with a limit, and empty strings to obtain character arrays.

PHPbackend developmentcode examples
0 likes · 4 min read
Using PHP explode() to Split Strings: Syntax, Parameters, and Practical Examples
Raymond Ops
Raymond Ops
Apr 22, 2025 · Fundamentals

Master Python’s sort vs sorted: When and How to Use Each Efficiently

This article explains the differences between Python's list.sort method and the built‑in sorted function, covering their syntax, parameters, performance nuances, and practical code examples for ascending, descending, and custom key sorting.

Pythoncode exampleslist.sort
0 likes · 6 min read
Master Python’s sort vs sorted: When and How to Use Each Efficiently
php中文网 Courses
php中文网 Courses
Apr 22, 2025 · Backend Development

Using PHP array_filter to Filter Arrays with Practical Examples

This article explains how to use PHP's built-in array_filter function to filter array elements based on custom conditions, detailing its syntax, parameters, and providing three practical code examples that demonstrate filtering odd numbers, strings longer than five characters, and using class method callbacks.

PHParray_filterbackend
0 likes · 4 min read
Using PHP array_filter to Filter Arrays with Practical Examples
Test Development Learning Exchange
Test Development Learning Exchange
Apr 16, 2025 · Fundamentals

Overview of Useful Python Standard Library Modules with Example Code

This article introduces several essential Python standard library modules—including cmd, getpass, glob, pickle, shelve, codecs, functools, inspect, weakref, and xml.etree.ElementTree—providing brief descriptions and ready‑to‑run code examples that demonstrate their core functionalities.

CMDPicklecode examples
0 likes · 4 min read
Overview of Useful Python Standard Library Modules with Example Code
Python Programming Learning Circle
Python Programming Learning Circle
Apr 16, 2025 · Fundamentals

50 Practical Python Code Snippets for File Operations, Data Processing, Web Requests, Date/Time Handling, and Utilities

This article presents fifty ready‑to‑use Python examples covering file and directory manipulation, data processing, network requests, date‑time utilities, and assorted handy tools, each accompanied by clear explanations and complete code snippets to help developers quickly apply common programming tasks.

Data ProcessingDateTimePython
0 likes · 31 min read
50 Practical Python Code Snippets for File Operations, Data Processing, Web Requests, Date/Time Handling, and Utilities
php中文网 Courses
php中文网 Courses
Apr 15, 2025 · Fundamentals

Top 20 Most Common Python Standard Library Modules

This article introduces the twenty most frequently used Python standard library modules, such as os, sys, math, random, datetime, json, re, collections, itertools, argparse, and others, explaining their core functionalities and providing concise code examples to help developers efficiently manage files, data, networking, and more.

ModulesPythoncode examples
0 likes · 8 min read
Top 20 Most Common Python Standard Library Modules
php中文网 Courses
php中文网 Courses
Apr 8, 2025 · Fundamentals

Understanding Python Closures and Decorators

This article explains Python closures and decorators, detailing their definitions, formation conditions, practical examples, common use cases, and how decorators rely on closures, while providing code snippets for counters, timing, and repeatable execution.

Function WrappingHigher-order FunctionsPython
0 likes · 14 min read
Understanding Python Closures and Decorators
Code Mala Tang
Code Mala Tang
Apr 7, 2025 · Fundamentals

Master Python’s Unpacking Operators: * and ** for Lists, Dictionaries, and Functions

This guide explores Python’s unpacking operators * and **, showing how they simplify printing, assigning, merging lists and dictionaries, handling variable function arguments, creating dynamic logging functions, and performing nested unpacking, while also offering practical tips to avoid common pitfalls.

Pythoncode examplesdictionary-merge
0 likes · 10 min read
Master Python’s Unpacking Operators: * and ** for Lists, Dictionaries, and Functions