Chandu yadav has Published 1163 Articles

How do inline variables work in C++/C++17?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:26

3K+ Views

In C++, we can use the inline keyword for functions. In C++ 17 version, the inline variable concept has come.The inline variable is allowed to be defined in multiple translation units. It also follows the one definition rule. If this is defined more than one time, the compiler merges them ... Read More

How to get number of rows in a table without using count(*) MySQL query?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:26

592 Views

You can use count(1). Let us first see the syntax −select count(1) from yourTableName;Let us first create a table −mysql> create table DemoTable    (    StudentName varchar(100)    ); Query OK, 0 rows affected (0.84 sec)Insert some records in the table using insert command −mysql> insert into DemoTable(StudentName) values('John ... Read More

IPC through shared memory

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:26

3K+ Views

Shared memory is a memory shared between two or more processes. However, why do we need to share memory or some other means of communication?To reiterate, each process has its own address space, if any process wants to communicate with some information from its own address space to other processes, ... Read More

HTML placeholder Attribute

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:26

339 Views

The placeholder attribute of the element is used to set a hint for the input that would give a short description about what is expected in that particular input. This attribute works for the following input types − text, url, search, email, password and tel. It introduced in HTML5.Following ... Read More

How to add JRadioButtonMenuItem in Java

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:26

136 Views

Let’s say we have a menu and within that we need to set the JRadioButtonMenuItem. Here’s the Menu −JMenu editMenu = new JMenu("Edit"); editMenu.setMnemonic(KeyEvent.VK_E); menuBar.add(editMenu);Now, set the editMenu and add it to the MenuBar −JMenu editMenu = new JMenu("Edit"); editMenu.setMnemonic(KeyEvent.VK_E); menuBar.add(editMenu);Now, create Options Menu and add it to the editMenu ... Read More

How to sort by value with MySQL ORDER BY?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:26

149 Views

For this, use the ORDER BY clause. Let us first create a table −mysql> create table DemoTable    (    StudentId int    ); Query OK, 0 rows affected (0.59 sec)Now you can insert some records in the table using insert command −mysql> insert into DemoTable values(100); Query OK, 1 ... Read More

What is Proxy Class in C++?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:26

2K+ Views

Here we will see what is the proxy class in C++. The Proxy class is basically the Proxy design pattern. In this pattern an object provides a modified interface for another class. Let us see one example.In this example, we want to make an array class, that can store only ... Read More

HTML alt Attribute

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:26

201 Views

The alt attribute of element is used to set an alternate text for an area. This alternate text i.e. alt is visible when the image isn’t displayed for reasons like internet, loading issues, errors, etc.Following is the syntax −Here, text is the alt text to be set.Let us now ... Read More

Floating Point Operations and Associativity in C, C++ and Java

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:26

190 Views

In C, C++, and java, we do some mathematical operations with floating point numbers. Now here we will check whether the floating point numbers are following the associativity rule or not.The answer is NO. The floating point numbers does not follow the associativity rules in some cases. Here we will ... Read More

Can we remove the Title Bar of a Frame in Java?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:26

1K+ Views

Yes, we can remove the title bar of a frame using the setUndecorated() method. Set it to TRUE if you don’t want to remove the Title Bar.The following is an example to remove the title bar of a frame in Java −Examplepackage my; import java.awt.GridLayout; import javax.swing.JFrame; import javax.swing.JLabel; import ... Read More

Advertisements