Articles on Trending Technologies

Technical articles with clear explanations and examples

What are the pitfalls of the Price Earnings Ratio (P/E Ratio)?

Probir Banerjee
Probir Banerjee
Updated on 17-Sep-2021 607 Views

Not Cash EarningsThe biggest and, by far, the most prominent disadvantage of the P/E ratio is that the earnings it shows are the accounting earnings. These earnings are defined by the accounting standards of specific standards for a particular country. The earnings are not the cash earnings of the firm. In fact, many companies in the stock exchange report profits but gain no cash actually.Not Easy to Estimate the Value of a CompanyAnother problem with the P/E assumption is that the earnings stay the same for a considerable time in the future. So, if a company is trading at 10 ...

Read More

What is Standard Deviation of Return?

Probir Banerjee
Probir Banerjee
Updated on 17-Sep-2021 4K+ Views

Standard Deviation (SD) is a technique of statistics that represents the risk or volatility in investment. It gives a fair picture of the fund's return. It tells how much data can deviate from the historical mean return of the investment.The higher the Standard Deviation, the higher will be the ups and downs in the returns. For example, for a fund with a 15 percent average rate of return and an SD of 5 percent, the return will deviate in the range from 10-20 percent.Note − In SD, the ends of volatility are determined by adding and subtracting the average return ...

Read More

How to get (format) date and time from mill seconds in Java?

Maruthi Krishna
Maruthi Krishna
Updated on 07-Sep-2021 2K+ Views

