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,839 other subscribers

Archive for the ‘HTML’ Category

string – Check if MyString[1] is an alphabetical character? – Stack Overflow (and how Embarcadero broke one of the product version neutral redirects)

Posted by jpluimers on 2024/09/24

Quite a while ago [Wayback/Archive] string – Check if MyString[1] is an alphabetical character? – Stack Overflow asked by [Wayback/Archive] User Jeff was answered by [Wayback/Archive] Andreas Rejbrand:

The simplest approach is

function GetAlphaSubstr(const Str: string): string;
const
  ALPHA_CHARS = ['a'..'z', 'A'..'Z'];
var
  ActualLength: integer;
  i: Integer;
begin
  SetLength(result, length(Str));
  ActualLength := 0;
  for i := 1 to length(Str) do
    if Str[i] in ALPHA_CHARS then
    begin
      inc(ActualLength);
      result[ActualLength] := Str[i];
    end;
  SetLength(Result, ActualLength);
end;

but this will only consider English letters as “alphabetical characters”. It will not even consider the extremely important Swedish letters Å, Ä, and Ö as “alphabetical characters”!

Slightly more sophisticated is

function GetAlphaSubstr2(const Str: string): string;
var
  ActualLength: integer;
  i: Integer;
begin
  SetLength(result, length(Str));
  ActualLength := 0;
  for i := 1 to length(Str) do
    if Character.IsLetter(Str[i]) then
    begin
      inc(ActualLength);
      result[ActualLength] := Str[i];
    end;
  SetLength(Result, ActualLength);
end;

Back in 2011 I added a comment that for more than a decade would redirect to the most current documentation on the IsLetter method:

+1 for using IsLetter which checks the Unicode definition for being a letter or not [Wayback] docwiki.embarcadero.com/VCL/en/Character.TCharacter.IsLetter

Back then, Delphi X2 was current, so it would redirect

  1. from [Wayback] http://docwiki.embarcadero.com/VCL/en/Character.TCharacter.IsLetter
  2. to [Wayback] http://docwiki.embarcadero.com/VCL/XE2/en/Character.TCharacter.IsLetter
  3. then to [Wayback] http://docwiki.embarcadero.com/VCL/XE2/en/Character.TCharacter.IsLetter
  4. ending at [Wayback] http://docwiki.embarcadero.com/Libraries/XE2/en/System.Character.TCharacter.IsLetter

After a long outage in 2022 (see The Delphi documentation site docwiki.embarcadero.com has been down/up oscillating for 4 days is now down for almost a day.) only the Alexandria help was restored.

This killed the above redirect.

Luckily [Wayback/Archive] George Birbilis noticed that and commented this:

@JeroenWiertPluimers the correct link now is: docwiki.embarcadero.com/Libraries/Alexandria/en/…

In order to refer to the most recent Delphi version, now you have to use [Wayback] http://docwiki.embarcadero.com/Libraries/en/System.Character.TCharacter.IsLetter.

This redirects:

  1. via [Wayback] http://docwiki.embarcadero.com/Libraries/Alexandria/en/System.Character.TCharacter.IsLetter to
  2. to [Wayback] https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.Character.TCharacter.IsLetter

The above breaks the help integration from older Delphi products which is bad. It is also bad because it makes it harder to port legacy Delphi code to more modern Delphi versions.

Hopefully the above gives you a bit insight how the docwiki help system was designed and what is left of that design.

–jeroen

Posted in Communications Development, Conference Topics, Conferences, Delphi, Development, Encryption, Event, HTML, HTTP, https, HTTPS/TLS security, Internet protocol suite, Power User, Security, Software Development, TCP, TLS, Web Development | Leave a Comment »

View DOM Source bookmarklet

Posted by jpluimers on 2024/09/12

This is cool as it shows the page source not as it was first loaded, but from how it is currently rendered which includes all post-load modifications by any scripts: [Wayback/Archive] View DOM Source bookmarklet.

Via [Wayback/Archive] Martin Splitt on Twitter: “I made a bookmarklet to view the rendered source (aka the DOM) of a page. 👀 🚀 Works with Chrome, Firefox, Safari and possibly others, too. 🌈 Beautifies the code 🎨 Includes syntax highlighting 💻 Get the bookmarklet at 👉 experiments.geekonaut.de/view-dom-source 👈”

Read the rest of this entry »

Posted in Bookmarklet, CSS, Development, HTML, HTML5, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »

GitHub – AnswerDotAI/fasthtml: The fastest way to create an HTML app

Posted by jpluimers on 2024/09/11

The HTMX based [Wayback/Archive] GitHub – AnswerDotAI/fasthtml: The fastest way to create an HTML app

FastHTML is a new next-generation web framework for fast, scalable web applications with minimal, compact code. It’s designed to be:
  • Powerful and expressive enough to build the most advanced, interactive web apps you can imagine.
  • Fast and lightweight, so you can write less code and get more done.
  • Easy to learn and use, with a simple, intuitive syntax that makes it easy to build complex apps quickly.
FastHTML apps are just Python code, so you can use FastHTML with the full power of the Python language and ecosystem.
Could this be something for me?

Via [Wayback/Archive] Erik Meijer on X: “Reverse selling in full action.”

Read the rest of this entry »

Posted in Deployment, Development, HTML, htmx, Python, Scripting, Software Development, Web Development | Leave a Comment »

Belastingaangifte 2023 met Excel gratis downloaden | Computer Idee

Posted by jpluimers on 2024/08/27

