Home » Articles by: Brad Morton

Bash Scripts Set Environmental Variables with EXPORT [HowTo]

Bash Set/Export Environmental Variable

This tutorial will show you how to set environmental variables in Bash/Shell scripts using the export keyword. Generally, variables declared in Bash/Shell scripts exist only within the scope of that running Bash/Shell script. To make them available elsewhere, they can be set as an environmental variable – meaning that the variable will be available when executing commands outside of the script on your system – for example, making the variable available from the command line after the script has completed. The export keyword does this – … Read more

Home » Articles by: Brad Morton

JavaScript Libraries We’re Using to Build Apps in 2022

Javascript Libraries

JavaScript libraries take the legwork out of building complex applications. Here are some of the most useful libraries to use in 2021/2022. Once you’ve graduated from ‘Hello World!‘ and understand how JavaScript works, you’ll probably want to dive into building something more useful – a website, or a service, or a mobile app. These all have many moving parts – Authentication so users can log in, database support for storing data, file uploads so users can store their cat pictures in the database – all of these … Read more

Home » Articles by: Brad Morton

The JavaScript Frameworks We’re Using for 2022

Javascript Frameworks

When building a JavaScript application, you don’t need to write everything from scratch. Instead, javaScript frameworks provide the base to build your app. Here are the ones we’re using in 2021 and into 2022. Node.js https://nodejs.org/en/ JavaScript originated as a scripting language for use on web pages – to be executed within a web browser. Node.js breaks JavaScript out of the browser and allows it to run stand-alone. It’s not technically a framework, but you’ll need to know what it is as some frameworks will run … Read more

Home » Articles by: Brad Morton

Kibibytes, Mebibytes, Gibibytes, Tebibytes… What are They?

Kibibytes, Mebibytes, Gibibytes, Tebibytes

This article will explain what the kibibytes, mebibytes, gibibytes, tebibytes storage units are in relation to Kilobytes, megabytes, gigabytes, and terabytes. … So What are They? Simply, they are a different set of storage units used to express/measure file sizes. They are analogous to kilobytes, megabytes, gigabytes, and terabytes – and often used interchangeably – but they are not the same. Kilobytes, megabytes, etc., all measure units in thousands – 1000 kilobytes to a megabyte, 1000 megabytes to a gigabyte, and so on. This is the decimal measurement system of … Read more

Home » Articles by: Brad Morton

Check if a JavaScript Variable is an Array with isArray() [Examples]

Javascript Array.isArray()

Here’s a short article that explains arrays and how to check if a JavaScript variable is an array using the Array.isArray() method. Want to check out whether an array contains a value? Find out how here. What is An Array? An array is a type of JavaScript variable that can hold other variables, or references to other variables, in a list at a certain position. Declaring an Array in JavaScript An array is declared in JavaScript the same way as any other variable – by assigning the value … Read more

Home » Articles by: Brad Morton

Checking for null values in JavaScript, With Examples

Javascript Null Check

What is null in JavaScript, and how can you check if a value is equal to null? Read on to find out. What is Null? Null is a term with a special meaning in computing and computer programming. Null is not 0 (zero). Null means that something has no value. Zero is a value (a number). An empty string has a value (though sometimes called a null string, they aren’t null). A variable with a value of null is considered to be empty. It is not undefined – it has been defined … Read more

Home » Articles by: Brad Morton

How to Remove Duplicates From an Array in JavaScript [Examples]

Javascript Remove Duplicates from Array

Being able to remove duplicates from (or de-duplicate) an array is a useful thing to be able to do. Here’s how it’s done. What is an Array? In programming, an array is a type of variable that can hold other values, or references to other variables, in a list at a certain position. Arrays are vital to building any application – allowing you to store a list of variables or values of any length in a single variable – ready to be iterated over, processed, … Read more

Home » Articles by: Brad Morton

JavaScript – Pausing Execution or Sleep Function Equivalent

Javascript Pause/Sleep

JavaScript does not include a sleep function to pause execution – but you can achieve the same effect with this simple code. Unlike shell scripts and PHP, JavaScript does not include a built-in function to pause execution for a set amount of time. In other programming languages, this is usually called the sleep function. Unfortunately, JavaScript doesn’t have an equivalent function, but we can build one ourselves! JavaScript Promises Modern versions of JavaScript include support for new functionality called promises. Put simply; a promise is a new … Read more

Home » Articles by: Brad Morton

How to Use the MySQL/MariaDB COUNT Function, With Examples

MySQL Count

This quick article will demonstrate how to use the MySQL/MariaDB COUNT function to count the number of records returned by a query. MySQL/MariaDB COUNT Function Syntax COUNT(query) Note that: query can be an SQL query or a string representing a column name Null values found by the query will not be counted The COUNT function will return the number of matching records for a query and should be combined with the SELECT statement to output the result. Example Data The below examples use the following … Read more

Home » Articles by: Brad Morton

The MySQL/MariaDB DELETE Statement – How to Use It

MySQL Delete

Being able to delete data from a table in a database is a pretty important thing – This article will show you how it’s done in MySQL/MariaDB. MySQL DELETE Statement Syntax In its basic usage, the DELETE operator is used in conjunction with a WHERE query to delete records matching that query: DELETE FROM table WHERE query; Note that: table is the table you wish to delete records from query is the query that defines the conditions records should match to be deleted Safety First! Please … Read more