Sai Nath

Sai Nath

15 Articles Published

Articles by Sai Nath

15 articles

What is the usage of an abort event in JavaScript?

Sai Nath
Sai Nath
Updated on 15-Mar-2026 473 Views

The abort event fires when the loading of a media resource is aborted, typically for images, videos, or audio elements. This event occurs when the user navigates away from the page or explicitly stops the loading process before it completes. When the abort Event Occurs The abort event is triggered in several scenarios: User navigates away from the page while an image is loading Loading is interrupted by clicking a link or refreshing the page Network connection is lost during resource loading The loading process is programmatically canceled Example: Basic abort Event Handler ...

Read More

What is the usage of onunload event in JavaScript?

Sai Nath
Sai Nath
Updated on 15-Mar-2026 406 Views

The onunload event triggers when a user navigates away from a page, closes the browser tab, or refreshes the page. This event is useful for cleanup tasks like saving user data or showing farewell messages. Syntax // HTML attribute // JavaScript event listener window.addEventListener('unload', function(event) { // Cleanup code }); Example: Using onunload with HTML Attribute Close the page and see what happens! This event may give unexpected results ...

Read More

What is the usage of oninput event in JavaScript?

Sai Nath
Sai Nath
Updated on 15-Mar-2026 419 Views

The oninput event occurs whenever the value of an input element changes. Unlike onchange, which fires only when the element loses focus, oninput triggers immediately as the user types, making it ideal for real-time validation and live search functionality. Syntax // HTML attribute // JavaScript property element.oninput = function() { /* code */ }; // Event listener element.addEventListener('input', function() { /* code */ }); Basic Example oninput Example Type something below: ...

Read More

Handling Exception and use of CX_ROOT directly and subclasses

Sai Nath
Sai Nath
Updated on 13-Mar-2026 436 Views

It is not advisable to use CX_ROOT directly and you would require using one of its direct subclasses. The CX_ROOT is the root class for all exception classes in SAP ABAP, but working with its subclasses provides better control and handling mechanisms. Also, the propagation depends upon the exception subclass hierarchy. Exception Subclass Types There are three main types of exception subclasses, each with different propagation and handling behaviors − Subclasses ...

Read More

Calling a JAVA method through JavaScript in SAPUI5 project

Sai Nath
Sai Nath
Updated on 13-Mar-2026 261 Views

Create a REST service hosted on a server and place java method inside it. Now you can call this REST service from a SAPUI5 application using AJAX by passing required parameters. Understanding the Architecture In SAPUI5, you cannot directly call Java methods from JavaScript. Instead, you need to expose your Java functionality through a REST API that acts as a bridge between your frontend SAPUI5 application and backend Java services. SAPUI5 App REST Service Java ...

Read More

Java String toCharArray() method example.

Sai Nath
Sai Nath
Updated on 11-Mar-2026 142 Views

The toCharArray() method of a String class converts this string to a character array.Exampleimport java.lang.*; public class StringDemo {    public static void main(String[] args) {       // converts String value to character array type value       String str = " Java was developed by James Gosling";       char retval[] = str.toCharArray();       // displays the converted value       System.out.println("Converted value to character array = ");       System.out.println(retval);    } }OutputConverted value to character array = Java was developed by James Gosling

Read More

How can we ENABLE AND DISABLE a particular MySQL event?

Sai Nath
Sai Nath
Updated on 22-Jun-2020 3K+ Views

With the help of ALTER EVENT statement along with the ENABLE and DISABLE keyword, we can ENABLE and DISABLE the event. To illustrate it we are having the following example −Examplemysql> ALTER EVENT hello DISABLE; Query OK, 0 rows affected (0.00 sec)The above query will DISABLE the event named ‘Hello’ and the query below will enable it.mysql> ALTER EVENT hello ENABLE; Query OK, 0 rows affected (0.00 sec)

Read More

How can we convert subqueries to LEFT JOIN?

Sai Nath
Sai Nath
Updated on 22-Jun-2020 2K+ Views

To make it understand we are using the data from the following tables −mysql> Select * from customers; +-------------+----------+ | Customer_Id | Name     | +-------------+----------+ | 1           | Rahul    | | 2           | Yashpal  | | 3           | Gaurav   | | 4           | Virender | +-------------+----------+ 4 rows in set (0.00 sec) mysql> Select * from reserve; +------+------------+ | ID   | Day        | +------+------------+ | 1    | 2017-12-30 | | ...

Read More

What is the use of MySQL NULLIF() control flow function?

Sai Nath
Sai Nath
Updated on 22-Jun-2020 279 Views

MySQL NULLIF() control flow function will return NULL if both the arguments are the same, otherwise, it returns the first argument.SyntaxNULLIF(expression1, expression2)Here if expression1 = expression2, NULL will be returned by NULLIF() otherwise expression1 will be returned. Following example will exhibit this −mysql> Select NULLIF('Ram','Ram'); +---------------------+ | NULLIF('Ram','Ram') | +---------------------+ | NULL | +---------------------+ 1 row in set (0.00 sec) mysql> Select NULLIF('Ram','Shyam'); +-----------------------+ | NULLIF('Ram','Shyam') | +-----------------------+ | Ram | +-----------------------+ 1 row in set (0.00 sec)

Read More

What is the method with the help of which the hexadecimal value can be treated as a number?

Sai Nath
Sai Nath
Updated on 22-Jun-2020 140 Views

For treating the hexadecimal value as a number, we can use the CAST(… AS UNSIGNED) function. Following example will demonstrate it −mysql> Select 0x54, CAST(0x54 AS UNSIGNED); +------+------------------------+ | 0x54 | CAST(0x54 AS UNSIGNED) | +------+------------------------+ | T | 84 | +------+------------------------+ 1 row in set (0.01 sec)

Read More
Showing 1–10 of 15 articles
« Prev 1 2 Next »
Advertisements