github多账号如何切换?

作者:知乎用户
链接:https://www.zhihu.com/question/23028445/answer/416231632
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

git多账号切换其实是有https的解决方案的,可以省去ssh配置公钥相关的麻烦,不过安全性会降低,后面会提到。

比如你想用A账号管理本地仓库repoA,用B账号管理本地仓库repoB。
那么首先,看一下gloabal和system的config:

主要是看有没有credential.helper把账号密码存起来了。因为https的url方式每次push的时候都要输入密码,比较麻烦,一般就会用credential.helper把账号密码存在global里了。这样对单用户没问题,但多用户时就会有问题。如果存的是A账户,那在repoB里push的时候肯定就会permission denied。所以看看global或者system哪个设置了保存就unset一下:

第二个命令可能需要权限吧。

接下来就是对本地仓库的config设置了。比如进入本地仓库repoA之后,看一下url:

https开头的就是用的https了,git@ 开头的就是用的ssh了,一般用浏览器打开github仓库页面之后在页面里copy的都是https。一般是长这个样子:

github.com/UserA/repoA.

然后在https://和github.com之间加上用户名@ ,用set-url设置就好:

当然默认是origin分支,要设置其他分支也一样。@ 前的用户名和仓库权限的拥有者要对应起来。
改好之后,这时候push,就要输入一下用户A的密码,然后就能push上去了。对于repoB也是一样。每次push都需要输入密码了。那么为了避免麻烦,针对每一个本地仓库,设置一下local的credential.helper:

这样账号密码就只针对当前仓库保存,对其他仓库没有影响了。针对每一个需要管理的本地仓库,都需要按以上步骤设置一次url和credential.helper,设置好之后,就能一直正常push了。

总结一下:
1. 清空global和system的credential.helper
2. 对每一个本地仓库,设置一下url和local的credential.helper

关于安全性的问题,用git credentials存凭证的话,密码是以明文形式存储的,不论是git-credentials=store还是git-credentials=winstore(windows),git-credentials=osxkeychain(Mac),都有办法直接看到密码明文,除非用git-credentials=cache。当然也可以自定义,参考7.14 Git 工具 – 凭证存储

The TeX family tree: LaTeX, pdfTeX, XeTeX, LuaTeX and ConTeXt

The LaTeX story goes back all the way to 1977 when Donald Knuth first understood the need for a high quality typesetting program. It’s a remarkable testament to the quality of LaTeX that the system he conceived back then is still the best tool for the job today, although many useful additions have been made in the decades since. In fact, LaTeX is one of these additions to the original system that Donald Knuth developed, which was called TeX.

To keep your street-cred in the LaTeX-world you’ve got write it with a capital T and X, and pronounce it like Lay-Tech. This is because the X in TeX is actually a capital Chi (χ) from Greek. Latex with a normal capitalisation and pronunciation is a type of rubber!

The original TeX

There are a large family of tools which are now derived from TeX, and it can look like a list of nonsense words on first sight: LaTeX, pdfTeX, XeLaTeX, LuaTeX, ConTeXt, and so on. The ancestor of all of these is of course the original TeX program by Knuth. This takes a document in plain text and transforms it into a beautifully typeset document. Knuth was quite particular about typesetting and the attention to detail in TeX is clear. An example TeX document might look something like this:

The output of this after running it through the TeX program is:

Notice how the combinations of letters ‘fi’, ‘fj’, and ‘ff’ in the example words run together in a pleasant way, and how the mathematics symbols are well spaced. On a larger scale, TeX does a very good job of breaking lines in the appropriate places to created well justified text, with hyphenations where appropriate.

Not only does it typeset text nicely, it also has a selection of commands, like \bye and \TeX in the example above. These can do simple things like change the font size, or change the way text is laid out, as well as much more powerful things like keeping a section count to cross reference your pages, or automatically building up a table of contents. The TeX program has about 300 commands built in, but other commands can be defined within it. Donald Knuth wrote another 600 or so useful commands from within TeX, in a package called Plain TeX which makes some common typesetting tasks easier.

LaTeX

The commands in TeX and Plain TeX are still quite basic and it isn’t easy to do complicated things with them. To help with this, Leslie Lamport created LaTeX in the early 1980s to provide a higher level language to work in than TeX. LaTeX is a set of commands defined in terms of the underlying TeX commands, often at many many layers of abstraction. All of the commands you use in a LaTeX document are actually just complicated sets of TeX commands underneath, unless of course you use a TeX command directly! Concepts like packages (\usepackage{...}), environments (\begin{environment} ... \end{environment}), and document classes (\documentclass{...}) were all introduced by Leslie Lamport in LaTeX.

