The HTML DOM Anchor hash property is used to set or return the anchor part of the href attribute value. The part of the URL after the # is what we call the anchor part of a link.Following is the syntax to set the hash property −anchorObject.hash = anchor_partAbove, anchor_part is the anchor part of the URL.Following is the syntax to return the hash property −anchorObject.hashLet us now see an example to implement the DOM Anchor hash property −Example Live Demo Company Our Team Get the anchor part... Display Anchor Part function display() { ... Read More
You can use DATE_ADD() function from MySQL. Let us first create a table −mysql> create table DemoTable -> ( -> ShippingDate varchar(100) -> ); Query OK, 0 rows affected (0.67 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('06-01-2019'); Query OK, 1 row affected (0.15 sec) mysql> insert into DemoTable values('01-04-2017'); Query OK, 1 row affected (0.19 sec) mysql> insert into DemoTable values('29-06-2019'); Query OK, 1 row affected (0.47 sec)Display all records from the table using select statement −mysql> select *from DemoTable;Output+--------------+ | ShippingDate | +--------------+ | 06-01-2019 | ... Read More
The HTML DOM Input Date stepUp() method defines the amount of days the date field should increase.SyntaxFollowing is the syntax −Calling stepUp method with a number, which by default is equal to 1inputDateObject.stepUp(number)ExampleLet us see an example of Input Date stepUp method − Live Demo Input Date stepUp() Calendar: Increase by 2 Increase by 3 var divDisplay = document.getElementById("divDisplay"); var inputDate = document.getElementById("dateSelect"); function changeStep(num){ if(num===2) inputDate.stepUp(2); else inputDate.stepUp(3); divDisplay.textContent = 'Current date increased by: '+num; } OutputThis will produce the following output −Clicking ‘Increase by 2’ button −Clicking ‘Increase by 3’ button −
The HTML DOM ins dateTime property returns the date and time for when the text was inserted.SyntaxFollowing is the syntax −Returning string valueinsObject.dateTimeExampleLet us see an example for ins dateTime property − Live Demo ins dateTime form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } ins-dateTime Fact: Water cannot persist on moon's surface. Water ice found on ... Read More
Use NOT LIKE for this. Let us first create a table −mysql> create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, StudentFullName varchar(40) ); Query OK, 0 rows affected (0.66 sec)Insert records in the table using insert command −mysql> insert into DemoTable(StudentFullName) values('JohnSmith'); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable(StudentFullName) values('John Doe'); Query OK, 1 row affected (0.18 sec) mysql> insert into DemoTable(StudentFullName) values('Adam Smith'); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable(StudentFullName) values('CarolTaylor'); Query OK, 1 row affected (0.19 sec)Display all records from the table using ... Read More
To count common elements, use COUNT() and GROUP BY. Let us first create a table −mysql> create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, Number int ); Query OK, 0 rows affected (0.20 sec)Insert some records in the table using insert command −mysql> insert into DemoTable(Number) values(10); Query OK, 1 row affected (0.06 sec) mysql> insert into DemoTable(Number) values(20); Query OK, 1 row affected (0.04 sec) mysql> insert into DemoTable(Number) values(20); Query OK, 1 row affected (0.04 sec) mysql> insert into DemoTable(Number) values(30); Query OK, 1 row affected (0.04 sec) ... Read More
Cryptocurrency is not a traditional currency as well as you cannot even get it through a traditional method; this makes it a completely different asset than the rest. Thus, its legality puts it under the dark clouds of doubt. Thus, the question leaves a number of investors and other crypto lovers into a riddle because bitcoin carries an immense gloomy phenomenon along with it.The status of bitcoin (and related crypto instruments) varies substantially from country to country and yet remains undefined. Moreover, it is changing in many countries. Most countries do not tag the usage of bitcoin as illegal. They ... Read More
To display horizontal grid lines in a table, use the setShowHorizontalLines() method and set it to TRUE. Let us first create a table −String[][] rec = { { "1", "Steve", "AUS" }, { "2", "Virat", "IND" }, { "3", "Kane", "NZ" }, { "4", "David", "AUS" }, { "5", "Ben", "ENG" }, { "6", "Eion", "ENG" }, }; String[] header = { "Rank", "Player", "Country" }; JTable table = new JTable(rec, header);Now, let us display vertical grid lines −table.setShowHorizontalLines(true);You can also give a color to these lines −table.setGridColor(Color.orange);The following is an example to display ... Read More
Here we will see how to generate Fibonacci sequence using 8086Problem StatementWrite 8086 Assembly language program to generate Fibonacci sequence. The limit of the sequence is stored at location offset 500. The item will be stored from offset 600 onwards.DiscussionTo generate Fibonacci sequence, we are putting the 00H and 01H into memory at first. Then we are taking the limit from location offset 500. The limit is decreased by 2 at first, because 00H and 01H is already present there. Now we are taking number from previous location, then add it with the value of current location, after that storing ... Read More
Here we will see how to add two 8-bit numbers without carry in 8085.Problem StatementWrite 8085 Assembly language program to perform 8-bit addition without carry. The numbers are stored at F100, and F101. Result will be stored at F102.DiscussionIn 8085, there is ADD instruction to add two numbers. We will set the HL pair to point the numbers, then load accumulator with the number. Then add with ADD M operation which can add items from memory pointed by HL pair and accumulator.InputAddressData……F100CEF10121…… Flow Diagram ProgramAddressHEX CodesLabelsMnemonicsCommentsF00021, 01, F1 LXI H, F100HPoint to get the numbersF0037E MOV A, MLoad first number to AF00423 INX HPoint to ... Read More