- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
The download attribute of the element is used to set the name of the file to be downloaded which would download when user clicks on the hyperlink.Following is the syntax −The file is the name of the file set for download.Let us now see an example to implement the download attribute of the element −Example Live Demo Learning Learn these technologies with ease.... OutputNow, when you will click on let’s say “PERL”, the file will download as shown below −Above, we ... Read More
The HTML DOM input month form property returns the reference of the form that contains the month input field in the HTML document.SyntaxFollowing is the syntax −object.formExampleLet us see an example of HTML DOM input month form property − Live Demo body{ text-align:center; background-color:#363946; color:#fff; } form{ margin:2.5rem auto; } button{ background-color:#db133a; border:none; cursor:pointer; padding:8px 16px; color:#fff; border-radius:5px; ... Read More
The HTML DOM Subscript Object represent the element of an HTML document.Let us see how to create subscript objectSyntaxFollowing is the syntax −document.createElement(“SUB”);ExampleLet us see an example of HTML DOM subscript object − Live Demo body { text-align: center; background-color: #fff; color: #0197F6; } h1 { color: #23CE6B; } .btn { background-color: #fff; border: 1.5px dashed #0197F6; height: 2rem; border-radius: 2px; width: 60%; ... Read More
The Link type property sets/returns the type of a linked document.SyntaxFollowing is the syntax −Returning type attribute valuelinkObject.typeSetting type to a valid valuelinkObject.type = valueNOTE − valid values include "text/javascript", "text/css", "image/gif", etc.ExampleLet us see an example for Link type property − Link type Link-type var divDisplay = document.getElementById("divDisplay"); var extStyle = document.getElementById("extStyle"); divDisplay.textContent = 'The linked document type: '+extStyle.type+' is not compatible'; function correctType(){ extStyle.type = 'text/css'; divDisplay.textContent = 'Congrats! The linked document type: '+extStyle.type+' is compatible'; ... Read More
Here we shall discuss a C++ Program to find the Shortest Supersequence that contains two or more Sequences as Subsequences.AlgorithmBegin function ShortestSubSeq() returns supersequence of A and B: 1) Declare an array ss[i][j] which contains length of shortest supersequence for A[0 .. i-1] and B[0 .. j-1]. 2) Find the length of the possible supersequence in bottom up manner using recursion. 3) Declare an array ss[i][j] which stores length of shortest supersequence for A[0 .. i-1] and B[0 .. j-1] in index. 4) Declare a string s to store the shortest subsequence. 5) Initialize ... Read More
Token RingToken ring (IEEE 802.5) is a communication protocol in a local area network (LAN) where all stations are connected in a ring topology and pass one or more tokens for channel acquisition. A token is a special frame of 3 bytes that circulates along the ring of stations. A station can send data frames only if it holds a token. The tokens are released on successful receipt of the data frame.Token Passing Mechanism in Token RingIf a station has a frame to transmit when it receives a token, it sends the frame and then passes the token to the ... Read More
To set the text of the label component to be right- justified and vertically centered, you need to set the alignment while creating a new label.Set the label to be on the right -JLabel label = new JLabel("Name", JLabel.RIGHT);Here, we have set the size of the label as well as the color that includes foreground and background color -label.setPreferredSize(new Dimension(170, 70)); label.setOpaque(true); label.setBackground(Color.MAGENTA); label.setForeground(Color.WHITE);The following is an example to set the text of the label to be right-justified and vertically centered −Examplepackage my; import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JTextArea; import javax.swing.WindowConstants; public ... Read More
Let us first create a collection with documents −> db.arrayElementsNotGreaterThanDemo.insertOne({"Scores":[89, 43, 32, 45]}); { "acknowledged" : true, "insertedId" : ObjectId("5cd9e9f9b50a6c6dd317adb3") } > db.arrayElementsNotGreaterThanDemo.insertOne({"Scores":[32, 33, 34, 40]}); { "acknowledged" : true, "insertedId" : ObjectId("5cd9ea13b50a6c6dd317adb4") } > db.arrayElementsNotGreaterThanDemo.insertOne({"Scores":[45, 56, 66, 69]}); { "acknowledged" : true, "insertedId" : ObjectId("5cd9ea25b50a6c6dd317adb5") } > db.arrayElementsNotGreaterThanDemo.insertOne({"Scores":[46, 66, 77, 88]}); { "acknowledged" : true, "insertedId" : ObjectId("5cd9ea3cb50a6c6dd317adb6") }Following is the query to display all documents from a collection with the help of find() method −> db.arrayElementsNotGreaterThanDemo.find().pretty();This will produce the following output −{ "_id" : ObjectId("5cd9e9f9b50a6c6dd317adb3"), "Scores" : [ ... Read More
Void pointer is a pointer which is not associate with any data types. It points to some data location in storage means points to the address of variables. It is also called general purpose pointer.It is not safe to delete a void pointer in C/C++ because delete needs to call the destructor of whatever object it's destroying, and it is impossible to do that if it doesn't know the type.Here is a simple example of void pointer −Example Live Demo#include int main() { int a = 7; float b = 7.6; void *p; p = &a; printf("Integer variable is = %d", *( (int*) p) ); p = &b; printf("Float variable ... Read More
The HTML DOM input number Object represent the
To Continue Learning Please Login
Login with Google