Chandu yadav

Chandu yadav

810 Articles Published

Articles by Chandu yadav

Page 3 of 81

HTML <select> size Attribute

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 164 Views

The size attribute of the element is used to set the number of visible list items from a drop-down list. A scrollbar would get added if the size is set more than 1.Following is the syntax−Above, num is the count of the visible list items in the drop-down list.Let us now see an example to implement the size attribute of the element−Example Candidate Profile Following are the details to be submitted by the candidate: Educational Qualification Graduation    BCA    B.COM    B.TECH    B.SC Postgraduation    MCA   ...

Read More

getimagesize() function in PHP

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 3K+ Views

The getimagesize() function is used to display the size of an image.Syntaxgetimagesize(file_name, img_info)Parametersfile_name: The file image i.e. the image path.img_info: Extract some extended information from the image file. Supports only JFIF files.ReturnThe getimagesize() function returns an array element with height, width, type, MIME type of the image, etc.ExampleThe following is an example:OutputThe following is the output:Array ( [0] => 205 [1] => 120 [2] => 3 [3] => width="205" height="120" [bits] => 8 [mime] => image/png)

Read More

LongStream sum() method in Java

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 123 Views

The sum() method of the LongStream class returns the sum of elements in this stream.The syntax is as followslong sum()To use the LongStream class in Java, import the following packageimport java.util.stream.LongStream;First, create an IntStream and add some elementsLongStream longStream = LongStream.of(100L, 30000L, 45000L, 55000L, 70000L);Now, add the elements of the streamlong res = longStream.sum();The following is an example to implement LongStream sum() method in JavaExampleimport java.util.stream.LongStream; public class Demo {    public static void main(String[] args) {       LongStream longStream = LongStream.of(100L, 30000L, 45000L, 55000L, 70000L);       long res = longStream.sum();       System.out.println("The sum ...

Read More

LongStream.Builder accept() method in Java

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 148 Views

The accept() method of the LongStream.Builder class adds an element to the stream being built.The syntax is as followsvoid accept(long i)Here, i is the input.To use the LongStream.Builder class in Java, import the following packageimport java.util.stream.LongStream;Create a LongStreamLongStream.Builder builder = LongStream.builder();Add some elementsbuilder.accept(200L); builder.accept(600L); builder.accept(400L);The following is an example to implement LongStream.Builder accept() method in JavaExampleimport java.util.stream.LongStream; public class Demo {    public static void main(String[] args) {       LongStream.Builder builder = LongStream.builder();       builder.accept(200L);       builder.accept(600L);       builder.accept(400L);       builder.accept(350L);       builder.accept(900L);       builder.accept(850L);   ...

Read More

DoubleStream mapToInt() method in Java

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 187 Views

The mapToInt() function of the DoubleStream class returns an IntStream consisting of the results of applying the given function to the elements of this stream.The syntax is as followsIntStream mapToInt(DoubleToIntFunction mapper)Here, mapper is a stateless function to apply to each element. The DoubleToIntFunction is a function that accepts a double-valued argument and produces an int-valued result.To use the DoubleStream class in Java, import the following packageimport java.util.stream.DoubleStream;The following is an example to implement DoubleStream mapToInt() method in JavaExampleimport java.util.stream.IntStream; import java.util.stream.DoubleStream; public class Demo {    public static void main(String[] args) {       DoubleStream doubleStream = DoubleStream.of(45.8, 78.9, ...

Read More

DoubleStream sorted() method in Java

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 138 Views

The sorted() method of the DoubleStream class returns a stream consisting of the elements of this stream in sorted order.The syntax is as followsDoubleStream sorted()To use the DoubleStream class in Java, import the following packageimport java.util.stream.DoubleStream;Create a DoubleStream and add some elements to the streamDoubleStream doubleStream = DoubleStream.of(78.9, 90.4, 27.9, 20.6, 45.3, 18.5);Now, sort the elements of the streamdoubleStream.sorted().The following is an example to implement DoubleStream sorted() method in JavaExampleimport java.util.*; import java.util.stream.DoubleStream; public class Demo {    public static void main(String[] args) {       DoubleStream doubleStream = DoubleStream.of(78.9, 90.4, 27.9, 20.6, 45.3, 18.5);       System.out.println("Sorted ...

Read More

HTML <form> target Attribute

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 417 Views

The target attribute of the element allows you to display the response generated after submitting the form.Following is the syntax −Here, _blank is used to display the response in new window or tab, _self display the response in the same frame, _parent displays the response in the parent frame, _top displays the response in the entire body of the window, frame displays the response in a named frame.Let us now see an example to implement the target attribute of the element −Example Points    Player:    Rank:    Points:    Submit ...

Read More

DoubleStream.Builder add() method in Java

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 145 Views

The add() method of the DoubleStream.Builder class in Java adds an element to the stream being built. The method returns this builder.The syntax is as followsdefault DoubleStream.Builder add(double ele)Here, ele is the element to be added to this stream.To use the DoubleStream.Builder class in Java, import the following packageimport java.util.stream.DoubleStream; Create DoubleStream.Builder: DoubleStream.Builder builder = DoubleStream.builder(); Now add some elements: builder.add(23.5); builder.add(33.1); builder.add(35.6); builder.add(53.1);The following is an example to implement DoubleStream.Builder add() method in JavaExampleimport java.util.stream.DoubleStream; public class Demo {    public static void main(String[] args) {       DoubleStream.Builder builder = DoubleStream.builder();       builder.add(23.5);     ...

Read More

DoubleStream anyMatch() method in Java

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 144 Views

The anyMatch() method of the DoubleStream class returns whether any elements of this stream match the provided predicate.The syntax is as followsboolean anyMatch(DoublePredicate predicate)Here, the parameter predicate is a stateless predicate to apply to elements of this stream. The DoublePredicate here is a predicate of one double-valued argument.To use the DoubleStream class in Java, import the following packageimport java.util.stream.DoubleStream;Create a DoubleStream and add some elements to the streamDoubleStream doubleStream = DoubleStream.of(67.9, 89.9, 10.5, 95.8, 49.6);Now, check if any of the elements match the predicateboolean res = doubleStream.anyMatch(a -> a > 50);The following is an example to implement DoubleStream anyMatch() method ...

Read More

imagecolorstotal() function in PHP

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 96 Views

The imagecolorstotal() function gets the count of colors in an image's paletteSyntaximagecolorstotal (img)Parametersimg: Image created with imagecreatetruecolor().ReturnThe imagecolorstotal() function returns the number of colors in an image palette.ExampleThe following is an exampleOutputThe following is the output:Number of Colors = 128

Read More
Showing 21–30 of 810 articles
« Prev 1 2 3 4 5 81 Next »
Advertisements