In order to collect a timestamp using React I have long been searching for components which could help me to do so. There are various libraries available, but ironically none of them help me more than the browsers built in
datetime-local input type.
So I went and implemented this input type, however, there were some complications regarding data updates, especially when changing the date. I have written out a fairly basic but nice working component with which I can collect a datetime.
While developing a realtime feature within a React Native app I discovered a specific quirk within the React Native Navigation library which leaves components mounted, even after the active route has changed. Based on the documentation I believe this has been an intentional design decision, though I couldn’t find any specifics about this.
The issue manifested itself when working with a GraphQL subscription which kept receiving data even after one navigated away from the page (component). This resulted in an unnecessary CPU and memory drain and impacted performance of the application. As stated within the Apollo GraphQL documentation, the
useSusbcription hook should automatically unsubscribe once the component is unloaded.
When you end up on Stripe’s landing page their UI leaves an impression. However, this is just the topping on the ice given they have done a tremendous job to offer services with which they facilitate an impressive number of payment scenarios. However impressive this is, it can be also be quite overwhelming for someone implementing a Stripe integration for the first time. This post provides a rough blueprint about how you can implement subscriptions within your application using Stripe, with code examples provided in C#.
UPDATE In the first version of this post I have made an error with regard of the retrieval of possible matches. The update has fixed that.
Sometimes I find myself in a situation where I need a very specific data structure with very specific properties. This time I needed something with which I can quickly retrieve nearby elements in 2D space. Although there are data structures perfectly suited to do so, such as a R-Tree, Kd-Tree and other related structures, I needed something which is very easy and somewhat performant to insert into and remove from.
During my journey in implementing the algorithms as described in the paper “High-performance spatiotemporal trajectory matching across heterogeneous data sources” I found a requirement to run linear interpolation on two data sources. In this blog post I describe the most important pieces of logic used for the interpolation or extrapolation of two sets. This code is written using C#, but the algorithm should be fairly easy to port to other languages.
Suicide as a result of depression is a topic I have subtly written more about in the past. This time I specifically want to cover the question whether the act of committing suicide can be deemed good or bad. Have people a right to commit suicide, and how far may relatives go to prevent one from committing suicide? Lately I have been discussing the morality of suicide with a few different people which yielded an interesting viewpoint I want to write some more about.
Be notified when I publish something new by subscribing to this newsletter, or add my feed to your favourite RSS reader.
Don't worry, I will not spam you nor sell your email address to hackers!