Chandu yadav has Published 1163 Articles

Get the fully-qualified name of an inner class in Java

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 13:47:50

5K+ Views

A fully-qualified class name in Java contains the package that the class originated from. Also, an inner class is a class that is another class member. So, the fully-qualified name of an inner class can be obtained using the getName() method.A program that demonstrates this is given as follows −Example Live ... Read More

Set a radial gradient as the background image with CSS

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 13:40:14

164 Views

Set a radial gradient as the background image, with radial-gradient() CSS function. You can try to run the following code to implement linear-gradient() function in CSSExampleLive Demo                    #demo {             height: 200px;             background: radial-gradient(green, orange, maroon);          }                     Setting background as radial gradient.          

Random access to text lines in Python (linecache)

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 13:36:20

778 Views

Purpose of linecache module in Python’s standard library is to facilitate random access to any text file, although this module is extensively used by Python’s traceback module to generate error trace stack. Further prettyprints of reading are held in a cache so that it saves time while reading lines repeatedly.The ... Read More

What is the meaning of <> in MySQL query?

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 13:33:03

4K+ Views

The symbol in MySQL is same as not equal to operator (!=). Both gives the result in boolean or tinyint(1). If the condition becomes true, then the result will be 1 otherwise 0.Case 1 − Using != operator.The query is as follows −mysql> select 3!=5;The following is the output.+------+ ... Read More

Animate CSS flex-shrink property

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 13:15:22

258 Views

To implement animation on flex-shrink property with CSS, you can try to run the following codeExampleLive Demo                    .mycontainer {             display: flex;             background-color: orange;          } ... Read More

SELECT increment counter in MySQL?

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 13:08:29

6K+ Views

To select increment counter in MySQL, first you need to declare and initialize a variable. The syntax is as follows −set @anyVariableName=0; select yourColumnName, @anyVariableName:=@anyVariableName+1 as anyVariableName from yourTableName;To understand the above syntax and set an increment counter, let us first create a table. The query to create a table ... Read More

Animate CSS border property

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 13:03:31

171 Views

To implement animation on border property with CSS, you can try to run the following codeExampleLive Demo                    div {             width: 500px;             height: 400px;         ... Read More

MySQL update with random number between 1 - 3

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 13:01:59

945 Views

The syntax for updating a column with random number between 1-3 is is as follows −update yourTableName set yourColumnName=FLOOR(1+RAND()*3);To understand the above syntax, let us first create a table. The query to create a table is as follows −mysql> create table UpdateNumber1To3 -> ( -> MyNumber int -> ); Query ... Read More

Euler’s Totient function for all numbers smaller than or equal to n in java

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 12:51:01

774 Views

Following is a program to get the result of Euler’s Totient function for all numbers smaller than or equal to n when n is given.Programimport java.util.Scanner; public class EulerTotient {    public static int gcd(int a,int b){       int i, hcf = 0;          for(i = 1; i

Divisors of factorials of a number in java

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 12:47:39

151 Views

Following is a Java program to find the divisors of factorials of a number.Programimport java.util.Scanner; public class DivisorsOfFactorial {    public static long fact(int i) {       if(i

Advertisements