Tagged articles
example
64 articles · Page 1 of 1
This guide explains how to use PHP’s built‑in SOAP extension to create a SOAP client, call web‑service methods with simple or complex parameters, handle responses and exceptions, and add authentication headers, providing complete code examples for each step.
AuthenticationPHPSOAP
0 likes · 6 min read

This article explains the six Java thread states defined in java.lang.Thread.State, describes the meaning of each state, illustrates the possible state transitions, and provides three runnable code examples that demonstrate NEW, RUNNABLE, BLOCKED, WAITING, TIMED_WAITING and TERMINATED states along with their console outputs.
ConcurrencyJavaThread
0 likes · 11 min read

The article explains how Python’s join() method provides O(n) performance for concatenating strings, unlike the ‘+’ operator which creates a new string each time, and demonstrates its usage with lists, tuples, characters, numbers, dictionaries, and custom separators.
PythonStringconcatenation
0 likes · 7 min read

This article introduces Python's set data structure, explains its unordered, unique, and mutable characteristics, demonstrates how to create sets, and provides eleven practical code examples covering basic definitions, element addition and removal, set operations like union, intersection, difference, subset checks, deduplication, iteration, and conditional filtering.
Pythondata structuresexample
0 likes · 7 min read

This article introduces Python tuples, explaining their immutable ordered nature, core characteristics, and provides eleven practical code examples ranging from basic definition and indexing to unpacking, concatenation, using tuples as dictionary keys, and converting them to lists, illustrating common use cases and best practices.
Immutablecodingdata structure
0 likes · 8 min read

This article explains the fundamentals of C++20 coroutines, describing their lightweight asynchronous execution model, key language constructs such as co_await, co_yield, and co_return, the underlying components like promise objects and coroutine handles, and demonstrates real‑world usage through comprehensive code examples for networking, file I/O, generators, and task scheduling.
C++20Coroutinesco_await
0 likes · 32 min read

This article explains the purpose, internal implementation, and correct usage patterns of Go's sync.Cond concurrency primitive, walks through its source code, demonstrates simple and advanced examples—including a custom concurrent waiting queue—and provides test cases to illustrate its behavior in real-world scenarios.
ConcurrencyQueuecondition variable
0 likes · 20 min read

This guide explains how to install the webman-coroutine plugin, set up the Swow extension, configure Webman for coroutine event loops, and use utility classes such as Pool, Channel, and WaitGroup to build a dynamic Redis connection pool with example code and test results.
PHPSwowWebman
0 likes · 8 min read

This article provides a comprehensive overview of Python multithreading, covering basic concepts, the _thread and threading modules, thread creation methods, synchronization primitives like Lock and RLock, thread-local storage, thread pools, and the differences between multithreading and multiprocessing for both CPU‑bound and I/O‑bound workloads.
ConcurrencyLockMultithreading
0 likes · 24 min read

This article explains the PHP boolean true, its role in conditionals and function return values, and demonstrates common usage through examples such as simple if statements, file writing with file_put_contents, and boolean variable assignments, illustrating how true indicates successful operations.
BackendConditionalsboolean
0 likes · 3 min read

genai is a Rust library that unifies the APIs of major large language models, offering a lightweight, native solution with simple chat‑focused examples, demonstrated through a dual‑model Rust program, and outlines future expansions such as additional model support, multimodal capabilities, and performance optimizations.
APIGenAILLM
0 likes · 6 min read

This article explains the PHP curl_init() function, covering its syntax, optional URL parameter, return value, and provides a detailed example demonstrating how to initialize a cURL session, set options, execute the request, handle errors, and process the response data.
APIPHPbackend development
0 likes · 4 min read

This article explains Go's container/ring package, detailing its Ring type, core methods, performance characteristics, practical code examples, and typical use cases such as schedulers and resource pools for efficient circular data handling.
Gocircular linked listcontainer/ring
0 likes · 5 min read

This article provides an in‑depth exploration of Go’s container/list package, detailing its internal linked‑list structures, core methods, performance characteristics, practical code examples, and ideal use‑cases for scenarios requiring frequent insertions and deletions.
Gocontainer/listdata structures
0 likes · 5 min read