By creating a standardised package system for LaTeX, Leslie Lamport allowed the community to grow huge. There are now thousands upon thousands of LaTeX packages available to let you typeset anything from subfigures to knitting patterns. There are also many document classes available for different types of document, whether your are writing a book, a lab report or a CV. Many publishers and journals have their own custom document classes that style their documents how they want.

pdfTeX

The TeX program is remarkably stable for a piece of software over 20 years old; Knuth declared that it was feature complete in 1989, and only bug fixes have been made since. Of course, this has not stopped the significant and ongoing development of LaTeX, because that is written in TeX itself. In fact, the stability of TeX has allowed packages like LaTeX which have been built on top of it to thrive.

This isn’t to say the underlying TeX program hasn’t seen any advances in the last 20 years. Far from it in fact, it’s just that improvements have been made alongside TeX, with the original TeX left stable. The most important improvement of the 1990s was the creation of pdfTeX by Hàn Thế Thành for his PhD thesis. The original TeX program outputs the typeset document into a custom format called DVI (DeVice Independent format), that can later be turned into a PostScript file for printing. However, the PDF format came along in 1993 and we can see today that it clearly won as the better format over PostScript. There are lots of features which make PDF better, such as hyperlinks between sections, a section of metadata that lets you see a table of contents in left hand side of your PDF viewer, and support for a wider and more modern range of image formats. pdfTeX is a modification of TeX which allows it to output to PDF directly and so take advantage of these extra features.

When you install a LaTeX distribution on your system today, it actually comes with two different programs: tex, and pdftex. It also comes with another two programs on top of these: latex and pdflatex, but these are actually just wrappers around tex and pdftex respectively. These first load the LaTeX packages before processing your document but are still TeX underneath. If you run latex or tex then you will get a DVI file which you can turn into a postscript file or a PDF, but if you run pdflatex you will get a PDF directly.

Mostly, pdftex and pdflatex are improvements over tex and latex, but there is one downside. The original TeX and DVI format have support for Encapsulated PostScript files (.eps) because these can easily be included in PostScript files (produced by converting .dvi files to Postscript via Dvips). However, pdftex cannot include EPS files, and you should instead use PDFs (which can be produced from EPS files with the command epstopdf which generally comes with LaTeX distributions). In exchange for this downside though, pdfTeX adds support for .png.jpg and .pdf images, whereas the original TeX only supports .eps (via Dvips).

XeLaTeX and LuaTeX

So far we have seen that TeX has evolved in two different ways since its beginning: With the addition of easier to use commands on top of the original system (LaTeX), and with updates to the underlying program to support PDF output (pdfTeX). The story does not stop there however and there have been continuing efforts to modernize TeX. In 2004 Jonathon Kew created XeTeX, which is another modification of the underlying TeX engine, this time to support a wider range of characters beyond just plain English numbers and letters, and to include support for modern font formats. This makes writing in foreign languages much easier, and also lets you use fonts within LaTeX which were traditionally only available to your word processor.

LuaTeX is an attempt to extend the original TeX program with a more sensible programming language. While in principle you can do absolutely anything from within TeX, in practice it’s a very clumsy programming language to work with, if it can even be called a programming language at all. Much of the internals of LaTeX is complicated and hard for outsiders to understand due to having to work only in TeX. LuaTeX is extended with the eponymous scripting language, Lua, which is a simple and stable language, ideal for writing complicated macros. As of 2012, it’s still in active development and is its API is liable to change, but it still very usable.

ConTeXt

We’ve mentioned LaTeX as an extension to the commands available in TeX, but it’s not the only package that has extended TeX in a significant way. ConTeXt is another system which was created in 1990 by Hans Hagen. LaTeX aims to separate the user from having to make decisions about typography and layout (you type \section and \emph but you don’t worry about what these do – that’s left to the document class or layout). On the other hand, ConTeXt aims to provide an easy interface to advanced typography features. Sadly I don’t know as much about ConTeXt as I would like, so I can’t elaborate much further, but if I ever get round to experimenting with it more I’ll be sure to write up my findings.

As a final historical note, I should mention AMSTeX which was an extension to the Plain TeX macros and was used by the American Mathematical Society (AMS) from 1982 to 1985. Its legacy survives in AMS-LaTeX packages which are a staple of many LaTeX documents: \usepackage{amsmath}.

The Future

What will the future hold for TeX and LaTeX? I don’t know yet, but as Alan Kay once said:

The best way to predict the future is to invent it.

With ShareLaTeX we hope to improve TeX and LaTeX in a third direction, by bringing significant improvements to the LaTeX workflow. Despite being over 20 years old, LaTeX is still largely a command line program that must be used in an awkward cycle of writing, compiling and checking the output. Methods of collaboration tend to involve clunky email messages rather than the streamlined processes available for word processing like Google Documents.

