- 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
Maruthi Krishna has Published 951 Articles
Maruthi Krishna
2K+ Views
You can drop an existing collection from MongoDB using the drop() method.Syntaxdb.coll.drop()Where, db is the database.coll is the collection (name) in which you want to insert the documentExampleAssume we have created 3 collections in a MongoDB database as shown below −> use sampleDatabase switched to db sampleDatabase > db.createCollection("students") { ... Read More
Maruthi Krishna
3K+ Views
You can delete a document from an existing collection in MongoDB using the remove() method.Syntaxdb.coll.remove(DELLETION_CRITTERIA)Where, db is the database.coll is the collection (name) in which you want to insert the documentExampleAssume we have a collection named students in the MongoDB database with the following documents −{name:"Ram", age:26, city:"Mumbai"} {name:"Roja", age:28, ... Read More
Maruthi Krishna
19K+ Views
You can retrieve documents from an existing collection in MongoDB using the find() method.Syntaxdb.coll.find()Where, db is the database.coll is the collection (name) in which you want to insert the documentExampleAssume we have a collection named students in the MongoDB database with the following documents −{name:"Ram", age:26, city:"Mumbai"} {name:"Roja", age:28, city:"Hyderabad"} ... Read More
Maruthi Krishna
1K+ Views
You can insert multiple documents into an existing collection in MongoDB using the insertMany() method.Syntaxdb.coll.insert(docArray)Where, db is the database.coll is the collection (name) in which you want to insert the documentdocArray is the array of documents you want to insert.Example> use myDatabase() switched to db myDatabase() > db.createCollection(sample) { "ok" ... Read More
Maruthi Krishna
6K+ Views
You can insert a document into an existing collection in MongoDB using the insert() method.Syntaxdb.coll.insert(doc)Where, db is the database.coll is the collection (name) in which you want to insert the documentdoc is the document you want to insert.Example> use myDatabase() switched to db myDatabase() > db.createCollection(sample) { "ok" : 1 ... Read More
Maruthi Krishna
3K+ Views
You can create a collection in MongoDB using the db.createCollection() method.Syntaxdb.createCollection(name, options)Wheredb is the database.name is the name of the collection you want to create.Option is the set of optional parameters such as capped, auto indexed, size and, max.Example> use myDatabase switched to db myDatabase > db.createCollection("myCollection") { "ok" : ... Read More
Maruthi Krishna
179 Views
The org.opencv.imgproc package of Java OpenCV library contains a class named Imgproc this class provides various methods to process an input image. It provides a set of methods to draw geometrical shapes on images.This class provides a method named ellipse() using this you can draw an ellipse on an image, ... Read More
Maruthi Krishna
429 Views
The org.opencv.imgproc package of Java OpenCV library contains a class named Imgproc this class provides various methods to process an input image such as resize(), filter2D, etc.. In addition to these It also provides a set of method to draw geometrical shapes on images.Among them to draw a polylines you ... Read More
Maruthi Krishna
333 Views
A polygon with all the interior angles less than 180 is known as a convex polygon. The org.opencv.imgproc package of Java OpenCV library contains a class named Imgproc. To draw a polygon you need to invoke the fillConvexPoly() method of this class. This method accepts 3 parameters −A Mat object representing ... Read More
Maruthi Krishna
136 Views
The org.opencv.imgproc package of Java OpenCV library contains a class named Imgproc this class provides various methods to process an input image. It provides a set of methods to draw geometrical shapes on images.To draw an arrowed line you need to invoke the arrowedLine() method of this class. This method ... Read More