
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
430 Views
To create a chat message with CSS, the code is as follows −Example Live Demo body { margin: 0 auto; max-width: 800px; padding: 0 20px; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } ... Read More

AmitDiwan
274 Views
To create a typing effect with JavaScript, the code is as follows −Example Live Demo body{ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } button{ padding:10px; font-size: 18px; background-color: rgb(128, 19, 218); ... Read More

AmitDiwan
668 Views
To create a countdown timer with JavaScript, the code is as follows −Example Live Demo body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } .timer { text-align: center; font-size: 60px; margin-top: ... Read More

AmitDiwan
347 Views
To use icons to make animated effect, the code is as follows −Example Live Demo #user { font-size: 60px; color:rgb(106, 33, 201); } body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; padding: ... Read More

AmitDiwan
296 Views
For random value with Map Reduce, use mapReduce() concept along with Math.random(). Let us create a collection with documents −> db.demo651.insertOne({Value:10}); { "acknowledged" : true, "insertedId" : ObjectId("5e9f0330e3c3cd0dcff36a57") } > db.demo651.insertOne({Value:20}); { "acknowledged" : true, "insertedId" : ObjectId("5e9f0332e3c3cd0dcff36a58") } > db.demo651.insertOne({Value:30}); { "acknowledged" : true, ... Read More

AmitDiwan
872 Views
To query only the field name, set fieldName to 0 i.e. the fieldName to hide. Let us create a collection with documents −> db.demo650.insertOne({_id:101, details:{Name:"Chris", Age:21}}); { "acknowledged" : true, "insertedId" : 101 } > db.demo650.insertOne({_id:102, details:{Name:"Bob", Age:22}}); { "acknowledged" : true, "insertedId" : 102 } > db.demo650.insertOne({_id:103, details:{Name:"Sam", Age:20}}); ... Read More

AmitDiwan
3K+ Views
Use MongoDB aggregate for this and within that, use $group. Let us create a collection with documents −> db.demo649.insertOne( ... { "_id" : 101, "Names" : [ "John", "Bob", "Bob", "Robert" ], "CountryName" : "US" } ... ); { "acknowledged" : true, "insertedId" : 101 } > > db.demo649.insertOne({ ... Read More

AmitDiwan
122 Views
To create a new database, you need to use the USE command as in the below syntax −use yourDatabaseName;To show all databases, you need to use show command. The syntax is as follows −show dbs;Let us implement the above syntax in order to create database −> use onlinecustomertracker; switched to ... Read More

AmitDiwan
146 Views
For searching value, use $match in MongoDB. Let us create a collection with documents −> db.demo648.insertOne( ... { ... StudentInformation: ... [ ... { ... Name:"John", ... ... Read More

AmitDiwan
632 Views
To combine or merge fields and then perform count, use $group along with $sum and $sort. Let us create a collection with documents −> db.demo647.insertOne({"Subject":"MySQL"}); { "acknowledged" : true, "insertedId" : ObjectId("5e9c86316c954c74be91e6ee") } > db.demo647.insertOne({"Subject":"MongoDB"}); { "acknowledged" : true, "insertedId" : ObjectId("5e9c86356c954c74be91e6ef") } > db.demo647.insertOne({"Subject":"MySQL"}); { ... Read More