In 2 or 3 years time I hope that people will reflect back on online services like ShareLaTeX and be able to say that they have improved the way we work with LaTeX.

 

SOURCE: https://fr.overleaf.com/learn/latex/Articles/The_TeX_family_tree:_LaTeX,_pdfTeX,_XeTeX,_LuaTeX_and_ConTeXt

汉语普通话同音文

季姬寂,集鸡,鸡即棘鸡。棘鸡饥叽,季姬及箕稷济鸡。鸡既济,跻姬笈,季姬忌,急咭鸡,鸡急,继圾几,季姬急,即籍箕击鸡,箕疾击几伎,伎即齑,鸡叽集几基,季姬急极屐击鸡,鸡既殛,季姬激,即记《季姬击鸡记》。  (赵元任)


石室诗士施氏,嗜狮,誓食十狮。施氏时时适市视狮。十时,适十狮适市。是时,适施氏适市。施氏视是十狮,恃矢势,使是十狮逝世。氏拾是十狮尸,适石室。石室湿,氏使侍拭石室。石室拭,氏始试食是十狮尸。食时,始识是十狮尸,实十石狮尸。试释是事。  (赵元任,1930)


唧唧鸡,鸡唧唧。几鸡挤挤集矶脊。机极疾,鸡饥极,鸡冀己技击及鲫。机既济蓟畿,鸡计疾机激几鲫。机疾极,鲫极悸,急急挤集矶级际。继即鲫迹极寂寂,继即几鸡既饥,即唧唧。   (佚名)

What’s the difference between a “disc” and a “disk?”

They’re pronounced the same, but, technically speaking, there is a distinct difference between a disc and a disk.

Discs

A disc refers to optical media, such as an audio CD, CD-ROM, DVD-ROM, DVD-RAM, or DVD-Video disc. Some discs are read-only (ROM), others allow you to burn content (write files) to the disc once (such as a CD-R or DVD-R, unless you do a multisession burn), and some can be erased and rewritten over many times (such as CD-RW, DVD-RW, and DVD-RAM discs).

All discs are removable, meaning when you unmount or eject the disc from your desktop or Finder, it physically comes out of your computer.

Disks

A disk refers to magnetic media, such as a floppy disk, the disk in your computer’s hard drive, an external hard drive. Disks are always rewritable unless intentionally locked or write-protected. You can easily partition a disk into several smaller volumes, too.

Disks are usually sealed inside a metal or plastic casing (often, a disk and its enclosing mechanism are collectively known as a “hard drive”).

Published Date: 

法国谚语

J’y suis,j’y reste.
大致是 先到先得
C’est en forgeant qu’on devient forgeron.
熟能生巧
Il n’y a pas de fumee sans feu.
无风不起浪
être joli,e comme un coeur
形容漂亮
être fort,e comme un Turc
形容强壮
être rouge comme un coq
形容脸很红
connaître … comme sa poche
对 … 了如指掌
manger sur le pouce
形容吃得快
Vouloir,c’est pouvoir.
有志者事竟成!
Il n’y a que le premier pas qui coute
万事开头难!
Rire bien qui rire le dernier!
笑到最后笑得最甜!
Je pense donc je suis!
我思顾我在。(Descarles名言)
quand on parle du loup,on en voit la queue.
原意:说到狼,就看到它的尾巴。
引伸义:说道曹操,曹操就到。
ouvvrez la porte et voyez la montagne.
开门见山。
comme ci,comme ca.
马马乎乎啦
etre beau comme un dieu.
也可以用来形容美丽……象神一样美丽,从小叶子那里抄来的
Je parle francais comme une vache espagnole.
形容说法语说得难听,据说l’espagnol是很难听的,不知是否有联系。
还有avoir une faim de loup
像狼一样饿
filer a l’anglaise
悄悄溜走,看来法国和英国真的是结怨不浅.
petit a petit, l’oiseau fait son nis.
聚沙成塔,集腋成裘.

摧毁一个中年人有多容易

人到中年,那么多心酸到了嘴边,都变成了轻飘飘的“没事” “挺好” “哈哈哈”。

早年间,蔡康永对成龙的一次访谈。蔡康永第一个问题是,“拍电影累不累呀?”
就这么一句,让成龙在节目里,哭了整整15分钟。蔡康永一时也不知所措。
人前谈笑风生、铮铮铁骨的汉子,被这样一个简单的问题,击溃了防线。

电影《怦然心动》里说,这世上,有人住高楼,有人在深沟,有人光万丈,有人一身锈。

可真相不过是,那些住高楼、光万丈的人,只是将一身锈,妥帖地藏好了。

人到中年,大抵如此。

