I just found this via Heise online: Web server in one line of bash I tried it and it works! while true; do { echo -e 'HTTP/1.1 200 OK\r\n'; cat index.html; } | nc -l 8080; done You can replace index.html with any file you happen to want to transfer (also works for binary files). … Continue reading A web server as a shell script – in a single line
Concatenating pdf files the easy way
I just had the need to concatenate several pdf files to a single one. Since my desktop computer is running Windows, I first tried to download and use some freeware utility. After the first one did not work as advertised and the second one tried to sideload some adware I stopped going that path and … Continue reading Concatenating pdf files the easy way
dBASE: When an empty string field does not match “”
Filtering the current table on a field in dBASE is done like this: set filter to [condition] So if you want all records where ANUMBER > 10 you just type this command: set filter to ANUMBER > 10 It's as easy as this... unless your field ANAME is a character field and you want all … Continue reading dBASE: When an empty string field does not match “”
tdbf updates – help required
I got developer access to the tdbf sourceforge project and made the packages compile with all Delphi versions I have got: Delphi 6 Delphi 7 Delphi 2005 Delphi 2006 Delphi 2007 Delphi 2009 Delphi 2010 Delphi XE Delphi XE2 (32 and 64 bits) Delphi XE4 (32 and 64 bits) I also applied several bugfixes which … Continue reading tdbf updates – help required
using and ab-using ifdef
I am currently trying to update an open source project from Delphi 2007 to XE2 and found some code which supposedly already works for XE2. But it is ab-using ifdef in several ways so I thought I'd blog about this to vent some steam and also possibly educate others. (Class name changed to protect the … Continue reading using and ab-using ifdef
GExperts Formatter features you didn’t know about
I am sure you did not know about these features (I had forgotten about them myself): You can save your own custom configuration as FormatterSettings-<YourName>.ini into the GExperts installation directory. After you did that, you can select this configuration in the same way you can the preinstalled configurations. If you want to format a unit … Continue reading GExperts Formatter features you didn’t know about
Comparing .po files with BeyondCompare
BeyondCompare from Scooter Software is a very versatile directory and file comparison tool. It allows filters for binary formats, weighting lines and defining a grammar for comparing text files. This is a simple grammar for .po files (used by GNUGetText): Comment=Text matching ^# and next 0 lines After defining this grammar, all changes in lines … Continue reading Comparing .po files with BeyondCompare
Using dBase
I recently needed to do some table manipulation with Visual dBase. Not being an expert with this program (I usually write tools for that purpose in Delphi using the BDE or tdbf), I had to look up quite a few commands. Here are the links that proved useful: Beginners’ Corner — Part 2: The dBASE … Continue reading Using dBase
experimental GExperts + code formatter for Delphi XE4
There isn't yet any official release of GExperts for Delphi XE4 but if you don't mind a little bit of manual work for installing, you can have it anyway. WARNING: I have just now made this version compile with Delphi XE4. I have not done any tests. You are on your own and responsible for … Continue reading experimental GExperts + code formatter for Delphi XE4
Storing gnugettext translations as resources
I always wondered why the assemble tool in dxgettext appends the translation files directly to the executable rather than using the existing mechanism of resources. This is no longer necessary. I have updated the gnugettext code to optionally use RCDATA resources named after the files. So you e.g. create a translations.rc file as LOCALE_DE_DEFAULT RCDATA … Continue reading Storing gnugettext translations as resources