How to remove duplicates from a list in Python

In Python, a list is a versatile collection of objects that allows for duplicates.  But sometimes it is necessary to make the list unique to streamline our data or perform…

How to extract a sub list in Groovy

Groovy has a built-in method on the List type to return a view of the portion of a List object between the specified fromIndex, inclusive, and toIndex, exclusive. The method…

How to use SVG in React

Introduction In React, we often use SVG for icons or images. How do we use it efficiently? How do we add a number in the centre of a trolley icon?…

JavaScript Spread vs. Rest Operator

Introduction In modern JavaScript, the spread and rest operators are indispensable tools for simplifying array manipulation and function parameters. These operators provide elegant solutions for tasks like array expansion and…

How to ignore top rows in CSV or TSV files

Working with CSV or TSV files, we often ought to ignore the header row (aka. the column headers) before reading the rest of the file. To strip out the first…

How to merge arrays in JavaScript

How do you merge two arrays in JavaScript/jQuery? Method 1: Traditional or simple way – using loop Iterating on one of two arrays, get each element and append it into…

How to stop YouTube showing related videos

Unfortunately, if you’re like a lot of people and embed YouTube videos on your website, you might have noticed random videos showing up when you pause or get to the end of the video. Sometimes these videos could be from your competitors.

A short interview about An Lac House

In this post, we want to present how to embed a YouTube video into your WordPress and keep it responsive. What we need is to add a few CSS attributes…

How to prettify HTML documents at the terminal

When working with RESTful APIs, developers often hit API endpoints to test and look up data in either JSON or XML as the common formats. We have published two recent…

How to prettify JSON documents at the terminal

Nowadays, many users and application developers know that using RESTful APIs is the most common and useful to grab remotely published data. It’s often to look at any RESTful API…