Tag

Loop

0 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
Jan 8, 2025 · Backend Development

Managing Integer Ranges in PHP: Techniques and Best Practices

This article explains how to manage integer ranges in PHP using loops, conditional checks, and custom functions, highlighting basic techniques, advanced optimizations like bitwise operations, and best‑practice recommendations for efficient, readable code.

Integer RangeLoopPHP
0 likes · 6 min read
Managing Integer Ranges in PHP: Techniques and Best Practices
Architect's Guide
Architect's Guide
May 1, 2024 · Fundamentals

Effect of Placing try‑catch Inside vs Outside a for Loop in Java

This article explains the behavioral and performance differences of positioning a try‑catch block either outside or inside a Java for‑loop, illustrating each case with code examples, execution results, memory analysis, and practical recommendations for handling exceptions during batch processing.

Exception HandlingJavaLoop
0 likes · 5 min read
Effect of Placing try‑catch Inside vs Outside a for Loop in Java
Python Programming Learning Circle
Python Programming Learning Circle
Apr 18, 2024 · Fundamentals

Four Time‑Saving Python Tricks to Boost Execution Speed

This article presents four practical Python techniques—including list reversal, tuple swapping, loop placement, and function‑call reduction—that together can shave roughly 10‑20% off typical script execution times while keeping the code clear and maintainable.

CodeLoopPerformance
0 likes · 7 min read
Four Time‑Saving Python Tricks to Boost Execution Speed
php中文网 Courses
php中文网 Courses
Oct 8, 2023 · Backend Development

Understanding the Power of & in PHP foreach Loops

This article explains how PHP's foreach loop works and demonstrates the powerful use of the & reference operator to modify array elements, create dynamic variables, handle large datasets efficiently, and outlines best practices and alternatives for safe and effective coding.

LoopReferencebackend
0 likes · 5 min read
Understanding the Power of & in PHP foreach Loops
macrozheng
macrozheng
Aug 11, 2023 · Backend Development

When to Put try-catch Inside or Outside a Loop? Pros, Cons, and Best Practices

This article examines the advantages and disadvantages of placing try-catch blocks inside versus outside loops in Java, provides concrete code examples, references performance guidelines from the Alibaba Java Development Manual, and outlines scenarios to help developers choose the most appropriate approach.

Exception HandlingJavaLoop
0 likes · 5 min read
When to Put try-catch Inside or Outside a Loop? Pros, Cons, and Best Practices
php中文网 Courses
php中文网 Courses
Jun 27, 2023 · Backend Development

Comprehensive Guide to PHP foreach Loop with Examples

This article thoroughly explains PHP's foreach loop syntax, demonstrates its use with indexed, associative, and multidimensional arrays, and provides complete code examples showing how to access values and keys in each scenario.

Looparraysbackend
0 likes · 6 min read
Comprehensive Guide to PHP foreach Loop with Examples
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)
Architect's Tech Stack
Architect's Tech Stack
Jun 5, 2022 · Backend Development

Why return in Java 8 forEach Behaves Like continue and How to Properly Terminate the Loop

This article explains that using return inside Java 8’s forEach does not stop the surrounding method but merely skips the current iteration, similar to continue, and presents several solutions—including using a traditional foreach loop, break, return (not recommended), and throwing an exception—to correctly terminate the loop.

ExceptionJavaLoop
0 likes · 5 min read
Why return in Java 8 forEach Behaves Like continue and How to Properly Terminate the Loop
IT Services Circle
IT Services Circle
Apr 26, 2022 · Fundamentals

Understanding x86 Assembly Direct and Indirect Addressing and the LOOP Instruction

This article explains x86 assembly direct and indirect memory addressing, the meaning of address length, how to use registers like BX for indexed access, and demonstrates loop‑based multiplication with detailed code examples and execution analysis.

LoopLow-level programmingX86
0 likes · 11 min read
Understanding x86 Assembly Direct and Indirect Addressing and the LOOP Instruction
Architecture Digest
Architecture Digest
Aug 11, 2021 · Frontend Development

Comparing JavaScript Looping Methods: for, forEach, map, for...in, and for...of