心理学研究表明,男人40岁,最为脆弱。但40岁男人的词典里,却不容许有脆弱二字。

摧毁一个中年人有多容易?比你想的要容易许多。

一场失败的生意,一拨突发的裁员,一个永不企及的房价。

或者,是父亲的一次感冒,女儿的一个拥抱,肥皂剧中的一语台词。

01  摧毁一个中年人,一双鞋就够了

吴晓波曾讲过一个故事。背景是1998-2003年,国企改革,数十万企业“关停并转”,超两千万工人下岗。吴那时,到沈阳铁西区,做下岗工人调研。铁西,建国初工业重地,全国最著名的机械装备业基地。有全国最大的工人居住区。这里,也是下岗重灾区。

有一户家庭,夫妻双职工下岗,孩子尚在读书。就这么挨了几年。

图为铁西区的老工厂,图片来源网络

一天,孩子放学回家,跟爸爸妈妈说,学校要开运动会了,老师要求,大家都穿运动鞋。可那时候,他们勉强够吃饭,实在没多余的钱买鞋。吃饭时,妻子开始了数落。怨丈夫没本事,没钱,鞋都买不起,娘俩跟着他,只能受苦。丈夫埋头,一言不发。吃完饭,丈夫放下碗筷,默默走向阳台,一跃而下。故事戛然而止。重如泰山的运动鞋,轻如鸿毛的中年命。

02  不要命,也得要那一车货

去年夏天,台风“天鸽”肆虐。50年罕见的天灾,17级的狂风。电杆从地底拔出,海水翻涌入屋,树木拦腰折断。一幕幕镜头、一张张图片,触目惊心。可那些情境,没有一幕,比得上那一刻。为阻止自家货车侧翻,一个男子冲进狂风中,拼了命撑住货车。坚持了几秒。更大一阵风吹过,货车还是被掀翻了。男子被压倒,当场身亡。

有人问,他怎么那么傻?那天街上,风那么大,无数货车被吹翻,他怎么非去扶?据报道,该男子54岁,要供两个儿子上学。全家生活来源,都靠他开货车。这趟活儿,大约能挣150元。“他知道台风要来了,本不该出车的,但最后还是去了。” 为避免最多几万损失,他一定要去赌一把,拿命赌。这车,和车上的货,是他养家的筹码,一丁点都输不起。

可惜,生活让他失望了。

03  他突然举手,做了个投降姿势

2017年岁末,中兴一名程序员跳楼。他被告知将裁员,股权也会被低价回收。当天监控显示,大约10点10分,该员工到达中兴通讯大楼。在一楼刷卡之后,他并没乘坐直梯,而是绕路,搭了扶手电梯,慢慢上2楼。或许那一刻,他还没下定决心。“上了扶梯不久,他突然举起双手,做了个投降姿势。那时他的脸色就非常难看了。”

投降的姿势。扶梯到了2层,他随即转乘直梯,上到26楼。大约10点30,他从26楼窗户跃下,结束了生命,42岁。

坠楼一周前,该程序员一家四口在儿童乐园玩耍的照片。北航本科,南开硕士,毕业后,华为工作8年,中兴工作6年,资深工程师。他的履历,并非走投无路之人。而是中年负重下,生活平衡突然打破,他的世界瞬间黑暗了。他看不到希望了。

04  只因一张罚单,她同丈夫饮了农药

民权县人民医院,刚醒来的侯燕,在病床上抹泪。她的丈夫没救过来,离开了人世。前一天晚上,他们因货车超载,被扣车罚款。侯燕和丈夫张高兴,以拉煤为生。为了多挣钱,每次都尽可能多装,这一次,超重了107%。煤炭运输这行的钱不好赚,不走高速的话,超载一吨,才有50多块利润。

夜里的罗庄超限站因车主的自杀而变得“很安静” 【图片来自中国网】

这次被查了,收到了3万的罚单,并要求卸货放车。听到“卸货放车”四个字,二人懵了。卸货就要拆封条,封条拆了,对方就不收货了。十几万煤款,只能自己买单。他们付不起。夫妇俩苦苦哀求,但法外不能开恩。满眼走投无路,万般绝望下,他们饮了农药。该责怪他们吗?连命都赔上了,怎么责怪?该同情他们吗?明明又是他们,有错在先。

05  女儿死死拉着他,跪了下来

13岁的黄傲雪今天很开心,她要去县城,给父亲送冬衣了。父亲说,他在县城做木工。家离县城只有20公里,但为了省车费,他已几个月没回家。“这次偷偷去找爸爸,爸爸看到我,一定会很惊喜吧!”

到了父亲工作的地方,她看到了一个“土人”正扛着重物,爬上爬下。原来父亲不是木工,他真正的工作,是卸水泥。

