
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 10744 Articles

AmitDiwan
714 Views
To get rid of LOCK TABLES query, you need to use UNLOCK TABLES.Let us create a table −mysql> create table demo6 −> ( −> country_name varchar(100 −> ) −> ); Query OK, 0 rows affected (1.51 sec)Insert some records into the table with the help of insert command −mysql> insert ... Read More

AmitDiwan
189 Views
For this, you can use UNION ALL along with LIMIT concept. For our example, we will create three tables.Let us create the first table −mysql> create table demo3 −> ( −> value int −> ); Query OK, 0 rows affected (1.39 sec)Insert some records into the table with the help ... Read More

AmitDiwan
241 Views
Following is the syntax implementing multiple LIKE operators with ORDER BY −select *from yourTableName order by ( yourColumnName like '%yourValue1%' ) + ( yourColumnName like '%yourValue2%' ) + . . N desc;Let us create a table −mysql> create table demo2 −> ( −> id int not null auto_increment, ... Read More

AmitDiwan
201 Views
In order to get number located at 2 places before decimal point, you can use the concept of div.Let us create a table −mysql> create table demo1 −> ( −> value float −> ); Query OK, 0 rows affected (2.20 sec)Insert some records into the table with the help of ... Read More

AmitDiwan
545 Views
For this, use Object.keys() along with reduce(). To display the result, we will also use concat().ExampleFollowing is the code −var details = { name: ["John", "David"], age1: "21", age2: "23" }, output = Object .keys(details) .reduce((obj, tempKey) => (obj[tempKey] ... Read More

AmitDiwan
493 Views
Let’s say we have marks records and we need to sum them. The records are displayed in Radio Button −Marks1 75 { if (evnt.checked) { total = total + parseInt(evnt.value); return; ... Read More

AmitDiwan
122 Views
Let’s say the following is our array −var values = [7, 5, 3, 8, 9, '/', 9, 5, 8, 2, '/', 3, 4, 8];To merge specific elements, use map along with split().ExampleFollowing is the code −var values = [7, 5, 3, 8, 9, '/', 9, 5, 8, 2, '/', 3, ... Read More

AmitDiwan
327 Views
For this, you can use ternary operator based on some condition.ExampleFollowing is the code −const yearRangeValue = 18; const getCorrectCentury = dateValues => { var [date, month, year] = dateValues.split("-"); var originalYear = +year > yearRangeValue ? "20" + year : "18" + year; return new Date(date ... Read More

AmitDiwan
458 Views
The get keyword can be used as a getter function like C#, Java and other technologies.We set a function with get like the following in a class −class Employee { constructor(name) { this.name = name; } get fullName() { return this.name; } ... Read More

AmitDiwan
360 Views
We are required to write a JavaScript function that takes in two 2-D arrays of numbers and returns their matrix multiplication result.Let’s say the following are our two matrices −// 5 x 4 let a = [ [1, 2, 3, 1], [4, 5, 6, 1], [7, 8, ... Read More