HTML Base Href Attribute

Arjun Thakur
Updated on 29-Jun-2020 09:18:05

209 Views

The href attribute of the element sets the base URL for all relative URLs. For example, base URL as https://example.com/tutorials for all the relative URLs like /html, /java, /jquery etc., which are eventually −https://example.com/tutorials/html https://example.com/tutorials/java https://example.com/tutorials/jqueryFollowing is the syntax −Above, absolute _URL is the absolute url for the base URL. Let us now see an example to implement the href attribute of the element −Example Live Demo    Tutorials List    Java Tutorial(This will act as https://www.example.com/tutorials/java.html)    jQuery Tutorial(This will act as https://www.example.com/tutorials/jquery.html)    Blockchain Tutorial(This will act as https://www.example.com/tutorials/blockchain.html)    Python Tutorial(This will ... Read More

PHP max() Function

Malhar Lathkar
Updated on 29-Jun-2020 09:12:39

564 Views

Definition and UsageThe max () function returns highest element in array, or highest amongst two or more comma separated parameters.Syntaxmax ( array $values ) : mixedOrmax ( mixed $value1 [, mixed $... ] ) : mixedParametersSr.NoParameter & Description1valuesIf only one parameter is given, it should be an array of valaues which may be of same or different types2value1, value2, ..If two or more parameters aregiven, they should be any comparable values of same or different typesReturn ValuesPHP max() function returns highest value from the array parameter or sequence of values. Standard comparison operators are applicable. If multiple values of different types evaluate ... Read More

INT 5 vs INT 10 in MySQL

Vrundesha Joshi
Updated on 29-Jun-2020 09:11:10

2K+ Views

The value in the parentheses is used to display only the width and sets the zerofill. The width is 5 for int(5), whereas 10 for int(10). Let us see another example with a different width value set for int.Let us first create a table. Here, we have set the int to int(11) and int(13). The following is the query to create a table −mysql> create table intVsIntAnyThingDemo −> ( −> Number1 int(11) unsigned zerofill, −> Number int(13) unsigned zerofill −> ); Query OK, 0 rows affected (1.17 sec)Now you can insert record in the table with the help of insert ... Read More

Set the Result of a Query to a Variable in MySQL

Chandu yadav
Updated on 29-Jun-2020 09:10:38

411 Views

You can set the result of a query using select into command. The syntax is as follows.select yourColumnName1 into @anyVariableName from yourTableName where yourColumnName2='anyValue';Check the result is present in the variable or not using the select command. The syntax is as follows -select @anyVariableName;To understand the above syntax, let us first create a table. The query to create a table is as follows.mysql> create table StudentInformation -> ( -> StudentId int, -> StudentName varchar(100), -> StudentAge int -> ); Query OK, 0 rows affected (0.62 sec)Insert some records in the table using insert command. The query is as follows.mysql> insert ... Read More

PHP log10 Function

Malhar Lathkar
Updated on 29-Jun-2020 09:10:34

198 Views

Definition and UsageThe log10 () function calculates base-10 logarithm of a number.Base-10 logarithm is also called common or sandard algorithm. The log10(x) function calculates log10x. It is related to natural algorithm by following equation −log10x=logex/loge10 So thatlog10100=loge100/loge10 = 2In PHP, log10 is represented by log10() functionSyntaxlog10 ( float $arg ) : floatParametersSr.NoParameter & Description1argThe number whose base-10 logarithm is to be calculatedReturn ValuesPHP log10() function returns base-10 logarithm of arg.PHP VersionThis function is available in PHP versions 4.x, PHP 5.x as well as PHP 7.x.Example Live DemoFollowing example calculates base-10 logarithm of 100OutputThis will produce following result −log10(100)=2Example Live DemoFollowing code calculates base-10 logarithm of ... Read More

PHP log1p Function

Malhar Lathkar
Updated on 29-Jun-2020 09:09:22

154 Views

Definition and UsageHere 1p stands for 1 plus. The log1p () function calculates natural (base-e) logarithm of a 1+number.log1p(x)=log(1+x).log1p is calculated in a way such that its value is accurate even for very small x such that 1+x is nearly equal to xSyntaxlog1p ( float $arg ) : floatParametersSr.NoParameter & Description1argThe number whose 1p logarithm is to be calculatedReturn ValuesPHP log1p() function returns base-1p logarithm of arg+1.PHP VersionThis function is available in PHP versions 4.x, PHP 5.x as well as PHP 7.x.Example Live DemoFollowing example calculates log1p of 100OutputThis will produce following result −using log() to calculate log(1+100)=4.6151205168413 log1p(100)=4.6151205168413Example Live Demowhere normal log(0) returns ... Read More

PHP log() Function

Malhar Lathkar
Updated on 29-Jun-2020 09:08:16

317 Views

Definition and UsageThe log () function calculates natural logarithm of a number.Logarithm is inverse of eponential. If 102=100, it means log10100=2. Natural logarithm is calculated with Euler Number e as base. In PHP, the predefined constant M_E gives value of e which is 2.7182818284590452354For example, exp(4.60517018599)=100 (it is also same as e4.60517018599=100). Hence, loge100=4.60517018599In PHP, loge is represented by log() functionSyntaxlog ( float $arg [, float $base = M_E ] ) : float ParametersSr.NoParameter & Description1argThe value whose logarithm is to be calculated2baseDefault value of base is M_E.Return ValuesPHP log() function returns logarithm of arg to base. If base is not given, result is ... Read More

MySQL Select Multiple Values

Rishi Rathor
Updated on 29-Jun-2020 09:07:55

22K+ Views

To select multiple values, you can use where clause with OR and IN operator.The syntax is as follows −Case 1 − Using ORselect *from yourTablename where yourColumnName = value1 or yourColumnName = value2 or yourColumnName = value3, .........N;Case 2 − Using INselect *from yourTableName where yourColumnName IN(value1, value2, ....N);To understand the above syntax, let us create a table. The following is the query to create a table −mysql> create table selectMultipleValues −> ( −> BookId int, −> BookName varchar(200) −> ); Query OK, 0 rows affected (1.68 sec)Now you can insert some records in the table with the help of ... Read More

PHP lcg_value() Function

Malhar Lathkar
Updated on 29-Jun-2020 09:06:34

207 Views

Definition and UsageThe lcg_value() function generates a random number between 0 and 1.LCG stands for linear congruential generator. This generator generates a sequence of pseudo-randomized numbers calculated with a discontinuous piecewise linear equation. This is one of the oldest pseudorandom number generator algorithmsSyntaxlcg_value ( void ) : floatParametersReturn ValuesPHP lcg_value() function returns a pseudo random float value between 0.0 and 1.0, inclusive.PHP VersionThis function is available in PHP versions 4.x, PHP 5.x as well as PHP 7.x.Example Live DemoFollowing is the example use of lcg_value() function −OutputThis may produce following result −lcg_value() = 0.45920201711279 lcg_value() = 0.18118693614628

HTML Big Tag

Chandu yadav
Updated on 29-Jun-2020 09:06:21

145 Views

The element in HTML is used to form the text bigger than the default.Note: The element is not supported in HTML Let us now see an example to implement the element in HTML−Example Live Demo    Demo Heading    This is demo text!    This demo text is bigger than the default text. OutputIn the above example, first we have set a normal text −This is demo text!After that, we have set another text using the element −           This demo text is bigger than the default text.    

Advertisements