Home » Articles by: Brad Morton

Python – Concatenating Iterators With itertools.chain() [Examples]

Concatenate:join iterables using chain in Python

This tutorial will show you how to join/concatenate/merge iterables in the Python programming language, and provide code examples. What is an ‘Iterable’ in Python? An iterable is any kind of Python object that can return each of its members one at a time. Put simply, it’s any Python object that contains multiple values that can be looped over. Python’s built-in Iterables include lists, strings, and tuples — all object types which can be represented as a sequence of values. Iterating over Iterables To demonstrate this behaviour, we can create a list of strings, … Read more

Home » Articles by: Brad Morton

LinuxScrew Guide for Developers Learning PostgreSQL

Learn PostgreSQL Guide

This page serves as the index for our PostgreSQL tutorials. It will be updated as new articles in the series are added. This guide is intended for developers who are just getting started with PostgreSQL and are looking for a simple resource to get them up and running. PostreSQL Guide Introduction: What is PostgreSQL? Why Use It ?

Home » Articles by: Brad Morton

How to Use while Loops in Bash/Shell Scripts [Examples]

Bash while Loops

This article will show you how to use while loops in Bash/Shell scripts, and provides some code examples. Bash scripts let you automate tasks in the linux shell. Often, you’ll want to repeat a task for a set of data or repeated user input – that’s what while loops are for – they let you loop or iterate over a sequence of data or input, making it easy to build scripts that repeat a set of actions. The while loop syntax demonstrated below will also work for the Zsh shell and … Read more

Home » Articles by: Brad Morton

KDE Neon Linux Mini Review 2022 + Screenshots

KDE Plasma 5 Neon review screenshots

This review will show you what KDE Plasma 5 and KDE Neon look like in 2022, from installation to the desktop, and provide some thoughts on usability and how it stacks up against other GUIs like Gnome and MATE. What is KDE? KDE is a Desktop Environment mainly used on Linux systems.  It has since grown into a large development communitity working on a variety of desktop software projects including UI frameworks for use with the KDE desktop environment, and a suite of applications including … Read more

Home » Articles by: Brad Morton

GB Studio Linux Mini Review + Screenshots

GB Studio Linux screenshots mini review

GB Studio is an easy to use game development tool that lets you make make games in a simple drag-and-drop interface.  Here’s a short review including screenshots of GB Studio running in Linux. In this article, I’ve taken some screenshots and made some notes as I installed and got up and running with GB Studio – it serves as a quick guide/review so you know what to expect if you decide to check it out. What is GB Studio? GB Studio is probably one of … Read more

Home » Articles by: Brad Morton

How to Use the Bash case Statement, With Examples

How to Use Bash case Statements

The case statement is used to choose which code to execute based on the value of a variable or expression. Here is how to use it in your Bash scripts. What Does the case Statement Do? The case statement is a convenient alternative to using multiple if/if else statements when you are deciding what action to take based on the value of a variable or expression. For example, if you have a variable called weekday, you can executed different code based on which day of the week is named in the variable, … Read more

Home » Articles by: Brad Morton

PostreSQL Guide Introduction: What is PostgreSQL? Why Use It ?

PostgreSQL Introduction - What is PostgreSQL

This article is part of the LinuxScrew Guide for Developers Learning PostgreSQL. PostgreSQL is a relational database management system. It is similar to other networked SQL database servers like MySQL/MariaDB and Microsoft SQL, but there are some key differences in features and functionality. PostgreSQL vs Other Database Systems You can see a comparison of PostgreSQL and other database systems here. In short, while MySQL is the most popular open source database system, PostgreSQL is more advanced. PostgreSQL is object oriented, can store a larger number of types … Read more

Home » Articles by: Brad Morton

Filter JavaScript Array With Multiple Conditions/Values [Examples]

JavaScript filter array using multiple conditions/values

This article will show you how to filter an array using multiple conditions, to return multiple values. Example code is provided. We’ve already covered filtering arrays in general – this article covers specifically how multiple conditions can be used with the Array.filter() method. The Array.filter() Method The filter() method is available on all arrays in JavaScript. It creates a new array, containing only the items from the original array which passes all conditions in a provided function. filter() Method Syntax The syntax for the array filter() method is as follows: ARRAY.filter(ELEMENT => FUNCTION) Note that: ARRAY is … Read more

Home » Articles by: Brad Morton

The JavaScript valueOf() Method – What Does it Actually Do?

JavaScript valueOf()

This quick tutorial will explain the JavaScript valueOf() Method, what it does, and why you might use it. The JavaScript valueOf() method gets the primitive value of the object it is called from. Usually you will not need to call it, however it does have its use cases. Primitives vs Objects In JavaScript, a value or variable has a type of value. A primitive is a value that is not an object, with no methods or properties, representing only the data that it exists as. JavaScript has 7 primitive data types: string number bigint boolean undefined … Read more

Home » Articles by: Brad Morton

Check/Validate String Matches Regex in JavaScript [Examples]

JavaScript regex match

This article will show you how to use Regular Expressions (Regex) to validate matching strings in JavaScript. All user input collected in your applications should be validated. If an email address is required, a valid email address should be entered, or sending the email will fail. If a phone number is required, a valid phone number must be entered, and so on. Regex can be used for this validation by matching a whole string to a specified format. Regex can also be used to search … Read more