Sai Nath has Published 15 Articles

What is the usage of oninput event in JavaScript?

Sai Nath

Sai Nath

Updated on 23-Jun-2020 09:06:13

406 Views

When a value is added in an input box, then the oninput event occurs. You can try to run the following code to learn how to implement oninput event in JavaScript −Example           Write below:                            function inputFunc() {             var a = document.getElementById("newInput").value;             document.write("Typed: " + a);          }          

How can we ENABLE AND DISABLE a particular MySQL event?

Sai Nath

Sai Nath

Updated on 22-Jun-2020 12:38:29

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’ ... Read More

How can we convert subqueries to LEFT JOIN?

Sai Nath

Sai Nath

Updated on 22-Jun-2020 10:55:57

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 ... Read More

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

Sai Nath

Sai Nath

Updated on 22-Jun-2020 06:58:05

268 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') ... 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 05:26:48

128 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)

How can we divide the result set returned by MySQL into groups?

Sai Nath

Sai Nath

Updated on 20-Jun-2020 06:36:49

1K+ Views

It can be done by using GROUP BY clause in the SELECT statement. We can specify a column as grouping criteria with the help of GROUP BY clause. Due to the specified grouping criteria, rows with the same value in a particular column are considered as a single group. In ... Read More

What is the usage of onunload event in JavaScript?

Sai Nath

Sai Nath

Updated on 21-May-2020 07:51:06

396 Views

The unload event trigger when you unload (or refresh) a page. You can try to run the following code to learn how to implement onunload event in JavaScript.Example           Close the page and see what happens!       This event may give unexpected results.                function newFunc() {             alert("Thank you!");          }          

What is the usage of an abort event in JavaScript?

Sai Nath

Sai Nath

Updated on 21-May-2020 07:45:06

467 Views

Use the on abort event to abort the loading of an image. You can try to run the following code to learn how to implement an abort event in JavaScript.Example                    function abortFunc() {             alert('Error- Loading of the image aborted');          }                

Java String toCharArray() method example.

Sai Nath

Sai Nath

Updated on 26-Feb-2020 08:16:01

132 Views

The toCharArray() method of a String class converts this string to a character array.ExampleLive Demoimport 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 ... Read More

Handling Exception and use of CX_ROOT directly and subclasses

Sai Nath

Sai Nath

Updated on 14-Feb-2020 05:37:06

426 Views

It is not advisable to use CX_ROOT directly and you would require using one of its direct subclasses. Also, the propagation depends upon the exception subclass hierarchy.Subclasses of CX_STATIC_CHECK – these do not propagate automatically. You will need to do the handling yourself or there will be a syntax error ... Read More

Advertisements