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
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
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
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
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
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
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
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
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
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