In Delphi, threads have traditionally been implemented as classes descending from TThread. While there have been quite a few improvements to multithreading, TThread is still the most compatible way. But TThread is not a normal class. In a normal class, the constructor and destructor usually look like this: [delphi] constructor TSomeClass.Create; begin inherited; FSomeList := … Continue reading TThread is not a normal class
Author: dummzeuch
If your Samba logon script does not get executed
... even though you can open and read it fine in an editor: You should check its Linux access permissions. If it is not marked as executable, this might be the cause. Change it with chmod like this: [bash] root@server:/home/netlogon$ ls -la total 12 drwxrwxr-x+ 2 root root 4096 Apr 13 09:04 . drwxr-xr-x 46 … Continue reading If your Samba logon script does not get executed
how to get a dump of your remote svn repository
Recently SourceForge's service has declined to a point where it gets really annoying. Basically every time I tried to commit a change to the svn repository of one of my projects, I run into timeouts and other errors. I want to spend my time working on my projects, not convincing their infrastructure to accept my … Continue reading how to get a dump of your remote svn repository
Specifying the msbuild configuration for a Delphi project on the commandline
Starting with Delphi 2007 EmBorCodera switched to msbuild for the build system. The newly introduced .dproj file used since then is a valid build script for msbuild but unfortunately the format has changed between Delphi 2007 and 2009. This means that there is a difference if you want to make command line builds and specify … Continue reading Specifying the msbuild configuration for a Delphi project on the commandline
GExperts Usage Statistics
Have you ever wondered which functions of GExperts you have used the most? Or how often at all? How much time it has saved you? Now you can find out: I just added Usage Statistics to GExperts which tells you exactly how often you have called each of the experts, in the current session and … Continue reading GExperts Usage Statistics
When an exception is nil in the exception handler
A colleague of mine asked me today, how this could be: Given this exception handler: [delphi] try // some code that calls methods except on e: Exception do LogError(e.Message); end; [/delphi] How could e be nil? (and e.Message result in an Access Violation?) It turned out to be an error in one of the methods … Continue reading When an exception is nil in the exception handler
Creating a properly aligned partition with parted
Parted is a flexible tool for working with partition tables under Linux. Unfortunately it sometimes seems rather stupid. For example when you create a new partition you may get the warning "The resulting partition is not properly aligned for best performance". It could then of course proceed to suggest the proper alignment, but it doesn't, … Continue reading Creating a properly aligned partition with parted
Write the name of a newly connected USB device to the console in Linux
In theory it is easy to detect when the user plugs in a USB device to a Linux computer and notify him what was detected. In practice it's still easy as long as you know how to do it. First thing to do is add a file to[bash]/etc/udev/rules.d[/bash] The file name should follow the convention … Continue reading Write the name of a newly connected USB device to the console in Linux
Create a large file filled with zeros on Linux
Sometimes you need a large file for testing purposes or just to take up space that should not be available on the file system. There are several options on how to generate such a file on Linux: The traditional method is using dd, setting if (in file) to either /dev/null or to /dev/random. A more … Continue reading Create a large file filled with zeros on Linux
etckeeper – version your /etc directory
Keeping track of changes in the Linux configuration can be a chore but sometimes it is vital to know what was changed. As a software developer I am used to using version control systems for source code, so why not use one for configuration files? Enter etckeeper a tool that does exactly that: It tracks … Continue reading etckeeper – version your /etc directory