Skip to content

Instantly share code, notes, and snippets.

Uwe Raabe UweRaabe

Block or report user

Report or block UweRaabe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@UweRaabe
UweRaabe / installation.rst
Created Oct 31, 2019 — forked from UnderGreen/installation.rst
Installation instruction for Kallithea
View installation.rst

Setting up Kallithea on Ubuntu Server 12.04

Preparation

  1. Install Ubuntu Server.
  2. Update Ubuntu with the commands:
View CombinedProp
type
TVariantArr = record
private
{ implementation may differ }
Data: Variant;
Arr: TArray<Variant>;
function GetItems(Index: Integer): Variant;
procedure SetItems(Index: Integer; const Value: Variant);
public
class operator Implicit(A: TVariantArr): Variant; overload;
@UweRaabe
UweRaabe / uDesignNote.pas
Created Aug 16, 2017
Delphi component to show some text file at design time
View uDesignNote.pas
unit uDesignNote;
interface
uses
System.SysUtils, System.Classes, Vcl.Forms, Vcl.StdCtrls;
type
TDesignNote = class(TComponent)
private
View sizesarray.xml
<?xml version="1.0" encoding="utf-8"?>
<codetemplate version="1.0.0" xmlns="http://schemas.borland.com/Delphi/2005/codetemplates">
<template name="array[" invoke="auto">
<description>
sized array declaration
</description>
<author>
Uwe Raabe
</author>
@UweRaabe
UweRaabe / uNetUse.pas
Created Nov 28, 2016
add and delete a network connection
View uNetUse.pas
function NetUseAdd(const RemoteName: string): string;
var
NetResource: TNetResource;
dwResult, dwBufSize, dwFlags: DWORD;
hRes: DWORD;
localName: array[0..1024] of Char;
begin
dwFlags := CONNECT_REDIRECT;
ZeroMemory(@NetResource, sizeof(TNetResource));
with NetResource do begin
@UweRaabe
UweRaabe / uIsPermanentConnection.pas
Last active Nov 24, 2017
check if network connection is permanent
View uIsPermanentConnection.pas
function IsPermanentConnection(const ALocalName: string): Boolean;
type
PNetResourceArray = ^TNetResourceArray;
TNetResourceArray = array [0 .. MaxInt div SizeOf(TNetResource) - 1] of TNetResource;
var
I, BufSize, NetResult: Integer;
Count, Size: LongWord;
NetHandle: THandle;
NetResources: PNetResourceArray;
begin
View TMS Scripter: Registering classes and instances
procedure TdmScripting.PrepareScripter(AScripter: TIDEScripter);
begin
AScripter.DefineClassByRTTI(TTwinCATVar);
AScripter.DefineClassByRTTI(TTwinCATVarBOOL);
AScripter.DefineClassByRTTI(TTwinCATVarBYTE);
AScripter.DefineClassByRTTI(TTwinCATVarINT);
AScripter.DefineClassByRTTI(TTwinCATVarLONG);
AScripter.DefineClassByRTTI(TTwinCATVarSINGLE);
AScripter.DefineClassByRTTI(TTwinCATVarDOUBLE);
AScripter.DefineClassByRTTI(TTwinCATVarSTRING);
View StringToHex
function BytesToHex(const ASource: TBytes): string;
var
target: TBytes;
begin
SetLength(target, Length(ASource)*2);
BinToHex(ASource, 0, target, 0, Length(ASource));
result := TEncoding.ANSI.GetString(target);
end;
function StringToHex(const ASource: string; AEncoding: TEncoding): string;
@UweRaabe
UweRaabe / Unit77.pas
Last active Apr 7, 2016
Screenshot to Metafile
View Unit77.pas
unit Unit77;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, System.Actions, Vcl.ActnList;
type
TForm77 = class(TForm)
View FMX.MeshObjects.pas
unit FMX.MeshObjects;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, System.RTLConsts,
System.Math, System.Math.Vectors, System.UIConsts, FMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.Controls3D,
FMX.Types3D, FMX.Objects3D, FMX.Layers3D, FMX.Objects, FMX.Menus, FMX.Edit, FMX.Colors, FMX.MaterialSources,
System.StrUtils, System.Generics.Collections, FMX.Ani, FMX.Materials, System.Generics.Defaults;
You can’t perform that action at this time.