Python

Python Set value for many properties if it is not None

It is not good to write Null check as many properties as we need. It should be written in a single place. Define a function and call it for the necessary properties.
JavaScript/TypeScript

Implementation of D Way Heap in TypeScript

Explains how D-way heap works and how it can be implemented in TypeScript. If you need to update/remove an element, it does it in a very short time.
JavaScript/TypeScript

FATAL ERROR: invalid array length Allocation failed

Isn't there an infinite loop in your code? Don't you edit an array in the loop? If so, use the copy instead.
Sponsored links
JavaScript/TypeScript

TypeScript Find the lowest missing number in an array

It explains how to find the lowest missing number in an array. Not only for an array that starts with 0 but also starts with an arbitrary value. Furthermore, the step between the values can change.
Python

Python Reconstruct dictionary by splitting a formatted key string

The module that I used returned a dictionary but it didn't have any nested objects. It looks like this below. data =...
Docker

Python install Poetry in Docker container with VSCode

It took me a while to find out how to poetry install in Docker container with VSCode. So, I wrote this article for othe...
Other techs

Assign a value to VSCode launch.json depending on env value with Makefile

I wrote the following post before. But this requires manual steps. I wanted to automate it, so I needed to change the h...
Python

Python mockito to stub an object for unit testing

mockito is used in the project where I recently joined. I checked the official site but it doesn't have enough examples...
Other techs

VSCode + WSL2 + devcontainer for dev environment

If we could establish dev environment in a Docker container, it is easy to share the environment. It's easy to set up t...
Python

Python join function that works for list of list with non-string values

It occurs an error when join function is called with the following values. # TypeError: sequence item 0: expected st...
Copied title and URL