George John has Published 1299 Articles

How to format number to 2 decimal places in MySQL?

George John

George John

Updated on 19-Mar-2023 12:06:46

You can use TRUNCATE() function from MySQL to format number to 2 decimal places. The syntax is as follows −SELECT TRUNCATE(yourColumnName, 2) as anyVariableName from yourTableName;To understand the above syntax, let us first create a table. The query to create a table is as follows −mysql> create table FormatNumberTwoDecimalPlace   ... Read More

What is Java String literal?

George John

George John

Updated on 05-Sep-2022 11:34:39

Strings, which are widely used in Java programming, are a sequence of characters. In Java programming language, strings are treated as objects. The Java platform provides the String class to create and manipulate strings. You can also create a String directly as − String greeting = "Hello world!"; A ... Read More

Why a mentor is necessary in life to achieve success?

George John

George John

Updated on 26-Apr-2022 12:06:09

A mentor is a person who gives the right direction to the dreams. A person can weave dreams of success or achievements; however, without a positive direction, no one can reach the destination. For showing which way to go, a mentor is a must to have in one’s life.We all ... Read More

C++ Program to Implement Queue using Array

George John

George John

Updated on 05-Jan-2022 11:00:50

A queue is an abstract data structure that contains a collection of elements. Queue implements the FIFO mechanism i.e. the element that is inserted first is also deleted first. In other words, the least recently added element is removed first in a queue.A program that implements the queue using an ... Read More

Two’s Complement

George John

George John

Updated on 02-Dec-2021 12:44:21

Binary Number System is one the type of most popular Number Representation techniques that used in digital systems. In the Binary System, there are only two symbols or possible digit values, i.e., 0 (off) and 1 (on). Represented by any device that only 2 operating states or possible conditions.Generally, there ... Read More

C++ Program to Compute the Area of a Triangle Using Determinants

George John

George John

Updated on 04-Jul-2020 14:33:05

In this section we will see how to find the area of a triangle in 2D coordinate space using matrix determinants. In this case we are considering the space is 2D. So we are putting each points in the matrix. Putting x values at the first column, y into the ... Read More

Define colors using the Red-Green-Blue-Alpha model (RGBA) with CSS

George John

George John

Updated on 04-Jul-2020 06:59:05

Use the CSS rgb() function to define color using the RGB Model.Use the CSS rgba() function to set RGB colors with opacity.ExampleYou can try to run the following code to set the color with rgba() functionLive Demo                    h1 { ... Read More

Usage of CSS grid property

George John

George John

Updated on 04-Jul-2020 06:43:52

Set the following properties with the grid property: grid-template-rows, grid-template-columns, grid-template-areas, grid-auto-rows, grid-auto-columns, and grid-auto-flow property.ExampleYou can try to run the following code to implement the CSS grid propertyLive Demo                    .container {             display: ... Read More

Define the height of each row in CSS Grid Container

George John

George John

Updated on 04-Jul-2020 06:35:02

Use the grid-template-rows property to define the number of rows in CSS Grid Layout.ExampleYou can try to run the following code to set a number of rows.Live Demo                    .container {             display: grid;   ... Read More

Role of CSS flex-direction property row-reverse value

George John

George John

Updated on 04-Jul-2020 06:17:28

Use the flex-direction property with row value to set the flex-items horizontally, from right to left.ExampleYou can try to run the following code to implement the row-reverse value −Live Demo                    .mycontainer {             display: flex; ... Read More

1 2 3 4 5 ... 130 Next
Advertisements