Circle inscribed in a rhombus touches its four side a four ends. The side of rhombus is a tangent to the circle.Here, r is the radius that is to be found using a and, the diagonals whose values are given.Now the area of triangle AOB = ½ * OA * OB = ½ * AB * r (both using formula ½*b*h).½ *a/2*b/2 = ½ *( √ (a2/4 + b2/4))*ra*b/8 = √ (a2+ b2 )*r /4r = a*b/ 2√ (a2+ b2 )Area of circle = π*r*r = π*(a2*b2)/4(a2+ b2 )ExampleThe diagonal of the rhombus 5 & 10.Area is 15.700000Example Code Live Demo#include ... Read More
You can use BINARY along with the LIKE operator. Let us first create a table −mysql> create table DemoTable ( Header text ); Query OK, 0 rows affected (1.09 sec)Insert records in the table using insert command −mysql> insert into DemoTable values('Programming tutorials on MySQL'); Query OK, 1 row affected (0.11 sec) mysql> insert into DemoTable values('programming in Java language'); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable values('Program in C language'); Query OK, 1 row affected (0.15 sec) mysql> insert into DemoTable values('pRograMMing in Python language'); Query OK, 1 row affected (0.41 sec)Display ... Read More
The getMaxColumnsInOrderBy() method of the DatabaseMetaData interface is used to find out the maximum number of columns that the underlying database allows in an ORDER BY clause.This method returns an integer value, representing the maximum number of columns allowed in an ORDER BY clause. If this value is 0 it indicates that there is no limit or, limit is unknown.To get the DatabaseMetaData object −Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of the driver class corresponding to the underlying database.Get the connection object using the getConnection() ... Read More
You can use GROUP_CONCAT() function from MySQL to display result as a comma separated list. Let us first create a table −mysql> create table DemoTable ( Value int ); Query OK, 0 rows affected (0.26 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(10); Query OK, 1 row affected (0.06 sec) mysql> insert into DemoTable values(20); Query OK, 1 row affected (0.07 sec) mysql> insert into DemoTable values(30); Query OK, 1 row affected (0.06 sec) mysql> insert into DemoTable values(40); Query OK, 1 row affected (0.07 sec) mysql> ... Read More
The bitcoin craze is gradually taking a leap now and the investors are optimistic about its growth and increased value in the coming future. However, the stability of bitcoin currency is still a big concern for everyone. Nonetheless, people are mining bitcoins, getting them exchanged and also dealing in them. This shows its value and power, which is being elongated by each passing year. Despite this, many bitcoin owners linger in vacuum when it comes to converting them into cash. Here are some hassle-free methods you can try to get it right −Cash It On Bitcoin ATMsA Bitcoin ATM works ... Read More
In this program we will see how to find the cubes of n numbers stored in an array.Problem StatementWrite 8086 Assembly language program to calculate cubes of each numbers stored in an array of size n. The array size is stored at location offset 600, and Numbers are stored at 601 onwards.DiscussionTo solve this problem, we are taking the size of the array into the CL register, and make CH = 00H for counting. Now from each location take the number into accumulator, to make cube, we have to multiply it three times. so we are storing the number temporarily ... Read More
Here we will see how to find the place of the set bit of the Accumulator data.Problem StatementWrite 8085 Assembly language program to find the position where the bit is 1. In the accumulator all bits are 0, but only one bit is 1. We have to get the position of the bit which is 1. The position will be displayed in decimal from 1 to 8.DiscussionWe are taking the number like (0010 0000). The place value is 6. So we are rotating the number to the right through carry. If the carry bit is 1, then we break the ... Read More
For this, concatenate both the date and time using CONCAT() function. Let us first create a table −mysql> create table DemoTable -> ( -> ShippingDate date, -> ShippingTime time, -> ShippingDatetime datetime -> ); Query OK, 0 rows affected (0.50 sec)Insert some records in the table using insert command −mysql> insert into DemoTable(ShippingDate, ShippingTime) values('2019-01-10', '10:40:20'); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable(ShippingDate, ShippingTime) values('2019-06-14', '04:00:10'); Query OK, 1 row affected (0.14 sec)Display all records from the table using select statement −mysql> select *from DemoTable;Output+--------------+--------------+------------------+ | ShippingDate | ShippingTime | ... Read More
The area of a circle inscribed inside an equilateral triangle is found using the mathematical formula πa2/12.Lets see how this formula is derived, Formula to find the radius of the inscribed circle = area of the triangle / semi-perimeter of triangle.Area of triangle of side a = (√3)a2/4Semi-perimeter of triangle of side a = 3a/2According to formula, Radius of circle = (√3)a22/4 / 3a/2 = a/2√3Area of circle = πr2 = πa2/12Example Code Live Demo#include int main(void) { int a = 5; float pie = 3.14; float area = (float)((pie*a*a)/12); printf("the area of circle inscribed in ... Read More
The HTML DOM InputEvent data property returns the string corresponding to character that was typed using an event.SyntaxFollowing is the syntax −Returning latest typed character in text field −event.dataExampleLet us see an example for InputEvent data property − Live Demo InputEvent Data form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } InputEvent-Data Fill in the blanks: ... Read More