This article compares JavaScript's five main iteration constructs—for, forEach, map, for...in, and for...of—examining their syntax, use‑cases, performance characteristics, and how they handle break/continue, helping developers choose the most suitable method for a given scenario.

IterationJavaScriptLoop
0 likes · 10 min read
Comparing JavaScript Looping Methods: for, forEach, map, for...in, and for...of
Selected Java Interview Questions
Selected Java Interview Questions
May 21, 2021 · Backend Development

Performance Comparison of Java for Loop, foreach Loop, and Stream API

This article benchmarks Java's traditional for loop, enhanced foreach loop, and Stream API by measuring execution time on 10,000 and 10,000,000 elements, showing that for loops are fastest for small datasets while Stream offers parallelism advantages for large data volumes.

ConcurrencyJavaLoop
0 likes · 5 min read
Performance Comparison of Java for Loop, foreach Loop, and Stream API
Practical DevOps Architecture
Practical DevOps Architecture
Mar 15, 2021 · Fundamentals

Understanding Python range() and Loop Control Statements

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.

LoopPythoncontrol-statements
0 likes · 3 min read
Understanding Python range() and Loop Control Statements
Top Architect
Top Architect
Feb 12, 2021 · Backend Development

Performance Comparison of String and StringBuilder in Java Loops

The article presents a series of Java benchmarks that compare per‑iteration and cumulative string concatenation using String versus StringBuilder, explains why the compiler optimises String concatenation to StringBuilder, and draws conclusions about the most efficient usage patterns in loop‑heavy code.

JavaLoopPerformance
0 likes · 8 min read
Performance Comparison of String and StringBuilder in Java Loops
Top Architect
Top Architect
Jul 9, 2020 · Frontend Development

Comparing JavaScript Looping Methods: for, forEach, map, for...in, and for...of

This article compares the five main JavaScript iteration constructs—traditional for loops, forEach, map, for...in, and for...of—detailing their syntax, use‑cases, performance characteristics, and how to choose the most appropriate one for a given scenario.

IterationJavaScriptLoop
0 likes · 13 min read
Comparing JavaScript Looping Methods: for, forEach, map, for...in, and for...of
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
Architect's Tech Stack
Architect's Tech Stack
Jun 7, 2020 · Backend Development

How to Avoid java.util.ConcurrentModificationException When Removing Elements from a List

This article explains why a foreach loop over an ArrayList can throw java.util.ConcurrentModificationException when removing elements, analyzes the underlying iterator mechanism, and presents three safe alternatives—using Iterator.remove(), a forward-index for loop with index correction, and a reverse for loop—to modify collections without errors.

ArrayListConcurrentModificationExceptionIterator
0 likes · 7 min read
How to Avoid java.util.ConcurrentModificationException When Removing Elements from a List
360 Zhihui Cloud Developer
360 Zhihui Cloud Developer
Feb 13, 2020 · Backend Development

How Go Compiles Range Loops into Assembly: A Deep Dive

This article examines how the Go compiler translates range loops into low‑level assembly instructions, walks through a concrete example with code and assembly output, explains each instruction’s role, and highlights recent compiler improvements that enhance safety and scheduler interaction.

CompilerGoLoop
0 likes · 8 min read
How Go Compiles Range Loops into Assembly: A Deep Dive
DevOps Cloud Academy
DevOps Cloud Academy
Aug 1, 2019 · Fundamentals

Python Control Flow: Conditional Statements, Loops, Iterators, and List Comprehensions

This article introduces Python's basic control flow constructs, including if/elif/else conditional statements, for and while loops with break/continue, iterator usage with Iterable and enumerate, and list comprehensions, providing example code snippets and their outputs for each concept.

IteratorLoopPython
0 likes · 4 min read
Python Control Flow: Conditional Statements, Loops, Iterators, and List Comprehensions
Java Captain
Java Captain
Aug 19, 2018 · Fundamentals

Performance Comparison of Java forEach, C‑Style Loop, and Stream API

This article examines Java's forEach syntax, C‑style for loops, and Stream API by benchmarking their execution times on large collections, explaining the underlying mechanisms that cause performance differences and identifying the most efficient traversal method for Sets.

BenchmarkingJavaLoop
0 likes · 7 min read
Performance Comparison of Java forEach, C‑Style Loop, and Stream API