https://stackoverflow.com/questions/8711109/could-not-find-module-findopencv-cmake-error-in-configuration-process
Mostly work related stuff which I would've entered into my "Log book". Instead of hosting it on an intranet site, outsourcing the hosting to blogger!
Saturday, February 29, 2020
Could not find module FindOpenCV.cmake
https://stackoverflow.com/questions/8711109/could-not-find-module-findopencv-cmake-error-in-configuration-process
Wednesday, February 26, 2020
remmina and RDP to Windows 10
https://remmina.org/how-to-install-remmina/
First tried installing flatpak - that failed. Then went the ppa route, success.
Found the procedure to transfer files via RDP, by Edit connection, Share folder, and also choosing sound as local, file transfers were quite slow, 27 seconds for 7 MB in my case - 4 seconds per MB. For me, with Azure, it was faster to use wetransfer.com - faster than 1 MB / sec upload at my end, 10 sec to download a 200 MB file to the Azure VM.
Timezone bug in our code
PB corrected our schedule page code which was showing Australia NSW as GMT +10 instead of +11. Copy-pasting his solution -
The countries which have DST spanning across the years have this issue. (Found 4 such countries) ...
I have set the dstStartMonth to January of this year as a temporary solution. ...
($curMonth == $dstStartMonth && $curDay >= $dstStartDay) ||
($curMonth == $dstEndMonth && $curDay <= $dstEndDay))
$offsetGmt= $offsetDst;
($curMonth < $dstStartMonth && $curMonth < $dstEndMonth && $dstStartMonth > $dstEndMonth) ||
($curMonth == $dstStartMonth && $curDay >= $dstStartDay) ||
($curMonth == $dstEndMonth && $curDay <= $dstEndDay))
$offsetGmt= $offsetDst;
Tuesday, February 25, 2020
enabling https for our dl domain also
The Listen Now feature, which uses playlists with http links to mp3 files, was not working on Chrome. Enabled https on our dl domain also as I'd done for our main domain, with self-signed certificates and proxying on cloudflare. Turns out I had already edited /etc/apache2/sites-enabled/ourdldomain.tld-ssl.conf
Only needed to do
a2ensite ourdldomain.tld-ssl
service apache2 reload
Once https was working for the mp3 links, the Listen Now feature started working again.
And the workaround for the streams (which are only http at the moment) not working on Chrome might be to use the direct links to stream URLs like http://ourstream.tld:8002/ with a _target=”_blank” attribute to open them in new windows or tabs.
Monday, February 24, 2020
streaming mp3s over secure HTTP - HTTPS
Thursday, February 20, 2020
a tale of two cities
- https://hnsws.blogspot.com/2017/09/updated-budget-airline-flying-experience.html
- http://hnsws.blogspot.com/2007/01/flying-air-deccan.html
build issues with appveyor
https://github.com/hn-88/ViewportSavercWin64/blob/master/appveyor.yml
https://github.com/hn-88/ViewportSavercWin64/blob/master/ViewportSaverc.vcxproj
building Windows binaries on the cloud - AppVeyor instead of Azure
https://medium.com/@rafique82.ai/azure-virtual-machine-visual-studio-platform-image-not-found-4234fe058317
Instead of trying to troubleshoot this, since this is available only for a year, thought of CI tools like Travis, but for Windows. Googling found that AppVeyor was more stable for Windows CI.
Googling the docs and support forums, finally got a project using QHY camera SDK and OpenCV to build - the appveyor.yml gives the detailed syntax.
https://github.com/hn-88/ViewportSavercWin64/blob/master/appveyor.yml.
I also needed to tweak the paths in the project file, in this case set using a property page qhy.props, to match the values set in the yml file.
Wednesday, February 19, 2020
deployment issue for Visual Studio VM image in Azure
az vm image list --all --sku vs-2019-comm-latest-win10-n
Tuesday, February 11, 2020
using Visual Studio on Windows 10 virtualbox image
- Visual Studio 2019 Community edition - 20 GB download from Microsoft.
- On my system, 45 minutes to unzip the file, since I was using a 3 TB USB external drive which was not very fast.
- Then 45 minutes to import the OVA file into virtualbox.
- More downloads and installs - the default Visual Studio 2019 does not have the 'develop for desktop' SDK and tools needed for C++ console apps - 45 minutes more.
- Spent quite a while troubleshooting why the shared folders were not visible in Win10 - turns out that sharing and discovery is turned off by default, have to enable them in Network and Sharing from the control panel.
- Finally it turns out that projects which need earlier versions of the toolkit - like Spinnaker SDK which needs the VS2015 toolkit - won't work, complaining that the required SDK is not found. Even downloading the oldest available SDK shown for install doesn't solve the problem. Further, lots of errors with QHYCCD SDK, like
1>J:\qhy\include\stdint_windows.h(28,1): error C2144: syntax error: 'signed char' should be preceded by ';' 1>J:\qhy\include\stdint_windows.h(28,21): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>J:\qhy\include\stdint_windows.h(70,26): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>J:\qhy\include\stdint_windows.h(70,19): error C2146: syntax error: missing ';' before identifier 'int64_t' 1>J:\qhy\include\stdint_windows.h(71,28): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
- So now I'm trying the VS2015 DVD download, which is another 7.1 GB, 90 minutes.
- Edit - update - 45 minutes to uninstall VS 2019.
- Three hours forty-five minutes !! to install VS2015 from virtual DVD drive in virtualbox.
- Then the projects compiled without too much trouble, as "Win32 console project" though I was compiling it for an x64 Release target. Will probably upload the project and solution files, along with the property pages which I created, to the github repo.
- Just like Windows on underpowered machines, the virtualbox Win10 takes around 2 minutes to boot, around a minute to shut down, around 5 seconds after a click in order to start opening an app, and so on. On my configuration, just 2 GB RAM for the virtualbox, and it runs from an external USB drive. But things do get done.
Monday, February 10, 2020
steps to create ebook friendly pdf file from LaTEX
https://www.overleaf.com/learn/latex/Questions/How_do_I_adjust_the_font_size%3F
https://tex.stackexchange.com/questions/402009/exam-with-18pt-main-font
in my case, by adding the line
\usepackage[14pt]{extsizes}
and later
\documentclass[
14pt
etc.
And afterwards, needed to resize some figures to make them fit in the smaller page size, and also make text tiny in tables to make them fit.
https://tex.stackexchange.com/
\centering
\tiny
\begin{tabular}
aborted attempt to create html / doc / rtf file from LaTEX
latex2rtf was easy to install with apt-get install, but it aborted the conversion with Error! Could not find <\end{refsection}>.
htlatex - gave a few errors, which were corrected by installing the required packages as below. But the final output html still had jumbled equations. Not prettily bitmapped ones. In short,
texlive-latex-base
sudo apt-get install texlive-fonts-recommended
self-publishing a book
- Interestingly, both experiences were quite quick and easy.
- Lambert charges nearly 10 times more, but do worldwide distribution. Notion Press does India-only distribution, but will do worldwide if you buy 50 author copies. Which comes to nearly the same amount of money as buying 3 copies from Lambert!
- Both publishers accepted the print-ready PDF from overleaf. Lambert sized the page down to fit, from US letter to 5.5 x 8.5 inches. Notion Press wanted US letter size. Notion Press cover designer was quite nice.
- Notion Press online sales page at notionpress.com/store/ was much more polished than Lambert's morebooks.shop
- Ebook publishing with Kindle Direct Publishing, or with Draft2Digital and so on - did not work, since the equations in my pdf did not convert correctly from pdf to epub / mobi with their online tools. But text only content in doc/rtf format works fine with their tools.
- The recommended way to create epub / mobi was via tools to convert to html or rtf first, but the tools stuttered and I did not pursue it further. Details in another post.
- Finally just created a pdf file with A5 size, which is reasonably well formatted to read on a Kindle or other ebook reader, as detailed in another post.
Friday, February 07, 2020
multipe displays with old macbook pro, manual mode setting
Ubuntu 18.04 - the mirroring option was not visible on the Display applet. But as per this page, was able to hit Command+p and mirror. Unfortunately, the mirroring did not automatically choose a supported resolution, so display was garbled on built-in display.
On MacOS, interestingly enough, neither the TV nor an older VGA monitor could be displayed - enabling the secondary display caused the OS to crash (or at least blank the display completely).
A detailed post on how to set desired modes:
https://unix.stackexchange.com/questions/227876/how-to-set-custom-resolution-using-xrandr-when-the-resolution-is-not-available-i