Programming

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

ProgrammingJSONata: Filter an Array to Find a Specific IP Address

Use JSONata to filter an unordered array and return a specific IP address. Covers predicate queries, $filter, $contains, $indexOf and regex $match examples.

1 answer 1 view
ProgrammingDiscord.py Streak Tracking: Fix JSON Error & Persist

Fix 'unresolved reference: streak' error in discord.py roulette command. Implement per-user streak tracking with streak.json: reset on hit, increment on miss. Load, update, save for persistence in Discord bots.

1 answer 1 view
ProgrammingCombine Order & Payment in Microservices: Modular Monolith

Learn microservices patterns to combine Order and Payment in a single service using modular monolith, bounded contexts, ports-and-adapters, and saga patterns for clean boundaries and easy future extraction into independent microservices.

1 answer 1 view
Programmingdotnet User Secrets vs appsettings.Development.json

Benefits of dotnet user secrets over a gitignored appsettings.Development.json: security, per-developer scope, tooling, env var comparison, and local secrets best practices.

1 answer 1 view
ProgrammingHow Linux build system links built-in.a into vmlinux

How the Linux kernel build system uses built-in.a and KBUILD_VMLINUX_LIBS to link object files into vmlinux, and how built-in drivers differ from modules.

1 answer 1 view
ProgrammingFix C++ Undefined Reference Across Multiple Files

Resolve C++ 'undefined reference to' errors when one .cpp file can't access functions from another. Learn header declarations, proper linking with g++, makefiles, IDE setup, and common pitfalls for multi-file compilation.

1 answer 1 view
ProgrammingJack Henry SilverLake TrnCodeCode: Retrieve Values

TrnCodeCode values in Jack Henry SilverLake are FI-specific and not public. Use ParmValSrch (ParmName='TranCodeCode'), AcctHist/AcctRecon, or TrnAdd test posts.

1 answer 1 view
ProgrammingGraceful Shutdown Epoll Kqueue Go: Unblock Wait

Learn to unblock epoll_wait or kevent for graceful shutdown in Go event loops. Use eventfd, self-pipe like Go runtime and evio. Handle signals, drain connections in epoll server or kqueue setups.

1 answer 1 view
Programmingp5.js: Spawn Road Markings & Remove Off-Screen Objects

Spawn multiple road markings in p5.js using an array. Use frameCount to spawn, safely remove off-screen items, and cap the array at 20 for performance.

1 answer 1 view
ProgrammingRust: Compare u16 to #[repr(u16)] Enum Variant

Learn how to compare a u16 value to a #[repr(u16)] Rust enum variant like packet types from devices. Use casting with 'as u16', pattern matching, or TryFrom for idiomatic, safe comparisons without PartialEq errors.

1 answer 1 view
ProgrammingPrettier XML Formatting: Inline/Block Elements & Whitespace

Learn how to format XML with Prettier XML plugin, handling inline vs block elements correctly. Preserve whitespace using xmlWhitespaceSensitivity, prettier-ignore, xml:space, and CI-ready alternatives like xml-formatter or xmllint.

1 answer 1 view
ProgrammingSpring WebClient Reactor Netty Proxy Configuration

Make Spring WebClient use a proxy with Reactor Netty: configure the proxy in tcpConfiguration, tune timeouts, and add auth or DNS fixes to avoid proxy timeouts.

1 answer 1 view
ProgrammingFix Inaccurate OpenCV Template Matching in C++ Quickly

Why OpenCV template matching fails for C++ object detection and how to fix it: multi-scale, edge preprocessing, robust thresholds, or feature-based methods.

1 answer 1 view
ProgrammingFind Duplicates in Python Lists: Set, Counter, Sort

Efficient methods to find duplicates in Python lists using sets, collections.Counter or sorting. Handles unhashable items and covers time and space complexity.

1 answer 1 view
ProgrammingAppleScript Object Specifier for Shared Cocoa Objects

Assign stable UUIDs, expose an app-level resolver, and return NSUniqueIDSpecifier so AppleScript recognizes shared Cocoa objects as identical. Fast and stable.

1 answer 1 view
ProgrammingMiniZinc cumulatives: model staff schedules & breaks

Model office hours, lunch breaks and weekends in MiniZinc using cumulatives. Time-compression, per-time capacities, and task-splitting to allow resumes.

1 answer 1 view
ProgrammingSink Mark Defect Detection for Chair Seats (Small Data)

Practical guide to sink marks defect detection on chair seats using classical CV and anomaly detection. Works with very small datasets (15 normal, 3 defects).

1 answer 1 view
ProgrammingBlazor Roslyn Analyzer Components Render Nothing Fix

Fix Blazor components generated by Roslyn analyzer that compile but render nothing. Learn why analyzers fail, switch to source generators, debug steps, and build settings for proper Blazor rendering.

1 answer 1 view
ProgrammingInteractive GraphViz DOT Editors: yEd, qvge & Online

Discover interactive graph editors for GraphViz DOT files that support importing, editing node positions, connections, and exporting back to DOT. Try yEd Graph Editor, qvge, Graphviz Visual Editor, Edotor for reliable round-trip editing.

1 answer 1 view
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