This article explains the PHP str_word_count() function, detailing its syntax, parameters, and multiple code examples that demonstrate counting words, retrieving word lists, obtaining word positions, customizing ignored characters, and using regular expressions for word matching.
BackendFunctionString
0 likes · 4 min read

This article explains PHP's built-in trim() function, covering its purpose, related ltrim() and rtrim() functions, syntax, parameters, default character list, return value, and provides two practical code examples along with links to further learning resources.
FunctionPHPString
0 likes · 3 min read

This article explains Java object serialization and deserialization, why implementing Serializable and defining a serialVersionUID are necessary for persistence and network transfer, and demonstrates the impact of transient and static fields with complete code examples.
Serializationdeserializationexample
0 likes · 10 min read

This article explains how to invoke other Groovy scripts and all Groovy files within a directory from a build.groovy file, providing concrete example code that demonstrates calling a Print method in hello.groovy and using it inside mytools.groovy.
DevOpsGroovybuild automation
0 likes · 2 min read


21CTOJul 20, 2022 · Backend Development
This article introduces the lightweight pure‑Python search library Whoosh, outlines its key features, demonstrates how to define a schema, build an index from a CSV of Chinese poems, and perform full‑text queries with example code, making it ideal for small search projects.
examplefull-text searchindexing
0 likes · 7 min read

This article presents a step‑by‑step Python tutorial for building a console‑based movie ticket reservation system, covering data structures for film information, seat‑booking logic, film selection, and a controller that integrates all components into a functional application.
console-appexampleticketing
0 likes · 11 min read

This article introduces Python's built-in pickle module, explains its four core functions (dumps, loads, dump, load), details their parameters and usage, and provides code examples for serializing and deserializing objects to memory and files, while noting performance limitations and alternatives such as ZODB.
PickleSerializationdata persistence
0 likes · 8 min read

This article explains the PHP imagefilledpolygon function, detailing its parameters, return values, and providing a complete example that creates an image, allocates colors, defines polygon points, draws a filled polygon, outputs the PNG, and cleans up the resources.
BackendGraphicsImage
0 likes · 3 min read

getimagesizefromstring is a PHP function that extracts an image’s width and height from raw image data supplied as a string, mirroring getimagesize but accepting string input; the article explains its parameters, return values, and provides example code comparing file‑based and string‑based usage.
Backendexamplegetimagesizefromstring
0 likes · 2 min read

The article explains PHP's dir() function, detailing its parameters, return values, and providing a complete example that demonstrates opening a directory, retrieving its handle and path, iterating over entries, and closing the directory resource.
BackendFilesystemdir
0 likes · 2 min read

The article explains PHP's cal_days_in_month function, detailing its purpose, parameters (calendar, month, year), return value, and provides a complete example showing how to retrieve and display the number of days in a specific month of a given year.
BackendDateFunction
0 likes · 2 min read

The article explains the PDO::getAttribute method, lists all PDO::ATTR_* constants that can be queried, describes its return behavior, and provides a PHP example demonstrating how to retrieve multiple connection attributes for debugging.
BackendPDOPHP
0 likes · 2 min read

This guide explains how PHP's date() function formats local timestamps into custom strings, details its optional parameters, return behavior, and provides multiple practical code examples demonstrating common format patterns and timezone handling.
DateFormattingPHP
0 likes · 3 min read

The PHP pow() function returns the base raised to the exponent, optionally yielding an integer, and its usage is illustrated with examples showing integer, zero, negative, and floating‑point exponent cases, including version‑specific behavior for PHP 4.0.6 and later.
BackendFunctionPHP
0 likes · 2 min read

The PHP pi() function returns the approximate value of the mathematical constant π as a float, with precision set by the php.ini precision directive (default 14), and can also be accessed via the predefined M_PI constant, illustrated with a simple code example.
BackendFunctionPHP
0 likes · 1 min read

The article explains PHP's mt_srand() function for seeding the Mersenne Twister random number generator, describes its optional integer seed parameter, notes that it returns no value, and provides a complete example with code and sample output.
BackendSEEDexample
0 likes · 1 min read

The PHP log10() function returns the base‑10 logarithm of a floating‑point argument, detailing its signature, parameter description, return value, and providing example code with expected output for various inputs.
BackendFunctionPHP
0 likes · 1 min read

