How to convert a string into integer in JavaScript?

vineeth.mariserla
Published on 25-Aug-2019 06:01:28
To convert a string to an integer parseInt() function is used in javascript. parseInt() function returns Nan( not a number) when the string doesn’t contain number. If a string with a number is sent then only that number will be returned as the output. This function won't accept spaces. If any particular number with ... Read More

JavaScript's Boolean function?

vineeth.mariserla
Published on 25-Aug-2019 06:01:28
Boolean functionWhile developing, a developer may come across yes/no situation. At that point of time Boolean() function can be used. It results only in true or false. Let's discuss it in detail.syntaxBoolean(exp);It takes an expression and scrutinizes it and displays either true or false based on the validity of the ... Read More

User Thread vs Daemon Thread in Java?

raja
Published on 25-Aug-2019 06:01:28
The daemon threads are typically used to perform services for user threads. The main() method of the application thread is a user thread (non-daemon thread). The JVM doesn’t terminate unless all the user thread (non-daemon) terminates. We can explicitly specify a thread created by a user thread to be a daemon thread by ... Read More

How to generate a random number in JavaScript?

vineeth.mariserla
Published on 25-Aug-2019 06:01:28
Generating a random  numberTo generate a random number,  Math.random() is used. We can even generate a number between specified numbers such as between 1 and 10, between 0 and 100, etc. Let's discuss it using an example.syntaxMath.random();ExampleIn the following example, using Math.random() function inside a Math.floor() function, which results in integer values, ... Read More

How can we implement auto-complete JComboBox in Java?

raja
Published on 25-Aug-2019 06:01:28
A JComboBox is a subclass of JComponent class and it is a combination of a text field and a drop-down list from which the user can choose a value. A JComboBox can generate an ActionListener, ChangeListener, and ItemListener interfaces when the user actions on a combo box.We can implement auto-complete JComboBox ... Read More

Convert MySQL date format from yyyy-mm-ddThh:mm:ss.sssZ to yyyy-mm-dd hh:mm:ss ?

AmitDiwan
Published on 25-Aug-2019 06:01:28
Let us first create a table −mysql> create table DemoTable668(JoiningDate varchar(200)); Query OK, 0 rows affected (0.97 sec)Insert some records in the table using insert command. We have inserted date in the format yyyy-mm-ddThh:mm:ss.sssZ −mysql> insert into DemoTable668 values('2001-01-10T06:20:00.000Z'); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable668 ... Read More

Planar Graphs and their Properties

Mahesh Parahar
Published on 25-Aug-2019 06:01:28
A graph 'G' is said to be planar if it can be drawn on a plane or a sphere so that no two edges cross each other at a non-vertex point.ExampleRegionsEvery planar graph divides the plane into connected areas called regions.ExampleDegree of a bounded region r = deg(r) = Number ... Read More

Super keyword in JavaScript?

vineeth.mariserla
Published on 25-Aug-2019 06:01:28
SuperThe super keyword is used to access and call functions on an object's parent. The super.prop and super[expr] expressions are legible in any method definition in both classes and object literals. It is used in the "extended" class, which uses "extends" keyword.syntaxsuper(arguments);ExampleIn the following example, the characteristics of a class called ... Read More

Pendent Vertex, Isolated Vertex and Adjacency of a graph

Mahesh Parahar
Published on 25-Aug-2019 06:01:28
Pendent VertexBy using degree of a vertex, we have a two special types of vertices. A vertex with degree one is called a pendent vertex.ExampleHere, in this example, vertex 'a' and vertex 'b' have a connected edge 'ab'. So with respect to the vertex 'a', there is only one edge ... Read More

MySQL query to select closest date from today?

AmitDiwan
Published on 25-Aug-2019 06:01:28
Let’s say the current date is 2019-07-25. We will now see an example and create a table where ShippingDate is added in the table.Let us first create a table −mysql> create table DemoTable667(ShippingDate datetime); Query OK, 0 rows affected (0.46 sec)Insert some records in the table using insert command −mysql> ... Read More
1 2 3 4 5 6 7 ... 2440 Next
Advertisements