Ankith Reddy has Published 995 Articles

AngularJS and HTML5 date input value - how to get Firefox to show a readable date value in a date input?

Ankith Reddy

Ankith Reddy

Updated on 24-Jan-2020 10:46:12

296 Views

The elements of type date allows user to enter date, using a text box or using date picker. With the ng-model directive, bins the values of AngularJS application data to HTML input controls. Firefox does not currently support type="date". It will convert all the values to string. Sinceyou want ... Read More

Is their a JavaScript Equivalent to PHP explode()?

Ankith Reddy

Ankith Reddy

Updated on 23-Jan-2020 07:05:08

2K+ Views

The JavaScript equivalent to PHP explode() is split(). To get the data after the first colon, try to run the following code.Example                    var str = '087000764008:Rank:info:result';          var arr = str.split(":");          document.write(arr[1] + ":" + arr[2]);          

imagecolormatch() function in PHP

Ankith Reddy

Ankith Reddy

Updated on 31-Dec-2019 07:59:35

93 Views

The imagecolormatch() function forms the colors of the palette version of an image more closely match the true color versionSyntaxbool imagecolormatch ( img1, img2 )Parametersimg1: Create image with imagecreatetruecolor() function.img2: A palette image link resource pointing to an image. This image has the same size as img1.ReturnThe imagecolormatch() function returns ... Read More

imagecolorset() function in PHP

Ankith Reddy

Ankith Reddy

Updated on 31-Dec-2019 07:46:41

131 Views

The imagecolorset() function sets the color for the specified palette index. Using this create flood-fill-like effects in palleted images.Syntaximagecolorset ( img, index, red, green, blue, alpha )Parametersimg: Image created with imagecreatetruecolor() functionindex: The index in the palette imagered: Value of red componentgreen: Value of green componentblue: Value of blue componentalpha: ... Read More

imagecharup() function in PHP

Ankith Reddy

Ankith Reddy

Updated on 31-Dec-2019 07:40:15

77 Views

The imagecharup() function is used to draw a character vertically.Syntaximagecharup( img, font, x, y, c, color )Parametersimg: Create an image with imagecreatetruecolor()font: Sets the font size. It can be 1, 2, 3, 4, 5 for built-in fonts in latin2 encodingx: x-coordinatey: y-coordinatec: character to be drawncolor: color identifierReturnThe imagecharup() function ... Read More

imagecolorallocatealpha() function in PHP

Ankith Reddy

Ankith Reddy

Updated on 31-Dec-2019 07:22:02

266 Views

The imagecolorallocatealpha() function allocates a color for an image.Syntaximagecolorallocatealpha ( img, red, green, blue, alpha )Parametersimg: Image resource created with imagecreatetruecolor().red: Red color componentgreen: Green color componentblue: Blue color componentalpha: The transparency of image, with 0 indicating completely opaque, whereas 127 indicating completely transparent.ReturnThe imagecolorallocatealpha() function returns a color identifier or FALSE ... Read More

imagecolorclosestalpha() function in PHP

Ankith Reddy

Ankith Reddy

Updated on 31-Dec-2019 07:19:16

90 Views

The imagecolorclosestalpha() function gets the index of closet color with alpha value.Syntaximagecolorclosestalpha ( img, red, green, blue, alpha )Parametersimg: Image resource created with imagecreatetruecolor().red: Red color componentgreen: Green color componentblue: Blue color componentalpha: The transparency of image, with 0 indicating completely opaque, whereas 127 indicating completely transparent.ReturnThe imagecolorclosestalpha() function returns ... Read More

imagesx() function in PHP

Ankith Reddy

Ankith Reddy

Updated on 31-Dec-2019 06:24:40

300 Views

The imagesx() function gets the width of image. It returns the width of the image or FALSE on errors.Syntaximagesx(img)Parametersimg: Image resource created with imagecreatetruecolor()ReturnThe imagesx() function returns the width of the image or FALSE on errors.ExampleThe following is an example: Live DemoOutputThe following is the output:450Read More

imagefill() function in PHP

Ankith Reddy

Ankith Reddy

Updated on 31-Dec-2019 06:21:35

421 Views

The imagefill() function is used to fill the image.Syntaximagefill(img, x, y, color)ParametersimgCreate a blank image with imagecreatetruecolor().x x-coordinate of start pointy y-coordinate of start pointcolor The fill color.ReturnThe imagefill() function returns TRUE on success or FALSE on failure.ExampleThe following is an example:OutputThe following is the output:Read More

gmp_or() function in PHP

Ankith Reddy

Ankith Reddy

Updated on 30-Dec-2019 10:53:17

85 Views

The gmp_or() function computes the bitwise OR of two GMP numbers.Syntaxgmp_or(n1, n2)Parametersn1: The first GMP number. It can be GMP object in PHP version 5.6 and later. Can also be numeric strings.n2: The second GMP number. It can be GMP object in PHP version 5.6 and later. Can also be ... Read More

Advertisements