Mkotla has Published 77 Articles

Example of key frames with left animation using CSS3

mkotla

mkotla

Updated on 21-Jun-2020 05:26:43

176 Views

The following example shows height, width, color, name, and duration of animation with keyframes syntax −ExampleLive Demo                    h1 {             -moz-animation-duration: 3s;             -webkit-animation-duration: 3s;           ... Read More

What MySQL would return if we refer a user variable which is not assigned any value explicitly?

mkotla

mkotla

Updated on 20-Jun-2020 10:49:23

131 Views

In case, when we refer a user variable which is not assigned any value explicitly, MySQL would return NULL. In other words, its value would be NULL. Following example would illustrate it −mysql> Select @X, @Y, @Z, @S, @G; +------+-------+----------+------+------+ | @X   | @Y    | @Z     ... Read More

How can we transfer information between MySQL and data files?

mkotla

mkotla

Updated on 20-Jun-2020 09:14:18

202 Views

Transferring the information between MySQL and data files mean importing data from data files into our database or exporting data from our database into files. MySQL is having two statements that can be used to import or export data between MySQL and data files −LOAD DATA INFILEThis statement is used ... Read More

What is the maximum length of data we can put in a TEXT column in MySQL?

mkotla

mkotla

Updated on 20-Jun-2020 08:31:13

4K+ Views

As we know TEXT data objects are useful for storing long-form text strings. The different TEXT objects offer a range of storage space from 255 bytes to 4 Gb. The following table shows the storage of different kinds of TEXT data type −Type of BLOBMaximum amount of Data that can ... Read More

On inserting ‘NULL’, ‘0’ or No Value to the column, will MySQL assign sequence number for AUTO_INCREMENT column?

mkotla

mkotla

Updated on 20-Jun-2020 07:36:00

506 Views

MySQL will automatically assign sequence numbers to the AUTO_INCREMENT column even if we insert NULL, 0 or No Value to the column in a table.Examplemysql> create table test123(id INT PRIMARY KEY NOT NULL AUTO_INCREMENT, Name Varchar(10)); Query OK, 0 rows affected (0.15 sec)The query above created a MySQL table named ... Read More

How to test if a JavaScript cookie has expired?

mkotla

mkotla

Updated on 17-Jun-2020 06:43:19

3K+ Views

To test if a cookie has expired in JavaScript, add the following condition and check −if( !($.cookie('myCookie') === null) ) {    // Do something (cookie exists) } else {    // Do something (cookie expired) }You can also check it using a single line code −checkCookie = $.cookie('myCookie') === null ? ( /*Condition TRUE...*/ ) : ( /*Condition FALSE...*/ );

How to get a decimal portion of a number with JavaScript?

mkotla

mkotla

Updated on 17-Jun-2020 06:35:57

3K+ Views

With JavaScript, use the % operator to get the decimal portion of a number.ExampleYou can try to run the following to get decimal portion −Live Demo                    var num1 = 5.3;          var num2 = 4.2;          var num3 = 8.6;          document.write(num1 % 1);          document.write(""+num2 % 1);          document.write(""+num3 % 1);           Output0.2999999999999998 0.20000000000000018 0.5999999999999996

Why in JavaScript, “if ('0' == false)” is equal to false whereas it gives true in “if(0)” statement?

mkotla

mkotla

Updated on 16-Jun-2020 13:28:37

2K+ Views

Let’s see the conditions one by one − if(‘0’ == false)It follows the following rule −If Type(y) is Boolean, return the result of the comparison x == ToNumber(y)The == does type coercion. This means an explicit type conversion is requested to match the type of the two operands. The left side ... Read More

How to customize the position of an alert box using JavaScript?

mkotla

mkotla

Updated on 16-Jun-2020 12:45:56

3K+ Views

To customize the position of an alert box, use the CSS “top” and “left” properties. We have a custom alert box, which we’ve created using jQuery and styled with CSS.ExampleYou can try to run the following code to customize the position of an alert box −Live Demo     ... Read More

How to set multiple cookies in JavaScript?

mkotla

mkotla

Updated on 16-Jun-2020 11:59:40

4K+ Views

With JavaScript, to set more than one cookie, set document.cookie more than once using the; separator.ExampleYou can try to run the following code to set multiple cookies −Live Demo                 var num=1;       function addCookie() {       ... Read More

Advertisements