为了多挣钱,傲雪的父亲,一人揽下了一车,原本3人才能搬完的水泥。傲雪站在那儿,望着“土人”的背影,愣了十几秒,带着哭腔喊:“爸,你这样搬你手不痛吗?”女儿的突然出现,让一直瞒天过海的黄爸爸不知所措。他紧张的拍拍衣服,内疚又笨拙地安慰着傲雪:“别哭了,爸爸挣钱给你读书。”

他木讷地不知该再说什么。矛盾地转身,朝着水泥车走过去。女儿在他身后,死死拉着他跪了下来,一边哭一边说:“爸,你别扛了,你别扛了……”

几十吨的水泥他扛过去了。脏、疼、苦、累他扛过去了。可女儿这一跪,他再也扛不住了。

06  30多岁的大男人,忽然蹲在街边大哭起来

就在上个月,五一假期凌晨,多数人已入眠,李云却还在送外卖。他的小儿子得了白血病。为了高额治疗费,他每天要送餐16小时以上。这单外卖的路上,他突然接到妻子电话:孩子突发高烧,急需买药。李云急忙赶往医院。买了药,没来及再看,就跑出医院接着送外卖。他急懵了,忘记给顾客打电话解释。晚了10分钟,顾客因为等不急,取消了订单。

他拎着饭愣住了。沮丧、无助、委屈… 今晚送的五单外卖,全部白跑了。这个30多岁的大男人,忽然就像孩子一样,不顾旁人,蹲在街上大哭起来。

“我赔给你的,是儿子的救命钱。”

他哭着说。“我觉得自己真没用。”

他孤零零的一个人,陪伴在边的,只有那两盒没送出的外卖。

07  中年人有多疲惫,只有他们自己懂

中年,是个卖笑的年纪。要讨老人欢心,要做儿女榜样,要关注另一半脸色,还要迎合上司心思。

中年,不但卖笑还卖身。都是为别人而活,周围全是要依靠你的人。父母妻儿,肩上责任。而你身边,却无人可依靠。

中年,是被生活扼住了咽喉。想骂一声“去你妈的”转身走,一动弹,却被扼得更紧。

谈梦想?不存在的。因为已经输不起了。

“以前我们是梦想家,现在梦想没了,只剩家了。”

——寒风中的身影

三十而立,是没钱、没事业、有房贷的强撑不倒。四十不惑,是以前没懂的东西,现在已不想懂了。

中年人有多疲惫,只有他们自己懂。

《经济学人》杂志,把亚洲中年人称为“三明治一代”。

他们共同特点是:年龄在30~45岁、上有老下有小、工作家庭中都是顶梁柱、花费越来越多、积蓄越来越少、身体越来越差、压力越来越大。

在中国,活得累是“三明治一代”的普遍感受。

调查显示,高达97.48%的人觉得自己“很累”、“有点累”、“比较累”,只有2.52%的中年人认为自己“不累”

人到中年,生活是小心翼翼的平衡。

平衡父母妻小,平衡领导客户,平衡收入支出。更是平衡情绪,藏好苦逼、愤懑、疲倦,只剩脸上的一抹微笑。

“一天忙活完,最舒服的事儿,就是到家停好车,赖在里面。不慌不忙放个曲儿,慢条斯理点根烟,最后正式开始发呆。”

“车的两头,一头是功名利禄,一头是柴米油盐。偶尔在中间躲躲,也挺好。”

对中年人来说,生存法则里,只剩下了隐忍、强撑和熬。

愤怒了?心里发泄一下,就过去了。

委屈了?轻声骂两句,也过去了。

扛不住了?死不了日子照样过。

曾看过一个公益广告,一个中年上班族,白天在公司被老板训,被客户刁难,回家的路上又遇上大堵车。一整天都过得不顺,脸上挂着阴霾。

可最后到了家门口,他好像突然想起了什么,深呼吸,平复了几分钟,换上微笑,才走进家门。

给妻子一个拥抱,再逗逗孩子,好像把一切的不快都关在了家门外。

-End-

大学毕业后要做什么样的人

诸位同学,学校开课已一周,今天训育处召集这个会,能如家人似的在一起谈话,觉得非常愉快。

大学生,是人生最快活的时期,没有直接的经济负担,没有谋生的问题。诸位在中学中,同学大都是同县或同省,可是,来大学后,有从全国各方面来的同学,可以知道全国的情形,时间长了,各人都认识。这样,各人家庭的状况,故乡的风物,都能互相知道,这亦是一种教育。大学比之中学,在经费和设备方面,都来的充实,教师的经验和学识,也远胜于中学,这供给诸位切磋学问的极好机会。同时,国家花在诸位身上的钱,每年有一千五百元,而且,全中国大学生仅四万人,诸位都是这一万分之一的青年,这种机会,万万不能错过。

