Usharani has Published 88 Articles

Usage of direction property in CSS

usharani

usharani

Updated on 31-Jan-2020 06:03:46

The direction property is used to set the text direction. Possible values are ltr or rtl.ExampleYou can try to run the following code to set the text direction with CSS:                            This text will be renedered from right to left          

Usage of font-size property in CSS

usharani

usharani

Updated on 30-Jan-2020 10:22:35

The font-size property is used to increase or decrease the size of a font. The font-size property is used to control the size of fonts. Possible values could be xx-small, x-small, small, medium, large, x-large, xx-large, smaller, larger, size in pixels or in %.             ... Read More

CSS Measurement Units

usharani

usharani

Updated on 30-Jan-2020 08:25:48

CSS supports a number of measurements including absolute units such as inches, centimeters, points, and so on, as well as relative measures such as percentages and em units. You need these values while specifying various measurements in your Style rules.The following are the CSS Measurement Units along:UnitDescriptionExample%Defines a measurement as ... Read More

Group Selectors in CSS

usharani

usharani

Updated on 30-Jan-2020 07:57:12

You can apply a style to many selectors if you like. Just separate the selectors with a comma, as given in the following example:h1, h2, h3 {    color: #36C;    font-weight: normal;    letter-spacing: .4em;    margin-bottom: 1em;    text-transform: lowercase; }This defined style rule will be applicable to ... Read More

How does MySQL handle out of range numeric values?

usharani

usharani

Updated on 30-Jan-2020 06:59:14

Handling of MySQL numeric value that is out of allowed range of column data type depends upon the SQL mode in following ways −(A) Enabled SQL strict mode - When strict SQL mode is enabled, MySQL returns the error on entering the put-of-range value. In this case, the insertion of some ... Read More

How can we fetch month and day from a given date in MySQL?

usharani

usharani

Updated on 30-Jan-2020 05:37:11

It can be done inflowing two ways −(A) With the help of EXRACT() function - EXTRACT() function can fetch any part from MySQL TIMESTAMP value. Following is the example of fetching month and day from a given date.mysql> Select EXTRACT(Month from '2017-10-22') AS 'MONTH'; +-------+ | MONTH | +-------+ | ... Read More

What MySQL returns on using any other character than ‘T’ or ‘Space’ between date and time parts?

usharani

usharani

Updated on 29-Jan-2020 06:48:45

In that case, MySQL will return all zeros at the place of time along with correct date part. An example is as follows in which we used character ‘W’ at the place of ‘T’ or ‘Space’ between date and time part −mysql> Select TIMESTAMP('2017-10-20W06:10:36'); +----------------------------------+ | TIMESTAMP('2017-10-20W06:10:36') | +----------------------------------+ | ... Read More

How can we provide a date with only year (zero months & zero days) value in MySQL?

usharani

usharani

Updated on 28-Jan-2020 12:25:52

We can store a date with only year value and have zero months as well as zero-days in MySQL table by disabling NO_ZERO_IN_DATE mode. If this mode is enabled then MySQL will count such kind of date as invalid date and stores all zeros.mysql> Insert into year_testing (OrderDate) values('2017:00:00'); Query ... Read More

How to calculate age in years from birthdate in MySQL?

usharani

usharani

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

We can calculate age in years from birthdate as follows −mysql> SET @dob = '1984-01-17'; Query OK, 0 rows affected (0.00 sec)This above query will pass the value’1984-01-17’ in the ‘dob’ variable. Then after applying the formula in the query below, we can get the age in years.mysql> Select Date_format( ... Read More

How to use case-insensitive switch-case in JavaScript?

usharani

usharani

Updated on 03-Jan-2020 06:20:08

To use case-insensitive switch-case in JavaScript, make the input all upper or all lowercase.ExampleYou can try to run the following code to learn how to use a case-insensitive switch:           JavaScript Strings                      var ... Read More

Advertisements