Whenever you create an HTML document, the doctype is the first thing placed in the document.It conveys the web browser about the version of the HTML, this page is written on. It is not casesensitive.Let us see an example displaying DOCTYPE on the top −Example Live Demo Document Title comes here Demo Heading This is the demo text. OutputNow let us see some of the declarations for doctype −HTML5 DeclarationExampleHTML 4 StrictThis document type includes all HTML elements except those that have been deprecated, and those that appear in frameset documents.HTML 4 ... Read More
For this, use the substring_index() method. Let us first create a table −mysql> create table DemoTable -> ( -> FolderName varchar(100), -> FolderLocation varchar(200) -> ); Query OK, 0 rows affected (1.03 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('CProgram', 'C:/AllPrograms/.....'); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable values('Images', 'E:/MyImage/home/garbage'); Query OK, 1 row affected (0.15 sec)Display all records from the table using select statement −mysql> select *from DemoTable;Output+------------+-------------------------+ | FolderName | FolderLocation | +------------+-------------------------+ | CProgram | C:/AllPrograms/..... ... Read More
You can use AS command for this. Let us first create a table −mysql> create table DemoTable ( Name varchar(20) ); Query OK, 0 rows affected (0.56 sec)Insert records in the table using insert command −mysql> insert into DemoTable values('John'); Query OK, 1 row affected (0.18 sec)Display all records from the table using select statement −mysql> select * from DemoTable;This will produce the following output −+------+ | Name | +------+ | John | +------+ 1 row in set (0.00 sec)Here is the query to create the second table.mysql> create table DemoTable2 ( Name varchar(20) ... Read More
The getMaxRowSize() method of the DatabaseMetaData interface is used to find out the maximum number of bytes that the underlying database allows in a row.This method returns an integer value, representing the maximum row size. 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() method of the DriverManager class. Pass the URL the ... Read More
Following is the query to create a stored procedure that creates a table. Here, we are creating a table with three columns, one of them is Id −mysql> DELIMITER // mysql> CREATE PROCEDURE Stored_Procedure_CreatingTable() BEGIN create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, UserFirstName varchar(20), UserLastName varchar(20) ); END; // Query OK, 0 rows affected (0.16 sec) mysql> DELIMITER ;Now you can call stored procedure with the help of CALL command −mysql> call Stored_Procedure_CreatingTable(); ... Read More
To disable auto resizing, you need to use the setAutoResizeMode() method. After that, set the table to AUTO_RESIZE_OFF.Let’s say the following is our table −String[][] rec = { { "1", "Virat", "840" }, { "2", "David", "835" }, { "3", "Shikhar", "656" }, { "4", "Steve", "530" }, { "5", "Kane", "515" }, { "6", "Eion", "509" }, { "7", "AB de Villiers", "498" }, { "8", "Quinton", "470" }, { "9", "Glenn", "410" }, { "10", "Tom", "360" }, { "11", "Johnny", "320" }, { "12", "Shreyas", ... Read More
In this program we will see how to find GP series using 8086.Problem StatementWrite 8086 Assembly language program to find GP series. The limit of the series is stored at 500, First term is stored at 501, and the common ratio is stored at 502.DiscussionGP generation is simple task. We are taking the limit as counter value, the first term is loaded into AL first, then the BL is holding the common ratio r. Now the result is storing memory offset 600 onwards. The AL is placing as it is, then repeatedly multiply BL with AL and store it into ... Read More
Here we will see how to find 2’s complement with carry.Problem StatementWrite 8085 Assembly language program to find 2’s complement of a number stored in F100 with the carry, and store at F150 and F151.DiscussionIn 8085, there is CMA instruction to complement a number. Then we can add 01 with it to make it 2’s complement. While adding 01 with it, the carry may generate. We will store it to F151, and the actual complemented value will be at F150.InputAddressData……F10008…… Flow Diagram ProgramAddressHEX CodesLabelsMnemonicsCommentsF0003A, 00, F1 LDA F100Hget number from memory to AF0032F CMAget 1's complementF004C6, 01 ADI 01Increase it by 1F0066F MOV L, AStore A ... Read More
You can use TIME_FORMAT(). Let us first create a table −mysql> create table DemoTable -> ( -> PunchIn time, -> PunchOut time, -> Launch time -> ); Query OK, 0 rows affected (0.50 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('9:00', '6:00', '1:00:00'); Query OK, 1 row affected (0.19 sec) mysql> insert into DemoTable values('9:30', '6:10', '00:30:00'); Query OK, 1 row affected (0.21 sec)Display all records from the table using select statement −mysql> select *from DemoTable;Output+----------+----------+----------+ | PunchIn | PunchOut | Launch | +----------+----------+----------+ | 09:00:00 | ... Read More
The HTML DOM Input Date value property returns a string, which is the value of the value attribute of input date. User can also set it to a new string.SyntaxFollowing is the syntax −Returning string valueinputDateObject.valueSetting value attribute to a string valueinputDateObject.value = ‘String’ExampleLet us see an example of Input Date value property − Live Demo Input Date Value Calendar: Change Value var divDisplay = document.getElementById("divDisplay"); var inputDate = document.getElementById("dateSelect"); divDisplay.textContent = 'Current value: '+ inputDate.value; function changeValue(){ var currDate = inputDate.value; ... Read More