Home » Search results for 'javascript date'

How to Use while Loops in Bash/Shell Scripts [Examples]

Bash while Loops

This article will show you how to use while loops in Bash/Shell scripts, and provides some code examples. Bash scripts let you automate tasks in the linux shell. Often, you’ll want to repeat a task for a set of data or repeated user input – that’s what while loops are for – they let you loop or iterate over a sequence of data or input, making it easy to build scripts that repeat a set of actions. The while loop syntax demonstrated below will also work for the Zsh shell and … Read more

Home » Search results for 'javascript date'

PostreSQL Guide Introduction: What is PostgreSQL? Why Use It ?

PostgreSQL Introduction - What is PostgreSQL

This article is part of the LinuxScrew Guide for Developers Learning PostgreSQL. PostgreSQL is a relational database management system. It is similar to other networked SQL database servers like MySQL/MariaDB and Microsoft SQL, but there are some key differences in features and functionality. PostgreSQL vs Other Database Systems You can see a comparison of PostgreSQL and other database systems here. In short, while MySQL is the most popular open source database system, PostgreSQL is more advanced. PostgreSQL is object oriented, can store a larger number of types … Read more

Home » Search results for 'javascript date'

Beginners Guide to Floating Point Arithmetic Precision

The Ultimate Beginners Guide to Floating Point Math/Arithmetic Precision Problems

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 solutions will be provided. Floating point precision issues are common hurdle for beginner programmers – sometimes the result of what should be a simple mathematical operation comes out wrong, and little reason is given. Floating point precision issues are usually the cause, so here’s what they are and why this problem occurs. What … Read more

Home » Search results for 'javascript date'

Using The Python decimal Class for Accurate Calculations

Python decimal class

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 arise when working with floating point numbers. Computers Can’t Perform Accurate Arithmetic With Decimal Numbers Decimal numbers are commonly stored as floating point number values. Computers are not particularly good at performing arithmetic with this type of numbers accurately. We break down why this is in our Ultimate Beginners Guide to Floating Point Math/Arithmetic Precision Problems. … Read more

Home » Search results for 'javascript date'

DIY Raspberry Pi Powered Pinball Machine [Kitchen Build]

Raspberry Pi Powered Pinball

This article will show you how I built a DIY Raspberry Pi Powered Pinball game using GDevelop and an Arduino to add physical push-buttons to control the game. GDevelop is a zero-code game development studio, so this article has almost no coding required. I’ve been meaning to check out GDevelop for a while, so I’ve combined a simple GDevelop game with a 2-button Arduino game controller to make a little virtual pinball machine.  Here’s the finished product in action! What We’re Building As you can … Read more

Home » Search results for 'javascript date'

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

Pausing PHP with sleep and usleep

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 usleep() functions both pause execution of the script, but both behave a bit differently. Why Pause/Sleep PHP Script Execution? Delaying, sleeping, or pausing PHP script execution is commonly used when scheduling an event. A call to the sleep() function might be placed at the end of a loop, so that after the code inside the loop has been run, a certain amount of time … Read more

Categories PHP

Home » Search results for 'javascript date'

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 » Search results for 'javascript date'

How to Use the watch Command in Linux, With Examples

Linux watch command

The watch command in Linux does one thing – repeats a command and outputs the result repeatedly, letting you watch for changes. Here’s how to use it. watch Command Syntax The syntax for the watch command is as follows: watch OPTIONS COMMAND Note that: OPTIONS should be a list of options from the below table, which will alter the default behavior of the watch command COMMAND is the command that watch should repeatedly execute, which you will monitor the output of watch will run until interrupted (So press CTRL+C to exit … Read more

Home » Search results for 'javascript date'

Refresh or Redirect a Page using PHP, With Examples

PHP Refresh Page

This article will show you how to refresh a web page in the browser using the PHP programming language. It’s sometimes necessary to set a page to reload automatically, usually at some interval, to keep the page updated with changing information. For example, you may have a scoreboard application that is displayed in a web browser on a projector and wish to have it periodically refresh to keep the displayed scores up to date with those stored. Periodic refreshing is also used to redirect to … Read more

Categories PHP

Home » Search results for 'javascript date'

Linked Lists in Python – How to Use Them, With Examples

Python Linked Lists

This article will explain in simple terms what linked lists are, why they’re useful, and how to use them in the Python programming language. Lists In Python, a list is an array of data – a simple list of values where each item has a value and a position in the list. Lists are indexed (so the positions start counting at position 0, not 1). For more information on lists in Python, check out these LinuxScrew articles: Python List ‘sort()’ Method – Sorting Lists in Python Easily … Read more