Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles by Prerna Tiwari
Page 2 of 2
How to create a global Promise Rejection Handler in JavaScript?
Promise rejection handlers are a powerful tool in JavaScript for handling errors that occur in asynchronous code. In this article, we will learn how to build a global promise rejection handler in JavaScript and how it can help your application manage errors effectively. You can detect unhandled promise rejections using the global unhandledrejection event and take necessary action, such as logging errors to an error tracking service or displaying user notifications. A more understandable syntax for handling promise rejection is provided by async-await error handling, but it requires wrapping each async function in a try-catch block. Combining async-await with ...
Read MoreHow to create a private variable in JavaScript?
JavaScript doesn't have built-in private variables like other languages, but several techniques can simulate privacy. Each approach has its own benefits and use cases. Private variables can only be accessed and modified by code within the same scope, while public variables are accessible from anywhere. Let's explore different techniques to create private variables in JavaScript. Using Closures Closures are the most common way to create private variables. A closure allows inner functions to access variables from their outer function scope, even after the outer function has finished executing. ...
Read MoreHow to create a style tag using JavaScript?
JavaScript allows developers to create and manipulate style tags dynamically to change the appearance of a webpage. By using the document.createElement() method, the .sheet property, and the .insertRule() and .deleteRule() methods, we can add, modify, and remove CSS rules from a stylesheet. This enables creating dynamic and interactive web pages that respond to user interactions. One of the most powerful features of JavaScript is the ability to manipulate the DOM, which is the structure of a web page. Creating and modifying style tags using JavaScript provides a flexible way to control styling programmatically. Creating a Style Tag ...
Read MoreHow to Create a Tab Image Gallery?
Creating a tab image gallery is a great way to showcase collections of images on a website. This tutorial will guide you through building a fully functional tab gallery using HTML, CSS, and JavaScript. Each tab will display a different set of images, making it perfect for organizing photos, artwork, or product galleries. Step 1: Create the HTML Structure First, we need to create the HTML structure for our tab gallery. We'll use a container div for the tabs and another container for the image content areas. Nature Architecture ...
Read MoreHow to create Accordion in ReactJS?
A UI element called an accordion enables user to expand and compress content portions. A great method to add interactivity to your online application and make it simpler for visitors to explore and find the information they need is to create an accordion in ReactJS. This article will walk you through the steps required to create an accordion in ReactJS and provide sample code to get you started. Step 1: Setting up the React Project To get started, you must have a React project set up. The create-react-app command can create a new project if you don't currently ...
Read MoreHow to create a simple counter Using ReactJS?
Your online application can benefit greatly from adding interactivity by utilizing ReactJS to create a straightforward counter. In this tutorial, we will outline the procedures needed to build a straightforward counter using ReactJS and offer some sample code to get you started. Step 1: Setting up the React Project To get started, you will need to have a React project set up. If you don't already have one, you can use the create-react-app command to set up a new react project. npx create-react-app counter-app cd counter-app npm start This will set up a new project in a ...
Read MoreHow to Create a Responsive Like Button in ReactJS?
Creating a responsive like button in ReactJS is a fantastic method to increase the interactivity of your web application. The steps required to create a responsive like button in ReactJS will be discussed in this blog post, along with some sample code, to get you started. Let's first examine a React component's basic structure. A React component is a JavaScript function that generates a React element. A React element is a straightforward JavaScript object that describes a DOM node. A button element that a user can click to express their approval of a piece of material would be a ...
Read MoreSoftware Engineering for Data Scientists in Python
Data science integrates math and statistics, specialized programming, advanced analytics, machine learning, and artificial intelligence (AI) with specific subject matter expertise to reveal actionable insights hidden in an organization’s data. Data science is one of the fields which has shown the quickest growth rates across all industries. This is a result of the increasing volume of data sources and data that results from them. Data Science has generated controversy among other disciplines as a field ever since it began to gain recognition. In this article we will be learning about the fundamentals of software engineering, why it ...
Read MorePython for MATLAB Users
When we move from our academics into the industry, especially engineering individuals, we face a very common problem that we are mainly taught about the obsolete or near obsolete technologies. For example, many schools still use MATLAB. In the engineering sector, whether it is chemical engineer, electrical engineer, or nanoengineer, everyone must have used MATLAB. But in recent times, we can see businesses are shifting from MATLAB to Python. This can be due to a variety of reasons − $1000 licensing cost Inefficient memory allocation Dearth of open source libraries Detest MATLAB syntax. The people who want ...
Read MoreParallel Computing with Dask
Dask is a flexible open-source Python library which is used for parallel computing. In this article, we will learn about parallel computing and why we should choose Dask for this purpose. We will compare it with various other libraries like spark, ray and modin. We have also discussed use cases of Dask. Parallel Computing A type of computation known as parallel computing carries out several computations or processes simultaneously. Large issues are typically divided into manageable pieces that may be solved separately. The four categories of parallel computing are Bit-level Instruction-level Data-level Job parallelism. ...
Read More