Programming

Questions about C#, Python, Java, algorithms, and code architecture.

ProgrammingGraceful SIGINT Shutdown in Node.js CLI with Commander

Handle SIGINT gracefully in Node.js TypeScript CLI apps using Commander.js. Finish database updates, per-item calculations, flush stdout/stderr logs, and ensure shell prompt returns only after complete shutdown—no more lost logs or early prompts.

1 answer 1 view
ProgrammingFix ZIP Timestamps Error in Homebrew Python Hatchling

Resolve 'ZIP does not support timestamps before 1980' error in Homebrew Python formulas like kosmorro with termcolor 3.3.0 and hatchling. Set SOURCE_DATE_EPOCH to clamp timestamps and fix wheel builds during pip install.

1 answer 1 view
ProgrammingMarkov Chain Expected Payoff: Exact DP Solution

Compute the exact expected total payoff at stopping time using finite-state Markov chain and dynamic programming. Includes minimal state space, recurrence equations, backward substitution, and Python code for precise fraction.

1 answer 1 view
ProgrammingPolars Rust: Upsample Time-Series Gaps to 5m Intervals

Learn to upsample time-series gaps in Polars Rust to exact 5-minute intervals using date_range, vstack, and forward fill. Preserve non-aligned timestamps like 00:05:17 without replacement. Rust code examples for sensors data.

1 answer 4 views
ProgrammingPyTorch Dataset/DataLoader for Multivariate Time Series

Fix PyTorch Dataset and DataLoader for multivariate time series preprocessing from CSV. Ensure (B, V, L) shapes, avoid data leakage with proper scaling, and validate sliding windows for MAMBA models.

1 answer 3 views
ProgrammingSupabase C# Client: Fix InitializeAsync Hanging Issue

Fix Supabase C# client hangs on InitializeAsync: use project URL and anon key, disable realtime, check IP/network, and avoid async init deadlocks. Log errors.

1 answer 2 views
ProgrammingTensorFlow Backprop: Mixed Real & Complex Functions

Learn how TensorFlow handles backpropagation through mixed real and complex-valued functions using Wirtinger derivatives, GradientTape, and complex-aware ops. Covers chain rule, domain boundaries, and practical tips for CVNNs in comms systems.

1 answer 2 views
ProgrammingWhy member behaves differently in FiveAM tests (SBCL)

SBCL may intern string literals when compiling, so (member "foo" '("foo") :test #'eql) can match by identity. Use equal or string= for consistent results.

1 answer 2 views
ProgrammingUnity FPS Controller: Kinematic Rigidbody Grounding

Guide to implement a kinematic Rigidbody Unity FPS controller that stays grounded with robust ground checks, averaged normals, and snap-to-ground tuning.

1 answer 2 views
ProgrammingFix Electron-Prebuilt-Compile Error in TypeScript on Windows

Resolve electron-prebuilt-compile 404 installation error in Electron + TypeScript projects on Windows. Uninstall deprecated package, fix npmmirror issues, migrate to Electron Forge for modern TypeScript builds without runtime compilation problems.

1 answer 2 views
ProgrammingC Floating-Point == Comparison Accuracy with 0.1 Steps

Learn why C's == operator fails for floating-point numbers like 0.1 increments due to binary precision. Use epsilon comparison, rounding, fixed-point scaling, and GSL for reliable equality checks and numerical solving.

1 answer 1 view
ProgrammingPrint Name in C: Alternatives to printf (putchar, puts)

Discover alternative ways to print your name in C without printf: putchar loops, puts/fputs, write calls, ASCII codes, macros. Fix common issues, pros/cons, and beginner tips for print c and output in c basics.

1 answer 1 view
ProgrammingOracle APEX: Trigger Dynamic Action on Shuttle Close

Learn how to trigger a dynamic action in Oracle APEX when closing a shuttle dialog with selected values. Use apexafterclosedialog event, JavaScript condition for oracle apex item, and refresh interactive grids seamlessly.

1 answer 1 view
ProgrammingCLion 2025.3 Zephyr RTOS Setup: Fix CMake DTS Error

Fix CMake error 'file COPY_FILE failed to copy zephyr.dts.new' in CLion 2025.3 for Zephyr RTOS projects. Configure west build, CMake toolchain, ZEPHYR_BASE, and board options for STM32. Step-by-step guide with exact commands.

1 answer 1 view
ProgrammingModeling Stepwise Price Time Series: Change Points & HMM

Forecast stepwise price time series with change point detection, regime-switching (HMM), and survival models. Includes pipeline, libraries, and evaluation tips.

1 answer 1 view
ProgrammingDetect System Clock Tampering in C++20 with std::chrono

Learn to detect system clock tampering and time jumps in C++20 for cross-platform security agents. Use std::chrono::system_clock vs steady_clock polling, Windows Event ID 4616, Linux timerfd for reliable protection against clock manipulation.

1 answer 1 view
ProgrammingPython lambda in loop: closure capture and fixes explained

Why do Python lambdas in a loop capture the final value? Learn Python closures (late binding), the lambda default-argument fix, and recommended lazy-initialization patterns.

1 answer 1 view
ProgrammingAltova MapForce: Build full JSONPath using UDFs and Java

How to build a full JSONPath (e.g., $.user.profile.contact.email) in Altova MapForce using node-name and a recursive UDF. Also covers Java helper and arrays.

1 answer 1 view
ProgrammingJxBrowser Chromium Huge VIRT on Linux: Causes & Limits

Why JxBrowser's Chromium subprocesses show massive VIRT (32GB-1TB+) on Linux in top, VIRT vs RSS explained, and fixes: Chromium flags via EngineOptions, ulimit, cgroups, /dev/shm for Docker to prevent JavaFX JVM crashes.

1 answer 1 view
ProgrammingCapture Real Exceptions in .NET MAUI Windows (Visual Studio)

Diagnose runtime errors in .NET MAUI Windows: make Visual Studio break on thrown CLR exceptions, enable WinUI diagnostics, and collect dumps for full stacks.

1 answer 1 view