programming

Online encode and decode base64, hex, url

  • Posted on: 9 May 2016
  • By: Michał Turecki

On Protobuf.Net, using AsReference and multiple instances of object which should be deserialized only once.

  • Posted on: 27 November 2014
  • By: Michał Turecki

There is a ProtoBuf.Net fact regarding using AsReference which somehow I missed when digging into why [ProtoAfterDeserialization] attribute is not applied for some objects.
The truth is that it is applied for some but not other objects even if I used AsReference attribute in some places. The AsReference attribute should be applied to ALL REFERENCES TO THE OBJECT, both collections and navigational properties, NOT JUST REFERENCES OTHER THAN THE REFERENCE WE CONSIDER MAIN ONE.

FlowDocument from a different thread - "The calling thread cannot access this object because a different thread owns it."

  • Posted on: 7 July 2014
  • By: Michał Turecki

The FlowDocument along with most of the elements it contains inherits from DispatcherObject class. This means when constructed, it becomes linked to the thread in which it was constructed and causes several implications.

Delphi 2007 - error running on 64-bit Windows

  • Posted on: 3 April 2013
  • By: Michał Turecki

Delphi 2007 is not new although it is the last non-unicode release of Delphi hence it is used frequently to maintain legacy code base.

And it has bugs. Some of them can be fixed by VCLFixPack and affect only compiled binaries.

Some are related to IDE and neither CnPack nor GExperts IDE extensions can fix them.

TortoiseMerge with better shortcuts, like WinMerge

  • Posted on: 18 January 2013
  • By: Michał Turecki

TortoiseMerge is a useful 3-way merge tool yet it lacks proper keyboard shortcuts configuration and default shortcuts seem to be designed only for basketball players, with fingers stretched from arrow keys up to function keys.
Update: Current Version of TortoiseMerge included in TortoiseGit has the keyboard shortcuts fixed and easy to use

Simple themed TCheckComboBox control for Delphi - TComboBox with checkboxes

  • Posted on: 12 December 2012
  • By: Michał Turecki

Recently I needed to upgrade a piece of software to do some things easily done in modern user interface libraries say WPF or FireMonkey (which I don't use personally), but requiring more effort to implement in Delphi VCL.

The task in question was to add a drop down menu with TCheckBox controls to a TStringGrid. This has been done countless times and TCheckedComboBox, TCheckBoxComboBox and others alike can be found on the Internet easily. The problem is none have the features I needed:

Kalkulator wygranych amino lotto 2009 oraz 2010

  • Posted on: 29 August 2009
  • By: Michał Turecki
Do końca roku Amino przygotowało ciekawą loterię - mozna wygrać wielokrotność 1000 złotych, ale nie więcej niż 10000 zł zbierając opakowania na przyprawy z zupek, na których jest jedna lub dwie kwoty, które należy sumować. Do tej żmudnej operacji przygotowałem narzędzie, które jest zdecydowanie łatwiejsze w użyciu niż kalkulator na stronie producenta.

Compilation of PostgreSQL 8.3.7 on Visual Studio 2008

  • Posted on: 17 May 2009
  • By: Michał Turecki

Today I have encountered few problems while trying to compile PostgreSQL on Windows. PostgreSQL designed to work in *nix environments and it's native build system works flawlessly on Linux just as expected. Unfortunatelly on Windows this build system is used by minority of applications, partially using Microsoft's own version of make: nmake.

In PostgreSQL only libpq.dll can be compiled using nmake in Visual Studio Command Prompt which sets all necessary environment variables for compiler and linker (INCLUDE, LIBPATH etc, type set in command prompt to verify these paths).