How to Upgrade PHP 7.4 to 8.2 in XAMPP without data loss?

Summary Upgrading PHP from 7.4 to 8.2 in XAMPP without losing data requires careful planning and execution. Key considerations include preserving htdocs project files, MySQL/MariaDB databases, and XAMPP configuration settings. This article provides a step-by-step guide on how to achieve a seamless upgrade. Root Cause The root cause of potential data loss during a PHP … Read more

inlined strcmp() on ppc64le (sometimes) returns a wrong value when the strings are same

Summary The issue at hand is an inlined strcmp() function on ppc64le architecture that sometimes returns a wrong value when comparing two identical strings. This problem occurs when the code is compiled with -O optimization using gcc (GCC) 11.2.1 20220127. The comparison involves two variables: a local character array and a memory-allocated variable. Root Cause … Read more

PyTorch: trying to create a joint dataset with different transforms results in both datasets having same transform

Summary The core issue stems from a subtle naming conflict and shared mutable state in the user’s PyTorch data pipeline. Specifically, the variable names train_set and val_set are first assigned to the unmasked dataset subsets. However, later in the script, the variables train_set and val_set are accidentally reused when creating the masked dataset subsets. This … Read more

How to protect Raspberry Pi SD card using OverlayFS

Summary The goal is to protect the Raspberry Pi SD card from wear and tear by utilizing OverlayFS, a Linux feature that allows for a read-only root filesystem and a writable overlay. This is particularly useful when setting up a self-hosted Azure DevOps agent on a Raspberry Pi, as it involves repetitive tasks and configurations … Read more

Creating ResourceDictionary’s with custom/sorted items?

Postmortem: Unexpected App Crash Due to Misusing ResourceDictionary for Custom Collections Summary During recent app deployment, a UI page crashed on launch due to unhandled exceptions stemming from misuse of .NET MAUI‘s ResourceDictionary. Investigation revealed attempts to store custom class instances rather than supported resource types. Root Cause The crash occurred because: Developers attempted to … Read more

python function signature reuse with variations

Summary The problem at hand involves reusing a lengthy function signature in multiple functions with slight variations in internal code. The goal is to use first-class functions to reuse the signature and perform conditional branching based on the called function’s name. Root Cause The root cause of this issue is the inability to directly access … Read more

How to become Machine Learning Engineer

Summary To become a Machine Learning Engineer, one must go beyond just learning basic ML concepts, transformers, and LLMs. Building an end-to-end project requires a comprehensive understanding of the entire Machine Learning pipeline, including data preprocessing, model deployment, and system integration. This article aims to guide you through the process of building an end-to-end project … Read more

Web components – defer page rendering until after customElements.define() has been called to avoid FOUC

Summary The Flash of Unstyled Content (FOUC) problem occurs when using web components defined in ES6 modules, causing a brief flash of unstyled content before the custom element is rendered. This issue arises because modules are loaded with the defer attribute, which delays the execution of the script until the page has finished parsing. Root … Read more

Finding boxes in PDF file with Aspose.Pdf

Summary The problem at hand involves modifying an existing PDF file using Aspose.Pdf to find and manipulate non-input boxes within the document. The boxes are not part of the Forms collection, and each page’s Paragraphs collection is null, leaving the Contents collection as the potential source for accessing these boxes. Root Cause The root cause … Read more