TypeORM: Using LIKE Operator (2 Examples)

September 4, 2022 Snowball

In TypeORM, the Like operator (with the percent sign %) is used to search for a specified pattern in a column. This concise article walks you through 2 examples of selecting data with the Like operator…

TypeORM Upsert: Update If Exists, Create If Not Exists

September 20, 2022 Snowball

Upsert (this term is combined from two words: update and insert) is a database operation that updates a record it already exists in a table. Otherwise, insert a new row if that record doesn’t exist. This…

TypeORM: Check Whether a Row Exists or Not

September 1, 2022 Snowball

The 2 examples below demonstrate how to check if a record exists or not by using TypeORM findOne() method and query builder, respectively. Using the findOne() method Suppose we need to find a product named KatherineCode.com,…

Node.js: Turn a Relative Path into an Absolute Path

September 1, 2022 Snowball

In Node.js, you can convert a relative path to an absolute path simply by using the path module, like this: This is my output on macOS (if you’re using Windows, your result will be more or…

Javascript: Convert Relative URLs to Absolute URLs

September 1, 2022 Pennywise

In Javascript, you can easily convert a relative URL to an absolute URL like so: This works well regardless your relative URL starts with a slash (“/”) or not. Below is a concrete example: Output: Alternative…

TypeORM: Find Rows Where Column Value is IN an Array

August 31, 2022 A Goodman

This short and straight-to-the-point article shows you 2 different ways to use the WHERE IN query in TypeORM (in case you want to search for rows whose column values are an element of a given array)….

How to Store JSON Object with TypeORM

August 31, 2022 A Goodman

If you want to store some kind of flexible data with TypeORM, you can save them as JSON. You can specify the column type as simple-json. This helps you store and load Javascript objects with ease….

TypeORM: Add Columns with Array Data Type

August 31, 2022 A Goodman

When using TypeORM, it’s possible to define columns with the array data type. If you want to add a column that stores arrays of numbers, you can define it like so: In case you need a…

How to Create a Pandas Series from Python Lists

August 30, 2022 Augustus

A Pandas Series is a one-dimensional arraylike object holding a sequence of values of any type and an associated array of data labels (index). You can create a Pandas Series from one or multiple Python lists…

React: Using inline styles with the calc() function

August 24, 2022 A Goodman

This short and straightforward article shows you how to use the CSS calc() function when using inline styles in React. Overview The calc() function calculates the value for a property (addition, subtraction, multiplication, and division operations):…

React: Create an Animated Side Navigation from Scratch

August 24, 2022 A Goodman

Introduction In modern web apps built for both desktops and mobile devices, side navigation menus are often used for their convenience. These side navigation menus can be opened or closed by the user, thus saving space…

Using Range Sliders in React: Tutorial & Example (2022)

August 24, 2022 A Goodman

This succinct, practical article shows you how to implement and customize range sliders in React. Everything will be made from scratch without using any third-party libraries. I won’t waste your time and bore you with little-meaning…

1 2 3 4 5 85