Tag

Collection

1 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
Dec 27, 2024 · Backend Development

Using Laravel's Collection::wrap to Convert Any Value into a Collection

The article explains Laravel's Collection::wrap method, showing basic usage for wrapping scalars, arrays, or existing collections, and provides real-world examples within a data‑processing service to streamline handling of items, tags, and search results.

CollectionDataProcessingLaravel
0 likes · 3 min read
Using Laravel's Collection::wrap to Convert Any Value into a Collection
Python Programming Learning Circle
Python Programming Learning Circle
Sep 14, 2023 · Fundamentals

Python Set Type Definition, Operations, and Applications

This article explains Python's set data type, covering its definition, unordered and unique characteristics, creation methods, basic and augmented operators, practical usage examples, handling techniques, and common application scenarios such as data deduplication.

CollectionData StructuresDeduplication
0 likes · 6 min read
Python Set Type Definition, Operations, and Applications
Top Architect
Top Architect
Aug 24, 2023 · Backend Development

Understanding Java foreach Loop Limitations and Proper Element Deletion/Modification

This article explains how Java's foreach loop iterates over arrays and collections, demonstrates why removing or reassigning elements within a foreach causes ConcurrentModificationException or has no effect, and shows the correct ways to delete or modify elements using traditional for loops or iterator methods, complete with code examples.

CollectionIteratorJava
0 likes · 10 min read
Understanding Java foreach Loop Limitations and Proper Element Deletion/Modification
Architect's Tech Stack
Architect's Tech Stack
Aug 15, 2023 · Fundamentals

Understanding Java for‑loop vs foreach: Traversal, Deletion, and Modification

This article explains how Java's traditional for loop and the enhanced foreach loop differ when iterating collections, how to correctly delete elements, why modifying collection elements directly with foreach fails, and how to safely modify element attributes using iterators or object methods.

CollectionJavafor loop
0 likes · 9 min read
Understanding Java for‑loop vs foreach: Traversal, Deletion, and Modification
macrozheng
macrozheng
Feb 20, 2023 · Fundamentals

8 Reliable Ways to Remove Elements from a Java List (And Why Some Fail)

This article examines eight common techniques for deleting elements from a Java List, explains why certain loop‑based approaches cause errors or unexpected results, and highlights the three reliable methods—including reverse for‑loops, iterator.remove, and Stream filtering—that work correctly.

CollectionConcurrentModificationExceptionIterator
0 likes · 9 min read
8 Reliable Ways to Remove Elements from a Java List (And Why Some Fail)
NetEase LeiHuo Testing Center
NetEase LeiHuo Testing Center
May 27, 2022 · Game Development

The Joy of Card Collection in Strategy Card Games

This article explores the appeal of collecting cards in strategy‑focused trading and collectible card games, examining the distinction between physical TCGs and digital CCGs, the three core pleasures of card games, and how designers balance rarity, value, and gameplay experience.

CCGCard GamesCollection
0 likes · 10 min read
The Joy of Card Collection in Strategy Card Games
Architect's Tech Stack
Architect's Tech Stack
Jun 22, 2021 · Backend Development

Injecting Lists, Arrays, Sets, and Maps in Spring Using @Value and EL

This article explains how to store and inject collection types such as List, Map, Set, and arrays from Spring configuration files using @Value, @ConfigurationProperties, and Spring Expression Language, while handling missing keys and reducing code‑configuration coupling.

AnnotationCollectionConfiguration
0 likes · 7 min read
Injecting Lists, Arrays, Sets, and Maps in Spring Using @Value and EL
php中文网 Courses
php中文网 Courses
Apr 8, 2021 · Backend Development

Using ThinkPHP6 Collection Methods to Process Database Query Results

The article explains how ThinkPHP6 returns query results as a Collection object, introduces its useful methods such as toArray and isEmpty, and provides a PHP code example demonstrating how to check for empty results and convert the collection to an array.

CollectionDatabasePHP
0 likes · 2 min read
Using ThinkPHP6 Collection Methods to Process Database Query Results
Java Captain
Java Captain
Aug 24, 2020 · Backend Development

Java 8 Stream API: Grouping, Mapping, Filtering, Summing and Other Collection Operations

This article demonstrates how to leverage Java 8 Stream API to perform common collection operations such as defining a data class, creating test data, grouping by fields, converting lists to maps, filtering, summing numeric fields, finding max/min values, removing duplicates, and explains the Collectors utility methods.

CollectionData ProcessingJava
0 likes · 9 min read
Java 8 Stream API: Grouping, Mapping, Filtering, Summing and Other Collection Operations
Java Captain
Java Captain
Jun 10, 2020 · Fundamentals

Understanding java.util.ConcurrentModificationException and Safe Ways to Remove Elements from a List

This article explains why using a foreach loop to remove elements from a Java List triggers java.util.ConcurrentModificationException, analyzes the underlying iterator mechanism, and presents three safe alternatives: iterator.remove(), forward-index loop with index adjustment, and reverse-index loop.

ArrayListCollectionConcurrentModificationException
0 likes · 6 min read
Understanding java.util.ConcurrentModificationException and Safe Ways to Remove Elements from a List
Java Captain
Java Captain
Jul 29, 2019 · Backend Development

Why Arrays.asList() Returns an Unmodifiable List in Java

The article explains that Java's Arrays.asList() creates a fixed‑size list backed by the original array, uses an internal ArrayList class without add, remove, or clear methods, and therefore any attempt to modify the list throws UnsupportedOperationException, with work‑arounds shown.

Arrays.asListCollectionUnsupportedOperationException
0 likes · 4 min read
Why Arrays.asList() Returns an Unmodifiable List in Java
Sohu Tech Products
Sohu Tech Products
Jul 17, 2019 · Fundamentals

Understanding Swift Sequence and Collection Protocols: From Basics to Advanced Types

This article explains Swift's protocol‑oriented collection system, covering the Sequence and IteratorProtocol basics, demonstrating custom infinite sequences, exploring type‑erasing wrappers like AnySequence and AnyIterator, and detailing the Collection hierarchy including Collection, BidirectionalCollection, RandomAccessCollection, MutableCollection and RangeReplaceableCollection.

AnySequenceBidirectionalCollectionCollection
0 likes · 12 min read
Understanding Swift Sequence and Collection Protocols: From Basics to Advanced Types