Paul Richard has Published 66 Articles

How can MySQL COALESCE() function be used with MySQL SUM() function to customize the output?

Paul Richard

Paul Richard

Updated on 07-Feb-2020 05:45:33

3K+ Views

When MySQL SUM() function got a column, having no values, an argument then it will return NULL, rather than 0, as output. But if we want to customize this output to show 0 as output then we can use MySQL COALESCE() function which accepts two arguments and returns the second ... Read More

What happens if the value of number ‘N’ in CONV() function is not as per accordance with its base?

Paul Richard

Paul Richard

Updated on 04-Feb-2020 05:57:20

151 Views

MySQL returns 0 as output if the number given in CONV() function is not as per accordance with its base. Suppose, if we want to convert decimal number 9 into the number in binary number system then in this case the value of from_base must be 10 but if we ... Read More

How can we use CHAR_LENGTH() function with MySQL WHERE clause?

Paul Richard

Paul Richard

Updated on 30-Jan-2020 06:39:59

476 Views

When CHAR_LENGTH() or CHARACTER_LENGTH() string function is used with WHERE clause, the output returns by it will depend upon the condition given in WHERE clause. For example, suppose we have a table named ‘Student’ and we want to get only those names having number of characters less than 6, then ... Read More

How to use Meta Tag to redirect an HTML page?

Paul Richard

Paul Richard

Updated on 13-Jan-2020 06:26:03

13K+ Views

Page redirection is a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection.To use a META Tag to redirect your site is quite easy. With this, use the http-equiv attribute to provide an ... Read More

How to call a parent window function from an iframe using JavaScript?

Paul Richard

Paul Richard

Updated on 08-Jan-2020 06:27:14

4K+ Views

To call a parent window function, use “window.top”.ExampleYou can try to run the following code to call a parent window function from an iframeLive Demo                    function display(){             alert("Hello World!");          }                      Click          

How to add a number of months to a date using JavaScript?

Paul Richard

Paul Richard

Updated on 07-Jan-2020 11:00:57

749 Views

To add a number of months to a date, first get the month using getMonth() method and add a number of months.ExampleYou can try to run the following code to add a number of monthsLive Demo                    var d, e; ... Read More

C++ Program to Check Whether a Hamiltonian Cycle or Path Exists in a Given Graph

Paul Richard

Paul Richard

Updated on 30-Jul-2019 22:30:25

1K+ Views

A Hamiltonian cycle is a Hamiltonian Path such that there is an edge (in graph) from the last vertex to the first vertex of the Hamiltonian Path. It is in an undirected graph is a path that visits each vertex of the graph exactly once.Functions and purposes:Begin    1.function isSafe() ... Read More

C++ Program to Generate All Subsets of a Given Set in the Lexico Graphic Order

Paul Richard

Paul Richard

Updated on 30-Jul-2019 22:30:25

444 Views

This is C++ Program to Generate All Subsets of a Given Set in the Lexico Graphic Order. This algorithm prints all the possible combination of each length from the given set of array in increasing order. The time complexity of this algorithm is O(n*(2^n)).AlgorithmBegin    For each length ‘i’ GenAllSubset() ... Read More

C++ Program to Perform Edge Coloring of a Graph

Paul Richard

Paul Richard

Updated on 30-Jul-2019 22:30:25

652 Views

In this program, we will perform Edge Coloring of a Graph in which we have to color the edges of the graph that no two adjacent edges have the same color. Steps in Example.AlgorithmBegin    Take the input of the number of vertices, n, and then number of edges, e, ... Read More

How is Java platform independent?

Paul Richard

Paul Richard

Updated on 30-Jul-2019 22:30:23

507 Views

When you compile Java programs using javac compiler it generates bytecode. We need to execute this bytecode using JVM (Java Virtual machine) Then, JVM translates the Java bytecode to machine understandable code. You can download JVM's (comes along with JDK or JRE) suitable to your operating system and, once you ... Read More

Advertisements