Ayyan

Ayyan

30 Articles Published

Articles by Ayyan

Page 3 of 3

How to write "Hello World" Program in C++?

Ayyan
Ayyan
Updated on 26-Feb-2020 1K+ Views

To run the hello world program, you'll have to follow the following steps −Write a C++ programNow that you have a compiler installed, its time to write a C++ program. Let's start with the epitome of programming example's, it, the Hello world program. We'll print hello world to the screen using C++ in this example. Create a new file called hello.cpp and write the following code to it −#include int main() {    std::cout

Read More

What is the Java Runtime Environment (JRE)?

Ayyan
Ayyan
Updated on 25-Feb-2020 695 Views

JRE is Java Runtime Environment and is the machine-specific implementation of JVM. It contains libraries like rt.jar, class loaders etc which are used by JVM.

Read More

How Can MySQL virtual GENERATED COLUMNS work with built-in functions?

Ayyan
Ayyan
Updated on 21-Feb-2020 352 Views

It can be illustrated with the help of an example in which we are creating a virtual generated column in the table named ‘employee_data’. As we know that virtual generated column can be generated with or without using the keyword ‘virtual’.Examplemysql> Create table employee_data(ID INT AUTO_INCREMENT PRIMARY KEY, First_name VARCHAR(50) NOT NULL, Last_name VARCHAR(50) NOT NULL, FULL_NAME VARCHAR(90) GENERATED ALWAYS AS(CONCAT(First_name, '', Last_name))); Query OK, 0 rows affected (0.55 sec) mysql> DESCRIBE employee_data; +------------+-------------+------+-----+---------+-------------------+ | Field | Type ...

Read More

C++ Program Structure

Ayyan
Ayyan
Updated on 11-Feb-2020 2K+ Views

The best way to learn a programming language is by writing programs. Typically, the first program beginners write is a program called "Hello World", which simply prints "Hello World" to your computer screen. Although it is very simple, it contains all the fundamental components C++ programs have. Let's look at the code for this program −#include int main() {    std::cout

Read More

How can we use MySQL REVERSE() function on column's data along with WHERE clause?

Ayyan
Ayyan
Updated on 07-Feb-2020 374 Views

MySQL REVERSE() function can have the column name as an argument to invert its value. If we want to apply some condition/s then it can be used along with WHERE clause as follows:Examplemysql> Select Name, REVERSE(Name) from Student; +---------+---------------+ | Name    | REVERSE(Name) | +---------+---------------+ | Aarav   | varaA         | | Gaurav  | varuaG        | | Gaurav  | varuaG        | | Harshit | tihsraH       | | Yashraj | jarhsaY       | +---------+---------------+ 5 rows in set (0.00 sec)The above query inverts the values ...

Read More

What MySQL TRIM() function returns if 1st argument(i.e. BOTH, LEADING, TRAILING) is not specified?

Ayyan
Ayyan
Updated on 07-Feb-2020 121 Views

By default MySQL will assume the argument BOTH if the 1st argument is not specified in TRIM() function. Following example will demonstrate it.Examplemysql> SELECT TRIM('A' FROM 'ABCDAEFGAA'); +-----------------------------+ | TRIM('A' FROM 'ABCDAEFGAA') | +-----------------------------+ | BCDAEFG                     | +-----------------------------+ 1 row in set (0.00 sec)The above result set shows that when we did not specify 1st argument then MySQL returns the output by assuming BOTH as the 1st argument of TRIM() function.

Read More

Which MySQL function returns a specified number of characters of a string as output?

Ayyan
Ayyan
Updated on 06-Feb-2020 532 Views

MySQL returns a specified number of characters of a string with the help of LEFT() and RIGHT() functions.MySQL LEFT() function will return the specified number of characters from the left of the string.SyntaxLEFT(str, length)Here str is the string from which a number of characters would be returned and the length is an integer value which specifies how many characters to be returned.Examplemysql> Select LEFT('My Name is Ram', 7); +---------------------------+ | LEFT('My Name is Ram', 7) | +---------------------------+ | My Name                   | +---------------------------+ 1 row in set (0.00 sec)MySQL RIGHT() function will ...

Read More

What MySQL ASCII() function returns if I will provide NULL to it?

Ayyan
Ayyan
Updated on 30-Jan-2020 178 Views

In this case, the output of ASCII() function depends on the condition that whether we are providing NULL as a string or we are providing simply NULL to it. Following example will demonstrate the difference −mysql> SELECT ASCII(null); +-------------+ | ASCII(null) | +-------------+ | NULL        | +-------------+ 1 row in set (0.00 sec) mysql> SELECT ASCII('null'); +---------------+ | ASCII('null') | +---------------+ | 110           | +---------------+ 1 row in set (0.00 sec) mysql> Select ASCII(NULL); +-------------+ | ASCII(NULL) | +-------------+ | NULL        | +-------------+ 1 row in set ...

Read More

What is Java Method Area?

Ayyan
Ayyan
Updated on 30-Jul-2019 2K+ Views

JVM has a method area common across all the threads. It contains per-class elements like constant pool, fields, method local data, method code, constructor codes etc. which are used in class and initialization of objects/interfaces.This method area gets created during JVM start-up. It is generally part of Heap area. It could be of fixed size or vary. Its memory may not be contiguous. JVM implementation can give control to programmer over Method area creation, its sizing etc. If method area memory is not sufficient to satisfy an allocation request then JVM throws OutOfMemoryError.

Read More

How to set JAVA_HOME for Java in Linux?

Ayyan
Ayyan
Updated on 30-Jul-2019 311 Views

Assuming you have installed Java in \usr\local\java\jdk directory −if you use bash as your shell, then you would add the following line to the end of your '.bashrc: export JAVA_HOME=\usr\local\java\jdk'

Read More
Showing 21–30 of 30 articles
« Prev 1 2 3 Next »
Advertisements