<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://chuacw.ath.cx/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Chee Wee&amp;#39;s discoveries and tech blog</title><subtitle type="html">Changing the world one line of code at a time...</subtitle><id>https://chuacw.ath.cx/Development/b/chuacw/atom.aspx</id><link rel="alternate" type="text/html" href="https://chuacw.ath.cx/Development/b/chuacw/default.aspx" /><link rel="self" type="application/atom+xml" href="https://chuacw.ath.cx/Development/b/chuacw/atom.aspx" /><generator uri="http://telligent.com" version="5.6.582.12810">Community Server</generator><updated>2017-11-16T15:56:00Z</updated><entry><title>Delphi Observers Part 6: Building the Base Framework</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2026/05/01/delphi-observers-part-6-building-the-base-framework.aspx" /><id>/Development/b/chuacw/archive/2026/05/01/delphi-observers-part-6-building-the-base-framework.aspx</id><published>2026-05-01T05:56:00Z</published><updated>2026-05-01T05:56:00Z</updated><content type="html">Understanding how the VCL uses observers internally is fascinating, but to use this pattern in our own applications, we need a clean way to implement these interfaces. Without a base framework, you would find yourself writing the same boilerplate code for GetActive , SetActive , and interface management over and over. Step 1: The Core Boilerplate (TBaseObserver) First, we need a class that implements the basic IObserver interface. This class handles the Active state and the OnObserverToggle event...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2026/05/01/delphi-observers-part-6-building-the-base-framework.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=9154" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /><category term="TObservers" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/TObservers/default.aspx" /></entry><entry><title>Delphi Observers Part 5: Validation in Action: TCheckBox</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2026/04/01/delphi-observers-part-5-validation-in-action-tcheckbox.aspx" /><id>/Development/b/chuacw/archive/2026/04/01/delphi-observers-part-5-validation-in-action-tcheckbox.aspx</id><published>2026-04-01T05:45:00Z</published><updated>2026-04-01T05:45:00Z</updated><content type="html">In Part 4 , we saw how TEdit and TMemo &amp;#39;s ancestor: TCustomEdit uses observers to manage passive states like ReadOnly . However, TCustomCheckBox and hence, any descendants, demonstrates a much more aggressive use of the pattern: Active Interception . The KeyPress Sentry A TCustomCheckBox doesn&amp;#39;t just wait for a value to change; it actively consults its observers during user input. In the KeyPress override, the TCustomCheckBox checks if an EditLinkID observer is present and if it is currently...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2026/04/01/delphi-observers-part-5-validation-in-action-tcheckbox.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=9153" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /><category term="TObservers" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/TObservers/default.aspx" /></entry><entry><title>Delphi Observers Part 4: Active Interception - TCustomEdit</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2026/03/23/delphi-observers-part-4-active-interception-tcustomedit.aspx" /><id>/Development/b/chuacw/archive/2026/03/23/delphi-observers-part-4-active-interception-tcustomedit.aspx</id><published>2026-03-23T09:11:00Z</published><updated>2026-03-23T09:11:00Z</updated><content type="html">In the previous articles, we established how the observer engine is initialized. Now, let&amp;rsquo;s look at how a professional-grade component like TEdit uses these hooks to manage UI state. We&amp;#39;ll look at its ancestor: TCustomEdit. The Opt-in Override For a TCustomEdit to participate in the observer pattern, it must explicitly signal support for specific IDs in CanObserve . Specifically, it looks for EditLinkID (for data binding) and ControlValueID (for simple change monitoring). function TCustomEdit...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2026/03/23/delphi-observers-part-4-active-interception-tcustomedit.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=9152" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /><category term="TObservers" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/TObservers/default.aspx" /></entry><entry><title>Delphi Observers Part 3: The Component Gatekeeper</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2026/03/23/delphi-observers-part-3-the-component-gatekeeper.aspx" /><id>/Development/b/chuacw/archive/2026/03/23/delphi-observers-part-3-the-component-gatekeeper.aspx</id><published>2026-03-23T08:54:00Z</published><updated>2026-03-23T08:54:00Z</updated><content type="html">In the previous article, we saw how TComponent initializes the observer engine. However, simply having an engine doesn&amp;#39;t mean a component knows how to use it. To manage this, Delphi uses a &amp;quot;Gatekeeper&amp;quot; pattern consisting of two key virtual methods. The Default &amp;quot;No&amp;quot; By default, a component is a closed door. If you attempt to attach an observer to a generic TComponent , it will fail. This is because the default implementation of the check-method is strictly pessimistic: function...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2026/03/23/delphi-observers-part-3-the-component-gatekeeper.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=9151" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /><category term="TObservers" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/TObservers/default.aspx" /></entry><entry><title>Delphi Observers Part 2: Lifecycle: From Lazy-Init to Destroy</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2026/02/02/delphi-observers-part-2-lifecycle-from-lazy_2D00_init-to-destroy.aspx" /><id>/Development/b/chuacw/archive/2026/02/02/delphi-observers-part-2-lifecycle-from-lazy_2D00_init-to-destroy.aspx</id><published>2026-02-02T06:34:00Z</published><updated>2026-02-02T06:34:00Z</updated><content type="html">In Part 1 , we looked at the interfaces that define the Observer pattern in Delphi. But how do these observers actually get created and managed within a standard VCL component? The answer lies in the base of the entire VCL/FMX hierarchy: TComponent . The Lazy-Loading Pattern Delphi engineers faced a challenge: they wanted every component to be capable of supporting observers, but they didn&amp;#39;t want to bloat the memory footprint of simple components that never use them. The solution is a &amp;quot;Lazy...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2026/02/02/delphi-observers-part-2-lifecycle-from-lazy_2D00_init-to-destroy.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=9150" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /><category term="TObservers" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/TObservers/default.aspx" /></entry><entry><title>Delphi Observers Part 1: The Foundation (2017–2026)</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2026/01/05/delphi-observers-part-1-the-foundation-2017-2026.aspx" /><id>/Development/b/chuacw/archive/2026/01/05/delphi-observers-part-1-the-foundation-2017-2026.aspx</id><published>2026-01-05T05:18:00Z</published><updated>2026-01-05T05:18:00Z</updated><content type="html">&lt;p&gt;In 2017, with the release of &lt;strong&gt;&lt;a href="https://docwiki.embarcadero.com/Libraries/Tokyo/en/Main_Page"&gt;Delphi 10.2 Tokyo&lt;/a&gt;&lt;/strong&gt;, Embarcadero introduced a specialized implementation of the Observer pattern into the &lt;code&gt;&lt;a href="https://docwiki.embarcadero.com/Libraries/Tokyo/en/System.Classes"&gt;System.Classes&lt;/a&gt;&lt;/code&gt;
 unit. While it has been in the wild for 9 years, it remains a &amp;quot;hidden&amp;quot; 
architecture for many, primarily because it serves as the invisible 
engine behind &lt;strong&gt;&lt;a href="https://docwiki.embarcadero.com/RADStudio/en/LiveBindings_in_RAD_Studio"&gt;LiveBindings&lt;/a&gt;&lt;/strong&gt;.
 Other than live bindings, you can also use the Observer pattern as a 
