- 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
Ankith Reddy has Published 1070 Articles
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
3K+ Views
In this post, we are going to learn, how to detect lines in an image, with the help of a technique called Hough transform.Hough transform?Hough transform is a feature extraction method to detect any simple shape, if you can represent that shape in mathematical form. It somehow manage to detect ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
238 Views
To limit number of values in a field, use $slice operator.Let us first create a collection with documents −> db.numberOfValuesDemo.insertOne({"Values":[100, 200, 300, 900, 1000, 98]}); { "acknowledged" : true, "insertedId" : ObjectId("5cefb736ef71edecf6a1f6ab") }Display all documents from a collection with the help of find() method −> db.numberOfValuesDemo.find().pretty();Output{ "_id" ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
126 Views
The rel attribute of the element is used to set the relationship between the current document and the linked document. This attribute introduced in HTML5 for the element. Following is the syntax −Above, value can be any of the following options that links to −alternate: An alternate version of ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
379 Views
For this, use $ifNull operatorLet us first create a collection with documents −> dbquerySelectDemoinsertOne({"Value1":10, "Value2":null}); { "acknowledged" : true, "insertedId" : ObjectId("5cefc0ceef71edecf6a1f6b6") } > dbquerySelectDemoinsertOne({"Value1":null, "Value2":30}); { "acknowledged" : true, "insertedId" : ObjectId("5cefc0d7ef71edecf6a1f6b7") } > dbquerySelectDemoinsertOne({"Value1":60, "Value2":40}); { "acknowledged" : true, "insertedId" : ObjectId("5cefc0e2ef71edecf6a1f6b8") ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
209 Views
To check whether a node is a root node or not, use the isRoot() method. This returns a boolean value. TRUE if the node is a root node, else FALSE is returned. For example, TRUE is returned since the following node is a root node −node.isRoot()Another example, FALSE is returned ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
522 Views
At first, create a JDesktoPane −JDesktopPane desktopPane = new JDesktopPane();Now, create an Internal frame and add it to the JDesktopPane −JInternalFrame intFrame = new JInternalFrame("Our Frame", true, true, true, true); desktopPane.add(intFrame); The following is an example to add Internal Frame to a JDesktopPane − package my; import java.awt.BorderLayout; import javax.swing.JButton; ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
334 Views
The name attribute of the element is used to set the name for a button. More than one button can have the same name, but we can submit different values from these buttons using the name attribute.Following is the syntax −Above, btn_name is the name of the button. Let ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
162 Views
Use aggregation for this and add the values to an array using the $group and $addToSet operatorLet us first create a collection with documents −> dbspecifyReturnFormatDemoinsertOne({"Subject":"MongoDB"}); { "acknowledged" : true, "insertedId" : ObjectId("5cefd364ef71edecf6a1f6c0") } > dbspecifyReturnFormatDemoinsertOne({"Subject":"MySQL"}); { "acknowledged" : true, "insertedId" : ObjectId("5cefd369ef71edecf6a1f6c1") } > dbspecifyReturnFormatDemoinsertOne({"Subject":"SQL ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
138 Views
Use the getSiblingCount() method to get the number of siblings of a node in JTree. For example, let’s say we have a node, which isn’t a root node. For that, we will find the sibling count −node1.getSiblingCount()The following is an example to get the number of siblings of a node ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
959 Views
We will use printjson() for this. Let us first create a collection with documents −> dbprintResultScriptDemoinsertOne({"StudentName":"John", "StudentAge":21}); { "acknowledged" : true, "insertedId" : ObjectId("5cf22c02b64a577be5a2bc0b") } > dbprintResultScriptDemoinsertOne({"StudentName":"Carol", "StudentAge":20}); { "acknowledged" : true, "insertedId" : ObjectId("5cf22c09b64a577be5a2bc0c") } > dbprintResultScriptDemoinsertOne({"StudentName":"David", "StudentAge":19}); { "acknowledged" : true, "insertedId" ... Read More