The article explains PHP’s hypot() function, which computes the hypotenuse length of a right‑angled triangle given side lengths x and y (or the distance from the origin), details its parameters and return value, and provides sample code with expected output.
BackendFunctionMath
0 likes · 2 min read

This article explains PHP’s atan() function, detailing its signature, parameter description, return value in radians, and provides multiple code examples demonstrating how different inputs produce corresponding inverse tangent results, including positive, negative, and large magnitude numbers, along with the exact numeric outputs.
PHPatanbackend development
0 likes · 2 min read

The PHP asin() function returns the arcsine of a given float argument in radians, with detailed parameter description, return value explanation, and example code demonstrating usage with various inputs and their corresponding outputs.
FunctionMathasin
0 likes · 2 min read

This article explains the PHP acosh() function, describing its purpose, parameter and return value, and provides example code demonstrating how to compute the inverse hyperbolic cosine of various numbers with the resulting outputs.
BackendPHPacosh
0 likes · 1 min read

This article explains PHP's abs() function, describing its numeric parameter, the type‑preserving return of the absolute value, and provides clear example code demonstrating usage with both integer and float inputs.
ABSBackendFunction
0 likes · 1 min read

The PHP range() function generates an array of sequential values based on a start, end, and optional step, allowing numeric and character sequences, with examples demonstrating default steps, custom steps, and reverse ordering.
BackendFunctionarray
0 likes · 2 min read

This article explains the PHP list() language construct, its syntax and return value, and provides detailed examples showing how to unpack array elements into variables, handle partial assignments, skip elements, and demonstrates that list() cannot operate on strings.
BackendListPHP
0 likes · 2 min read

The article explains PHP's each() function, describing how it returns the current key/value pair from an array while moving the internal pointer forward, details its parameters and return values, notes behavior when the pointer reaches the end, and provides a complete code example with output.
Functionarrayeach
0 likes · 2 min read

This article explains how to create arrays in PHP using the array() function, detailing syntax, parameter description, optional trailing commas, and provides a comprehensive example with nested arrays and the resulting output.
Backendarrayexample
0 likes · 2 min read

array_walk() applies a user‑defined callback to each element of an array without affecting the internal pointer, accepting the array, a callable function, and optional userdata, returning TRUE on success; the article explains its parameters, behavior, and provides PHP code examples demonstrating typical usage.
BackendCallbackarray_walk
0 likes · 3 min read

This article introduces a reusable Java WebSocket client wrapper that adds convenient date handling, message logging, configurable constants, and performance‑testing utilities, explains its implementation details with full source code, and provides a simple demo showing connection, messaging, and graceful shutdown.
ClientGitJava
0 likes · 8 min read

This article explains PHP's array_product() function, detailing its purpose of returning the product of all array values, describing the required array parameter, the integer or float return type, and providing a complete example with code and expected output.
Backendarray_productexample
0 likes · 1 min read

This guide explains how PHP's array_combine() function builds an associative array by pairing one array of keys with another array of values, details its parameters, return behavior, warning conditions, and provides a clear code example with expected output.
BackendFunctionPHP
0 likes · 2 min read

This article explains PHP’s array_chunk function, describing its parameters, return value, and optional key preservation, and provides clear example code that demonstrates how an input array can be divided into equally sized sub‑arrays.
BackendFunctionPHP
0 likes · 2 min read

The article explains PHP's mb_strtolower() function, detailing its purpose to convert all alphabetic characters in a string to lowercase, describing its parameters, return value, and providing two illustrative examples—including handling of UTF‑8 encoded text.
PHPStringencoding
0 likes · 2 min read

This article explains PHP's substr() function, detailing its purpose, parameter rules, return values, and provides multiple code examples demonstrating positive, negative, and omitted start/length arguments as well as character access via indexing.
FunctionPHPString Manipulation
0 likes · 4 min read

This article explains the PHP mb_internal_encoding() function, detailing its syntax, parameter description, return values, and provides a clear example showing how to set the internal encoding to UTF-8 and retrieve the current encoding.
BackendFunctioncharacter-encoding
0 likes · 2 min read

