Creating a family tree website – need advice

Summary Creating a family tree website requires a well-structured data model to efficiently store and retrieve relationships between individuals. The key to this project is selecting the right data structure and storage method. Given the small size of the project, a simple yet effective approach can be implemented using a combination of graph data structures … Read more

How to CSS animate a hand-made carousel?

Summary The issue at hand is creating a smooth animation for a hand-made horizontal carousel component in React when clicking the chevron images to slide the carousel. The current implementation lacks this animation, resulting in an abrupt change when navigating through the carousel items. Root Cause The root cause of this issue is the lack … Read more

How can a wrapping Publisher operator also conform to ConnectablePublisher only when the upstream publisher does?

Summary The problem revolves around creating a wrapping Publisher that conforms to ConnectablePublisher conditionally, based on the behavior of the upstream publisher. This requires a nuanced approach since the standard wrapper does not accommodate conditional connectability. The solution involves using inner classes to maintain mutable data secretly within a structure, allowing for dynamic adjustment of … Read more

Office-JS Word Add-in extremely slow when inserting 90k+ soft hyphens (>300 page document)

Summary The Office-JS Word add-in is experiencing extreme performance issues when inserting 90,000+ soft hyphens into a large document (~300-350 pages). The current implementation, which uses insertText and getOoxml/insertOoxml, is slow and inefficient, taking around 60-100 minutes to complete. The goal is to achieve this task in under a few minutes or seconds without breaking … Read more

I want advice on “how to parse any file using python/java/c?”

Summary When dealing with parsing files in programming, choosing the right approach is crucial for efficiency and reliability. The decision to build a custom parser or use existing libraries depends on several factors, including the type of file, availability of libraries, and the programming language being used. Understanding the file format and evaluating available libraries … Read more

Should I log exceptions when raising or when catching?

Summary When dealing with exceptions in programming, a common dilemma arises: where to log the exception. The two primary options are logging the exception when it is raised or when it is caught. Understanding the trade-offs between these approaches is crucial for effective error handling and logging. Root Cause The root cause of this dilemma … Read more

how to carryon after matplotlib has been called

Summary The issue at hand is that the code execution stops after displaying an image using matplotlib. This is due to the way matplotlib handles its event loop, particularly when plt.show() is called. By default, plt.show() blocks the execution of the code until the plot is closed. To continue execution after displaying the image, we … Read more