Coding with Titans

so breaking things happens constantly, but never on purpose

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 →

Extending MacBook memory over the limit

Even though my 13-inch MacBook Pro (early-2011) seems to be pretty old I still like to work on it. Unfortunately running Windows 10 and two instances of Visual Studio 2015 kills it slowly. Mostly because of lack of memory and continuous usage of the swap file. And totally by accident I found out that Apple cheated users in this spec of an equipment saying it can support only up to 8GB of RAM. 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 →

OSMC + SMB share with credentials

Yet another day I tried to play a video from an SMB share using OSMC. Must say so – this player is just amazing and works great on Raspberry Pi 2 (although on Pi 1 whole stack was far too slow for HD content). So what could go wrong here? I am a bit paranoid about sharing and access rights. That’s why I setup that share with a dedicated user on a server and guarded with a strong password. 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 →