The java.text.SimpleDateFormat class is used to format and parse a string to date and date to string.One of the constructors of this class accepts a String value representing the desired date format and creates SimpleDateFormat object.To format milli seconds to date −Create the format string as dd MMM yyyy HH:mm:ss:SSS Z.The Date class constructor accepts a long value representing the milliseconds as a parameter and creates a date object.Finally format the date object using the format() method.Exampleimport java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Sample {    public static void main(String args[]) throws ParseException {       long msec = 3550154;       //Instantiating the SimpleDateFormat class       SimpleDateFormat dateformatter = new SimpleDateFormat("dd MMM yyyy HH:mm:ss:SSS Z");       //Parsing the given String to Date object       Date date = new Date(msec);       System.out.println("Date value: "+dateformatter.format(date));    } }OutputDate value: 01 Jan 1970 06:29:10:154 +0530Exampleimport java.util.Calendar; import java.util.Date; public class Sample {    public static void main(String args[]) {       Calendar calendar = Calendar.getInstance();       long msec = calendar.getTimeInMillis();       Date obj = new Date(msec); ...

Read More

How to get the tags of the availability set using PowerShell?

Chirag Nagrekar
Chirag Nagrekar
Updated on 02-Sep-2021 205 Views

There are two ways to retrieve the availability set tags. Using the Tags property inside the availability tag and the second by using the Get-AzTag command.Before running this command make sure that you are connected to the Azure Cloud (if not use ConnectAzAccount) and proper azure subscription (Set-AzContext to set the Azure subscription).First, we will get the availability set properties and retrieve the tag property as shown below.$availablityset = Get-AzAvailabilitySet -ResourceGroupName MYRESOURCEGROUPAVAILABILITY -Name myAvailabilitySet $availablityset.TagsOutputTo get the tags using resource ID, we need to retrieve the resource ID using the Get-AvailabilitySet command.$availablityset = Get-AzAvailabilitySet -ResourceGroupName MYRESOURCEGROUPAVAILABILITY -Name myAvailabilitySet Get-AzTag ...

Read More

How to find the disk type of the Azure Availability set using PowerShell?

Chirag Nagrekar
Chirag Nagrekar
Updated on 02-Sep-2021 275 Views

There are two types of disks available in the Availability Set.Aligned − for the managed disks.Classic − for the unmanaged disks.To get the disk types of the availability set, we first need to retrieve availability set information and then we need to retrieve the SKU property which stores the disk typesBefore running this command make sure that you are connected to the Azure Cloud (if not use ConnectAzAccount) and proper azure subscription (Set-AzContext to set the Azure subscription)To get the availability set information, $availablityset = Get-AzAvailabilitySet -ResourceGroupName MYRESOURCEGROUPAVAILABILITY -Name myAvailabilitySet if($availablityset.Sku -eq "Aligned"){"Managed disk"} else{"Unmanaged disk"}Output

Read More

How to list the Azure VMs from the Availability set using PowerShell?

Chirag Nagrekar
Chirag Nagrekar
Updated on 02-Sep-2021 658 Views

To list the Azure VMs under the availability set, we can use the command as shown belowBefore running the command make sure that you are connected to the Azure Cloud (if not use ConnectAzAccount) and proper azure subscription (Set-AzContext to set the Azure subscription)$availabilitySetVMs = Get-AzAvailabilitySet -ResourceGroupName MYRESOURCEGROUPAVAILABILITY -Name myAvailabilitySetTo get the total number of Virtual machines in the availability set, PS C:\> $availabilitySetVMs.VirtualMachinesReferences.id.countOutputTo get all the VM names from the list, we can use the below command.$VMlist = Get-AzAvailabilitySet -ResourceGroupName MYRESOURCEGROUPAVAILABILITY -Name myAvailabilitySet $i=0 foreach($vm in $VMlist.VirtualMachinesReferences){    "VM{0}: {1}" -f $i, ($vm.Id.Split('/'))[-1]    $i++ }Output

Read More

How to get the fault domain count of the Azure Availability set using PowerShell?

Chirag Nagrekar
Chirag Nagrekar
Updated on 02-Sep-2021 292 Views

The fault domain in the Azure Availability set describes the VMs in the availability set that share the common Power, Storage, network switch, etc. If there is a failure in the fault domain then all the resources in the fault domain will become unavailable.Before running the command make sure that you are connected to the Azure Cloud (if not use ConnectAzAccount) and proper azure subscription (Set-AzContext to set the Azure subscription)$availablityset = Get-AzAvailabilitySet -ResourceGroupName ResourceGroupName -Name AvailabilitySetNameTo get the Fault domain countm$availablityset.PlatformFaultDomainCountOutput

Read More

How to open port for the Azure VM using Azure CLI in PowerShell?

Chirag Nagrekar
Chirag Nagrekar
Updated on 02-Sep-2021 2K+ Views

To open the specific port for the Azure VM using Azure CLI, we can use az vm open-port command. Before running this command, make sure that you are connected with the Azure Cloud account and the proper Azure subscription.To open port 80 we can use the below command.az vm open-port -n Win2k16VM1 -g testvmrg --port 80The above command will open port 80 on the VM win2k16vm1 and the resource group testvmrg.To open the port with the highest priority, you can add the --priority parameteraz vm open-port -n Win2k16VM1 -g testvmrg --port 80 --priority 100To open the port range, az vm open-port ...

Read More

How to list the azure VM extensions using Azure CLI in PowerShell?

Chirag Nagrekar
Chirag Nagrekar
Updated on 02-Sep-2021 1K+ Views

To list all the azure VM extensions using Azure CLI, we can use the “az vm extension” command.Before running this command make sure you are connected with the Azure cloud account and the Azure subscription. Once we run the command for the extension we need to provide the VM name and the resource group name as shown below.PS C:\> az vm extension list --vm-name Win2k16VM1 -g TESTVMRGThe output will be in the JSON format, we can use the parameter -otable to get the output in the table format.PS C:\> az vm extension list --vm-name Win2k16VM1 -g TESTVMRG -otableOutput

Read More

How to get all the available azure VM images using Azure CLI in PowerShell?

Chirag Nagrekar
Chirag Nagrekar
Updated on 02-Sep-2021 2K+ Views

To get all the available azure VM images using Azure CLI, you can use the command az vm image.The below command will retrieve all the available azure images in the marketplace.PS C:\> az vm image list --allThe above command will take some time to retrieve the output. To get the output into the table format, use the below command.PS C:\> az vm image list --all -otableTo retrieve the images from the particular location, use the -l or --location parameter.PS C:\> az vm image list -l eastus -otableOutputTo get the VM images from the specific publisher, PS C:\> az vm image ...

Read More
Showing 48251–48260 of 61,297 articles
Advertisements