Skip to main content

Posts

32 bit and 64 bit system files in Windows

The windows operating system stores both 32 bit and 64 bit system files under seperate folders.  Because 64 bit OS needs to be able to run 32 bit programs without confusing them with new paths, some paths are redirected to different folders depending on whether a 32 bit or 64 bit application looks at them. The same applies to some registry keys.  Basically, if you open explorer (which is a 64 bit program), you will see these folders: C:\Windows\System32 << your 64 bit system folder C:\Windows\SysWOW64 << your 32 bit system folder (Yes, the numbers appear to be exactly the other way round, looks like someone at Microsoft was trying to be funny!) However: When a 32 bit program, such as Atom, looks at your Windows folder, it will see these folders instead: C:\Windows\System32 << your 32 bit system folder ( !!! ) C:\Windows\Sysnative << your 64 bit system folder This ensures that under the path C:\Windows\System32 , all a...

Solving PyCharm bug: "Python helpers are not copied yet..."

I have been using PyCharm Professional to run and debug Python code from my Windows machine to a remote Linux device. There are some other tools available for the same purpose (e.g. Python Tool for Visual Studio 2017). But in my opinion, PyCharm Professional stands out among its counterparts as it comes with a "All Batteries Included" setup. Once you configure remote Python interpreter in PyCharm, then it works out of the box. However, today after upgrading to PyCharm Professional 2018.2.1, I could not run my Python script on remote device. The execution always failed with below error - "Error running 'hello': Python helpers are not copied yet to the remote host. Please wait until remote interpreter initialization finishes." To solve this issue, I had to remove the ".pycharm_helpers " folder from the remove device and then restart PyCharm so that the folder is re-created and files are copied again. Here are the steps with comma...

Installing Docker on Azure (Linux) Virtual Machine

Step 1. Update the apt package index: sudo apt-get update Step 2. Install packages to allow apt to use a repository over HTTPS: sudo apt-get install \     apt-transport-https \     ca-certificates \     curl \     software-properties-common Step 3. Add Docker’s official GPG key: curl -fsSL https://download.docker.com/ linux/ubuntu/gpg | sudo apt-key add - Step 4. Set up the stable repository (command depends on system architecture): sudo add-apt-repository \     "deb [arch=amd64] https://download.docker.com/ linux/ubuntu \     $(lsb_release -cs) \     stable" Step 5. Update the package index again: sudo apt-get update Step 6. Install the docker-ce package (the service should start automatically after installation): sudo apt-get install docker-ce Step 7. Verify that docker installed properlty: sudo docker run hello-world

Solving SSH connection issue with Linux Virtual Machine in Azure

I created a Linux Virtual Machine in Azure, but connecting to it through SSH was a real nightmare. I was always getting the below error - "Permission denied (publickey)."  After lot of googling, binging and shooting in the dark, this is how I fixed the problem: Create a new ssh key by running below command.            PS: Do not change the default name or path of generated ssh key.           ssh-keygen -t rsa -b 2048           Generating public/private rsa key pair.           Enter file in which to save the key (/c/Users/<Username>/.ssh/id_rsa):           Enter passphrase (empty for no passphrase):           Enter same passphrase again:         ...

Customized Crosshair with OxyPlot charting library

I am using Oxyplot to draw heatmap for a WPF project and needed to draw a crosshair that moves according to user clicks. Since I couldn't find any good example or documentation on the topic, I made a small hack by using LineAnnotations and by over-riding Oxyplot mouse click event. Here is the sample code using WPF with MVVM pattern- MainWindow.xaml <Grid>         <oxy:Plot x:Name="CrossHairPlot">             <oxy:Plot.Axes>                 <oxy:LinearAxis Key="MyXAxis" Position="Bottom" IsZoomEnabled="False"/>                 <oxy:LinearAxis Key="MyYAxis" Position="Left" IsZoomEnabled="False"/>                 <oxy:LinearColorAxis Key="...

Sharing a folder from Windows 10 host to Ubuntu in Virtual Box

1. First things first! Make sure that you have the latest VirtualBox Guest Additions installed. There are two ways to install it     a. From Ubuntu Desktop Menu Option: Start your VM and select " Devices > Insert Guest Additions CD image ..."     b. From command line with sudo permissions: Execute "VBoxLinuxAdditions.run" file. In my case, it was under path - "/media/VBox_Gas_5.2.6".     sudo /media/VBox_Gas_5.2.6/VBoxLinuxAdditions.run   2. Now share the folder between Windows 10 Host and Ubuntu Guest     a. Create a directory in Windows on any location of your choice.     b. In the VirtualBox, go to the settings of the Ubuntu Guest.     c. Under the Shared Folder section, add the location of you folder created with full permission.     d. Start the ubuntu guest and add your user to the vboxsf group:      sudo usermod -aG vboxsf $(whoami)   ...

How to run Firefox after installing Windows 10 creators update

I updated my Windows machine to use creator update and among other surprises, Firefox suddenly stopped to run. It was shown in the Task Manager, but I didn't see anything in Taskbar and the browser wouldn't open. Finally, I found the fix from the below link. This easy solution helped me to get the Firefox app running back again in no time. [Fix] How to run Firefox after installing Windows 10 creators update Here is the summary of needed steps - 1. On the Windows Explorer, go to address bar and type: %appdata%\Mozilla and press enter key. This will take you to the Mozilla folder in AppData folder where additional data and information regarding user program settings and preferences are stored. 2. Once you are inside the Mozilla folder, head to the address bar again and click the “Roaming” word. Doing this will take you the the upper level directory which contains the Mozilla folder. 3. Once in the Roaming folder, go and delete the Mozilla folder. Deleting the Mozilla f...