Anjana has Published 52 Articles

While adding the numbers contained in quotes, how MySQL evaluates if we write non-numeric text before a number?

Anjana

Anjana

Updated on 20-Jun-2020 13:58:45

48 Views

Suppose if we are trying to add the numbers having non-numeric text before them, then MySQL simply evaluate the value of such number as 0. Following example will exhibit this −Examplemysql> Select 'Kg 1525' + 'Oz 200'As Total; +-------+ | Total | +-------+ | 0     | +-------+ 1 ... Read More

What MySQL returns if the search string is not in the list of strings provided as argument in FIELD() function?

Anjana

Anjana

Updated on 20-Jun-2020 08:42:27

61 Views

Suppose if the search string is not in the list of strings provided as the arguments in FIELD() function then MySQL will return 0 as output.Examplemysql> Select FIELD('Ram','New','Delhi'); +----------------------------+ | FIELD('Ram','New','Delhi') | +----------------------------+ |                         0  | +----------------------------+ 1 row in set (0.00 sec)

Why can't we define a static method in a Java interface?

Anjana

Anjana

Updated on 17-Jun-2020 11:36:55

541 Views

From Java 8 onwards, static methods are allowed in Java interfaces.An interface can also have static helper methods from Java 8 onwards. public interface vehicle {    default void print() {       System.out.println("I am a vehicle!");    }    static void blowHorn() {       System.out.println("Blowing horn!!!");   ... Read More

How to Scroll to the top of the page using JavaScript/ jQuery?

Anjana

Anjana

Updated on 16-Jun-2020 08:16:43

169 Views

ExampleLive Demo                    $("a").click(function() {             $("html, body").animate({ scrollTop: 0 }, "slow");             return false;          });             TOP OF PAGE   ... Read More

Usage of rest parameter and spread operator in JavaScript?

Anjana

Anjana

Updated on 16-Jun-2020 08:08:19

236 Views

Rest ParameterWith rest parameter, you can represent a number of arguments as an array. ES6 brought rest parameter to ease the work of developers. For arguments objects, rest parameters are indicated by three dots … and precedes a parameter.Let’s see the following code snippet to define rest parameter −   ... Read More

How to create arrays in JavaScript?

Anjana

Anjana

Updated on 15-Jun-2020 07:32:09

296 Views

To create an array in JavaScript, simply assign values −var animals = ["Dog", "Cat", "Tiger"];You can also use the new keyword to create arrays in JavaScript −var animals = new Array("Dog", "Cat", "Tiger");The Array parameter is a list of strings or integers. When you specify a single numeric parameter with ... Read More

How to create a blink text using JavaScript?

Anjana

Anjana

Updated on 15-Jun-2020 06:56:11

4K+ Views

To create a blinking text, use the JavaScript blink() method. This method causes a string to blink as if it were in a BLINK tag.Note − HTML tag deprecated and is not expected to work in every browser.ExampleYou can try to run the following code to create a blinking ... Read More

How to create a small font text using JavaScript?

Anjana

Anjana

Updated on 15-Jun-2020 06:52:29

492 Views

To create a small font text with JavaScript, use the small() method. This method causes a string to be displayed in a small font as if it were in a tag.ExampleYou can try to run the following code to create a small font using JavaScript −Live Demo     ... Read More

How to create a bold text using JavaScript?

Anjana

Anjana

Updated on 15-Jun-2020 06:48:12

17K+ Views

To create a bold text using JavaScript, use the bold() text. This method causes a string to be displayed as bold as if it were in a tag.ExampleYou can try to run the following code to create a bold text with JavaScript −Live Demo           ... Read More

Why do we use a plus sign in front of function name in JavaScript?

Anjana

Anjana

Updated on 12-Jun-2020 08:26:41

213 Views

The +function() {} notation is primarily used to force the parser to treat whatever follows the + as an expression. This is used for functions that are invoked immediately, for example, +function() { alert("Demo!"); }();However, + before a function is one of the symbols. You can add other options also ... Read More

Advertisements