Home » 2022 » February

PHP vs Python: Which Should You Learn In 2022? What’s the Difference?

PHP vs Python

This article will explain what the PHP and Python programming languages are, where they’re best used, and which one is most useful in 2022. What is PHP? PHP: Hypertext Preprocessor. PHP a recursive initialism that contains its own name, just to make things confusing for you: P PHP H Hypertext P Preprocessor PHP is a processing language – it can search, calculate, and do things based on logical conditions. PHP usually outputs the information it has processed via HTTP – as a web page, or as formatted data to be … Read more

Home » 2022 » February

What is the best Operating System/OS to Use for Python Development?

Which Operating System is Best for Python

This website is called LinuxScrew.com so I’ll get the obvious out of the way: the best OS for Python development is Linux. Here’s why. Why Linux is the Best OS to Develop Python Apps? …because Linux is the preferred OS of many, many other developers. That may seem like a silly statement – however – consider that the developer writing the tutorial you are going to use to learn to write Python code will be using Linux, you want to be able to enter the same commands and use … Read more

Home » 2022 » February

Deleting Files in PHP with unlink() [Examples]

PHP Delete File with unlink()

This article will show you how to delete a single file or multiple files in PHP using the unlink() function, and provide code examples. Once you have file uploads working in PHP, you may want to allow your users to delete files they no longer wish to keep. Read on to find out how. There is no PHP Function called ‘Delete’ To clear up any confusion, unlink() is the function for deleting files in PHP. There is no built in PHP function called delete(). If you’re looking to delete a directory in PHP, … Read more

Categories PHP

Home » 2022 » February

How to Add Extra External USB Storage to an OpenWrt Device

OpenWRT add USB external storage

This tutorial will document steps you need to take to add USB storage to your OpenWrt router. These steps are tested on OpenWrt 21.02 in 2022. These steps were tested on a BT HomeHub 5 which was modified to run OpenWrt. These devices come with 128MB of storage – enough for OpenWrt and software, but not really enough for hosting file shares. Picking a USB Storage Device Most routers running OpenWrt will not be able to supply enough power to spin a mechanical hard disk. Avoid portable hard … Read more

Home » 2022 » February

NVM Node Version Manager – Why it’s Great, How to Use it in Linux

NVM Node Version Manager Linux

The Node Version Manager (NVM) is an indispensible tool for JavaScript Developers. Here’s why it’s so useful, and how to use it in Linux. What is Node.js Node.js is a JavaScript runtime which allows you to build and run JavaScript apps outside of the web browser. It’s commonly used to build APIs, webapps and even desktop applications. New versions of Node.js are released periodically, with major version releases often breaking compatibility with code written for earlier versions. Managing Code Dependencies Sucks A code dependency is any software … Read more

Home » 2022 » February

How to Reverse a String in JavaScript in One Line of Code [Example]

Javascript Reverse String

This quick tutorial will show you how to reverse a string in JavaScript. Strings are Array-Like Strings in JavaScript are considered array-like. A string is an ordered series of characters, so it can be considered as an array of characters. This makes it easy to convert a string to an array. We can then use any one of the methods available for reversing the array to reverse the string. This means you can use any of the methods we’ve previously outlined on reversing arrays on strings. … Read more

Home » 2022 » February

How to Sort Arrays in JavaScript with the sort() Method [Examples]

Javascript Sort Array

This tutorial will show you how to sort arrays in the JavaScript programming language with the array sort() method and provide some code examples. What is an Array in JavaScript? An array is a type of JavaScript variable that can hold a series of variables, references to variables, or values. It’s like a list of items. Each item or element in the array has a value and a position. The position is the order the element appears in the array and is called the index. Indexes are zero-indexed – meaning … Read more

Home » 2022 » February

How to Generate a Range (Numbers/Letters) in JavaScript

JavaScript Generate Range

This article will show you how to generate a range of numbers or letters in JavaScript, and provide some functions you can copy and paste into your own project. The Python, PHP, and many other popular programming languages provide a range() function, for generating a range of numbers or letters between two values. JavaScript does not have a built-in function for doing this, but it’s easy functionality to implement yourself. Here’s how to do it, and some pre-made functions you can just paste into your own project to use … Read more

Home » 2022 » February

Copy/Clone an Array or Object in JavaScript The Right Way [Examples]

How to Copy/Clone JavaScript Array

This tutorial will show you how to properly copy/clone an array or object in JavaScript – it’s not as simple as it seems! Copying an array or object may seem simple – but JavaScript throws a spanner in the works – the fact that when you assign the value of one variable to another it references the original variable. This means that if the value of the original variable is changed, the value of the copy will change too! To get around this, you will need to clone the array – ensuring … Read more

Home » 2022 » February

Exiting JavaScript Loops: ‘break’ & ‘continue’ [Examples]

Javascript Break Continue Statements

This article will explain the JavaScript break and continue statements and how they are used to exit and skip iterations in loops. JavaScript Loops In programming, a loop iterates through a series of values, performing an action on each value it encounters. Arrays can be looped through using the forEach method, and the for statement can be used to loop through a set of values generated by a JavaScript expression. You may encounter situations where you want to prematurely exit a loop, or skip processing certain values in the loop. This is what … Read more