This article explains PHP's stream_context_create function, detailing its purpose, parameters, and return value, and provides two complete examples showing how to configure HTTP options, send GET and POST requests, and process the response using fopen or file_get_contents.
examplerequeststream_context_create
0 likes · 3 min read

This article explains PHP's fread() function, detailing its syntax, parameters, return values, stopping conditions, and provides three practical code examples for reading regular files, binary files, and streaming data from a URL.
BackendPHPexample
0 likes · 3 min read

The article explains PHP's rawurlencode() function, detailing its RFC 3986‑based URL encoding behavior, signature, parameter description, return value, and provides two practical code examples demonstrating how to encode special characters in FTP and HTTP URLs.
BackendRFC3986example
0 likes · 2 min read

This article explains PHP's wordwrap() function, detailing its syntax, parameter meanings, return value, and providing three illustrative code examples that show how to wrap strings with custom line widths, break strings, and control word splitting.
BackendStringexample
0 likes · 3 min read

This article explains the PHP str_shuffle() function, detailing its purpose of randomly shuffling a string, the required string parameter, the returned shuffled string, and provides two practical code examples demonstrating its usage.
PHPString Manipulationexample
0 likes · 1 min read

This article provides a comprehensive guide to Java's reflection mechanism, covering its definition, core capabilities, practical code examples, common API usage, and considerations such as performance and security, enabling developers to understand and apply reflection effectively in real-world projects.
APIJavaReflection
0 likes · 10 min read

This article explains what Python decorators are, describes their four types—function decorating function, function decorating class, class decorating function, and class decorating class—illustrates each with diagrams, and provides a practical example that dynamically passes test case names to a function via a decorator.
DecoratorPythonexample
0 likes · 2 min read

This article explains Python decorators, describing their purpose of adding functionality while preserving original code structure, outlines four decorator types—function‑decorating function, function‑decorating class, class‑decorating function, and class‑decorating class—and demonstrates a practical example that dynamically captures test case names.
decoratorsexamplefundamentals
0 likes · 3 min read

This guide explains Python's Thread class, covering its syntax, common attributes and methods, and provides two practical examples—creating a thread to run a function and subclassing Thread—to help developers understand thread creation, control, and lifecycle management.
example
0 likes · 5 min read

This article explains atomicity, thread safety, and race conditions in Java by showing how a volatile counter increment can produce nondeterministic results when accessed concurrently, complete with sample code and console output analysis.
ConcurrencyMultithreadingatomicity
0 likes · 4 min read

This article explains atomicity, thread safety, and race conditions in Java by walking through a concrete example where multiple threads increment a shared volatile variable, showing why the non‑atomic i++ operation leads to inconsistent results.
ConcurrencyJavaMultithreading
0 likes · 4 min read

gobox is a self‑developed lightweight Go framework comprising various utility boxes such as color, crypto, exception, gohttp, golog, and gomisc, with detailed explanations of its origin, naming, supported modules, and extensive code examples demonstrating usage for logging, error handling, slice deduplication, file checks, JSON handling, and time utilities.
GoLibraryUtility
0 likes · 9 min read

This article explains the design and implementation of Java's LinkedBlockingDeque, covering its internal doubly‑linked list structure, key fields, constructors, core methods for adding, removing, and traversing elements, and provides a multithreaded example that demonstrates its thread‑safety compared to non‑concurrent collections.
ConcurrentQueueDataStructureJava
0 likes · 15 min read

This article explains the thread‑safe, ordered Java collection ConcurrentSkipListSet, compares it with TreeSet, describes its skip‑list based internal structure, lists its full API, and provides a multithreaded example demonstrating correct concurrent usage versus the failure of TreeSet.
Concurrent CollectionsConcurrentSkipListSetJava
0 likes · 8 min read

This article introduces Java's CopyOnWriteArraySet, explains its thread‑safe design and underlying data structure, lists its core methods, and provides a complete example comparing its behavior with HashSet under concurrent modifications, illustrating when to use this collection.
ConcurrencyCopyOnWriteArraySetJava
0 likes · 8 min read

This article explains the purpose, differences, internal structure, and core methods of Java's CountDownLatch, shows how it leverages AQS for shared lock semantics, and provides a complete example demonstrating its usage in a thread‑synchronization scenario.
AQSConcurrencyCountDownLatch
0 likes · 8 min read
