Updated post here: https://codeyarns.github.io/tech/2019-05-12-vcxsrv-x-server-for-windows.html
Cygwin uses Unix paths. It can be sometimes confusing to figure out where in the Windows filesystem a Cygwin path is actually referring to. This is precisely why Cygwin ships with the cygpath tool.
- To print the Windows path of a Cygwin Unix path:
$ cygwin -w /some/unix/path C:\cygwin64\some\unix\path
- To print the Windows path of a Cygwin Unix path in a DOS-compatible path format:
$ cygwin -d /some/unix/path
- To find out how a Windows path can be accessed inside Cygwin as an Unix path:
$ cygwin -u "C:\Windows" /cygdrive/c/Windows
Clipdiary is a full featured clipboard manager for Windows.
- It can be installed it from here.
It does what any clipboard manager should: storing the previous clipboard entries as a list. You can pick any older clipboard entry and paste it back.
It adds on many keyboard shortcuts, which I don’t actually require. So, I delete all of them.
I like that if I minimize or close its window, it sticks around in the system tray. That is good default behavior for a clipboard manager.
It is a paid software, that you can try for 30 days. But, it is free for personal use if you register for a Personal License within 30 days. To do that go to Help → Activate Free.
Tried with: Clipdiary 5.1 and Windows 10
To find out the exact version of Windows you are using open the winver program. You can type this command at the Start menu or at the command prompt too. It opens up a dialog showing the Windows version and build number.
Tried with: Windows 10 Enterprise
I had installed Windows 10 successfully. While messing around with my other Linux partitions, a partition delete went awry and on booting I was dropped into a GRUB rescue prompt. What I wanted was the Master Boot Record to be restored to boot into Windows 10.
- On another computer, I downloaded a Windows 10 ISO and created a bootable Windows recovery USB disk as described here.
I booted with this USB disk, chose Troubleshoot -> Advanced Options -> Command Prompt.
At the command prompt, type these commands:
$ bootrec /rebuildbcd $ bootrec /fixmbr $ bootrec /fixboot $ exit
After restarting I was able to boot into Windows 10.
A USB thumb drive with Windows ISO on it can be used to install Windows newly or repair an existing installation of Windows. Such a bootable USB stick can be created easily on Ubuntu:
- Prepare the ISO of the version of Windows you want to install or use. For example, the Windows 10 ISO can be obtained here. If you are upgrading from a Windows 7 or 8, you can find out which version you are allowed to upgrade to here (check the Upgrade Editions section).
An easy tool to create an installer USB thumb drive for booting Windows is WinUSB. It can be installed from a PPA:
$ sudo add-apt-repository ppa:nilarimogard/webupd8 $ sudo apt-get update $ sudo apt-get install winusb
- Plug in your USB stick and use this command to make it a Windows installer:
$ sudo winusb --format /path/to/windows.iso /dev/sdc
Use the path to your ISO file and the device name of your USB drive instead of
/dev/sdc in the above command.
You should be able to boot up and install Windows using this USB stick.
Tried with: Ubuntu 16.04
A typical scenario in computer vision is to show multiple images in different parts of a single window, like a split window. However, OpenCV can only display a single
cv::Mat in a single window using
cv::imshow(). So, to achieve what we want, we create a single
cv::Mat whose size is equal to the window. We copy our multiple images into this mat at the locations we want and just display the big mat.
(Note that this is far easier than the ROI regions you would need to use with
This sample illustrates showing two
640x480 images side-by-side in a single window:
// 640x480 images cv::Mat mat_1; cv::Mat mat_2; // Create 1280x480 mat for window cv::Mat win_mat(cv::Size(1280, 480), CV_8UC3); // Copy small images into big mat mat_1.copyTo(win_mat(cv::Rect( 0, 0, 640, 480))); mat_2.copyTo(win_mat(cv::Rect(640, 0, 640, 480))); // Display big mat cv::imshow("Images", win_mat);
Tried with: OpenCV 2.4.8 and Ubuntu 14.04
If you work with lots of devices in Windows, you are sure to run into problems with device drivers. Sometimes, a particular version of a device driver might cause problems and removing it might be the only solution.
Using Device Manager
This is an easy removal method if you have the device and know that its driver is being used when the device is plugged in. For such a case, plug in the device and open Device Manager. Right-click on the device and choose Properties. In the Driver tab, choose Uninstall.
Using Driver Store Explorer
If you do not have the device or plugging it in causes problems, then the Driver Store Explorer (RAPR) can be used to remove the driver as described here.
Tried with: Windows 7 x64
A friend of mine was trying to install the EMTrade program on Windows 8.1. He was logged in as a standard user, but when the installer asked for administrator permissions using User Account Control (UAC), he provided the login and password of an administrator account. The installer proceeded to install, but failed while creating the
C:\Program Files\Emkay directory, with this error:
Feature transfer error File: C:Program FilesEmkay Access is denied
A few old installers for Windows still struggle with UAC. The EMTrade installer worked fine when I explicitly switched user, logged into an administrator account and installed from inside it.
Tried with: Windows 8.1
This is a useful command to empty the recycle bins of all users in Windows:
I find it especially useful when I want to empty recycle bin without switching user.
Tried with: Windows 7 x64