HTML ins datetime Attribute

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

272 Views

The datetime attribute of the element is used to specify the date and time displaying when the text was inserted.Following is the syntax −Above, the attribute datatime displays the datetime when the text was inserted in the following format −YYYY - yearMM - monthDD - day of the monthhh - hourmm - minutesss - secondsTZD - Time Zone DesignatorLet us now see an example to implement the datetime attribute of the element −Example Live Demo    Demo Heading    Text is inserted. OutputIn the above example, we have inserted a text using the element − ... Read More

Unpack 16-bit BCD and Store in Consecutive Locations

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

980 Views

Here we will see we can take 16-bit BCD data from memory and unpack it, then store into memory using 8085.Problem StatementWrite 8085 program to take 16-bit BCD number from memory then store each digit by unpacking into different locations.DiscussionTo solve this problem, we will create one subroutine, that can unpack 1-byte BCD number and store into memory, then we will use that subroutine for two times to store 16-bit data. The subroutine will cut the numbers by masking upper nibble and lower nibble, and store into memory.Input1234 in the DE register pairFlow Diagram ProgramAddressHEX CodesLabelsMnemonicsCommentsF00031, 00, FC LXI SP, FC00Initialize stack ... Read More

Update Timestamp Field of a MySQL Table

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

2K+ Views

Let us first create a table −mysql> create table DemoTable    -> (    -> PunchOut timestamp,    -> PunchStatus tinyint(1)    -> ); Query OK,  0 rows affected (0.51 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('2019-01-31 6:30:10', 1); Query OK,  1 row affected (0.22 sec) mysql> insert into DemoTable values('2019-02-06 4:10:13', 0); Query OK,  1 row affected (0.14 sec) mysql> insert into DemoTable values('2018-12-16 03:00:30', 0); Query OK,  1 row affected (0.16 sec) mysql> insert into DemoTable values('2016-11-25 02:10:00', 1); Query OK,  1 row affected (0.22 sec)Display all records from the table using select statemen −mysql> select *from DemoTable;Output+---------------------+-------------+ | PunchOut            | PunchStatus | +---------------------+-------------+ | 2019-01-31 06:30:10 |           1 | | 2019-02-06 04:10:13 |           0 | | 2018-12-16 03:00:30 | ... Read More

HTML DOM paddingLeft Property

Sharon Christine
Updated on 30-Jul-2019 22:30:26

115 Views

The HTML DOM paddingLeft property returns and add left padding to an HTML element.SyntaxFollowing is the syntax −1. Returning left paddingobject.style.paddingLeft2. Adding left paddingobject.style.paddingLeft=”value”ValuesHere, “value” can be the following −ValueDetailslengthIt defines value padding in length unit.initialIt defines padding to its default value.inheritIn this padding gets inherited from its parent element.percentage(%)It defines padding in percentage of the width of parent element.ExampleLet us see an example of paddingLeft property − Live Demo HTML DOM paddingLeft property    .outer-box{       background-color:#db133a;       width:300px;       height:300px;       margin:1rem auto;    }   ... Read More

HTML DOM Italic Object

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

193 Views

The HTML DOM Italic Object represents an element which displays text in italic.SyntaxFollowing is the syntax −Creating an elementvar italicObject = document.createElement(“I”)ExampleLet us see an example for Italic object element − Live Demo Italic Object    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    } Italic Object Formatter:    var divDisplay = document.getElementById("divDisplay");    var textSelect = document.getElementById("textSelect");    function convertItalic() {       var italicObject = document.createElement("I");       var italicText = document.createTextNode(textSelect.value);       italicObject.appendChild(italicText);       divDisplay.appendChild(italicObject);    } OutputThis will produce the following output −Before clicking ‘Check’ button −After clicking ‘Check’ button −

Using Column Name from in a MySQL Query

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

355 Views

You cannot use ‘from’ as column name directly because ‘from’ is a reserved word in MySQL.If you want to still use it, then you need to use the backtick symbol.Let us first create a table −mysql> create table DemoTable    (    Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    `from` varchar(100),    Name varchar(10)    ); Query OK, 0 rows affected (0.92 sec)Insert records in the table using insert command −mysql> insert into DemoTable(`from`, Name) values('US', 'John'); Query OK, 1 row affected (0.20 sec) mysql> insert into DemoTable(`from`, Name) values('UK', 'Carol'); Query OK, 1 row affected (0.14 sec) mysql> ... Read More

Java ResultSet insertRow() Method Example

Vikyath Ram
Updated on 30-Jul-2019 22:30:26

3K+ Views

When we execute certain SQL queries (SELECT query in general) they return tabular data.The java.sql.ResultSet interface represents such tabular data returned by the SQL statements.i.e. the ResultSet object holds the tabular data returned by the methods that execute the statements which quires the database (executeQuery() method of the Statement interface in general).The ResultSet object has a cursor/pointer which points to the current row. Initially this cursor is positioned before first row.The insertRow() method of the ResultSet interface inserts the contents of the row into the ResultSet object (and into the table as well).rs.moveToInsertRow(); rs.updateInt("ID", id); rs.updateString("First_Name", "Ishant"); rs.updateString("Last_Name", "Sharma"); rs.updateDate("Date_Of_Birth", new Date(904694400000L)); ... Read More

Add Icon to JButton in Java

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

23K+ Views

To add icon to a button, use the Icon class, which will allow you to add an image to the button.We are creating a button wherein we are adding an icon with Icon class −Icon icon = new ImageIcon("E:\editicon.PNG"); JButton button7 = new JButton(icon);Above, we have set icon for button 7.The following is an example to add icon to JButton−Examplepackage my; import javax.swing.Box; import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; public class SwingDemo {    public static void main(String[] args) {       JButton button1 = new JButton("One");       JButton button2 = new JButton("Two");     ... Read More

HTML Button Value Attribute

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

721 Views

The value attribute of the element is used to set the initial value of a button. You can set this in a . Here, we will be showing an example without using a form.Following is the syntax −Above, value is the initial value.Let us now see an example to implement value attribute in −Example Live Demo Click below to get details about the learning content... Get Tutorials Get InterviewQA    function demo1() {       var val1 = document.getElementById("button1").value;       document.getElementById("myid").innerHTML = val1;    }    function demo2() {       ... Read More

8085 Program to Take All Data Except 00h from an Array

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

594 Views

Here we will see we can take all numbers which are not 00H from an array using 8085.Problem StatementWrite 8085 program to take all numbers which are not 00H from array, and store them into different location. Numbers are stored at 8001 onwards, 8000 is holding the size of array, the results will be stored from 9000.DiscussionTo solve this problem, we are taking the number from memory, then perform OR operation on the number and 00H. If the zero flag is enabled, then we can understand that the number was 00, so we just ignore that. Otherwise we just store ... Read More

Advertisements