Programming

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

ProgrammingDraw Accurate US Flag in FMX TPaintBox (50 Stars)

Learn to draw precise US flag with 13 stripes, blue canton, and 50 stars in Delphi FMX TPaintBox. Fix star positioning math, use correct proportions, and render five-pointed stars on canvas for authentic results.

1 answer• 1 view
ProgrammingImplement Undo Redo in C++ Gap Buffer Text Editor

Step-by-step guide to implement undo and redo functionality in a C++ text editor using gap buffer data structure. Beginner tips, code examples, best practices, and performance optimization for efficient editing.

1 answer• 1 view
ProgrammingHow to Get a Tkinter Menu's HMENU on Windows (Fast)

Why Tkinter doesn't expose a native HMENU on Windows, how to retrieve it with MN_GETHMENU + SendMessage when posted, and use SetMenuInfo to set a background.

1 answer• 1 view
ProgrammingC++ coroutine: lifetime of temporary bound to reference

C++ coroutines materialize temporaries into the coroutine frame and store references there, so references to them remain valid across suspension. Key rules.

1 answer• 1 view
ProgrammingFix QOpenGLWidget Flicker in PySide6 Layouts

Embed QOpenGLWidget in PySide6 layouts without flickering on resize or idle. Step-by-step fixes, working code example, platform tips for Linux/Windows, and Qt bug workarounds using attributes and QSurfaceFormat.

1 answer• 1 view
ProgrammingFix Identical Metrics in TensorFlow Keras CNN Backbones

Diagnose and fix identical accuracy, F1, AUC metrics across VGG16, ResNet50, DenseNet121 in TensorFlow Keras on medical imaging datasets. Check metric state, tf.data caching, preprocessing issues.

1 answer• 5 views
ProgrammingManim CE OpenGL: Fix Text Rendering Issues

Resolve text and graph rendering problems in Manim CE OpenGL with interactive_embed(). Learn causes and solutions for accurate rendering.

1 answer• 4 views
ProgrammingFix Python ModuleNotFoundError in VS Code After Pip Install

Resolve Python ModuleNotFoundError when importing modules in VS Code after pip install. Learn common causes like wrong interpreter, unactivated virtual environment, name collisions, and step-by-step fixes including selecting the correct Python interpreter and using python -m pip.

1 answer• 4 views
ProgrammingFix Kotlin Deserialization Errors in Spring AI MCP Server

Resolve 'Cannot construct instance' deserialization errors for complex Kotlin data classes like List<Person> in Spring AI MCP Server with streamable-http. Configure jackson-module-kotlin, kotlin-reflect, and custom ObjectMapper bean using Jackson2ObjectMapperBuilder.

1 answer• 3 views
Programmingjpackage MSI Uninstall: Fix File Deletion When App Running

Ensure complete file deletion during jpackage MSI uninstallation when Java app is running. Use Restart Manager, WiX custom actions, and post-uninstall cleanup for Microsoft Store compliance and clean removal of all files and folders.

1 answer• 2 views
ProgrammingIs JavaScript Learning Progress Normal After 20-25 Hours?

Assess if your JavaScript learning progress and OOP approach is typical after 20-25 hours with Python background. Code review, fixes, roadmap, and tips for beginners tackling JavaScript OOP challenges.

1 answer• 2 views
ProgrammingH.264 CAVLC: run_before > zerosLeft Table 9-10 Fix

Fix H.264 CAVLC decoding errors where run_before exceeds zerosLeft in Table 9-10. Learn validation rules, prevent negative zerosLeft, and implement compliant residual block decoding for H.264/AVC decoders.

1 answer• 2 views
ProgrammingCannot assign void to an implicitly-typed variable in C#

Fix 'Cannot assign void to an implicitly-typed variable' in C#: why Split(...).Reverse() may bind to Array.Reverse, missing System.Linq, and practical fixes.

1 answer• 2 views
ProgrammingFix PySpark Pytest Py4JJavaError on Windows 11 SparkSession

Resolve Py4JJavaError in PySpark pytest fixtures on Windows 11 by adding spark.driver.bindAddress=127.0.0.1 to SparkSession. Includes working conftest.py, winutils setup, env vars checklist for local tests.

1 answer• 2 views
ProgrammingRemove Extra Faces on End Caps After Boolean in Blender

Fix extra faces on end caps after Boolean subtract modifier in Blender 5.0.1. Use Exact solver, delete inner caps, cleanup with Merge by Distance, Limited Dissolve, and Select Similar for clean topology.

1 answer• 2 views
ProgrammingMplfinance Alternatives: Plotly, Bokeh & Lightweight-Charts

Find modern mplfinance alternatives - Plotly, Bokeh, Lightweight-Charts - for interactive OHLC/candlestick charts with volume, pandas support and live updates.

1 answer• 2 views
Programming.NET Minimal API Validation Fails Across Assemblies

Why .NET Minimal API validation breaks with generic endpoints in different assemblies. Source generator limits, resolver scanning issues, and workarounds like custom filters and FluentValidation for modular CQRS setups.

1 answer• 2 views
ProgrammingUsing Avalonia Theme Colors and Brushes for Custom UI

Learn how to reference Avalonia theme colors and brushes in XAML and code for custom UI elements. Use DynamicResource, TryGetResource, and ColorPaletteResources to match Fluent or Simple themes dynamically across light and dark variants.

1 answer• 2 views
ProgrammingC Integer Literal Promotion: Windows vs Linux Diff

Why does C integer literal promotion for 2654435769 differ between Windows (LLP64) and Linux (LP64)? Explains signed vs unsigned rules, truncation in uint32_t mul, and fix with 'u' suffix for cross-platform code.

1 answer• 1 view
ProgrammingPractical Self-Contained Boolean Lambda Use Cases in Python

Discover practical use cases for self-contained boolean lambda functions in Python using equality operators. Examples for filtering with python filter lambda, sorting via python sorted lambda, predicates, and more without external dependencies.

1 answer• 1 view