Programming

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

ProgrammingConditional MFA in Spring Security 7: OIDC vs Password

Implement conditional MFA in Spring Security 7: skip email OTT for OIDC providers like Google/Facebook, enforce password + OTT for username/password logins. Custom handlers, managers, and full code examples for provider-based security.

1 answer• 1 view
ProgrammingPython with Statement: Multiple Variables Syntax Guide

Learn how to declare and manage multiple variables with Python's with statement. Explore syntax options, advanced techniques with ExitStack, and best practices for resource management.

1 answer• 1 view
ProgrammingPySpark: Merge Consecutive Rows by PersonID & JobTitleID

Learn to merge consecutive rows in PySpark DataFrames by PersonID where JobTitleID matches, using pyspark window functions and groupby pyspark to extend pyspark timestamp from min to max. Scalable gaps-and-islands solution with code examples.

1 answer• 1 view
ProgrammingMove Uncommitted Git Changes to Another Branch

Learn how to safely move uncommitted changes to another Git branch using git stash, git switch -c, or git checkout -b. Avoid losing work when switching branches with conflicts—step-by-step guide with examples.

1 answer• 1 view
ProgrammingBest Gliner Alternatives for Russian NER: Slang & Typos

Top Gliner alternatives for Russian NER handling slang, typos, abbreviations. Natasha/Slovnet, spaCy NER, RuBERT extract products & prices from chats efficiently on CPU.

1 answer• 1 view
ProgrammingJavaScript Round to One Decimal: Proper Rounding Methods

Learn reliable methods to round numbers to exactly one decimal place in JavaScript. Fix floating-point precision issues with toFixed(), Math.round(), and exponential notation approaches.

1 answer• 1 view
ProgrammingFix Eclipse Java Code Completion Not Working Issues

Troubleshoot Eclipse Java code completion issues in Eclipse 3.4.2. Learn how to fix 'No completions available' errors by checking build paths, content assist settings, and plugin conflicts.

1 answer• 1 view
ProgrammingJetty 12 ClassNotFoundException for ResourceServlet Fix

Resolve Jetty 12 ClassNotFoundException for org.eclipse.jetty.ee10.servlet.ResourceServlet on /webapp/* paths. Fix WebAppClassLoader isolation with parentLoaderPriority or bundle ee10-servlet JARs in web.xml for static resources in Java 21 WAR deployments.

1 answer• 1 view
ProgrammingFix TIBCO BWCE JMS Send Palette ApplIdentityData in MQMD

Configure TIBCO BWCE Studio 2.10 JMS Send palette to pass ApplIdentityData in MQMD to IBM MQ. Add WMQ_MQMD_MESSAGE_CONTEXT=3, update XSLT, destination URL with targetClient=1, and avoid common pitfalls for reliable TIBCO integration.

1 answer• 1 view
ProgrammingHow to Parse Invalid XHTML with HTMLAgilityPack C#

Learn to use HTMLAgilityPack C# for parsing invalid XHTML. Basic steps include installing via NuGet, loading malformed HTML with LoadHtml, querying via XPath or LINQ, and handling parse errors with code examples for web scraping.

1 answer• 1 view
ProgrammingSecure Parameter Passing in Gorm ORDER BY Clause

Learn how to securely pass parameters into Golang Gorm ORDER BY clauses using clause.Expr for custom ordering with array_position.

1 answer• 1 view
ProgrammingDiscord Embed with Button on Same Line Opens Modal

Learn how to place text and buttons on the same line in Discord embeds. Create interactive bot messages where clicking buttons opens modal windows for user input.

1 answer• 1 view
ProgrammingPython Mouse Automation with QR Code Trigger

Learn how to create a Python script that automates mouse clicks at specific screen coordinates triggered by QR code scanning using PyAutoGUI and pyzbar.

1 answer• 1 view
ProgrammingOptimize WPF Drawing for Fast Panning/Zooming Large Datasets

Fix slow WPF custom drawing in C# during panning and zooming with thousands of points/lines. Use DrawingVisual, StreamGeometry batching, viewport culling, freezing, and transforms to achieve WinForms/Qt speeds.

1 answer• 1 view
ProgrammingWiX Toolset: Change MSI Uninstall Product GUID Key?

In WiX Toolset v5/v6, can you change MSI uninstall registry key from Product GUID to custom name like 'MyApp'? No, per MSI standards, but customize DisplayName and use registry query workarounds for wix msi uninstall handling.

1 answer• 1 view
ProgrammingJava 8 Parallel vs Sequential Streams: Performance Guide

Learn when to use Java 8 parallel vs sequential streams for optimal performance. Discover key factors like dataset size, operation complexity, and hardware considerations.

1 answer• 1 view
ProgrammingLine Breaks in Markdown Presentations: TeX ewline Equivalent

Learn how to add line breaks in markdown presentations with the TeX ewline equivalent. Discover the two-space method, HTML `<br>` tags, and backslash approach for different presentation frameworks.

1 answer• 1 view
ProgrammingCheck if Key Exists in std::map C++: find & contains

Learn how to check if a key exists in std::map using find, contains (C++20), count, and fix equal_range errors. Avoid operator[] inserts with code examples and best practices for C++ map lookups.

1 answer• 1 view
ProgrammingFix Eclipse CDT Invalid Arguments for Dear ImGui

Resolve Eclipse CDT 'Invalid arguments' errors for Dear ImGui functions like ImGui_ImplOpenGL3_NewFrame() in Makefile projects. Add impl files, define macros, rebuild index for perfect indexing.

1 answer• 1 view
ProgrammingWhy sub esp,8 After stdcall Call But Not Cdecl?

Understand why compilers generate 'sub esp, 8' after stdcall calls but not cdecl in unoptimized x86 assembly. Explains stack frame management, ret 8 vs ret, and calling conventions differences for debugging.

1 answer• 1 view