- 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
Chandu yadav has Published 1163 Articles
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
127 Views
For this, use the $exists operator. Let us first create a collection with documents −>dbfindDocumentContainsSpecificFieldDemoinsertOne({"ProductPrices":{"Product1":10, "Pr oduct2":50}}); { "acknowledged" : true, "insertedId" : ObjectId("5cf2385bb64a577be5a2bc14") } >dbfindDocumentContainsSpecificFieldDemoinsertOne({"ProductPrices":{"Product3":150, "P roduct7":100, "Product5":250}}); { "acknowledged" : true, "insertedId" : ObjectId("5cf2387eb64a577be5a2bc15") }Following is the query to display all documents from a ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
245 Views
Let’s say we want the first child node of a node, then use the getFirstChild() method −node2.getFirstChild()Display the node’s first child on Console −System.out.println("The first child of node 2 = "+node2.getFirstChild());The following is an example to get this node’s first child in a JTree −package my; import javax.swing.JFrame; import javax.swing.JTree; ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
110 Views
At first, we will create a slider and set it to snap to tick marks:JSlider slider = new JSlider(JSlider.HORIZONTAL, 0, 100, 40); slider.setMinorTickSpacing(10); slider.setMajorTickSpacing(20); slider.setPaintTicks(true); slider.setPaintLabels(true); slider.setSnapToTicks(true);After that, we will check whether the slider is currently snapping to tick marks. The result would be displayed in the TRUE/FALSE booleanslider.getSnapToTicks()Display the ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
64 Views
The type attribute of the element sets the MIME (Multipurpose Internet Mail Extensions) type of the target url. Following is the syntax −Above, type_of_media is the standard media type of the linked document, for example, image/bmp, image/tiff, image/tff, etc.Let us now see an example to implement the type attribute ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
2K+ Views
This example demonstrate about How to change the background color of ListView items on Android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
1K+ Views
This example demonstrate about How to add new contacts in Android App.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
3K+ Views
This example demonstrate about How to create circular ProgressBar in Android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/drawable/circular_progress_bar.xml. ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
2K+ Views
This example demonstrate about How to set default font family for entire Android App.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
1K+ Views
You can use IF() for this. Let us first create a table. One of the columns here is having ENUM typemysql> create table DemoTable ( UserId int, UserName varchar(40), UserGender ENUM('M', 'F') ); Query OK, 0 rows affected (1.11 sec)Insert records in the table using ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
2K+ Views
This example demonstrate about How to define a MIN and MAX value for EditText in Android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.java ... Read More