Tagged articles
range
19 articles · Page 1 of 1
The article explains Python's for‑in loop syntax, describes common iterable types such as strings, lists, tuples and sets, details how the range function defines start and end values, and provides concrete code examples that print numbers, list elements and characters from both English and Chinese strings.
IterableListString
0 likes · 3 min read

In Go, using a range loop on slices of large structs implicitly copies each element, leading to significant performance loss, and modifying the loop variable does not affect the original slice; this article explains the copying behavior, benchmarks three loop styles, and offers practical guidelines to write fast and correct code.
BenchmarkStructperformance
0 likes · 9 min read

This guide explains MySQL partitioning fundamentals, shows how to create RANGE, LIST, and KEY partitions with concrete CREATE TABLE examples, compares the performance benefits and maintenance trade‑offs, and clarifies the differences between partitioning and sharding to help you decide when to use each technique.
ListMySQLPartitioning
0 likes · 7 min read

This article explains Python's built‑in range function, covering its lazy generation, memory efficiency, syntax variations, practical examples, common pitfalls, and advanced techniques such as reverse iteration and enumeration.
iterationlazy evaluationmemory efficiency
0 likes · 7 min read

This article introduces Python's built‑in range() function, explains its syntax and parameters, and provides ten clear code examples that demonstrate basic counting, custom start‑stop values, step sizes, reverse iteration, list creation, summation, string traversal, bulk list updates, 2‑D coordinate generation, and spaced element access.
LoopsPythoniteration
0 likes · 7 min read

This article explains Python's built-in functions range, reversed, iter, and next, detailing their syntax, parameters, code examples, and best‑practice tips for effective iteration and sequence handling.
__iter____next__best-practices
0 likes · 5 min read


ITPUBSep 23, 2024 · Databases
This guide explains PostgreSQL table partitioning, covering its definition, benefits, drawbacks, the three partition types (RANGE, LIST, HASH), step‑by‑step SQL commands for creating partitions, indexes, and managing them, and concludes with practical recommendations for effective use.
HashListPartitioning
0 likes · 10 min read

This guide explains how to install the s1lentium/iptools PHP library and use its classes to parse, convert, and operate on IPv4 and IPv6 addresses, networks, and ranges, including examples of CIDR calculations, reverse DNS, and host enumeration.
CIDRIP addressIPv4
0 likes · 7 min read

This article explains how to apply CSS ellipsis to truncate overflowing text, then use JavaScript—particularly the createRange API and temporary DOM measurements—to detect when truncation occurs and display a popper tooltip only on hover, comparing several practical implementation methods.
CSSDOMJavaScript
0 likes · 9 min read

This comprehensive tutorial explains how selections and cursors work in web pages, covering the underlying Selection and Range APIs, handling editable and non‑editable elements, manipulating text in inputs, textareas, and rich content, and providing practical code snippets for every scenario.
CursorDOMJavaScript
0 likes · 21 min read

This article reviews MySQL horizontal partitioning, explains five partitioning strategies (HASH, RANGE, KEY, LIST, COMPOSITE), demonstrates how to create and test partitioned tables, compares performance with and without indexes, and covers partition management operations such as adding, dropping, and rebuilding partitions.
HashMySQLPartitioning
0 likes · 23 min read

This article explains how Python's range() function generates numeric sequences with various start, stop, and step parameters, demonstrates converting ranges to lists, and describes loop control statements like break, continue, pass, and the else clause within for/while loops.
Loopcontrol statementsfundamentals
0 likes · 3 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 tutorial explains Python lists—how to create them, access elements by index, modify items, add or remove entries, sort permanently or temporarily, generate numeric lists with range, perform basic statistics, and use slicing to extract or copy sub‑lists.
IndexingListSlicing
0 likes · 7 min read

After initially implementing table sharding, we later added database sharding, sharing a detailed retrospective that covers when to partition tables, various sharding strategies (range, hash, range+hash), migration challenges, business compatibility, and final archiving practices, illustrated with diagrams and practical tips.
HashPartitioningrange
0 likes · 11 min read

This article presents a hybrid sharding approach that combines range partitioning to assign ID ranges to groups and hash modulo on the total number of tables to achieve uniform data distribution while avoiding hotspots and eliminating the need for data migration during scaling.
HashShardingdatabase
0 likes · 7 min read

This article explains Python's range() function, detailing its return type differences between Python 2 and 3, syntax variations, parameter meanings, and provides multiple code examples illustrating usage with various start, stop, and step values, as well as converting the result to lists or tuples.
ListPythoniteration
0 likes · 3 min read

This article explains how Python's range(), enumerate() and zip() functions can be combined to create more flexible loops, allowing iteration by index, simultaneous access to indices and elements, and parallel traversal of multiple sequences.
Loopsenumeraterange
0 likes · 4 min read

This article explains Guava's Range class, covering its mathematical definition, how to construct open, closed, and bounded ranges, perform containment, connectivity, intersection, span, and query operations, and use DiscreteDomain for enumerating values, with extensive Java code examples throughout.
APIBackendDiscreteDomain
0 likes · 12 min read
