- 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
Anvi Jain has Published 629 Articles
Anvi Jain
4K+ Views
To redirect from an HTML page, use the META Tag. With this, use the http-equiv attribute to provide an HTTP header for the value of the content attribute. The value of the content is the number of seconds; you want the page to redirect after.Through this, you can automatically redirect ... Read More
Anvi Jain
186 Views
The basic principle for performance is that there should be minimal data transferred between application server and database.For your first question, I would suggest to select only the fields that are required. So, don’t use SELECT * in case you don’t require all the fields. But in specific scenarios, if ... Read More
Anvi Jain
576 Views
JavaScript CookiesUsing JavaScript cookies is the most efficient method of remembering and tracking preferences, purchases, commissions, and other information required for better visitor experience or site statistics.PHP CookiesCookies are text files stored on the client computer and they are kept for tracking purpose. PHP transparently supports HTTP cookies.How JavaScript cookies ... Read More
Anvi Jain
532 Views
For conditional MySQL query, you can use IF ELSE concept in stored procedure. Let us first create a table −mysql> create table DemoTable1 ( Id int ); Query OK, 0 rows affected (0.62 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1 values(10); ... Read More
Anvi Jain
1K+ Views
To make MySQL table primary key auto increment, use the below syntaxCREATE TABLE yourTableName ( yourColumnName INT(6) ZEROFILL NOT NULL AUTO_INCREMENT, PRIMARY KEY(yourColumnName) );Let us first create a table and set primary key auto increment −mysql> CREATE TABLE DemoTable ( UserId INT(6) ZEROFILL NOT ... Read More
Anvi Jain
2K+ Views
To align components vertically, use the BoxLayout −JFrame frame = new JFrame(); frame.getContentPane().setLayout(new BoxLayout(frame.getContentPane(), BoxLayout.Y_AXIS));Now, create a Panel and add some buttons to it. After that set left alignment of components which are already arranged vertically using Component.LEFT_ALIGNMENT constant −JPanel panel = new JPanel(); JButton btn1 = new JButton("One"); JButton ... Read More
Anvi Jain
218 Views
This is a C++ program to generate Random Partition out of a given set of numbers or characters.AlgorithmBegin Take the integers or characters as input. For choice 1: Take the input of the n integer array. Assign l = 0 to traverse ... Read More
Anvi Jain
802 Views
Sometimes we have noticed that the console is being closed immediately after displaying the result. So we cannot see the result properly. Here we will see how we can stop the console from closing.The idea is very simple. We can use the getchar() function at the end. This will wait ... Read More
Anvi Jain
742 Views
To center a Window in Java, use the getCenterPoint() method. Set the width and height and use the below formulae to set bounds −Point center = GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint(); int width = 500; int height = 200; frame.setBounds(center.x - width / 2, center.y - height / 2, width, height);The following is an ... Read More