Ankith Reddy has Published 996 Articles

Heap Sort in C#

Ankith Reddy

Ankith Reddy

Updated on 26-Jun-2020 14:27:51

3K+ Views

Heap Sort is a sorting algorithm that makes use of the heap data structure. Each time the root element of the heap i.e. the largest element is removed and stored in an array. It is replaced by the rightmost leaf element and then the heap is reestablished. This is done ... Read More

How to get default phone number in android?

Ankith Reddy

Ankith Reddy

Updated on 26-Jun-2020 14:14:11

648 Views

This example demonstrate about How to get default phone number in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     In the ... Read More

How to return local array from a C++ function?

Ankith Reddy

Ankith Reddy

Updated on 26-Jun-2020 14:13:36

835 Views

A local array cannot be directly returned from a C++ function as it may not exist in memory after the function call. A way to resolve this is to use a static array in the function. As the lifetime of the static array is the whole program, it can easily ... Read More

When to use new operator in C++ and when it should not be used?

Ankith Reddy

Ankith Reddy

Updated on 26-Jun-2020 13:58:34

8K+ Views

Use of the new operator signifies a request for the memory allocation on the heap. If the sufficient memory is available, it initializes the memory and returns its address to the pointer variable.The new operator should only be used if the data object should remain in memory until delete is ... Read More

Declare variable as constant in C

Ankith Reddy

Ankith Reddy

Updated on 26-Jun-2020 13:44:11

20K+ Views

Variables can be declared as constant using the const keyword or the #define preprocessor directive. Details about these are given as follows.The const keywordVariables can be declared as constants by using the “const” keyword before the datatype of the variable. The constant variables can be initialized once only. The default ... Read More

Block movement without overlap in Z-80

Ankith Reddy

Ankith Reddy

Updated on 26-Jun-2020 13:17:38

193 Views

In this section, we will see how we can use the Zilog Z-80 Microprocessor to move a block of data to another location. There is one assumption, there is sufficient distance between source and destination. So blocks are non-overlapping. Basically the block movement is not exact moving, it is copying ... Read More

What is Interleaving?

Ankith Reddy

Ankith Reddy

Updated on 26-Jun-2020 13:08:14

8K+ Views

Interleaving is a tool that is used to enhance existing error correcting codes so that they can be used to perform burst error corrections as well.Most error correcting codes (ECCs) are designed to correct random errors, i.e. error caused by additive noise that is independent of each other. Burst error ... Read More

Different methods to check if a MySQL table exist?

Ankith Reddy

Ankith Reddy

Updated on 26-Jun-2020 13:01:58

231 Views

Let us see some of the ways to check if a table exist in MySQL or not.Using SHOWThe SHOW command displays all the tables.SHOW tables;Here is the output.+--------------------------+ | Tables_in_business       | +--------------------------+ | addcheckconstraintdemo   | | addcolumntable           | | addconstraintdemo   ... Read More

How do I know if a MySQL table is using myISAM or InnoDB Engine?

Ankith Reddy

Ankith Reddy

Updated on 26-Jun-2020 12:58:04

3K+ Views

To know a MySQL table is using MyISAM or InnoDB engine, you can use the command show status table. The syntax is as follows −SHOW TABLE STATUS from yourDatabaseName LIKE ‘yourTableName’.The above syntax tells about the specific table engine. Now you can apply the above syntax to know whether the ... Read More

How to store usernames and passwords safely in MySQL database?

Ankith Reddy

Ankith Reddy

Updated on 26-Jun-2020 12:50:08

13K+ Views

To store username and passwords safely in MySQL database, we can use MD5().Let us see an example. First, we will create a table. The CREATE command is used to create a table.mysql> create table UserNameAndPasswordDemo - > ( - > U_Id int(10) unsigned NOT NULL AUTO_INCREMENT, - > UserId varchar(255) ... Read More

Advertisements