Implement Alexander Bogomolny's Unordered Permutation Algorithm in C++

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

132 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 = level       Body of the function:       intialize l = -1       l = l+1       Val[k] = l       if (l == N)          Call function display(Val, N)       else       ... Read More

Get Maximum Procedure Name Length in Java DatabaseMetaData

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

87 Views

The getMaxProcedureNameLength() method of the DatabaseMetaData interface is used to find out the maximum number of characters that the underlying database allows in the name of a procedure.This method returns an integer value, representing the maximum number of characters allowed in a procedure name. If this value is 0 it indicates that there is no limit or, limit is unknown.To get the DatabaseMetaData object −Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of the driver class corresponding to the underlying database.Get the connection object using the getConnection() ... Read More

Create Vertical Slider with Custom Min, Max, and Initial Value in Java

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

154 Views

While creating vertical slider, we can set custom values as well. Let us take three integer variable and set the int values for min, max as well as the initial value of the slider −int val = 50; int min = 0; int max = 100;Set it to the slider while creating a new slider. Here, we have set the constant to be VERTICAL, since we are creating a vertical slider −JSlider slider = new JSlider(JSlider.VERTICAL, min, max, val);The following is an example to create a vertical slider with custom values −Examplepackage my; import java.awt.Color; import java.awt.Font; import javax.swing.JFrame; import ... Read More

Count Total Odd Numbers in Series of 10 Numbers using 8085

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

2K+ Views

In this program we will see how to count number of odd numbers in a block of elements.Problem StatementWrite 8085 Assembly language program to count number of odd numbers in a block of data, where the block size is 10D. The block is starting from location 8000H.DiscussionThe Odd Even checking is very simple. we can determine one number is odd or even by checking only the LSb. When LSb is 1, the number is odd, otherwise it is even. In this program we are taking a number from memory and then ANDing 01H with it. if the result is nonzero, ... Read More

HTML area href Attribute

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

191 Views

The href attribute of the element sets the the hyperlink target. Following is the syntax −Above, URL is the hyperlink you need to mention for the area, which can be a relative link, absolute link, script, protocol, etc.Let us now see an example to implement the href attribute of the element −Example Live Demo Learning Learn these technologies with ease....             OutputIn the above example, we have set the map on the following image −Now, we have set the map and area within it for shape −   ... Read More

Return Rows with Same Column Values in MySQL

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

326 Views

Use GROUP BY clause for this. Let us first create a table −mysql> create table DemoTable    -> (    -> StudentId int,    -> StudentMarks int    -> ); Query OK, 0 rows affected (4.71 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(23, 58); Query OK, 1 row affected (0.70 sec) mysql> insert into DemoTable values(25, 89); Query OK, 1 row affected (0.46 sec) mysql> insert into DemoTable values(26, 58); Query OK, 1 row affected (1.13 sec) mysql> insert into DemoTable values(28, 98); Query OK, 1 row affected (0.86 sec)Display ... Read More

HTML DOM Input Week StepDown Method

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

105 Views

The HTML DOM Input Week stepDown() method defines the amount of weeks the week field should decrease.SyntaxFollowing is the syntax −Calling stepDown() method with a number, which by default is equal to 1inputWeekObject.stepDown(number)ExampleLet us see an example for Input Week stepDown() method − Live Demo Input Week stepDown()    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    } Week-stepDown( ... Read More

Generate All Possible Combinations of a Given List of Numbers in C++

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

2K+ Views

This is a C++ program to generate all possible combinations of a given list of numbersAlgorithmsBegin    Take the number of elements and the elements as input.    function Combi(char a[], int reqLen, int s, int currLen, bool check[], int l) :    If currLen>reqLen then    Return    Else if currLen=reqLen then       Then print the new generated sequence.    If s=l then       Then return no further element is left.    For every index there are two option:    either proceed with a start as ‘true’ and recursively call Combi() with incremented value of ... Read More

Get Maximum Username Length Using DatabaseMetadata in Java

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

61 Views

The getMaxUserNameLength() method of the DatabaseMetaData interface is used to find out the maximum number of characters that the underlying database allows in the name of a user.This method returns an integer value, representing the maximum number of characters allowed in a user name. If this value is 0 it indicates that there is no limit or, the limit is unknown.To get the Maximum length of a user using this method:Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of the driver class corresponding to the underlying database.Get the ... Read More

Ordering String as a Number in a Database

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

109 Views

To order string as a number, use CAST(). Following is the syntax −select *from yourTableName ORDER BY CAST(yourColumnName AS SIGNED) DESC;Let us first create a table −mysql> create table DemoTable    (    Id varchar(100)    ); Query OK, 0 rows affected (0.18 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('3'); Query OK, 1 row affected (0.07 sec) mysql> insert into DemoTable values('20'); Query OK, 1 row affected (0.07 sec) mysql> insert into DemoTable values('34'); Query OK, 1 row affected (0.06 sec) mysql> insert into DemoTable values('21'); Query OK, 1 row ... Read More

Advertisements