诸位到这里来,应该明了这里的校风。一校有一校的精神,英文称为College Spirit。至于浙大的精神,可以把两字来表示。浙大的前身是求是书院和高等学堂,一脉相传,都可以诚勤两字代表它的学风,学生不浮夸,做事很勤恳,在社会上的声誉亦很好。有的学校校舍很好,可是毕业生做事,初出去就希望有物质的享受,待遇低一点便不愿做,房屋陋不愿住。浙大的毕业生便无此习惯,校外的人,碰见了,总是称赞浙大的风气朴实。这种风气,希望诸位把它保持。

诸位在校,有两个问题应该自己问问,第一,到浙大来做什么?第二,将来毕业后要做什么样的人?我想诸位中间,一定没有人说为文凭而到浙大来的,或者有的为到这里来是为了求一种技术,以做谋生的工具。但是,谋生之道很多,不一定到大学来,就是讲技术,亦不一定在大学。美国大文豪罗威尔氏说:大学的目的,不在使学生得到面包,而在使所得到的面包味道更好。教育不仅使学生谋得求生之道,单学一种技术,尚非教育最重要的目的。

这里我可以讲一个故事。中国古时有一个人求神仙心切,遍走名山大川。吕纯阳发慈悲,知道他诚心,想送给他一点金钱宝贝,向他说道,我的指头能指石为金,或任何物件,你要什么我便给你什么。可是那个人并不要金钱宝贝,而要他那只指头。这故事西洋也有的,英文所谓Wishing Ring,便是这个意思,要想什么就可得什么。世界上万事万物统有他存在的理由,朱子所谓格物致知就是即事而穷其理。要能即事而穷其理,最要紧的是一个清醒的头脑。

清醒的头脑,是事业成功的基础。两三年以后诸位出去,在社会上做一番事业,无论工农商学,都须有清醒的头脑。专精一门技术的人,头脑未必清楚。反之,头脑清楚,做学问办事业统行,我们国家到这步田地,完全靠头脑清醒的人才有救。凡是办一桩事或是研究一个问题,大致可分为以下三个步骤:

第一,以科学的方法来分析,使复杂的变成简单;

第二,以公正的态度来计划;

第三,以果断的决心来执行。

这三点,科学的方法,公正的态度,果断的决心,统应该在小学时代养成和学习的。中国历年来工商业的不振,科学的不进步,都是由于主持者没有清醒的头脑。瘟疫流行,水旱灾荒,连年叠见,仍旧还要靠拜忏求神扶乩种种迷信方法。兴办事业,毫无计划,都是吃了头脑不清楚的亏。风水扶乩算命求神等之为迷信,不但为近世科学家所诟病,即我国古代明理之君子亦早深悉而痛绝之。但到如今,大学毕业生和东西洋留学生中,受了环境的同化,而同流合污的很不少。大的企业如久大公司、永利公司和商务印书馆的成功,要算例外了。近年来政府对社会所办的棉纱厂、面粉厂、硫酸厂、酒精厂和糖厂等,大多数是失败的。失败的原因或是由于调查的时候不用科学方法。譬如办糖厂,应在事先调查在该厂附近地域产多少甘蔗,出产的糖销至何处,成本的多少,赢利的厚薄,与夫国外倾销竞争的状况。若事先不调查清楚,后来必至蚀本倒闭。这类事在中国司空见惯,如汉口的造纸厂,梧州的硫酸厂,真不胜枚举。还有失败的原因是用人行政重情而不重理,这就是没有公正的态度。用人不完全以人才为标准,而喜欢滥用亲戚。每个机关、公司应该多聘专家,计划决定以后,外界无论如何攻击,都得照着计划做去,这样才能成功。

盲从的习惯,我们应该竭力避免,我们不能因为口号叫得响一点,或是主义新一点,就一唱百和的盲从起来。我们大家要静心平气的来观察口号的目的,主义的背景,凭我们的裁判,扪良心来决定我们的主张。若是对的,我们应竭力奉行。若是不对的我们应尽力排除。依违两可,明哲保身的态度,和盲从是一样要避免的。我们要做有主张有作为的人,这样就非有清醒之头脑不可。

