Change Column Rule Width with CSS Animations

George John
Updated on 25-Jun-2020 13:01:46

183 Views

To implement animation on column-rule-width property with CSS, you can try to run the following codeExampleLive Demo                    div {             width: 600px;             height: 300px;             background: white;             border: 10px solid red;             animation: myanim 3s infinite;             bottom: 30px;             position: absolute;             column-rule: 10px inset orange; ... Read More

Set Values Function in JavaScript

Samual Sam
Updated on 25-Jun-2020 13:00:59

857 Views

The values() function of the Set returns an iterator object which holds the values of the current Set object.The next() method returns the next element in the iterator object.SyntaxIts Syntax is as followssetObj.values()Example Live Demo    JavaScript Example           const setObj = new Set();       setObj.add('Apples');       setObj.add('Oranges');       setObj.add('Bananas');       setObj.add('Grapes');       var valuesObject = setObj.values();       for(i=0; i

Animate CSS Column Rule Property

mkotla
Updated on 25-Jun-2020 13:00:56

230 Views

To implement animation on the column-rule property with CSS, you can try to run the following code:ExampleLive Demo                    div {             width: 600px;             height: 300px;             background: white;             border: 10px solid red;             animation: myanim 3s infinite;             bottom: 30px;             position: absolute;             column-count: 4;   ... Read More

Pollard's Rho Algorithm for Prime Factorization in Java

Ankith Reddy
Updated on 25-Jun-2020 12:59:32

292 Views

It is an algorithm to perform factorization on given integers. Following is the program implementing the Rho Algorithm for Prime Factorization.ProgramLive Demopublic class PollardsRho {    int num = 65;    public int gcd(int a, int b) {       int gcd = 0;       for(int i = 1; i

MySQL Concatenation Operator

George John
Updated on 25-Jun-2020 12:59:12

483 Views

You can use in-built function CONCAT() from MySQL. The syntax is as follows −SELECT CONCAT(('(', yourColumnName1, ', ', yourColumnName2, ', ', yourColumnName3, ...N')')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 Concatenation_OperatorDemo -> ( -> -> VendorId int, -> VendorName varchar(100), -> VendorCountry varchar(100) -> ); Query OK, 0 rows affected (0.69 sec)Insert some records in the table using insert command. The query is as follows −mysql> insert into Concatenation_OperatorDemo values(101, 'Carol', 'US'); Query OK, 1 row affected (0.19 sec) mysql> insert ... Read More

Set Top Left Corner Border with CSS

varun
Updated on 25-Jun-2020 12:58:12

251 Views

Use the border-top-left-radius property to set the border of the top left corner. You can try to run the following code to implement border-left-radius property:ExampleLive Demo                    #rcorner {             border-radius: 25px;             border-top-left-radius: 45px;             background: #FADBD8;             padding: 20px;             width: 300px;             height: 150px;          }                     Rounded top-left corner!    

Count on a MySQL Union Query

Ankith Reddy
Updated on 25-Jun-2020 12:57:18

7K+ Views

To do a count on a union i.e. to get the count of the UNION result, use the below syntax −SELECT COUNT(*) FROM ( SELECT yourColumName1 from yourTableName1 UNION SELECT yourColumName1 from yourTableName2 ) anyVariableName;To understand the above syntax, let us create two tables with some records. The query to create a table is as follows −mysql> create table union_Table1 -> ( -> UserId int -> ); Query OK, 0 rows affected (0.47 sec)Insert some records in the table using insert command. The query is as follows −mysql> insert into union_Table1 values(1); Query OK, 1 row affected (0.18 sec) ... Read More

parseInt Function in JavaScript

Samual Sam
Updated on 25-Jun-2020 12:56:34

559 Views

The parseInt() function accepts two parameters one is a string representing a number and another is a number representing the radix and returns an integer of the given radix.SyntaxIts Syntax is as followsnum.parseInt('4524', 8);Example Live Demo    JavaScript Example           var result = parseInt('4524', 8);       document.write("Result: " + result);     OutputResult: 2388Example Live Demo    JavaScript Example           var result1 = parseInt('4524', 8);       document.write("Result: " + result1);       document.write("");       var result2 = parseInt('4524', 10);       document.write("Result: " + result2);       document.write("");       var result3 = parseInt('4524', 16);       document.write("Result: " + result3);     OutputResult: 2388 Result: 4524 Result: 17700

parseFloat Function in JavaScript

karthikeya Boyini
Updated on 25-Jun-2020 12:55:38

168 Views

The parseFloat() function accepts two parameters one is a string representing a number and another is a number representing the radix and returns an integer of the given radix.SyntaxIts Syntax is as followsnum.parseFloat('4524', 8);Example Live Demo    JavaScript Example           var result1 = parseFloat(Math.PI);       document.write("Result: "+result1);       document.write('');       var result2 = parseFloat("245.12@welcome");       document.write("Result: "+result2);       document.write('');       var result3 = parseFloat("11111100.010");       document.write("Result: "+result3);     OutputResult: 3.141592653589793 Result: 245.12 Result: 11111100.01

Sieve of Eratosthenes in Java

George John
Updated on 25-Jun-2020 12:55:11

5K+ Views

Sieve of Eratosthenes is the ancient algorithm to find prime numbers up to a given number.Algorithm1. Generate integers from 2 to n (Given number).2. Counting from 2 mark every 2nd integer. (multiples of 2)3. Now, starting from 3 mark every third integer. (multiples of 3)4. Finally, marking from 5 mark every 5th integer.(multiples of 5)Programimport java.util.Scanner; public class SievePrimeFactors  {    public static void main(String args[]) {       Scanner sc = new Scanner(System.in);       System.out.println("Enter a number");       int num = sc.nextInt();       boolean[] bool = new boolean[num];       ... Read More

Advertisements