Mkotla has Published 100 Articles

How can I use MySQL INTERVAL keyword while extracting the part of the date?

mkotla

mkotla

Updated on 29-Jan-2020 06:19:28

59 Views

With the help of following example we can understand that how we can use MySQL INTERVAL keyword with EXTRACT() function −mysql> Select StudentName, RegDate, EXTRACT(YEAR from RegDate+INTERVAL 2 year) AS 'Two Year Interval' from testing where StudentName = 'Gaurav'; +-------------+---------------------+-------------------+ | StudentName | RegDate             ... Read More

Why I got output 0(Zero) on converting date like ‘1965-05-15’ to TIMESTAMP?

mkotla

mkotla

Updated on 28-Jan-2020 10:50:53

237 Views

As we know that with the help of MySQL UNIX_TIMESTAMP function, we can produce the number of seconds from given date/DateTime. But when we try to convert a date like ‘1965-05-15’ it would give 0(Zero) as output because the range of TIMESTAMP is between ‘1970-01-01 00:00:01’ to ‘2038-01-19 08:44:07’. Hence, ... Read More

How to take user input using HTML forms?

mkotla

mkotla

Updated on 10-Jan-2020 11:12:57

16K+ Views

Using HTML forms, you can easily take user input. The tag is used to get user input, by adding the form elements. Different types of form elements include text input, radio button input, submit button, etc.Let’s learn about the tag, which helps you to take user input using ... Read More

What is the difference between an acronym and abbr tags?

mkotla

mkotla

Updated on 10-Jan-2020 10:51:46

427 Views

In layman language, an acronym is a word formed by taking letters of each word in a phrase to form an abbreviation. Acronyms are a subset of abbreviations i.e. abbreviation is a shortened form of a word.The tag isn’t supported in HTML5 and is deprecated now. Do not use. ... Read More

What is the difference between closure and nested functions in JavaScript?

mkotla

mkotla

Updated on 09-Jan-2020 06:52:53

768 Views

JavaScript ClosuresIn JavaScript, all functions work like closures. A closure is a function, which uses the scope in which it was declared when invoked. It is not the scope in which it was invoked.Here’s an exampleLive Demo           JavaScriptClosures             ... Read More

How to define functions inside a function body in JavaScript?

mkotla

mkotla

Updated on 07-Jan-2020 08:06:24

113 Views

To achieve what you want, use JavaScript Closures. A closure is a function, which uses the scope in which it was declared when invoked. It is not the scope in which it was invoked.ExampleLet’s take your example and this is how you can achieve your task. Here, innerDisplay() is a ... Read More

How to redirect if JavaScript is not enabled in a browser?

mkotla

mkotla

Updated on 03-Jan-2020 06:38:41

669 Views

To redirect if JavaScript is not enabled in the web browser, add a script to the tag. Let us say you need to redirect to index.php if JavaScript is not enabled. ExampleHere’s how you can do this:           HTML noscript Tag                                                        html{display:none;}          

What is the difference between null and undefined in JavaScript?

mkotla

mkotla

Updated on 02-Jan-2020 08:47:46

5K+ Views

In JavaScript, undefined is a type, whereas null an object.undefinedIt means a variable declared, but no value has been assigned a value.For example, var demo; alert(demo); //shows undefined alert(typeof demo); //shows undefinednullWhereas, null in JavaScript is an assignment value. You can assign it to a variable.For example, var demo = ... Read More

What are JavaScript language resources?

mkotla

mkotla

Updated on 02-Jan-2020 08:27:18

98 Views

JavaScript resources include resources for the scripting languages standard ECMAScript.This is standardized in the ECMA-262 and ECMA-402 specifications.Here is the ECMAScript standard for the current editions:ECMA-2629th Edition - This is ECMAScript 2018 Language Specification.ECMA-402 5th Edition - This is ECMAScript 2018 Internationalization API Specification.Here are the ECMAScript standards for historical ... Read More

How to use the submit button in HTML forms?

mkotla

mkotla

Updated on 04-Oct-2019 08:31:47

4K+ Views

Submit button automatically submits a form on click. Using HTML forms, you can easily take user input. The tag is used to get user input, by adding the form elements. Different types of form elements include text input, radio button input, submit button, etc.Let’s learn about how to use ... Read More

Advertisements