CozyDev

Stay curious

git rerere

git rerere 是 Git 中的一個功能,全名是 “reuse recorded resolution” 意思是重複使用已記錄的解決方案。當你在合併分支或應用補丁時,常常會遇到需要手動解決的衝突情況。但是如果你在

git stash

在開發軟體時,可能會遇到一種情境:當某個系統開發已經進行到一半,突然被老闆或客戶「插隊」,需要緊急修正一個現有系統的 Bug 或添加一個功能。 這時候

Data Structure

Various structures

Linked List Linked list swap file system read CMD pointer manipulate

imperative | declarative

The differences in programming styles

Imperative HOW you do something Imperative programming is a paradigm describing HOW the program should do something by explicitly specifying each instruction (or statement) step by step, which mutate the program’s state. Functional programming 是 Declarative Paradigm 的代表,邏輯為用較為抽象的程式碼,理解程式碼想要達到怎樣的目標,F

API models: gRPC | OpenAPI | REST

What are the differences

gRPC 適合需要高效率、強類型、低延遲的系統,特別適用於微服務架構的內部通訊。 OpenAPI 主要用於定義和文檔化 API,提供簡單的工具來自動化生成代碼和文檔。

Gerrit

Code Owners OWNERS file can sit in every directory layer in the repository

.war and .jar in Java

What are the differences

在Java語言中,.war 和 .jar 是兩種不同的壓縮文件格式,通常用於打包和部署Java應用程序。它們之間的主要區別在於它們的用途和內容: .war (Web Application Archive):

Python

Cpython Py_INCREF() and Py_DECREF() While Py_INCREF() and Py_DECREF() are essential components of Python’s memory management system, they’re not the ideal way to directly count how many times a Python variable is used. Let me explain why and offer better alternatives: Role: These functions are at the heart of Python’s reference counting garbage collection. Py_INCREF(object): Increments the reference count of an object. This indicates that the object is in use and

DBMS Data Types

What are the differencess between: structured, unstrcutured, transactional and relational data

結構化數據 (Structured Data): 結構化數據是以固定格式和結構存儲的數據。通常,結構化數據可以使用表格或者數據庫中的行和列來表示。 例子:關係型數據庫中的表格、E

Google cloud storage options

Google cloud provides 5 storage products: Cloud Storage Cloud SQL Cloud Spanner Firestore Cloud Bigtable 1. Cloud storage Google’s object storage product. It allows user to store any amount of data and retrieve it as often as needed. Fully managed scalable service that has wide variety of uses. Example: web archival and disaster recovery, website content, direct download. Primary use: Binary large-object storage (BLOB) Online contents: videos and photos Backup and archiving Storage of intermediate results object storage: store data as object but not as file and folder hierarchy(file storage), or as chunks of a disk(block storage)

git rebase

Rebase branch and repositories

In your local clone of your forked repository, you can add the original GitHub repository as a “remote”. (“Remotes” are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. 到你 fork repository 的 local cloned area 中,你可以將原

SSL | TLS | HTTPS

What are the differencess

Similarities: Security: Both SSL (Secure Sockets Layer) and TLS (Transport Layer Security) are protocols designed to provide secure communication channels over the internet, encrypting data during transmission to prevent interception or eavesdropping by third parties. Encryption Algorithms: SSL and TLS support various encryption algorithms, including symmetric encryption, asymmetric encryption, and digital signature algorithms, to ensure data confidentiality, integrity, and authenticity. Handshake Protocol: SSL and TLS both require a handshake protocol

Various dbms

What are the differences

Relational Databases: Structured Data: Data is organized in tables with predefined structures, each table consisting of fixed columns and column types. SQL Query Language: Relational databases typically use SQL (Structured Query Language) for executing queries and managing data. Strong Consistency: They usually provide ACID (Atomicity, Consistency, Isolation, Durability) properties, ensuring data consistency and reliability. Vertical Scaling: They often employ vertical scaling, meaning adding more hardware resources to improve performance. Example

HTML Basics

What are the differences

All HTML elements can have attributes The href attribute of <a> specifies the URL of the page the link goes to The src attribute of <img> specifies the path to the image to be displayed The width and height attributes of <img> provide size information for images The alt attribute of <img> provides an alternate text for an image The style attribute is used to add styles to an element, such as color, font, size, and more The lang attribute of the <html> tag declares the language of the Web page The title attribute defines some extra information about an element

Mercurial and Git

What are the differencess

Mercurial and Git are both used for version control. Both Mercurial (Hg) and Git are popular distributed version control systems (DVCS), but they have some key differences in their approach: Branching Model: Mercurial: Employs a centralized branching model, meaning each branch has its own separate directory. Switching branches involves changing directories. This can be simpler for beginners but less flexible for complex workflows. Git: Uses a decentralized branching model, where