
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
741 Views
We are required to write a JavaScript function that takes in an array of strings, (they may be a single character or greater than that). Our function should simply count all the vowels contained in the array.ExampleLet us write the code −const arr = ['Amy', 'Dolly', 'Jason', 'Madison', 'Patricia']; const ... Read More

AmitDiwan
2K+ Views
Suppose we have an array that contains name of some people like this:const arr = ['Amy', 'Dolly', 'Jason', 'Madison', 'Patricia'];We are required to write a JavaScript function that takes in one such string as the first argument, and two lowercase alphabet characters as second and third argument. Then, our function ... Read More

AmitDiwan
126 Views
We have two sets of ranges; one is a single range of any length (R1) and the other is a set of ranges (R2) some or parts of which may or may not lie within the single range (R1).We need to calculate the sum of the ranges in (R2) - ... Read More

AmitDiwan
2K+ Views
We are required to write a JavaScript function that takes in an array of literals and a number and splits the array (first argument) into groups each of length n (second argument) and returns the two-dimensional array thus formed.If the array and number is −const arr = ['a', 'b', 'c', ... Read More

AmitDiwan
2K+ Views
For this, use application.properties −spring.datasource.username=yourMySQLUserName spring.datasource.password=yourMySQLPassword spring.datasource.url=jdbc:mysql://localhost:3306/yoruDatabaseName spring.datasource.driver-class-name=com.mysql.cj.jdbc.DriverTo understand the above syntax, let us create a table −mysql> create table demo71 −> ( −> id int, −> name varchar(20) −> ); Query OK, 0 rows affected (3.81 sec)Insert some records into the table with the help of insert command −mysql> ... Read More

AmitDiwan
2K+ Views
The difference between AND, OR is that AND evaluates both conditions must be true for the overall condition to be true. The OR evaluates one condition must be true for the overall condition to be true.Let us create a table −mysql> create table demo70 −> ( −> id int not ... Read More

AmitDiwan
226 Views
For this, use UPDATE command along with SUBSTRING_INDEX(). Let us first create a table −mysql> create table demo69 −> ( −> name varchar(40) −> ); Query OK, 0 rows affected (5.04 sec)Insert some records into the table with the help of insert command −mysql> insert into demo69 values('John/Smith'); Query OK, ... Read More

AmitDiwan
122 Views
For this, use CASE WHEN concept. Let us first create a table −mysql> create table demo68 −> ( −> id int not null auto_increment primary key, −> company_name varchar(50), −> employee_name varchar(50), −> country_name varchar(50) −> ); Query OK, 0 rows affected (1.86 sec)Insert some records into the table with ... Read More

AmitDiwan
127 Views
Following is the syntax to display only the first 3 rows with LIMIT set in a range −select *from yourTableName limit yourStartIndex, yourEndIndex;Let us first create a table −mysql> create table demo67 −> ( −> id int, −> user_name varchar(40), −> user_country_name varchar(20) −> ); Query OK, 0 rows affected ... Read More

AmitDiwan
180 Views
Following is the syntax −select *from yourTableName where REGEXP_INSTR(yourColumnName, yourSearchValue);To understand the above syntax, let us first create a table −mysql> create table demo64 −> ( −> id int not null auto_increment primary key, −> name varchar(40) −> ); Query OK, 0 rows affected (3.06 sec)Insert some records into the ... Read More