- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
George John has Published 1167 Articles
George John
10K+ Views
A Binary Heap is a complete binary tree which is either Min Heap or Max Heap. In a Max Binary Heap, the key at root must be maximum among all keys present in Binary Heap. This property must be recursively true for all nodes in Binary Tree. Min Binary Heap ... Read More
George John
96 Views
You can use buidInfo along with runCommand to check MongoDB for 32 bits or 64 bits. First switch your database to admin. Following is the syntaxuse adminAfter that use the following syntax to know if my server runs MongoDB 64 bits or notdb.runCommand(buildInfo)Now execute the above syntax> use admin switched ... Read More
George John
5K+ Views
You can use CASE statement to count two different columns in a single query. To understand the concept, let us first create a table. The query to create a table is as follows.mysql> create table CountDifferentDemo - > ( - > ProductId int NOT NULL AUTO_INCREMENT PRIMARY KEY, ... Read More
George John
81 Views
The empty() method of the LongStream class in Java returns an empty sequential LongStream.The syntax is as follows.static LongStream empty()To use the LongStream class in Java, import the following package.import java.util.stream.LongStream;The following is an example to implement LongStream empty() method in Java.Example Live Demoimport java.util.stream.LongStream; public class GFG { public ... Read More
George John
2K+ Views
Yes, it is possible to rename using aggregation. Let us first create a collection with documents> db.renameIdDemo.insertOne({"StudentName":"Chris"}); { "acknowledged" : true, "insertedId" : ObjectId("5c9a1760353decbc2fc927c5") } > db.renameIdDemo.insertOne({"StudentName":"Robert"}); { "acknowledged" : true, "insertedId" : ObjectId("5c9a1765353decbc2fc927c6") } > db.renameIdDemo.insertOne({"StudentName":"David"}); { "acknowledged" : true, "insertedId" : ObjectId("5c9a176b353decbc2fc927c7") ... Read More
George John
107 Views
You can use two approaches to know the version of MySQL. In the first approach, you can use version() to know the MySQL Server version. The first approach is as followsSELECT VERSION();In the second approach, you can use SHOW VARIABLES command to know the MySQL version. The second approach is ... Read More
George John
1K+ Views
In this section we will see how to perform sorting algorithm in C++. A sorted array is an array in which each of the elements are sorted in some order such as numerical, alphabetical etc. There are many algorithms to sort a numerical array such as bubble sort, insertion sort, ... Read More
George John
81 Views
The difference between toArray() and toArray(T[] arr) in Java AbstractCollection is that both the methods returns an array containing all of the elements in this collection, but the latter has some additional features i.e. the runtime type of the returned array is that of the specified array.The syntax is as ... Read More
George John
115 Views
To increment a value inside a nested array, use positional operator ($). Let us first create a collection with documents> db.incrementInNestedArrayDemo.insertOne( ... { ... "StudentId":100, ... "ProjectDetails": ... [ ... {"ProjectId":567778888, ... "TeamSize":4 ... }, ... ... Read More
George John
6K+ Views
Details about the zombie, orphan and daemon processes are given as followsZombie ProcessesA zombie process is a process whose execution is completed but it still has an entry in the process table. Zombie processes usually occur for child processes, as the parent process still needs to read its child’s exit ... Read More