Programming Scripts Articles

Page 2 of 33

How to subtract Python timedelta from date in Python?

Rajendra Dharmkar
Rajendra Dharmkar
Updated on 24-Mar-2026 11K+ Views

The Python datetime module provides various ways for manipulating dates and times. One of its key features is the timedelta object, which represents duration and also the difference between two dates or times. Subtracting a specific amount of time from a date can be done using timedelta. For example, if we want to find the date a day before today, then we create a timedelta object with days=1 and then subtract it from the current date ? Subtracting One Day from Today's Date The basic use case is subtracting a single day from today's date. This can ...

Read More

Process Representation in Linux System

Arnab Chakraborty
Arnab Chakraborty
Updated on 17-Mar-2026 1K+ Views

Linux manages processes using a fundamental data structure called task_struct, which contains all the information needed to represent a process in the system. This structure is defined in the header file within the kernel source code. Process Data Structure The task_struct is a comprehensive C structure that holds critical information about each process, including: Process state − Current execution state (running, waiting, stopped) Scheduling information − Priority, time slices, and scheduler-specific data Memory management − Virtual memory layout and page tables File descriptors − List of open files and I/O resources Process relationships − Parent, ...

Read More

How to create a process in Linux?

Arnab Chakraborty
Arnab Chakraborty
Updated on 17-Mar-2026 14K+ Views

A process is a program loaded into memory and currently executing. In simple terms, a process is a program in execution state that the operating system manages and schedules for CPU time. Creating Processes with fork() System Call In Linux, a new process is created using the fork() system call. This system call creates a new process by making an exact copy of the calling process's address space. The original process becomes the parent process, while the newly created process becomes the child process. When fork() is called, both parent and child processes continue execution from the ...

Read More

volatile keyword in C#

Samual Sam
Samual Sam
Updated on 17-Mar-2026 840 Views

The volatile keyword in C# is used to indicate that a field might be modified by multiple threads that are executing at the same time. It ensures that the most recent value of a field is present on each read operation, preventing certain compiler optimizations that could lead to unexpected behavior in multithreaded environments. When a field is marked as volatile, the compiler and runtime ensure that reads and writes to that field are not cached or reordered, providing thread-safe access without explicit locking mechanisms. Syntax Following is the syntax for declaring a volatile field − ...

Read More

What are top JavaScript animation libraries?

Kalyan Mishra
Kalyan Mishra
Updated on 15-Mar-2026 1K+ Views

JavaScript animation libraries offer powerful alternatives to CSS animations, providing greater flexibility and advanced features that CSS alone cannot achieve. These libraries enable developers to create complex animations, 3D graphics, particle effects, and interactive experiences with better performance and cross-browser compatibility. This article explores the top JavaScript animation libraries that can transform your web projects with stunning visual effects. Anime.js Anime.js is a lightweight animation library designed to animate HTML elements, JavaScript objects, CSS selectors, DOM attributes, and arrays. It provides complete control over targeted elements with an intuitive API. Key Features: SVG animations and ...

Read More

Voca: The Ultimate Javascript library for String Manipulation

Mukul Latiyan
Mukul Latiyan
Updated on 15-Mar-2026 555 Views

Voca is a powerful JavaScript library designed specifically for string manipulation. In this tutorial, we will explore multiple examples demonstrating how to use the different functions available in Voca. Features of Voca Before we see all the examples, let's highlight some features that Voca brings to the table − It provides a multitude of functions that can be used to manipulate, query, escape, format strings. It also provides detailed and searchable documentation. It supports a wide range of environments like Node.js, Safari 7+, Chrome, ...

Read More

Logging HTTP Requests and Errors using Morgan.js

Mukul Latiyan
Mukul Latiyan
Updated on 15-Mar-2026 2K+ Views

Morgan is a middleware for Node.js that simplifies HTTP request logging in Express applications. It automatically captures and formats request information, eliminating the need to write custom logging code manually. Morgan helps gather logs from your server and prepares them for analysis. It provides many predefined formats and customization options, making it suitable for both small and large projects. Installing Morgan Install Morgan using npm: npm install morgan Then import it into your application: const morgan = require('morgan') Basic Usage Example Here's a simple Express application using Morgan ...

Read More

Design a Digital Clock in Neumorphism Style using JavaScript

Imran Alam
Imran Alam
Updated on 15-Mar-2026 517 Views

In this tutorial, we will be discussing how to design a digital clock in neumorphism style using JavaScript. Neumorphism is a design trend characterized by soft, raised elements with subtle shadows that create an embossed or pressed effect on the interface. HTML Structure Let's start by creating the basic HTML structure for our neumorphic digital clock. We need a container for the clock and display elements. Neumorphic Digital Clock ...

Read More

Adding Animations to a Webpage using Velocity.js

Mukul Latiyan
Mukul Latiyan
Updated on 15-Mar-2026 594 Views

Animations have become a very integral part of website interfaces in today's web development world. They help in enhancing the user experience of a website and in this article, we will learn how we can make use of Velocity.js to add beautiful animations to our web pages. VelocityJS is a JavaScript animation engine that provides us with very fast performing animations that we can use in our web pages. It has become one of the leading animation engines and there are different reasons for its success. I have mentioned some of the most important reasons that make it a ...

Read More

Difference between location.host and location.hostname in JavaScript

Imran Alam
Imran Alam
Updated on 15-Mar-2026 4K+ Views

JavaScript's Location object provides access to the current URL's components. One can think of this object as a read-only window into the current location. There are two properties of the Location object that are often confused: location.host and location.hostname. Let's explore their differences with practical examples. location.host The host property returns the hostname and port number (if specified) of the current URL. Location Host Example Current URL Host Information ...

Read More
Showing 11–20 of 328 articles
« Prev 1 2 3 4 5 33 Next »
Advertisements