0%

Steve Jobs

I am honored to be with you today at your commencement from one of the finest universities in the world. Truth be told, I never graduated from college, and this is the closest I’ve ever gotten to a college graduation. Today I want to tell you three stories from my life. That’s it. No big deal. Just three stories.

The first story is about connecting the dots.

I dropped out of Reed College after the first 6 months, but then stayed around as a drop-in for another 18 months or so before I really quit. So why did I drop out?

It started before I was born. My biological mother was a young, unwed college graduate student, and she decided to put me up for adoption. She felt very strongly that I should be adopted by college graduates, so everything was all set for me to be adopted at birth by a lawyer and his wife. Except that when I popped out they decided at the last minute that they really wanted a girl.

Read more »

ACT I

Dialogue

Excuse me. My name is Richard Stewart.

I’m a photographer.
May I take a picture of you and your little boy?

What’s it for?

It’s for a book.

You’re writing a book?

It’s a book of pictures.

I call it Family Album, U.S.A.

Read more »

1. 概述

Protocol Buffers(又名protobuf) 是一种语言中立、平台中立的可扩展机制,用于序列化结构化的数据

它就像JSON,只是它更小、更快

只需定义一次数据如何被结构化,然后就可以使用特殊生成的源代码,轻松地从各种数据流和使用各种语言写入和读取结构化数据

Read more »

On August 28, 1963, some 100 years after President Abraham Lincoln signed the Emancipation Proclamation freeing the slaves, a young man named Martin Luther King climbed the marble steps of the Lincoln Memorial in Washington, D.C. to describe his vision of America. More than 200,000 people-black and white-came to listen. They came by plane, by car, by bus, by train, and by foot. They came to Washington to demand equal rights for black people. And the dream that they heard on the steps of the Monument became the dream of a generation.

As far as black Americans were concerned, the nation’s response to Brown was agonizingly slow, and neither state legislatures nor the Congress seemed willing to help their cause along. Finally, President John F. Kennedy recognized that only a strong civil rights bill would put teeth into the drive to secure equal protection of the laws for African Americans. On June 11, 1963, he proposed such a bill to Congress, asking for legislation that would provide “the kind of equality of treatment which we would want for ourselves.” Southern representatives in Congress managed to block the bill in committee, and civil rights leaders sought some way to build political momentum behind the measure.

A. Philip Randolph, a labor leader and longtime civil rights activist, called for a massive march on Washington to dramatize the issue. He welcomed the participation of white groups as well as black in order to demonstrate the multiracial backing for civil rights. The various elements of the civil rights movement, many of which had been wary of one another, agreed to participate. The National Association for the Advancement of Colored People, the Congress of Racial Equality, the Southern Christian Leadership Conference, the Student Non-violent Coordinating Committee and the Urban League all managed to bury their differences and work together. The leaders even agreed to tone down the rhetoric of some of the more militant activists for the sake of unity, and they worked closely with the Kennedy administration, which hoped the march would, in fact, lead to passage of the civil rights bill.

Read more »

简介

tcpdump是一个命令行数据包分析、抓取工具

可以使用 -D 标志来列出可用于捕获的接口

1
2
3
4
5
6
7
8
9
10
11
$ tcpdump -D

1.virbr0
2.docker0
3.vethdb0f731
4.nflog (Linux netfilter log (NFLOG) interface)
5.nfqueue (Linux netfilter queue (NFQUEUE) interface)
6.usbmon1 (USB bus number 1)
7.enp2s0
8.usbmon2 (USB bus number 2)
9.enp3s0

可以使用 -i 标志指定要捕获的接口,指定 any 作为接口将从所有活动接口捕获

1
2
$ tcpdump -i any
$ tcpdump -i eth1

可以使用 -v 标志来调整tcpdump输出中的详细程度

1
2
3
$ tcpdump -i any -v (Verbose output)
$ tcpdump -i any -vv (Even more verbose output)
$ tcpdump -i any -vvv (The most verbose output)
Read more »

