
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
Chandu yadav has Published 1091 Articles

Chandu yadav
439 Views
Yes, we can prevent the collapse of nodes and child nodes in a JTree using setExpandedState() method. This method sets the expanded state of this JTree.If state istrue, all parents of path and path are marked asexpanded.The following is an example that prevents the collapse of nodes and child nodes ... Read More

Chandu yadav
647 Views
To move the first row to the end of the table in Java, use the moveRow() method. It has three parameters. The first two parameters allows you to set the starting and ending row index to be moved. The last parameter sets the destination of the rows to be moved.As ... Read More

Chandu yadav
3K+ Views
Lets suppose we have a ‘string’ and the ‘word’ and we need to find the count of occurence of this word in our string using python. This is what we are going to do in this section, count the number of word in a given string and print it.Count the ... Read More

Chandu yadav
127 Views
To get the last days of all the months, use the LAST_DAY() function from MySQL −SELECT LAST_DAY(yourColumnName) from yourTableName;Let us first create a table −mysql> create table DemoTable ( ShippingDate date ); Query OK, 0 rows affected (0.69 sec)Insert some records in the table using insert command ... Read More

Chandu yadav
652 Views
Yes, we can do that with Java Swings as shown below. Here, we have a panel set with GridLayout and another panel with BorderLayout −JPanel panelGrid = new JPanel(new GridLayout(10, 5, 10, 10)); panelGrid.add(new JCheckBox("Demo CheckBox1")); panelGrid.add(new JCheckBox("Demo CheckBox2")); panelGrid.add(btnAPanel); panelGrid.add(btnBPanel); panelGrid.add(btnCPanel); panelGrid.add(btnDPanel); JPanel panelBrdLayout = new JPanel(new BorderLayout()); panelBrdLayout.add(panelGrid, ... Read More

Chandu yadav
119 Views
Let’s say the following is our JTextArea −JTextArea textArea = new JTextArea("This is demo text.");Now, get the font using the Font class getFont() method as shown below −Font font = textArea.getFont(); System.out.println("Font = "+font);The following is an example to get JTextArea font information in Java −Examplepackage my; import java.awt.Font; import ... Read More

Chandu yadav
1K+ Views
In this section, we are going to learn how to find permutation and combination of a given sequence using python programming language.One of the key advantage of python over other programming language is that it comes with huge set of libraries with it.We are going to use python inbuilt package ... Read More

Chandu yadav
9K+ Views
Let us create DefaultTableModel −DefaultTableModel tableModel = new DefaultTableModel();Now, set the model to JTable −JTable table = new JTable(tableModel);Add a column −tableModel.addColumn("Languages");Now, we will add rows to our table −tableModel.insertRow(0, new Object[] { "CSS" }); tableModel.insertRow(0, new Object[] { "HTML5" });The following is an example to create DefaultTableModel −Examplepackage my; ... Read More

Chandu yadav
286 Views
To set the border color for SoftBevelBorder in Java, use the Color class and set the color while creating the border −SoftBevelBorder border = new SoftBevelBorder( BevelBorder.RAISED, Color.ORANGE, Color.ORANGE.darker(), Color.BLUE, Color.magenta.brighter());We have set the following colors above as parameters −highlightOuterColor: color to use for the bevel outer highlight highlightInnerColor ... Read More

Chandu yadav
114 Views
Let us first create a collection with documents -> db.operatorDemo.insertOne({"StudentSubject":["MongoDB", "MySQL", "Java"]}); { "acknowledged" : true, "insertedId" : ObjectId("5cef94eaef71edecf6a1f6a2") } > db.operatorDemo.insertOne({"StudentSubject":["Java", "C", "C++"]}); { "acknowledged" : true, "insertedId" : ObjectId("5cef94faef71edecf6a1f6a3") }Display all documents from a collection with the help of find() method -> db.operatorDemo.find().pretty();Output{ ... Read More