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
Anvi Jain has Published 568 Articles
Anvi Jain
477 Views
Let’s say the following is our JTextArea with default text −JTextArea textArea = new JTextArea("The text added here is just for demo. " + "This demonstrates the usage of JTextArea in Java. In this example we have" + "deleted some text.");Now to remove the first 10 characters, use ... Read More
Anvi Jain
604 Views
Let us first create a collection with documents −> db.deleteMultipleDocumentsDemo.insertOne({"StudentFirstName":"Larry"}); { "acknowledged" : true, "insertedId" : ObjectId("5ce00b07bf3115999ed51214") } > db.deleteMultipleDocumentsDemo.insertOne({"StudentFirstName":"Chris"}); { "acknowledged" : true, "insertedId" : ObjectId("5ce00b0bbf3115999ed51215") } > db.deleteMultipleDocumentsDemo.insertOne({"StudentFirstName":"David"}); { "acknowledged" : true, "insertedId" : ObjectId("5ce00b0fbf3115999ed51216") } > db.deleteMultipleDocumentsDemo.insertOne({"StudentFirstName":"Bob"}); { "acknowledged" : ... Read More
Anvi Jain
6K+ Views
Clob datatypeCLOB stands for Character Large Object. in general, an SQL Clob is a built-in datatype which is used to store large amount of textual data. Using this datatype, you can store data up to 2, 147, 483, 647 characters. MYSQL database provides support Clob datatype TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT.The ... Read More
Anvi Jain
227 Views
For this, use the aggregate framework. Let us first create a collection with documents −> db.aggregateArrayDemo.insertOne( { "_id":100, "UserDetails": [ { "UserName": "John", "UserLoginYear":2010 ... Read More
Anvi Jain
1K+ Views
The java.sql.DriverManager class manages JDBC drivers in your application. This class maintains a list of required drivers and load them whenever it is initialized.Therefore, you need to register the driver class before using it. However, you need to do it only once per application.One way to register a driver class ... Read More
Anvi Jain
303 Views
To replace the first 10 character in text area, use the replaceRange() method in Java and replace the old text with the new text.Let’s say the following is oude demo text set with JTextArea −JTextArea textArea = new JTextArea("This is a text displayed for our example. We have replaced some ... Read More
Anvi Jain
766 Views
You can use CASE statement for this. Let us first create a table −mysql> create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, Value1 int, Value2 int ); Query OK, 0 rows affected (0.76 sec)Insert some records in the table using insert command ... Read More
Anvi Jain
1K+ Views
Apple provides backgroundColor which is an instance property, Changes to this property can be animated. The default value is nil, which results in a transparent background color.To make background 25% transparent we should set the view to the UIColor with alpha 0.25view.backgroundColor = UIColor(white: 1, alpha: 0.25)You can write the following ... Read More
Anvi Jain
521 Views
Use aggregate framework along with $literal operator. Let us first create a collection with documents −> db.replaceValueDemo.insertOne( { _id : 100, "EmployeeName" :"Chris", "EmployeeOtherDetails": { "EmployeeDesignation" : "HR", "EmployeeAge":27 ... Read More
Anvi Jain
1K+ Views
Indexes in a table are pointers to the data, these speed up the data retrieval from a table. If we use indexes, the INSERT and UPDATE statements get executed in a slower phase. Whereas SELECT and WHERE get executed with in lesser time.Creating an indexCTREATE INDEX index_name on table_name (column_name);Displaying ... Read More