Assign Variables, Global Variables and Scopes in JavaScript (let, var, const)
let, var, and const are all JavaScript statements that assign a value to a variable. Their behavior can differ depending on how and where they are used in your code – read on to find out the details....
View ArticleHow to Get User Input in Python [With Examples]
This article covers getting user input on the command line using Python 2 or 3 and includes some useful examples. Get User Input in Python 3 Python 3 uses the input() function to collect user input:...
View ArticlePython Main Function & Method: What Is It and How Is It Used?
As you build more complex Python apps, you will probably want to start splitting your code into separate files. What Is the __main__ Function? Importing and executing code from another file is common...
View ArticleJavascript eval() Function (and Why to NEVER Use It)
The JavaScript eval() function executes a string as JavaScript. This is a massive security risk as, if used in production, it can allow third parties to execute their own code in your app. eval()...
View ArticlePHP shell_exec Function: How to Use It [With Examples]
This tutorial explains how to use the shell_exec function in PHP in order to execute code via the shell and return the output as a string. PHP is a versatile programming language for building...
View ArticleCommand Line Arguments in Shell/Bash Scripts [Tutorial]
This tutorial explains how to pass command-line arguments to your bash scripts. There are many examples included to help get you started. Bash/Shell scripts are a great way to automate your Linux...
View Article6 Best PHP Frameworks to Consider in 2021
PHP frameworks speed up the development of complex applications greatly. This article features 6 of the most popular frameworks to consider in 2021. These frameworks provide varying scaffolding levels...
View ArticleMySQL vs MariaDB vs MongoDB vs PostgreSQL vs SQLite vs MS SQL – Which to Choose?
There is a lot of weird-sounding language around databases. Most of it centers on the names of the popular database software which is available. It can make it tough to choose. Each strangely named...
View ArticleAdd Days (or Minutes, or Hours) to Javascript Date [or Subtract]
This article will explain how to add (or subtract) days, minutes, hours, seconds (etc.) to a JavaScript date. Why would you want to do this? Perhaps you want to tell a user that their assignment is due...
View ArticleWhy You Should Wrap File Paths in Strings in Your Shell Scripts
I stumbled across a thread about terrible programming mistakes and found this: https://github.com/MrMEEE/bumblebee-Old-and-abbandoned/commit/a047be85247755cdbe0acce6f1dafc8beb84f2ac Which contains the...
View ArticleShowing Errors in PHP [Tutorial]
This tutorial explains how to use several methods for displaying errors in a PHP application for debugging purposes. Be Careful There are security considerations when displaying errors in any...
View ArticleMySQL CASE Statement and CASE Operator – Difference and Examples
There are two things called CASE in MySQL (and, by extension, the compatible MariaDB). The CASE Operator, for use in queries. The CASE Statement, for use in stored programs and procedures. Both have...
View ArticleThe MySQL LIMIT and OFFSET Clauses [with Examples]
This tutorial covers limiting the number of results from a MySQL database query using the LIMIT clause and skipping results using the OFFSET clause. This is especially useful when wanting to paginate...
View ArticleChecking Type in Python [Guide]
This article explains how to check the type of a variable in the Python programming language. What are Types? The type of a variable determines what it can or can’t do. It determines what value the...
View ArticleConverting Bytes To String In Python [Guide]
This tutorial covers converting Bytes to a string variable (and a string to Bytes) in Python versions 2 and 3. What is the difference between a string and a byte string? A string is a series of...
View ArticleDIY Arduino Powered Electronic Morning Checklist
If you’re the sort of person who has to check the stove is off before leaving the house, then recheck it because you can’t remember if you checked it (and maybe even turn around at the front gate,...
View ArticleInstalling OpenWrt on a BT HomeHub 5 (or Plusnet Hub One), Full Instructions
This article documents my success in getting the OpenWrt operating system up and running on a BT HomeHub 5A (also sold as the Plusnet Hub One). This was checked with the latest version of OpenWRT as of...
View ArticleDIY Arduino Powered Soldering Extraction Fan
This article will show you to build a DIY soldering extraction fan (to ventilate fumes) using an Arduino and a temperature sensor to activate the fan when the soldering iron is hot. Before you read...
View ArticleRaspberry Pi & Python Powered Tank Part III: More Tank
This was only meant to be a two-parter, but I couldn’t leave well enough alone. Raspberry Pi & Python Powered Tank Part III is an update with better Python code and an improved design. I’ve gone...
View ArticleTypeScript Vs JavaScript – What’s the Difference & Which Should You Use?
This article will discuss the differences between typescript and JavaScript, the problems they solve, and which is best to use. I really like TypeScript, and I use it a lot. It solves so many of...
View Article