Home » 2022 » April

How to Rename or Move a File/Folder/Directory in Python

Rename File or Folder/Directory in Python

This tutorial will explain how to rename or move a file or directory in the Python programming language and provide some simple examples you can follow. Looking to delete a file? Check out our tutorial on file/folder deletion in Python here. To Avoid Errors when Renaming, First Check if a File or Folder Exists To avoid errors when renaming or moving a file or folder, you should first check whether the path exists. The file which is to be moved or renamed must exist, and you … Read more

Home » 2022 » April

How to Delete a File/Folder/Directory in Python

Delete a file or folder/directory in Python

This article will show you the various ways to delete files and directories in the Python programming language. To Avoid Errors, First Check if a File or Folder Exists To avoid errors when deleting a file, you can first check whether the file exists. You can also check whether Python is able to modify a directory. Deleting a File When a file has been confirmed to exist at a certain path, it can be deleted with the os.remove() function, which is part of the built-in Python os library which interacts … Read more

Home » 2022 » April

How to Configure vsftpd an Anonymous FTP Server

Anonymous vsftpd server

This article will show you how to configure vsftpd as an anonymous FTP server which does not require authentication. vsftpd is an FTP file server which can run on Linux. FTP is is the file transfer protocol. It’s been around forever (since the 1970’s!), so it works with just about everything. I run vsftp on an openwrt router as a quick and dirty file sharing solution that will work with even the oldest of my devices (including Windows 3.1 and old Macintosh computers). The software for these old machines … Read more

Home » 2022 » April

Formatting Numbers with the JavaScript toFixed()* Method [Examples]

JavaScript toFixed()

This tutorial will show you how to format numbers to a fixed number of decimal places in the JavaScript programming language. JavaScript Number Variables JavaScript variables have different types. The type of a variable defines what kinds of values it can hold, and what can be done with that value. Number typed variables hold numeric values and include a number of methods (built in functions) for performing numeric operations. Number variables are declared by simply assigning a numeric value to a variable, or using the Number … Read more

Home » 2022 » April

Checking an Array Contains a Value in JavaScript [Examples]

JavaScript in array includes

This article will show you how to check if a value is in an array in the JavaScript programming language. Code examples to check whether an array includes a value are provided. Arrays in JavaScript Arrays are a type of variable that hold an ordered list of values. Each value in an array has a position within the array, called the index. The index can be used to access each value in the array. Indexes are integer values, which start counting from 0 (zero) for the first … Read more