In addition to homemade gel mixtures, hydrogen peroxide-based hair bleaching creams available at beauty supply stores can also be used as a ready-made mix.
wait 5 minutes (there is no output on HDMI apart from some flickering and no output on TTY using 115200 bits/second despite trying [WayBack] en:c1_hardware_uart [ODROID Wiki])
The second part is getting the USB web cameras to work.
I’ve got two types, but the label on them doesn’t list their common name, only their P/N sometimes with M/N:
P/N 860-000049 M/N V-UBC40 (really old USB cameras)
P/N 860-000334 (new USB camera)
The MotionEyeOS web interface didn’t list any working cameras so I had to do some digging.
What is the proper way for pooling of TCustomConnection instances in Delphi, that allows to distinguish between instances that have effectively equal connection properties and the ones that are effectively unequal?
I’ve tried searching the RTL and VCL sources and didn’t find a generic way.
I could copy either of the specific ones I found (see list below) and adapt them to a more generic solution or adapt one of the answers in #16404051 to be for TCustomConnection, but I wonder if there is an existing solution for TCustomConnection in the first place.
So far not much luck: the Ubuntu got hosed, but before it was stable as in that didn’t reboot suddenly.
Now the MotionEyeOS (which is busybox based) reboots itself without notice about every 3 minutes, despite no other hardware connected and trying 3 different power supplies.
The Odroid C1+ only draws 0.34 Ampère at 5.13 Volt which is well within specs.
I’m puzzled:
[Wed May 31 09:49:51 2018] Booting Linux on physical CPU 0x200
[Wed May 31 09:52:20 2018] Booting Linux on physical CPU 0x200
[Wed May 31 09:54:50 2018] Booting Linux on physical CPU 0x200
[Wed May 31 09:57:19 2018] Booting Linux on physical CPU 0x200
[Wed May 31 09:59:49 2018] Booting Linux on physical CPU 0x200
[Wed May 31 10:02:22 2018] Booting Linux on physical CPU 0x200
[Wed May 31 10:04:56 2018] Booting Linux on physical CPU 0x200
[Wed May 31 10:07:26 2018] Booting Linux on physical CPU 0x200
[Wed May 31 10:09:59 2018] Booting Linux on physical CPU 0x200
[Wed May 31 10:12:29 2018] Booting Linux on physical CPU 0x200
[Wed May 31 10:14:58 2018] Booting Linux on physical CPU 0x200
The below came in really useful in an old project I took over that was full of bugs having to do with improper casts and FreeAndNil usage.
EDIT 20181010: WordPress.com keeps mangling angle-brackets in pre and code sections, so I added the code to a gist; see link below.
First the examples.
procedure TMyServer.UnbindFromIdTcpServerStatusContext(const aContext: TIdContext);
var
lClientSession: TClientSession;
begin
lClientSession := TObjectHelper.Cast<TClientSession>(aContext.Data);
...
end;
type
TBaseDataInterface = class(TObject)
strict private
FDatabase: TIBDatabase;
FTransaction: TIBTransaction;
...
end;
destructor TBaseDataInterface.Destroy();
begin
TObjectHelper.FreeAndNil(FDatabase);
TObjectHelper.FreeAndNil(FTransaction);
...
inherited Destroy();
end;
And the implementation.
unit ObjectHelperUnit;
interface
type
TObjectHelper = record
class function Cast<T: class>(const aValue: TObject): T; static;
class procedure FreeAndNil<T: class>(var Value: T); static;
end;
implementation
uses
System.SysConst,
System.SysUtils;
class function TObjectHelper.Cast<T>(const aValue: TObject): T;
var
lException: Exception;
begin
if Assigned(aValue) then
begin
if aValue is T then
Result := T(aValue)
else
begin
lException := EInvalidCast.CreateFmt('%s; actual type %s but expected %s.',
[SInvalidCast, aValue.QualifiedClassName, T.QualifiedClassName]);
raise lException;
end;
end
else
Result := nil;
end;
class procedure TObjectHelper.FreeAndNil<T>(var Value: T);
begin
System.SysUtils.FreeAndNil(Value);
end;
end.
–jeroen
Gist:
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
-z means: do not send any data, just check if the port is open,
while ! nc -z …; do sleep 0.1; done: keep checking and sleeping for one tenth of a second until the port opens up, i.e. Netcat returns with a zero (success) status.
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