
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
Karthikeya Boyini has Published 2193 Articles

karthikeya Boyini
2K+ Views
Use the setMinimumSize() method to set the minimum size limit for a JFrame −JFrame frame = new JFrame(); frame.setMinimumSize(new Dimension(500, 300));The following is an example to set minimum size limit for a JFrame −Exampleimport java.awt.Color; import java.awt.Dimension; import javax.swing.JButton; import javax.swing.JFrame; public class SwingDemo { public static void main(String[] ... Read More

karthikeya Boyini
580 Views
MODELESS TypeThe following is an example to set JDialog with Modality type MODELESS −Exampleimport java.awt.Cursor; import java.awt.Dialog.ModalityType; import java.awt.Dimension; import java.awt.event.ActionEvent; import javax.swing.AbstractAction; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JFrame; public class SwingDemo { public static void main(String[] args) { JFrame frame = new JFrame(); ... Read More

karthikeya Boyini
2K+ Views
Here we will see how to generate random numbers, which are following in a normal distribution. For the normal random, the formula is like below.𝑧 = √−2 ln 𝑥1 cos (2𝜋𝑥2)Here x1 and x2 are chosen randomly.Example#include #include #include #include using namespace std; double rand_gen() { ... Read More

karthikeya Boyini
5K+ Views
Here we will see how to get time (the elapsed time for the program or any other kind of time).Here we are using linux library for C++. There is a structure called timeval. This timeval stores the time in seconds, milliseconds. We can create two time for start and end, ... Read More

karthikeya Boyini
1K+ Views
For this, you can create a stored procedure. Let us first create a table.mysql> create table DemoTable -> ( -> Value int -> ); Query OK, 0 rows affected (0.55 sec)Following is the query to create a stored procedure to auto insert values to a table from ... Read More

karthikeya Boyini
8K+ Views
Here we will see how to print some lines into the linux terminal with some color. Here we are doing anything special into C++ code. We are just using some linux terminal commands to do this. The command for this kind of output is like below.\033[1;31m Sample Text \033[0mThere are ... Read More

karthikeya Boyini
142 Views
Let’s say we are creating a database “web” −mysql> SHOW CREATE DATABASE web;This will produce the following output displaying the default charset as well −+----------+-----------------------------------------------------------------------------------------+ | Database | Create Database ... Read More

karthikeya Boyini
86 Views
You can use DISTINCT along with COUNT(). Let us first create a table −mysql> create table DemoTable -> ( -> Id int, -> Score int -> ); Query OK, 0 rows affected (0.95 sec)Insert some records in the table using insert command −mysql> insert into DemoTable ... Read More

karthikeya Boyini
12K+ Views
We can clear the console using C++ code. To do this we have to execute some system commands. In Linux systems, the POSIX is used. We can call system() function to execute system command. For clearing the console in linux, we can use “clear” command. This will be passed inside ... Read More

karthikeya Boyini
2K+ Views
To create high resolution timer we can use the chrono library. This library has high resolution clock. This can count in nanoseconds.In this program we will see the execution time in nanoseconds. We will take the time value at first, then another time value at the last, then find the ... Read More