To create table border in HTML, the border attribute was used. But the introduction of HTML5, deprecated the border tag. Create table border using the CSS property border. Set table border as well as border for and .ExampleYou can try to run the following code to create a border in the table in HTML. We’re using tag here: table, th, td { border: 1px solid black; } Employee Details Name Amit Sachin Age 27 34 Output
In this tutorial, we will learn how to hide HTML element with JavaScript. Hiding an HTML element can be performed in different ways in JavaScript. In this tutorial, we will see the three most popular ways of doing it − Using the hidden property Using the style.display property Using the style.visibility property Generally, we use the hidden attribute to hide a particular element. We can toggle between hiding and showing the element by setting the hidden attribute value to true or false, respectively. In the other two ways, we use the style object of the element. We ... Read More
To create line segments between two points in matplotlib, we can take the following stepsSet the figure size and adjust the padding between and around the subplots.To make two points, create two lists.Extract x and y values from point1 and point2.Plot x and y values using plot() method.Place text for both the points.To display the figure, use show() method.Exampleimport matplotlib.pyplot as plt plt.rcParams["figure.figsize"] = [7.50, 3.50] plt.rcParams["figure.autolayout"] = True point1 = [1, 2] point2 = [3, 4] x_values = [point1[0], point2[0]] y_values = [point1[1], point2[1]] plt.plot(x_values, y_values, 'bo', linestyle="--") plt.text(point1[0]-0.015, point1[1]+0.25, "Point1") plt.text(point2[0]-0.050, point2[1]-0.25, "Point2") plt.show()OutputRead More
A deadlock happens in operating system when two or more processes need some resource to complete their execution that is held by the other process.In the above diagram, the process 1 has resource 1 and needs to acquire resource 2. Similarly process 2 has resource 2 and needs to acquire resource 1. Process 1 and process 2 are in deadlock as each of them needs the other’s resource to complete their execution but neither of them is willing to relinquish their resources.Coffman ConditionsA deadlock occurs if the four Coffman conditions hold true. But these conditions are not mutually exclusive.The Coffman ... Read More
Beautiful webpages are a very strong means of catching user attention. In this article, we are going to see how we can add an image as the background image of a web. Approach There are two approaches to setting an image as the webpage's background image, which we will learn in this article. They are − Using background attribute Using CSS Method 1: Using background attribute We can use the background attribute in the body tag to set an image as the background of the webpage. We will need to specify the URL or the location of the image ... Read More
Wireless LANs (WLANs) are wireless computer networks that use high-frequency radio waves instead of cables for connecting the devices within a limited area forming LAN (Local Area Network). Users connected by wireless LANs can move around within this limited area such as home, school, campus, office building, railway platform, etc.Most WLANs are based upon the standard IEEE 802.11 standard or WiFi.Components of WLANsThe components of WLAN architecture as laid down in IEEE 802.11 are −Stations (STA) − Stations comprises of all devices and equipment that are connected to the wireless LAN. Each station has a wireless network interface controller. A ... Read More
Data control language (DCL) is used to access the stored data. It is mainly used for revoke and to grant the user the required access to a database. In the database, this language does not have the feature of rollback.It is a part of the structured query language (SQL).It helps in controlling access to information stored in a database. It complements the data manipulation language (DML) and the data definition language (DDL).It is the simplest among three commands.It provides the administrators, to remove and set database permissions to desired users as needed.These commands are employed to grant, remove and deny ... Read More
To get the index of an item in a single line, use the FindIndex() and Contains() methods.int index = myList.FindIndex(a => a.Contains("Tennis"));Above, we got the index of an element using the FindIndex(), which is assisted by Contains() method for that specific element.Here is the complete code −Example Live Demousing System; using System.Collections.Generic; public class Program { public static void Main() { List myList = new List () { "Football", "Soccer", "Tennis", }; // finding index ... Read More
At first you have to make a html form like. Validation of a form First name: Last name: Email: Now use jQuery validation plugin to validate forms' data in easier way.first, add jQuery library in your file. then add javascript code: $(document).ready(function() { $("#form").validate(); }); Then to define rules use simple syntax.jQuery(document).ready(function() { jQuery("#forms).validate({ rules: { firstname: 'required', lastname: 'required', u_email: { required: true, ... Read More
Tkinter Entry widgets are used to display a single line text that is generally taken in the form of user Input. We can clear the content of Entry widget by defining a method delete(0, END) which aims to clear all the content in the range. The method can be invoked by defining a function which can be used by creating a Button Object.ExampleIn this example, we have created an entry widget and a button that can be used to clear all the content from the widget.#Import the required libraries from tkinter import * #Create an instance of tkinter frame ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP