Skip to content

Duong's Blog

About technology stuff that piqued my interest

  • English
  • Vietnamese
  • About me

Category: English

  • Home
  • English

Expression Tree for IQueryable in LINQ

June 29, 2022June 29, 2022 duongnt.bkLeave a Comment on Expression Tree for IQueryable in LINQ

To avoid hard-coding attribute names in LINQ code of the IQueryable type, we can manually create Expression Tree. This helps eliminate duplicated code.

C#, English C#, expression-tree, linq

Task.Yield – a rarely used method in C#

June 13, 2022June 13, 2022 duongnt.bk1 Comment on Task.Yield – a rarely used method in C#

The Task.Yield method can “creates an awaitable task that asynchronously yields back to the current context when awaited”. Let’s find out what that means today.

C#, English C#, concurrency, Task.Yield

Tag Helpers and custom tags in ASP.NET Core

May 25, 2022May 26, 2022 duongnt.bk1 Comment on Tag Helpers and custom tags in ASP.NET Core

In ASP.NET Core, Tag Helpers can be used to create custom HTML tags, or to create custom attributes for other tags. Let’s find out how to do that.

C#, English ASP.NET Core, C#, Tag Helpers

Create custom policy for Polly in C#

May 15, 2022May 15, 2022 duongnt.bkLeave a Comment on Create custom policy for Polly in C#

In the last article, we went through the basics of Polly. Today, we will find out how to use Polly to create our own custom policy.

C#, English C#, custom policy, polly

Use Polly to retry requests in C#

April 29, 2022May 15, 2022 duongnt.bk3 Comments on Use Polly to retry requests in C#

The Polly library is my go-to choice whenever I need to retry my HTTP requests. In today’s article, we will see how it works.

C#, English C#, polly

Python deep copy in action

April 20, 2022April 20, 2022 duongnt.bk3 Comments on Python deep copy in action

The deep copy method makes sure that changes made to a copy don’t affect the original object. Today, we will see how it works behind the scenes.

English, Python copy, deepcopy, python

Python Context Manager and some tricks

April 2, 2022April 2, 2022 duongnt.bk1 Comment on Python Context Manager and some tricks

Context manager is an interesting feature in Python. Its main use is to manage resources. But today, we will explore some of its more exotic uses.

English, Python context-manager, python

Time dependent unit testing in C#

March 23, 2022December 6, 2022 duongnt.bk1 Comment on Time dependent unit testing in C#

Testing time dependent classes can be tricky. Fortunately, the NodaTime and NodaTime.Testing package can assist us in resolving this issue.

C#, English C#, NodaTime, testing

Use init_subclass to replace metaclasses

February 17, 2022February 17, 2022 duongnt.bkLeave a Comment on Use init_subclass to replace metaclasses

Metaclass is an interesting feature in Python. But in many situations, it is overkilled. From version 3.6, we can replace it with the `init_subclass` method.

English, Python init_subclass, metaclass, python

Restore Vietnamese diacritics with Transformer

January 29, 2022January 31, 2022 duongnt.bk1 Comment on Restore Vietnamese diacritics with Transformer

In this article, we try to restore Vietnamese diacritics using a Transformer model. You don’t need to understand Vietnamese to read this, I promise :).

C#, English, Python deep-learning, keras, nlp

Posts navigation

Older posts
Newer posts
Copyright © 2025 Duong's Blog All rights reserved. Theme: Flash by ThemeGrill. Powered by WordPress