Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Programming Articles - Page 1132 of 3366
3K+ Views
In PHP, imagecreatefrompng() is an inbuilt function that is used to create a new image from a PNG file or URL. imagecreatefrompng() returns an image identifier representing the image obtained from the given filename.Syntaxresource imagecreatefrompng(string $filename)Parametersimagecreatefrompng() takes only one parameter, $filename. This parameter holds the name of the image or path to the PNG image.Return Valuesimagecreatefrompng() returns an image resource identifier on success, and it gives an error on false.Example 1 − Showing the loaded PNG image in the browserOutputExample 2 − Loaded and saving PNG image in the local drive pathOutputExplanation − In Example 2, a png image is ... Read More
3K+ Views
imagecreatefromjpeg() is an inbuilt function in PHP that is used to create a new image from a JPEG file. It returns an image identifier representing the image obtained from the given filename.Syntaxresource imagecreatefromjpeg(string $filename)Parametersimagecreatefromjpeg() uses only one parameter, $filename, that holds the name of the image or path to the JPEG image.Return Valuesimagecreatefromjpeg() returns an image resource identifier on success, and it gives an error on false.Example 1OutputExample 2Input ImageOutput ImageExplanation − In Example 2, we loaded the jpeg image from the local path using the imagecreatefromjpeg() function. Thereafter, we used the imageflip() function to flip the image.Example 3 − ... Read More
307 Views
To divide matrix row values by row maximum excluding 0 in R, we can follow the below steps −First of all, create a matrix.Then, use apply function and if else function to divide the matrix row values by row maximum excluding 0.Create the matrixLet's create a matrix as shown below − Live DemoM
2K+ Views
To subset rows of an R data frame if all columns have values greater than a certain value, we can follow the below steps −First of all, create a data frame.Then, use filter_all function of dplyr package with all_vars function to subset the rows of the data frame for all columns having values greater than a certain value.Create the data frameLet's create a data frame as shown below −Example Live Demox1
312 Views
To divide the data frame row values by row maximum in R, we can follow the below steps −First of all, create a data frame.Then, use apply function to divide the data frame row values by row maximum.Create the data frameLet's create a data frame as shown below − Live Demox
822 Views
To find the row and column position of a value as vector in an R matrix, we can follow the below steps −First of all, create a matrix.Then, find the row and column position of a particular value using which function and reading the output with as.vector function.Example 1Create a matrixLet's create a matrix as shown below − Live DemoM1
148 Views
To divide the row values by row maximum in R’s data.table object, we can follow the below steps −First of all, create a data.table object.Then, use apply function to divide the data.table object row values by row maximum.Create the data frameLet's create a data frame as shown below −library(data.table) x
2K+ Views
To find the critical value of F for one-way ANOVA in R, we can follow the below steps −First of all, create a data frame with one categorical and one numerical column.Then, use aov function to find the anova table.After that, use qf function to find the critical value of F for one-way ANOVA.Create the data frameLet's create a data frame as shown below − Live DemoGrp
313 Views
To expand a data frame rows by its index position in R, we can follow the below steps −First of all, create a data frame.Then, use rep and seq_len function with nrow to expand the data frame rows by their index position.Create the data frameLet's create a data frame as shown below − Live Demox1