Home avatar

  • 2026
  • 2025
  • 2024
  • 2023
  • 2022
  • 2021
  • 2020
  • 2019
  • 2018
  • 2017

7 posts in 2026

2 posts in 2025

3 posts in 2024

5 posts in 2023

4 posts in 2022

5 posts in 2021

8 posts in 2020

11 posts in 2019

7 posts in 2018

6 posts in 2017

QNAP TS-453Dmini Review

My first NAS is Synology DS120j, which is ARM based entry level product. It’s okay to use it for downloading and backup, but not power enough for running docker and virtual machine.

So I bought this NAS last month, and I’m satisfied with it. Here are the advantages and disadvantages.

Advantages

  1. High performance.

Internet Account Keeps Coming Back After Deletion on MacOS

Today I tried to delete an inactive Internet account on system preference. It was deleted successfully but come back again after 20 seconds. This drives me nuts.

I tried these methods, but none of them works.

  • Boot in safe mode, delete account.
  • Delete record in ZACCOUNT table in ~/Library/Accounts/Accounts4.sqlite.
  • Delete related items in Keychain Access app.

Later, RedHatDude’s answer gives me a clue, it looks like a iCloud sync problem. I tried to delete the account on my 3 MacBooks together. Thank goodness! It does not show up again.

How to Disable Auto Strip in Charfield in Django

In Django, when edit field in admin page or post data to forms, the leading and tailing whitespace in CharField and TextField are removed.

The reason is strip=True parameter in forms.CharField, which is added in Djagno 1.9. You can see the discussion in django tiket #4960 and here is source code. models.CharField and models.TextField use formfield() to create form to interact with user, then both of them eventually create a forms.CharField

Dynamic Allocate Executors When Executing Jobs in Spark

I wrote a Spark program to process logs. The number of logs always changes as time goes by. To ensure logs can be processed instantly, the number of executors is calculated by the maximum of logs per minutes. As a consequence, the CPU usage is low in executors. In order to decrease resource waste, I tried to find a way to schedule executors during the execution of program.

As shown below, the maximum number of logs per minutes can be a dozen times greater than the minimum number in one day.