The Pragmatic Programmer Quick Reference Guide

  1. 关心你的技艺
    Care About Your Craft
    如果你不在乎能否漂亮地开发出软件,你又为何要耗费生命去开发软件呢?

  2. 思考!你的工作
    Think!About Your Work
    关掉自动驾驶,接管操作,不断地批评和评估你的工作

  3. 提供各种选择,不要找蹩脚的借口
    Provide Options, Don’t Make Lame Excuses
    要提供各种选择,而不是找借口,不要说事情做不到,说明能够做什么

  4. 不要容忍破窗户
    Don’t Live with Broken Windows
    当你看到糟糕的设计、错误的决策和糟糕的代码时,修正它们

  5. 做变化的催化剂
    Be a Catalyst for Change
    你不能强迫人们改变。相反,要向他们展示未来可能会怎样,并帮助他们参与对未来的创造

  6. 记住大图景
    Remember the Big Picture
    不要太过专注于细节,已忘了查看周围正在发生什么

Read more »

1. GET KAFKA

Download the latest Kafka release and extract it:

1
2
$ tar -xzf kafka_2.13-3.2.1.tgz
$ cd kafka_2.13-3.2.1

2.START THE KAFKA ENVIRONMENT

NOTE: Your local environment must have Java 8+ installed.

Run the following commands in order to start all services in the correct order:

1
2
3
# Start the ZooKeeper service
# Note: Soon, ZooKeeper will no longer be required by Apache Kafka.
$ bin/zookeeper-server-start.sh config/zookeeper.properties

Open another terminal session and run:

1
2
# Start the Kafka broker service
$ bin/kafka-server-start.sh config/server.properties

Once all services have successfully launched, you will have a basic Kafka environment running and ready to use.

Read more »

1. What is event streaming?

Event streaming is the digital equivalent of the human body’s central nervous system. It is the technological foundation for the ‘always-on’ world where businesses are increasingly software-defined and automated, and where the user of software is more software.

事件流是人体中枢神经系统的数字等效物。它是”永远在线”世界的技术基础,在这个世界中,企业越来越多地由软件定义和自动化,并且软件的用户更多地是软件。

Technically speaking, event streaming is the practice of capturing data in real-time from event sources like databases, sensors, mobile devices, cloud services, and software applications in the form of streams of events; storing these event streams durably for later retrieval; manipulating, processing, and reacting to the event streams in real-time as well as retrospectively; and routing the event streams to different destination technologies as needed. Event streaming thus ensures a continuous flow and interpretation of data so that the right information is at the right place, at the right time.

从技术上讲,事件流是从事件源(如数据库、传感器、移动设备、云服务和软件应用程序)以事件流的形式实时捕获数据的实践;持久存储这些事件流以供以后检索;实时和回顾性地操作、处理和响应事件流;并根据需要将事件流路由到不同的目标技术。因此,事件流确保了数据的连续流动和解释,以便正确的信息在正确的时间出现在正确的位置。

Read more »

# Problems Difficulty Solutions
1 Two Sum Easy Two Sum
2 Add Two Sum Medium Add Two Number
3 Longest Substring Without Repeating Characters Medium Longest Substring Without Repeating Characters
4 Median of Two Sorted Arrays Hard Median of Two Sorted Arrays
5 Longest Palindromic Substring Medium Longest Palindromic Substring
10 Regular Expression Matching Hard Regular Expression Matching
12 Integer to Roman Medium Integer to Roman
22 Generate Parentheses Medium Generate Parentheses
39 Combination Sum Medium Combination Sum
42 Trapping Rain Water Hard Trapping Rain Water
90 Subsets II Medium Subsets II
94 Binary Tree Inorder Traversal Medium Binary Tree Inorder Traversal(简书)
108 Convert Sorted Array to Binary Search Tree Medium Convert Sorted Array to Binary Search Tree
122 Best Time to Buy and Sell Stock II Medium Best Time to Buy and Sell Stock II
136 Single Number Medium Single Number(简书)
144 Binary Tree Preorder Traversal Medium Binary Tree Preorder Traversal
167 Two Sum II - Input array is sorted Medium Two Sum II - Input array is sorted
238 Product of Array Except Self Medium Product of Array Except Self(简书)
260 Single Number III Medium Single Number III(简书)
268 Missing Number Medium Missing Number
309 Best Time to Buy and Sell Stock with Cooldown Medium Best Time to Buy and Sell Stock with Cooldown
318 Maximum Product of Word Lengths Medium Maximum Product of Word Lengths(简书)
319 Bulb Switcher Medium Bulb Switcher(简书)
338 Counting Bits Medium Counting Bits(简书)
343 Integer Break Medium Integer Break(简书)
347 Top K Frequent Elements Medium Top K Frequent Elements(简书)
357 Count Numbers with Unique Digits Medium Count Numbers with Unique Digits
377 Combination Sum IV Medium Combination Sum IV
492 Construct the Rectangle Easy Construct the Rectangle
530 Minimum Absolute Difference in BST Easy Minimum Absolute Difference in BST
535 Encode and Decode TinyURL Medium Encode and Decode TinyURL
599 Minimum Index Sum of Two Lists Easy Minimum Index Sum of Two lists
606 Construct String from Binary Tree Easy Construct String from Binary Tree
进度

Github

https://github.com/eazow/leetcode

作者

Eazow

版本

0.3.0.0

He put on his goggles, fitted them tight, tested the vacuum. His hands were shaking. Then he chose the biggest stone he could carry and slipped over the edge of the rock until half of him was in the cool, enclosing water and half in the hot sun. He looked up once at the empty sky, filled his lungs once, twice, and then sank fast to the bottom with the stone. He let it go and began to count. He took the edges of the hole in his hands and drew himself into it, wriggling his shoulders in sideways as he remembered he must, kicking himself along with his feet.

Soon he was clear inside. He was in a small rock-bound hole filled with yellowish-gray water. The water was pushing him up against the roof. The roof was sharp and pained his back. He pulled himself along with his hands — fast, fast — and used his legs as levers. His head knocked against something; a sharp pain dizzied him. Fifty, fifty-one, fifty-two… He was without light, and the water seemed to press upon him with the weight of rock. Seventy-one, seventy-two… There was no strain on his lungs. He felt like an inflated balloon, his lungs were so light and easy, but his head was pulsing.

He was being continually pressed against the sharp roof, which felt slimy as well as sharp. Again he thought of octopuses, and wondered if the tunnel might be filled with weed that could tangle him. He gave himself a panicky, convulsive kick forward, ducked his head, and swam. His feet and hands moved freely, as if in open water. The hole must have widened out. He thought he must be swimming fast, and he was frightened of banging his head if the tunnel narrowed.

A hundred, a hundred and one… The water paled. Victory filled him. His lungs were beginning to hurt. A few more strokes and he would be out. He was counting wildly; he said a hundred and fifteen and then, a long time later, a hundred and fifteen again. The water was a clear jewel-green all around him. Then he saw, above his head, a crack running up through the rock. Sunlight was falling through it, showing the clean dark rock of the tunnel, a single mussel shell, and darkness ahead.

He was at the end of what he could do. He looked up at the crack as if it were filled with air and not water, as if he could put his mouth to it to draw in air. A hundred and fifteen, he heard himself say inside his head — but he had said that long ago. He must go on into the blackness ahead, or he would drown. His head was swelling, his lungs cracking. A hundred and fifteen, a hundred and fifteen pounded through his head, and he feebly clutched at rocks in the dark, pulling himself forward, leaving the brief space of sunlit water behind. He felt he was dying. He was no longer quite conscious. He struggled on in the darkness between lapses into unconsciousness. An immense, swelling pain filled his head, and then the darkness cracked with an explosion of green light. His hands, groping forward, met nothing; and his feet, kicking back, propelled him out into the open sea.

📝 文章大意

(本文节选自多丽丝·莱辛的短篇小说《穿过隧道》。)小男孩杰里戴好潜水镜,抱着一块大石头沉到海底,开始计数,然后钻进礁石下的洞里。洞里又窄又暗,水把他往尖利、滑腻的洞顶上挤,他撞了头,想到章鱼和缠人的海草,心里发慌。洞变宽后他游得快了些,数到一百时水色变亮,他以为胜利在望,但肺开始疼了。他看到头顶岩缝中透下的阳光,可前面仍是一片黑暗。他已到了极限,脑子里反复数着”一百一十五”,抓着岩石往前爬,几乎失去知觉。就在他觉得快要死去时,黑暗中迸出一片绿光,他的双手触不到东西了,双脚一蹬,便冲进了开阔的大海。

📚 核心单词

单词 音标 词性 含义 文中用法
goggles /ˈɡɒɡlz/ n. 护目镜,潜水镜 put on his goggles
vacuum /ˈvækjuːm/ n. 真空 tested the vacuum
enclosing /ɪnˈkləʊzɪŋ/ adj. 包围的 the cool, enclosing water
wriggle /ˈrɪɡl/ v. 扭动 wriggling his shoulders in
lever /ˈliːvə(r)/ n. 杠杆 used his legs as levers
dizzy /ˈdɪzi/ v. 使头晕 a sharp pain dizzied him
strain /streɪn/ n. 压力,负担 no strain on his lungs
inflated /ɪnˈfleɪtɪd/ adj. 充了气的 an inflated balloon
pulse /pʌls/ v. 搏动 his head was pulsing
slimy /ˈslaɪmi/ adj. 黏滑的 felt slimy as well as sharp
octopus /ˈɒktəpəs/ n. 章鱼 thought of octopuses
tangle /ˈtæŋɡl/ v. 缠住 weed that could tangle him
panicky /ˈpæniki/ adj. 惊慌的 a panicky, convulsive kick
convulsive /kənˈvʌlsɪv/ adj. 痉挛的,抽搐的 a convulsive kick
duck /dʌk/ v. 低下(头) ducked his head
pale /peɪl/ v. 变淡,变亮 The water paled
mussel /ˈmʌsl/ n. 贻贝 a single mussel shell
swell /swel/ v. 肿胀 His head was swelling
feebly /ˈfiːbli/ adv. 虚弱地 feebly clutched at rocks
clutch /klʌtʃ/ v. 抓住 clutched at rocks
lapse /læps/ n. 陷入(某种状态) lapses into unconsciousness
grope /ɡrəʊp/ v. 摸索 his hands, groping forward
propel /prəˈpel/ v. 推动 propelled him out into the open sea

📖 难句解析

1. Then he chose the biggest stone he could carry and slipped over the edge of the rock until half of him was in the cool, enclosing water and half in the hot sun.

  • the biggest stone (that) he could carry 是省略关系代词的定语从句
  • slip over = 滑过
  • half of him was in ... and half (was) in ... 后半句省略了 of him was,冷水和烈日形成对照
  • 译: 然后他挑了一块他能抱得动的最大的石头,从岩石边上滑下去,直到他半个身子浸在凉爽的、包围着他的海水里,另一半露在火热的阳光下。

2. He took the edges of the hole in his hands and drew himself into it, wriggling his shoulders in sideways as he remembered he must, kicking himself along with his feet.

  • draw oneself into = 把自己拉进
  • wriggling ... 和 kicking ... 是两个现在分词短语作伴随状语,描写连续动作
  • as he remembered he must = 正像他记得自己必须做的那样,must 后面省略了 wriggle his shoulders in sideways
  • kick oneself along = 用脚蹬着往前
  • 译: 他双手抓住洞口边缘,把身子拉进洞里,记着要侧着身子扭动肩膀钻进去,同时用脚蹬着往前游。

3. He pulled himself along with his hands — fast, fast — and used his legs as levers.

  • 破折号之间的 fast, fast 是插入语,表现他心里的催促
  • use sth as = 把……当作……来用
  • 译: 他用双手拉着自己往前——快,快——把两条腿当作杠杆来用。

4. He was without light, and the water seemed to press upon him with the weight of rock.

  • be without = 没有
  • press upon = 压在……上;with the weight of rock = 像岩石那样沉重,夸张地写出水压
  • 译: 他周围没有一丝光亮,海水好像以岩石般的重量压在他身上。

5. He felt like an inflated balloon, his lungs were so light and easy, but his head was pulsing.

  • feel like = 感觉像
  • his lungs were so light and easy 相当于原因状语,解释为什么感觉像气球
  • 译: 他觉得自己就像一只充了气的气球,肺部轻松自在,可是脑袋却在突突直跳。

6. He was being continually pressed against the sharp roof, which felt slimy as well as sharp.

  • was being pressed 是过去进行时的被动语态,强调当时一直被压着
  • which 引导非限制性定语从句修饰 roof;A as well as B = 不仅 B 而且 A
  • 译: 他被不停地挤压在锋利的洞顶上,洞顶不仅锋利,而且黏滑。

