- 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
36 Views
We can set or disallow selection of cell in the table using setCellSelectionEnabled(). The following is an example. −If you want to allow selection of cell, then set the method to TRUE −table.setCellSelectionEnabled(true);If you want to disallow selection of cell, then set the method to FALSE −table.setCellSelectionEnabled(false);Here we have disallowed ... Read More
Nishtha Thakur
250 Views
To get the minimum value, use sort() along with limit(1). Let us first create a collection with documents −> db.findMinimumValueDemo.insertOne({"Value":1004}); { "acknowledged" : true, "insertedId" : ObjectId("5cdfd61abf3115999ed51208") } > db.findMinimumValueDemo.insertOne({"Value":983}); { "acknowledged" : true, "insertedId" : ObjectId("5cdfd61ebf3115999ed51209") } > db.findMinimumValueDemo.insertOne({"Value":990}); { "acknowledged" : true, ... Read More
Nishtha Thakur
128 Views
You can use trim() for this.Let us first create a table −mysql> create table DemoTable ( UserId varchar(100) ); Query OK, 0 rows affected (0.63 sec)Insert some records in the table using insert command. Here, we have added a question mark (?) to the end of some ... Read More
Nishtha Thakur
249 Views
Following is the syntax to use $regex in MongoDB −db.yourCollectionName.find({yourFieldName: { $regex: yourValue}});Let us first create a collection with documents −> db.regularExpressionDemo.insertOne({"UserName":"John"}); { "acknowledged" : true, "insertedId" : ObjectId("5cdffc25bf3115999ed51210") } > db.regularExpressionDemo.insertOne({"UserName":"JOHN"}); { "acknowledged" : true, "insertedId" : ObjectId("5cdffc2ebf3115999ed51211") } > db.regularExpressionDemo.insertOne({"UserName":"john"}); { "acknowledged" : ... Read More
Nishtha Thakur
681 Views
You can get the properties of a driver using the getPropertyInfo() method of the Driver interface.DriverPropertyInfo[] info = driver.getPropertyInfo(mysqlUrl, null);This method accepts a two parameters: A String variable representing the URL of the database, an object of the class Properties and, returns an array of the DriverPropertyInfo objects, where each ... Read More
Nishtha Thakur
868 Views
Storing data is one of the most important thing when we design any application. There are numerous way to store data one such way is SQLite databse.There are multiple ways to access SQLite database on iPhone, We will be seeing the most easiest way to do so in Swift.SQLite is ... Read More
Nishtha Thakur
2K+ Views
Let us first create a Stored Procedure. Following is the query to create a stored procedure using MySQL Workbench.use business; DELIMITER // DROP PROCEDURE IF EXISTS SP_GETMESSAGE; CREATE PROCEDURE SP_GETMESSAGE() BEGIN DECLARE MESSAGE VARCHAR(100); SET MESSAGE="HELLO"; SELECT CONCAT(MESSAGE, ' ', 'MYSQL!!!!'); END // DELIMITER ;Here is the screenshot of stored ... Read More
Nishtha Thakur
102 Views
To get the matching document, use $elemMatch. Let us first create a collection with documents −> db.getMatchingDocumentDemo.insertOne( { _id :1, "UserDetails":[ { "UserName":"John", "UserAge":23 ... Read More
Nishtha Thakur
460 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.You can register a new Driver class ... Read More
Nishtha Thakur
297 Views
Yes, we can do that using built-in methods of JTextArea components. Let’say the following is our JTextArea −JTextArea textArea = new JTextArea("This is a text displayed for our example. We have selected some of the text.");Now, use the methods setSelectionStart() and setSelectionEnd() to select some text in a range −textArea.setSelectionStart(5); ... Read More