- 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
Arjun Thakur has Published 1109 Articles
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
109 Views
For this, use MongoDB $substr. Let us first create a collection with documents −> dblimitTheNumberOfCharactersDemoinsertOne({"Title":"MongoDB is No SQL database"}); { "acknowledged" : true, "insertedId" : ObjectId("5cf23013b64a577be5a2bc0e") } > dblimitTheNumberOfCharactersDemoinsertOne({"Title":"MySQL is a relational database"}); { "acknowledged" : true, "insertedId" : ObjectId("5cf2302db64a577be5a2bc0f") } Following is the query ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
625 Views
To check if two nodes are equal, use the equals() method. Here, we are checking that node1 and node2 are equal or not.node1.equals(node2)The following is an example to check if two nodes are equal in a JTree −package my; import javax.swing.JFrame; import javax.swing.JTree; import javax.swing.tree.DefaultMutableTreeNode; public class SwingDemo { ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
258 Views
Set the following to FALSE to enable the display of hidden files −JFileChooser file = new JFileChooser(); file.setFileHidingEnabled(false);The following is an example to enable the display of hidden files in a JFileChooser −Examplepackage my; import javax.swing.JFileChooser; public class SwingDemo { public static void main(String[] args) { ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
106 Views
The currentTarget event property in HTML is used to get the element whose event listeners triggered the event.Following is the syntax −event.currentTargetLet us now see an example to implement the currentTarget event property −Example Live Demo Get the element Click on this line to generate an alert box displaying ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
3K+ Views
This example demonstrate about How to turn Android device screen on and off programmatically.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
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
3K+ Views
This example demonstrate about How to lock the Android device programmatically.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
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
5K+ Views
This example demonstrate about How to align views at the bottom of the screen 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
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
574 Views
This example demonstrate about How to make an Android device vibrate programmatically.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 Step 3 ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
672 Views
You can use CONCAT() function for this. Let us first create a table −mysql> create table DemoTable ( UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY, UserName varchar(100) ); Query OK, 0 rows affected (0.43 sec)Insert records in the table using insert command −mysql> insert into DemoTable(UserName) ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
Arjun Thakur
137 Views
This example demonstrate about How to use AutoCompleteTextView 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.java Step 3 − ... Read More