Fading Coder

One Final Commit for the Last Sprint

SMU Summer 2023 Contest Round 7 Solutions

A. Two Rival Students The maximum possible dsitance between two students in a line of n positions is n - 1. Given their initial positions a and b, and up to x swaps, the achievable distance is the minimum of n - 1 and |a - b| + x. #include <bits/stdc++.h> using namespace std; int main() { ios:...

Understanding Dictionary Implementation and Operations in Python

Core Concepts Python dictionaries are implemented using hash tables, enabling efficient storage and retrieval of key-value pairs. Grasping how dictionaries operate enhances understanding of their performance characteristics and optimal usage scenarios. Hash Table Fundamentals Hash Function: Hash tab...

Implementing Fanout Exchange Pattern in RabbitMQ

1. Event organizer publishes an activity 2. Customer receives booking information 3. System sends email/SMS notification Producer Implementation public void PublishEvent() { ConnectionFactory connectionFactory = new ConnectionFactory() { HostName = "localhost", Port = 5672, Credentials = n...

Configuring HHB Compilation Environment for YOLOv5n on LicheePi 4A

Setting Up the Development Environment WSL2 Configuration Enable virtualization in Windows settings and install WSL2: wsl --update wsl --set-default-version 2 wsl --list --verbose Ubuntu Installation Install Ubuntu 20.04 from the Microsoft Store and configure the WSL environment. Visual Studio Code...

Diagnosing Linux System Load and CPU Bottlenecks

When investigating system performance degradation, engineers typically begin by examining system responsiveness via standard monitoring utilities. The top utility provides a dynamic real-time view, while uptime offers a quick snapshot of system history. The output of uptime includes three numerical...

File Sharing Between an Embedded Board and Host Computer Using NFS over Ethernet

File Sharing Between an Embedded Board and Host Computer Using NFS over Ethernet
Connect the board to your computer with an Ethernet cable. This can be a direct connection, without a switch or router. With NFS you can mount a directory from the host computer onto the embedded board over the network, making file exchange as convenient as a local disk access. 1. Configure a stati...

Understanding Java Wrapper Class Caching Mechanisms

Java's wrapper classes implement caching mechanisms to optimize performance for commonly used values. Several numeric wrapper classes cache values within specific ranges: Byte, Short, Integer, and Long cache values between -128 and 127 Character caches values from 0 to 127 Boolean directly returns e...

Gaussian Elimination, Determinants, and Matrix-Tree Theorem

Gaussian Elimination Gaussian elimination is a powerful technique for solving systems of linear equations and simplifying matrices through linear transformations. The Gauss-Jordan method specifically transforms a matrix into diagonal form, which serves as the foundation for computing determinants. T...

Essential jQuery DOM Manipulation and AJAX Patterns

This guide covers foundational jQuery techniques for dynamic DOM updates and asynchronous communication—focused on practical, production-relevant patterns rather than legacy workarounds. Event Binding After Dynamic Content Updates When elements are re-rendered (e.g., table rows rebuilt via .html()),...

Understanding Vue.use() for Plugin Installation

Plugins that need to be installed via Vue.use() must expose an install method. This method allows you to attach global capabilities to the Vue framework. Global Capabilities You Can Add Global methods or properties attached directly to the Vue constructor Global resources such as directives, filters...