This month on Open Apple, we sit down with Glenda Adams, better known on the Apple II as The Atom. She was a cracker of some note back in the 1980s, and she shares great stories with us…
This updated version of our Privacy Policy takes effect on May 25, 2018. See the current version of the policy
…
When we’re pursuing legitimate interests
We process your information for our legitimate interests and those of third parties while applying appropriate safeguards that protect your privacy. This means that we process your information for things like:
Providing, maintaining, and improving our services to meet the needs of our users
Developing new products and features that are useful for our users
Understanding how people use our services to ensure and improve the performance of our services
Interesting as bgInfo does not support top most windows or overlay: it only does the Desktop background, and you need to go through hoops to recreate the background on each logon:
Enter dzComputerInfo. It’s a small tool that I wrote the evening after the above incident which does exactly one thing: It shows a window on top of all other windows displaying the computer name and currently logged on user. Since the window is so small and it places itself automatically just above the start button, it does not really become a nuisance.
The G+ thread also the interesting comment by Gaurav Kale:
The Classic Shell Start button supports environment variables in its tooltip. So just specify: %username% on %computername% for the Setting called “Button Tooltip”. Then to see the currently logged on user and computer name, you just have to HOVER over the Start button!
iodine is a free (ISC licensed) tunnel application to forward IPv4 traffic through DNS servers (IP over DNS). Works on Linux, FreeBSD, NetBSD, OpenBSD and Mac OS X.
Generics and constraints in Delphi is still a bit of pain.
A while ago, I needed a factory for threads. It was more convoluted than I meant it to be, so I had a short chat with Stefan Glienke.
He came up with an example similar to the one below. I tore it apart so you can on each line see what the compiler dislikes.
This fails, but was kind of how I wanted it to be:
type
TFactory = record
class function Manufacture<T: TBaseClass, constructor>(parameter definitions): T;
end;
class function Manufacture<T: TBaseClass, constructor>(parameter definitions): T;
begin
Result := T.Create(parameter values);
end;
type
TComponentFactory = class
class function CreateComponent<T: TComponent>(AOwner: TComponent): T; static;
end;
class function TComponentFactory.CreateComponent<T>(AOwner: TComponent): T;
var
ComponentClass: TComponentClass;
Component: TComponent;
begin
ComponentClass := T;
Component := ComponentClass.Create(AOwner); // you can't do `T.Create(AOwner)`
Result := T(Component); // you can't do `Result := ComponentClass.Create(AOwner);`
end;
The usage:
var
Component: TButton;
Owner: TComponent;
begin
Owner := Application.MainForm;
Component := TComponentFactory<TButton>.CreateComponent(Owner);
Component.Parent := Owner;
end;
In the mean time, Spring4D has added the [Archive.is] Spring4D: TActivator record with many CreateInstance methods that allow you to create instances of classes for which you just have type information.
–jeroen
This fails:
type
TFactory = record
class function Manufacture<T: TBaseClass, constructor>(parameter definitions): T;
end;
class function Manufacture<T: TBaseClass, constructor>(parameter definitions): T;
begin
Result := T.Create(parameter values);
end;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters