
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Smita Kapse has Published 498 Articles

Smita Kapse
696 Views
To return specific fields, use aggregate $project. Let us first create a collection with documents −> db.returnSpecificFieldDemo.insertOne( { "StudentId":1, "StudentDetails": [ { "StudentName":"Larry", "StudentAge":21, ... Read More

Smita Kapse
210 Views
You can create a table in JavaDB database using the CREATE TABLE statement.SyntaxCREATE TABLE table_name ( column_name1 column_data_type1 constraint (optional), column_name2 column_data_type2 constraint (optional), column_name3 column_data_type3 constraint (optional) );To create a table in JavaDB using JDBC API you need to −Register the driver − The forName() method ... Read More

Smita Kapse
1K+ Views
While designing any iOS Application you might come across a scenario where you have to do some sort of action if the screen is inactive for some amount of time.Here we will be seeing the same, we will be detecting user inactivity for 5 seconds.We will be using Apple’s UITapGestureRecognizer ... Read More

Smita Kapse
912 Views
To set the default background color of JTextPane, use the SimpleAttributeSet and StyleConstants class. At first, create a new JTextPane −JTextPane pane = new JTextPane();Now, use the classes to set the style and color −SimpleAttributeSet attributeSet = new SimpleAttributeSet(); StyleConstants.setBackground(attributeSet, Color.white);Now, apply the set to the pane −pane.setCharacterAttributes(attributeSet, true);The following ... Read More

Smita Kapse
98 Views
To reduce the time to find record in MongoDB, you can use index. Following is the syntax −db.yourCollectionName.createIndex({yourFieldName:1});You can follow the below approaches to create index for field names based on number, text, hash, etc.First ApproachLet us create an index. Following is the query −> db.takeLessTimeToSearchDemo.createIndex({"EmployeeName":1}); { "createdCollectionAutomatically" : ... Read More

Smita Kapse
365 Views
To get possible values for set field, you can use below syntax −desc yourTableName yourSetColumnName;Let us first create a table −mysql> create table DemoTable ( Game set('Chess', 'Pig Dice', '29 Card') ); Query OK, 0 rows affected (0.60 sec)Following is the query to get available values for ... Read More

Smita Kapse
3K+ Views
It is very important to know how to create a circular progress bar for iOS developers, almost every application have this.This is mainly used in showing the downloading status, loading status or any other progress related thing.Creating Circular Progress bar may become very tedious for new programmers and they might ... Read More

Smita Kapse
700 Views
To style code in a TextPane component use the setText() for text and work with HTML tags. For code, use the tag. Also, do not forget to set the content type to “text/html” −JTextPane pane = new JTextPane(); pane.setContentType("text/html");If you won’t set the content type, then the output will ... Read More

Smita Kapse
2K+ Views
To return documents of a collection without objectId, set _id:0. Let us first create a collection with documents −> db.returnDocumentWithoutObjectId.insertOne({"Name":"Carol", "Age":25}); { "acknowledged" : true, "insertedId" : ObjectId("5ce8ba6c78f00858fb12e8fa") } > db.returnDocumentWithoutObjectId.insertOne({"Name":"Sam", "Age":21}); { "acknowledged" : true, "insertedId" : ObjectId("5ce8ba6d78f00858fb12e8fb") } > db.returnDocumentWithoutObjectId.insertOne({"Name":"John", "Age":23}); { "acknowledged" ... Read More

Smita Kapse
342 Views
To fetch domain name by passing name in MySQL, you can use substring_index(). Let us first create a table −mysql> create table DemoTable ( UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY, UserMailId varchar(200) ); Query OK, 0 rows affected (0.77 sec)Insert some records in the table using ... Read More