Coding with Titans

so breaking things happens constantly, but never on purpose

libcurl via Visual Studio 2017

I really like development in Visual Studio even if I have a feature to implement for other platforms. And anytime I can I try to continue this experience. Period. This time I had a pleasure to wrap several HTTPS calls using libcurl. But how to make it run on my x64 Windows machine? There is some info on StackOverflow.com, what can be moved to VS2017 in following steps: Start VS2017 console: "%ProgramFiles(x86)%\Microsoft Visual Studio 14. Read more →

Change encoding of a string

Lastly I have shown how to enforce encoding of strings in DBF table by setting up code-page inside its header. I also mentioned it was the easiest way. That’s still true. But sometimes there is no room to be polite and things need to be done little messy in the code (for example when the DBF file is often recreated by 3rd-party tool an can be altered in any way). So each time the string value is loaded try to recover it with those steps. Read more →

DBF and language code-page

Recently I had a problem importing data from a 10-years-old set of DBF tables. All was fine until it came to reading texts with polish diacritic marks. It worked fine on 9 out of 10 machines, all with identical configurations (or at least I had hoped they are identical and couldn’t find any differences - Windows 7 x64 PL, .NET 4.5.2, the same regional options). On that single one all special letters got converted into some eye-hurting characters and looked purely wrong. Read more →

Quoted boundary is sometimes not acceptable

In my recent post I have shown, how to track web requests issued against remote server I don’t have a control over. Curious reader could ask at this point – but what have I broken this time? And the answer is as usual – personally did nothing wrong, I was just doing my job. I had to port some HTTP related code from using Windows Runtime-specific HttpClient (i.e. Windows.Web.Http.HttpClient) to also work outside the sandbox on a regular . Read more →

Tracing a HTTP request on mobile

Usually it’s not a big deal, when a HTTP request to a remote server is not working on a desktop Windows machine. There are plenty of useful tools, that could help in the process: one, which work like a proxy and dump the whole traffic, that we might be interested in (Fiddler would be the best example here) others, that interact with the TCP/IP stack itself and look much deeper for sent packets (like WireShark or Microsoft Message Analyzer - unfortunately retired as of 2020-01-20). Read more →

Minimizing size of VHD on Windows

Virtual hard-drives used by virtual systems running under Hyper-V on Windows 8 Pro (or later) can very quickly become extremely huge in size. Thankfully there is a nice and easy procedure that I always use to minimize and compact them, which presents as following: Turn on the system, that is going to be optimized and log in. Clean the trash bins, clean temp folders and remove all other unneeded stuff from the system drive (like: old system restore points), turn off hibernation and finally turn off or reduce the size of paging file. Read more →

GiT Cheat Sheet – Commands

GiT is a marvelous tool. It’s like a developer’s tool shaped into Swiss knife. It pays back to have it, yet you still need a bit of training not to make yourself hurt (like lose whole day’s work!). Or most importantly training to know, what is the command’s name for the task you are going to do. Those commands are not very obvious, somehow Mercurial and SVN did a better job here, that’s why I am providing my own list in this short tutorial. Read more →

GiT Cheat Sheet – Split my repository

Internet is full of tutorials about git usage, so here is mine too. But instead of showing basic, I wish to present the solution for an advanced problem, that I personally fight from time to time. I hope this could be valid and could also save your day! The Problem. My project’s repository became so big I noticed some components that could be turned into a separate libraries and used elsewhere either. Read more →

Restore SD card original size on Windows

Since I play a lot with IoT using my Raspberry Pi – on both – Windows and Raspbian, I ended up holding several SD cards, which don’t report almost any size on Windows. Somehow they are seen only as 70MB disks, even if they originally were 32GB cards. Where are then the missing bytes? Believe me, they are there and it’s simply the partition table (written on top of the SD card) that makes them hidden or treated even as unallocated space. Read more →

Windows 10 on Early 2011 MacBook Pro

Yes, that’s correct. It’s possible to install and have perfectly running copy of Windows 10 on this extremely old early-2011 MacBook Pro, even though Apple latest BootCamp 6 doesn’t officially support this hardware. ⚠️ [Update 2017-05-08]: Additionally I was able to extend its memory to 16GB and replace the internal drive with Samsung SSD 860 Evo to give it maximum performance. Was it easy? YES! and NO! (explained in Long Story below) Read more →