Priya Pallavi has Published 68 Articles

How to perform heapsort on an array in Java?

Priya Pallavi

Priya Pallavi

Updated on 19-Feb-2020 12:22:49

677 Views

Following is the algorithm for heapsort (maxheap).Step 1 − Create a new node at the end of the heap.Step 2 − Assign new value to the node.Step 3 − Compare the value of this child node with its parent.Step 4 − If the value of parent is less than a ... Read More

How to populate an array one value at a time by taking input from user in Java?

Priya Pallavi

Priya Pallavi

Updated on 19-Feb-2020 11:29:27

7K+ Views

To read data from user create a scanner class. Read the size of the array to be created from the user using nextInt() method. Create an array with the specified size. In the loop read the values from the user and store in the array created above.Exampleimport java.util.Arrays; import java.util.Scanner; ... Read More

Changing program title in SAP

Priya Pallavi

Priya Pallavi

Updated on 18-Feb-2020 07:26:15

782 Views

SET TITLEBAR function should be called from a module that is called from PBO of your screen.The title which you are providing should be active. This can be checked by loading your program in SE80 and check the program information in the tree to the right.

Getting error- Hard-coded logon parameters not allowed when using a Destination Configuration while connecting to SAP server dynamically

Priya Pallavi

Priya Pallavi

Updated on 14-Feb-2020 04:50:55

567 Views

You can try below sample code. I would suggest you to try using this:public class Program {    static void Main(string[] args) {       SapConnection con = new SapConnection();       RfcDestinationManager.RegisterDestinationConfiguration(con);       RfcDestination dest = RfcDestinationManager.GetDestination("NSP");       RfcRepository repo = dest.Repository; ... Read More

How can we write MySQL stored procedure to select all the data from a table?

Priya Pallavi

Priya Pallavi

Updated on 12-Feb-2020 07:53:37

1K+ Views

To demonstrate it we are creating a procedure named ‘selectdetails()’ which will fetch all the records from table ‘student_detail’.mysql> Delimiter // mysql> Create Procedure selectdetails()    -> BEGIN    -> Select * from student_detail;    -> END// Query OK, 0 rows affected (0.00 sec)Now, after invoking this procedure, we will ... Read More

How to parse a string to an int in C++?

Priya Pallavi

Priya Pallavi

Updated on 12-Feb-2020 06:28:22

1K+ Views

You can use a string stream to parse an int in c++ to an int. You need to do some error checking in this method.example#include #include using namespace std; int str_to_int(const string &str) {    stringstream ss(str);    int num;    ss >> num;    return num; } ... Read More

When can I use a forward declaration C/C++?

Priya Pallavi

Priya Pallavi

Updated on 11-Feb-2020 10:43:13

225 Views

Forward declaration lets the code following the declaration know that there is are classes with the name Person. This satisfies the compiler when it sees these names used. Later the linker will find the definition of the classes. exampleClass Person; void myFunc(Person p1) {    // ... } Class ... Read More

What does the volatile keyword mean in C++?

Priya Pallavi

Priya Pallavi

Updated on 10-Feb-2020 12:25:23

2K+ Views

volatile means two things −- The value of the variable may change without any code of yours changing it. Therefore whenever the compiler reads the value of the variable, it may not assume that it is the same as the last time it was read, or that it is the ... Read More

What would be effect of negative value of second argument, which specifies the number of decimal places, on the output of MySQL ROUND() function?

Priya Pallavi

Priya Pallavi

Updated on 10-Feb-2020 10:37:50

1K+ Views

If we specify the negative value of the second argument then the digits before the decimal point would be deleted and rounded off. The number of digits to be deleted depends upon the value of the negative second argument. Following examples will demonstrate the change, depending upon the negative value ... Read More

What is the synonym statement of SHOW DATABASES with the help of which we can see the list of MySQL databases?

Priya Pallavi

Priya Pallavi

Updated on 10-Feb-2020 08:13:51

128 Views

As we know that with the help of SHOW DATABASES statement we can see the list of MySQL databases. Similarly, we can use SHOW SCHEMAS as the synonym of SHOW DATABASES to get the list of databases.Examplemysql> SHOW DATABASES; +--------------------+ | Database           | +--------------------+ | ... Read More

Advertisements