现在,要问第二个问题,便是,离开大学以后,将来做什么样的人?我们的人生观应如何?有人认为中国的人生观很受孔孟的影响,实际影响最大的还是老子。孔孟主张见义勇为,老子主张明哲保身;孔孟主张正是非,老子主张明祸福。孟子说:天之将降大任于斯人也,必先苦其心志,劳其筋骨,诸葛亮鞠躬尽瘁,死而后已,这才不是享福哲学。老子说:祸莫大于不知足,又曰祸兮福所倚,福兮祸所伏。现在中国一般人的最后目的还是享福。我们羡慕人家说某人福气好,娶媳妇进门,即祝之曰多福多寿多男子。就是生子的最大目的,也就是想年老的时候可以享福。中国普通人意想中的天堂,是可以不劳而获的一个世界,茶来开口,饭来伸手,这样享福哲学影响于民生问题很大。一般人以享福为人生最大目的,中国民族必遭灭亡,历史上罗马之亡可为殷鉴。现在的世界是竞争的世界,如果一个民族还是一味以享受为目的,不肯以服务为目的,必归失败。我们应该以享福为可耻,只有老弱残废才能享福,而以自食其力为光荣。英国国王在幼年时,必在军舰充当小兵,惟其如此方能知兵士的疾苦。全世界最富的人是煤油大王洛克菲勒(Rockefeller),他的儿子做事从小伙计做起,所以他们的事业能子孙相传不替。二十多年前,中日同时派学生留学欧美,中国的学生,一看见各类机械,便问从何处购买?何处最便宜?而日本的学生,只问如何制造?中国人只知道买,以享受为目的,而日本人则重做,以服务为目的;中国从前学工学农的人,统是只叫工人农夫去推动机器,耕耘田亩,而自己却在一边袖手旁观,这样讲究农工业是不会进步的。中国古代轻视劳力,现在已经完全改变,样样应该自己动手,这种人生观的改造,是极重要的。

以上所说的两点:第一,诸位求学,应不仅在科目本身,而且要训练如何能正确地训练自己的思想;第二,我们人生的目的是在能服务,而不在享受。

(作者:竺可桢)

 

不要抛弃学问

诸位毕业同学:

你们现在就要离母校了,我没有什么礼物送给你们,只好送你们一句话吧。这句话是:“不要抛弃学问。”

以前的功课也许一大部分是为了这张文凭,不得已而做的。从今以后,你们可以依自己的心愿去自由研究了。趁现在年富力强的时候,努力做一种专门学问。少年是一去不复返的,等到精力衰减时,要做学问也来不及了。即为吃饭计,学问也决不会辜负人的。吃饭而不求学问,三年五年之后,你们都要被后来少年淘汰的。到那时再想做点学问来补救,恐怕已太晚了。

有人说:“出去做事之后,生活问题急需解决,哪有工夫去读书?即使要做学问,既没有图书馆,又没有实验室,哪能做学问?”

我要对你们说:凡是要等到有图书馆才能读书,有了图书馆也不肯读书。凡是等到有了实验室方才做研究,有了实验室也不肯做研究。你有了决心就研究一个问题,自然会节衣缩食去买书,自然会想出法子来设置仪器。

至于时间,更不成问题。达尔文一生多病,不能多做工,每天只能做一点钟的工作。你们看他的成绩!每天花一点钟看10页有用的书,每年可看3600多页,30年可读11万页书。
诸位,11万页书可以使你成为一个学者了。可是每天看三种小报也得费你一点钟工夫;四圈麻将也得废你一点半钟的光阴。看小报呢,还是打麻将呢,还是努力做一个学者呢?全靠你们自己的选择!

易卜生说:“你的最大责任是把你这块材料铸造成器。”

学问便是铸器的工具,抛弃了学问便是毁了你自己。

再会了!你们的母校眼睁睁地要看你们10年之后成什么器。

(胡适 中国公学十八年级毕业赠言 1929年)


Dear Students of the Graduating Class,
As you are leaving your alma mater, I have nothing to offer you as a gift except a word of advice.
My advice is, “Never give up the pursuit of learning.” You have perhaps finished your college courses mostly for obtaining the diploma, or, in other words, out of sheer necessity. However, from now on you are free to follow your own bent in the choice of studies. While you are in the prime of life, why not devote yourselves to a special field of study? Youth will soon be gone never to return. And it will be too late for you to go into scholarship when in your declining years. Knowledge will do you a good return even as a means of subsistence. If you give up studies while holding a job, you will in a couple of years have had yourselves replaces by younger people. It will then be too late to remedy the situation by picking up studies again.
Some people say, “Once you have a job, you’ll come up against the urgent problem of making a living. How can you manage to find time to study? Even if you want to, will it be possible with no library or laboratory available?”
Now let me tell you this. Those who refuse to study for lack of a library will most probably continue to do so even though there is a library. And those who refuse to do research for lack of a laboratory will most probably continue to do so even though a laboratory is available. As long as you set your mind on studies, you will naturally cut down on food and clothing to buy books or do everything possible to acquire necessary instruments.
Time is no object. Charles Darwin could only work one hour a day due to ill health. Yet what a remarkable man he was! If you spend one hour a day reading 10 pages of a book, you can finish more than 3,600 pages a year, and 110,000 pages in 30 years.
Dear students, 110,000 pages will be quite enough to make a learned man of you. It will take you one hour to read three tabloids a day, and one and half hours to finish four rounds of mah-jong a day. Reading tabloids, playing mah-jong or striving to be a learned man, the choice lies with you.
”Henrik Ibsen says, “It is your supreme duty to cast yourself into a useful implement.”
Learning is the casting mould. Forsake learning, and you will ruin yourself.
Farewell! Your alma-mater is watching eagerly to see what will become of you ten years from now.

