Sponsored links
Python

Spread operator in Python? How to unpack list/dict

How can we write if we want to unpack a list in Python? Is there something like spread operator used in JavaScript? Yes. Use an asterisk to unpack the list. Use double asterisk for dict type. Let's look at the examples.
Python

Python How to filter object list

Why doesn't Python provide a method to filter a list? It provides filter class instead. You can use it to filter a list/dict. You can also use basic for-loop to do the same thing. Let's learn how to filter a list in this post!
Python

Python How to create multiple Threads for async

To make multiple tasks asynchronously, it's necessary to know how to create threads in Python. This post shows how to do it.
Golang

Golang Improper package structure exports unneeded members

Do you want to write unit tests for methods but don't want to expose them to outside of the package? Then, move the methods to internal package. The functions defined in internal package are not exposed. Let's learn how to use it.
Python

Python Using Literal type to restrict the parameter

How can we restrict parameter values in Python? Use Literal. Enum can also be used for the same purpose but it can break the existing code. Let's learn how to use Literal together.
Golang

Golang How to mock an object by yourself for unit testing

It might be too big to introduce a mock framework. It's better to create a mock object by ourselves in this case.
Golang

Golang How to accept an arbitrary number of arguments

Are you searching for a way to accept an arbitrary number of parameters? Can the parameters have mixed data types? Then, this post is for you. Let's handle the parameter depending on the type.
Golang

Golang How to get value from any/interface

If a function has a parameter that is any or interface{}, it's not possible to access a property by a dot chain. How can we read a value in this case?
Python

Python How to create a missing key automatically

How can we create a dictionary in python? Once it's created, we need to add/delete/update/get value. This post covers all your needs.
Dart and Flutter

Flutter How to show selected area on Slider

How can we show the selected area on a slider widget? Using Stack is one of the solutions but it's necessary to consider the padding value to show the selected area accurately. Let's learn how to do it!
Sponsored links