The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for March, 2021

Short Delphi tip: ensuring RTTI for classes is included

Posted by jpluimers on 2021/03/04

When using RTTI in Delphi, you really want the RTTI to be available.

The compiler includes RTTI for classes, as soon as it found that a class is touched by code that will be executed.

So in order to include RTTI for classes into the executable, you have to ensure you touch the class.

Basically there are two tricks for that.

  1. A small one step process which incurs a tiny bit of string overhead:
    class function TObject.ClassName: string;
    begin
      Result := UTF8ToString(_PShortStr(PPointer(PByte(Self) + vmtClassName)^)^);
    end;
    • Touch the [WayBack] ClassName class function for each class, for instance in an initialization section or registration method, like this:
      TMyClass.ClassName;
      TMyOtherClass.ClassName;
  2. A small two step process
    1. Create a method like this: procedure EnsureRttiIsAvailable(const Classes: array of TClass); begin end;
    2. Pass the classes to it like this:
      EnsureRttiIsAvailable([TMyClass, TMyOtherClass]);

I like the second solution more, as it clearly states the intent.

The first trick is calling a function without using the result. This is a Pascal construct that looks odd, but is perfectly valid to use: basically you discard the result.

–jeroen

Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development, Undocumented Delphi | Leave a Comment »

Delphi: combining intrinsic functions and inline to have no-code checks on concrete generic instantiation

Posted by jpluimers on 2021/03/04

The title might sound like a lot of gibberish, but the mechanism it describes helps solving a problem when using generics: lack of generic constraints in the compiler.

