在手動模式 (Manual Mode) 下,曝光補償 (Exposure Compensation) 功能通常不會直接使用,因為您完全控制光圈、快門和 ISO。
搜尋此網誌
2026年1月22日星期四
〈有牌爛仔〉
雙十暴動是1956年10月10至12日間在香港九龍及荃灣等地發生的一次騷亂。事件的導火線是徙置事務處職員在中華民國國慶10月10日移除懸掛在李鄭屋徙置區的中華民國國旗和大型「雙十」徽牌。
騷動衝着國共力量在港的矛盾,由雙十掛國旗的糾紛觸發,再引來連串駭人的暴力事件。衝突結果帶來六十人死、四百四十三人傷。
Interviews
whisk somebody/something + adv./prep. to take somebody/something somewhere very quickly and suddenly
fabled: famous and often talked about, but rarely seen
A DEC computer refers to machines made by the Digital Equipment Corporation (DEC), a pioneering American company famous for revolutionizing computing with affordable minicomputers.
cling: to hold on tightly to somebody/something
"Bonneville" refers to a significant early programming job Bill Gates and Paul Allen had for the Bonneville Power Administration (BPA) in North Bonneville, Washington, where they debugged software for the Pacific Northwest's electrical grid control system for defense contractor Thompson Ramo Wooldridge (TRW).
awed: showing or feeling respect and slight fear; extremely impressed by somebody/something
bask (in something) to enjoy sitting or lying in the heat or light of something, especially the sun
hone: to develop and improve something, especially a skill, over a period of time
veer: to change direction suddenly
angst: a feeling of great worry about a situation, or about your life
Plymouth was a popular American car brand by Chrysler, launched in 1928 to offer affordable cars against Ford and Chevy, becoming known for reliable models like the Valiant and iconic muscle cars.
Bill Gates "Source Code"
Online Dictionaries Used:
hk.dictionary.search.yahoo.com
www.oxfordlearnersdictionaries.com
Google AI overview
2026年1月20日星期二
Open a txt file for reading
reading file: ifstream (input file stream)
writing file: ofstream (output file stream)
eof() in C++ is a member function of file stream classes (ifstream, ofstream, fstream) that stands for end-of-file.
stoi in C++ stands for "string to integer".
Meaning of letter = str[0];
str → a std::string object.[0]→ accesses the first character of the string (indexing starts at 0).letter→ a variable of typecharthat stores the result.
So this statement assigns the first character of the string str to the variable letter
Microsoft Copilot
成長
hype: to advertise something a lot and make its good qualities seem better than they actually are, in order to get a lot of public attention for it
conglomerate: (business) a large company formed by joining together different firms
off base: (North American English, informal) completely wrong about something
blurt out: say something suddenly, impulsively, and without thinking, often revealing a secret or a thought you intended to keep hidden, typically due to excitement or nervousness, and sometimes leading to regret
flaw: a mistake in something that means that it is not correct or does not work correctly
fluster: to make somebody nervous and/or confused, especially by giving them a lot to do or by making them hurry
dumb: (especially North American English, informal) stupid
stalk: to walk in an angry or proud way
dread: to be very afraid of something; to fear that something bad is going to happen
congenial: (of a person) pleasant to spend time with because their interests and character are similar to your own
comeuppance: a punishment for something bad that you have done, that other people feel you really deserve
cringe: to feel very embarrassed and uncomfortable about something
Bill Gates "Source Code"
Online Dictionaries Used:
hk.dictionary.search.yahoo.com
www.oxfordlearnersdictionaries.com
2026年1月16日星期五
Working with files
In C++, the fstream class (from the header) is used for both reading and writing files. It combines the functionality of ifstream (input file stream) and ofstream (output file stream), allowing you to open a file and perform input/output operations on it.
The is_open() function in C++ is a member of the file stream classes (ifstream, ofstream, and fstream). It is used to check whether a file stream is currently associated with (and successfully opened) a file.
getline() in C++ — it’s one of the most useful functions for reading text input, especially when dealing with files or user input that includes spaces.
#include <iostream>
#include <string>
using namespace std;
int main() {
string name;
cout << "Enter your full name: ";
getline(cin, name); // reads entire line including spaces
cout << "Hello, " << name << "!" << endl;
return 0;
}
ios::app is a file open mode flag used with file streams (ofstream, fstream).
Meaning: Append mode.
When you open a file with ios::app, all output operations are performed at the end of the file, preserving existing content.
The file pointer is moved to the end before each write.
Existing data is not erased.
console: a flat surface that contains all the controls and switches for a machine, a piece of electronic equipment, etc.
ios::in
- Meaning: Open file for input (reading).
- Behavior:
- The file must exist; otherwise, opening fails.
- You can read data from the file using the stream.
- Typical use: Used with
ifstreamorfstream.
ios::out
- Meaning: Open file for output (writing).
- Behavior:
- If the file exists, its contents are truncated (erased) unless combined with
ios::app. - If the file doesn’t exist, it is created.
- You can write data into the file.
- Typical use: Used with
ofstreamorfstream.
The .close() function in C++ is used with file stream objects (ifstream, ofstream, fstream) to close an open file.
Microsoft Copilot
Precocious
sophomore: a student in the second year of a course of study at a college or university
audit something (North American English) to attend a course at college or university but without taking any exams or receiving credit
enthuse: to talk in an enthusiastic and excited way about something
precocious: (of a child) having developed particular abilities and ways of behaving at a much younger age than usual
complimentary: expressing approval, praise, etc.
brat: a person, especially a child, who behaves badly
dejected: unhappy and disappointed
stunned: very surprised or shocked; showing this
propriety: moral and social behavior that is considered to be correct and acceptable
conversant: moral and social behavior that is considered to be correct and acceptable
whizz: to do something very quickly
innate: (of a quality, feeling, etc.) that you have when you are born
subtly: in a way that is not very obvious or easy to notice
nerd: a person who is boring, stupid and not fashionable
stark: unpleasant; real, and impossible to avoid
deception: the act of deliberately making somebody believe something that is not true
hands-down: easily the winner of a contest; definitely the one that people prefer
suite: a set of rooms, especially in a hotel
confide: to tell somebody secrets and personal information that you do not want other people to know
epiphany: a sudden and surprising moment of understanding
implicit: suggested without being directly expressed
vibe: a mood or an atmosphere produced by a particular person, thing or place
prod: to try to make somebody do something, especially when they are unwilling
languish: to be forced to stay somewhere or suffer something unpleasant for a long time
scrawl: to write something in a careless untidy way, making it difficult to read
vocation: a type of work or way of life that you believe is especially suitable for you
dicey: dangerous and uncertain
Bill Gates "Source Code"
Online Dictionaries Used:
hk.dictionary.search.yahoo.com
www.oxfordlearnersdictionaries.com
2026年1月13日星期二
Chapter Quiz
A class template allows you to define a class that can work with any data type. Instead of writing separate classes for int, double, string, etc., you write one generic class and let the compiler generate the specific version when you use it
Inheritance allows one class (the derived class) to reuse and extend the functionality of another class (the base class).
Polymorphism means “many forms” — the ability of different classes to be treated through a common interface, often using virtual functions.
In C++ (and in object-oriented programming generally), a superclass is simply another name for a base class — the class that is being inherited from.
A constructor is a special member function that is automatically called when an object of a class is created.
A destructor is a special member function that is automatically called when an object goes out of scope or is deleted.
template <typename T>
size_t size_in_bits(const T& a) {
return sizeof(a) * 8;
}
template <typename T>
Declares a function template that can accept any type T.
const T& a
The function takes a constant reference to an object of type T.
Using const ensures the function doesn’t modify a.
Using a reference avoids copying large objects.
sizeof(a)
Returns the size of the object a in bytes.
* 8
Converts bytes into bits (since 1 byte = 8 bits).
Return type size_t
A standard unsigned integer type used for sizes.
Queue (FIFO — First In, First Out)
- Think of a line at a ticket counter: the first person to arrive is the first person served.
- Operations:
- Enqueue → add an element at the back.
- Dequeue → remove an element from the front.
Stack (LIFO — Last In, First Out)
- Think of a stack of plates: the last plate you put on top is the first one you take off.
- Operations:
- Push → add an element on top.
- Pop → remove the top element.
What is std::map?
- A sorted associative container in the C++ Standard Library.
- Stores elements as key–value pairs (
std::pair). - Keys are unique (no duplicates).
- Internally implemented as a balanced binary search tree (usually a Red-Black Tree).
- Provides logarithmic time complexity (
O(log n)) for insert, search, and delete operations.
What is std::vector?
- A sequence container that stores elements in a contiguous memory block (like an array).
- Unlike arrays, vectors can grow or shrink dynamically.
- Provides random access to elements (constant time
O(1)for indexing). - Efficient insertion/removal at the end (
push_back,pop_backare amortizedO(1)), but slower at the front or middle (O(n)).
What is std::list?
- A sequence container that stores elements in a doubly linked list.
- Unlike
std::vector, elements are not stored contiguously in memory. - Provides fast insertion and deletion anywhere in the list (
O(1)if you already have the iterator). - Slower random access (
O(n)), since you must traverse nodes sequentially.
What is std::priority_queue?
- A container adapter in the C++ Standard Library.
- Works like a queue, but instead of FIFO order, it always keeps the largest (or highest priority) element at the front by default.
- Internally implemented using a heap (usually a max-heap).
- Provides logarithmic time complexity (
O(log n)) for insertion and removal, and constant timeO(1)for accessing the top element.
Pointer
- A pointer is a variable that stores the memory address of another variable.
- You can use it to directly access and manipulate memory.
*p → dereference (access value at address).&x → address-of operator.Iterator
- An iterator is an object that behaves like a pointer but is designed to work with STL containers (
vector,list,map, etc.). - Provides a uniform way to traverse containers without worrying about their internal structure.
begin() → returns iterator to first element.end() → returns iterator past the last element.++it) to move forward.vector), while others only support sequential traversal (like in list).Operator overloading in C++ lets you redefine how operators (like +, -, ==, [], etc.) behave for your own classes. It’s a powerful way to make user-defined types feel natural and intuitive to use.
Normally, operators work with built-in types (int, double, etc.).
With operator overloading, you can extend them to work with objects.
Example: Adding two Complex numbers with + instead of writing a function like add(c1, c2).
Complex numbers are numbers of the form a+bi, where a is the real part, b is the imaginary part, and i is the imaginary unit defined by i^2=-1. They extend the real number system to allow solutions to equations like x^2+1=0, which have no real solutions.
competition among elite
dazzle: dazzle (somebody) if a strong light dazzles you, it is so bright that you cannot see for a short time
camaraderie: a feeling of friendship and trust among people who work or spend a lot of time together
footing: the basis on which something is established or organized
excel: to be very good at doing something
outlier: a person or thing that is different from or in a position away from others in the group
awkward: difficult to deal with
nudge: a slight push, usually with the elbow
premed: (especially North American English) a course or set of classes that students take in preparation for medical school
intently: with strong interest and attention
monstrous: very large
agilely: (of the way someone or something moves) quickly and easily
intimidating: frightening in a way that makes a person feel less confident
crammer: a school or book that prepares people quickly for exams
maniacal: wild or violent
gobble: to eat something very fast, in a way that people consider rude or greedy
preoccupied: thinking and/or worrying continuously about something so that you do not pay attention to other things
dingy: dark and dirty
grimy: covered with dirt
stunned: very surprised or shocked; showing this
screwed: in very bad trouble or difficulty
Bill Gates "Source Code"
Online Dictionaries Used:
hk.dictionary.search.yahoo.com
www.oxfordlearnersdictionaries.com
dictionary.cambridge.org
2026年1月9日星期五
Learn from exercise
std::deque (short for double-ended queue) is a container in C++ that allows fast insertion and deletion at both ends. It’s part of the Standard Template Library (STL).
dq[1] means "give me the element at index 1".dq[0] is the first element, and dq[1] is the second element.enum class in C++ is a strongly typed enumeration introduced in C++11. It improves upon traditional enum by providing better type safety and scoping.
In C++, the operator == is the equality comparison operator.
true or false).#include is a C++ standard library header that provides a collection of utility functions, classes, and templates commonly used in generic programming.
Here is one of the most important components:
std::pair
- A simple container that holds two values.
- Useful for returning two results from a function or storing key-value pairs.
1970s Computers in Harvard University
ECL: Extensible Computer Language
LHASA (Logic and Heuristics Applied to Synthetic Analysis) is a computer program developed in 1971 by the research group of Elias James Corey at the Harvard University Department of Chemistry. The program uses artificial intelligence techniques to discover sequences of reactions which may be used to synthesize a molecule. This program was one of the first to use a graphical interface to input and display chemical structures.
idle: (of machines, factories, etc.) not in use
The RAND Tablet is a graphical computer input device developed by The RAND Corporation.
stylus: (computing) a special pen used to write text or draw an image on a special computer screen
ubiquitous: seeming to be everywhere or in several places at the same time; very common
Chevrolet is an American automobile division of the manufacturer General Motors.
Digital Equipment Corporation (DEC) using the trademark Digital, was a major American company in the computer industry from the 1960s to the 1990s.
tinker (with something) to make small changes to something in order to repair or improve it, especially in a way that may not be helpful
legendary: very famous and talked about a lot by people
Spawn in computing refers to a function that loads and executes a new child process.
frivolous: (of people or their behavior) silly or funny, especially when such behavior is not suitable
snowflake: a small soft piece of frozen water that falls from the sky as snow
groundbreaking: making new discoveries; using new methods
A computer rack is a metal frame that is used to keep different hardware devices such as servers, hard disk drives, modems, and other electronic equipment.
Sketchpad is a computer program written by Ivan Sutherland in 1963 in the course of his PhD thesis.
"By then" is a phrase indicating a point in the future or past that has already been established in the conversation
soup up: (informal) to make changes to something such as a car or computer, so that it is more powerful or exciting than before
harness something to control and use the force or strength of something to produce power or to achieve something
nifty: practical; working well
devise something: to invent something new or a new way of doing something
Xerox PARC (Palo Alto Research Center) is a legendary R&D center by Xerox that invented foundational technologies for modern computing, including the graphical user interface (GUI), mouse, Ethernet, laser printers, bitmap graphics, and object-oriented programming (OOP) (Smalltalk).
PostScript (PS) is a page description language and dynamically typed, stack-based programming language.
cockpit: the area in a plane, boat or racing car where the pilot or driver sits
A baseball pitch is the act of a pitcher throwing the ball to the batter to start a play, varying velocity, movement, and location using different grips (like four-seam fastball, curveball, slider, changeup) to deceive the hitter and get an out.
"Scooping" in baseball is a fielding technique, especially for first basemen, to cleanly catch low throws or ground balls by digging the glove down and "up" to get under the ball, preventing it from going in the dirt.
A pop fly (or pop-up) in baseball is a short, high, arcing batted ball, usually hit to the infield, that doesn't travel far and is often an easy catch for an out, though sometimes dropped due to sun or misjudgment, leading to potential errors.
shortstop: (in baseball) a player who tries to stop balls that are hit between second and third base; the position of this player
aka: also known as
deliberately: done in a way that was planned, not by chance
hype: advertisements and discussion in the media telling the public about a product and about how good or important it is
quirk: a strange thing that happens, especially by accident
de facto: (from Latin, formal) existing as a fact although it may not be legally accepted as existing
subsist (on something) to manage to stay alive, especially with limited food or money
suite: a set of rooms, especially in a hotel
trivia: unimportant matters, details or information
ALaserDisc (LD) used for music, often featuring music videos, concerts, or high-fidelity audio, predating DVDs, known for its large 12-inch size (like vinyl LPs) and ability to hold both video and high-quality stereo/surround sound
instill: to gradually put an idea or attitude into somebody's mind; to make somebody feel, think or behave in a particular way over a period of time
obsession: the state in which a person’s mind is completely filled with thoughts of one particular thing or person in a way that is not reasonable or normal
mundane: not interesting or exciting
a restaurant where you choose and pay for your meal before you carry it to a table. Cafeterias are often found in factories, colleges, hospitals, etc.
pinball: a game played on a pinball machine, in which the player sends a small metal ball up a sloping board and scores points as it bounces off objects. The player tries to prevent the ball from reaching the bottom of the machine by pressing two buttons at the side.
abortion: the deliberate ending of a pregnancy at an early stage
crook: (informal) a dishonest person
coed: a female student at a co-educational school or college
velvet: a type of cloth made from silk, cotton or nylon, with a thick, soft surface
bell-bottoms: trousers with legs that become very wide below the knee
posse: (informal) a group of people who are similar in some way, or who spend time together
if people do or say something in unison, they all do it at the same time
stammer: to speak with difficulty, repeating sounds or words and often stopping, before saying things correctly
bushwhack: To bushwhack means to move through thick, uncleared terrain by cutting a path (like in hiking or exploring)
meld: to combine with something else; to make something combine with something else
congeal: (of blood, fat, etc.) to become thick or solid
Bill Gates "Source Code"
Online Dictionaries Used:
hk.dictionary.search.yahoo.com
www.oxfordlearnersdictionaries.com
Google AI overview
2026年1月6日星期二
Function objects
In C++, a function object (also called a functor) is any object that can be called like a function using the operator(). They are widely used in the Standard Template Library (STL) for algorithms, sorting, and predicates because they can hold state and be passed as types.
Lilas × marasy - Koikaze
The aftereffects of a past love
Left me unable to move forward
At times it aches and throbs (陣陣作痛)
Making me fearful
But you ---
With eyes so dazzlingly (燦爛地) bright
Gazed straight into me
And the hands of my inner clock started once more
Lightly
Softly into an empty heart
You leapt (越過) like a breeze (微風)
It’s like
I want to keep being swept away
Might as well take me
Far, far away
Spilling (溢出) over
Like the leaves of trees
My heart finds its way to you
Dancing in the air, fluttering (拍動)
Back and forth
How do I appear in those eyes of yours?
Swirling (旋轉) round and round
As if my temperature’s rising
Softly, in an unclear heart
Budding feelings emerge
And I waver
If I yield myself to the moment
And jump in
Wondering what you are doing
Or where or who you are laughing with
Wanting to see you
When I see something beautiful
It makes me want to share it with you
These frustrating feelings are
Falling in love
Should be more simple
My feelings
That sparkle like a flash of light
I hold them tight and carry on
In this moment
I can ride on the wind you stirred
Steadily taking
The first step forward
“I love you”
Maths course in Harvard
a person of color: generally refers to anyone who is not White or of European descent, encompassing diverse racial and ethnic groups like Black, Asian, Native American, Pacific Islander, and mixed-race individuals
Montreal is the largest city in the province of Quebec, the second-largest in Canada, and the eighth-largest city in North America.
Tennessee: a landlocked state in the Southeastern region of the United States.
upbringing: the way in which a child is cared for and taught how to behave while it is growing up
janitor: a person whose job is to take care of a building such as a school or a block of flats or an apartment building
horde: a large crowd of people
dorm: dormitory
tuition: the money that you pay to be taught, especially in a college or university
the Holocaust: the killing of millions of Jewish people by the German Nazi government in the period 1941–1945
insular: having little contact with other people
goofy: silly; stupid
brat: a person, especially a child, who behaves badly
Ulysses: a novel (1922) by James Joyce. It is considered by many people to be one of the greatest novels of the 20th century, although it was not published in Britain and the US until the 1930s because it was thought to be too offensive. It is written in a wide variety of styles, and deals with the events of one day through the experiences of three main characters, Stephen Dedalus, Leopold Bloom and Molly Bloom.
Antigone appears in three 5th century BC tragic plays written by Sophocles, known collectively as the three Theban plays, with her being the protagonist of the eponymous tragedy Antigone.
legendary: very famous and talked about a lot by people
open-ended: without any limits, aims or dates fixed in advance
prominent: easily seen
prospective: potential
prestigious: respected and admired as very important or of very high quality
frizzy: (of hair) not smooth and neat but very curly and untidy
smudge (something) to touch or rub something, especially wet ink or paint, so that it is no longer clear; to become not clear in this way
squeak: to make a short high sound that is not very loud
axiom: a rule or principle that most people believe to be true
In mathematics, a tuple is a finite sequence or ordered list of numbers or, more generally, mathematical objects, which are called the elements of the tuple.
In mathematics, an isomorphism is a structure-preserving, one-to-one mapping (a bijective function) between two mathematical structures (like sets, groups, or rings) that shows they are essentially the same in form or structure, even if their elements are different.
acquaintance with something (formal) knowledge of something
heck: used to show that you are slightly annoyed or surprised; used to emphasize something
A Banach space is a complete normed vector space, meaning it's a vector space where you can measure vector lengths (norm) and distances, and every Cauchy sequence of vectors converges to a limit that is also within the space.
Topology is a branch of mathematics studying properties of spaces that remain unchanged under continuous deformations like stretching, bending, and twisting, but not tearing or gluing, often called "rubber-sheet geometry".
The Putnam Competition is a prestigious, challenging annual math contest for undergraduate students in the US and Canada, testing creative problem-solving in calculus, linear algebra, and discrete maths.
A vexing problem is a difficult, annoying, puzzling, or worrying issue that is hard to solve, causing frustration and distress.
preternatural: that does not seem natural; that cannot be explained by natural laws
indispensable: essential
team up: to join with another person or group in order to do something together
cull: to kill a number of wild animals from a group, especially in order to stop the group from becoming too large
Minnesota is a state in the Upper Midwestern region of the United States.
quad: an open square area that has buildings all around it, especially in a school or college
shriek: to give a loud high shout, for example when you are excited, frightened or in pain
Bill Gates "Source Code"
Online Dictionaries Used:
hk.dictionary.search.yahoo.com
www.oxfordlearnersdictionaries.com
2026年1月2日星期五
Algorithms in computer science
for (... : items) std::find algorithm in C++ (from ) searches for the first occurrence of a given value in a range.
What *it Means- In C++, iterators behave like pointers.- it itself is an iterator object (not the actual element).- Using *it dereferences the iterator, giving access to the element it points to.
it → an iterator pointing to the element 20.*it → the actual value stored at that position (20).Revision
In C++, void means “no type”. It’s commonly used to declare functions that don’t return a value, functions that take no parameters
Here, greet() performs an action but doesn’t return anything.
In C++, the statement return 0; is most commonly seen in the main() function.
Return value of main():
By convention, returning 0 from main() indicates that the program executed successfully.
Any non-zero value usually signals an error or abnormal termination.
If you omit return 0; in main(), modern C++ standards (C++11 and later) automatically assume return 0; at the end of main().
What \n Does
- It tells the program to move the cursor to the next line when printing text.
- Commonly used in
std::coutstatements to format output.
x += 3; // equivalent to: x = x + 3;
In modern C++ (since C++11), the keyword auto tells the compiler to automatically deduce the type of a variable or function return value from its initializer or expression.
int i {}; // i is initialized to 0
Explanation
- This is uniform initialization (introduced in C++11).
- The curly braces
{}tell the compiler to value-initialize the variable. - For fundamental types like
int, value-initialization sets it to zero. - while (std::cin >> score && score != -1)
- && (Logical AND)
- Both conditions must be true for the loop to continue;
- Input must succeed.
- The value must not be
-1.
Step Pyramid
The Pyramid of Djoser, sometimes called the Step Pyramid of Djoser, is an archaeological site in the Saqqara necropolis, Egypt, northwest of the ruins of Memphis.
en.wikipedia.org and edited
Precocious
rumble: to move slowly and heavily, making a rumbling sound
crate: a large wooden container for transporting goods
dodge: to move quickly and suddenly to one side in order to avoid somebody/something
chant: to sing or shout the same words or phrases many times
ICBM: intercontinental ballistic missile
spin out: to make something last as long as possible
hulking: very large or heavy, often in a way that causes you to feel nervous or afraid
The Manhattan Project was a research and development program undertaken during World War II to produce the first nuclear weapons.
hallway: a space or passage inside the entrance or front door of a building
ARPANET: Advanced Research Projects Agency Network
off-limits (to somebody) (of a place) where people are not allowed to go
domain: lands owned or ruled by a particular person, government, etc., especially in the past
stint: a period of time that you spend working somewhere or doing a particular activity
overseer: (old-fashioned) a person whose job is to make sure that other workers do their work
academia: the world of learning, teaching, research, etc. at universities, and the people involved in it
Parliament cigarettes are a premium brand known for their distinctive recessed filter, designed to keep tar and nicotine away from the smoker's lips.
exploit: utilize
arcane: secret and mysterious and therefore difficult to understand
veteran: a person who has a lot of experience in a particular area or activity
A swivel chair is a chair with a single central leg that allows the seat to rotate 360 degrees to the left or right.
spiel: a speech that somebody has used many times that is intended to persuade you to believe something or buy something
exceptionality: it refers to the state of being unusually excellent or rare
Bill Gates "Source Code"
Online Dictionaries Used:
hk.dictionary.search.yahoo.com
www.oxfordlearnersdictionaries.com