Home » 2021

TwisterOS For Raspberry Pi Does It All [Screenshots/Review]

twister os for raspberry pi

Here’s a screenshot-heavy review of Twister OS – a weird, kitchen-sink included Linux OS for Raspberry Pi with tools for emulation, gaming, and overclocking.  It even comes with Windows and macOS themes! Rather than make you read about what it does, I’ve included screenshots walking through the process of downloading, installing, and running Twister OS.  I’ve included some commentary, but the screenshots should let you decide for yourself whether you want to give this odd OS a go. First up, downloading and installing Twister OS … Read more

Home » 2021

Rounding Numbers Up with the PHP ceil() Function, with Examples

PHP ceil()

This short tutorial will cover how to use the PHP ceil() function to round numbers UP – and provide some code examples. The PHP ceil() function rounds a number up (and only up!) to the nearest integer. To round a number down to the nearest integer, use the floor() function instead. To round a number normally, or for more options when rounding a number, use the round() function. PHP ceil() Function Syntax The syntax for the PHP ceil() function is as follows: ceil($NUMBER) Note that: $NUMBER is the float or integer number you wish to perform the ceil() operation on ceil() will return a float type number regardless of … Read more

Categories PHP

Home » 2021

How to Use the PHP ‘while’ Loop, With Examples

PHP while

This tutorial will teach you how to use the while statement to build loops in the PHP programming language and show some examples. The while loop is the most straightforward kind of loop in PHP. The code inside the loop will execute for as long as the while condition is true. Change the condition, and the loop will exit. while loops are a fundamental part of PHP (and loops are an essential part of computer programming in general) – so it’s good to know how they work and what they can be … Read more

Categories PHP

Home » 2021

How to Use the PHP ‘do while’ Loop, With Examples

PHP do while

This tutorial will teach you how to use the do while statement to build loops in the PHP programming language, and show some examples. The do while loop is one of the simplest types of loop in PHP. The code inside the loop will execute for as long as the do while condition is true. Change the condition, and the loop will exit. do while loops are a fundamental part of PHP (and loops are an essential part of computer programming in general) – so it’s good to get to know how they … Read more

Categories PHP

Home » 2021

How to Use the Python slice() Function, With Examples

Python slice()

The Python slice() function can be used to get a portion of a list, tuple, string, or other sequence. This article will show you how to use it. Python slice() Function Syntax Here’s the syntax for the Python slice() function: slice(START, STOP, STEP) Note that: slice() does not return the specified portion of an object It returns a slice object which is used to retrieve the specified portion from a sequence – it does not contain the sequence itself. This is probably best demonstrated in the below examples START is the starting position (index) of the sequence you … Read more

Home » 2021

What is a Python Dictionary? Explanation and Code Examples

Python dictionary

Here’s everything you need to know about the Dictionary data type in Python, what it can store, and how to use it. Python has several built-in data types for storing data (more than other languages like JavaScript) – from basic types like integers, floating-point numbers, and strings to more complex types like lists, tuples, and dictionaries. What is a Type? A variable’s type defines what kind of value it can store and what can be done with it. What is a Dictionary? A dictionary is a variable type … Read more

Home » 2021

How to Add/Append Items to a Dictionary in Python [Examples]

Add Item to Python Dictionary

This short tutorial will show you how to add single or multiple items (as key:value pairs) to a dictionary in the Python programming language. What is a Dictionary in Python? We’ve covered what dictionaries are in our article here. There are a couple of ways to add items to a dictionary, so we’ve put together this article separately to make sure we’ve got everything covered! Checking Whether a Key Exists in a Dictionary As outlined in the article linked above, dictionaries store data as a series of key:value pairs. Before … Read more

Home » 2021

Quick and Dirty CCTV with Raspberry Pi, MotionEyeOS + Webcam

home cctv motioneyeos

In this article, I’ll walk through the process of setting up MotionEyeOS on a Raspberry Pi, using a cheap USB webcam to create a DIY CCTV system. MotionEyeOS is a pre-configured Linux distribution that turns your Raspberry Pi into a home CCTV system.  You can set up multiple cameras and set them to detect motion or record on a timer, and send the resulting photos and videos to you via email or save them to online storage. What You’ll Need A Raspberry Pi A USB … Read more

Home » 2021

How to Merge Dictionaries in Python, With Examples

Python Merge Dictionaries

This article will show you the simplest ways to merge two or more dictionaries in the Python programming language. Note that the code examples in this article are written for Python version 3 – and will not work with Python version 2! What is a Dictionary in Python? We’ve covered what dictionaries are in our article here. As there are a couple of ways to merge multiple dictionaries in Python, we’ve put together this article separately to make sure we’ve got everything covered! Merging/Joining Using Dictionary Union … Read more

Home » 2021

The Python ord() Function – What it Does and How to Use It

Python ord()

The ord() function returns an integer representation of a Unicode character. Here’s why it does that and how it’s used. Python ord() Function Syntax First, here’s the syntax for the ord() function: ord(CHAR) Note that: CHAR is the single Unicode character you wish to receive the corresponding integer representation of Only a single character is allowed! OK, But Why? The integer returned by ord() is the Unicode code point of the character. It’s a unique number that identifies the character. Unicode represents characters from several languages and includes symbols, emojis, and combinations of all of them. When data is saved … Read more