搜尋此網誌

2026年10月20日星期二

Dispute

stipulate: to state clearly and definitely that something must be done, or how it must be done

arbitration: the hearing and determination of a disputed case by an arbiter

arbiter: judge

demeanor: the way that somebody looks or behaves

bolster: to improve something or make it stronger

misplaced: not appropriate or correct in the situation

smug: looking or feeling too pleased about something you have done or achieved

thorough: (of a person) doing things very carefully and with great attention to detail

testimony: a formal written or spoken statement saying what you know to be true, usually in court

depose: to testify or affirm under oath, especially in a written statement

oath: a formal promise to do something or a formal statement that something is true

proceedings: the process of using a court to settle an argument or to deal with a complaint

monstrosity: something that is very large and very ugly, especially a building

rustle around: move things or search through something in a hurried, casual, or haphazard way, often making soft, dry, or scraping sounds

yank out: to pull on something with a quick vigorous movement

speculate: to form an opinion about something without knowing all the details or facts

tidbit: a small piece of interesting information

A Roman legion was the largest basic military unit of the ancient Roman army, made up of heavy infantry recruited from Roman citizens.

obligated: having a moral or legal duty to do something

broach: to begin talking about a subject that is difficult to discuss, especially because it is embarrassing or because people disagree about it

transpire: happen

chastise: to criticize somebody for doing something wrong

drum up: to try hard to get support or business

in-house: within a company or an organization


Bill Gates "Source Code"

Online Dictionaries Used:

hk.dictionary.search.yahoo.com

www.oxfordlearnersdictionaries.com

2026年10月16日星期五

陶瓷術語十八

足上鏤孔︰在器物的足部開鑿鏤空孔洞作為裝飾。

圈足︰器底下面有一個圓環形底座。

Microsoft Copilot

蛋殼黑陶

蛋殼黑陶是中國史前陶器工藝的代表作品之一,因器壁極薄如蛋殼而得名,被視為新石器時代製陶技術的高峰。

Microsoft Copilot

Strong Reduction Firing

「強還原氣氛燒成」是陶器燒製中的一種窯燒氣氛控制方式。

還原燒成︰特徵是氧氣不足

在窯爐內故意減少氧氣供應,使燃料(煤、木柴、瓦斯)燃燒不完全。

由於氧氣不足,火焰會從陶土和釉藥中的金屬氧化物「搶奪氧」。

這種化學變化會改變陶器的顏色和質感。

Microsoft Copilot

陶藝術語

「快輪拉坯」是陶藝中的術語。

快輪:指高速旋轉的陶輪。

拉坯:利用旋轉中的陶泥,以雙手將泥團拉高、擴張、塑形,製作杯、碗、瓶等器物的過程。

Microsoft Copilot

從「損失」中學習

modulation: the act of influencing something by changing or controlling it

The periaqueductal gray is a key structure in the propagation and modulation of pain, sympathetic responses as well as the learning and action of defensive and aversive behaviors.

The posterior cingulate cortex is a key node in the default mode network that is typically active at rest and during episodic and prospective memory tasks.

autobiographical: being or relating to the story of a person's life

going-over: a complete examination or cleaning of somebody/something

cathartic: involving the release of strong feelings as a way of providing relief from anger, mental pain, etc.

The anterior cingulate cortex (ACC) is part of the limbic system and is involved in the regulation of attention and emotion, inhibitory control, error monitoring, and motivation (Bush, Luu, & Posner, 2000). 

When your brain uses previous experiences to shape the world, we call this experience-dependent plasticity. Having experienced a loss means we can be better prepared next time.

大腦會根據你過去學到和經歷過的事情,改變神經連結,從而影響你如何理解和回應周圍的世界。曾經遭受失敗或損失的人,能從經驗中學習,未來遇到類似情況時,較能預防問題或作出更好的決定。

The ventral tegmental area (VTA) is a group of neurons located near the floor of the midbrain, adjacent to the substantia nigra. It serves as a core part of the brain's reward and motivation circuitry.

The nucleus accumbens is a subcortical brain structure in the basal forebrain that acts as the primary interface between motivation, emotion, and motor action, famously recognized as a core part of the brain's reward system.

Nicole Vignola "Rewire"

hk.dictionary.search.yahoo.com

oxfordlearnersdictionaries.com

en.wikipedia.orgy

Google AI Overview

Explained by Microsoft Copilot

2026年10月13日星期二

Drawing shapes in Python

A static attribute in Python is a variable that belongs to the class itself, not to individual objects created from that class. It’s sometimes called a class attribute.

Defined inside the class, but outside any methods.

Shared by all instances of the class.

Accessed using either ClassName.attribute or object.attribute.

class Dog: # static/class attribute species = "Canis familiaris" def __init__(self, name): self.name = name # instance attribute dog1 = Dog("Rover") dog2 = Dog("Buddy") print(dog1.species) # Canis familiaris print(dog2.species) # Canis familiaris print(Dog.species) # Canis familiaris

class Shape:

    width = 5

    height = 5

    printChar = '#'

 

    def printRow(self, i):

        raise NotImplementedError("Will be implemented by children extending this class")

 

    def print(self):

        for i in range(self.height):

            self.printRow(i)

Shape class

Has static attributes: width, height, printChar.

Defines printRow() as an abstract method (raises NotImplementedError).

In Python, raise is used to trigger an exception. It tells the program: “Stop normal execution here and signal that something went wrong.”

Defines print() which loops through rows and calls printRow(i).

In your code, self.height refers to the class attribute height (which is set to 5 in Shape) but accessed through the object (self).

When you call self.height, Python first looks for an instance attribute named height.

If it doesn’t find one, it uses the class attribute height.

In your example, since you didn’t set height inside __init__, every object uses the class’s height = 5.


class Square(Shape):

    def printRow(self, i):

        print(self.printChar * self.width)


Square class

Implements printRow(i) by printing a full row of printChar repeated width times.

So Square().print() will print a solid square.


class Triangle(Shape):

    def printRow(self, i):

        # Row i has (i+1) characters

        print(self.printChar * (i + 1))


class EqilateralTriangle(Shape):

    def printRow(self, i):

        spaces = self.width - i - 1

        chars = 2 * i + 1

        print(" " * spaces + self.printChar * chars)

    #
   ###
  #####
 #######
#########

Is it a matter if i don't put "self" before "printChar"?
Yes, it does matter whether you put self. before printChar.

With self.printChar
  • Python looks for the attribute on the object (self).
  • If the object doesn’t have its own, it falls back to the class attribute (Shape.printChar).
  • This makes the code flexible: each instance can override printChar if needed.

With just printChar
  • Python will look for a local variable named printChar inside the method.
  • Since none exists, it will raise a NameError.
  • It won’t automatically use the class attribute unless you explicitly write Shape.printChar.
>>> padding = int((10 - 1)/2) >>> print (padding) 4

Microsoft Copilot