V Jyothi has Published 87 Articles

Is their any alternative to HTML5 iframe srcdoc?

V Jyothi

V Jyothi

Updated on 29-Jan-2020 10:14:05

466 Views

The srcdoc attribute specifies the HTML content of the page to show in the iframe. The HTML tag is used to create an inline frame.Alternative of the srcdoc attribute will be:var doc = document.querySelector('#demo').contentWindow.document; var content = ''; doc.open('text/html', 'replace'); doc.write(content); doc.close();Read More

How to get the first day of next month in MySQL?

V Jyothi

V Jyothi

Updated on 29-Jan-2020 05:18:35

853 Views

With the help of following MySQL query, we can get the first day of next month −mysql> SELECT DATE_FORMAT(CURDATE() + INTERVAL 1 MONTH,'%Y-%m-01') AS 'FIRST DAY OF NEXT MONTH'; +-------------------------+ | FIRST DAY OF NEXT MONTH | +-------------------------+ | 2017-11-01              | +-------------------------+ 1 row in set (0.00 sec)

How to define integer constants in JavaScript?

V Jyothi

V Jyothi

Updated on 13-Jan-2020 10:18:44

825 Views

ECMAScript allows usage of const to define constants in JavaScript. To define integer constants in JavaScript, use the const, const MY_VAL = 5; // This will throw an error MY_VAL = 10;As shown above, MY_VAL is a constant and value 5 is assigned. On assigning, another value to a constant ... Read More

What is the difference between parseInt(string) and Number(string) in JavaScript?

V Jyothi

V Jyothi

Updated on 13-Jan-2020 06:29:41

148 Views

parseInt(string)The parseInt() method parses up to the first non-digit and returns the parsed value.  For example, the following returns 765:parseInt("765world")Let’s take another example. The following returns 50:parseInt(‘50px”);Number(string)Number() converts the string into a number, which can also be a float BTW.For example, the following returns NaN:Number(“765world”)The following returns NaN:Number(“50px”);Read More

What is ECMAScript and how it is related to JavaScript?

V Jyothi

V Jyothi

Updated on 02-Jan-2020 07:59:38

244 Views

JavaScript conforms to ECMAScript standard. JavaScript was first known as LiveScript, but Netscape changed its name to JavaScript, possibly because of the excitement being generated by Java. JavaScript made its first appearance in Netscape 2.0 in 1995 with the name LiveScript. The general-purpose core of the language embedded in Netscape, ... Read More

What does a +function() { } notation do in JavaScript?

V Jyothi

V Jyothi

Updated on 03-Oct-2019 06:40:23

313 Views

The +function() {} notation is primarily used to force the parser to treat whatever follows the + as an expression. This is used for functions that are invoked immediately, for example, +function() { alert("Demo!"); }();However, + before a function is one of the symbol. You can add other options also ... Read More

Do I need to use a semicolon after every function in JavaScript?

V Jyothi

V Jyothi

Updated on 12-Sep-2019 07:35:58

130 Views

Commonly, adding semicolons in JavaScript is optional. Simple statements in JavaScript are generally followed by a semicolon character, just as they are in C, C++, and Java. JavaScript, however, allows you to omit this semicolon if each of your statements is placed on a separate line.No need of a semicolon ... Read More

What is ionic and how is it related with HTML5?

V Jyothi

V Jyothi

Updated on 30-Jul-2019 22:30:22

172 Views

Ionic is an HTML5 Mobile App Development Framework targeted at building hybrid mobile apps. Think of Ionic as the front-end UI framework that handles all the look and feel and UI interactions your app needs to be compelling. Kind of like "Bootstrap for Native", but with the support for a ... Read More

What does the method addFirst(E e) do in java?

V Jyothi

V Jyothi

Updated on 30-Jul-2019 22:30:21

126 Views

The addFirst(E e) method of the class java.util.LinkedList inserts the specified element at the beginning of this list.Example:public class LinkedListDemo {    public static void main(String[] args) {       LinkedList list = new LinkedList();       list.add("Hello");       list.add(2);       list.add("Chocolate");       ... Read More

How to sort an ArrayList in Java in descending order?

V Jyothi

V Jyothi

Updated on 30-Jul-2019 22:30:21

6K+ Views

To sort the contents of an ArrayList in descending orderCreate an ArrayList.Sort the contents of the ArrayList using the sort() method of the Collections class.Then, reverse array list using the reverse() method of the Collections class.Example:import java.util.ArrayList; import java.util.Collections; public class ArrayListSample {    public static void main(String[] args) ... Read More

Advertisements