Author: admin

  • JavaScript 101: How the Browser Manages Processes and Threads

    浏览器的进程模型 (Browser’s Process Model): How the Browser Manages Processes and Threads 浏览器的进程模型:浏览器如何管理进程和线程 The browser’s process model is crucial for understanding how modern web browsers manage and allocate resources to web pages and their components. This model involves multiple processes and threads working together to ensure that web pages are rendered…

  • JavaScript 101: Event Loop

    The Mechanism that Handles Asynchronous Operations in JavaScript 事件循环 (Event Loop): 处理 JavaScript 中异步操作的机制 The event loop is a fundamental concept in JavaScript, particularly in the context of asynchronous programming. It is the mechanism that allows JavaScript to handle non-blocking, asynchronous operations, such as I/O tasks, timers, and network requests,…

  • Algorithms 101: Adding Two Numbers Represented by Linked Lists

    两个链表相加 This problem involves adding two numbers represented by two linked lists. Each linked list stores a non-negative integer where the digits are stored in reverse order, meaning that the least significant digit comes first. Each node in the linked list contains a single digit, and the task is to…

  • Algorithms 101: Merge Two Sorted Linked Lists

    合并两个有序链表 Merging two sorted linked lists is a common problem that requires combining two ascending order lists into a new sorted linked list. The resulting linked list should maintain the ascending order and include all the nodes from both input lists. This problem is often encountered in algorithmic challenges and…

  • LeetCode: 162 Find Peak Element

    A peak element is an element that is strictly greater than its neighbors. Given a 0-indexed integer array nums, find a peak element, and return its index. If the array contains multiple peaks, return the index to any of the peaks. You may imagine that nums[-1] = nums[n] = -∞.…

  • Algorithms 101: Singly and Doubly Linked Lists and Their Reversal – Stack Interpretation

    单双链表及其反转 – 堆栈诠释 Linked lists are fundamental data structures in computer science, offering a flexible way to store and manipulate data. A singly linked list consists of nodes where each node contains data and a reference to the next node in the sequence. A doubly linked list, on the other…

  • Algorithms 101: Binary Search Doesn’t Have to Occur in a Sorted Array

    二分搜索不一定发生在有序数组上 In computer science, binary search is an efficient algorithm used to find a specific element in a sorted array. However, binary search is not limited to only sorted arrays. It can also be applied in specific scenarios where the array is not entirely ordered but still has certain properties…

  • Algorithms 101: Directional Search Algorithm for Gomoku

    In this blog, we will explore the implementation and optimization of a directional search algorithm to determine the win condition in a game like Gomoku (五子棋). Gomoku is a traditional board game where two players take turns placing black or white stones on a grid, with the objective of aligning…

  • Security 101: Understanding and Comparing Two SSO Methods: Session-Based vs. Token-Based Authentication

    Single Sign-On (SSO) is a critical component in modern web applications, allowing users to log in once and access multiple systems without needing to re-authenticate. This blog post explores two popular SSO methods—Session-Based and Token-Based Authentication—and offers guidance on which one is generally recommended. Session-Based SSO How It Works User…

  • Top 10 Software Development Books

    General Advice The Pragmatic Programmer A classic book offering timeless advice for software developers, emphasizing practical techniques and a pragmatic approach to coding. 《程序员修炼之道》:一本经典书籍,为软件开发者提供了永不过时的建议,强调实用的技术和务实的编码方法。 Code Complete A comprehensive guide to software construction, covering coding best practices, design strategies, and debugging techniques. 《代码大全》:一本关于软件构建的全面指南,涵盖编码最佳实践、设计策略和调试技巧。 Coding Clean Code This book focuses on writing…