Found 8591 Articles for Front End Technology

What are the events available for server sent events in JavaScript?

Shubham Vora
Updated on 24-Apr-2023 17:05:06

404 Views

The server-sent events allow developers to open a connection between the server and the client and send data from the server to the client. Basically, it is a one-way communication, which means we can send data from the server to the client but not from the client to the server. Here, we will discuss all events available for the server-sent events in JavaScript. Events Available for Server-sent Events in JavaScript There is a total of 4 different events available for server-sent events in JavaScript. ‘onopen’ − The ‘open’ event fires when the connection between the client and server is ... Read More

Text to Voice conversion using Web Speech API of Google Chrome

Shubham Vora
Updated on 24-Apr-2023 17:03:52

1K+ Views

Nowadays, the audiobook is more preferred by readers to reading books as they can grab knowledge while doing any work by listening to it. Also, some website adds the audio of the article in every article, so if users don’t want to read the article, they can listne to it. To convert normal text to voice, we require to use the web speech api of Google Chrome. In this tutorial, we will learn to use the web speech API of Google Chrome to convert text to voice. Syntax Users can follow the syntax below to use the web speech API ... Read More

Javascript Program to Check if two numbers are bit rotations of each other or not

Shubham Vora
Updated on 24-Apr-2023 17:02:49

228 Views

Problem Statement − We have given two integer numbers and need to check whether the two numbers are bit rotations of each other. In JavaScript, every integer is a 32-bit binary number which is a representation of 0 and 1. Here, we need to check if we rotate the 32-bit string of the first number; we can achieve the 32-bit string of the second number or not out of a total of 32 rotations of the first number. Use the ToString() Method to Check if two Numbers are bit Rotations of Each Other The toString() method is used to convert ... Read More

How to install yup in react native in JavaScript?

Shubham Vora
Updated on 24-Apr-2023 16:57:18

5K+ Views

The Yup is an NPM package we can install in the react-native application. It is used to validate the form values stored in a single object. Also, we can add different kinds of validations to the different form fields using the Yup. Users can execute the below command in the project directory to install the Yup in react native. npm i Yup Users can use the below command if they are using the Yarn. yarn i Yup Syntax Users can follow the syntax below to use the Yup for the form validation in the react-native application. const schema ... Read More

How do you receive server-sent event notifications in JavaScript?

Shubham Vora
Updated on 24-Apr-2023 16:55:10

760 Views

The server-sent event is a unidirectional way to communicate between the server and the client. When we only require to send data from server to client, but not from client to server, we can use the server-sent events. We can use the server-sent events by establishing the connection between the client and server. Here, the server sends the data, and the client receives the data and handles the data to show on the web page. The server can be anything, such as Node, PHP, or Ruby applications. So, when the server sends the data, the ‘message’ event fires on the ... Read More

Fixed Options in Searchbox in ReactJS

Shubham Vora
Updated on 24-Apr-2023 16:52:52

122 Views

Sometimes, developers require to add the fixed options in the search box while creating the search bar. For example, you are developing a web application containing different web pages related to cars, bikes, other vehicles, etc. Also, you require to add a search bar on every web page. So, you may be required to add the fix tags like car, bike, or some car or bike brands as fixed tag in the search bar to highlight. In this tutorial, we will learn to add fixed options in search box in ReactJS using the AutoComplete component of the Material UI library. ... Read More

Firebase to get url

Shubham Vora
Updated on 24-Apr-2023 16:48:09

2K+ Views

Firebase is a backend-as-a-service (BAAS) that provides different services. It includes authentication, cloud storage, hoisting, etc., in the services. Basically, it makes it easy for developers to integrate the authentication, database, etc., in the mobile or web application. In this tutorial, we will explore the cloud storage of Firebase. We will learn to upload images in the Firebase cloud storage and get the URL of the image, which we can use anywhere. Users should follow the steps below to set up the Firebase account and integrate it with a single-page web application. Step 1 − First, Go to the ... Read More

Firebase Integration with Web

Shubham Vora
Updated on 24-Apr-2023 16:45:50

628 Views

Firebase was started by Google in 2014, providing backend services to its users. It provides different kinds of high-quality services which we can use to develop mobile and web applications. For example, it provides a real-time database, user authentication, cloud storage, etc. Furthermore, it also provides analytics to analyze the application’s traffic. It is more popular due to its quick setup. In this tutorial, we will learn to integrate Firebase authentication into the one-page web application. Users should follow the steps below to set up the Firebase account and integrate it with a single-page web application. Step 1 − ... Read More

How to convert date to another timezone in JavaScript?

Saurabh Jaiswal
Updated on 21-Apr-2023 17:00:51

10K+ Views

JavaScript has a new Date() constructor which is used to create a date object to get the current date and time. This date object uses the UTC timezone or the client browser's timezone, i.e. if you are in India and use the new Date() constructor to get the date and time, you will get your local time. But sometimes, we may need to get the timezone of another country, which we can't do directly. These can be done using the toLocaleString() method or the format() method. By the end of the article, you will be able to get the date ... Read More

How to convert decimal to hex in JavaScript?

Saurabh Jaiswal
Updated on 21-Apr-2023 16:59:14

2K+ Views

For any computer programmer who is working with low-level language or assembly language, it is a fundamental task to convert decimal to hex or hexadecimal. In web development we use colors and to represent them it is a common practice to use hex color codes. In Javascript, it is very easy to convert decimal to hexadecimal because of the built-in functions and methods provided by ECMA. In this article, we will discuss multiple ways to convert decimal to hex in javascript with appropriate examples. Using toString() method Using Custom Function Using the toString() Method As the name suggests ... Read More

Advertisements