Ankith Reddy has Published 1070 Articles

What is the way to check the size of all the MySQL databases?

Ankith Reddy

Ankith Reddy

Updated on 28-Jan-2020 10:56:05

65 Views

We can check the size of all MySQL databases with the help of the following statementmysql> SELECT table_schema "Database", -> SUM(data_length + index_length)/1024/1024 "Size in MB" -> FROM information_schema.TABLES GROUP BY table_schema; +--------------------+----------------+ | Database           | Size in MB     | +--------------------+----------------+ | ... Read More

How to add picasso library in android studio?

Ankith Reddy

Ankith Reddy

Updated on 27-Jan-2020 13:10:23

973 Views

Before getting into picasso library example, we should know about picasso. Picasso is image processing library and developed by Square Inc. In older days we used to write lengthy of codes to grab image from server or do process., to optimize the process picasso introduced.This example demonstrate about how to ... Read More

World Map on HTML5 Canvas or SVG

Ankith Reddy

Ankith Reddy

Updated on 27-Jan-2020 07:05:11

510 Views

You can use SVG to create a World Map and work with raphaeljs.Firstly, learn how to add Raphael.js, and create a circle, var paper = Raphael(10, 50, 320, 200); // drawing circls var circle = paper.circle(50, 40, 10); circle.attr("fill", "#f00"); circle.attr("stroke", "#fff");Then refer the following to create a ... Read More

Zoom HTML5 Canvas to Mouse Cursor

Ankith Reddy

Ankith Reddy

Updated on 24-Jan-2020 10:52:18

901 Views

The canvas always scales from its current origin. The default origin is [0, 0]. If you want to scale from another point, you can first do ctx.translate(desiredX, desiredY);. This will reset the origin of the canvas to [desiredX, desiredY].The translate() method remaps the (0, 0) position on the canvas. The ... Read More

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

134 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

How to work with removeEventListener() method in JavaScript?

Ankith Reddy

Ankith Reddy

Updated on 23-Jan-2020 08:17:15

96 Views

Use the removeEventListener() method in JavaScript to remove event handler attached with addEventListener() method.Example                    #box {             background-color: gray;             border: 2px dashed;          }   ... 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

43 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

74 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

25 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

Advertisements