0%

今天我們要一起來聊聊 Docker,Docker 是現代開發與運維中不可或缺的工具,用來打包、部署和運行應用程式。它讓你能在任何環境中快速部署應用,實現「一次構建,隨處運行」的目標,是一個讓開發者與運維工程師都愛不釋手的工具。想像 Docker 就像是「貨櫃」,它能把你的應用程式打包起來,無論搬到哪台電腦上都能保證一致運行。準備好了嗎?讓我們開始吧!

Read more »

為什麼要了解單體架構和微服務架構?

隨著技術的快速發展,軟體架構設計已經成為每個工程師必須掌握的核心知識之一。
無論你是正在開發新產品的初創團隊,還是維護大型系統的資深工程師,選擇適合的架構直接影響系統的穩定性、性能和團隊效率。

然而,對於剛接觸架構設計的初學者來說,「單體架構」與「微服務架構」之間的選擇常常令人困惑:

  • 單體架構似乎簡單直接,但為什麼大家都在討論微服務?
  • 微服務聽起來很先進,但是否真的適合所有場景?
  • 團隊是否一定要採用最新技術,才能保持競爭力?
Read more »

為什麼需要這些技術?

隨著應用程式越來越複雜,我們需要更靈活、高效的方式來部署和管理它們。傳統的硬體配置已經無法滿足快速變動的需求,因此「虛擬化技術」和「容器化技術」應運而生。

Read more »

https://leetcode.com/problems/maximum-product-difference-between-two-pairs/

The product difference between two pairs (a, b) and (c, d) is defined as (a * b) - (c * d).

For example, the product difference between (5, 6) and (2, 7) is (5 * 6) - (2 * 7) = 16.
Given an integer array nums, choose four distinct indices w, x, y, and z such that the product difference between pairs (nums[w], nums[x]) and (nums[y], nums[z]) is maximized.

Return the maximum such product difference.

Read more »

You are given a string num, representing a large integer. Return the largest-valued odd integer (as a string) that is a non-empty substring of num, or an empty string “” if no odd integer exists.

A substring is a contiguous sequence of characters within a string.

Example 1:

1
2
3
Input: num = "52"
Output: "5"
Explanation: The only non-empty substrings are "5", "2", and "52". "5" is the only odd number.

Example 2:

1
2
3
Input: num = "4206"
Output: ""
Explanation: There are no odd numbers in "4206".

Example 3:

1
2
3
Input: num = "35427"
Output: "35427"
Explanation: "35427" is already an odd number.
1
2
3
4
5
6
7
8
class Solution:
def largestOddNumber(self, num: str) -> str:
for i in range(len(num) - 1, -1, -1):

if int(num[i]) % 2:
return num[:i + 1]

return ''

https://leetcode.com/problems/calculate-money-in-leetcode-bank

Hercy wants to save money for his first car. He puts money in the Leetcode bank every day.

He starts by putting in $1 on Monday, the first day. Every day from Tuesday to Sunday, he will put in $1 more than the day before. On every subsequent Monday, he will put in $1 more than the previous Monday.
Given n, return the total amount of money he will have in the Leetcode bank at the end of the nth day.

image

Read more »