Dit jaar was ik er een paar dagen eerder bij dan vorig jaar: meer rust in mijn hoofd na de verhuizing en een betere planning gemaakt rondom de paardrijvakantie van mijn verstandelijk beperkte broer (waar we altijd zorgen daar in de buurt te zijn zodat we indien nodig snel ter plaatse kunnen handelen).

Waarom is deze blog post zo laat?

Het laat heeft er vooral mee te maken dat deze Excel sheet meestal nog een aantal wijzigingen krijgt na de normale deadline van 1 mei. Dus ik begin pas met downloaden de maand voor de echt harde deadline van 1 september.

Waarom dan toch nu de post?

Eigenlijk is dat heel simpel: vooral zodat je kunt zien hoe je aan deze informatie komt ook al wijzigen de locaties: waar vorig jaar het Excel-bestand voor de belastingaangifte nog bij Google stond, staat het deze keer bij WeTransfer.

Dit jaar zijn de linkjes her en der dus behoorlijk anders: meer dan een simpele vervanging van 2022 door 2023 in de start-link van de eerste Google Search onderaan mijn blog-post.

Let ook op (dit vergat ik vorig jaar te vermelden): dit Excel bestand werkt bij mij niet op Office voor MacOS.

Omdat Computer Idee meestal geen jaartallen in de titels van hun artikelen gebruikt, moet je handmatig de zoekresultaten van Google Search door om te zien welke relevant voor aangifte over afgelopen jaar (in dit geval 2023) is/zijn. Vandaar dat ik hieronder op een aantal plekken jaartellen heb toegevoegd:

Read the rest of this entry »

Posted in Development, Excel, HTML, Office, Power User, Software Development, Web Development | 2 Comments »

How to apply border inside a table ? – GeeksforGeeks

Posted by jpluimers on 2024/06/20

It is deprecated but still works and an easy way to quickly set the inner borders of an HTML table: use the rules attribute.

Read the rest of this entry »

Posted in Development, HTML, HTML5, Software Development, Web Development | Leave a Comment »

I needed an online HTML render because a site had HTML output you could not copy the render from

Posted by jpluimers on 2024/06/19

Let me explain what I needed based on a few tweets (Dutch, but will translate below):

Read the rest of this entry »

Posted in Development, Health, Hospital, HTML, LifeHacker, LUMC, Power User, Software Development, Web Development | Leave a Comment »

Converting html div tables to normal tables

Posted by jpluimers on 2024/06/12

Sometimes normal html tables are better suited than the more style friendly div tables, as they better suit the underlying data and are easier when you need column or row spans using the colspan and rowspan html attributes, explain semantics better, and … display as tables even without styling!

Converting from div tables to normal html tables is not as straightforward than from normal html tables to div tables.

So here are some links that helped me with both div tables and the conversion:

–jeroen

Posted in Development, HTML, JavaScript/ECMAScript, jQuery, Scripting, Software Development, Web Development | Leave a Comment »

Fixing the GitHub gist CSS so the editor uses more than 25% of my screen estate

Posted by jpluimers on 2024/06/05

Two years ago I asked [Wayback/Archive] Jeroen Wiert Pluimers on Twitter: “Is there a way to make the @github gist text editor wider and taller? Right now (at 1920×1200) it uses about half the screen width and screen height. That wastes about 25% of screen estate. “.

I still have to figure out how to fix the height, but the width was relatively easy back then. Hopefully this CSS fix still works today.

In the mean time [Wayback/Archive] Add full height gist creation by xthexder · Pull Request #68 · xthexder/wide-github: Conversation permanently fixed my problem.

[Wayback/Archive] Jeroen Wiert Pluimers on Twitter: “I fixed the width by modifying .container-lg and changing max-width from 1018px to 95%.”

Until GitHub fixes it themselves, I started with this fix in the extension [Wayback/Archive] Stylus – Chrome Web Store:

Read the rest of this entry »

Posted in CSS, Development, DVCS - Distributed Version Control, gist, GitHub, HTML, Software Development, Source Code Management, Web Development | Leave a Comment »

Web UI/UX & coding tip: if you have tabular data, display them using table/tr/th/td (via Victor on Twitter)

Posted by jpluimers on 2024/05/01

So true:

[Wayback/Archive] Victor on Twitter: “UI/UX & Coding Tip 💡 Do you need to display table data? Use tables. Yes, , and . Yes, it’s fine. No, you don’t need flex, grids, divs, and all that. Why? Because it’s a table 🤷‍♂️”

UI/UX & Coding Tip 💡

Do you need to display table data? Use tables.

Yes, <table>, <tr> and <td>.

Yes, it’s fine. No, you don’t need flex, grids, divs, and all that.

Why? Because it’s a table 🤷‍♂️

Read the rest of this entry »

Posted in Development, HTML, HTML5, Software Development, Web Development | Leave a Comment »

Open source StackOverflow/StackExchange like project codidact/qpixel: Q&A-based community knowledge-sharing software

Posted by jpluimers on 2024/04/10

Cool project for a community driven open source site (written mostly in Ruby): [Wayback/Archive] codidact/qpixel: Q&A-based community knowledge-sharing software

Rails-based version of our core software, powering codidact.com. Currently under active development towards MVP.

There are more related repositories under [Wayback/Archive] Codidact.

The project is explained at [Wayback/Archive] Codidact – Helping each other learn.

The many communities are at [Wayback/Archive] Codidact, including:

Via [Wayback/Archive] User Quasímodo – Unix & Linux Stack Exchange.

–jeroen

Posted in Development, HTML, Pingback, Ruby, Software Development, Stackoverflow, Web Development | Leave a Comment »