In operating systems, both deadlock and starvation are unwanted situations that take place when the processes that need a shared resource block each other's progress indefinitely. Both are unwanted situations; however, a deadlock is quite different than a starvation. In this article, we will discuss all the important differences between deadlock and starvation. What is Deadlock? A deadlock is a condition in operating systems in which no process proceeds for execution and waits for resources that have been acquired by some other processes. Thus, in the case of a deadlock condition, the process simply gets blocked. Deadlock is also known ... Read More
You might have come across situations where you need to add common words at the end or beginning of a range of cells in Excel. It can be a time-consuming process if you decide to do it manually. In such cases, you can use the concept of suffix and prefix in order to complete the process very easily. Read through this article to find out how you can add prefix or suffix to a range of cells in Excel in an efficient manner. How to Add Prefix to a Range of Cells? Let us see a simple process to add ... Read More
In this article we are going to discuss how to perform shallow copy on JavaScript objects. If the source value is the reference to an object, then it will only copy the reference value into the target value. When the source properties are copied without reference and there exists a source property whose value is an object and is copied as a reference. A shallow copy constructs a new compound object and then (to the extent possible) inserts references into the objects found in the original. Using the _.extend() method Underscore.js are a library of JavaScript and has a method ... Read More
In this tutorial, we will learn if it is possible to write data to files using only JavaScript. JavaScript has a library named fs (short form of File-System) that manages all writing operations. It is a JavaScript program (fs.js) with functions for writing operations. Utilize functions to write text to system files by importing the fs module into the program. For example, the writeFile() function will erase all old data from a file and create a new one with the specified name if there isn’t already one. It is mainly used for writing operations. The File-System module is a handy ... Read More
Adding prefix or suffix to a set of cell values in Excel is a very-consuming process when we do it manually, however you can complete such a task very easily just by using the simple formula. This article will help you understand how you can add prefix and suffix to cell values. How to Add Prefix into Cell Values? Let see a simple process to add prefix into cell values. Step 1: Let us consider we have an excel sheet where it contains the list of words as shown in below image To add the prefix, use the formula ... Read More
In this tutorial, we will discuss how to store objects in HTML5 localStorage. We can access the Storage object and store data in it thanks to the interface window's localStorage property. There is no time limit on it. As a result, the data that is stored in it will remain until it is explicitly deleted. The localStorage data can't be removed by closing the browser. To store JavaScript objects in localStorage, we will investigate how to stringify and parse them into JSON strings and then how to store them in localStorage. Using the setItem() Method This setItem() method is used ... Read More
In this tutorial, we will learn about how to Access the Correct “this” inside a callback. “this” keyword Each function contains a keyword called this, also known as “the context, ” whose value is determined by how the function was called and not by how, when, or where it was defined. Unlike other variables, it is unaffected by lexical scopes. Compared to other languages, JavaScript acts a little differently when a function’s “this” keyword is used. Between strict mode and non-strict mode, there are several further changes. How a function is called most often determines the value of “this” (runtime ... Read More
In this tutorial, we will learn how access control allows the origin header to work. Access-Control-Allow- Origin is a header for CORS. With CORS or cross-origin resource sharing, browsers can permit a website hosted at origin A to request resources from origin B. Origin is a mix of port, hostname, and scheme, such as http://tutorialspoint.example.com:5000/, rather than just the hostname. Here is an illustration of how this is put into practice − I want to obtain resources from origin B, which is http://yoursite.com, and origin A:https://www.tutorialspoint.com. ... Read More
In this tutorial, we will learn the difference between an absolute URL and a relative URL. What is a URL? A Uniform Resource Locator (URL) is an address that indicates the location of a specific file or resource on the World Wide Web (WWW). A URL specifies the site of a target saved on a local or networked computer. A file, directory, HTML page, image, application, and more can all be the target. The organization of your website’s URL and internal links is crucial to how well it works. This is crucial to ensuring that your website can be successfully ... Read More
In this tutorial, we will show how you can add an additional series to an existing chart without recreating the chart. This can save you a lot of time and also help you understand the outcome if any new data is added. Using a small trick, we can add a new series to a chart in Excel. Adding a Series to a Chart in Excel Let us suppose we have the following data available in an Excel sheet. To start with, we will convert this available data to a chart. Step 1: To create the chart, select the data ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP