搜尋此網誌

2026年10月16日星期五

從「損失」中學習

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

陶瓷術語十七

短流是古代陶器、青銅器常見的一種構件術語。

流:指器物上用來倒出液體的出口部分,相當於壺嘴。

短流:流部較短,通常只略微伸出器身,與「長流」相對。

Microsoft Copilot

齊家文化

齊家文化是中國西北地區早期青銅時代的重要考古文化,約公元前2400年至前1900年,分布於甘肅蘭州至青海湟水流域,被視為中國最早的青銅文化之一。 它承接馬家窯文化,並在陶器、青銅器、農業與社會制度上展現出過渡性特徵。

Microsoft Copilot

en.wikipedia.org

裝飾技法

凸弦紋是中國古代陶器、青銅器常見的一種裝飾技法。

凸弦紋:指在器物表面沿橫向或環繞器身,塑造出 凸起的弦狀線條。

「弦」在此比喻為細長的線條,凸弦紋就是將這些線條以立體方式表現。

Microsoft Copilot

陶瓷術語十六

鋬手是中國古代陶器、青銅器常見的一種器物構件術語。

鋬手:指器物在口沿或肩部兩側附加的 小耳狀把手,通常呈橫向或斜向伸出。

與「耳」或「提梁」不同,鋬手多為 短小、便於提握或繫繩 的構件。

Microsoft Copilot

2026年10月12日星期一

烙印

From a neuroplastic perspective, when you lose someone your brain is having to readjust to a completely new way of living. Over time the person you love has been ingrained into the network of neurons in your brain.

從神經可塑性的角度來看,當你失去某個人時,大腦需要重新適應一種全新的生活方式。因為隨著時間的累積,你所愛的人已經深深嵌入到大腦的神經網絡之中。

當那個人離開或過世時,原本被強化的迴路仍會被觸發,例如習慣性想起、看到熟悉物品時的情緒反應。但外在環境與互動模式已經改變,於是大腦需要重新調整,減弱某些舊有連結,建立新的連結來適應沒有對方的生活。這個過程需要時間,並伴隨悲傷、思念與行為上的改變。

agony: extreme physical or mental pain

subside: to become calmer, quieter or less intense

dump: to get rid of something you do not want, especially in a place that is not suitable

anguish: severe physical or mental pain, difficulty or unhappiness

inkling: a slight knowledge of something that is happening or about to happen

incomprehensible: impossible to understand

nonetheless: despite this fact

falling-out: a situation where people are no longer friends, because they disagree or have had an argument

taxing: needing a great amount of physical or mental effort

marine: a soldier who is trained to serve on land or at sea, especially one in the US Marine Corps or the British Royal Marines

Nicole Vignola "Rewire"

hk.dictionary.search.yahoo.com

oxfordlearnersdictionaries.com

Explained by Microsoft Copilot