
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
Arjun Thakur has Published 1025 Articles

Arjun Thakur
239 Views
Yes, we can use the NOT and AND together in MongoDB. The syntax is as followsNOT X AND NOT Y = NOT (X AND Y) Let us see the working of above syntax. If both X and Y will be true then last result will be false. If one of ... Read More

Arjun Thakur
119 Views
To search for a value in KeyValue Tuple, use the contains() method. Here, the value to be searched should be set as the parameter of the method. The return value is a boolean i.e. TRUE, if the value exists, else FALSE. Let us first see what we need to work ... Read More

Arjun Thakur
283 Views
Following is the syntax to get the embedded data in a MongoDB documentdb.yourCollectionName.find({}, {‘yourOuterKeyName.yourInnerKeyName:1}).pretty();Let us first create a collection with documents> db.embeddedCollectionDemo.insertOne( ... { ... "StudentName" : "Larry", ... "StudentDetails": { ... "Larry1234": {"ProjectName": "Student Web Tracker"}, ... ... Read More

Arjun Thakur
202 Views
To get only the FALSE value, let us first create a collection with documents. One of the fields is isEnable that is having TRUE or FALSE values as shown below> db.translateDefinitionDemo.insertOne({"_id":10, "StudentName":"Larry", "isEnable":true}); { "acknowledged" : true, "insertedId" : 10 } > db.translateDefinitionDemo.insertOne({"_id":20, "StudentName":"Chris", "isEnable":false}); { "acknowledged" : true, "insertedId" ... Read More

Arjun Thakur
476 Views
If you want the database location i.e. where it is created in MySQL, you can use system variable @@datadir.The syntax is as followsSELECT @@datadir;The following is the querymysql> select @@datadir;Here is the output. The above query returns the location+---------------------------------------------+ | @@datadir ... Read More

Arjun Thakur
102 Views
The lastIndexOf() method of the AbstractList return the index of the last occurrence of an element in the list. If the element does not exist in the list, then -1 is returned.The syntax is as followspublic int lastIndexOf(Object ob)Here, the parameter ob is the element to be searched. To work ... Read More

Arjun Thakur
236 Views
To add a new item to an array, you can use $push operator. Let us first implement the following query to create a collection with documents:> db.updateDemo.insertOne({"StudentName":"Larry", "StudentCoreSubject":["Java", "C"]}); { "acknowledged" : true, "insertedId" : ObjectId("5c98ba78330fd0aa0d2fe4c9") } >db.updateDemo.insertOne({"StudentName":"Robert", "StudentCoreSubject":["C++", "MongoDB"]}); { "acknowledged" : true, "insertedId" : ... Read More

Arjun Thakur
256 Views
If a directed graph is given, determine if a vertex j is reachable from another vertex i for all vertex pairs (i, j) in the given graph. Reachable mean that there is a path from vertex i to j. This reach-ability matrix is called transitive closure of a graph. Warshall ... Read More

Arjun Thakur
1K+ Views
To group by range in MySQL, let us first create a table. The query to create a table is as followsmysql> create table GroupByRangeDemo - > ( - > Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, - > YourRangeValue int - > ); Query OK, 0 ... Read More

Arjun Thakur
119 Views
The build() method of the LongStream.Builder class builds the stream, transitioning this builder to the built state.The syntax is as followsLongStream build()To use the LongStream.Builder class in Java, import the following packageimport java.util.stream.LongStream;The following is an example to implement LongStream.Builder build() method in JavaExample Live Demoimport java.util.stream.LongStream; public class Demo { ... Read More