- 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
Anvi Jain has Published 629 Articles
![Anvi Jain](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
956 Views
For background and foreground color of the JTextPane, use the following −JTextPane textPane = new JTextPane(); textPane.setBackground(Color.blue); textPane.setBackground(Color.green);For font face, style and size, use the Font class and set the font −Font font = new Font("Serif", Font.ITALIC, 18); textPane.setFont(font);The following is an example to set font, style and color for ... Read More
![Anvi Jain](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
229 Views
Apple has predefined class Timer, that fires after a certain time interval has elapsed, sending a specified message to a target object.To read more about the Timer class you can check official apple documentation herehttps://developer.apple.com/documentation/foundation/timerTo execute the task repeatedly after fixed interval of time we are going to use timer ... Read More
![Anvi Jain](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
1K+ Views
This example demonstrate about How to implement an Android notification action without opening the 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
![Anvi Jain](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
314 Views
Use $slice operator for this. Let us first create a collection with documents −> db.gettingFirstItemInArrayDemo.insertOne( { "UserId": 101, "UserName":"Carol", "UserOtherDetails": [ {"UserFriendName":"Sam"}, {"UserFriendName":"Mike"}, {"UserFriendName":"David"}, ... Read More
![Anvi Jain](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
328 Views
A DATALINK object represents an URL value which refers to an external resource (outside the current database/data source), which can be a file, directory etc..MySQL does not provide any separate datatype to store DATALINK/URL value you need to store using TEXT or VARCHAR datatypes as shown in the following query ... Read More
![Anvi Jain](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
108 Views
Both pow() and power() are synonyms. Let us see the syntax −select pow(yourValue1, yourValue2); OR select power(yourValue1, yourValue2);Now we will see some examples.Using pow()mysql> select POW(4, 3);This will produce the following output −+----------+ | POW(4, 3) | +----------+ | 64 | +----------+ ... Read More
![Anvi Jain](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
752 Views
SQL databases provide a datatype named Blob (Binary Large Object) in this, you can store large binary data like images.To retrieve binary (stream) values from a table JDBC provides a method called getBinaryStream() in the PreparedStatement interface.It accepts an integer representing the index of the column of the table and ... Read More
![Anvi Jain](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
343 Views
At first, let’s say, we have selected a row using addRowSelectionInterval() as shown in the demo screenshot −Now, we will deselect all these cells using clearSelection() as shown in the following example. This method clears the selected cells from the table −Examplepackage my; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTable; import ... Read More
![Anvi Jain](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
294 Views
Use $or operator along with $expr operator for this. Let us first create a collection with documents, wherein one of fields is isMarried having true of false value −> db.orTwoFieldsDemo.insertOne({"isLiveInUS":true, "isMarried":false}); { "acknowledged" : true, "insertedId" : ObjectId("5cdfd86abf3115999ed5120d") } > db.orTwoFieldsDemo.insertOne({"isLiveInUS":true, "isMarried":true}); { "acknowledged" : true, ... Read More
![Anvi Jain](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
Anvi Jain
2K+ Views
The short is equivalent to MySQL’s small int. The Java short takes 2 bytes that has the range -32768 to 32767 while MySQL smallint also take 2 bytes with same range.Here is the demo code of short in Java −public class SmallIntAsShortDemo { public static void main(String[] args) { ... Read More