George John has Published 1167 Articles

Create a mirror image with CSS

George John

George John

Updated on 13-Mar-2020 13:15:51

657 Views

The flip effect is used to create a mirror image of the object. The following parameters can be used in this filter -ParameterDescriptionFlipHCreates a horizontal mirror imageFlipVCreates a vertical mirror imageExampleYou can try to run the following code to create a mirror imageLive Demo                               Text Example:       CSS Tutorials    

Usage of CSS !important rule

George John

George John

Updated on 13-Mar-2020 13:08:40

199 Views

The !important rule provides a way to make your CSS cascade. It also includes the rules that are to be applied always. A rule having a !important property will always be applied, no matter where that rule appears in the CSS document.For example, in the following style sheet, the paragraph ... Read More

Java program to multiply given floating point numbers

George John

George John

Updated on 13-Mar-2020 12:52:52

894 Views

ExampleFollowing is a program to multiply given floating point numbers.import java.util.Scanner; public class MultiplyFloatingNumbers {    public static void main(String args[]){       Scanner sc = new Scanner(System.in);       System.out.println("Enter first floating point number.");       float flt1 = sc.nextFloat();       System.out.println("Enter second ... Read More

Java program to round a number

George John

George John

Updated on 13-Mar-2020 10:43:07

519 Views

The java.lang.Math.round(float a) returns the closest int to the argument. The result is rounded to an integer by adding 1/2, taking the floor of the result, and casting the result to type int. Special cases −If the argument is NaN, the result is 0.If the argument is negative infinity or ... Read More

Java program to find the area of a triangle

George John

George John

Updated on 13-Mar-2020 08:19:28

2K+ Views

Area of a triangle is half the product of its base and height. Therefore, to calculate the area of a triangle.Get the height of the triangle form the user.Get the base of the triangle form the user. Calculate their product and divide the result with 2.Print the final result.Exampleimport java.util.Scanner; public ... Read More

Java program to read numbers from users

George John

George John

Updated on 13-Mar-2020 07:08:41

511 Views

The java.util.Scanner class is a simple text scanner which can parse primitive types and strings using regular expressions.1. A Scanner breaks its input into tokens using a delimiter pattern, which by default matches whitespace.2. A scanning operation may block waiting for input.3. A Scanner is not safe for multi-threaded use ... Read More

How to Solve Quadratic Equation using Python?

George John

George John

Updated on 05-Mar-2020 10:28:41

306 Views

You can use the cmath module in order to solve Quadratic Equation using Python. This is because roots of quadratic equations might be complex in nature. If you have a quadratic equation of the form ax^2 + bx + c = 0, then, Exampleimport cmatha = 12 b = 8 ... Read More

How to generate a 24bit hash using Python?

George John

George John

Updated on 05-Mar-2020 10:11:26

382 Views

A random 24 bit hash is just random 24 bits. You can generate these just using the random module. exampleimport random hash = random.getrandbits(24) print(hex(hash))OutputThis will give the output0x94fbee

How can I subtract tuple of tuples from a tuple in Python?

George John

George John

Updated on 05-Mar-2020 06:30:35

242 Views

The direct way to subtract tuple of tuples from a tuple in Python is to use loops directly. For example, ifyou have a tuple of tuplesExample((0, 1, 2), (3, 4, 5), (6, 7, 8), (9, 10, 11), (12, 13, 14))and want to subtract (1, 2, 3, 4, 5) from each of ... Read More

Usage of margin property with CSS

George John

George John

Updated on 04-Mar-2020 12:44:07

91 Views

The margin property defines the space around an HTML element. It is possible to use negative values to overlap content. It specifies a shorthand property for setting the margin properties in one declaration.ExampleYou can try to run the following code to set margins −             ... Read More

Advertisements