Sunday, June 9, 2024

Changing Display Resolution on VM using PowerShell

 I had this issue with my automation script which needed 1920X1080 resolution on my VM to run my automation scripts. I searched a lot and came across this solution which worked for me and could be helpful to others.

1. The display settings module need to be installed. To install run the below command in PowerShell in admin mode

 Install-Module -Name DisplaySettings 

2. You can run any of the below commands to set the resolution

powershell -Command "Set-DisplayResolution -Width 1920 -Height 1080"

                      or

Set-DisplayResolution -Width 1920 -Height 1080


Note:- Display settings cannot be set for a remote machine by logging in hence i had to use commands to set it.

 

Tuesday, September 12, 2023

ADITYA L1

Aditya-L1 Mission

Aditya L1 is the first space based Indian mission to study the Sun. The spacecraft will be placed in a halo orbit around the L1 point of the Sun-Earth system, which is about 1.5 million kms from the Earth. A satellite placed at the L1 point has the advantage of continuously viewing the Sun without any interferences. This will provide a greater advantage of observing the solar activities and its effect on space weather in real time. 


The Aditya-L1 mission,  India's first space based solar observatory. It was launched in September and reached its target orbit on January 6, 2024. The spacecraft is placed in a halo orbit around the Sun-Earth system's Lagrange point 1, which is about 1.5 million kilometers from Earth. 

Sunday, August 27, 2023

Chandrayaan 3

 Proud to be Indian for all the great achievements in the Chandrayaan 3 project. 

Friday, July 14, 2023

how to open control center on iPhone with no home button.

Starting from iPhone X, Apple removed the home button. Also, the control Centre is not accessible by swiping from the bottom. You need to swipe down for the top right corner. To close Control Centre just swipe back up to push it off screen.










Monday, May 22, 2023

"askew" - an interesting word to search in google

 I just found an interesting fact I wanted to share. In google search if you type the word "askew" and hit enter, google will give you the meaning but the page will look slightly titled which is the meaning of the work.





Tuesday, February 7, 2023

EPPlus - null reference exception on accessing ExcelPackage object in C#

 Recently I was working on an issue for which I found a resolution, Wanted to share it here.

Issue

Using EPPlus package to manipulate an Excel file is throwing an error saying that the ExcelPackage object is null. While debugging when I hit the object it shows null. If I remove my cursor an hove back on it the object is loaded. This is happening with Excel files generated by code.

Resolution:  

The exception is caught and in the catch block, after a pause of 2 seconds, the ExcelPackage is called again which resolves successfully. This is just a work around for EPPlus version 4.5. I have seen that the issue was resolved in the later versions which are paid. Find the code snippet below.

try{

        ExcelPackage package = new ExcelPackage();

        var xlSheet = package.Workbook.Worksheets[1];

   }

catch(Exception e)

  {

        Thread.Sleep(2000);

        var xlSheet = package.Workbook.Worksheets[1];

 }

        

Thursday, January 19, 2023

Function Keys enable/disable on HP Laptops

I got a HP Elitebook laptop recently and initially I found it difficult using the function keys.

There is an option to lock the function key and you can use the functions by simply pressing the keys. Here is how you can do it.

Hold the function key and press Shift key above the function key. If you see the light glowing on the fn key, You can hit the fn keys directly to use the functions. To turn of you can follow the same process.