Posts

Featured post

HTML table Tag

Image
HTML table allows us to represent the data in row and column form.  Define an HTML Table <table> tag is used to create table along with <tr> , <td> and <th> for table rows, columns and header respectively. <table> tag attributes: caption : This is used to give a name to the table. e.g. <caption>My Table</caption> border : This attribute is used to give the border to the table. It has values in pixels. bordercolor : This is used to give the color to the border. e.g. bordercolor="color_name" align : This is used to set the alignment of the table i.e. left, right and center. Example: <table border="2" bordercolor="red" align="center"> <caption>Students</caption>>      <tr>           <th>S.No.</th>           <th>Name</th>      </tr>      <tr>           <td>1.</td>           <td>Rohit</td>      </tr>      <tr

HTML video Tag

Image
How to add video to your HTML web page HTML provides <video> tag to embed video in your web page. It's a paired tag so you need to add both opening and closing video tags. Within video tag, <source> tag is used to provide source of video using src attribute. type attribute specifies type of video file. Example: <video> <source src="nature.mp4" type="video/mp4"> </video> This tag is compatible with MP4, WebM, and Ogg file types. To avoid video codecs and browser compatibility issues, it's best that you add multiple sources to the video. If the browser cannot show the video, it will display the text you write between them. <video> Tag Attribute: controls specifies whether the video should have player control buttons (play, pause, volume, etc.). <video controls > <source src="nature.mp4" type="video/mp4"> </video> poster  specifies whether a certain image will be shown while the video is

HTML | Frameset Tag | Attributes

Image
In our previous blog  Frameset Tag , we already learnt about Frameset tag and its 2 attributes - cols and rows. Here we will learn about few more attributes: bordercolor :               With this attribute, you can specify color of border between frames.           example :              <html>      <frameset cols="20%,30%,*" bordercolor=Red> <frame src="frame1.html"> <frame src="frame2.html"> <frame src="frame3.html">      </frameset>           </html>          Output : frameborder  :             With this attribute, you can specify whether border between frames should displayed or not.               It can take 2 values,  0 - No border 1 - Border                          example :           <html>      <frameset cols="20%,30%,*" bordercolor=Red frameborder=0> <frame src="frame1.html"> <frame src="frame2.html"> <frame src=&qu

10 essential Windows keyboard shortcuts that will make you forget your mouse

Image
Basic Windows keyboard shortcuts Ctrl+Z: Undo No matter what program you’re running, Ctrl+Z will roll back your last action. Whether you’ve just overwritten an entire paragraph in Microsoft Word or deleted a file you didn’t mean to, this one is an absolute lifesaver. Ctrl+W: Close Another shortcut that works just about everywhere, Ctrl+W will close down whatever you’re viewing. Shut that File Explorer window, browser tab. Ctrl+A: Select all This command lets you highlight all the text in a document or select all the files in a folder. Hitting Ctrl+A can save you time you’d otherwise spend clicking and dragging your mouse. Windows shortcuts for navigation Win+D: Show or hide the desktop This keyboard combo minimizes all your open windows, bringing your home screen into view. Win+Tab: Open the Task view This shortcut lets you switch apps. Win+M: Minimize all windows. This shortcut lets you minimize all open apps. Ctrl+Esc: Open the Start menu If you’re using a keyboard that doesn’t have

Error Handling in PowerShell

Image
A good practice while working on any script is to have a mechanism for error handling. Though it may take a little bit of additional time, its rewards are priceless. Before moving to Error handling in PowerShell, first go through what type of errors we may encounter. Error Types There are two types of errors that can be occurred during script execution.  Terminating  Non-terminating  As the name implies, terminating error will stop the program from further execution, whereas a non-terminating error will not stop the execution. An example of terminating error would be a syntax error whereas an example of non-terminating error would be file/path not found. Terminating errors can be caught and handled while Non-terminating errors cannot be caught by try-catch block. Examples:  Terminating error: Script execution halted when error occurred. Non-terminating error:  Write-Host "Still running" executed even after error occurred. Convert Non-terminating errors into Terminating       

How to generate a GUID in PowerShell

Image
 If you ever need a unique id in your script, you can create GUID (globally unique identifier) In PowerShell 4.0 and earlier you can use [guid] class with its static method. In PowerShell 5.0 and later, you can use New-Guid cmdlet: You can use Get-Member to know its object type. You can also store GUID into a variable like below If you want to get GUID as string, use ToString  method or Guid  property. Both return output of string type, you can verify this using Get-Member .

How to Clean Up PowerShell Script Variables without Restarting PowerShell ISE

In this tutorial, we will see how to clean up variables and modules in PowerShell ISE without restart. PowerShell ISE and Variables values PowerShell ISE does not automatically cleanup it’s variable between manual runs of a script. Due to this, results doesn't came out as we expected. Run below command to clear all variables stored in the session. Remove-Variable * -ErrorAction SilentlyContinue This will take care of clearing all stored variables so we can be sure, script will not inherit any value from a previous run. PowerShell ISE Errors and ModulesPermalink Issue which we face due variable retains value from previous run, can happen with Error buffer also, which can be cleared with the below command. $error .Clear() We can also remove any module loaded by our script with the below command Remove-Module *

How to Import and Export Delimited Files, like CSV, in PowerShell

Image
In this tutorial, we will see how we can use PowerShell to import and export CSV file's data. Managing CSV Files using Import/Export-CSV in PowerShell We have two important cmdlets import-csv/export-csv which are widely used while working with CSV. Before moving to how to manage these type of files, First look at what is CSV file: A Comma Separated Values ( CSV ) file is a plain text file that contains a list of data. These files are often used for exchanging data between different applications. For example, databases and contact managers often support CSV files. A CSV file has a fairly simple structure. It’s a list of data separated by commas as you can see in below screenshot. We have file "email.csv" having email address and name separated by comma. You can use notepad/excel to open thses file. Now lets move back to our main topic, how to manage csv files with PowerShell.  Reading CSV Files with Import-Csv Importing of csv file is pretty straight forward. First move to

PowerShell Arithmetic Operators

Image
In this tutorial we will see about PowerShell Arithmetic Operators and how PowerShell is dealing with them. Arithmetic operators are used to perform numeric calculations. As well as numeric calculations, the addition operator may also be used with strings, arrays, and hashtables. Multiplication operator may also be used with strings and arrays. Below is the list of PowerShell arithmetic operators. Operator Description Example + Adds numeric values 4 + 6 concatenates a string, arrays, and hash tables “CS” + “Tutorials” – Subtracts numeric values 4 – 2 Makes a number negative -98 * Multiple numeric values 4 * 2 copy string, arrays to the specified number of times “!” * 4 / Divides numeric values 4 / 2 % Gives remainder after division 7 % 3 For live demo, watch below video. I have demonstrated the use of PowerShell arithmetic operators by  creating calculator. Along with operators, Switch statement and While loop also used.  

Which HTML tag is used to give strikethrough effect to text?

 Two HTML tags are available to give strikethrough effect to text. 1. <s> The   <s>   tag specifies text that is no longer correct, accurate or relevant. The text will be displayed with a line through it. For example, you have seen product prices strike out during Sale period to reflect discounted price. Sale Price Rs. <s>100</s> 80 Output: Sale Price Rs. 100 80 2.  <del> <del> tag also works in same manner. Sale Price Rs. <del>100</del> 80 Output: Sale Price Rs. 100 80