Difference Between MySQL NULL and IS NOT NULL

AmitDiwan
Updated on 03-Jul-2020 08:14:18

321 Views

If you compare the operator with NULL value then you will get NULL value always and no result.Let us see some examples for comparison −mysql> select 10 NULL; +------------+ | 10 NULL | +------------+ | NULL       | +------------+ 1 row in set (0.00 sec) mysql> select NULL NULL; +--------------+ | NULL NULL | +--------------+ | NULL         | +--------------+ 1 row in set (0.00 sec) mysql> select 'Chris' NULL; +-----------------+ | 'Chris' NULL | +-----------------+ | NULL            | +-----------------+ 1 row in ... Read More

Convert Hex String to Byte Array in Java

sudhir sharma
Updated on 03-Jul-2020 08:12:11

6K+ Views

We can convert a hex string to byte array in Java by first converting the hexadecimal number to integer value using the parseInt() method of the Integer class in java. This will return an integer value which will be the decimal conversion of hexadecimal value. We will then use the toByteArray() method of BigInteger class that will return a byte array.Example Live Demoimport java.math.BigInteger; public class Demo {    public static void main(String args[]) {       String str = "1D08A";       int it = Integer.parseInt(str, 16);       System.out.println("Hexadecimal String " + str);       ... Read More

Handle RuntimeException in Java

Maruthi Krishna
Updated on 03-Jul-2020 08:08:02

152 Views

A Run time exception or an unchecked exception is the one which occurs at the time of execution. These include programming bugs, such as logic errors or improper use of an API. Runtime exceptions are ignored at the time of compilation.IndexOutOfBoundsException, ArithmeticException, ArrayStoreException and, ClassCastException are the examples of run time exceptions.ExampleIn following Java program, we have an array with size 5 and we are trying to access the 6th element, this generates ArrayIndexOutOfBoundsException.public class ExceptionExample {    public static void main(String[] args) {       //Creating an integer array with size 5       int inpuArray[] = ... Read More

Skip Finally Block Even if Exception Occurs in Java

Maruthi Krishna
Updated on 03-Jul-2020 08:07:01

5K+ Views

An exception is an issue (run time error) occurred during the execution of a program. When an exception occurred the program gets terminated abruptly and, the code past the line that generated the exception never gets executed.Try, catch, finally blocksTo handle exceptions Java provides a try-catch block mechanism.A try/catch block is placed around the code that might generate an exception. Code within a try/catch block is referred to as protected code.Syntaxtry {    // Protected code } catch (ExceptionName e1) {    // Catch block }When an exception raised inside a try block, instead of terminating the program JVM stores ... Read More

Maximum Size Rectangle Binary Sub-Matrix with All 1s in C++

Ayush Gupta
Updated on 03-Jul-2020 08:06:57

211 Views

In this tutorial, we will be discussing a program to find maximum size rectangle binary sub-matrix with all 1s.For this we will be provided with 2D matrix containing zeroes and ones. Our task is to find the largest 2D matrix subset containing only ones.Example Live Demo#include using namespace std; #define R 4 #define C 4 //finding the maximum area int maxHist(int row[]) {    stack result;    int top_val;    int max_area = 0;    int area = 0;    int i = 0;    while (i < C) {       if (result.empty() || row[result.top()]

Create a Transition Effect on Hover Pagination with CSS

Anvi Jain
Updated on 03-Jul-2020 08:06:04

550 Views

To create a transition effect on hover pagination, use the transition property.ExampleYou can try to run the following code to add transition effect −Live Demo                    .demo {             display: inline-block;          }          .demo a {             color: red;             padding: 5px 12px;             text-decoration: none;             border-radius: 5px;             transition: background-color 2s;          }          .demo a.active {             background-color: orange;             color: white;             border-radius: 5px;          }          .demo a:hover:not(.active) {             background-color: yellow;          }                     Our Quizzes                          

CSS Grid Template Columns Property

Nishtha Thakur
Updated on 03-Jul-2020 08:05:30

84 Views

The grid-template-columns property is used to set the number of columns in the Grid.ExampleYou can try to run the following code to implement the grid-template-columns property −Live Demo                    .container {             display: grid;             background-color: blue;             grid-template-columns: auto auto;             padding: 20px;             grid-gap: 20px;          }          .container > div {             background-color: orange;             border: 2px solid gray;             padding: 35px;             font-size: 30px;             text-align: center;          }                     Game Board                1          2          3          4          5          6          

Resume Java Execution After Exception Occurs

Maruthi Krishna
Updated on 03-Jul-2020 08:05:25

6K+ Views

An exception is an issue (run time error) occurred during the execution of a program. When an exception occurred the program gets terminated abruptly and, the code past the line that generated the exception never gets executed.There are two types of exceptions in Java.Unchecked Exception − An unchecked exception is the one which occurs at the time of execution. These are also called as Runtime Exceptions. These include programming bugs, such as logic errors or improper use of an API. Runtime exceptions are ignored at the time of compilation.Checked Exception − A checked exception is an exception that occurs at ... Read More

Vertically Align Grid Inside Container with CSS

Jennifer Nicholas
Updated on 03-Jul-2020 08:04:37

144 Views

You can try to run the following code to vertically align the grid using the align-content property −ExampleLive Demo                    .container {             display: grid;             background-color: gray;             align-content: center;             padding: 20px;             grid-gap: 20px;          }          .container > div {             background-color: orange;             border: 2px solid gray;             padding: 35px;             font-size: 30px;             text-align: center;          }                     Game Board                1          2          3          4          5          6          

Add Rounded Borders to First and Last Link in Pagination Using CSS

Nancy Den
Updated on 03-Jul-2020 08:03:19

509 Views

To add rounded borders, use the border-radius property. For top/ bottom left, use the border-top-left-radius property and for bottom, use border-bottom-left-radius. In the same way, set for top/bottom right.ExampleYou can try to run the following code to add rounded borders to first and last link in the pagination −Live Demo                    .demo {             display: inline-block;          }          .demo a {             color: red;             padding: 5px 12px;   ... Read More

Advertisements