Blogs ›

Reference in Rust vs. C++

March 20, 2024

Notes for the reference in rust

Switching to Rust from C++ would encounter this question: does the reference sematics in rust is same as the C++?, Let’s describe it with an example.

...

Kubernetes LoadBalancer Service with MetalLB

May 24, 2023

In kubernetes, LoadBalancer is the most common way of exposing backend applications to the outside world. Its API is very similar to NodePort with the only exception being the spec.type: LoadBalancer. At the very least, a user is expected to define which ports to expose and a label selector to match backend Pods:

...

Leak debugging with LeakSanitizer

May 22, 2023

LeakSanitizer internally uses ptrace, probably to suspend all threads such that it can scan for leaks without false positives (see issue 9). Only one application can use ptrace, so if we run application under gdb or strace, then LeakSanitizer won’t be able to attach via ptrace. if we are using clion, it probably end up with a error message like “LeakSanitizer does not work under ptrace (strace, gdb, etc)”

...

big-endian vs. little-endian

May 16, 2023

Big-endian and little-endian are two byte ordering schemes used to store multibyte data types (such as integers and floating-point numbers) in computer memory.

...

Case-(in)sensitive, collation and quote in different DBMSs.

April 21, 2023
Database

Case-(in)sensitive, collation and quote in different DBMSs.

In Oracle Database, you can use double quotes (") to quote SQL identifiers such as table names, column names, and aliases. By enclosing an identifier in double quotes, you can use mixed case, special characters, or reserved words as identifiers.

...

Oracle Usage FAQ

April 21, 2023
Database

Unlike other databases like MySQL, PostgreSQL, etc., Oracle database have some dialect and different concepts, for example, create database command won’t work in Oracle, instead, it uses user as the isolate mechanisim instead of database.

Here Oracle Database basic usages FAQs record:

  • Oracle create user/database via sqlplus
  • Oracle JDBC driver oci8 vs. thin?
  • Oracle sqlplus show non-system users
  • Oracle sqlplus show tables and views
...

Connecting Clickhouse to pupular OLTP DBMSs

April 20, 2023
Database

How to Connect Clickhouse to PostgreSQL, MySQL, Oracle, SQL-Server, MongoDB.

This post shows a step-by-step tutorial for connecting ClickHouse to PostgreSQL, MySQL and MongoDB via the ClickHouse storage engine and connecting Oracle and SQL-Server via the JDBC-bridge(the official JDBC-bridge has some limitations, check this fork as a workaround)

...