
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
Samual Sam has Published 2310 Articles

Samual Sam
6K+ Views
In C we can pass parameters in two different ways. These are call by value, and call by address, In C++, we can get another technique. This is called Call by reference. Let us see the effect of these, and how they work.First we will see call by value. In ... Read More

Samual Sam
519 Views
To disable a JLabel, use the setEnabled() method −JLabel label; label.setEnabled(false);The following is an example to disable a JLabel −package my; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import javax.swing.*; import javax.swing.border.Border; public class SwingDemo { public static void main(String args[]) { JFrame frame = new JFrame("Demo"); ... Read More

Samual Sam
549 Views
Here we will see how to print the memory representation of C variables. Here we will show integers, floats, and pointers.To solve this problem, we have to follow these steps −Get the address and the size of the variableTypecast the address to the character pointer to get byte addressNow loop ... Read More

Samual Sam
23K+ Views
At first, create a JFrame −JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setPreferredSize(new Dimension(550, 300));Now, change the background color of the JFrame −frame.getContentPane().setBackground(Color.BLUE);The following is an example to change JFrame background color −Exampleimport java.awt.Color; import java.awt.Dimension; import javax.swing.JFrame; public class SwingDemo { public static void main(String[] args) { ... Read More

Samual Sam
13K+ Views
Set frame.dispose() on the click of a button to close JFrame. At first create a button and frame −JFrame frame = new JFrame(); JButton button = new JButton("Click to Close!");Now, close the JFrame on the click of the above button with Action Listener −button.addActionListener(e -> { frame.dispose(); });The following ... Read More

Samual Sam
527 Views
In this problem, one floating point value is given. We have to find number of set bits in the binary representation of it.For example, if a floating point number is 0.15625, so there are six set bits. A typical C compiler used single precision floating point representation. So it will ... Read More

Samual Sam
8K+ Views
Here we will see, one program can be written without main or not? The answer is yes. We can write program, that has no main() function.In many places, we have seen that the main() is the entry point of a program execution. Just from the programmers perspective this is true. ... Read More

Samual Sam
2K+ Views
In C there is no predefined datatype as bool. We can create bool using enum. One enum will be created as bool, then put the false, and true as the element of the enum. The false will be at the first position, so it will hold 0, and true will ... Read More

Samual Sam
131 Views
This is a C++ program to implement the Alexander Bogomolny’s UnOrdered Permutation Algorithm for elements from 1 to NAlgorithmsBegin function AlexanderBogomolny() to implement the Algorithms Arguments: Val[] = an array N = number of elements taken as input. K ... Read More

Samual Sam
544 Views
You can use CURRENT_TIMESTAMP to set system date time. Let us first create a table −mysql> create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, ClientFirstName varchar(20), ClientLastName varchar(20), ClientAge int ); Query OK, 0 rows affected (0.66 sec)Following is the query to set default ... Read More