Arjun Thakur has Published 1109 Articles

Object-oriented filesystem paths in Python (pathlib)

Arjun Thakur

Arjun Thakur

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

693 Views

The pathlib module provides an object oriented approach to handling filesystem paths. The module also provides functionality appropriate for various operating systems. Classes defined in this module are of two types – pure path types and concrete path types. While pure paths can only perform purely computational operations, concrete paths ... Read More

Create new instance of a Two-Dimensional array with Java Reflection Method

Arjun Thakur

Arjun Thakur

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

963 Views

A new instance of a two dimensional array can be created using the java.lang.reflect.Array.newInstance() method. This method basically creates the two-dimensional array with the required component type as well as length.A program that demonstrates the creation of a two-dimensional array using the Array.newInstance() method is given as follows −Example Live Demoimport ... Read More

MySQL Query to convert from datetime to date?

Arjun Thakur

Arjun Thakur

Updated on 25-Jun-2020 13:42:38

6K+ Views

You can use CAST() function from MySQL to achieve this. The syntax is as follows −SELECT CAST(yourColumnName as Date) 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 ConvertDateTimeToDate -> ( -> ArrivalDatetime ... Read More

Usage of CSS grid-auto-columns property

Arjun Thakur

Arjun Thakur

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

98 Views

Use the grid-auto-columns property to set default size for columns.You can try to run the following code to implement the grid-auto-columns property with CSSExampleLive Demo                    .container {             display: grid;             grid-auto-columns: 100px;             grid-gap: 10px;             background-color:red;             padding: 10px;          }          .container>div {             background-color: yellow;             text-align: center;             padding:10px 0;             font-size: 20px;          }                              1          2          3          4          5          6          

Select values that meet different conditions on different rows in MySQL?

Arjun Thakur

Arjun Thakur

Updated on 25-Jun-2020 13:10:00

405 Views

You can select values that meet different conditions on different rows using IN() and GROUP BY. The syntax is as follows −SELECT yourColumnName1 from yourTableName WHERE yourColumnName2 IN(value1, value2, .....N) GROUP BY yourColumnName1 HAVING COUNT(DISTINCT yourColumnName2)=conditionValue;To understand the above syntax, let us first create a table. The query to create ... Read More

Fourth Generation (4G) Mobile Phones

Arjun Thakur

Arjun Thakur

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

4K+ Views

Fourth Generation (4G) mobile phones provides broadband cellular network services and is successor to 3G mobile networks. It provides an all IP based cellular communications. The capabilities provided adhere to IMT-Advanced specifications as laid down by International Telecommunication Union (ITU).FeaturesIt provides an all IP packet switched network for transmission of ... Read More

Third-Generation (3G) Mobile Phones

Arjun Thakur

Arjun Thakur

Updated on 25-Jun-2020 12:54:19

10K+ Views

Third generation mobile phones, or “3G Internet” mobile phones, is a set of standards for wireless mobile communication systems, that promises to deliver quality multimedia services along with high quality voice transmission.Features3G systems comply with the International Mobile Telecommunications-2000 (IMT-2000)specifications by the International Telecommunication Union (ITU).The first 3G services were ... Read More

Euler’s criterion in java

Arjun Thakur

Arjun Thakur

Updated on 25-Jun-2020 12:50:12

365 Views

According to Euler’s criterion a square root of n under modulo p exists if and only if a number num exists such that num%p is equal to n%p.Programimport java.util.Scanner; public class EulersCriterion {    public static void main(String args[]) {       Scanner sc = new Scanner(System.in);     ... Read More

Convert array to generic list with Java Reflections

Arjun Thakur

Arjun Thakur

Updated on 25-Jun-2020 12:42:10

533 Views

An array can be converted into a fixed size list using the java.util.Arrays.asList() method. This method is basically a bridge between array based AP!’s and collection based API’s.A program that demonstrates the conversion of an array into a generic list is given as follows −Example Live Demoimport java.util.Arrays; import java.util.Collections; import ... Read More

Multiplicative order in java

Arjun Thakur

Arjun Thakur

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

90 Views

Following is a Java program which prints the multiplicative order of given numbers.import java.util.Scanner;Programpublic class MultiplicativeOrder {    public static int gcd(int num1, int num2) {       if (num2 != 0) {          return gcd(num2, num1 % num2);       } else {   ... Read More

Advertisements