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

dbSendQuery fetches all rows when querying DuckDB

Summary The issue at hand involves the dbSendQuery function in R, which is used to send a query to a database and retrieve the results. In this case, when querying a DuckDB database, the function fetches all rows instead of allowing for batch processing, leading to excessive memory usage. This behavior is not observed when … Read more

Title: Project: Messaging Layer over DNS – Feasible or interesting?

Summary The concept of creating a messaging layer over DNS is an innovative approach to establishing a communication network that can operate under suboptimal conditions, such as frequent internet outages and high data costs. This idea aims to leverage existing and universally accessible protocols like DNS to create a minimal text messaging layer without relying … Read more

Issues with deleting File Search Stores and indexed documents

Summary The Google Gemini File Search API is experiencing performance issues and errors when managing a large volume of indexed documents. Specifically, there are two main issues: Performance bottlenecks when locating and deleting specific files due to the lack of filtering capabilities in the API 503 Service Unavailable errors when deleting a File Search Store … Read more