今日青年之弱点

作者:章太炎

现在青年第一弱点,就是把事情太看容易,其结果不是侥幸,便是退却。因为大凡作一件事情,在起初的时候,很不容易区别谁为杰出之士,必须历练许多困难,经过相当时间,然后才显得出谁为人才,其所造就方才可靠。近来一般人士皆把事情看得容易,亦有时凑巧居然侥幸成功。他们成功既是侥幸得来,因之他们凡事皆想侥幸成功。但是天下事那有许多侥幸呢?于是乎一遇困难,即刻退却。所以近来人物一时侥幸成功,则誉满天下;一时遇着困难废然而返,则毁谤丛集。譬如辛亥革命侥幸成功,为时太速,所以当时革命诸人多半未经历练,真才不易显出。诸君须知凡侥幸成功之事,便显不出谁是勇敢,谁是退却,因之杂乱无章,遂无首领之可言。假使当时革命能延长时间三年,清廷奋力抵抗,革命诸人由那艰难困苦中历练出来,既无昔日之侥幸成功,何至于有今日之纷纷退却。又如孙中山之为人,私德尚好,就是把事情看得太容易,实是他的最大弱点。现在青年只有将这个弱点痛改,遇事宜慎重,决机宜敏速,抱志既极坚确,观察又极明了,则无所谓侥幸退却,只有百折千回以达吾人最终之目的而已。

现在青年第二个弱点,就是妄想凭藉已成势力。本来自己是有才能的,因为要想凭籍已成势力。就将自己原有之才能皆一并牺牲,不能发展。譬如辛亥革命,大家皆利用袁世凯推翻清廷,后来大家都上了袁世凯的当。历次革命之利用陆荣廷岑春暄,皆未得良好结果。若使革命诸人听由自己的力量,一步一步的做去,旗帜鲜明,宗旨确定,未有不成功的。你们的少年中国学会,主张不利用已成势力我是很赞成的。不过已成势力,无论大小,皆不宜利用。宗旨确定,向前做去,自然志同道合的青年一天多似一天,那力量就不小了。惟最要紧的须要耐得过这寂寞的日子,不要动那凭藉势力的念头。

现在青年的第三个弱点,就是虚慕文明。虚慕那物质上的文明,其弊是显而易见的。就是虚慕那人道主义,也是有害的。原来人类性质,凡是能坚忍的人,都是含有几分残忍性,不过他时常勉强抑制,不易显露出来。有时抑制不住,那残忍性质便和盘托出。譬如曾文正破九江的时候,杀了许多人,所杀者未必皆是洪杨党人,那就是他的残忍性抑制不住的表示,也就是他除恶务尽的办法。这次欧洲大战,死了多少人,用了若干钱,直到德奥屈服,然后停战。我们试想欧战四年中,死亡非不多,损失非不大,协约各国为甚么不讲和呢?这就是欧美人做事彻底的表现,也就是除恶务尽的办法。现在中国是煦煦为仁的时代,既无所谓坚忍,亦无所谓残忍,当道者对于凶横蛮悍之督军,卖国殃民之官吏,无不包容之奖励之,决不妄杀一个,是即所谓人道主义。今后之青年做事皆宜彻底,不要虚慕那人道主义。

现在青年第四个弱点,就是好高骛远。在求学时代,都以将来之大政治家自命,并不踏踏实实去求学问。在少年时代,偶然说几句大话,将来偶然成功,那些执笔先生就称他为少年大志。譬如郑成功做了一篇小子当洒扫应对进退的八股,中有汤武证诛,亦洒扫也;尧舜揖让,亦进退也;小子当之,有何不可数语。不过偶然说几句话而已,后人遂称他为少年有大志。故现在青年之好高骛远,在青年自身当然亟应痛改。即前辈中之好以(少年有大志)奖励青年者,亦当负咎。我想欧美各国青年在求学时代,必不如中国青年之好高骛远。大家如能踏踏实实去求学问,始足与各国青年相竞争于二十世纪时代也。