Quantcast
Channel: Linux Guides, Tips and Tutorials | LinuxScrew
Browsing all 314 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

How to Use Single/Multiline Comments in your PHP Code

This article will quickly walk you through how to comment your PHP code with single and multi-line comments. What is a Comment? A comment in programming is one or more lines of text that aren’t...

View Article


Image may be NSFW.
Clik here to view.

Using PHP sleep() and usleep() to Pause Execution [Examples]

This short tutorial will show you how to use the PHP sleep() and usleep() functions to pause script execution for a number of seconds/microseconds, and provide some code examples. The PHP sleep() and...

View Article


Image may be NSFW.
Clik here to view.

Building a Raspberry Pi 4 WiFi Access Point + Airplay Server

This tutorial will detail how to build a wireless access point using a Raspberry Pi 4 with hostapd. I’ll also set up an Airplay server using shairport-sync so that my access point can play music. There...

View Article

Image may be NSFW.
Clik here to view.

Configuring a Privacy VPN with OpenVPN on OpenWrt With LuCI

This tutorial will show you how to configure a privacy Vpn using OpenVPN on OpenWrt through the LuCI web interface (no command line required!). Lots of screenshots are included so that you can follow...

View Article

Image may be NSFW.
Clik here to view.

The JavaScript toString() Method, Explained + Examples

One of the most common things you will want to do with a variable is to print a string representation of it. That’s what the toString() method is for. This article will explain when and how you can use...

View Article


Image may be NSFW.
Clik here to view.

Using The Python decimal Class for Accurate Calculations

This guide will introduce you to the Python decimal library and class – Python tools which allow you to accurately work with decimal numbers without the rounding and accuracy issues which frequently...

View Article

Image may be NSFW.
Clik here to view.

Beginners Guide to Floating Point Arithmetic Precision

This guide will explain the programming issues you will encounter when performing arithmetic with floating point numbers, and how to avoid them. The reason why these issues occur will be summarised and...

View Article

Image may be NSFW.
Clik here to view.

Checking an Array Contains a Value in JavaScript [Examples]

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...

View Article


Image may be NSFW.
Clik here to view.

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

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...

View Article


Image may be NSFW.
Clik here to view.

How to Configure vsftpd an Anonymous FTP 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...

View Article

Image may be NSFW.
Clik here to view.

How to Delete a File/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...

View Article

Image may be NSFW.
Clik here to view.

How to Rename or Move a File/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...

View Article

Image may be NSFW.
Clik here to view.

The endsWith() Method for JavaScript Strings, with Examples

The endsWith() String method in JavaScript will determine whether a string ends with a certain string or character. Here’s how to use it, with examples. endsWith() Method JavaScript Syntax The...

View Article


Image may be NSFW.
Clik here to view.

Current Time in Another Location/Timezone [JavaScript]

This article will demonstrate how to get the current time in another location/timezone in Javascript, with just one line of code. The Simplest Pure-JavaScript Way The below function converts a given...

View Article

Image may be NSFW.
Clik here to view.

JavaScript Functions Tutorial, With Examples

Functions are reusable bits of code which are encapsulated so that you can easily call them by name when you need them. Here’s how they work in JavaScript, with examples. What are Functions? When...

View Article


Image may be NSFW.
Clik here to view.

How to Check if a Variable is a String in JavaScript

This quick tip will show you how to check if a variable is a string in the JavaScript Programming Language. What is a String? A string is a type of variable. A variable type determines what values a...

View Article

Image may be NSFW.
Clik here to view.

How to Create and Use JavaScript Classes [Examples]

This tutorial will explain JavaScript classes and how they relate to objects. Syntax and code examples are provided. But first, a quick refresher on JavaScript objects. JavaScript Objects In...

View Article


Image may be NSFW.
Clik here to view.

Linux Tip: Using visudo to Avoid Costly Mistakes

Linux Tip: Use visudo to Edit the sudoers File to Avoid Costly Mistakes This article will show you how to use visudo to edit the sudoers file to grant root access to users – and protect against making...

View Article

Image may be NSFW.
Clik here to view.

Using the JavaScript toUpperCase() String Method [Examples]

This article shows how the toUpperCase() method is used in JavaScript to make all letters in a string UPPER CASE. The toUpperCase() method is included in the string object and is fully supported in all...

View Article

Image may be NSFW.
Clik here to view.

Converting String to Boolean in JavaScript, With Examples

This tutorial will show you how to convert a string value to boolean in JavaScript, with working code examples for several situations. Why Are You Converting Strings to Booleans? Really, you should not...

View Article
Browsing all 314 articles
Browse latest View live