- 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
Nancy Den has Published 330 Articles
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
99 Views
The difference between two LocalDate objects can be obtained using the until() method in the LocalDate class in Java. This method requires a single parameter i.e. the end date for the LocalDate object and it returns the difference between two LocalDate objects using a Period object.A program that demonstrates this ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
1K+ Views
To remove array element by its index in MongoDB, you can use $unset and $pull operator. There are two steps to remove array elements from an array.The syntax for the same is as follows:db.yourCollectionName.update({}, {$unset:{"yourArrayListName.yourPosition":yourPositionValue}}; db.yourCollectionName.update({}, {$pull:{"yourArrayListName":null}});To understand the above syntax, let us create a collection with document. The query ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
1K+ Views
Microprocessors and microcontrollers can be used to design some tools or systems to perform some special tasks. Using microcontrollers, we can make different types of modules or systems. Here is a list of some systems that can be designed by using microcontrollers −Electronic Voting MachineRFID based Access Control SystemHeart Rate ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
1K+ Views
To get the last N records in MongoDB, you need to use limit(). The syntax is as follows:db.yourCollectionName.find().sort({$natural:-1}).limit(yourValue);To understand the above syntax, let us create a collection with document. The query to create a collection with document is as follows:> db.getLastNRecordsDemo.insertOne({"EmployeeName":"Maxwell"}); { "acknowledged" : true, "insertedId" : ObjectId("5c6ecf3d6fd07954a4890689") ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
99 Views
An immutable copy of the Period object where some months are added to it can be obtained using the plusMonths() method in the Period class in Java. This method requires a single parameter i.e. the number of months to be added and it returns the Period object with the added ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
2K+ Views
Let us convert string type to int for an example. Aggregation does not allow us to directly change the type of a field; therefore, you need to write a code to convert the type of a field.At first, create a collection with document. After that we will get the type ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
497 Views
You can use aggregate framework to group by dates in MongoDB. Let us first create a collection with some documents. The query to create a collection with documents are as follows:> db.groupByDateDemo.insertOne({"UserLoginDateTime":new ISODate()}); { "acknowledged" : true, "insertedId" : ObjectId("5c6ee4df6fd07954a4890695") } > db.groupByDateDemo.insertOne({"UserLoginDateTime":new ISODate("2019-01-31 15:20:09.234Z")}); { "acknowledged" ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
225 Views
You can insert time values in SQL using the time datatype, The java.sql.Time class maps to the SQL Time type.The PreparedStatement interface provides a method named setTime(). Using this you can insert time into a table. This method accepts two parameters −An integer representing the parameter index of the place ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
93 Views
An immutable copy of the Period object where some years are added to it can be obtained using the plusYears() method in the Period class in Java. This method requires a single parameter i.e. the number of years to be added and it returns the Period object with the added ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
884 Views
To convert the string to date in MongoDB, use the following syntax:db.yourCollectionName.aggregate( [ { $project: { anyVariableName: { $dateFromString: ... Read More