The ::before and ::after Pseudo-element in CSS

AmitDiwan
Updated on 28-Dec-2023 15:16:35

335 Views

The CSS ::before and CSS ::after Pseudo-element are used to insert some content before and after the element respectively. The ::after pseudo element If you want to insert a content after an element, then use the ::after pseudo-element. The content to be placed after is set using the content attribute − p::after { content: " is Virat Kohli"; background-color: red; font-weight: bold; } Example Let us see the example − p { ... Read More

text-justify Property in CSS

AmitDiwan
Updated on 28-Dec-2023 14:48:57

155 Views

The text-justify property in CSS is used to set the justification method of text when the text-align property is set to the justify value. Let us see the syntax − text-justify: value; The value here can be any of the following − auto− Sets automatically and the web browser determines inter-word− To increase or decrease the space between words inter-character− To increase or decrease the space between characters none− The justification method is disabled The syntax can also be seen like this − text-justify: auto|inter-word|inter-character|none|initial|inherit; Inter-word justification of text In this example, we have ... Read More

The Bharatiya Nyaya Sanhita: A Comprehensive Overview

Mukesh Kumar
Updated on 28-Dec-2023 12:20:45

276 Views

Till the date 25th of December, 2023, Indian Judiciary had been following the colonial-era Indian Penal Code (IPC), which was enacted by the British government in 1860. But the Parliament has passed the Bharatiya Nyaya Sanhita and subsequently enacted in 2023 and replaced the Indian Penal Code of 1860. What does the Bharatiya Nyaya Sanhita, 2023 Exactly Define? The Bharatiya Nyaya Sanhita that is passed on 20th (Lok Sabha) and 21st (Rajya Sabha) of December, 2023 and subsequently assented by the Hon'ble President Droupadi Murmu on 25th of December, 2023, is a criminal law, which is drafted based on ... Read More

How is the Bharatiya Nyaya Sanhita Different from Indian Penal Code?

Mukesh Kumar
Updated on 28-Dec-2023 12:16:11

164 Views

On August 10, 2023, the Ministry of Home Affairs has introduced Bharatiya Nyaya Sanhita Bill (and finally assented on 25th of December, 2023) to replace the existing Indian Penal Code of 1860. While introducing the Bill in Lok Sabha, Amit Shah, the Union Home Minister, said that the existing criminal laws were reflective of the colonial mindset, which was enacted with the intention of punishing and not imparting justice. On the other hand, the new law will be "consonance with the spirit of the Constitution." Likewise, as per the recent update, the Bill was passed in the Lok Sabha ... Read More

Commonly Used Methods in LocalDate, LocalTime and LocalDateTime Classes in Java

Rudradev Das
Updated on 27-Dec-2023 17:57:41

65 Views

There are three types of most important classes we can find in a Java environment, related to date and time. LocalDate, LocalTime and LocalDateTime are available in the Java programming to handle the operations related with the date and time problems. Here we need to import the Java package as java.time which is a main application programming interface aka API for date, time, instants, and the time durations. Purpose of the LocalDate, LocalTime and LocalDateTime classes are − java.time.* //It is the process to include all classes java.time.LocalDate //It is the process for LocalDate java.time.LocalDateTime //It is the process ... Read More

Collectors toSet() method in Java 8

Rudradev Das
Updated on 27-Dec-2023 17:51:27

2K+ Views

Collections reverse order class is a reverse order method, which is encoded in the collections class. It is present in the java.util package. It returns a comparator as a result, which is a predefined comparator in nature. By using this comparator package, we can rearrange the collections of a particular data set in a reverse manner. The Collectors toSet() is a collector class, which itself returns a collector and accumulates those particular elements as an input into a new set. toSet() is an unordered collector class which is not accountable to preserve the order of the encounter of some input ... Read More

Collections.sort() in Java with Examples

Rudradev Das
Updated on 27-Dec-2023 17:45:36

334 Views

The collection class is an enhanced static method to sort the elements from a particular collection of a list or an array. For this process, we can use a tree set also, when we operate on a set of elements as present as the raw set type primarily. The Collections.sort() method is present in the java.util.Collections class, and enables the user to sort the elements from a specific list in an ascending order. The method is an upgraded version of the java.util.Arrays.sort() method class, which is capable to sort the elements from a linked list as well as queue and ... Read More

Collections.reverseOrder() in Java with Examples

Rudradev Das
Updated on 27-Dec-2023 17:43:20

108 Views

Collections reverse order class is a reverse order method, which is encoded in the collections class. It is present in the java.util package. It returns a comparator as a result, which is a predefined comparator in nature. By using this comparator package, we can rearrange the collections of a particular data set in a reverse manner. There are two different variants of the Java reverseOrder(), which can be defined as per the capacity of their parameters. Those are − Java Collections reverseOrder() Method − is used to get the value of a comparator class which can impose the reverse ... Read More

Given two numbers as strings, find if one is a power of other

Rudradev Das
Updated on 27-Dec-2023 17:26:59

141 Views

Assume we have a data set of some numbers as a string and denoted as str[]. Now the task is to multiply the two large numbers which represents a string here. We need to find out from those two numbers as strings, find if one is a power of other. Here is a general example of the process − Input for the process us: a = "374747", b = "52627712618930723" Output : YES THE VALUE IS HERE Explanation of the process: 374747^3 = 52627712618930723 Input for the process is : a = "2", b = "4099" Output : NO ... Read More

Palindrome by swapping only one character

Rudradev Das
Updated on 27-Dec-2023 17:23:08

94 Views

In a C++ environment, the palindrome is a process where a set or string remains same from the intial stage of the process to termination of that same particular process. Assume, we have a string denoted as the str[]. And the task is to check the string will be paindrome or not after performing the swapping process with only one character for once. Here is a general example of the swapping process − Input : ARBRDD Output : true Explanation: Swap the value A(1st index present in the list) with the R. Input : INDBAN Output : true Explanation: ... Read More

Advertisements