- 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
Nishtha Thakur has Published 564 Articles
Nishtha Thakur
4K+ Views
The function overriding is the most common feature of C++. Basically function overriding means redefine a function which is present in the base class, also be defined in the derived class. So the function signatures are the same but the behavior will be different.But there may be a situation when ... Read More
Nishtha Thakur
4K+ Views
The IN clause in MYSQL database is used to specify the list of parameters in a query.For example, you need to retrieve contents of a table using specific IDs you can do so using the SELECT statement along with the IN clause as −mysql> SELECT * from sales where ID ... Read More
Nishtha Thakur
590 Views
Here we will see what will be the case if the destructors are private in C++. Let us see some example codes to get the idea.This code has private destructor, but it will not generate any error because no object is created.Example#include using namespace std; class my_class { ... Read More
Nishtha Thakur
804 Views
To change the background color of rows, you need to use the setBackground() method −JTable table = new JTable(marks, col); table.setBackground(Color.blue);Above, we have set the color using Color class −Color.blueThe following is an example to change the background color of rows −Examplepackage my; import java.awt.Color; import java.awt.Font; import javax.swing.JFrame; import ... Read More
Nishtha Thakur
115 Views
To check if a field in MongoDB is [] or {}, you can use the following syntax −db.yourCollectionName.find({ "yourOuterFieldName": { "$gt": {} }, "yourOuterFieldName.0": { "$exists": false } });Let us first create a collection with documents -> db.checkFieldDemo.insert([ ... { _id: 1010, StudentDetails: {} }, ... ... Read More
Nishtha Thakur
3K+ Views
To execute a statement with Where clause using PreparedStatement. Prepare the query by replacing the value in the clause with place holder “?” and, pass this query as a parameter to the prepareStatement() method.String query = "SELECT * FROM mobile_sales WHERE unit_sale >= ?"; //Creating the PreparedStatement object PreparedStatement pstmt ... Read More
Nishtha Thakur
192 Views
Here we will see how we can extend some namespace, and how the unnamed or anonymous name space can be used.Sometimes we can define one namespace. Then we can write the namespace again with the same definition. If the first one has some member, and second one has some other ... Read More
Nishtha Thakur
1K+ Views
This example demonstrate about How can I marquee the text content in Android Notification.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
Nishtha Thakur
92 Views
Use $pull operator along with positional operator($) in MongoDB. Let us first create a collection with documents −> db.pullWithPositionalOperatorDemo.insertOne( ... { ... _id: 100, ... "StudentDetails": [ ... { ... "StudentId": "STU-1", ... ... Read More
Nishtha Thakur
964 Views
To insert records into a table that contains a decimal value using PreparedStatement you need to −Register the driver − Register the driver class using the registerDriver() method of the DriverManager class. Pass the driver class name to it, as parameter.Establish a connection − Connect ot the database using the ... Read More