AmitDiwan has Published 10860 Articles

How do you make a button that adds text in HTML 'input'?

AmitDiwan

AmitDiwan

Updated on 13-Mar-2025 12:49:45

3K+ Views

Let’s say the following is our HTML button −Click the button to add the input into the belowText BoxUse document.getElementById() to add a text in on button click. Following is the code −Example Live Demo Document Click the button to add ... Read More

Java program to iterate over a Set

AmitDiwan

AmitDiwan

Updated on 26-Feb-2025 19:36:11

2K+ Views

In this article, we will understand how to iterate over a Set. A Set is a Collection that cannot contain duplicate elements. It models the mathematical set abstraction. The Set interface contains only methods inherited from Collection and adds the restriction that duplicate elements are prohibited. We will demonstrate ... Read More

How to Auto-Resize an Image to Fit a div Container using CSS?

AmitDiwan

AmitDiwan

Updated on 17-Feb-2025 13:01:55

3K+ Views

To auto resize an image to fit a div container, it ensures that the image is scaled properly without affecting its original aspect ratio. It helps in preventing the distortion of image and ensures that image fills the container without stretching or cropping. In this article we are having a ... Read More

How to Create a Fixed Footer with CSS?

AmitDiwan

AmitDiwan

Updated on 12-Feb-2025 09:44:05

639 Views

To create a fixed footer with CSS, we will use CSS position property. A fixed footer means that the footer will remain fixed at the bottom irrespective of the page scrolling. We will be discussing two different approaches to achieve this. In this article, we are having some written content ... Read More

Java lang Long.toOctalString() method with examples

AmitDiwan

AmitDiwan

Updated on 10-Feb-2025 11:30:12

102 Views

In this article, we will learn how to use the java.lang.Long.toOctalString() method in Java. The java.lang.Long.toOctalString() method returns a string representation of the long argument as an unsigned integer in base 8. Java.lang.Long.toOctalString() methodThe java.lang.Long.toOctalString() method converts a given long value into its octal (base-8) string representation. It returns ... Read More

Java Program to Convert Decimal to Octal

AmitDiwan

AmitDiwan

Updated on 28-Jan-2025 14:57:41

661 Views

In this article, we will learn to convert decimals to octals in Java. The octal number system (base 8) is often used in computing and digital systems. It uses digits from 0 to 7, and converting a decimal number (base 10) to an octal is a common task in programming. ... Read More

JavaScript - Converting array of objects into object of arrays

AmitDiwan

AmitDiwan

Updated on 28-Jan-2025 14:56:36

1K+ Views

In this article, we will learn to convert an array of objects into an object of arrays in JavaScript. When working with JavaScript, it's common to handle arrays of objects representing structured data. A frequent challenge is grouping these objects based on a shared property and transforming the result into ... Read More

How to Hide a div in JavaScript on Button Click?

AmitDiwan

AmitDiwan

Updated on 27-Jan-2025 15:00:00

6K+ Views

To hide a div in JavaScript on button click we will be discussing three different approaches with example codes. We will hide the div upon clicking the button and similarly display the hidden div upon clicking the button. In this article we are having a div element. Our task is ... Read More

Java Program to Interchange the Diagonals

AmitDiwan

AmitDiwan

Updated on 23-Jan-2025 23:06:52

236 Views

In this article, we will understand how to interchange the diagonals in Java. A matrix has a row-and-column arrangement of its elements. A matrix with m rows and n columns can be called an m × n matrix. Interchange Diagonals A matrix operation that swaps the elements of the ... Read More

Java program to remove duplicate elements from ArrayList

AmitDiwan

AmitDiwan

Updated on 23-Jan-2025 23:02:51

3K+ Views

In this article, we will understand how to remove duplicate elements from ArrayList. The ArrayList class is a resizable array, which can be found in the java.util package. The difference between a built-in array and an ArrayList in Java is that the ... Read More

1 2 3 4 5 ... 1086 Next
Advertisements