React-csv issue in async data and rendering

In frontend development sometimes you need to export the data (usually in JSON format) as downloadable csv format, and for those working on ReactJS related web applications, there is a package named react-csv that can save you from breaking the DRY… However, you may also encounter issues when applying this package in some specific scenarios, such as the one I’m writing down soon which involves in data being loaded asyncronously but needed for initial UI rendering.

Python topics of interest

List of python topics of interest.

Install docker on ubuntu

Command list to install docker ce on ubuntu (17.10).

MySQL delete table rows and reset index

How to delete all rows of a table and also reset the index.

Insert images into excel with POI

How to insert images when outputting excel using POI packages in Java.

Java group list objects by attribute

How to group a list of objects by one of the object’s attribute, which is similar to SQL group by statement and having the same results.

ThreadPoolExecutor map method with multiple parameters

ThreadPoolExeuctor from concurrent.futures package in Python 3 is very useful for executing a task (function) with a set of data (parameter) concurrently and this post lists examples on how to pass MULTIPLE parameters to the task being executed.

Floating horizontal scrollbar

How to use a jquery plugin to implement floating horizontal scrollbar, which is especially useful for single page application where partial content of the page (i.g. table of data) are large and dynamically updated and you don’t want to make use of the browser scrollbar for scrolling the partial content.

Java POI excel merge cell and style

Quick code example on how to merge cells with POI and apply cell style to the merged cell.

Java stream distinct by property

Java 8 stream has a distinct() method which could be used to filter out a list of distinct objects, but the distinctness of that method is based on Object.equals(Object). What if you want to filter a list of objects based on any property (field) of the object? The StreamEx library comes as an elegant solution.