7. Again he thought of octopuses, and wondered if the tunnel might be filled with weed that could tangle him.

  • wonder if = 想知道是否
  • that could tangle him 是定语从句修饰 weed
  • 译: 他又一次想到了章鱼,想知道隧道里会不会长满了可能缠住他的海草。

8. He thought he must be swimming fast, and he was frightened of banging his head if the tunnel narrowed.

  • must be doing = 一定正在做,表示对正在发生的事的肯定推测
  • be frightened of doing = 害怕做
  • 译: 他想自己一定游得很快,他担心万一隧道变窄,自己的脑袋会撞上去。

9. He was counting wildly; he said a hundred and fifteen and then, a long time later, a hundred and fifteen again.

  • wildly = 发狂地,表现他心慌意乱
  • a long time later 是插入语,两次都数到 115,说明他已经神志不清,失去了时间感
  • 译: 他发疯似的数着数,数到一百一十五,然后,过了好长一段时间,又数到一百一十五。

10. Sunlight was falling through it, showing the clean dark rock of the tunnel, a single mussel shell, and darkness ahead.

  • it 指上一句的 crack(岩缝)
  • showing ... 是现在分词短语作结果状语,宾语有三个并列成分
  • 译: 阳光从缝隙中照进来,照出了隧道中干净的黑色岩石、一只孤零零的贻贝壳和前方的一片黑暗。

11. He looked up at the crack as if it were filled with air and not water, as if he could put his mouth to it to draw in air.

  • 两个 as if 从句并列,用虚拟语气,表示与事实相反的想象
  • draw in air = 吸气
  • 译: 他仰望着那条裂缝,仿佛里面充满的是空气而不是水,仿佛他能把嘴凑上去吸气。

12. A hundred and fifteen, he heard himself say inside his head — but he had said that long ago.

  • hear oneself say = 听到自己说,say 是省略 to 的不定式
  • had said 是过去完成时,表示在”听到”之前早就说过了
  • 译: 一百一十五,他听到自己在脑子里说——可是他很早以前就已经数到过这个数了。

13. He must go on into the blackness ahead, or he would drown.

  • must 这里表示必须
  • or = 否则
  • 译: 他必须继续往前游进黑暗,否则就会淹死。

14. His head was swelling, his lungs cracking.

  • 后半句省略了 were:his lungs (were) cracking,两个分句对称,节奏急促
  • 译: 他的头在胀大,他的肺就要炸裂了。

15. A hundred and fifteen, a hundred and fifteen pounded through his head, and he feebly clutched at rocks in the dark, pulling himself forward, leaving the brief space of sunlit water behind.

  • 前半句的主语是 A hundred and fifteen, a hundred and fifteen 这个数字本身,pound = 猛烈撞击
  • clutch at = 抓住
  • pulling ... 和 leaving ... 是两个现在分词短语作伴随状语
  • leave sth behind = 把……留在身后
  • 译: “一百一十五,一百一十五”在他脑子里轰响,他在黑暗中无力地抓着岩石,拉着身子往前,把那一小段有阳光照射的水域抛在了身后。

16. He struggled on in the darkness between lapses into unconsciousness.

  • struggle on = 挣扎着继续
  • lapse into = 陷入(某种状态);between lapses into unconsciousness = 在一阵阵昏迷的间隙
  • 译: 他在黑暗中挣扎着往前游,时而失去知觉。

17. An immense, swelling pain filled his head, and then the darkness cracked with an explosion of green light.

  • the darkness cracked 是比喻:黑暗被打破
  • with an explosion of green light = 伴随着绿光的迸发,指他终于看到了出口外的海水
  • 译: 一阵剧烈的、不断加剧的疼痛充满了他的头部,接着黑暗被一道迸发的绿光打破了。

18. His hands, groping forward, met nothing; and his feet, kicking back, propelled him out into the open sea.

  • 两个分句结构对称:主语 + 现在分词短语 + 谓语
  • groping forward 和 kicking back 都是现在分词作定语或伴随状语
  • met nothing = 什么也没碰到,说明已经出了隧道
  • 译: 他的双手向前摸索,什么也没摸到;他的双脚向后一蹬,便把他推进了开阔的大海。