Arjun Thakur has Published 1109 Articles

Change Background color of a web page using onmouseover property

Arjun Thakur

Arjun Thakur

Updated on 12-Jun-2020 07:20:30

6K+ Views

The onmouseover property allows you set a script when the mouse pointer is moved onto an element. To change the background color, use the HTML DOM backgroundColor property.Let us see an example to implement the onmouseover property and change the background color −Example Live Demo Heading Two    Hover ... Read More

HTML canvas fillStyle Property

Arjun Thakur

Arjun Thakur

Updated on 12-Jun-2020 07:04:44

395 Views

The fillStyle() property of the HTML canvas is used to set the color or gradient or pattern for the drawing. The default is #000000. The element allows you to draw graphics on a web page using JavaScript. Every canvas has two elements that describes the height and width of ... Read More

HTML canvas clearRect() Method

Arjun Thakur

Arjun Thakur

Updated on 12-Jun-2020 06:57:42

1K+ Views

The clearRect() method in HTML canvas is used to clear the pixels in a given rectangle. The element allows you to draw graphics on a web page using JavaScript. Every canvas has two elements that describes the height and width of the canvas i.e. height and width respectively.Following is ... Read More

HTML

HTML cite Attribute

Arjun Thakur

Arjun Thakur

Updated on 11-Jun-2020 10:48:31

120 Views

The cite attribute of the element is used to set the source URL of a quote. The source won’t get displayed on the web page, but it is beneficial for the screen readers.Let us now see an example to implement the cite attribute of the element −Example Live Demo ... Read More

How do we include attributes for table columns in HTML?

Arjun Thakur

Arjun Thakur

Updated on 30-May-2020 22:14:08

253 Views

Use the tag to include attributes for table columns. The HTML tag allows authors to group together attribute specifications for table columns. It does not group columns together structurally -- that is the role of the element.The following are the attributes −AttributeValueDescriptionAlignrightleftcenterjustifycharDefines horizontal alignment, not supported in ... Read More

C# Program to get free space in a drive

Arjun Thakur

Arjun Thakur

Updated on 06-Apr-2020 11:01:50

540 Views

To get the free space in a drive, use the AvailableFreeSpace and TotalFreeSpace properties in C#.Firstly, set the name of the drive using DriveInfo −DriveInfo dInfo = new DriveInfo("D");Let’s say, you need to find the available space for D drive −Exampleusing System; using System.Linq; using System.IO; public class Demo { ... Read More

How to iterate over a C# list?

Arjun Thakur

Arjun Thakur

Updated on 02-Apr-2020 11:03:52

1K+ Views

Declare a list and add elements −var products = new List < string > (); // adding elements products.Add("Belts"); products.Add("T-Shirt"); products.Add("Trousers");Use a loop to iterate −foreach(var p in products) {    Console.WriteLine(p); }ExampleLet us see the complete example −using System; using System.Collections.Generic; public class Demo {    public ... Read More

Semaphore in C#

Arjun Thakur

Arjun Thakur

Updated on 01-Apr-2020 08:47:56

3K+ Views

The semaphore class lets you set a limit on the number of threads that have access to a critical section. The class is used to control access to a pool of resources. System.Threading.Semaphore is the namespace for Semaphore because it has all the methods and properties required to implement Semaphore.For ... Read More

Advertisements