For instance, you cannot constrain on enumeration types (C# could not do this either: you could not do T GetEnumFromString<T>(string valueString, T defaultValue) where T : Enum, but [WayBack] since C# 7.3, you can do ... where T : Enum) unless you [WayBack] did some real hackery.

For Delphi, you still cannot do the constraint, but with some hackery, you can avoid code generation. Spring4d uses this in [WayBack] Spring.pas, from which I copied these fragments:

class function TType.Kind<T>: TTypeKind;
{$IFDEF DELPHIXE7_UP}
begin
  Result := System.GetTypeKind(T);
{$ELSE}
var
  typeInfo: PTypeInfo;
begin
  typeInfo := System.TypeInfo(T);
  if typeInfo = nil then
    Exit(tkUnknown);
  Result := typeInfo.Kind;
{$ENDIF}
end;

class procedure Guard.CheckTypeKind<T>(expectedTypeKind: TTypeKind;
  const argumentName: string);
begin
  if TType.Kind<T> <> expectedTypeKind then
    RaiseArgumentException(TType.Kind<T>, argumentName);
end;

class function TEnum.IsValid<T>(const value: Integer): Boolean;
var
  data: PTypeData;
begin
  Guard.CheckTypeKind<T>(tkEnumeration, 'T');
  data := GetTypeData(TypeInfo(T));
  Result := (value >= data.MinValue) and (value <= data.MaxValue);
end;

When <T> is an enumeration type, any code for that call is eliminated by the compiler.

Related

Concrete versus generic type:

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

Common UX ant-pattern: “you have Tea and No Tea”

Posted by jpluimers on 2021/03/03

I see this pattern in a lot of user interfaces, especially on web-sites: “you have Tea and No Tea”.

For instance the example from the web site on the right: it indicates in Dutch you are getting a postal package. In the body text it says “because we send it as a letter, you do not get a tracking code” followed by a headed section containing a link to an invalid tracking code.

There was only one historic case where the condition “you have Tea and No Tea” opened doors.

Nowadays you should just put a user story on your front-end team back-log that prevents displaying a tracking code when there is none.

Maybe file an issue for the back-end team as well, to distinguish the cases where you can or cannot track shipments.

If you fix it, then an important to remember that often multiple front-ends share the same code.

In the case of the screen shot on the right, the email system showed the same issue; a strong indication either part of the code, or the design steps have been shared.

For such cases, it helps tracking back where the root of the shared design or code came started, then ensure everything stemming from that root is re-checked to ensure altered copies are inspected for the need of modification.

Background

[WayBack] Thread by @jpluimers: “Er gaat iets mis met @KPNwebcare PostNL tracking codes voor prepaid SIM kaarten vanaf mijnbestelling.kpn.com : de “PostNL Track & Trace […]”

Er gaat iets mis met @KPNwebcare PostNL tracking codes voor prepaid SIM kaarten vanaf mijnbestelling.kpn.com : de “PostNL Track & Trace code” link mist de 3S en ziet er nu uit als jouw.postnl.nl/#!/track-en-tr… waarbij op * 20 cijfers staan zonder 3S erin.

Hoe krijg ik de goede code?

Ah, een typisch geval van “you have Tea and No Tea” waarbij “Tea” de aandacht trekt, maar “No Tea” niet.

Mooie user story voor een backlog item van jullie front-end scrum teams (;

Applaus als jullie trouwens laten zien deze klassieker te kennen (;

and [WayBack] Thread by @jpluimers: “@KPNwebcare Doe ik. Zowel site als email hebben hetzelfde probleem. @KPNwebcare Daar zitten deze twee zinnen in: “Handig om te weten: omdat […]”

Doe ik. Zowel site als email hebben hetzelfde probleem.
mentions Daar zitten deze twee zinnen in:

“Handig om te weten: omdat uw bestelling via post wordt verstuurd, is het niet mogelijk om deze via een Track & Trace code te volgen”

en

“Track & Trace code
Dit is uw persoonlijke PostNL Track & Trace code”

Met daarin dezelfde foutieve link.

–jeroen

Read the rest of this entry »

Posted in Development, Software Development, Usability, User Experience (ux) | Leave a Comment »

Delphi: quickly failing in use-after free scenarios

Posted by jpluimers on 2021/03/03

Two tricks that can help in use-after-free scenarios.

Call ScanMemoryPoolForCorruptions often

One of the scenarios of use after free, is that memory blocks get corrupted.

FastMM4 normall checks this at process end using the CheckBlocksOnShutdown method (in FastMM4.pas when writing this private at line 11156), but you can also do this process manually using the ScanMemoryPoolForCorruptions method (also in FastMM4.pas, but public at line L1356).

You can automate this process by setting the FullDebugModeScanMemoryPoolBeforeEveryOperation flag to True while in FullDebugMode as you see in the quoted code blocks below.

Note that calling ScanMemoryPoolForCorruptions between allocations might reveal wild pointer dereferences between allocations.

  - Added a global variable "FullDebugModeScanMemoryPoolBeforeEveryOperation".
    When this variable is set to true and FullDebugMode is enabled, then the
    entire memory pool is checked for consistency before every GetMem, FreeMem
    and ReallocMem operation. An "Out of Memory" error is raised if a
    corruption is found (and this variable is set to false to prevent recursive
    errors). This obviously incurs a massive performance hit, so enable it only
    when hunting for elusive memory corruption bugs. (Thanks to Marcus Mönnig.)

  {If this variable is set to true and FullDebugMode is enabled, then the
   entire memory pool is checked for consistency before every memory
   operation. Note that this incurs a massive performance hit on top of
   the already significant FullDebugMode overhead, so enable this option
   only when absolutely necessary.}
  FullDebugModeScanMemoryPoolBeforeEveryOperation: Boolean = False;

Call any virtual method on an instance reference

A quick way to test use-after free scenarios is to call a virtual method on an instance.

Virtual methods mean that the Virtual Method Table needs to be used as a starting point, so any nil pointer will get dereferenced.

Two simple methods that you can call, which have no side effects, except for referencing memory, and are virtual on [WayBack] TObject are [WayBack] GetHashCode and [WayBack] ToString. Both methods got added in Delphi 2009, and now support 64-bit and 32-bit compilers are below.

If you use use these in addition to FastMM4 clearing memory, and FastMM4 redirecting virtual methods of freed objects, you have a good chance of catching use-after free.

Without FastMM, they are also of good help, especially when the freed memory has since then been overwritten by new usage. FastMM4 is a lot more strict about this, so definitely recommended.

Calling these two methods help you to quickly fail with an EAccessViolation [WayBack] in use-after-free scenarios.

More on the virtual method table is for instance in [WayBack] Hallvard’s Blog: Method calls compiler implementation.

Read the rest of this entry »

Posted in Conference Topics, Conferences, Delphi, Development, Event, FastMM, Software Development, Undocumented Delphi | Leave a Comment »

JSON or binary stream? Delphi 2010: How to save a whole record to a file? – Stack Overflow

Posted by jpluimers on 2021/03/03

A while back I proposed using JSON in order to [WayBack] Delphi 2010: How to save a whole record to a file? – Stack Overflow.

There is also a native solution using streaming (which by now has moved to [WayBack] GitHub – KrystianBigaj/kblib: Automatically exported from code.google.com/p/kblib with main source file [WayBack] kblib/uKBDynamic.pas), but be aware that unlike JSON:

  • Streams are not fully compatible between Delphi Unicode and Delphi non-Unicode (they are if you limit yourself to AnsiString)
  • Streams are not compatible between x64 and x86 unless you use kdoCPUArchCompatibility and provide additional compatibility (read comments on kdoCPUArchCompatibility)

The main file from my proposed solution has since then move

Which reminds me I still need to fix quite a few links, as per Anyone who knows about http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RADStudio_Rio ?

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

Reminder of Windows 10 update “What’s New” location

Posted by jpluimers on 2021/03/02

If you forgot what Microsoft has added, look for a file named like this:

C:\Program Files\WindowsApps\Microsoft.Getstarted_7.3.20251.0_x64__8wekyb3d8bbwe\WhatsNew.Store.exe

Disregard any warnings you find through the above link: it is a legit file installed during Windows 10 update.

–jeroen

Posted in Power User, Windows, Windows 10 | Leave a Comment »

Delphi XE7 introduced const support for dynamic arrays; prior versions used [] only for sets.

Posted by jpluimers on 2021/03/02

A few things to learn from [WayBack] delphi – Constant array of cardinal produces error ‘Constant expression violates subrange bounds” – Stack Overflow:

  • Delphi XE7 introduced compiler support for const dynamic arrays.
  • Compiler errors can completely put you in the wrong direction.
  • Command-line compilers indicate BDS versions which can confuse you for the exact product versions (thanks Rudy Velthuis for correcting that).

Sets

In this case, Delphi XE6 and below regard the [...] construct for constants as a set of Byte of which the maximum value is 255.

So this already fails with E1012 Constant expression violates subrange bounds, even though 257 perfectly fits the subrange of Cardinal:

const
  CardinalArray: array of Cardinal = [257];

The documentation (which has not changed since Delphi 2007) puts you in a totally different direction: [WayBack] x1012: Constant expression violates subrange bounds

x1012: Constant expression violates subrange bounds

This error message occurs when the compiler can determine that a constant is outside the legal range. This can occur for instance if you assign a constant to a variable of subrange type.

program Produce;
var
  Digit: 1..9;
begin
  Digit := 0;  (*Get message: Constant expression violates subrange bounds*)
end.
program Solve;
var
  Digit: 0..9;
begin
  Digit := 0;
end.

The alternative is to use a non-dynamic array that uses parenthesis instead of square brackets for initialisation:

const
  CardinalArray: array[0..0] of Cardinal = (257);

Dynamic arrays

Const initialisation of dynamic arrays only made a tick mark on the box in [Archive.is] What’s New in Delphi and C++Builder XE7 – RAD Studio: String-Like Operations Supported on Dynamic Arrays, but in fact this code works in Delphi XE7 and up just fine:

program Cardinals;

{$APPTYPE CONSOLE}

uses
  System.SysUtils;

const
  CardinalArray: array of Cardinal = [257]; // fails until Delphi XE6 with "E1012 Constant expression violates subrange bounds"

const
  ANSICOLORS: array of Cardinal = [
    $000000,//0
    $800000,//1, compilation error starts with this value
    $008000,//2
    $808000,//3
    $000080,//4
    $800080,//5
    $008080,//6
    $D0D0D0,//7
    $3F3F3F,//8
    $FF0000,//9
    $00FF00,//A
    $FFFF00,//B
    $0000FF,//C
    $FF00FF,//D
    $00FFFF,//E
    $FFFFFF];//F

var
  AnsiColor: Cardinal;

begin
  try
    for AnsiColor in AnsiColors do
      Writeln(Format('$%6.6x', [AnsiColor]));
  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;
end.

Output:

$000000
$800000
$008000
$808000
$000080
$800080
$008080
$D0D0D0
$3F3F3F
$FF0000
$00FF00
$FFFF00
$0000FF
$FF00FF
$00FFFF
$FFFFFF

Note that dynamic arrays are unlike regular arrays, which for instance means that nesting them can get you into a different uncharted territory when using multiple dimensions.

Unlike an array, a dynamic array has notice of length. Which means it needs extra memory for it.

So where regular multi-dimensional arrays are blocks of memory. Multi-dimensional dynamic arrays are a dynamic array on each dimension level, which means extra length keeping, and the seemingly odd Copy behaviour described in [WayBack] Things that make you go ‘urgh’… | Delphi Haven:

What’s the flaw in this test code?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
program Project1;
{$APPTYPE CONSOLE}
var
  Arr1, Arr2: array of array of Integer;
  I, J: Integer;
begin
  SetLength(Arr1, 5, 5);
  for I := 0 to 4 do
    for J := 0 to 4 do
      Arr1[I, J] := I * J;
  Arr2 := Copy(Arr1);
  for I := 0 to 4 do
    for J := 0 to 4 do
      if Arr2[I, J] <> Arr1[I, J] then
      begin
        WriteLn('Nope');
        Break;
      end;
  Write('Press ENTER to exit...');
  ReadLn;
end.

with these comments

Rudy Velthuis:

Dynarrays are single-dimensional. One can get the illusion of multi-dimensionality because the Delphi syntax lets you access them using a[5,6] syntax, and SetLength takes more than one dimension parameter, and indeed, the docs even mention multi-dimensional, but that doesn’t change anything. You don’t have a multi-dimensional dynarray, you have a dynarray than contains other dynarrays. Each of these is one-dimensional. IOW, you don’t have one array, you have a cluster of dynarrays.

Copy() handles dynarrays. These are one-dimensional, so it only does one dimension (what else?). IOW, the behaviour is correct and actually well known.

Franćois:

I’m with you Chris. I don’t think this is “well known”, maybe because mono-dimensional dynamic arrays are probably used much more than multidimensional ones.
And also, the documentation is blaringly silent on this behavior. (credit to DelphiBasics to mention it: http://www.delphibasics.co.uk/RTL.asp?Name=Array)
The more visibility it gets, the less bugs we’ll have to deal with.

IMO, I don’t see why “copy” would not behave recursively and copy each sub-array as well. It seems that it is the intuitive behavior people tend to expect in the 1st place. (either nothing at all like Arr1:=Arr2, or a full recursive copy)
But since it’s been like that for some time, I doubt it can change for compatibility reasons (breaking code relying explicitly on this behavior).

Chris:

Thanks for the support! On my reading, the help strongly implies the behaviour I was expecting, and therefore, implies the actual behaviour to be a bug. Specifically, the entry for Copy (http://docwiki.embarcadero.com/VCL/en/System.Copy) includes the line:

Note: When S is a dynamic array, you can omit the Index and Count parameters and Copy copies the entire array.

What could ‘the entire array’ mean? According to Rudy, this can’t mean more than one dimension because dynamic arrays aren’t multidimensional. And yet, the Delphi Language Guide talks of ‘multidimensional dynamic arrays’ quite clearly (http://docwiki.embarcadero.com/RADStudio/en/Structured_Types#Multidimensional_Dynamic_Arrays). See also the docs for SetLength (http://docwiki.embarcadero.com/VCL/en/System.SetLength).

–jeroen

Posted in Delphi, Development, History, Software Development, Undocumented Delphi | Leave a Comment »

Futurist 20 years ago “The Internet will not become a mass medium” – via littlewisehen on Twitter: “Also sprach der Zukunftsforscher… 😂”

Posted by jpluimers on 2021/03/02

Today exactly 20 years ago, a futurist indicated “The Internet will not become a mass medium”.

Source: [WayBack] littlewisehen on Twitter: “Also sprach der Zukunftsforscher… 😂 https://t.co/taNRUxZD3S”

Via:

Thomas also made this great (German) observation:

2001 war vielfach noch Modem und ISDN angesagt, Flatrates waren gerade wieder abgeschafft worden, DSL gab es in machen Gegenden, war bei 2 Mbit aber mehr als doppelt so teuer wie heute 16 Mbit. Erinnert sich noch jemand an die unsäglichen AOL-CDs, die allen Zeitschriften beilagen?
Es gab noch keine “sozialen” Netzwerke und von mobilem Internet hat man nur geträumt. Selbst dumme Handys waren noch nicht so weit verbreitet wie heute Smartphones, und es kostete richtig Geld, eines anzurufen.

Das ist noch keine 20 Jahre her, aber ich komme mir gerade vor, als ob ich die Zeit des Schwarz-Weiß-Fernsehens beschriebe.

Google Translate actually does a halfway decent job on that (see below) which I’ve edited to this:

2001 was in many cases still the era of modem and ISDN. Flat rates had just been abolished again, there was DSL available in some areas, but at 2 Mbit was more than twice as expensive as todays 16Mbit. Does anyone remember the inexpressible AOL CDs that came with all the magazines?
There were no “social” networks and you could only dream of mobile Internet. Even dumb phones were not as widespread as smartphones are today, and it costed real money to call a mobile phone.

That was only 20 years, but it just feels as describing  black and white television.

Unedited Google Translate:

Read the rest of this entry »

Posted in History | Leave a Comment »

Zwiebelfisch-Abc: gerne/gern – SPIEGEL ONLINE

Posted by jpluimers on 2021/03/01

At 50, I learned that in German, both forms are OK: [WayBack] Zwiebelfisch-Abc: gerne/gern – SPIEGEL ONLINE

Both the column and the ABC are very much worth reading:

Via:

–jeroen

Read the rest of this entry »

Posted in About, LifeHacker, Personal, Power User | Leave a Comment »

Wat notities over de 2e kamerverkiezingen 2021, waar “kwetsbare gezondheid” gewoon “iedereen” betekent

Posted by jpluimers on 2021/03/01

Het belangrijkste verschil tussen de tweede kamerverkiezingen 2021 en de Covid-19 vacciniaties is dat voor de verkiezingen “kwetsbare gezondheid” gewoon “iedereen” betekent (en dat iedereen dus op alle dagen kan stemmen), maar dat voor Covid-19 vaccinaties het heel beperkt is en allerlei mensen daarmee met hun gezondheid in de knel komen.

Twee voorbeeldjes van het laatste:

  • als je NA de vaccinatie bijvoorbeeld chemo, bestraling, of medicatie die het immuunsysteem aantasten krijgt, dan val je niet onder “kwetsbare gezondheid” ook al moet je door de vaccinatie de behandeling uitstellen
  •  als je VOOR de vaccinatie eerst chemo of bestraling gehad hebt en daarna zware operaties, maar de chemo of bestraling is ouder dan 3 maanden, dan val je niet onder “kwetsbare gezondheid” al heb je door de combinatie van behandeling nog nauwelijks energie en heel vatbaar voor infecties

RIVM informatie op [Wayback] Ziekte en medicijngebruik | RIVM bevat geen relevante informatie voor de vaccinaties, maar [Wayback] Risicogroepen en COVID-19 | RIVM wel:

Sommige mensen hebben een grotere kans om ernstig ziek te worden of te overlijden door COVID-19, de ziekte die wordt veroorzaakt door het coronavirus SARS”severe acute respiratory syndrome”-CoVcoronavirus-2.

Maar goed, terug naar de verkiezingen:

  • de lokale verschillen in organisatie zijn groot
  • pagina’s op gemeentelijke web-sites beloven dingen op andere pagina’s die pas later worden toegevoegd of alleen via social media worden gedeeld

Even concentreren op Amsterdam waar ik woon (met als ingang amsterdam.nl/verkiezingen):

  • [Wayback] Verkiezingen – Gemeente Amsterdam

    Informatie over de verkiezingen voor de leden van de Tweede Kamer der Staten-Generaal op woensdag 17 maart 2021 en het stemmen in Amsterdam.

  • [Wayback] Stembureaus in Amsterdam (in eerste instantie niet via de web-site, maar via [Archive.is] Webcare Amsterdam on Twitter: “Dag Jeroen, bedankt voor je reactie. Je was ons voor. Hierbij de link naar de site met kaart met alle stembureaus die open zijn op 15,16 en 17 maart: https://t.co/yohdJzBmtT. We nemen dit jaar extra maatregelen om veilig te kunnen stemmen. 1/2… “)
    • Let op dat de kaart breder is dan hoog, dus dat je voor noord/zuid heen en weer moet scrollen
    • Als je een postcode invult, dan zoomt de kaart wel in rond je adres
    • Als je op de current location Gebruik mijn huidige locatie cross-hair klikt, dan zoomt de kaart niet in naar je adres
  • [Wayback] Tweede Kamerverkiezingen 2021 – Gemeente Amsterdam (inmiddels staat hier een link naar bovenstaande kaart met stembureaus in Amsterdam):

    Op 15, 16 en 17 maart 2021 zijn de verkiezingen voor de Tweede Kamer. Door het coronavirus zijn aanpassingen nodig. De maatregelen die nu al gelden, zullen ook tijdens de verkiezingen van toepassing zijn. Zo kunnen alle kiezers straks veilig hun stem uitbrengen.

    Vervroegd stemmen

    De Tweede Kamerverkiezingen zijn dit jaar verspreid over 3 dagen. In Amsterdam zijn op 15 en 16 maart ongeveer 50 stembureaus open van 07.30 uur tot 21.00 uur. De mogelijkheid om eerder te stemmen is bedoeld voor kwetsbare kiezers die niet in de drukte van de verkiezingsdag op 17 maart willen komen. Bijvoorbeeld vanwege hun leeftijd of gezondheid. De stembureaus die eerder open zijn, vindt u op stembureaus.amsterdam.nl.

    Stemstraat

    Bij de RAI kunt u via de speciale stemstraten snel, veilig en gemakkelijk stemmen. De RAI is een goed bereikbare locatie. Vanwege de stemvrijheid en het stemgeheim mogen er geen andere volwassenen in de auto zitten. Er zijn 4 speciale autostemstraten, één fietsstemstraat en een aantal stembureaus bij de RAI. Automobilisten, fietsers en voetgangers kunnen hier op 15, 16 en 17 maart stemmen.

  • Nog niet iedereen die mag heeft de brief ontvangen over [Wayback] Per brief stemmen – Gemeente Amsterdam

    Kiesgerechtigden van 70 jaar of ouder kunnen dit jaar ook per post hun stem uitbrengen. Zij ontvangen hiervoor een brief.

  • Stempassen zijn in diverse wijken van Amsterdam nog niet ontvangen, terwijl dat in andere plaatsen (bijvoorbeeld Rotterdam of Teylingen) al wel gebeurd is.
  • [Wayback] Iemand machtigen voor de Tweede Kamerverkiezing van 2021 – Gemeente Amsterdam

    Als u zelf niet kunt stemmen, dan kunt u iemand anders voor u laten stemmen. U laat iemand anders voor u stemmen door die persoon te machtigen. Dat noemen we stemmen bij volmacht. Die persoon noemen we dan de gemachtigde. Lees hier hoe het werkt.

    Schriftelijke volmacht

    Een schriftelijke volmacht gebruikt u bijvoorbeeld als u iemand wilt machtigen die niet in de gemeente Amsterdam woont. Of wanneer u iemand uit Amsterdam of een andere gemeente wilt machtigen voordat de stempassen zijn verzonden. Bijvoorbeeld als u op vakantie gaat.

    Schriftelijk volmacht aanvragen

    U vraagt een schriftelijke volmacht aan bij de gemeente waar u op 1 februari 2021 woont. U kunt de volmacht online aanvragen met uw DigiD of u gebruikt het papieren aanvraagformulier.

    Volmacht online aanvragen

    Liever niet met Digid?

    Volg dan onderstaande stappen.

    • U down­lo­adt het aan­vraag­for­mu­lier Vol­macht.
    • Of u haalt dit for­mu­lier op bij een van de Stadslo­ket­ten. Dat kan van­af woens­dag 24 fe­bru­a­ri 2021.
    • U en de ge­mach­tig­de vul­len al­le­bei een deel van dit for­mu­lier in.
    • U print het for­mu­lier en u on­der­te­kent het. De ge­mach­tig­de moet het for­mu­lier ook on­der­te­ke­nen.

    Het ingevulde en ondertekende formulier kunt u zo indienen:

    • Stuur het per post naar:

    Gemeente Amsterdam
    afdeling Basisinformatie
    Bureau Verkiezingen
    Postbus 2752
    1000 CT Amsterdam

    Tot wanneer opsturen?

    De gemeente moet het formulier uiterlijk vrijdag 12 maart, 17.00 uur hebben ontvangen.

    Aanvraag goedgekeurd

    Als de aanvraag is goedgekeurd, krijgt de gemachtigde een volmachtbewijs thuisgestuurd. Daarmee kan hij of zij namens u stemmen.

Een aantal van de stukjes hierboven komen door het uitklappen van de stukjes Coronamaatregelen tijdens de verkiezingen – Gemeente Amsterdam van [Wayback] Tweede Kamerverkiezingen 2021 – Gemeente Amsterdam en Schriftelijke volmacht van [Wayback] Iemand machtigen voor de Tweede Kamerverkiezing van 2021 – Gemeente Amsterdam.

En dan nog een stukje over Teylingen van [Wayback] Gemeente Teylingen: Volmacht

Schriftelijke volmacht

Met een schriftelijke volmacht kunt u iemand uit dezelfde gemeente of een andere gemeente machtigen om voor u te stemmen. Om een schriftelijke volmacht aan te vragen, stuurt u een verzoekschrift naar de burgemeester van uw gemeente (de gemeente waar u op de dag van kandidaatstelling woont). U gebruikt hiervoor een machtigingsformulier.

Het ingevulde en ondertekende formulier kunt u op een van de volgende manieren aanleveren:

  • Scannen en per e-mail sturen naar: verkiezingen@hltsamen.nl
  • Per post sturen naar:
    Gemeente Teylingen, afd. Publieksservice, verkiezingen
    Postbus 149, 2215 ZJ Voorhout

Intrekken schriftelijke volmacht

Het is niet mogelijk om een schriftelijke volmacht in te trekken. Als een volmacht schriftelijk is aangevraagd, wordt uw stempas namelijk ongeldig verklaard.

Elektronisch verzoek om bij volmacht te stemmen

Wilt u door het coronavirus niet in fysiek contact zijn met degene die u machtigt om te stemmen? Dan kan het gezamenlijk invullen en ondertekeken van het aanvraagformulier lastig zijn. Daarom kunt u voor deze verkiezingen gebruik maken van 2 formulieren. U en uw gemachtigde vullen allebei een eigen formulier in. Hoe dit werkt, leest u hier:

  1. U vult formulier Model G-1 in. Dit is een verzoek aan de burgemeester tot het verlenen van een volmacht.
  2. Degene die u machtigt, vult formulier Model G-2 in. Dit is de verklaring dat de gemachtige instemt om voor u te stemmen.
  3. De gemachtigde stuurt het ingevulde en ondertekende G-2 formulier via e-mail terug naar u.
  4. U stuurt uw formulier en het formulier van de gemachtigde (formulieren G-1 en G-2) via de mail naar: verkiezingen@hltsamen.nl onder vermelding van ‘Volmacht Teylingen’.

Let op!

  • Het formulier moet uiterlijk 5 dagen voor de verkiezingen bij de gemeente binnen zijn. Dit is dit jaar vrijdag 12 maart 2021.
  • Wordt uw aanvraag goedgekeurd? Uw gemachtigde krijgt een volmachtsbewijs, waarmee hij of zij namens u kan stemmen.

Maximaal 3 volmachten

Wordt u gemachtigd om voor iemand anders te stemmen dan mag u bij de komende Tweede Kamerverkiezing maximaal 3 volmachten aannemen. U kunt de volmachtstem alleen tegelijkertijd met uw eigen stem uitbrengen. U overhandigt het volmachtbewijs aan het stembureau. Het stembureau controleert uw identiteit en stempas voordat u mag stemmen.

Schriftelijke volmachten

De verlener van de machtiging moet de aanvraag in zijn/haar/hen woonplaats doen.

Dus niet de woonplaats van de gemachtigde (als ze dezelfde woonplaats hadden, dan had een onderhandse machtiging namelijk veel eenvoudiger geweest).

Netjes gedocumenteerd als [Wayback] Volmacht | Verkiezingen | Kiesraad.nl:

Als een kiezer niet in de gelegenheid is zelf te gaan stemmen – bijvoorbeeld door werk, ziekte of vakantie – kan hij een andere kiezer machtigen dit voor hem te doen. Dit heet stemmen bij volmacht. De persoon die wordt gemachtigd, kan de volmachtstem alleen tegelijkertijd met zijn eigen stem uitbrengen. De volmachtstem kan alleen in persoon in het stemlokaal worden uitgebracht, niet door iemand die per brief stemt. Werkgevers zijn verplicht om kiezers de gelegenheid te geven om hun stem uit te brengen, als dit niet buiten werktijd kan.

Schriftelijke volmacht

Om een schriftelijke volmacht aan te vragen, stuurt de kiezer een verzoekschrift naar de burgemeester van de gemeente waar hij op de dag van kandidaatstelling woonde. Dit verzoekschrift moet uiterijk 5 dagen voor de verkiezing door de burgemeester zijn ontvangen. Zie Kieswet art. L 8 en Kieswet art. L 7. Hiervoor is een formulier beschikbaar (model L8) bij de gemeente. De kiezer en degene die hij machtigt vullen allebei een deel van dit formulier in. De gemachtigde hoeft, anders dan bij een onderhandse volmacht, niet in dezelfde gemeente te wonen. De gemachtigde ontvangt bij inwilliging van het verzoek een volmachtbewijs waarmee hij namens de andere kiezer kan stemmen. Zie Kieswet art. L 6. Deze volmachtstem kan alleen worden uitgebracht door iemand die zelf in het stemlokaal stemt, niet door iemand die per brief stemt.

Intrekken schriftelijke volmacht

Het is niet mogelijk om een schriftelijke volmacht in te trekken. Zie Kieswet art. L 5. Als een volmacht schriftelijk is aangevraagd, wordt de stempas van de volmachtgever namelijk ongeldig verklaard. Zie Kieswet art. J 7a. Het volgnummer van zijn stempas komt vervolgens op de lijst van ongeldige stempassen te staan. Hierdoor is het niet langer mogelijk dat de volmachtgever zijn stem uitbrengt of een vervangende stempas krijgt.

Verkiezingen: schriftelijke volmacht

Verkiezingen: schriftelijke volmacht

jeroen

Read the rest of this entry »

Posted in LifeHacker, Power User, SocialMedia | Leave a Comment »