Create Table Header in HTML

Krantik Chavan
Updated on 27-May-2020 22:28:51

611 Views

Use the tag in HTML to create table header. The HTML tag is used in adding a header to a table. The thead tag is used in conjunction with the tbody tag and the tfoot tag in determining each part of the table (header, footer, body).The HTML tag also supports the following additional attributes −AttributeValueDescriptionalignrightleftcenterjustifycharDeprecated − Visual alignment.charcharacterDeprecated − Specifies which character to align text on. Used when align = "char"charoffpixels or %Deprecated − Specifies an alignment offset (either in pixels or percentage value) against the first character as specified with the char attribute. Used when align = "char"valigntopmiddlebottombaselineDeprecated − Vertical ... Read More

Display Subscripted Text in HTML

Chandu yadav
Updated on 27-May-2020 22:07:44

208 Views

Use the tag to create subscripted text. The HTML tag is used for defining subscript text like,x1+ x2ExampleYou can try to run the following code to display subscripted text in HTML −           HTML sub Tag               Value of x1 + x2 = 17    

Include Information About the Document in HTML

Prabhas
Updated on 27-May-2020 21:00:49

241 Views

Use the tag to include information about the document. The HTML tag is used for indicating the head section of the HTML document. Tags included inside head tags are not displayed in the browser window.ExampleYou can try to run the following code to include information about the document in HTML −           HTML head Tag               This is demo text.    

Find Sum of First N Natural Numbers in C++

Ayush Gupta
Updated on 27-May-2020 09:39:58

426 Views

In this tutorial, we will be discussing a program to find sum of first n natural numbers.For this we will be provided with an integer n. Our task is to add up, find the sum of the first n natural numbers and print it out.Example Live Demo#include using namespace std; //returning sum of first n natural numbers int findSum(int n) {    int sum = 0;    for (int x=1; x

Use the ErrorAction Parameter in PowerShell

Chirag Nagrekar
Updated on 27-May-2020 09:32:39

11K+ Views

Like ErrorActionPreference variable, ErrorAction parameter works similarly. ErrorAction parameter supported in Advance functions and most of the built-in cmdlets in PowerShell. It is useful to convert the non-terminating error to the terminating error and then you can handle them with try/catch blocks.Supported Values and Examples, Continue − This is the default value of the ErrorAction parameter and Error will be displayed and commands listed in Pipeline will be executed further.Get-WmiObject -Class Win32_Logicaldisk -ComputerName Nonexist -ErrorAction Continue Write-Host "`nHello World" -BackgroundColor DarkGreenOutput Get-WmiObject : The RPC server is unavailable. At line:1 char:1 + Get-WmiObject -Class Win32_Logicaldisk -ComputerName Nonexist -ErrorA ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... Read More

Use the ErrorActionPreference Variable in PowerShell

Chirag Nagrekar
Updated on 27-May-2020 09:30:49

7K+ Views

ErrorActionPreference variable in PowerShell is to control the non-terminating errors by converting them to terminating errors. Error handling depends upon which value you assign to $ErrorActionPreference variable.The values are as below.Continue − This is the default value of the variable and when the error occurs, an error is displayed in the PowerShell console, and the script continues the execution.Get-WmiObject -Class Win32_Logicaldisk -ComputerName Nonexist Write-Host "Hello World"Output Get-WmiObject -Class Win32_Logicaldisk -ComputerName Nonexist Write-Host "Hello World" Get-WmiObject : The RPC server is unavailable. At line:2 char:1 + Get-WmiObject -Class Win32_Logicaldisk -ComputerName Nonexist + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException + FullyQualifiedErrorId ... Read More

Terminating and Non-Terminating Errors in PowerShell

Chirag Nagrekar
Updated on 27-May-2020 09:27:29

2K+ Views

Powershell generates two types of errors when it executes script or commands. Terminating errors and Non-Terminating errors.Terminating error − This error generated by script, functions, or commands you create and it stops or halts the execution of the script so that the commands in the next lines can’t be executed. To handle this error proper mechanism is needed otherwise there would be an error message displayed.For example, PS C:\WINDOWS\system32>> This-commandnotexist This-commandnotexist : The term 'This-commandnotexist' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path ... Read More

Use of Error Variable in PowerShell

Chirag Nagrekar
Updated on 27-May-2020 09:25:09

3K+ Views

Error variable in PowerShell is to view the errors generated in the current PowerShell session. We can say that the $Error variable is the container that stores all the errors and the latest error will be displayed first. For the example below, we will set the $Errorview to Category view to minimizing the error display content. By default $ErrorView is a Normal view.$ErrorView = "Categoryview"Now we will see the $error variable example, PS C:\WINDOWS\system32> asdds ObjectNotFound: (asdds:String) [], CommandNotFoundException PS C:\WINDOWS\system32> Get-process asddsd ObjectNotFound: (asddsd:String) [Get-Process], ProcessCommandExceptionHere, there is one wrong command and one wrong input we have written so ... Read More

Use of LastExitCode and Variable in PowerShell

Chirag Nagrekar
Updated on 27-May-2020 09:24:41

6K+ Views

$LastExitCode in Powershell is the number that represents the exit code/error level of the last script or application executed and $? (Dollar hook) also represents the success or the failure of the last command. In general, both represent the same but the output method is different. The first command output is in the Number format (0 and 1) and the latter command is for Boolean (True or False) output.For example, PS C:\WINDOWS\system32> $LASTEXITCODE 0 PS C:\WINDOWS\system32> $? TrueAs you see the output, 0 represents the success status of the $LastExitCode command and $True for the $?.Now if the command doesn’t ... Read More

Data Stream as Disjoint Intervals in C++

Arnab Chakraborty
Updated on 27-May-2020 06:27:14

258 Views

Suppose we have a data stream input of integers, these are like a1, a2, ..., an, ..., we have to summarize the numbers seen so far as a list of disjoint intervals. For example, suppose the input integers are 1, 3, 8, 2, 7, ..., then the summary will be −[1, 1][1, 1], [3, 3][1, 1], [3, 3], [8, 8][1, 3], [8, 8][1, 3], [7, 8].To solve this, we will follow these steps −Make a set called numsin the initializer, set low := -inf and high := infFrom the addNum method that takes num as input, insert num into the ... Read More

Advertisements