Sai Nath has Published 24 Articles

What is the usage of an abort event in JavaScript?

Sai Nath

Sai Nath

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

281 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');          }                

How to write the first C++ program?

Sai Nath

Sai Nath

Updated on 26-Feb-2020 11:25:44

17K+ Views

So you've decided to learn how to program in C++ but don't know where to start. Here's a brief overview of how you can get started.Get a C++ CompilerThis is the first step you'd want to do before starting learning to program in C++. There are good free C++ compilers ... Read More

Java String toCharArray() method example.

Sai Nath

Sai Nath

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

29 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

Java String.equals() versus ==.

Sai Nath

Sai Nath

Updated on 26-Feb-2020 06:22:25

169 Views

The equals() method compares this string to the specified object. The result is true if and only if the argument is not null and is a String object that represents the same sequence of characters as this object.ExampleLive Demopublic class Sample {    public static void main(String []args) {   ... Read More

Handling Exception and use of CX_ROOT directly and subclasses

Sai Nath

Sai Nath

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

174 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

How can MySQL FIND_IN_SET() function be used to get the particular record(s) from the table as a result set?

Sai Nath

Sai Nath

Updated on 12-Feb-2020 07:15:29

119 Views

We can get the record(s) as a result set by providing the particular string and name of the column as arguments of FIND_IN_SET() function. We also need to use WHERE clause with FIND_IN_SET() function. To understand it, we are using the data, given as below, from table ‘student_info’:mysql> Select * ... Read More

What are variables and types of variables in C++?

Sai Nath

Sai Nath

Updated on 11-Feb-2020 07:18:29

196 Views

A variable provides us with named storage that our programs can manipulate. Each variable in C++ has a specific type, which determines the size and layout of the variable's memory; the range of values that can be stored within that memory; and the set of operations that can be applied ... Read More

How can we eradicate leading and trailing space characters from a string in MySQL?

Sai Nath

Sai Nath

Updated on 06-Feb-2020 06:51:53

92 Views

MySQL LTRIM() and RTRIM() functions can be used to eradicate leading and trailing spaces from a string.MySQL LTRIM() function is used to remove the leading space characters from a string. Its syntax can be as follows −SyntaxLTRIM(String)Here, String, is the string, passed as an argument, whose leading space characters are ... Read More

What will MySQL CHAR_LENGTH() function return if I provide NULL to it?

Sai Nath

Sai Nath

Updated on 30-Jan-2020 06:51:33

183 Views

In this case, the output of CHAR_LENGTH() function depends on the condition that whether we are providing NULL as a string or we are providing simply NULL to it. Following example will demonstrate the difference −mysql> Select CHAR_LENGTH(NULL); +-------------------+ | CHAR_LENGTH(NULL) | +-------------------+ | NULL           ... Read More

How can we copy data with some condition/s from existing MySQL table?

Sai Nath

Sai Nath

Updated on 29-Jan-2020 05:15:52

148 Views

As we know that we can copy the data and structure from an existing table by CTAS script. If we want to copy data with some condition/s then we need to use WHERE clause with CTAS script. Consider the example below −mysql> Create table EMP_BACKUP2 AS SELECT * from EMPLOYEE ... Read More

Advertisements