Monday, June 25, 2018

Removing outlook profile

Outlook giving error "Before deleting the e-mail account containing your personal mail, contacts, and calendar data, you must create a new location for your data", when trying to remove email account

I have tried this with Outlook 2016 in Windows 10


  1. Close Outlook if its running
  2. Start -> Run (or Win Key + R) -> outlook.exe /manageprofiles -> OK
  3. Click "Show Profiles" button and delete it
  4. Close window and start outlook
  5. Outlook should ask to create a new profile now
  6. Now you can enter your email address and configure outlook as normal


Wednesday, May 9, 2018

Setting a proxy for a standalone Microsoft .Net application

  1. Find the applications install location (or .exe location). If you are using a shortcut, you can right click, and check the properties to find this place.
  2. Locate your applications .config file. Typically this will be in the same folder as your .exe; For example, for myappname.exe, you should be able to see myappname.exe.config in the same directory
  3. Create one if there there is only not already present. Make sure to name it myappname.exe.config
  4. If creating a new file, Open the newly created file in notepad, and paste the below into it. Make sure to change proxyservernameproxyserverport in your environment
  5. if file already exists, add the defaultProxy section as shown below and save file
  6. Restart the application
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.net>
    <defaultProxy enabled="true" useDefaultCredentials="true">
      <proxy proxyaddress="http://proxyservername:proxyserverport/" bypassonlocal="false" usesystemdefault="false" autoDetect="false" />
    </defaultProxy>
  </system.net>
</configuration>


Adding a new resource to Microsoft High Availability Cluster

The following was tried on Windows Server 2012 R2

Here I am giving an example of a Service; you can start an application or a script or a multitude of options that comes with the cluster software

1.  Bring up the Failover Cluster Manager

1.Right click on computer, click manage
2.Select Tools à Failover Cluster Manager

2.  Adding Role

1.Expand down to Roles
2.From Right side, click Create Empty Role
3.“New Role” is created
4.Click on “New Role”
5.Select properties, and set Name as “My Service” or any name you prefer

3.  Adding your service

1.Right Click on newly created “My Service” Role
2.Pick Option “Add Resource”à Generic Service
3.Pick “Your Servie To Use” from list and click Next, Next and Finish

4.To Start the service, Right click again on “My Service” and select “Start Role”

Monday, December 11, 2017

Unity 3D Adding MouseLook from Standard assets gives error - The script needs to derive from MonoBehaviour

You get this error trying to add MoseLook from Assets\Standard Assets\Characters\FirstPersonCharacter\Scripts
Can't add script behaviour MouseLook. The script needs to derive from MonoBehaviour!

You can use the alternative SimpleMouseRotator from Assets\Standard Assets\Utility

Sunday, December 3, 2017

Adjusting vim window size for higher resolutions (ex: 4k monitors)

vim loads with a tiny window screen by default in a 4k monitor.



To fix,

  1. Pick a font with right size using Edit --> Select Font you like so the window looks nice. 
  2. Once the window looks good, use below to find the current font settings
  3. Press Shift and :
  4. Type in set gfn? and hit Enter
  5. You should see the current font setting. For example, I got guifont=Consolas:h10:cANSI:qDRAFT
  6. Press Shift and :
  7. Type in e $MYVIMRC and hit Enter
  8. You will now be eiditing your _vimrc file. In windows you can find this file in "C:\Program Files (x86)\Vim" assuming default vim installation options
  9. Note: You may not have permission to write this file. If this is the case, please launch with Admin privileges or open the file in your favorite text editor with Admin privileges
  10. Enter Line from (5) as the first line of the file after adding set to the front. Example set guifont=Consolas:h10:cANSI:qDRAFT
  11. Note: if there are spaces, make sure to add a slash \ just before it.  
  12. Save the file and restart it
My _vimrc after update below

Friday, December 1, 2017

C# how to initiate a List via constructor

Example of a string List initialization in one line below


//Create list strCollection and assign string A, B, C & D to it!
List<string> strCollection = new List<string>() { "A", "B", "C", "D" };


Convert C# foreach loop to process in parallel

Note: this is a C# 4.0 feature

The first loop run in a serial matter, and the second one parallel. First one is guaranteed output ABCD, but the second write these characters in a random fashion

List<string> strCollection = new List<string>() { "A", "B", "C", "D" };
// Process one at a time
foreach (string str in strCollection)
{
    Console.WriteLine(str);
}
// Process in parallel
System.Threading.Tasks.Parallel.ForEach(strCollection, str =>
{
    Console.WriteLine(str);
});


Turn on Windows 11 Fast Boot

If windows starting is slow, to enable windows 11 fast startup/boot,  Press Windows + R, type powercfg.cpl, and hit Enter.  This will direct...