We can adjust the width and height of an iframe by using CSS to set the dimensions. This can be done by setting the width and height properties to a specific value or to a percentage of the parent container. Additionally, we can use JavaScript to dynamically adjust the dimensions based on the content within the iframe. The term iframe is short for Inline frame. Here are the possible approaches − Using JavaScript You can use JavaScript to adjust the width and height of an iframe to fit its content. This can be done by getting the element of the ... Read More
To create a multi-line text input, use the HTML tag. You can set the size of a text area using the cols and rows attributes. It is used within a form, to allow users to input text over multiple rows.Here are the attributes of tag −AttributeValueDescriptionautofocusautofocusSpecifies that on page load the text area should automatically get focus.ColsnumberSpecifies the width of the textarea based on the number of visible character widths.DisableddisabledSpecifies the width of the textarea based on the number of visible character widths.formform_idSpecifies one or more forms.maxlengthnumberSpecifies the maximum number of characters in textarea.NametextAssigns a name to the ... Read More
We are given with the n number of processes i.e. P1, P2, P3, ..., Pn and their corresponding burst times. The task is to find the average waiting time and average turnaround time using FCFS CPU Scheduling algorithm.What is Waiting Time and Turnaround Time?Turnaround Time is the time interval between the submission of a process and its completion.Turnaround Time = completion of a process – submission of a processWaiting Time is the difference between turnaround time and burst timeWaiting Time = turnaround time – burst timeWhat is FCFS Scheduling?First Come, First Served (FCFS) also known as First In, First Out ... Read More
Structure is a collection of different datatype variables, grouped together under a single name.Features of structureThe features of structure in the C programming language are as follows −It is possible to copy the contents of all the structure elements of different datatypes to another structure variable of its type by using an assignment operator.For handling the complex datatypes, it is better to create structure within another structure, which is called nested structures.It is possible to pass an entire structure, individual elements of structure and an address of structure to a function.It is possible to create structure pointers.Declaration and initialization of ... Read More
You can pass arrays to a method just like normal variables. When we pass an array to a method as an argument, actually the address of the array in the memory is passed (reference). Therefore, any changes to this array in the method will affect the array.Suppose we have two methods min() and max() which accepts an array and these methods calculates the minimum and maximum values of the given array respectively:Example Live Demoimport java.util.Scanner; public class ArraysToMethod { public int max(int [] array) { int max = 0; for(int i=0; imax) { ... Read More
Headings are the titles or subtitles of the content that you want to display on the web page. Headings help us to get an idea of the content on the web page. Headings and subheadings represent the key concepts ideas and supporting ideas in the content of the web page. HTML have a different level of heading tags. Heading is defined with to tags. It is important to use headings to show the HTML document structure. headings should be used for main headings, followed by headings, then , and so on up to . Heading tags ... Read More
Routers are networking devices operating at layer 3 or a network layer of the OSI model. They are responsible for receiving, analysing, and forwarding data packets among the connected computer networks. When a data packet arrives, the router inspects the destination address, consults its routing tables to decide the optimal route and then transfers the packet along this route.Features of RoutersA router is a layer 3 or network layer device.It connects different networks together and sends data packets from one network to another.A router can be used both in LANs (Local Area Networks) and WANs (Wide Area Networks).It transfers data ... Read More
To merge table columns in HTML use the colspan attribute in tag. With this, merge cells with each other. For example, if your table is having 4 rows and 4 columns, then with colspan attribute, you can easily merge 2 or even 3 of the table cells.ExampleYou can try to run the following code to merge table column in HTML. Firstly, we will see how to create a table in HTML with 3 rows and 3 columns table, th, td { border: ... Read More
The DateTime.Compare() method in C# is used for comparison of two DateTime instances. It returns an integer value, 0 − If date1 is later than date2SyntaxFollowing is the syntax −public static int Compare (DateTime d1, DateTime d2);Above, d1 and d2 are the two dates to be compared.ExampleLet us now see an example to implement the DateTime.Compare() method −using System; public class Demo { public static void Main(){ DateTime d1 = new DateTime(2019, 11, 20, 6, 20, 40); DateTime d2 = d1.AddYears(5); Console.WriteLine("Initial DateTime = {0:dd} {0:y}, {0:hh}:{0:mm}:{0:ss} ", d1); ... Read More
Here is the program to convert a string to uppercase in C language,Example Live Demo#include #include int main() { char s[100]; int i; printf("Enter a string : "); gets(s); for (i = 0; s[i]!='\0'; i++) { if(s[i] >= 'a' && s[i] = 'a' && s[i] = 'A' && s[i] = 'A' && s[i]