way to update component settings to the Windows registry, an .ini file, 
or persist it elsewhere.&lt;/p&gt;...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2026/01/05/delphi-observers-part-1-the-foundation-2017-2026.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=9149" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /><category term="TObservers" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/TObservers/default.aspx" /></entry><entry><title>Why the RAD Studio IDE doesn't implement the "Follow" feature </title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2025/12/11/why-the-rad-studio-ide-doesn-t-implement-the-quot-follow-quot-feature.aspx" /><id>/Development/b/chuacw/archive/2025/12/11/why-the-rad-studio-ide-doesn-t-implement-the-quot-follow-quot-feature.aspx</id><published>2025-12-11T11:13:00Z</published><updated>2025-12-11T11:13:00Z</updated><content type="html">In the RAD Studio IDE, when you switch to assembly, and your [R]IP is on a call or a branch instruction, the IDE provides a &amp;quot;Follow&amp;quot; feature, that allows you to follow (using Ctrl+F) to go to the target address, for CALL, JUMP or branch instructions. This feature is available in the IDE where the debugging kernel uses the native Debug Kernel (DBK) which was developed for Windows. On IDEs which uses the LLDB debug kernel, this feature is not available, because Embarcadero&amp;#39;s IDE doesn&amp;#39;t...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2025/12/11/why-the-rad-studio-ide-doesn-t-implement-the-quot-follow-quot-feature.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=9107" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Debugging in Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Debugging+in+Delphi/default.aspx" /><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>Converting TDateTime to TValue</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2025/11/30/converting-tdatetime-to-tvalue.aspx" /><id>/Development/b/chuacw/archive/2025/11/30/converting-tdatetime-to-tvalue.aspx</id><published>2025-11-30T06:58:00Z</published><updated>2025-11-30T06:58:00Z</updated><content type="html">Previously, I talked about how the TDateTime triumvirate caused issues in runtime packages. Today, I&amp;#39;ll discuss why using implicit operators with TValue and the TDateTime triumvirate causes TValue to end up with the wrong type information. TValue is a record that stores both a value and its associated PTypeInfo, allowing RTTI-based code to inspect types and values at runtime. It exposes many implicit operators (e.g. from Integer, Double, TObject, TDateTime, TTime, etc.) so that assignments like...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2025/11/30/converting-tdatetime-to-tvalue.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=9098" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /><category term="TDate" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/TDate/default.aspx" /><category term="TTime" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/TTime/default.aspx" /><category term="TDateTime" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/TDateTime/default.aspx" /><category term="runtime packages" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/runtime+packages/default.aspx" /></entry><entry><title>Delphi: an inconsistent and illogical language</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2025/10/24/delphi-an-inconsistent-and-illogical-language.aspx" /><id>/Development/b/chuacw/archive/2025/10/24/delphi-an-inconsistent-and-illogical-language.aspx</id><published>2025-10-24T13:05:00Z</published><updated>2025-10-24T13:05:00Z</updated><content type="html">The more Delphi is being used, the more you&amp;#39;ll find that it is an inconsistent and illogical language. Over the years, Delphi has started becoming an inconsistent and illogical language, the more I use it. For example, Exit(value) is supposed to be a shorthand for &amp;quot;Result := value; Exit&amp;quot; right? But it&amp;#39;s not, when used in the example program below: program ExitBug; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, System.Classes; {$DEFINE BUG} // Comment out this line to see it...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2025/10/24/delphi-an-inconsistent-and-illogical-language.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=9080" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>Solana lessons &amp; resources</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2025/09/08/solana-lessons-amp-resources.aspx" /><id>/Development/b/chuacw/archive/2025/09/08/solana-lessons-amp-resources.aspx</id><published>2025-09-08T14:51:48Z</published><updated>2025-09-08T14:51:48Z</updated><content type="html">A clearance list of Solana lessons &amp;amp; resources I&amp;#39;ve picked up recently. Intro to Solana and Blockchain Lesson video - https://youtu.be/vrO6cjdPUOs Lesson resources - https://github.com/Ackee-Blockchain/school-of-solana/tree/master/1.lesson Docker image - https://github.com/Ackee-Blockchain/school-of-solana/blob/master/1.lesson/Docker.md Rust intro Lesson video - https://youtu.be/K7BiXI8kqm0 Lesson resources - https://github.com/Ackee-Blockchain/school-of-solana/tree/master/2.lesson Solana...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2025/09/08/solana-lessons-amp-resources.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=9058" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Blockchain" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Blockchain/default.aspx" /><category term="Anchor" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Anchor/default.aspx" /><category term="Solana" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Solana/default.aspx" /><category term="Debugging" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Debugging/default.aspx" /></entry><entry><title>The history of TDateTime, TDate &amp; TTime and why they cause issues in packages and libraries</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2025/08/01/the-history-of-tdatetime-tdate-amp-ttime-and-why-they-cause-issues-in-packages-and-libraries.aspx" /><id>/Development/b/chuacw/archive/2025/08/01/the-history-of-tdatetime-tdate-amp-ttime-and-why-they-cause-issues-in-packages-and-libraries.aspx</id><published>2025-08-01T00:30:00Z</published><updated>2025-08-01T00:30:00Z</updated><content type="html">Last time, I talked about the $OBJTYPENAME directive . This post has a little something to do with it. There are issues with using TDateTime, TDate and TTime when you have overloaded routines with differentiating parameters of TDateTime, TDate and TTime, and you use runtime packages. These issues affect all projects using packages and libraries (to avoid repeating, I&amp;#39;ll just use package(s) forthwith). When projects uses any of the above types and use run-time packages, results might be unexpected...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2025/08/01/the-history-of-tdatetime-tdate-amp-ttime-and-why-they-cause-issues-in-packages-and-libraries.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=9041" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>Undocumented parameters for $OBJTYPENAME</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2025/07/17/undocumented-parameters-for-objtypename.aspx" /><id>/Development/b/chuacw/archive/2025/07/17/undocumented-parameters-for-objtypename.aspx</id><published>2025-07-17T08:20:00Z</published><updated>2025-07-17T08:20:00Z</updated><content type="html">Currently, the documentation for $OBJTYPENAME is located at Embarcadero&amp;#39;s docwiki: OBJTYPENAME directive (Delphi) . But if you look at System.pas in Delphi/RAD Studio 12, you&amp;#39;ll see some undocumented parameters usage of $OBJTYPENAME: {$EXTERNALSYM NativeInt &amp;#39;NativeInt&amp;#39; } {$OBJTYPENAME NativeInt &amp;#39;Bj&amp;#39; &amp;#39;Gx&amp;#39; &amp;#39;V_J&amp;#39;} {$EXTERNALSYM NativeUInt &amp;#39;NativeUInt&amp;#39; } {$OBJTYPENAME NativeUInt &amp;#39;Buj&amp;#39; &amp;#39;Gy&amp;#39; &amp;#39;V_K&amp;#39;} What are the 2 undocumented parameters...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2025/07/17/undocumented-parameters-for-objtypename.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=9031" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Undocumented" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Undocumented/default.aspx" /><category term="compiler directives" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/compiler+directives/default.aspx" /><category term="directives" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/directives/default.aspx" /><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>Embarcadero announces RAD Studio 13 beta</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2025/06/28/embarcadero-announces-rad-studio-13-beta.aspx" /><id>/Development/b/chuacw/archive/2025/06/28/embarcadero-announces-rad-studio-13-beta.aspx</id><published>2025-06-27T18:04:56Z</published><updated>2025-06-27T18:04:56Z</updated><content type="html">Embarcadero has announced the RAD Studio 13 beta and invites customers to join it! Codenamed Ganymede, RAD Studio 13 will be named Florence. Only customers on the update subscription will be invited to join the beta testing, and Embarcadero has already sent invitations to customers on subscription....(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2025/06/28/embarcadero-announces-rad-studio-13-beta.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=9020" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author></entry><entry><title>UInt64 bugs in the Delphi RTL</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2025/05/13/uint64-bugs-in-the-delphi-rtl.aspx" /><id>/Development/b/chuacw/archive/2025/05/13/uint64-bugs-in-the-delphi-rtl.aspx</id><published>2025-05-13T05:54:25Z</published><updated>2025-05-13T05:54:25Z</updated><content type="html">I&amp;#39;ve been working on the JSON RPC framework, which was previously public , but has gone private . During its development, I&amp;#39;ve discovered at least 2 bugs in the Delphi RTL regarding UInt64: Bug in TJsonTextReader.ParseNumber prevents deserializing UInt64 JSON Text Writer bug causes incorrect writing of an encapsulated UInt64 in TValue TJsonReader is missing ReadAsUInt64 Despite the System.JSON framework being in the RTL for several years, it seems it&amp;#39;s still not mature enough, because...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2025/05/13/uint64-bugs-in-the-delphi-rtl.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=9004" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /><category term="JSON RPC" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/JSON+RPC/default.aspx" /></entry><entry><title>How I fixed this blog to stop spam</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2025/04/25/how-i-fixed-this-blog-to-stop-spam.aspx" /><id>/Development/b/chuacw/archive/2025/04/25/how-i-fixed-this-blog-to-stop-spam.aspx</id><published>2025-04-25T06:45:00Z</published><updated>2025-04-25T06:45:00Z</updated><content type="html">Over 4 months ago, I&amp;#39;ve enabled comments for blogs site-wide, and I wasn&amp;#39;t aware at that time, but spam started coming in. Yesterday, I started looking into how to stop spam from coming into my blog. First, I brushed up some old code, and created a new assembly in Visual Studio 2022. Then, I added the following code: &amp;lt;%@ Import Namespace=&amp;quot;chuacw.TelligentCommunity&amp;quot; %&amp;gt; &amp;lt;%@ Import Namespace=&amp;quot;chuacw.WebControls&amp;quot; %&amp;gt; &amp;lt;%@ Register TagPrefix=&amp;quot;cw&amp;quot; Namespace...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2025/04/25/how-i-fixed-this-blog-to-stop-spam.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=9002" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="C#" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/C_2300_/default.aspx" /></entry><entry><title>Reverse engineering bundled Javascript code</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2025/03/24/reverse-engineering-bundled-javascript-code.aspx" /><id>/Development/b/chuacw/archive/2025/03/24/reverse-engineering-bundled-javascript-code.aspx</id><published>2025-03-24T11:02:53Z</published><updated>2025-03-24T11:02:53Z</updated><content type="html">One of the ways to reverse engineer Javascript code that&amp;#39;s bundled is to use an applet known as Shuji . Shuji is an applet that, in its owner&amp;#39;s words: &amp;quot;Reverse engineering JavaScript and CSS sources from sourcemaps&amp;quot;....(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2025/03/24/reverse-engineering-bundled-javascript-code.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=8690" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Javascript" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Javascript/default.aspx" /><category term="Reverse Engineer" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Reverse+Engineer/default.aspx" /></entry><entry><title>The undocumented Delphi signature directive</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2025/03/24/the-undocumented-delphi-signature-directive.aspx" /><id>/Development/b/chuacw/archive/2025/03/24/the-undocumented-delphi-signature-directive.aspx</id><published>2025-03-24T10:51:24Z</published><updated>2025-03-24T10:51:24Z</updated><content type="html">I&amp;#39;ve accidentally stumbled upon the --no-compiler-signature directive that you can use to make your generated Delphi executable slightly smaller. Add it to the &amp;quot;Additional options to pass to the compiler&amp;quot; in project options -&amp;gt; Building -&amp;gt; Delphi Compiler -&amp;gt; Compiling node, and not only can your generated file reduce a little bit in size, it can also remove the string &amp;quot;Embarcadero Delphi for Win64 compiler version&amp;quot; away from the generated file....(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2025/03/24/the-undocumented-delphi-signature-directive.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=8687" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi for Win32" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi+for+Win32/default.aspx" /><category term="Undocumented" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Undocumented/default.aspx" /><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>How to resolve a stucked "file:" dependency in npm</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2024/10/02/how-to-resolve-a-stucked-quot-file-quot-dependency-in-npm.aspx" /><id>/Development/b/chuacw/archive/2024/10/02/how-to-resolve-a-stucked-quot-file-quot-dependency-in-npm.aspx</id><published>2024-10-02T13:09:40Z</published><updated>2024-10-02T13:09:40Z</updated><content type="html">In npm, after running the npm link command to enable your package to be linkable, it&amp;#39;s possible to get stuck in a dependency hell, where in the dependency section of your package.json, you get &amp;quot;dependencies&amp;quot;: { &amp;quot;your_package_name&amp;quot;: &amp;quot;file:&amp;quot;, }, This is where no matter what you try to do, &amp;quot;your_package_name&amp;quot;: &amp;quot;file:&amp;quot; just wouldn&amp;#39;t get removed from the dependencies. I spent hours of research, and eventually found out that in order to remove this...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2024/10/02/how-to-resolve-a-stucked-quot-file-quot-dependency-in-npm.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7490" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Node.js" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Node-js/default.aspx" /><category term="npm" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/npm/default.aspx" /></entry><entry><title>Repairing snap on Ubuntu 24.04 LTS</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2024/06/03/repairing-snap-on-ubuntu-24-04-lts.aspx" /><id>/Development/b/chuacw/archive/2024/06/03/repairing-snap-on-ubuntu-24-04-lts.aspx</id><published>2024-06-03T14:08:00Z</published><updated>2024-06-03T14:08:00Z</updated><content type="html">sudo apt install snapd sudo snap install snap-store sudo snap refresh --beta core22 sudo snap refresh --stable core22 sudo snap remove core24 sudo snap install core24 snap refresh snap-store --channel=latest/stable/ubuntu-24.04...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2024/06/03/repairing-snap-on-ubuntu-24-04-lts.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7488" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Unix / Linux" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Unix+_2F00_+Linux/default.aspx" /></entry><entry><title>The anatomy of a Firefox add-on</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2023/12/07/the-anatomy-of-a-firefox-add-on.aspx" /><id>/Development/b/chuacw/archive/2023/12/07/the-anatomy-of-a-firefox-add-on.aspx</id><published>2023-12-06T16:31:21Z</published><updated>2023-12-06T16:31:21Z</updated><content type="html">This month, I&amp;#39;ve learnt how to build a Firefox add-on, and learnt that if one desires to do so, there&amp;#39;s practically no difference between a Firefox add-on and a Chrome add-on, so, it&amp;#39;s theoretically possible to build an add-on that runs on both Firefox and Chrome. Mozilla has some restrictions, for example, if you use a third-party library, you must use an unmodified copy of the library. But barring these restrictions, if your add-on is entirely self-contained, the add-on is approved...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2023/12/07/the-anatomy-of-a-firefox-add-on.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7485" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Javascript" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Javascript/default.aspx" /><category term="Browser add-ons" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Browser+add_2D00_ons/default.aspx" /></entry><entry><title>Building the foundation to access blockchains in Delphi</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2023/11/18/building-the-foundation-to-access-blockchains-in-delphi.aspx" /><id>/Development/b/chuacw/archive/2023/11/18/building-the-foundation-to-access-blockchains-in-delphi.aspx</id><published>2023-11-17T23:46:00Z</published><updated>2023-11-17T23:46:00Z</updated><content type="html">Since late June, I&amp;#39;ve been building a framework to access any JSON RPC technologies in Delphi. I&amp;#39;m pleased to announce that the JSON RPC framework is now on Github. With this framework, it&amp;#39;s now much easier to access any JSON RPC technology, as well as most blockchain APIs, since most of them were built upon JSON RPC technologies....(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2023/11/18/building-the-foundation-to-access-blockchains-in-delphi.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7484" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /><category term="Github" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Github/default.aspx" /><category term="JSON RPC" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/JSON+RPC/default.aspx" /></entry><entry><title>Preparing for writing Move contracts</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2023/04/22/preparing-for-writing-move-contracts.aspx" /><id>/Development/b/chuacw/archive/2023/04/22/preparing-for-writing-move-contracts.aspx</id><published>2023-04-21T17:14:00Z</published><updated>2023-04-21T17:14:00Z</updated><content type="html">Since early April, I&amp;#39;ve discovered 2 new blockchains, Sui and Aptos. Both Sui and Aptos uses the Move language ( Sui variant ), and both of which uses a subset of the Rust language. In order to start developing for Move, the best IDE to use is any variant of the IntelliJ IDEA IDE. There is a free version of the IntelliJ IDE, the IntelliJ Community that you can download. After that, you&amp;#39;ll need to install Pontem Network&amp;#39;s Move plugin . Once that&amp;#39;s settled, you&amp;#39;ll be able to create...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2023/04/22/preparing-for-writing-move-contracts.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7482" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Blockchain" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Blockchain/default.aspx" /><category term="Move" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Move/default.aspx" /></entry><entry><title>RAD Studio plugin: WelcomePage Favourites Editor</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2023/03/02/rad-studio-plugin-welcomepage-favourites-editor.aspx" /><id>/Development/b/chuacw/archive/2023/03/02/rad-studio-plugin-welcomepage-favourites-editor.aspx</id><published>2023-03-02T15:22:00Z</published><updated>2023-03-02T15:22:00Z</updated><content type="html">The WelcomePage Favourites Editor is an integrated plugin that you can add to the WelcomePage. After installation of the WelcomePage Favourites Editor, it&amp;#39;s immediately available in the WelcomePage layout editor. Because both the &amp;quot;Open Recent&amp;quot; and &amp;quot;Recent Files / Favourites&amp;quot; plugin shares duplicated functionality, I&amp;#39;ve removed the &amp;quot;Open Recent&amp;quot; plugin provided by Embarcadero from the Layout itself, but it&amp;#39;s still available on the &amp;quot;Available Plugins&amp;quot;...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2023/03/02/rad-studio-plugin-welcomepage-favourites-editor.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7477" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Debugging in Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Debugging+in+Delphi/default.aspx" /><category term="ToolsAPI" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/ToolsAPI/default.aspx" /><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /><category term="Plugins" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Plugins/default.aspx" /></entry><entry><title>RAD Studio plugin: Android Log Viewer</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2023/02/28/rad-studio-plugin-android-log-viewer.aspx" /><id>/Development/b/chuacw/archive/2023/02/28/rad-studio-plugin-android-log-viewer.aspx</id><published>2023-02-28T11:31:22Z</published><updated>2023-02-28T11:31:22Z</updated><content type="html">The Android Log Viewer is an integrated plugin that launches automatically when it has detected that you&amp;#39;ve launched a debugging session. After installation of the Android Log Viewer, it&amp;#39;ll launch automatically when debugging an Android application within the IDE. It&amp;#39;ll only show log messages exclusive to your application, so that you don&amp;#39;t have to deal with debug messages from other applications. Once your debugging session ends, logging will stop. In the screen shot below, you&amp;#39;ll...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2023/02/28/rad-studio-plugin-android-log-viewer.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7476" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Debugging in Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Debugging+in+Delphi/default.aspx" /><category term="ToolsAPI" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/ToolsAPI/default.aspx" /><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /><category term="Plugins" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Plugins/default.aspx" /></entry><entry><title>A Plugin Common RTL for Delphi and many plugins built on it...</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2023/02/27/a-plugin-common-rtl-for-delphi-and-many-plugins-built-on-it.aspx" /><id>/Development/b/chuacw/archive/2023/02/27/a-plugin-common-rtl-for-delphi-and-many-plugins-built-on-it.aspx</id><published>2023-02-27T12:55:00Z</published><updated>2023-02-27T12:55:00Z</updated><content type="html">Over the past few years, I&amp;#39;ve been building a RTL for building plugins in RAD Studio, with many classes and functionality. With the latest RAD Studio, I now have these plugins built: Add Directory - adds directories as read-only, in-memory, so that any files from those directories will not be accidentally edited. Android Log Viewer - integrated log tool for debugging Android processes, opens up automatically when debugging on Android. Copy Name to Clipboard - Copies the EXE&amp;#39;s full path name...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2023/02/27/a-plugin-common-rtl-for-delphi-and-many-plugins-built-on-it.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7475" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="ToolsAPI" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/ToolsAPI/default.aspx" /><category term="RAD Studio" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/RAD+Studio/default.aspx" /><category term="Tools" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Tools/default.aspx" /></entry><entry><title>Using MSBuild to compile disables debugging</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2023/02/23/using-msbuild-to-compile-disables-debugging.aspx" /><id>/Development/b/chuacw/archive/2023/02/23/using-msbuild-to-compile-disables-debugging.aspx</id><published>2023-02-23T09:11:07Z</published><updated>2023-02-23T09:11:07Z</updated><content type="html">In RAD Studio, checking the &amp;quot;Use MSBuild externally to compile&amp;quot; causes debugging to go into assembly mode, instead of the source. In order to resolve this, one needs to enable &amp;quot;Include remote debug symbols&amp;quot;....(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2023/02/23/using-msbuild-to-compile-disables-debugging.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7474" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Debugging in Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Debugging+in+Delphi/default.aspx" /><category term="Tips" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Tips/default.aspx" /><category term="RAD Studio" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/RAD+Studio/default.aspx" /><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>Undocumented procedural type compatibility</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2023/01/19/undocumented-procedural-type-compatibility.aspx" /><id>/Development/b/chuacw/archive/2023/01/19/undocumented-procedural-type-compatibility.aspx</id><published>2023-01-19T08:34:00Z</published><updated>2023-01-19T08:34:00Z</updated><content type="html">Recently, I stumbled upon a new undocumented procedural type compatibility in Delphi. Since Delphi 10.3, &amp;quot;reference to procedure&amp;quot; is compatible with both &amp;quot;procedure of object&amp;quot; and &amp;quot;procedure&amp;quot;, which means &amp;quot;reference to function: X&amp;quot; is compatible with &amp;quot;function: X of object&amp;quot; and &amp;quot;function: X&amp;quot;. Here&amp;#39;s a short example. If you compile the following, there&amp;#39;s no errors. uses System.SysUtils; procedure MyProc; begin end; function MyFunc...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2023/01/19/undocumented-procedural-type-compatibility.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7473" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Undocumented" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Undocumented/default.aspx" /><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /><category term="Language" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Language/default.aspx" /></entry><entry><title>Notes on how to handle Ctrl+Click in the RAD Studio IDE</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2022/12/22/notes-on-how-to-handle-ctrl-click-in-the-rad-studio-ide.aspx" /><id>/Development/b/chuacw/archive/2022/12/22/notes-on-how-to-handle-ctrl-click-in-the-rad-studio-ide.aspx</id><published>2022-12-21T23:15:00Z</published><updated>2022-12-21T23:15:00Z</updated><content type="html">The OTA provides a way for an IOTACodeInsightManager100 to handle GotoDefinition. Before Denali, the IDE would use the Syntax Highlight information for the file to determine when GotoDefinition was valid; but that has changed now: there&amp;#39;s a new interface, IOTACodeInsightUIOverride that you can implement: its member EnableGotoDefinition allows you to tell the IDE when GoToDefinition is valid for any location in a file your CodeInsightManager handles. So now, an implementation of IOTACodeInsightManager100...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2022/12/22/notes-on-how-to-handle-ctrl-click-in-the-rad-studio-ide.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7472" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="OTA" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/OTA/default.aspx" /><category term="ToolsAPI" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/ToolsAPI/default.aspx" /><category term="RAD Studio" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/RAD+Studio/default.aspx" /><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>How to make Windows Terminal the default terminal on Windows 10/2022</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2022/11/17/how-to-make-windows-terminal-the-default-terminal-on-windows-10-2022.aspx" /><id>/Development/b/chuacw/archive/2022/11/17/how-to-make-windows-terminal-the-default-terminal-on-windows-10-2022.aspx</id><published>2022-11-16T17:11:00Z</published><updated>2022-11-16T17:11:00Z</updated><content type="html">Open up regedit, and go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths Create a new key named cmd.exe and set its default value to the path where you&amp;#39;ve installed your Windows Terminal. This makes use of an alias to launch Windows Terminal instead of cmd.exe Doing this will allow you to launch Windows Terminal when you type cmd or cmd.exe in Start, Run dialog in Windows. If you run cmd in a terminal, it will still launch cmd.exe instead of wt.exe Also, if you want to...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2022/11/17/how-to-make-windows-terminal-the-default-terminal-on-windows-10-2022.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7467" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Windows" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Windows/default.aspx" /><category term="Hacking" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Hacking/default.aspx" /></entry><entry><title>Why use an Assertion Function in TypeScript</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2022/10/31/why-use-an-assertion-function-in-typescript.aspx" /><id>/Development/b/chuacw/archive/2022/10/31/why-use-an-assertion-function-in-typescript.aspx</id><published>2022-10-31T09:51:00Z</published><updated>2022-10-31T09:51:00Z</updated><content type="html">Recently, I was working on a developing a server that responds to JSON RPC calls using TypeScript. Many of the methods in the RPC server follows this template, or similar variations of it: async stop ( params : JSONRPCParams | undefined ) { if (! Array . isArray ( params ) || params . length === 0 ) { throw new JSONRPCErrorException ( &amp;#39;Invalid parameters provided&amp;#39; , JSONRPCErrorCode . InvalidParams ); } ... other code here ... }; The if block checks that params is an array and that the length...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2022/10/31/why-use-an-assertion-function-in-typescript.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7466" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Tips" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Tips/default.aspx" /><category term="TypeScript" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/TypeScript/default.aspx" /></entry><entry><title>Delphi RTL for TypeScript</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2022/07/13/delphi-rtl-for-typescript.aspx" /><id>/Development/b/chuacw/archive/2022/07/13/delphi-rtl-for-typescript.aspx</id><published>2022-07-13T10:48:00Z</published><updated>2022-07-13T10:48:00Z</updated><content type="html">Since early 2019, when I&amp;#39;ve started working on TypeScript, I&amp;#39;ve missed some routines from the Delphi RTL. While TypeScript, which transpiles to JavaScript, has plenty of routines, working in multiple languages has caused me to choose to reimplement some of the Delphi RTL in TypeScript, and I&amp;#39;ve recently published it on Github, as well as made it available as an npm package. Unfortunately for me, the Delphi package name has been taken on npm, so I&amp;#39;ve chosen to publish my npm package...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2022/07/13/delphi-rtl-for-typescript.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7465" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Javascript" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Javascript/default.aspx" /><category term="TypeScript" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/TypeScript/default.aspx" /></entry><entry><title>How to force a configuration variable to be false/true</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2022/04/12/how-to-force-a-configuration-variable-to-be-false-true.aspx" /><id>/Development/b/chuacw/archive/2022/04/12/how-to-force-a-configuration-variable-to-be-false-true.aspx</id><published>2022-04-12T02:24:40Z</published><updated>2022-04-12T02:24:40Z</updated><content type="html">require(&amp;quot;dotenv&amp;quot;).config(); const FORCEUPDATE = String(process.env.UPDATESILENCE_FORCEUPDATE) == &amp;quot;true&amp;quot; The dotenv module makes the process.env property available. The name given after .env is the name of a &amp;quot;property&amp;quot; in the .env file that the dotenv module reads from. If it doesn&amp;#39;t exist, then process.env.WHATEVERNAME will return undefined, which then evaluates to String(&amp;quot;undefined&amp;quot;), giving &amp;quot;undefined&amp;quot;. Since the comparison &amp;quot;undefined&amp;quot;...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2022/04/12/how-to-force-a-configuration-variable-to-be-false-true.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7462" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="TypeScript" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/TypeScript/default.aspx" /></entry><entry><title>Tip of the day for Grafana</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2022/03/08/tip-of-the-day-for-grafana.aspx" /><id>/Development/b/chuacw/archive/2022/03/08/tip-of-the-day-for-grafana.aspx</id><published>2022-03-07T16:03:14Z</published><updated>2022-03-07T16:03:14Z</updated><content type="html">💡Regular expressions in Grafana for silencing alerts have to match the entire value of the field for it to work. A partial match wouldn&amp;rsquo;t work. So when your regular expression matches part of the value, you have to end it with .* in order for it to match the entire value....(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2022/03/08/tip-of-the-day-for-grafana.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7459" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Tips" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Tips/default.aspx" /></entry><entry><title>Notes of a discussion over usage of PowerShell vs Bash</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2021/11/05/notes-of-a-discussion-over-usage-of-powershell-vs-bash.aspx" /><id>/Development/b/chuacw/archive/2021/11/05/notes-of-a-discussion-over-usage-of-powershell-vs-bash.aspx</id><published>2021-11-05T00:09:26Z</published><updated>2021-11-05T00:09:26Z</updated><content type="html">For me, I&amp;rsquo;ll choose the best tool to use, and in this case, for me, it is PowerShell. I&amp;rsquo;ve used bash over many years, and PowerShell only less than a few weeks. But using emotions to qualify your like/dislike of a particular tool without using the tool objectively may well boil down to certain aspects of a person&amp;rsquo;s personality. Why use a particular tool then? The simplest answer is often the best: personal preference. Why do people prefer one kind of car over another? There are...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2021/11/05/notes-of-a-discussion-over-usage-of-powershell-vs-bash.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7455" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author></entry><entry><title>A self-contained TypeScript library demo</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2021/10/17/a-self-contained-typescript-library-demo.aspx" /><id>/Development/b/chuacw/archive/2021/10/17/a-self-contained-typescript-library-demo.aspx</id><published>2021-10-17T11:28:00Z</published><updated>2021-10-17T11:28:00Z</updated><content type="html">In case I forget, I&amp;#39;ve created a self-contained TypeScript library demo on my Github repo. It&amp;#39;s a simple TypeScript project, and very minimal. The library consists of 2 files: rtl.ts and SysUtils.ts The main project is HowLibraryWorks.ts and you call it like so: node -r ts-node/register HowLibraryWorks.ts Once it runs, you will see the following output: SysUtils init Hello...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2021/10/17/a-self-contained-typescript-library-demo.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7454" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="TypeScript" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/TypeScript/default.aspx" /></entry><entry><title>Calling functions dynamically in TypeScript and JavaScript</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2021/10/03/calling-functions-dynamically-in-typescript-and-javascript.aspx" /><id>/Development/b/chuacw/archive/2021/10/03/calling-functions-dynamically-in-typescript-and-javascript.aspx</id><published>2021-10-03T07:05:00Z</published><updated>2021-10-03T07:05:00Z</updated><content type="html">TypeScript functions to determine if a Javascript method exists, and call it via its name, together with the arguments. function functionExists ( funcName : string ): boolean { let temp = eval ( &amp;quot;typeof &amp;quot; + funcName ) // returns &amp;quot;undefined&amp;quot; or &amp;quot;function&amp;quot; let result = ( temp == &amp;quot;function&amp;quot; ); return result ; } function functionCall ( funcName : string , ... args : any ): void { eval ( funcName )(... args ); }...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2021/10/03/calling-functions-dynamically-in-typescript-and-javascript.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7452" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Javascript" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Javascript/default.aspx" /><category term="TypeScript" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/TypeScript/default.aspx" /></entry><entry><title>Setting up a TypeScript project and debugging it in VSCode</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2021/09/27/setting-up-a-typescript-project-and-debugging-it-in-vscode.aspx" /><id>/Development/b/chuacw/archive/2021/09/27/setting-up-a-typescript-project-and-debugging-it-in-vscode.aspx</id><published>2021-09-27T01:33:00Z</published><updated>2021-09-27T01:33:00Z</updated><content type="html">One of the things I keep forgetting is how to set up a TypeScript project and debugging it in VSCode. This blog post will remind me how to do so. In a new directory, run the following commands and press enter for choosing the default (on the npm init prompts): tsc --init npm init npm i --save-dev @types/node typescript ts-node In VSCode, do the following: Open a new folder. This is necessary, because without which, VS Code is unable to create an automatic launch configuration. After creating a new...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2021/09/27/setting-up-a-typescript-project-and-debugging-it-in-vscode.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7451" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Javascript" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Javascript/default.aspx" /><category term="TypeScript" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/TypeScript/default.aspx" /></entry><entry><title>Updating PowerShell help</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2021/08/28/updating-powershell-help.aspx" /><id>/Development/b/chuacw/archive/2021/08/28/updating-powershell-help.aspx</id><published>2021-08-28T05:09:37Z</published><updated>2021-08-28T05:09:37Z</updated><content type="html">Normally, when you need to update PowerShell&amp;#39;s help, you just run the command Update-Help. However, since PowerShell v7, an error has crept in when you run Update-Help. Update-Help: Failed to update Help for the module(s) &amp;#39;Dism, Kds, NetQos, PcsvDevice, PKI, Whea, WindowsUpdate, WindowsUpdateProvider&amp;#39; with UI culture(s) {en-US} : One or more errors occurred. (Response status code does not indicate success: 404 (The specified blob does not exist.).). English-US help content is available...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2021/08/28/updating-powershell-help.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7450" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="PowerShell" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/PowerShell/default.aspx" /></entry><entry><title>Querying Bitquery for calls to a smart contract from a specific address</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2021/07/31/querying-bitquery-for-calls-to-a-smart-contract-from-a-specific-address.aspx" /><id>/Development/b/chuacw/archive/2021/07/31/querying-bitquery-for-calls-to-a-smart-contract-from-a-specific-address.aspx</id><published>2021-07-31T12:24:01Z</published><updated>2021-07-31T12:24:01Z</updated><content type="html">Some time ago, I learnt GraphQL, for use on Bitquery , as a way of querying the blockchain for specific transactions that I&amp;#39;ve initiated to a particular contract. Below&amp;#39;s a specific query I&amp;#39;ve built: query CallsToSmartContractAddressByCallerInAscendingTimestamp ($contractAddress: String, $caller: String) { ethereum { smartContractCalls( caller: {is: $caller} options: {asc: &amp;quot;block.timestamp.unixtime&amp;quot;} smartContractAddress: {is: $contractAddress} ) { block { timestamp { unixtime...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2021/07/31/querying-bitquery-for-calls-to-a-smart-contract-from-a-specific-address.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7448" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Blockchain" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Blockchain/default.aspx" /><category term="Bitquery" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Bitquery/default.aspx" /></entry><entry><title>Embarcadero releases RAD Studio 10.4.2 patch</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2021/05/04/embarcadero-releases-rad-studio-10-4-2-patch.aspx" /><id>/Development/b/chuacw/archive/2021/05/04/embarcadero-releases-rad-studio-10-4-2-patch.aspx</id><published>2021-05-04T10:44:56Z</published><updated>2021-05-04T10:44:56Z</updated><content type="html">Embarcadero has released patches for the RAD Studio 10.4 product . The patches consist of a compiler patch, a general patch and a RTL patch. These patches can be obtained with the GetIt functionality within the IDE....(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2021/05/04/embarcadero-releases-rad-studio-10-4-2-patch.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7445" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author></entry><entry><title>How to integrate Node.js with IIS</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2021/03/25/how-to-integrate-node-js-with-iis.aspx" /><id>/Development/b/chuacw/archive/2021/03/25/how-to-integrate-node-js-with-iis.aspx</id><published>2021-03-25T08:15:33Z</published><updated>2021-03-25T08:15:33Z</updated><content type="html">I had the opportunity to work with many Node.js applications in the past, and those applications were generally launched in the general manner. Node appname Recently, I ventured into hosting Node.js applications, including React applications on a web server, specifically, React applications on IIS, and this is what I&amp;#39;ve learnt. In order to get Node.js applications to run on IIS, do the following: install iisnode . publish your React code by running npm run build Then, create a new website and...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2021/03/25/how-to-integrate-node-js-with-iis.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7443" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Windows" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Windows/default.aspx" /><category term="Nodejs" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Nodejs/default.aspx" /><category term="IISnode" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/IISnode/default.aspx" /><category term="Node.js" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Node-js/default.aspx" /><category term="IIS" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/IIS/default.aspx" /></entry><entry><title>Random notes on TypeScript</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2021/02/16/random-notes-on-typescript.aspx" /><id>/Development/b/chuacw/archive/2021/02/16/random-notes-on-typescript.aspx</id><published>2021-02-16T15:24:00Z</published><updated>2021-02-16T15:24:00Z</updated><content type="html">How to add properties to existing objects in TypeScript declare global { interface Window { MyNamespace: any; } } window.MyNamespace = window.MyNamespace || {}; The above adds the MyNamespace property to window, by declaring that window (which implements/inherits from Window), has a property named MyNamespace. See also: What does &amp;ldquo;variable = variable || {}&amp;rdquo; mean in JavaScript ....(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2021/02/16/random-notes-on-typescript.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7442" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Javascript" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Javascript/default.aspx" /><category term="TypeScript" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/TypeScript/default.aspx" /></entry><entry><title>Javascript IIFE and Delphi IIFE</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2021/02/08/javascript-iife-and-delphi-iife.aspx" /><id>/Development/b/chuacw/archive/2021/02/08/javascript-iife-and-delphi-iife.aspx</id><published>2021-02-08T03:31:00Z</published><updated>2021-02-08T03:31:00Z</updated><content type="html">In Javascript, you can define an anonymous function that can be executed immediately. It is called an Immediate Invocation Function Expression, aka IIFE . First, you declare the function, like so: function () { console.log(&amp;#39;Immediately invoked function execution&amp;#39;); } Then, you wrap it up in (): (function () { console.log(&amp;#39;Immediately invoked function execution&amp;#39;); }) Finally, you add another () to execute it: (function () { console.log(&amp;#39;Immediately invoked function execution&amp;#39;...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2021/02/08/javascript-iife-and-delphi-iife.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7441" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /><category term="Javascript" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Javascript/default.aspx" /></entry><entry><title>Examples of known blockchain attacks #3: Parity Wallet hack</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2021/02/04/examples-of-known-blockchain-attacks-3-parity-wallet-hack.aspx" /><id>/Development/b/chuacw/archive/2021/02/04/examples-of-known-blockchain-attacks-3-parity-wallet-hack.aspx</id><published>2021-02-04T13:29:44Z</published><updated>2021-02-04T13:29:44Z</updated><content type="html">The Parity Wallet hack was an attack performed on 19 Jul 2017, on the 2 Ethereum smart contracts deployed by Parity Techologies . The first Parity smart contract is the contract for the wallet itself, and the second Parity smart contract is a library of functions used by the first contract. According to the OpenZeppelin blog , the attacker sent a transaction making himself the owner of the wallet, and sent a second transaction to transfer some of the funds out of the wallet. The success of this hack...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2021/02/04/examples-of-known-blockchain-attacks-3-parity-wallet-hack.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7439" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Blockchain" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Blockchain/default.aspx" /><category term="ethereum" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/ethereum/default.aspx" /></entry><entry><title>Examples of known blockchain attacks #2: The DAO re-entrancy hack</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2021/01/03/examples-of-known-blockchain-attacks-2-the-dao-re-entrancy-hack.aspx" /><id>/Development/b/chuacw/archive/2021/01/03/examples-of-known-blockchain-attacks-2-the-dao-re-entrancy-hack.aspx</id><published>2021-01-03T11:47:28Z</published><updated>2021-01-03T11:47:28Z</updated><content type="html">The Decentralised Autonomous Organisation (DAO) was a smart contract deployed on the Ethereum blockchain network designed to fund blockchain projects and reward investors. On 17th June 2016, the attacker made use of the fact that the withdrawBalance function can be called recursively on a specified address, to withdraw a specified amount of money, without having its balance updated. Had the withdrawBalance function been written properly to guard against reentrancy, this attack wouldn&amp;rsquo;t have...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2021/01/03/examples-of-known-blockchain-attacks-2-the-dao-re-entrancy-hack.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7438" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Blockchain" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Blockchain/default.aspx" /><category term="ethereum" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/ethereum/default.aspx" /></entry><entry><title>Examples of known blockchain attacks #1: Double-spend attack</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2020/12/30/examples-of-known-blockchain-attacks-1.aspx" /><id>/Development/b/chuacw/archive/2020/12/30/examples-of-known-blockchain-attacks-1.aspx</id><published>2020-12-30T14:00:00Z</published><updated>2020-12-30T14:00:00Z</updated><content type="html">Inherent to the design of the blockchain is the principle of democracy, that all honest nodes agree upon the longest chain to be the source of truth. As such, any blockchain is susceptible to a majority attack, where an attacker gains 51% of the hashing power of the blockchain and is able to perform double-spend attacks on the blockchain. There was an instance of such an attack on Ethereum Classic between 29 Jul 2020 and 1 Aug 2020, however, not much details were known, beyond the fact that the attacker...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2020/12/30/examples-of-known-blockchain-attacks-1.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7437" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="ethereum" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/ethereum/default.aspx" /><category term="ethereum classic" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/ethereum+classic/default.aspx" /><category term="blockchains" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/blockchains/default.aspx" /></entry><entry><title>Building the Delphi RTL on mac OSX</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2020/11/19/building-the-delphi-rtl-on-mac-osx.aspx" /><id>/Development/b/chuacw/archive/2020/11/19/building-the-delphi-rtl-on-mac-osx.aspx</id><published>2020-11-19T01:03:00Z</published><updated>2020-11-19T01:03:00Z</updated><content type="html">Release: %BDS%\bin\dccosx64.exe -$C- -$D0 -$L- -CG -H -M -Q -V- -W^ -Z -- no -config -JPHN -W-UNSUPPORTED_CONSTRUCT -W-UNIT_DEPRECATED -W-SYMBOL_DEPRECATED -W-UNIT_PLATFORM -W-SYMBOL_PLATFORM -W-WIDECHAR_REDUCED -R%BDS%\lib\osx64\release -U%BDS%\lib\osx64\release -O%BDS%\lib\osx64\release -NU%BDS%\lib\osx64\release -NH%BDS%\include\osx\rtl\osx64 -NO%BDS%\lib\osx64\release -M - y System.pas Debug: %BDS%\bin\dccosx64.exe -$C- -$D2 -CG -H -M -Q -V- -W^ -Z -- no -config -JPHN -W-UNSUPPORTED_CONSTRUCT...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2020/11/19/building-the-delphi-rtl-on-mac-osx.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7436" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>Extending enumerated types with new members...</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2020/11/09/extending-enumerated-types-with-new-members.aspx" /><id>/Development/b/chuacw/archive/2020/11/09/extending-enumerated-types-with-new-members.aspx</id><published>2020-11-09T11:00:00Z</published><updated>2020-11-09T11:00:00Z</updated><content type="html">Delphi has an enumerated type since the beginning. I&amp;#39;m sure some of us have from time to time, wonder how to extend an enumerated type, like this developer here . With record helpers, you can now extend it. Given this declaration, TRegDataType = (rdUnknown, rdString, rdExpandString, rdInteger, rdBinary); Here&amp;#39;s how you can extend it. You can use both Succ, Ord on an existing member, or the type itself to typecast a number. type TRegDataTypeHelper = record helper for TRegDataType const rdNewMember1...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2020/11/09/extending-enumerated-types-with-new-members.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7435" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>Reading the properties of a PNG image</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2020/10/07/reading-the-properties-of-a-png-image.aspx" /><id>/Development/b/chuacw/archive/2020/10/07/reading-the-properties-of-a-png-image.aspx</id><published>2020-10-07T04:31:00Z</published><updated>2020-10-07T04:31:00Z</updated><content type="html">How do you read and write to the properties of a PNG image? Let the following image show you how....(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2020/10/07/reading-the-properties-of-a-png-image.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7434" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>Free more space by redirecting the Linux SDKs for your RAD Studio</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2020/09/03/free-more-space-by-redirecting-the-linux-sdks-for-your-rad-studio.aspx" /><id>/Development/b/chuacw/archive/2020/09/03/free-more-space-by-redirecting-the-linux-sdks-for-your-rad-studio.aspx</id><published>2020-09-03T09:54:00Z</published><updated>2020-09-03T09:54:00Z</updated><content type="html">&lt;p&gt;How to free more space on your home drive by redirecting the location for SDKs in RAD Studio&lt;/p&gt;...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2020/09/03/free-more-space-by-redirecting-the-linux-sdks-for-your-rad-studio.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7432" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="RAD Studio" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/RAD+Studio/default.aspx" /></entry><entry><title>Command line used to compile System.pas in Delphi</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2020/09/03/command-line-used-to-compile-system-pas-in-delphi.aspx" /><id>/Development/b/chuacw/archive/2020/09/03/command-line-used-to-compile-system-pas-in-delphi.aspx</id><published>2020-09-03T09:49:00Z</published><updated>2020-09-03T09:49:00Z</updated><content type="html">&lt;p&gt;Learn the command line used to compile System.pas in Delphi&lt;/p&gt;...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2020/09/03/command-line-used-to-compile-system-pas-in-delphi.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7431" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="RAD Studio" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/RAD+Studio/default.aspx" /></entry><entry><title>Aligning a record or a native type declared on the stack/heap with Delphi</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2020/08/06/aligning-a-record-or-a-native-type-with-delphi.aspx" /><id>/Development/b/chuacw/archive/2020/08/06/aligning-a-record-or-a-native-type-with-delphi.aspx</id><published>2020-08-06T01:54:00Z</published><updated>2020-08-06T01:54:00Z</updated><content type="html">&lt;p&gt;A method to design records so that they&amp;#39;re allocated on a specific byte boundary, such as 16 bytes, 512 bytes, 4096 bytes, etc.&lt;/p&gt;...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2020/08/06/aligning-a-record-or-a-native-type-with-delphi.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7413" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /><category term="Generics" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Generics/default.aspx" /></entry><entry><title>A cool thing about Go map</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2020/07/17/a-cool-thing-about-go-map.aspx" /><id>/Development/b/chuacw/archive/2020/07/17/a-cool-thing-about-go-map.aspx</id><published>2020-07-17T09:24:00Z</published><updated>2020-07-17T09:24:00Z</updated><content type="html">&lt;p&gt;Learn why the map is cool in Go!&lt;/p&gt;...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2020/07/17/a-cool-thing-about-go-map.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7400" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Go" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Go/default.aspx" /></entry><entry><title>Speed up your browsing with Firefox!</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2020/06/15/speed-up-your-browsing-with-firefox.aspx" /><id>/Development/b/chuacw/archive/2020/06/15/speed-up-your-browsing-with-firefox.aspx</id><published>2020-06-15T14:59:00Z</published><updated>2020-06-15T14:59:00Z</updated><content type="html">Firefox now has HTTP3! Enable it by setting network.http.http3.enabled to true!...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2020/06/15/speed-up-your-browsing-with-firefox.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7383" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="General" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/General/default.aspx" /></entry><entry><title>NotifyModuleUnload</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2020/06/06/notifymoduleunload.aspx" /><id>/Development/b/chuacw/archive/2020/06/06/notifymoduleunload.aspx</id><published>2020-06-05T23:00:00Z</published><updated>2020-06-05T23:00:00Z</updated><content type="html">Since Delphi 3, NotifyModuleUnload in the System unit has been written the way it is now. procedure NotifyModuleUnload(HInstance: THandle); var P: PModuleUnloadRec; begin P := ModuleUnloadList; while P &amp;lt;&amp;gt; nil do begin try P.Proc(HInstance); except // Make sure it doesn&amp;#39;t stop notifications end; P := P.Next; end; {$IFDEF LINUX} InvalidateModuleCache; {$ENDIF} end; The IDE calls NotifyModuleUnload in these conditions: after units have been unloaded (via UnregisterModule) when unloading a...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2020/06/06/notifymoduleunload.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7381" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>New plug-ins for RAD Studio Rio 10.3.3 and Sydney 10.4!</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2020/06/05/new-plug-ins-for-rad-studio-rio-10-3-3-and-sydney-10-4.aspx" /><id>/Development/b/chuacw/archive/2020/06/05/new-plug-ins-for-rad-studio-rio-10-3-3-and-sydney-10-4.aspx</id><published>2020-06-04T23:16:00Z</published><updated>2020-06-04T23:16:00Z</updated><content type="html">Over time, I&amp;#39;ve been building a ToolsAPI library that exposes functionality to making writing RAD Studio plug-ins even easier, since my first plug-in, the Productivity Experts, which I developed over 15 years ago (for those of you unaware: a few months before I joined Borland, the pre-cursor to Embarcadero). The ToolsAPI library, which I call the PluginCommonRTL, is heavily used by a group of plug-ins I&amp;#39;ve developed. These plug-ins are: DisableDragToobar - Locks the entire menu and toolbar...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2020/06/05/new-plug-ins-for-rad-studio-rio-10-3-3-and-sydney-10-4.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7380" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="ToolsAPI" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/ToolsAPI/default.aspx" /><category term="Plugins" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Plugins/default.aspx" /></entry><entry><title>Blocking an IP for 23 hours</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2020/06/03/blocking-a-specific-internet-ip-for-23-hours.aspx" /><id>/Development/b/chuacw/archive/2020/06/03/blocking-a-specific-internet-ip-for-23-hours.aspx</id><published>2020-06-03T05:06:00Z</published><updated>2020-06-03T05:06:00Z</updated><content type="html">One of the issues I have, running a blog site I own, is that there are certain automated entities on the Internet that likes to poll my website every half an hour, every hour, for updates. The problem I have with this, is that I&amp;#39;ve never updated my blog every half an hour, for 24 hours, every day. So, recently, I came across a firewall setting that allows me to specify the start and stop time of the rule. It seems to me then, it&amp;#39;s possible to block specific IPs, or IP ranges, for nearly 24...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2020/06/03/blocking-a-specific-internet-ip-for-23-hours.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7379" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Network" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Network/default.aspx" /><category term="OpenWRT" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/OpenWRT/default.aspx" /><category term="firewall" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/firewall/default.aspx" /></entry><entry><title>The genesis for FixAndroidLogger: fixing a RAD Studio mistake.</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2020/05/29/the-genesis-for-fixandroidlogger.aspx" /><id>/Development/b/chuacw/archive/2020/05/29/the-genesis-for-fixandroidlogger.aspx</id><published>2020-05-29T09:11:00Z</published><updated>2020-05-29T09:11:00Z</updated><content type="html">When FireMonkey became available for Android, one of the things I looked at was how logging was done. The API to Android logging are located in Androidapi.Log, and the primary logging API is declared as such: function __android_log_write(Priority: android_LogPriority; const Tag, Text: MarshaledAString): Integer; cdecl; external AndroidLogLib name &amp;#39;__android_log_write&amp;#39;; There is then a few additional functions declared and written like so: function LOGI(Text: MarshaledAString): Integer; function...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2020/05/29/the-genesis-for-fixandroidlogger.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7378" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Android" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Android/default.aspx" /><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>Lessons learnt from software development management failures...</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2020/05/28/lessons-learnt-from-software-development-management-failures.aspx" /><id>/Development/b/chuacw/archive/2020/05/28/lessons-learnt-from-software-development-management-failures.aspx</id><published>2020-05-28T04:04:00Z</published><updated>2020-05-28T04:04:00Z</updated><content type="html">There&amp;#39;s a lot of lessons to be learnt from observing how product management and development teams fail to manage software products properly. One of the examples I&amp;#39;ve seen is the Mi A1/A2 camera setting for the camera. If you look at this image, you&amp;#39;ll notice that it is reversed. This is due to the fact that the manufacturer, Xiaomi, did not think through the software design process completely.. When do you use the front camera of a phone? When you want to take a wefie/selfie. When you...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2020/05/28/lessons-learnt-from-software-development-management-failures.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7377" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Lessons" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Lessons/default.aspx" /><category term="Software Development" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Software+Development/default.aspx" /></entry><entry><title>When I called you last night from Glasgow...</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2020/03/31/when-i-called-you-last-night-from-glasgow.aspx" /><id>/Development/b/chuacw/archive/2020/03/31/when-i-called-you-last-night-from-glasgow.aspx</id><published>2020-03-31T08:40:00Z</published><updated>2020-03-31T08:40:00Z</updated><content type="html">One of the more useful techniques I&amp;#39;ve developed over the years is detecting what module the caller for a method came from. In an application with multiple DLLs (or packages), sometimes, it&amp;#39;s necessary to detect the module for the caller of a method. In the System unit, there&amp;#39;s a routine called FindHInstance, that, when given an address, returns the module handle for a module. So, in the method where you wanted to know the module of a caller, you can do this: FindHInstance(ReturnAddress...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2020/03/31/when-i-called-you-last-night-from-glasgow.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7373" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>Deleting old SQL backup files</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2020/01/06/deleting-old-sql-backup-files.aspx" /><id>/Development/b/chuacw/archive/2020/01/06/deleting-old-sql-backup-files.aspx</id><published>2020-01-06T10:00:00Z</published><updated>2020-01-06T10:00:00Z</updated><content type="html">I recently noticed that my SQL backup files were not getting deleted, and after some research, found the commands to delete old backup files. Xp_delete_file take five parameters: File Type = 0 for backup files or 1 for report files. Folder Path = The folder to delete files. The path must end with a backslash &amp;quot;\&amp;quot;. File Extension = This could be &amp;#39;BAK&amp;#39; or &amp;#39;TRN&amp;#39; or whatever you normally use. Date = The cutoff date for what files need to be deleted. Subfolder = 0 to ignore subfolders...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2020/01/06/deleting-old-sql-backup-files.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7367" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Maintenance" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Maintenance/default.aspx" /></entry><entry><title>Issues encountered while developing the Packer Builder for the Tencent  Cloud</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2019/12/10/issues-encountered-while-developing-the-packer-builder-for-the-tencent-cloud.aspx" /><id>/Development/b/chuacw/archive/2019/12/10/issues-encountered-while-developing-the-packer-builder-for-the-tencent-cloud.aspx</id><published>2019-12-10T10:41:00Z</published><updated>2019-12-10T10:41:00Z</updated><content type="html">These are notes that I&amp;#39;ve written when I was working on building a Hashicorp Packer Builder plugin in Go. The issue with the development of this Packer Builder plugin is that some of the Tencent documentation are outdated, and the Chinese/Mandarin documentation are more updated than the English ones. The following lists the issues encountered when developing the plugin. Invalid SSL certificate Encountering the error x509: certificate is valid for *.ap-singapore.tencentcloudapi.com, not cvm.tencentcloudapi...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2019/12/10/issues-encountered-while-developing-the-packer-builder-for-the-tencent-cloud.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7366" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author></entry><entry><title>RAD Studio 10.3.3 is released, a visible UI bug and a fix.</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2019/12/03/rad-studio-10-3-3-is-released-a-visible-ui-bug-and-a-fix.aspx" /><id>/Development/b/chuacw/archive/2019/12/03/rad-studio-10-3-3-is-released-a-visible-ui-bug-and-a-fix.aspx</id><published>2019-12-03T14:48:00Z</published><updated>2019-12-03T14:48:00Z</updated><content type="html">RAD Studio 10.3.3 has been released about 2 weeks ago. I won&amp;#39;t go through all the new features, since all these has been covered elsewhere. When you&amp;#39;re in a Delphi project, activates code completion and presses Ctrl F9 immediately, you can see a weird UI artifact. A project has been released on my Github to fix this....(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2019/12/03/rad-studio-10-3-3-is-released-a-visible-ui-bug-and-a-fix.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7365" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Hacking" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Hacking/default.aspx" /><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>Scheduling a button press in Javascript</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2019/09/04/scheduling-a-button-press-in-javascript.aspx" /><id>/Development/b/chuacw/archive/2019/09/04/scheduling-a-button-press-in-javascript.aspx</id><published>2019-09-04T03:57:00Z</published><updated>2019-09-04T03:57:00Z</updated><content type="html">Sometimes, if you&amp;#39;re away, or out of touch, and you need to click a button on a web page around or after a specific time, you just have no choice but to come up with a script to do it. This is what happened to me, when I need to click a button after a specific time, but I wasn&amp;#39;t around to do it. I decided to schedule a button click by writing Javascript and injecting it into the website I was using. var myButton = temp0; var myDate = 4; var myHH = 7; var myMM = 15; // change all values here...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2019/09/04/scheduling-a-button-press-in-javascript.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7364" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Hacking" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Hacking/default.aspx" /><category term="Javascript" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Javascript/default.aspx" /></entry><entry><title>Undocumented class operators in Delphi 10.2</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2019/05/18/undocumented-class-operators-in-delphi-10-2.aspx" /><id>/Development/b/chuacw/archive/2019/05/18/undocumented-class-operators-in-delphi-10-2.aspx</id><published>2019-05-18T07:03:00Z</published><updated>2019-05-18T07:03:00Z</updated><content type="html">Today, I&amp;#39;ve discovered new undocumented class operators in the Delphi 10.2 compiler. Since class operators apply on records, these currently apply on records. But on platforms that support applying class operators on classes, they will apply to classes too. The new class operators are True, False and OnesComplement, and requires the name of the type it&amp;#39;s declared in, as a parameter. The True and False operators returns a Boolean, while the OnesComplement operator returns the type itself....(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2019/05/18/undocumented-class-operators-in-delphi-10-2.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7360" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Experiments" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Experiments/default.aspx" /><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>How any multithreaded FireMonkey Android app can crash</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2019/05/15/how-any-multithreaded-firemonkey-android-app-can-crash.aspx" /><id>/Development/b/chuacw/archive/2019/05/15/how-any-multithreaded-firemonkey-android-app-can-crash.aspx</id><published>2019-05-15T00:00:00Z</published><updated>2019-05-15T00:00:00Z</updated><content type="html">Recently, I found out that any multithreaded Android application written with the FireMonkey framework can crash, if you use the CallInUIThread routine. When CallInUIThread is called from a worker thread (ie, not the main thread), a JRunnable instance is created, and passed to the main activity to call by using its runOnUiThread method. After the JRunnable&amp;#39;s run method calls the given callback, it then calls TFinishedRunnableCollector.Call, which creates an instance of TFinishedRunnableCollector...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2019/05/15/how-any-multithreaded-firemonkey-android-app-can-crash.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7358" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Experiments" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Experiments/default.aspx" /><category term="Android" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Android/default.aspx" /><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>Visual Studio Code on Linux</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2019/05/14/visual-studio-code-on-linux.aspx" /><id>/Development/b/chuacw/archive/2019/05/14/visual-studio-code-on-linux.aspx</id><published>2019-05-14T15:07:00Z</published><updated>2019-05-14T15:07:00Z</updated><content type="html">Nearly 2 years ago, on 14 Sep 2017, I discovered Visual Studio Code, and tried it out. Some time in 2008, I started using it actively to develop code in Go. Recently, in order to test an issue in the Linux environment of Android, I&amp;#39;ve decided to test the equivalent code on Ubuntu 18.04.2, and installed Visual Studio Code there as well. I must say, using VS Code on Ubuntu is quite fun! Here&amp;#39;s a screenshot of some example code I&amp;#39;ve developed....(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2019/05/14/visual-studio-code-on-linux.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7359" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Unix / Linux" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Unix+_2F00_+Linux/default.aspx" /><category term="Linux" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Linux/default.aspx" /></entry><entry><title>Detecting the FireMonkey and VCL framework within your code</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2019/05/14/detecting-the-firemonkey-and-vcl-framework-within-your-code.aspx" /><id>/Development/b/chuacw/archive/2019/05/14/detecting-the-firemonkey-and-vcl-framework-within-your-code.aspx</id><published>2019-05-14T09:43:00Z</published><updated>2019-05-14T09:43:00Z</updated><content type="html">If you&amp;#39;re writing common code that&amp;#39;s supposed to work on the FireMonkey and the VCL framework, occasionally, it might be useful to detect whether you&amp;#39;re compiling for the FireMonkey or the VCL framework. You can do so by using the $IF directive , together with the DECLARED function. Using the DECLARED function , you can use any name (a type, a constant, a variable) that exists only within FireMonkey, and then decide you&amp;#39;re on the FireMonkey framework. Alternatively, to detect the...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2019/05/14/detecting-the-firemonkey-and-vcl-framework-within-your-code.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7357" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author></entry><entry><title>Firefox extensions/addons got disabled, and how to fix it</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2019/05/04/firefox-extensions-addons-got-disabled-and-how-to-fix-it.aspx" /><id>/Development/b/chuacw/archive/2019/05/04/firefox-extensions-addons-got-disabled-and-how-to-fix-it.aspx</id><published>2019-05-04T09:16:00Z</published><updated>2019-05-04T09:16:00Z</updated><content type="html">Today, nearly every extension and addon in Mozilla Firefox got disabled due to an expired certificate that was used to sign these extensions / addons. To fix this, go to about:config and search for xpinstall.signatures.required. Set it to false, then remove and re-add your addons....(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2019/05/04/firefox-extensions-addons-got-disabled-and-how-to-fix-it.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7355" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="General" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/General/default.aspx" /></entry><entry><title>Enabling even more privacy in your web browsing experience using Encrypted Server Name Indication and DNS over HTTPS</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2019/05/01/enabling-even-more-privacy-in-your-web-browsing-experience.aspx" /><id>/Development/b/chuacw/archive/2019/05/01/enabling-even-more-privacy-in-your-web-browsing-experience.aspx</id><published>2019-05-01T07:40:00Z</published><updated>2019-05-01T07:40:00Z</updated><content type="html">For those of us who always wanted to ensure privacy and security in our browsing experience, we always choose to browse web sites which can provide SSL. When you browse a web site that uses SSL to encrypt the data being transported, the browser starts with a Client Hello which is in plain text, and includes the host name of the web site that you intended to visit, in the handshake. So, I wanted to show what happens when I visit https://www.cloudflare.com using Firefox, and I captured an image of...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2019/05/01/enabling-even-more-privacy-in-your-web-browsing-experience.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7354" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Security" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Security/default.aspx" /><category term="Experiments" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Experiments/default.aspx" /><category term="Network" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Network/default.aspx" /></entry><entry><title>Fixing the Android Logging mechanism</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2019/04/28/fixing-the-android-logging-mechanism.aspx" /><id>/Development/b/chuacw/archive/2019/04/28/fixing-the-android-logging-mechanism.aspx</id><published>2019-04-28T05:46:00Z</published><updated>2019-04-28T05:46:00Z</updated><content type="html">There&amp;#39;s an issue with the logging mechanism in FireMonkey I don&amp;#39;t like, and that&amp;#39;s the tag that was used when you make a call to the Log method of the IFMXLoggingService service that is returned by TPlatformServices.Current.SupportsPlatformService. The Log call is implemented by TAndroidLoggerService.Log in the FMX.Platform.Logger.Android unit and it calls LOGI in the Androidapi.Log unit, and the LOGI routine then calls the __android_log_write function which then goes to the underlying...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2019/04/28/fixing-the-android-logging-mechanism.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7362" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Android" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Android/default.aspx" /><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>A THTTPClient issue with HTTP proxies, and a workaround</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2019/02/21/a-json-rpc-framework-for-delphi.aspx" /><id>/Development/b/chuacw/archive/2019/02/21/a-json-rpc-framework-for-delphi.aspx</id><published>2019-02-21T09:48:00Z</published><updated>2019-02-21T09:48:00Z</updated><content type="html">The development of the JSON RPC framework started on 10th Feb. I was inspired by the QP report that I&amp;#39;ve filed last year, and developed the JSON RPC framework, according to the JSON RPC 2.0 specification , with the exception that batch calls are currently not supported. The framework can use either the Indy components, or the System.Net components. The framework is currently implemented over HTTP, though it can be easily separated such that it runs over TCP, UDP, WebSockets, instead of just HTTP...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2019/02/21/a-json-rpc-framework-for-delphi.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7350" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Hacking" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Hacking/default.aspx" /><category term="Experiments" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Experiments/default.aspx" /><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>How the SCP protocol works</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2019/02/04/how-the-scp-protocol-works.aspx" /><id>/Development/b/chuacw/archive/2019/02/04/how-the-scp-protocol-works.aspx</id><published>2019-02-04T03:16:00Z</published><updated>2019-02-04T03:16:00Z</updated><content type="html">Have you ever wondered how the scp and rcp commands worked? The first time I did I haven&amp;#39;t found any documentation on the subject. There is no RFC, no draft, not even README file describing it. After reading the source code I tried again and realized that old version of rcp.c might be really the only original documentation available. And since I worked on a couple of bugs in our scp(1) some time ago I put a note in my todo list to write something about it, for the next time I&amp;#39;m going to need...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2019/02/04/how-the-scp-protocol-works.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7349" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Unix / Linux" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Unix+_2F00_+Linux/default.aspx" /><category term="Network" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Network/default.aspx" /></entry><entry><title>Dumping field names and offset</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2019/01/27/dumping-field-names-and-offset.aspx" /><id>/Development/b/chuacw/archive/2019/01/27/dumping-field-names-and-offset.aspx</id><published>2019-01-27T13:59:00Z</published><updated>2019-01-27T13:59:00Z</updated><content type="html">Given there&amp;#39;s a single type declaration, THDItem and that I wanted to see the field offsets as well as calculate the total size of the record, using Delphi&amp;#39;s RTTI, I can do so with: var rtype: TRTTIType; fields: TArray&amp;lt;TRTTIField&amp;gt;; LFieldName: string; P: Pointer; LTotalSize: Integer; LHDItem: THDItem; begin rtype := TRTTIContext.Create.GetType(TypeInfo(THDItem)); P := @LHDItem; fields := rtype.GetFields; for i := 0 to High(fields) do begin LFieldName := fields&#x5;[i].Name; if LFieldName...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2019/01/27/dumping-field-names-and-offset.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7348" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Experiments" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Experiments/default.aspx" /><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>A custom built Terraform File System Provider</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2019/01/20/a-custom-built-terraform-file-system-provider.aspx" /><id>/Development/b/chuacw/archive/2019/01/20/a-custom-built-terraform-file-system-provider.aspx</id><published>2019-01-20T04:02:00Z</published><updated>2019-01-20T04:02:00Z</updated><content type="html">While working on building blockchain node infrastructure, one of the tools I used is Terraform . The built-in providers in Terraform didn&amp;#39;t allow me to check whether a file, or directory exists, or even to create directories. So I wrote a custom Terraform provider that does that. It&amp;#39;s available on Github now....(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2019/01/20/a-custom-built-terraform-file-system-provider.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7345" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Terraform" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Terraform/default.aspx" /></entry><entry><title>Achievement 2018!</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/12/15/achievement-2018.aspx" /><id>/Development/b/chuacw/archive/2018/12/15/achievement-2018.aspx</id><published>2018-12-15T03:44:00Z</published><updated>2018-12-15T03:44:00Z</updated><content type="html">I&amp;#39;ve never placed much emphasis on achievements, so much so that whenever I was asked about my achievements during job interviews, I tend to be unable to mention anything at all about why I&amp;#39;m more fantastic or better than anyone else. So, I&amp;#39;m blogging about this, so that I may remember when it&amp;#39;s time to talk about it. This year, I wrote a Packer builder for Tencent in about 1-2 months, learning Go at the same time as well. fixed a bug in less than 2 weeks in a Python app that my colleague...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/12/15/achievement-2018.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7342" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Accomplishments" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Accomplishments/default.aspx" /></entry><entry><title>A technical description of AWS Lambda</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/10/30/a-technical-description-of-aws-lambda.aspx" /><id>/Development/b/chuacw/archive/2018/10/30/a-technical-description-of-aws-lambda.aspx</id><published>2018-10-30T01:58:00Z</published><updated>2018-10-30T01:58:00Z</updated><content type="html">An AWS Lambda is a function that runs on servers. It can be configured either to run inside the VPC, or on AWS servers. No matter what, the server on which the lambda function has 3 IP addresses, 127.0.0.1, and 2 APIPA (169.254.x.x) addresses. If it&amp;#39;s configured to run on AWS servers, by default, it has full access to the Internet. If it&amp;#39;s configured to run within the VPC, it does not have access to the Internet. Therefore, the VPC needs to have a public subnet that routes 0.0.0.0/0 traffic...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/10/30/a-technical-description-of-aws-lambda.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7338" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Terraform" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Terraform/default.aspx" /></entry><entry><title>Importing and deleting Terraform resources</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/10/08/importing-and-deleting-terraform-resources.aspx" /><id>/Development/b/chuacw/archive/2018/10/08/importing-and-deleting-terraform-resources.aspx</id><published>2018-10-08T09:37:00Z</published><updated>2018-10-08T09:37:00Z</updated><content type="html">After changing the Terraform files by hand, I realized that I have Terraform resources created on AWS. But I can&amp;#39;t do a terraform destroy -auto-approve, because the existing Terraform files are still there, and there&amp;#39;s conflicts in the definition that I can&amp;#39;t resolve. So, I moved the Terraform files away, and started with no files, then used the following commands: terraform init echo &amp;quot;ap-southeast-1&amp;quot; | terraform import -allow-missing-config aws_ami ami-xxxxxxx &amp;amp;&amp;amp; echo...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/10/08/importing-and-deleting-terraform-resources.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7334" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Terraform" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Terraform/default.aspx" /></entry><entry><title>The Journey so far...</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/10/07/the-journey-so-far.aspx" /><id>/Development/b/chuacw/archive/2018/10/07/the-journey-so-far.aspx</id><published>2018-10-07T02:55:00Z</published><updated>2018-10-07T02:55:00Z</updated><content type="html">This year, I&amp;#39;ve done some very interesting consulting work. Here&amp;#39;s what was done: Fixed memory leaks and made improvements to a commercial Delphi plug-in. Learnt Go in under a month, and wrote a Hashicorp Packer provider for a major cloud provider. Learnt even more AWS (I learnt some AWS while at previous companies). Learnt Packer, Terraform, and Vault. And doing so much interesting work made time passed very quickly! I&amp;#39;m looking forward to even more interesting work in the foreseeable...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/10/07/the-journey-so-far.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7333" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /><category term="Go" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Go/default.aspx" /></entry><entry><title>Flashing OpenWRT 18.06.1 using both Windows and a macOS</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/08/24/flashing-openwrt-18-06-1-using-both-windows-and-a-macos.aspx" /><id>/Development/b/chuacw/archive/2018/08/24/flashing-openwrt-18-06-1-using-both-windows-and-a-macos.aspx</id><published>2018-08-24T00:12:00Z</published><updated>2018-08-24T00:12:00Z</updated><content type="html">OpenWRT 18.06.1 was released recently, and I took the opportunity to upgrade my router. Gotcha: Flashing from the LuCI page: Uncheck the &amp;quot;Keep settings&amp;quot; before selecting the firmware, proceed to upgrade, then restore the settings after the upgrade. I actually didn&amp;#39;t do the above (I wondered if it was documented anywhere), so my router came crashing, and I couldn&amp;#39;t connect by SSH. Eventually, I used the following method, which was 1. Connect TTL to USB cable to the Mac. 2. Start...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/08/24/flashing-openwrt-18-06-1-using-both-windows-and-a-macos.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7332" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="OpenWRT" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/OpenWRT/default.aspx" /></entry><entry><title>Odd application termination issue, and an unlikely fix</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/08/13/odd-application-termination-issue-and-an-unlikely-fix.aspx" /><id>/Development/b/chuacw/archive/2018/08/13/odd-application-termination-issue-and-an-unlikely-fix.aspx</id><published>2018-08-13T13:09:00Z</published><updated>2018-08-13T13:09:00Z</updated><content type="html">One of the rarest moments I have with regards to applications are the fact that Mercury, the SMTP application, and another application I shall not name, had trouble exiting under Windows 2008 R2 SP1. After closing the applications, these applications would remain in the task manager&amp;#39;s list. Attempting to start another instance would fail. Trying to terminate these applications through taskkill, procexp and Task Manager would give me these errors: ERROR: The process with PID XXXX could not be...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/08/13/odd-application-termination-issue-and-an-unlikely-fix.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7330" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Windows" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Windows/default.aspx" /></entry><entry><title>Upgrading all OpenWRT packages in one line</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/05/25/upgrading-all-openwrt-packages-in-one-line.aspx" /><id>/Development/b/chuacw/archive/2018/05/25/upgrading-all-openwrt-packages-in-one-line.aspx</id><published>2018-05-24T16:46:00Z</published><updated>2018-05-24T16:46:00Z</updated><content type="html">Here&amp;#39;s how to check and upgrade all your OpenWRT packages in one line opkg update &amp;amp;&amp;amp; opkg upgrade `opkg list-upgradable | awk &amp;#39;{print $1}&amp;#39; | xargs -n999` opkg update updates list of available packages. opkg list-upgradable lists all the updates available after opkg update and pipes the output to awk awk gets the first column of every line and pipes the output to xargs xargs concatenates every word on every line into one line, separated by a space. The quote `` causes the output...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/05/25/upgrading-all-openwrt-packages-in-one-line.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7324" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="OpenWRT" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/OpenWRT/default.aspx" /></entry><entry><title>Initializing structs in Go</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/05/24/initializing-structs-in-go.aspx" /><id>/Development/b/chuacw/archive/2018/05/24/initializing-structs-in-go.aspx</id><published>2018-05-23T16:51:00Z</published><updated>2018-05-23T16:51:00Z</updated><content type="html">In Go, there are a few ways to initialize a new struct. You can do this: varStruct := &amp;amp;StructName{} varStruct := StructName{} varStruct := StructName{field1: &amp;quot;SomeValue&amp;quot;, field2: 5,} varStruct := new(StructName) If you want to declare an uninitialized variable, declare it like so: var varStruct StructName Go is garbage collected, so there&amp;#39;s no need to worry about memory release. After a variable falls out of scope, it&amp;#39;ll be released some time in the future....(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/05/24/initializing-structs-in-go.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7323" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Language" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Language/default.aspx" /><category term="Go" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Go/default.aspx" /></entry><entry><title>Declaring and assigning variables in Go</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/05/14/declaring-and-assigning-variables-in-go.aspx" /><id>/Development/b/chuacw/archive/2018/05/14/declaring-and-assigning-variables-in-go.aspx</id><published>2018-05-14T06:10:00Z</published><updated>2018-05-14T06:10:00Z</updated><content type="html">There&amp;#39;s multiple ways of declaring a variable in Go. You can do this: var VarName TypeName So, for example, var s string declares a variable s with a type of string. If I want to declare multiple variables, I can do this: var ( s string x int ) which declares s as string, and x as an integer, or declare it one at a time: var s string var x int I can also declare a variable and assign it at the same time. s := &amp;quot;Hello world&amp;quot; declares s as a variable of type string and assigns it the value...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/05/14/declaring-and-assigning-variables-in-go.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7322" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Language" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Language/default.aspx" /><category term="Go" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Go/default.aspx" /></entry><entry><title>Multithreading in C# and Delphi</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/05/12/multithreading-in-c-and-delphi.aspx" /><id>/Development/b/chuacw/archive/2018/05/12/multithreading-in-c-and-delphi.aspx</id><published>2018-05-12T05:59:00Z</published><updated>2018-05-12T05:59:00Z</updated><content type="html">Even when you think you understand multithreading well enough, there&amp;#39;s some games you&amp;#39;ll find interesting. The Deadlock Empire are games in C# and Delphi coding that will show how much you know and have learnt about where dragons are in your code. Deadlock Empire C# Deadlock Empire Delphi Check them out, and see how much you know!...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/05/12/multithreading-in-c-and-delphi.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7321" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="C#" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/C_2300_/default.aspx" /><category term="C# vs Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/C_2300_+vs+Delphi/default.aspx" /><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /><category term="Language" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Language/default.aspx" /></entry><entry><title>Learning Golang, aka Go</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/04/30/learning-golang-aka-go.aspx" /><id>/Development/b/chuacw/archive/2018/04/30/learning-golang-aka-go.aspx</id><published>2018-04-30T07:18:00Z</published><updated>2018-04-30T07:18:00Z</updated><content type="html">I&amp;#39;ve been learning a new language, Golang, created by Google, also known as Go. I got fascinated by the language some time ago, and when I saw dnscrypt-proxy was written in Go, it intrigued me and I started learning it 4 days ago, on 26th April. One of the things I find most helpful when learning a new language is the grammar . 10 things I don&amp;#39;t know about Go, but now I do . Exported/Unexported Identifiers In Go I chose to use the Visual Studio Code editor to work on Go. And Visual Studio...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/04/30/learning-golang-aka-go.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7320" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Language" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Language/default.aspx" /><category term="Go" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Go/default.aspx" /></entry><entry><title>Making your DNS queries private for your entire network</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/04/19/making-your-dns-queries-private-for-your-entire-network.aspx" /><id>/Development/b/chuacw/archive/2018/04/19/making-your-dns-queries-private-for-your-entire-network.aspx</id><published>2018-04-19T03:15:00Z</published><updated>2018-04-19T03:15:00Z</updated><content type="html">In my previous post, &amp;quot; Making your web browsing experience even more private! &amp;quot;, I shared how to encrypt your DNS queries on the browser level, using Firefox (only with v60 or later, which at this time, is the Developer Edition). The limitations of it is that you have to do it on every system, and you&amp;#39;re limited to using Firefox. With the latest release of 2.0.10 of dnscrypt-proxy , it&amp;#39;s now even easier and simpler to make it more difficult for anyone else to know what websites...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/04/19/making-your-dns-queries-private-for-your-entire-network.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7319" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Network" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Network/default.aspx" /><category term="OpenWRT" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/OpenWRT/default.aspx" /></entry><entry><title>Site transition to SSL is completed!</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/04/12/site-transition-to-ssl-is-completed.aspx" /><id>/Development/b/chuacw/archive/2018/04/12/site-transition-to-ssl-is-completed.aspx</id><published>2018-04-12T14:05:00Z</published><updated>2018-04-12T14:05:00Z</updated><content type="html">Over two and a half years ago, when Let&amp;#39;s Encrypt launched their free SSL certificate services, I signed up to them, generating a SSL certificate for chuacw.ath.cx so that this site can run on SSL. Since then, I&amp;#39;ve made slight modifications on this site in an incremental manner so as to add functionality to make it SSL-compatible, while ensuring the site still works when retrieved using HTTP. Since yesterday, I&amp;#39;ve made the final transition to switch this site to SSL, by adding the following...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/04/12/site-transition-to-ssl-is-completed.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7317" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="C#" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/C_2300_/default.aspx" /><category term="Security" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Security/default.aspx" /><category term="Community Server" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Community+Server/default.aspx" /><category term="Network" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Network/default.aspx" /></entry><entry><title>Making your web browsing experience even more private!</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/04/03/making-your-web-browsing-experience-even-more-private.aspx" /><id>/Development/b/chuacw/archive/2018/04/03/making-your-web-browsing-experience-even-more-private.aspx</id><published>2018-04-03T13:30:00Z</published><updated>2018-04-03T13:30:00Z</updated><content type="html">Cloudflare recently launched a faster way of looking up domain names , much faster than Google. In partnership with Cloudflare, Firefox added a new way to resolve domain names using DNS over HTTPS (DOH) . What this means is that, when you browse a web site, like https://www.somesite.com/ the query to resolve the domain name into an IP address is now carried over a secure connection, which no one will be able to see at all. In order to configure this, if you&amp;#39;re using Firefox 60 (Firefox Developer...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/04/03/making-your-web-browsing-experience-even-more-private.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7315" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Security" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Security/default.aspx" /><category term="Network" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Network/default.aspx" /></entry><entry><title>Reverse engineering the Web3 API</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/03/03/reverse-engineering-the-web3-api.aspx" /><id>/Development/b/chuacw/archive/2018/03/03/reverse-engineering-the-web3-api.aspx</id><published>2018-03-03T13:45:00Z</published><updated>2018-03-03T13:45:00Z</updated><content type="html">I&amp;#39;ve been working on the Web3 API for quite a while now. The JSON RPC protocol is documented here and the Web3 API is documented here , however, there were limitations I found in the APIs, so last week, I decided to look at porting the Web3js API to Delphi, and removing the limitations at the same time. Before this, I was writing Javascript, and either executing them in the browser, using Node.js to execute them locally, or using Truffle to test these scripts. As Node.js does not have a proxy...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/03/03/reverse-engineering-the-web3-api.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7262" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /><category term="Blockchain" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Blockchain/default.aspx" /></entry><entry><title>Automatically renewing Let's Encrypt™ SSL and binding it to a web site</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/02/20/automatically-renewing-let-s-encrypt-ssl-and-binding-ito-a-web-site.aspx" /><id>/Development/b/chuacw/archive/2018/02/20/automatically-renewing-let-s-encrypt-ssl-and-binding-ito-a-web-site.aspx</id><published>2018-02-20T14:10:00Z</published><updated>2018-02-20T14:10:00Z</updated><content type="html">Let&amp;#39;s Encrypt &amp;trade; is a SSL certificate issuing authority that started around Jun 2015. It went into beta sometime around the last quarter of 2015, and I joined, getting a SSL certificate for this site. When it was announced that Let&amp;#39;s Encrypt only issue SSL certificates that have a lifetime of 3 months, I decided to get an application that can renew my SSL certificate automatically. This turned out to be lets-encrypt-win-simple which has since been renamed to be called &amp;quot;A Simple...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/02/20/automatically-renewing-let-s-encrypt-ssl-and-binding-ito-a-web-site.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7256" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Security" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Security/default.aspx" /><category term="Network" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Network/default.aspx" /></entry><entry><title>The mechanics of an ICO - how to do a crowdsale</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/02/19/the-mechanics-of-an-ico-how-to-do-a-crowdsale.aspx" /><id>/Development/b/chuacw/archive/2018/02/19/the-mechanics-of-an-ico-how-to-do-a-crowdsale.aspx</id><published>2018-02-19T06:31:00Z</published><updated>2018-02-19T06:31:00Z</updated><content type="html">How do you do a crowdsale, or raise an ICO? Get your whitepaper written and reviewed by a legal entity, such as the Blockchain Advisory Council , or the Lex Futurus Group . Setup a website, and provide links to the whitepaper. List the team members. Provide link to your Ethereum ICO address. Setup social media accounts, eg, Instagram, Facebook, Telegram, Google Plus, Twitter and get them manned, so as to build a community. The modern crowdsale strategy is an ICO with whitelists (optional), multiple...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/02/19/the-mechanics-of-an-ico-how-to-do-a-crowdsale.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7254" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Blockchain" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Blockchain/default.aspx" /></entry><entry><title>Something to ponder: using interfaces with class type variables</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/02/13/something-to-ponder-using-interfaces-with-class-type-variables.aspx" /><id>/Development/b/chuacw/archive/2018/02/13/something-to-ponder-using-interfaces-with-class-type-variables.aspx</id><published>2018-02-13T03:28:00Z</published><updated>2018-02-13T03:28:00Z</updated><content type="html">One of the issues I&amp;#39;ve encountered recently is code like this: type ISomeIntf = interface procedure SomeMethod; end; TSomeClass = class(TInterfacedObject, ISomeIntf) private FValue: Integer; FSomeValue: string; public constructor Create; procedure SomeMethod; end; var SomeClass: TSomeClass; procedure DoSomething(ASomeIntf: ISomeIntf); begin ASomeIntf.SomeMethod; end; procedure Setup; begin SomeClass := TSomeClass.Create; end; procedure InAnotherRoutine; begin DoSomething(SomeClass); end; procedure...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/02/13/something-to-ponder-using-interfaces-with-class-type-variables.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7251" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>How to write Truffle scripts to test your Solidity contracts automatically</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/01/31/how-to-write-truffle-scripts-to-test-your-solidity-contracts-automatically.aspx" /><id>/Development/b/chuacw/archive/2018/01/31/how-to-write-truffle-scripts-to-test-your-solidity-contracts-automatically.aspx</id><published>2018-01-31T12:01:00Z</published><updated>2018-01-31T12:01:00Z</updated><content type="html">Every Truffle script is a Javascript app. So, if you&amp;#39;re familiar with writing Javascript, you already know how to write a Truffle script. How do you write Truffle scripts to test your Solidity contracts? Before explaining, here&amp;#39;s a simple test script: &amp;quot;use strict&amp;quot;; const TestContract = artifacts.require(&amp;#39;./testContract.sol&amp;#39;); contract(&amp;#39;TestContract&amp;#39;, function(accounts) { let wallet = accounts[2]; let anotherwallet = accounts[3]; let thirdwallet = accounts[4]; let...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/01/31/how-to-write-truffle-scripts-to-test-your-solidity-contracts-automatically.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7237" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Blockchain" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Blockchain/default.aspx" /><category term="Javascript" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Javascript/default.aspx" /></entry><entry><title>Retrieving blocked attachments from Google with Delphi</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2018/01/01/retrieving-blocked-attachments-from-google-with-delphi.aspx" /><id>/Development/b/chuacw/archive/2018/01/01/retrieving-blocked-attachments-from-google-with-delphi.aspx</id><published>2018-01-01T15:30:00Z</published><updated>2018-01-01T15:30:00Z</updated><content type="html">So, I was looking at an old email, and there was an attachment. Unfortunately, Google&amp;#39;s Gmail had blocked the attachment, thinking it had a virus attached to it (It was just a zip file containing some Delphi source files, there weren&amp;#39;t any binaries in it) So, I clicked on the &amp;quot;Show original&amp;quot; from the context menu, then clicked on the &amp;quot;Download original&amp;quot; link to save the entire message into a text file. From the text file, the attachment appeared like so: ------=_Part_9053_26313827...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2018/01/01/retrieving-blocked-attachments-from-google-with-delphi.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7230" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Experiments" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Experiments/default.aspx" /><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>Automated clicking on HTML elements</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2017/12/15/automated-clicking-on-html-elements.aspx" /><id>/Development/b/chuacw/archive/2017/12/15/automated-clicking-on-html-elements.aspx</id><published>2017-12-15T01:36:00Z</published><updated>2017-12-15T01:36:00Z</updated><content type="html">On a HTML page, elements can be retrieved either by using the getElementsByClassName or the getElementById method. The getElementById method returns just one element, while the getElementsByClassName method returns an array of elements. On a web site that I frequently visit, I often had to click an HTML element to get the updated status, since it refreshes very often. It automatically refreshes every 5 seconds, but if you click it, it can refresh instantly, instead of at the fifth-second interval...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2017/12/15/automated-clicking-on-html-elements.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7220" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Hacking" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Hacking/default.aspx" /><category term="Javascript" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Javascript/default.aspx" /></entry><entry><title>Persisting enumeration and sets to JSON</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2017/12/11/persisting-enumeration-and-sets-to-json.aspx" /><id>/Development/b/chuacw/archive/2017/12/11/persisting-enumeration-and-sets-to-json.aspx</id><published>2017-12-11T08:01:00Z</published><updated>2017-12-11T08:01:00Z</updated><content type="html">I&amp;#39;ve created a demo on persisting enumeration and sets to JSON format. The default Delphi RTL persists enumeration as their names. The improvement I made persists enumerations and sets to any name you choose, subject to the rules of JSON. It&amp;#39;s up on Github, and it&amp;#39;s named EnumJSON . Here&amp;#39;s a sample enum: TFunnyEnums = (Highlander, GalaxyFish, TomorrowNeverComes); In order to persist this, inherit a new class from TEnumInterceptor, and use the EnumAs attribute with the output of the...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2017/12/11/persisting-enumeration-and-sets-to-json.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7218" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>Why you need to make your string parameter a const</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2017/12/08/why-you-need-to-make-your-string-parameter-a-const.aspx" /><id>/Development/b/chuacw/archive/2017/12/08/why-you-need-to-make-your-string-parameter-a-const.aspx</id><published>2017-12-08T01:40:00Z</published><updated>2017-12-08T01:40:00Z</updated><content type="html">I have often wanted to point this out, but didn&amp;#39;t really feel the need to, until today, when I was debugging into the RTL. When you have a string parameter, the compiler makes a call to the RTL routine _UStrAddRef, and _UStrClr. When you have multiple string parameters, the compiler makes a call for each string parameter to _UStrAddRef, and one call to _UStrArrayClr. In addition, the compiler will compile code similar to a try finally sequence as well. If you do not make any changes to the string...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2017/12/08/why-you-need-to-make-your-string-parameter-a-const.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7217" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Hacking" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Hacking/default.aspx" /><category term="Delphi" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Delphi/default.aspx" /></entry><entry><title>How to install Ganache</title><link rel="alternate" type="text/html" href="/Development/b/chuacw/archive/2017/11/16/how-to-install-ganache.aspx" /><id>/Development/b/chuacw/archive/2017/11/16/how-to-install-ganache.aspx</id><published>2017-11-16T07:56:00Z</published><updated>2017-11-16T07:56:00Z</updated><content type="html">The latest Ethereum tool, is Ganache, an one-click Blockchain. It&amp;#39;s distributed in appx format, which apparently, is only supported by Windows 10. However, it appears that Ganache can be run on earlier versions of Windows. in order to do this, download the Windows 10 SDK EXE, not ISO. Then, select to download the &amp;quot;Windows SDK for UWP Managed Apps&amp;quot;, which would add another 2 SDKs to the installation. The total installation size is about 1 GB. Once you&amp;#39;ve done that, Go to the installed...(&lt;a href="https://chuacw.ath.cx/Development/b/chuacw/archive/2017/11/16/how-to-install-ganache.aspx"&gt;read more&lt;/a&gt;)&lt;img src="https://chuacw.ath.cx/aggbug.aspx?PostID=7210" width="1" height="1"&gt;</content><author><name>chuacw</name><uri>https://chuacw.ath.cx/members/chuacw/default.aspx</uri></author><category term="Blockchain" scheme="https://chuacw.ath.cx/Development/b/chuacw/archive/tags/Blockchain/default.aspx" /></entry></feed>