当前位置:文档之家› The_Aims_of_Education——Alfred_North_Whitehead

The_Aims_of_Education——Alfred_North_Whitehead

The_Aims_of_Education——Alfred_North_Whitehead
The_Aims_of_Education——Alfred_North_Whitehead

1.Culture is activity of thought, and receptiveness to beauty and humane feeling. Scraps of information have nothing to do with it. A merely well-informed man is the most useless bore on God’s earth. What we should aim at producing is men who possess both culture and expert knowledge in some special direction. Their expert knowledge will give them the ground to start from, and their culture will lead them as deep as philosophy and as high as art. We have to remember that the valuable intellectual development is self-development, and that it mostly takes place between the ages of sixteen and thirty. As to training, the most important part is given by mothers before the age of twelve. A saying due to Archbishop Temple illustrates my meaning.

.文化是思想活动,是对美和高尚情感的接受。支离破碎的信息或知识与文化毫不相干。一个人仅仅见多识广,他不过是这个世界上最无用而令人讨厌的人。我们要造就的是既有文化又掌握专门知识的人才。专业知识为他们奠定起步的基础,而文化则像哲学和艺术一样将他们引向深奥高远之境。我们必须记住,自我发展才是有价值的智力发展,而这种发展往往发生在16岁到30岁之间。至于说到人的培养,人们所受到的最重要的培养是他们12岁以前从母亲那里接受的教养。大主教坦普尔 [1] 的一句名言可以说明我的意思。

2. Surprise was expressed at the success in after-life of a man, who as a boy at Rugby had been somewhat undistin-guished. He answered, “It is not what they are at eighteen, it is what they become afterwards that matters.”

一个曾经在拉格比公学 [2] 读书时成绩平平的男孩,长大后取得了成就,这不禁使人感到惊讶。坦普尔大主教的回答是:“人们18岁时怎么样并不重要,重要的是他们后来会如何发展。”

3.In training a child to activity of thought, above all things we must

beware of what I will call “inert ideas”—that is to say, ideas that are

merely received into the mind without being utilised, or tested, or thrown

into fresh combinations. .

培养一个儿童如何思维,最重要的是必须注意我所说的那种“呆滞的思想”——这种思想仅为大脑所接受却不加以利用,或不进行检验,或没有与其他新颖的思想有机地融为一体。

4.In the history of education, the most striking phenomenon is that

schools of learning, which at one epoch are alive with a ferment of genius,

in a succeeding generation exhibit merely pedantry and routine. The

reason is, that they are overladen with inert ideas. Education with inert

ideas is not only useless: it is, above all things, harmful—Corruptio

optimi, pessima. Except at rare intervals of intellectual ferment, education

in the past has been radically infected with inert ideas. That is the reason

why uneducated clever women, who have seen much of the world, are in

middle life so much the most cultured part of the community. They have

been saved from this horrible burden of inert ideas. Every intellectual

revolution which has ever stirred humanity into greatness has been a

passionate protest against inert ideas. Then, alas, with pathetic ignorance

of human psychology, it has proceeded by some educational scheme to

bind humanity afresh with inert ideas of its own fashioning.

在教育发展史上,最引人注意的现象是,一些学校在某个时期充满天才创造的活力,后来却迂腐而墨守成规。其原因就在于,这些学校深受这种呆滞思想的束缚和影响。囿于这种思想的教育不仅毫无价值,还极其有害。除了在知识蓬勃发展的少数时期外,过去的教育完全受这种呆滞思想的影响。这也说明为什么那些聪慧的妇女,虽然她们未受教育,但阅历丰富,当她们步入中年时,便成为社会中最有文化修养的群体。她们免受了这种呆滞思想的可怕束缚。使人类走向伟大崇

高的每一次知识革命无不是对这种呆滞思想的激烈反抗。然而,遗憾的是,我们对人类的心理特点茫然无知,于是某种教育体制自身形成的僵化思想重又束缚了人类。

5.Let us now ask how in our system of education we are to guard against this mental dry rot. We enunciate two educational commandments, “Do not teach too many subjects,” and again, “What you teach, teach thoroughly.”.

现在让我们来看看,在我们的教育制度中应如何防止这种精神和思想上的僵化陈腐。我们先来说明教育上的两条戒律,其一,“不可教太多的科目”;其次,“所教科目务须透彻”。

6.The result of teaching small parts of a large number of subjects is the passive reception of disconnected ideas, not illumined with any spark of vitality. Let the main ideas which are introduced into a child’s education be few and important, and let them be thrown into every combination possible. The child should make them his own, and should understand their application here and now in the circumstances of his actual life. From the very beginning of his education, the child should experience the joy of discovery. The discovery which he has to make, is that general ideas give an understanding of that stream of events which pours through his life, which is his life. By understanding I mean more than a mere logical analysis, though that is included. I mean “understanding’ in the sense in which it is used in the French proverb, “To understand all, is to forgive all.” Pedants sneer at an education which is useful. But if education is not useful, what is it? Is it a talent, to be hidden away in a

napkin? Of course, education should be useful, whatever your aim in life. It was useful to Saint Augustine and it was useful to Napoleon. It is useful, because understanding is useful. .

在众多的科目中选择一小部分进行教授,其结果是,学生被动地接受不连贯的思想概念,没有任何生命的火花闪烁。在儿童教育中引进的主要思想概念要少而精,这些思想概念能形成各种可能的组合,儿童应该使这些思想概念变成自己的概念,应该理解如何将它们应用于现实生活中。儿童从一开始接受教育起,就应该体验发现的乐趣。他必须发现,一般的概念能使他理解他一生中遇到的、构成他生活的种种事件。我用“理解”这个词,意思不仅限于一种逻辑分析,虽然它包含了逻辑分析。我用这个词是取它在法国谚语“理解一切即宽恕一切”中的含义。卖弄学问的人会讥笑那种实用的教育。但教育若无用,它又何成其为教育?难道教育是一种不加以利用的才智?教育当然应该有用,不管你的生活目的是什么。教育对圣奥古斯丁 [3] 有用,对拿破仑 [4] 有用。教育有用,因为理解生活是有用的。

7.I pass lightly over that understanding which should be given by the literary side of education. Nor do I wish to be supposed to pronounce on the relative merits of a classical or a modern curriculum. I would only remark that the understanding which we want is an understanding of an insistent present. The only use of a knowledge of the past is to equip us for the present. No more deadly harm can be done to young minds than by depreciation of the present. The present contains all that there is. It is holy ground; for it is the past, and it is the future. At the same time it must be observed that an age is no less past if it existed two hundred years ago than if it existed two thousand years ago. Do not be deceived by the pedantry of dates. The ages of Shakespeare and of Molière are no less past than are the ages of Sophocles and of Virgil. The communion of saints is a great and inspiring assemblage, but it has only one possible hall

of meeting, and that is, the present, and the mere lapse of time through which any particular group of saints must travel to reach that meeting-place, makes very little difference.

我只是简单地提到应由文学教育传授的那种理解,我也不希望人们以为我要对古典或现代课程的价值发表评论。我只想说,我们需要的理解是一种对现在的理解。过去的知识惟其有价值,就在于它武装我们的头脑,使我们面对现在。再没有比轻视现在给青年人带来更严重的危害了。现在包含一切。现在是神圣的境界,因为它包含过去,又孕育着未来。同时我们必须注意,一个200年前的时代与一个2000年前的时代同样古老。不要被形式上的年代所蒙蔽。莎士比亚 [5] 和莫里哀 [6] 的时代与索福克勒斯 [7] 和维吉尔 [8] 的时代一样古老。先贤们的思想交流是启发灵智的盛会,但聚会只可能有一个殿堂,这就是现在;任何先贤来到这个殿堂所经历的时间没有什么不同的意义。

8.Passing now to the scientific and logical side of education, we remember that here also ideas which are not utilised are positively harmful. By utilising an idea, I mean relating it to that stream, compounded of sense perceptions, feelings, hopes, desires, and of mental activities adjusting thought to thought, which forms our life. I can imagine a set of beings which might fortify their souls by passively reviewing disconnected ideas. Humanity is not built that way except perhaps some editors of newspapers.

当我们转而考察科学和逻辑的教育时,我们应记住,在这里不加利用的思想概念同样是十分有害的。我所说的利用一个思想概念,是指将它与一连串复杂的感性知觉、情感、希望、欲望以及调节思维的精神活动联系在一起,这构成了我们的生活。我可以想像那些通过被动地考察不连贯的思想来加强自己灵魂的人,但人类不是这样发展而来的——也许某些报纸的编辑是这样。

9.In scientific training, the first thing to do with an idea is to prove it. But allow me for one moment to extend the meaning of “prove”; I mean—to prove its worth. Now an idea is not worth much unless the propositions in

which it is embodied are true. Accordingly an essential part of the proof of an idea is the proof, either by experiment or by logic, of the truth of the propositions. But it is not essential that this proof of the truth should constitute the first introduction to the idea. After all, its assertion by the authority of respectable teachers is sufficient evidence to begin with. In our first contact with a set of propositions, we commence by appreciating their importance. That is what we all do in after-life. We do not attempt, in the strict sense, to prove or to disprove anything, unless its importance makes it worthy of that honour. These two processes of proof, in the narrow sense, and of appreciation, do not require a rigid separation in time. Both can be proceeded with nearly concurrently. But in so far as either process must have the priority, it should be that of appreciation by use.

在科学训练中,对一个概念所要做的第一件事就是去证明它。但请允许我先扩展“证明”这个词的含义:我的意思是——证明其价值。如果体现某一思想概念的主题不真实,那么这个思想概念就没有多少价值。因此,对某一思想概念的证明,最重要的是通过实验证明或在逻辑上证明其主题的真实性。但证明主题的真实性并不构成最初采用这一概念的必要条件。毕竟,可尊敬的教师们的权威意见坚持这一点,这是开始讨论这个问题的充分根据。在我们最初接触一系列命题时,我们从评价它们的重要性入手。这是我们所有的人在后半生所做的事。从严格的意义上说,我们并不试图证明或反驳任何事物,除非其重要性值得我们这样做。证明(从狭义上说)和评价,这两个过程并不要求在时间上严格地分开,两者几乎可能同时进行。但因为任何一个过程必须有优先性,因此应该优先考虑评价过程。

10.Furthermore, we should not endeavour to use propositions in isolation. Emphatically I do not mean, a neat little set of experiments to illustrate Proposition I and then the proof of Proposition I, a neat little set of experiments to illustrate Proposition II and then the proof of Proposition

II, and so on to the end of the book. Nothing could be more boring. Interrelated truths are utilised en bloc, and the various propositions are employed in any order, and with any reiteration. Choose some important applications of your theoretical subject; and study them concurrently with the systematic theoretical exposition. Keep the theoretical exposition short and simple, but let it be strict and rigid so far as it goes. It should not be too long for it to be easily known with thoroughness and accuracy. The consequences of a plethora of half-digested theoretical knowledge are deplorable. Also the theory should not be muddled up with the practice. The child should have no doubt when it is proving and when it is utilising. My point is that what is proved should be utilised, and that what is utilised should—so far, as is practicable—be proved. I am far from asserting that proof and utilisation are the same thing.

此外,我们不应该试图孤立地利用各种主题。我的意思决不是用一组简单的实验说明主题Ⅰ,然后证明主题Ⅱ;接着用一组简单的实验说明主题Ⅱ,然后证明主题Ⅱ,依次进行直到书的末尾。再没有比这更枯燥的了。互相联系的原理作为整体一起加以利用,各种不同的主题按任何顺序反复使用。从理论科目中选择一些重要的用途,通过系统的理论阐述对这些用途同时进行研究。理论阐述须简短,但应严谨精确。它不能太长,否则人们不易透彻准确地理解。头脑里装满大量一知半解的理论知识,其后果令人悲叹。理论也不应该与实际相混淆。儿童在证明和利用时,他不应该有疑虑。我的观点是,被证明的应该加以利用,被利用的应该——只要可行——加以证明。我决不坚持认为证明和利用是同一件事。

11.At this point of my discourse, I can most directly carry forward my argument in the outward form of a digression. We are only just realising that the art and science of education require a genius and a study of their own; and that this genius and this science are more than a bare knowledge

of some branch of science or of literature. This truth was partially perceived in the past generation; and headmasters, somewhat crudely, were apt to supersede learning in their colleagues by requiring left-hand bowling and a taste for football. But culture is more than cricket, and more than football, and more than extent of knowledge.

叙述到此,我可以用一种表面看似离题的方式更直接地阐明我的论点。我们刚刚开始认识到,教育的艺术和科学需要一种天才,需要对这种艺术及科学进行研究;我们认识到,这种天才和科学不仅仅是某种科学的或文学的知识。上一代人只是部分地认识这个道理;中学和小学里那些多少有点粗俗的校长们,往往要求同事们左手投保龄球,要求他们对足球感兴趣,以此来取代学术。然而,文化比板球丰富,比足球丰富,文化也比广博的知识更为丰富。

https://www.doczj.com/doc/6f6547574.html,cation is the acquisition of the art of the utilisation of knowledge. This is an art very difficult to impart. Whenever a textbook is written of real educational worth, you may be quite certain that some reviewer will say that it will be difficult to teach from it. Of course it will be difficult to teach from it. If it were easy, the book ought to be burned; for it cannot be educational. In education, as elsewhere, the broad primrose path leads to a nasty place. This evil path is represented by a book or a set of lectures which will practically enable the student to learn by heart all the questions likely to be asked at the next external examination. And I may say in passing that no educational system is possible unless every question directly asked of a pupil at any examination is either framed or modified by the actual teacher of that pupil in that subject. The external assessor may report on the curriculum or on the performance of the pupils, but never should be allowed to ask the pupil a question which has not

been strictly supervised by the actual teacher, or at least inspired by a long conference with him. There are a few exceptions to this rule, but they are exceptions, and could easily be allowed for under the general rule. .

教育是教人们掌握如何运用知识的艺术。这是一种很难传授的艺术。你可以肯定,不管什么时候,只要有人写出一本具有真正教育价值的教科书,就会有某位评论家说这本教材很难用。这种教材当然不容易教。倘若容易,就应该将它付之一炬,因为它不可能有教育的价值。在教育中就像在其他领域中一样,那条宽广却又危险的路通往一个糟糕的地方。这条有害的路由一本书或一系列讲座来体现,书和讲座几乎能使学生记住下一次校外考试 [9] 中可能出现的所有问题。我可以顺便说一句,一个学生在任何考试中要直接回答的每一个问题如果不由他的老师设计或修改,这种教育制度是没有发展前途的。校外评定员可以报告课程的情况或学生的表现,但决不能问未经学生自己的教师严格审阅的问题,或者这个问题至少是经过与学生长时间的讨论而引发出来的。这条规则有少数例外,但因为它们是例外,在总的规则下是容易允许的。

13.We now return to my previous point, that theoretical ideas should always find important applications within the pupil’s curriculum. This is not an easy doctrine to apply, but a very hard one. It contains within itself the problem of keeping knowledge alive, of preventing it from becoming inert, which is the central problem of all education. .

现在回到我前面提到的论点,即各种理论概念在学生的课程中应该永远具有重要的应用性。这并不是一个容易付诸实践的原理,相反,很难实行。它本身便涉及这样的问题:要使知识充满活力,不能使知识僵化,而这是一切教育的核心问题。

14.The best procedure will depend on several factors, none of which can be neglected, namely, the genius of the teacher, the intellectual type of the pupils, their prospects in life, the opportunities offered by the immediate surroundings of the school and allied factors of this sort. It is for this reason that the uniform external examination is so deadly. We do

not denounce it because we are cranks, and like denouncing established things. We are not so childish. Also, of course, such examinations have their use in testing slackness. Our reason of dislike is very definite and very practical. It kills the best part of culture. When you analyse in the light of experience the central task of education, you find that its successful accomplishment depends on a delicate adjustment of many variable factors. The reason is that we are dealing with human minds, and not with dead matter. The evocation of curiosity, of judgment, of the power of mastering a complicated tangle of circumstances, the use of theory in giving foresight in special cases all these powers are not to be imparted by a set rule embodied in one schedule of examination subjects.

最好的做法取决于以下诸项不可忽视的因素,即教师的天赋,学生的智力类型,他们生活的前景,学校周围环境提供的机会,以及与此相关的各种因素。正是由于这个原因,统一的校外考试是极其有害的。我们指责这种考试并非因为我们是怪人,也不是因为我们热衷于指责已经确定的事物。我们并不这样幼稚。当然,这类考试在检查学生的懈怠方面也有用处。我们讨厌这种考试的理由是十分明确而又具有实际意义的,因为它扼杀了文化的精髓。当你凭据经验来分析教育的中心任务时,你会发现,圆满完成这一任务取决于对多种可变因素做精妙的调整。这是因为,我们是在与人的大脑而不是与僵死的物质打交道。唤起学生的求知欲和判断力,以及控制复杂情况的能力,使他们在特殊情况下应用理论知识对前景作出展望——所有这些能力不是靠一条体现在各科目考试中的固定规则所能传授的。

15.I appeal to you, as practical teachers. With good discipline, it is always possible to pump into the minds of a class a certain quantity of inert knowledge. You take a text-book and make them learn it. So far, so good. The child then knows how to solve a quadratic equation. But what is the point of teaching a child to solve a quadratic equation? There is a

traditional answer to this question. It runs thus: The mind is an instrument, you first sharpen it, and then use it; the acquisition of the power of solving a quadratic equation is part of the process of sharpening the mind. Now there is just enough truth in this answer to have made it live through the ages. But for all its half-truth, it embodies a radical error which bids fair to stifle the genius of the modern world. I do not know who was first responsible for this analogy of the mind to a dead instrument. For aught I know, it may have been one of the seven wise men of Greece, or a committee of the whole lot of them. Whoever was the originator, there can be no doubt of the authority which it has acquired by the continuous approval bestowed upon it by eminent persons. But whatever its weight of authority, whatever the high approval which it can quote, I have no hesitation in denouncing it as one of the most fatal, erroneous, and dangerous conceptions ever introduced into the theory of education. The mind is never passive; it is a perpetual activity, delicate, receptive, responsive to stimulus. You cannot postpone its life until you have sharpened it. Whatever interest attaches to your subject-matter must be evoked here and now; whatever powers you are strengthening in the pupil, must be exercised here and now; whatever possibilities of mental life your teaching should impart, must be exhibited here and now. That is the golden rule of education, and a very difficult rule to follow.

我请你们这些注重实际的教师们注意。如果一个班级的课堂纪律良好,那么就有可能向学生们灌输一定量的死板的知识。你采用一种教材,让他们学习。在某

种程度上来说,一切顺利。学生们然后知道了如何解二次方程。但教会学生解二次方程的意义是什么呢?对这个问题有一种传统的回答,即人的大脑是一种工具,你首先要使它锋利,然后再使用它;掌握解二次方程的本领便是一种磨砺大脑的过程。这个回答具有一定的真实性,因此几代教育家都接受了它。但尽管如此,它包含一种根本性的错误,可能扼杀我们这个世界的天才。我不知道是谁最先把人的大脑比作一种无生命的工具。据我所知,这也许是希腊七个智者中的一位提出的,或者是他们全体的看法。不管发明者是谁,历代杰出人物赞同此说而使它具有的权威性不容怀疑。然而,不管这种说法多么权威,不管什么样的名人对此表示过赞同,我都毫不犹豫地抨击这种说法,视其为迄令存在于教育理论中的最致命、最错误因而也是最危险的一种观点。人的大脑从来不是消极被动的;它处于一种永恒的活动中,精细而敏锐,接受外界的刺激,对刺激作出反应。你不能延迟大脑的生命,像工具一样先把它磨好然后再使用它。不管学生对你的主题有什么兴趣,必须此刻就唤起它;不管你要加强学生什么样的能力,必须即刻就进行;不管你的教学给予精神生活什么潜在价值,你必须现在就展现它。这是教育的金科玉律,也是一条很难遵守的规律。

16.The difficulty is just this: the apprehension of general ideas, intellectual habits of mind, and pleasurable interest in mental achievement can be evoked by no form of words, however accurately adjusted. All practical teachers know that education is a patient process of the mastery of details, minute by minute, hour by hour, day by day. There is no royal road to learning through an airy path of brilliant generalizations. There is a proverb about the difficulty of seeing the wood because of the trees. That difficulty is exactly the point which I am enforcing. The problem of education is to make the pupil see the wood by means of the trees.

这种困难在于:对于一般概念的理解,以及大脑智力活动的习惯,还有对智力成就的令人快乐的关注,这些都无法用任何形式的言语唤起,不管你怎样正确地调整。凡有实际经验的教师都知道,教育是一种掌握种种细节的需要耐心的过程,一分钟,一小时,日复一日的循环。企图通过一种虚幻的方法做出高明的概括,学习上绝无此种捷径。我们知道有一句谚语“见树不见林”,这正是我要强调的一点。教育需要解决的问题就是使学生通过树木看见森林。

17.The solution which I am urging, is to eradicate the fatal disconnection of subjects which kills the vitality of our modern curriculum. There is only one subject-matter for education, and that is Life in all its manifestations. Instead of this single unity, we offer children -- Algebra, from which nothing follows; Geometry, from which nothing follows; Science, from which nothing follows; History, from which nothing follows; a Couple of Languages, never mastered; and lastly, most dreary of all, Literature, represented by plays of Shakespeare, with philological notes and short analyses of plot and character to be in substance committed to memory. Can such a list be said to represent Life, as it is known in the midst of the living of it? The best that can be said of it is, that it is a rapid table of contents which a deity might run over in his mind while he was thinking of creating a world, and has not yet determined how to put it together.

我极力主张的解决方法是,要根除各科目之间那种致命的分离状况,因为它扼杀了现代课程的生命力。教育只有一个主题,那就是五彩缤纷的生活。但我们没有向学生展现生活这个独特的统一体,而是教他们代数、几何、科学、历史,却毫无结果;我们让孩子们学两三种语言,但他们却从来没有真正掌握;最后,是最令人乏味的文学,常常是莎士比亚的一些戏剧作品,配有实际上是为让学生背诵的语言方面的注释和简短的剧情人物分析。以上这些能说代表了生活吗?充其量只能说,那不过是一个神在考虑创造世界时他脑海中飞快浏览的一个目录表,那时他还没有决定如何将它们合为一体.

18.Let us now return to quadratic equations. We still have on hand the unanswered question. Why should children be taught their solution? Unless quadratic equations fit into a connected curriculum, of course there is no reason to teach anything about them. Furthermore, extensive

as should be the place of mathematics in a complete culture, I am a little doubtful whether for many types of boys algebraic solutions of quadratic equations do not lie on the specialist side of mathematics. I may here remind you that as yet I have not said anything of the psychology or the content of the specialism, which is so necessary a part of an ideal education. But all that is an evasion of our real question, and I merely state it in order to avoid being misunderstood in my answer.

现在让我们回到二次方程上来,我们还没有解决这个问题。为什么要教儿童二次方程的解法?如果二次方程不适合一套连贯的课程,当然没有理由去教与它有关的任何知识。此外,因为数学在整个文化中的位置应该涉及很广的范围,我有点儿怀疑对许多类型的儿童来说,二次方程的代数解法是否不取决于数学的专业化的一面。在此我可以提醒你们,到目前为止我还没有对心理学或专门化内容作任何评论,而它是理想教育的必要组成部分。不过,以上所说是回避我们前面提到的间题,我说这些只是为了使我下面的回答不致引起误解。

19.Quadratic equations are part of algebra, and algebra is the intellectual instrument which has been created for rendering clear the quantitative aspects of the world. There is no getting out of it. Through and through the world is infected with quantity. To talk sense, is to talk in quantities. It is no use saying that the nation is large, —How large? It is no use saying that radium is scarce, — How scarce? You cannot evade quantity. You may fly to poetry and to music, and quantity and number will face you in your rhythms and your octaves. Elegant intellects which despise the theory of quantity, are but half developed. They are more to be pitied than blamed, The scraps of gibberish, which in their school-days were taught to them in the name of algebra, deserve some contempt. This

question of the degeneration of algebra into gibberish, both in word and in fact, affords a pathetic instance of the uselessness of reforming educational schedules without a clear conception of the attributes which you wish to evoke in the living minds of the children. A few years ago there was an outcry that school algebra, was in need of reform, but there was a general agreement that graphs would put everything right. So all sorts of things were extruded, and graphs were introduced. So far as I can see, with no sort of idea behind them, but just graphs. Now every examination paper has one or two questions on graphs. Personally I am an enthusiastic adherent of graphs. But I wonder whether as yet we have gained very much. You cannot put life into any schedule of general education unless you succeed in exhibiting its relation to some essential characteristic of all intelligent or emotional perception. lt is a hard saying, but it is true; and I do not see how to make it any easier. In making these little formal alterations you are beaten by the very nature of things. You are pitted against too skilful an adversary, who will see to it that the pea is always under the other thimble.

二次方程是代数学的一部分,而代数学是人们创造出来用以清晰描绘量化世界的智力工具。我们无法回避数量,世界自始至终都受到数量的影响,说话有道理就是作量化描述。说这个国家大毫无意义——有多大?说缺乏镭也无意义——缺多少?你不能回避量的概念。也许你可以转向诗歌和音乐的王国,但在节奏和音阶方面你仍会遇到量和数。那些蔑视数量理论的优雅的学者是不健全的。与其指责他们,不如怜悯他们。他们在学校中学到的那些零星的莫名其妙的代数知识应该受到轻视, 代数学无论在表面上还是事实上,都退化成了无意义的所谓知识,这为我们提供了一个可悲的例子,说明如果人们对自己希望在儿童生动活泼的头脑里唤起的特性缺乏清晰的概念,则改革教育的计划表是没有价值的。几年前,人们强烈要求改革学校中的代数课,但多数人都同意图表可以解决一切问题。于是,

学校淘汰了所有的方法,开始推行图表法。但就我所看到的而言,仅仅是图表而已,根本没有思想或概念。现在每次考试总有一两道图解题。我个人是图解法的积极拥护者,但我不知道我们是否取得了很大的进展。生活与所有智力或情感认知能力的某种基本特点之间存在着关系,如果你不能展现这种关系,你就无法将生活融入任何普通教育的计划中。这是一句难理解的话,但它有道理。我不知道如何使它更容易理解。在做这种小小的正式改动时,你恰恰被事物的本质难倒。你的对手本领太高,他能使豌豆永远在另一个套筒下

20.Reformation must begin at the other end. First, you must make up your mind as to those quantitative aspects of the world which are simple enough to be introduced into general education; then a schedule of algebra should be framed which will about find its exemplification in these applications. We need not fear for our pet graphs, they will be there in plenty when we once begin to treat algebra as a serious means of studying the world. Some of the simplest applications will be found in the quantities which occur in the simplest study of society. The curves of history are more vivid and more informing than the dry catalogues of names and dates which comprise the greater part of that arid school study. What purpose is effected by a catalogue of undistinguished kings and queens? Tom, Dick, or Harry, they are all dead. General resurrections are failures, and are better postponed. The quantitative flux of the forces of modern society is capable of very simple exhibition. Meanwhile, the idea of the variable, of the function, of rate of change, of equations and their solution, of elimination, are being studied as an abstract science for their own sake. Not, of course, in the pompous phrases with which I am alluding to them here, but with that iteration of simple special cases

proper to teaching.

改革必须从另一边开始。首先,你必须接受普通教育中很容易采用的对世界的量化描述方法。其次,应该制订出代数的计划,这个计划将在这些应用中发现它的范例。我们不必担心我们特别喜欢的那些图表,当我们开始把代数学当作研究世界的重要手段时,图表会大量出现。对社会进行最简明的研究时,可以用某些最简单的图表来进行量化描述。历史课图表中的那些曲线要比枯燥的人名、日期一览表更生动,更直观,但这种一览表却构成了我们学校枯燥的学习中的主要内容。不知名的国王和王后的一览表能达到什么目的?汤姆、迪克,或哈里,他们都死了。普通的起死回生是不可能的。现代社会中各种势力的量的变化可以用极简明的方法显示。同时,关于变量的概念,关于函数、变化速率、方程及其解法的概念,还有数学中消去的概念,都因其自身的原因而被作为一种纯概念的科学来进行研究。当然,不是用此刻我提到它们时所用的这些华丽的词藻,而是重复使用那些适合教学的简单而特殊的实例。

21.If this course be followed. the route from Chaucer to the Black Death, from the Black Death to modern Labour troubles, will connect the tales of the mediaeval pilgrims with the abstract science of algebra, both yielding diverse aspects of that single theme, Life. I know what most of you are thinking at this point. It is that the exact course which I have sketched out is not the particular one which you would have chosen, or even see how to work. I quite agree. I am not claiming that I could do it myself. But your objection is the precise reason why a common external examination system is fatal to education. The process of exhibiting the applications of knowledge must, for its success, essentially depend on the character of the pupils and the genius of the teacher. Of course I have left out the easiest applications with which most of us are more at home. I mean the quantitative sides of sciences, such as mechanics and physics.

如果遵循这样一条路线,那么从乔叟 [11] 到黑死病 [12] ,从黑死病到现代劳工问题,这条线索将把中世纪有关朝圣者们的传说与代数这门抽象的科学联系起来,两者都从诸多不同的方面反映了那个独一无二的主题,即:生活。我知道

你们大多数人对这一点的看法。你们认为我所勾勒出的这条线索并不是你们想选择的线索,甚至也不是你们要看它如何起作用的线索。对此我颇为赞同。我并不是说我可以自己做这点。但你们的反对恰恰说明了为什么统一的校外考试对教育是极其有害的。展现知识应用的过程若要取得成功,必须首先取决于学生的特点和教师的天赋。当然,我忽略了我们大多数人都比较熟悉的最简单的应用。我指的是那些涉及量的科学,如力学和物理学。

22.Again, in the same connection we plot the statistics of social phenomena against the time. We then eliminate the time between suitable pairs. We can speculate how far we have exhibited a real causal connection, or how far a mere temporal coincidence. We notice that we might have plotted against the time one set of statistics for one country and another set for another country, and thus, with suitable choice of subjects, have obtained graphs which certainly exhibited mere coincidence. Also other graphs exhibit obvious causal connections. We wonder how to discriminate. And so are drawn on as far as we will.

而且,在同样的关系中,我们用社会现象的统计资料与时间对照,然后我们取消相关的一对事实之间的时间。我们能够推断我们在多大程度上展现了一种真正的因果关系,或多大程度上仅仅是时间上的巧合。我们注意到,对不同国家的事实,我们可能使用了一组不同的统计数据与时间对照,这样,通过对题目的适当选择,就可能得到肯定仅仅是展现巧合的图表。同样,其他图表可显示明显的因果关系。我们不知道如何区分两者间的不同,因此我们继续论述。

23.But in considering this description, I must beg you to remember what I have been insisting on above. In the first place, one train of thought will not suit all groups of children. For example, I should expect that artisan children will want something more concrete and, in a sense, swifter than I have set down here. Perhaps I am wrong, but that is what I should guess. In the second place, I am not contemplating one beautiful lecture

stimulating, once and for all, an admiring class. That is not the way in which education proceeds. No; all the time the pupils are hard at work solving examples drawing graphs, and making experiments, until they have a thorough hold on the whole subject. I am describing the interspersed explanations, the directions which should be given to their thoughts. The pupils have got to be made to feel that they are studying something, and are not merely executing intellectual minuets.

然而,在考虑这种描述时,我必须请你们记住我始终坚持的上述论点。首先,一种想法不会适合各种类型的所有儿童。例如,我想,手工灵巧的儿童会需要比我在此记下的更具体、从某种意义上来说更敏捷的东西。也许我错了,但我应该作这种推测。其次,我并不认为一次出色的讲座就能一劳永逸地引起全班的赞美。这不是教育进展的方式。不;学生们始终在努力地解题,画图表,做实验,直到他们完全掌握了整个题目。我在描述各种解释,即在思维方面应给予孩子们的指导。必须让学生们感到他们在学习某种东西,而不仅仅是在表演智力的小步舞。

24.Finally, if you are teaching pupils for some general examination, the problem of sound teaching is greatly complicated. Have you ever noticed the zig-zag moulding round a Norman arch? The ancient work is beautiful, the modern work is hideous. The reason is, that the modern work is done to exact measure, the ancient work is varied according to the idiosyncrasy of the workman. Here it is crowded, and there it is expanded. Now the essence of getting pupils through examinations is to give equal weight to all parts of the schedule. But mankind is naturally specialist. One man sees a whole subject, where another can find only a few detached examples. I know that it seems contradictory to allow for specialism in a curriculum especially designed for a broad culture.

Without contradictions the world would be simpler, and perhaps duller. But I am certain that in education wherever you exclude specialism you destroy life.

最后,如果你教的学生要参加某种统一的普通考试,那么如何实施完美的教学便是一个极其复杂的问题。你是否注意过诺曼式拱形结构那弯曲的造型?古代的作品精美绝伦,现代的作品则五陋不堪。其原因就在于,现代作品按精确的尺寸设计制作,而古代的作品则随工匠的风格而变化。现代是拥挤,古代是舒展。现在,要使学生通过考试,就要对教学的各个科目都给予同等的重视。但人类天生是一个适应并局限于一定生存模式的专门化的物种。某个人看见的是整个题目,而另一个人则可能只发现一些独立的例证。我知道,在专为一种广博的文化而设计的课程中为专门化留出余地似乎是矛盾的。但没有矛盾,世界会变得更简单,也许更单调。我肯定,在教育中只要你排斥专门化,你就是在破坏生活。

25.We now come to the other great branch of a general mathematical education, namely Geometry. The same principles apply. The theoretical part should be clear-cut, rigid, short, and important. Every proposition not absolutely necessary to exhibit the main connection of ideas should be cut out, but the great fundamental ideas should be all there. No omission of concepts, such as those of Similarity and Proportion. We must remember that, owing to the aid rendered by the visual presence of a figure, Geometry is a field of unequalled excellence for the exercise of the deductive faculties of reasoning. Then, of course, there follows Geometrical Drawing, with its training for the hand and eye.

现在我们来看看普通数学教育中的另一个重要的分支:几何学。同样的原理也适用于这里。理论部分应该轮廓分明,严密,简洁,有重要意义。对显示各种概念之间主要联系并非必要的任何论点都应删除,但应保留所有重要的基本概念。不应删除这样的概念,如相似性和比例。我们必须记住,由于图形的视觉效果提供的帮助,几何学是训练大脑推理演绎能力的无与伦比的学科。当然,随后就有了几何制图,它训练人的手和眼睛。

26.But, like Algebra, Geometry and Geometrical Drawing must be

gcc编译器使用简明指南

gcc编译器使用简明指南 gcc对文件的处理需要经过预处理->编译->汇编->链接的步骤,从而产生一个可执行文件,各部分对应不同的文件类型,具体如下: file.c c程序源文件 file.i c程序预处理后文件 file.cxx c++程序源文件,也可以是https://www.doczj.com/doc/6f6547574.html, / file.cpp / file.c++ file.ii c++程序预处理后文件 file.h c/c++头文件 file.s 汇编程序文件 file.o 目标代码文件 gcc [选项]文件列表 -ansi 强制完全ANSI一致 -c 仅编译或汇编,生成目标代码文件,将.c、.i、.s等文件生成.o文件,其余文件被忽略 -S 仅编译,不进行汇编和链接,将.c、.i等文件生成.s文件,其余文件被忽略 -E 仅预处理,并发送预处理后的.i文件到标准输出,其余文件被忽略 -o file 创建可执行文件并保存在file中,而不是默认文件a.out -g 产生用于调试和排错的扩展符号表,用于GDB调试,切记-g和-O通常不能一起使用 -w 取消所有警告 -W 给出更详细的警告 -O [num]优化,可以指定0-3作为优化级别,级别0表示没有优化 -x language 默认为-x none,即依靠后缀名确定文件类型,加上-x lan确定后面所有文件类型,直到下一个-x出现为止 -D macro[=]类似于源程序里的#define,在-D macro中的macro可被源程序识别,例如gcc -D NUM -D FILE=\"bbs.txt\" hello.c -o hello,第一个-D选项定义宏NUM,在程序中可以使用#ifdef来检查是否被设置,第二个-D定义宏FILE,在源程序中可用 -U macro 类似于源程序开头定义#undef macro,也就是取消源程序中的某个宏定义

命宫四化在十二宫论法

命宫四化在十二宫论法 一、命宫四化入本命宫:财申日 四化(忌):坎坷不顺,固执己见,心烦,易犯小人,少运不佳四十岁前守财不牢,灾厄多。(宜上班)生年化忌入本命或自化忌:想不开跟自已过意不去,有悲观的思想。情婚土 四化(禄、科):聪明、清秀、人缘佳,衣食不缺,乐天命,好客,好学艺.助人为乐,解厄之功。未四化(权):自视高、任性、霸权、机智,能力才干型,不易接受别人意见,主观强,爱出风头,做事有 责任。星情 逢自化(禄、权、科、忌):心情不稳定。自化(禄、科)较乐天,自化(权)主观强不认输。子主申生年忌、先后天忌、业障忌一样:主少运不佳,不好养壬 数三 二、命宫四化入兄弟宫:紫金理 四化(忌):入兄弟或交友冲兄弟,主较无缘,不易沟通。欠债忌,宜精神来往,不利金钱物质来往.若 来往易损财。字 四化(禄、科):相处不错,好客喜广交朋友,四海之内皆兄弟与姐妹。八感数 四化(权):多争执,喜管束兄弟。辰忌 逢自化(禄、权、科、忌):兄弟易反抗,不领情。兄弟易有损或灾厄。曜 生年忌、命宫之化忌或业障忌入兄友线为欠债忌壬聚 易水四 三、命宫四化入夫妻宫:官土 四化(忌):亏欠对方,多余的关心。爱惜太太,不重事业重夫妻,易有口角。爻星水 四化(禄、科):相处不错,互相尊重。禄为给对方,科偏向惜情,珍惜对方。亥午寅 四化(权):主争执,喜管束对方,给对方施压力。爻主 对方逢自化(禄、权、科、忌):对方不领情,不理会,不接受,初恋不易结合。爱四 自化(权)::主观强,不认输,喜管束配偶。婚六 自化(禄、科):较乐天。婚主 自化(忌):对象想不开,跟自己过不去。六 微喜 四、命宫四化入子女宫:巳婚 四化(忌):关心子女,欠子女债(冲财库,自损财库)。欠桃花债(自找桃花)。不宜股东,与子女不 易沟通(第一胎加强)。运午 夫忌:主纠缠不清,像磁铁一样。数辰 夫业障忌:犯桃花,易有是非,生年忌也一样。命运丑 子女宫化进来为桃花别人找进来的,外来桃花。八壬卯 命宫四化入于女宫为自找桃花。三壬 四化(禄、科):与子女相处不错,互相尊重,生年四化也一样。重交际应酬,公共关系比较好,适合做 公关行业。例如:歌影业,餐厅。命 四化(权):管束子女,不易沟通,易虐待子女。主张以柔克刚。情喜申 权:主占有欲强,遇人不淑,来势凶凶易受到伤害。酉 四化(权、忌):不利子女,而且不宜股东,易争权争利,公关易争势,逢擎羊加强。易有灾厄,本人也要注意下体血光开刀。(权:股东争权、忌:股东损财)生年一样权忌解,加业障忌一样。申 逢自化(禄、权、科、忌):子女反抗心强;女性注意流产、妇女病。男性注意性病、下体开刀。逢擎羊 星加强。斗辰 主亥金

个人事业成功因素分析

多种因素对个人事业成功的作用分析 科技大学经济管理学院商福志 摘要:随着经济的快速发展现在的年轻人变得越来越浮躁,其原因有多种因素, 如:社会因素、教育因素、家庭因素等等。很多年轻人都想在事业或工作中有所作为,但对于成功的方法及成功的影响因素各个学者专家都有独到的见解。本文通过对个人的事业成功的影响因素应用DEMATEL方法做科学的分析。采用Matalab 软件进行数学分析,解析成功的因素的重要程度,以达到对个人事业的规划起到指导作用。 关键字:DEMATEL;年轻人;事业成功因素;Matalab;系统工程。 一、绪论 本文就现在大学生学习兴趣低,对人生缺少合理的规划。学生从开始上大学时雄心勃勃到最后离开学校时的万念俱灰等现象进行观察总结得出一些结论。(由于主观因素影响很大,仅供参考由于不合理的运用大学时光的导致没有完成学业、没有学到自己感兴趣的东西,或者没有从事自己感兴趣的行业。如果没有正确的引导就会产生心理障碍,甚至走上犯罪的道路。本文的目的就在于给大学生的大学生活的合理规划提供依据,或者指导学生学会运用课堂知识和科学的方法解决自己人生中的重大问题及生活中遇到的难题。 二、DEMATEL方法介绍 DEMATEL(Decision making trial and evaluation laboratory,决策实验室法是起源于20 世纪七十年代初期日瓦研究中心Battelle 协会,其应用非常广泛,包括企业规划与决策、城市规划设计、地理环境评估、全球问题分析、市场营销、在线评估、控制系统和安全问题等领域。该方法可以有效地确认准则或元素之间的因果关系及相互影响的程度。DEMATEL 架构及运算步骤如下图所示

gcc编译器的下载和安装教程_华清远见

gcc编译器的下载和安装教程 今天分享的教程是gcc编译器的下载和安装教程,大家可以跟着教程一起来实现他! Linux下变成的源码要运行,必须先转成二进制的机器码。此时就需要编译器,Linux系统下的Gcc(GNU C Compiler)是GNU推出的功能强大、性能优越的多平台编译器,是GNU的代表作品之一。gcc是可以在多种硬体平台上编译出可执行程序的超级编译器,其执行效率与一般的编译器相比平均效率要高20%~30%。 Gcc编译器能将C、C++语言源程序通过编译、连接成可执行文件,如果没有给出可执行文件的名字,gcc将生成一个名为a.out的文件。 比如,下面这段源码(文件名叫做test.c)。 #include int main(void) { printf("Hello, world!\n"); return 0; } 编译则使用gcc命令,gcc命令提供了非常多的命令选项。 一. 常用编译命令选项 假设源程序文件名为test.c。 1. 无选项编译链接 用法:#gcc test.c 作用:将test.c预处理、汇编、编译并链接形成可执行文件。这里未指定输出文件,默认输出为a.out,如果需要执行,内核中必须支持该文件的格式,默认一般都是elf可执行程序 2. 选项 -o 用法:#gcc test.c -o test 作用:将test.c预处理、汇编、编译并链接形成可执行文件test。-o选项用来指定输出文件的文件名。 3. 选项 -E

用法:#gcc -E test.c -o test.i 作用:将test.c预处理输出test.i文件,预处理其实就是处理#预处理符号,比如#include, #define, #if, #ifdef, #error等 4. 选项 -S 用法:#gcc -S test.i 作用:将预处理输出文件test.i汇编成test.s文件。汇编语言对应汇编指令,默认gcc编译成x86指令,如果需要编译arm架构的,就必须使用交叉工具链 5. 选项 -c 用法:#gcc -c test.s 作用:将汇编输出文件test.s编译输出test.o文件,二进制文件就是101010机器码 6. 无选项链接 用法:#gcc test.o -o test 作用:将编译输出文件test.o链接成最终可执行文件test。 如果需要修改Ubuntu的gcc版本,可以看一下你的Ubuntu安装了哪些版本的gcc 用命令:ls /usr/bin/gcc* -l 显示是 lrwxrwxrwx 1 root root 7 2017-08-14 15:17 /usr/bin/gcc -> gcc-4.6 -rwxr-xr-x 1 root root 302104 2017-09-17 05:43 /usr/bin/gcc-4.6 由上面显示可以看出默认安装的是gcc-4.6,现在来改成gcc-4.7 $ sudo apt-get install gcc-4.7 $ sudo apt-get install g++-4.7 删除gcc-4.6的软连接文件/usr/bin/gcc。(只是删除软连接) 命令:sudo rm /usr/bin/gcc 然后建一个软连接,指向gcc-4.7。 命令:sudo ln -s /usr/bin/gcc-4.7 /usr/bin/gcc 然后可以通过命令:gcc -v 查看版本

宫干四化法—命宫四化

宫干四化法<命宫四化> 楼主侯健羽Grease2010-12-20 15:46 1四化飞星基本分自化、化入、化出。 2四化入命宫、官禄、财帛、田宅宫为化入。 如:化禄入以上四宫位主赚钱。 化权入以上四宫主有实权。 化科入以上四宫主有贵人现。 化忌入以上四宫主守财。 官禄宫化忌入田宅宫为化入,主投资,但赚钱少,且劳碌。 财帛宫化忌入官禄为化入,主投资,但不一定赚钱。 财帛宫化忌入田宅宫为化入,主守财、节俭。 3四化入兄、夫、子、疾、迁、奴、福、父等宫位为化出。 化禄入以上宫位为化出,守财不住。 化权入以上宫位为化出,主喜争权,易有纠纷。 化科入以上宫位为化出,主贵人不现。 化忌入以上宫位为化出,主损财。 财帛宫化忌入子女宫为化出,主投资,但不一定赚钱。 财帛宫化忌入迁移为化出,主在外赚钱难,不顺。 4四化飞星注意三方四正。 三方.,官禄、财帛、迁移宫。 四正..命宫合三方称三方四正。 命宫、子女宫、迁移宫、田宅宫,亦称四正位。 四正位..代表驿马、变动。 迁移宫化忌入子女,为驿马,冲田宅宫主出国、外出。 命宫四化飞星--化禄 1命宫自化禄人缘佳,个性较独立,智慧亦较高。 2命宫化禄入兄弟宫有兄弟,与兄弟较有缘分,靠兄弟之助成功。3命宫化禄入夫妻宫婚姻缘早,异性朋友较多。 4命宫化禄入子女宫有子女、疼子女,可得贵子。

5命宫化禄入财帛宫赚钱容易,靠自己努力赚钱,且易有偏财运。6命宫化禄入疾厄宫为人较乐观,易有惰性。 7命宫化禄入迁移宫在外人缘佳、贵人多、赚钱机会多,在外得意。8命宫化禄入奴仆宫在外朋友多、交际应酬亦多,朋友帮助大。 9命宫化禄入官禄宫工作轻松薪水高,创业较能赚钱。 10命宫化禄入田宅宫家庭环境佳,布置豪华,且有祖业。 11命宫化禄入福德宫多享受,老运好,福泽佳。 12命宫化禄入父母宫有长辈缘,赏赐、提拔。 命宫四化飞星--化权 1命宫自化权个性强、喜掌权、聪明能干。 2命宫化权入兄弟宫有兄弟,互为争权,意见较多。 3命宫化权入夫妻宫互为争权,意见较多。 4命宫化权入子女宫子女多、个性较强,管子女较严。 5命宫化权入财帛宫掌财,主创业,适合做生意。 6命宫化权入疾厄宫少年多灾,调皮,桃花多,性欲强。 7命宫化忌入迁移宫在外不顺,变化性大,多做少成。 8命宫化忌入官禄宫为事业操心忙碌,工作时间多,所得少。 9命宫化忌入奴仆宫朋友相处不佳,无法帮助。 10命宫化忌入田宅宫守财奴、祖业不丰,家内凌乱。 11命宫化忌入福德宫福德差、享受少、劳碌。 12命宫化忌入父母宫父母缘薄、身体多灾、欠佳。

gcc语言编译原理_CompilingBinaryFilesUsingACompiler

Making plain binary?les using a C compiler(i386+) Cornelis Frank April10,2000 I wrote this article because there isn’t much information on the Internet concerning this topic and I needed this for the EduOS project. No liability is assumed for incidental or consequential damages in connection with or arising out of use of the information or programs contained herein. So if you blow up your computer because of my bad“English”that’s your problem not mine. 1Which tools do you need? An i386PC or higher. A Linux distribution like Red Hat or Slackware. GNU GCC compiler.This C compiler usually comes with Linux.To check if you’re having GCC type the following at the prompt: gcc--version This should give an output like: 2.7.2.3 The number probably will not match the above one,but that doesn’t really matter. The binutils for Linux. NASM Version0.97or higher.The Netwide Assembler,NASM,is an80x86assembler designed for portability and modularity.It supports a range of object?le formats,including Linux‘a.out’and ELF,NetBSD/FreeBSD,COFF,Microsoft16-bit OBJ and Win32.It will also output plain binary?les.Its syntax is designed to be simple and easy to understand, similar to Intel’s but less complex.It supports Pentium,P6and MMX opcodes,and has macro capability. Normally you don’t have NASM on your system.Download it from: https://www.doczj.com/doc/6f6547574.html,/pub/Linux/devel/lang/assemblers/ A text editor like pico or emacs.

就业指导与创业基础考试答案.doc

就业指导与创业基础考试答案 本文制作来自于蓝色幽梦 1,以下哪位同学的学习、生活习惯是大学生应该培养的? A.小a平时很少学习,考试前拼命熬夜 B.小b晚睡晚起,据说每月可以省几十块的早饭钱 C.小c忙于学习,几乎不去运动健身 D.小d每月都制订生活开销计划 正确答案:D 2,寻找实习兼职的机会,也要讲究策略和方法,提高命中率,达到更好的效果。下列哪一项描述是错误的: A.选择实习兼职应该尽可能地贴近专业瞄准职业选择实习岗位。 B.只要有实习或者兼职机会,都不要放弃,尽可能多地尝试多种实习兼职。 C.要结合个人职业目标和定位选择合适的实习与兼职。 D.实习或者兼职过程中,要注意考察单位,熟悉职场环境,及时作出调整。 正确答案:B 3,每个大学生都希望能找到挚友,彼此在生活、学习、工作、事业等各方面互助共进。但深厚友谊的建立需要一定的基础,对此,你认为下列说法正确的是: A.共同的思想和志向是友谊的前提 B.共同的兴趣爱好是友谊的催化剂 C.诚实守信是友谊的保证 D.以上说法都正确 正确答案:D 4,大学阶段短暂而重要,在这个人生的关键时期,如果不做好自己的职业生涯设计,以后将要花费更多的时间与金钱来弥补。因此,作为新时期的大学生,一定要具有强烈的职业生涯设计的意识,在知己的基础上,审时度势,规划自己的职业生涯,确立自己的职业目标。以上说法你认为: A.正确

B.错误 正确答案:A 5,职业生涯规划的重要环节和流程是: A.知己、知彼、计划、评估 B.知己、知彼、决策、行动 C.知己、知彼、评估、决策 D.知己、知彼、行动、评估 正确答案:B 6,职业生涯规划的影响要素有: A.国家、区域的政治、经济、文化环境 B.目标行业前景和企业组织环境 C.个人的职业兴趣、职业能力和职业价值观 D.以上均是 正确答案:D 7,市场前景广阔,具有强大的生命力,以技术的突破创新带动企业发展,代表未来发展的趋势,一定条件下可演变为主导产业甚至支柱产业,我们将这种产业称为: A.朝阳产业 B.夕阳产业 C.创新产业 D.高薪产业 正确答案:A 8,就业政策是国家在一定的历史条件和阶段,为促进经济发展和社会进步,创造劳动者就业条件,扩大就业机会所制定的行为准则,它包括: A.就业指导思想、指导原则

gcc命令行详解

gcc命令行详解 1、gcc包含的c/c++编译器 gcc、cc、c++、g++ gcc和cc是一样的,c++和g++是一样的,一般c程序就用gcc编译,c++程序就用g++编译 2、gcc的基本用法 gcc test.c这样将编译出一个名为a.out的程序 gcc test.c -o test这样将编译出一个名为test的程序 -o参数用来指定生成程序的名字 3、为什么会出现undefined reference to 'xxxxx'错误? 首先这是链接错误,不是编译错误,也就是说如果只有这个错误,说明你的程序源码本身没有问题,是你用编译器编译时参数用得不对,你没有指定链接程序要用到得库,比如你的程序里用到了一些数学函数,那么你就要在编译参数里指定程序要链接数学库,方法是在编译命令行里加入-lm 4、-l参数和-L参数 -l参数就是用来指定程序要链接的库,-l参数紧接着就是库名,那么库名跟真正的库文件名有什么关系呢?-lname,在连接时,装载名字为“libname.a”的函数库:-lm表示连接名为“libm.a”的数学函数库。就拿数学库来说,他的库名是m,他的库文件名是libm.so,很容易看出,把库文件名的头lib和尾.so去掉就是库名了 好了现在我们知道怎么得到库名,当我们自已要用到一个第三方提供的库名字libtest.so,那么我们只要把libtest.so拷贝到/usr/lib里,编译时加上-ltest参数,我们就能用上libtest.so库了(当然要用libtest.so库里的函数,我们还需要与libtest.so配套的头文件) 放在/lib和/usr/lib和/usr/local/lib里的库直接用-l参数就能链接了,但如果库文件没放在这三个目录里,而是放在其他目录里,这时我们只用-l参数的话,链接还是会出错,出错信息大概是:“/usr/bin/ld: cannot find -lxxx”,也就是链接程序ld在那3个目录里找不到libxxx.so,这时另外一个参数-L就派上用场了,比如常用的X11的库,它在/usr/X11R6/lib目录下,我们编译时就要用-L/usr/X11R6/lib -lX11参数,-L参数跟着的是库文件所在的目录名。再比如我们把libtest.so放在/aaa/bbb/ccc目录下,那链接参数就是 -L/aaa/bbb/ccc -ltest 另外,大部分libxxxx.so只是一个链接,以RH9为例,比如libm.so它链接到/lib/libm.s o.x,/lib/libm.so.6又链接到/lib/libm-2.3.2.so, 如果没有这样的链接,还是会出错,因为ld只会找libxxxx.so,所以如果你要用到xxxx 库,而只有libxxxx.so.x或者libxxxx-x.x.x.so,做一个链接就可以了 ln -s libxxxx-x.x.x.so libxxxx.so 手工来写链接参数总是很麻烦的,还好很多库开发包提供了生成链接参数的程序,名字一般叫xxxx-config,一般放在/usr/bin目录下,比如 gtk1.2的链接参数生成程序是gtk-config,执行gtk-config --libs就能得到以下输出"- L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic

宫干四化法

宫干四化法<疾厄宫四化> 疾厄宫四化飞星--化禄 1疾厄宫化禄入命宫有人缘、乐观、身体佳。 2疾厄宫化禄入兄弟宫与兄弟有缘,感情佳。 3疾厄宫化禄入夫妻宫夫妻感情佳,疼爱妻(夫)子,性生活多。 4疾厄宫化禄入子女宫与子女缘佳,疼子女,且性生活多,没节制。 5疾厄宫化禄入财帛宫财运佳,钱赚得轻松,较有长辈贵人助。 6疾厄宫自化禄为人乐观,不计较。 7疾厄宫化禄入迁移宫在外人缘佳,朋友多,喜玩乐。 8疾厄宫化禄入奴仆宫与朋友缘佳,朋友多,且桃花较多。 9疾厄宫化禄入官禄宫工作轻松愉快,同事间相处和睦。 10疾厄宫化禄入田宅宫有财运、身体佳,在家平顺。 11疾厄宫化禄入福德宫人缘佳,福泽好,且身体佳。 12疾厄宫化禄入父母宫与长辈有缘分,贵人多,在外得意。 疾厄宫四化飞星--化权 1疾厄宫化权入命宫个性强,少年多灾。 2疾厄宫化权入兄弟宫与兄弟会有意见,会管兄弟。 3疾厄宫化权入夫妻宫夫妻感情佳,性欲多,但较会管配偶,常有意见。4疾厄宫化权入子女宫与子女缘佳,管子女,且性生活多,没节制。 5疾厄宫化权入财帛宫赚钱较忙碌,钱的欲望大,较劳心。 6疾厄宫自化权个性强且古怪、早熟。 7疾厄宫化权入迁移宫在外忙碌,人缘佳,与朋友较有意见。 8疾厄宫化权入奴仆宫与朋友缘佳,想交更多的朋友。 9疾厄宫化权入官禄宫工作较劳心,责任感重,管部属同事。 10疾厄宫化权入田宅宫财欲望高,在家掌权。 11疾厄宫化权入福德宫人缘好,能力强,但劳碌劳心,且多灾。 12疾厄宫化权入父母宫有长辈适时帮助,在外常有意见纠纷。 疾厄宫四化飞星--化科 1疾厄宫化科入命宫人缘佳,乐观,身心愉快。 2疾厄宫化科入兄弟宫与兄弟感情交往,适可而止。 3疾厄宫化科入夫妻宫与配偶感情不和谐。 4疾厄宫化科入子女宫与子女缘佳,疼子女,且性生活多,但有节制。5疾厄宫化科入财帛宫钱财平顺,量入为出。 6疾厄宫自化科身体佳,风度好,病有良医。 7疾厄宫化科入迁移宫在外人缘佳与朋友交往适可而止,在外平安。 8疾厄宫化科入奴仆宫择友而交,无损友。 9疾厄宫化科入官禄宫工作轻松,同事相处融冾。 10疾厄宫化科入田宅宫在家平顺,钱财量入为出。 11疾厄宫化科入福德宫人缘佳、身体亦佳,有贵人。 12疾厄宫化科入父母宫与长辈相处融洽,有长辈贵人,在外平顺。 疾厄宫因化飞星--化忌 1疾厄宫化忌入命宫身体差,与朋友交往损害到自己身体。

1、GCC编译器的使用

linux下gcc编译器的使用 1、文件后缀名 .c C 源程序 .C C++ 源程序 .cc C++ 源程序 .cxx C++ 源程序 .m Objective –C源程序 .i 预处理过的c源程序 .ii 预处理过的C++源程序 .s 组合语言源程序 .S 组合语言源程序 .h 头文件 .o 目标文件 .a 存档文件 2、GCC常用选项 -c 通知GCC取消链接步骤,即编译源码并在最后生成目标文件; -Dmacro定义指定的宏,使它能够通过源码中的#ifdef进行检验 #define -static 指定程序编译时采用静态编译的方法; -E 不经过编译预处理程序的输出而输送至标准输出; -g获得有关调试程序的详细信息,它不能与-o选项联合使用; -Idirectory在包含文件搜索路径的起点处添加指定目录; -llibrary提示链接程序在创建最终可执行文件时包含指定的库; -O、-O2、-O3将优化状态打开,该选项不能与-g选项联合使用; -S要求编译程序生成来自源代码的汇编程序输出; -v启动所有警报; -Wall发生警报时取消编译操作,即将警报看作是错误; -Werror在发生警报时取消编译操作,即把报警当作是错误; -w 禁止所有的报警。 目前Linux下最常用的C语言编译器是GCC(GNU Compiler Collection),它是GNU项目中符合ANSI C标准的编译系统,能够编译用C、C++和Object C等语言编写的程序。GCC不仅功能非常强大,结构也异常灵活。最值得称道的一点就是它可以通过不同的前端模块来支持各种语言,如Java、 Fortran、Pascal、Modula-3和Ada等。开放、自由和灵活是Linux的魅力所在,而这一点在GCC上的体现就是程序员通过它能够更好地控制整个编译过程。

职业生涯规划的七个关键点

职业生涯规划的七个关键点 就业市场存在的一个较为矛盾的现象值得关注,这就是:一方面,上百万高校学生毕业后找不到理想的职业,另一方面,越来越多的用人单位找不到需要的人才;一方面,MBA、工商管理类、金融类、计算机类等不少专业的毕业生感叹社会不需要他们,另一方面,微软从12万多份简历中选不出需要的百人,深圳16万年薪聘不到合适的钳工……这种尴尬局面的出现,除社会、学校、用人单位的原因之外,一个极其重要的原因是很多学生在选择自己的人生道路和职业方向时出现了偏差和失误。 职业生涯是一个人一生中所有与职业相联系的行为与活动,以及相关的态度、价值观、愿望等的连续性经历的过程,也是一个人一生中职业、职位的变迁及工作理想的实现过程。职业生涯规划则是针对决定个人职业选择的主观和客观因素进行分析和测定,确定个人的奋斗目标并选择实现这一目标的职业。职业生涯规划要求你根据自身的兴趣、特点,将自己定位在一个最能发挥自己长处的位置,选择最适合自己能力的事业。从这个意义上来说,最初的专业选择和最初的职业选择最为关键。 从专业选择开始 这一阶段是一个人完成基础的高中或初中学习,准备进入大学或职业学校,选择某一特定专业学习,为今后做职业准备的阶段,因而这一阶段也可称为职业准备阶段。这是个人职业生涯的起步阶段,

是决定能否赢在起点的重要阶段,是人生的第一个转折点。虽然一个人最初选择的专业并不代表他未来的职业,但在经过职业生涯规划基础上的有针对的选择,会为人一生的事业奠定基础,如果你未来的职业和所学专业一致的话,那么你的职业将更加稳定和有发展前途,其职业生涯将更精彩。所以处在初高中阶段的学生,就必须开始规划自己的职业生涯其核心就是根据自己的现状,确定是沿着提高职业技能的方向发展还是上大学。对个人而言,既符合自己的能力特点、为自己兴趣所在,又是社会所需要的专业方向是较为理想的选择。在选择的过程中,应弄清楚下列问题。 想干什么?未来希望干什么? 西方有一句谚语职业选择三点论 这一阶段是一个人完成大学或职业学校专业的学习,准备选择职业的阶段,因而这一阶段也可称为职业选择期。这一阶段的主要特征,是从学校走上工作岗位,它是人生事业发展的起点。如何起步,直接关系到今后的成败。俗话说:女怕嫁错郎,男怕入错行,后半句指的就是职业定位。只有弄清楚了市场需要什么,自己想干什么,自己能干什么等等这些问题,才能定位自己的职业方向,从而找到自己喜欢的工作。好高骛远,只会是一事无成;妄自菲薄,终将悔恨终身。这一阶段生涯规划的核心内容就是在充分做好自我评价和内外环境分析的基础上,选择适合自己的职业与自己兴趣、能力匹配,与所学专业领域方向一致、符合自己职业发展方向的理想职业。要达到这一理想目标,应注意以下几点:

linux 编译器gcc

1.8 Linux 上的C/C++ 编译器和调试器 https://www.doczj.com/doc/6f6547574.html,/man/linux_tsinghua/compiler.html ?运行 gcc/egcs ?gcc/egcs 的主要选项 ?gdb ?gdb 的常用命令 ?gdb 使用范例 ?其他程序/库工具 (ar, objdump, nm, size, strings, strip, ...) 1.8.1 运行 gcc/egcs Linux 中最重要的软件开发工具是 GCC。GCC 是 GNU 的 C 和 C++ 编译器。实际上,GCC 能够编译三种语言:C、C++ 和 Object C(C 语言的一种面向对象扩展)。利用 gcc 命令可同时编译并连接 C 和 C++ 源程序。 #DEMO#: hello.c 如果你有两个或少数几个 C 源文件,也可以方便地利用 GCC 编译、连接并生成可执行文件。例如,假设你有 两个源文件 main.c 和 factorial.c 两个源文件,现在要编译生成一个计算阶乘的程序。 清单 factorial.c ----------------------- #include #include int factorial (int n) { if (n <= 1) return 1; else return factorial (n - 1) * n; } ----------------------- ----------------------- 清单 main.c ----------------------- #include #include

实验三 vi编辑器及GCC编译器的使用

实验三vi编辑器及GCC编译器的使用 【实验目的】 一、掌握文本编辑器vi的使用方法 二、了解GNU gcc编译器 三、掌握使用GCC编译C语言程序的方法 【实验内容】 一、vi的三种工作模式: 1、命令模式: 执行相关文本编辑命令 2、输入模式: 输入文本 3、末行模式: 实现查找、替换、保存、多文件操作等等功能 二、进入vi,直接在Shell提示符下键入vi [文件名称],如果该文件在当前目录不存在,则vi创建之。 三、退出vi 1、在命令模式下输入“: wq”,保存文件并退出vi 2、若不需要保存文件,输入“: q” 3、若文件已修改,但不保存,输入“:

q!”强制退出vi 4、其它一些不常用的方法在此省略。 四、命令模式下的常用编辑命令 1、启动vi后,进入的是vi的命令模式 2、按i键,进入输入模式,可以进行文本的编辑,在输入模式下,按esc 键,可切换回命令模式 i: 光标位置不变,可在光标左侧插入正文 a: 光标位置向后退一格,可在光标左侧插入正文 o: 在光标所在行的下一行增添新行 O: 在光标所在行的上一行增添新行 I: 光标跳到当前行的开头 A: 光标跳到当前行的末尾 3、光标的移动 k、j、h、l分别等同于上、下、左、右箭头键 Ctrl+b,向上翻一页

Ctrl+f,向下翻一页 nH,将光标移到屏幕的第n行 nL,将光标移到屏幕的倒数第n行 4、删除文本 nX,删除光标所指向的后n个字符 D,删除光标右侧的所有字符(包括光标所指向的字符)db,删除光标左侧的全部字符 ndd,删除当前行和当前行以后的n行内容 5、粘贴和复制 p,将缓冲区的内容粘贴到当前字符的右侧 P,将缓冲区的内容粘贴到当前字符的左侧 yy,复制当前行到内存缓冲区 nyy,复制n行内容到内存缓冲区 6、搜索字符串 /str1,正向搜索字符串str1 n,继续搜索 ?str2,反向搜索字符串str2 7、撤销和重复 u,撤销前一条命令的执行结果 .,重复最后一条命令

班组管理

羊场湾煤矿机电二队推出班组管理新方法 编辑:郝华来源:本网更新时间:[ 2010-04-28 09:21:08 ] “四化六法八准则”夯实班组安全管理屏障 为进一步加强班组建设,今年以来,神宁集团羊场湾煤矿机电二队在8个班组中深入开展“学习白国周事迹、应用白国周班组管理法”活动,各班组掀起了学习先进管理方法、追求安全管理新境界的热潮。羊场湾煤矿机电二队在实践中总结、在总结中提炼,并总结出了“四化六法八准则”班组安全管理新方法。 “四化”:班组精细管理应做到工作质量标准化、设备设施标示化、材料堆放顶置化、质量责任档案化。 “六法”:班组安全宣传教育“三融、四到、五性”法;班组员工在工作中做到“三严六转”法;班组人本安全管理“三”字法;班组长管理班组员工“五忌”法;班组本安走动管理“六”查法;班组安全管控“七”法。 所谓“三融”,包括“融理于教”和“融情于教”、“融乐于教”。“融理于教”,即从正面向班组员工灌输安全生产的法规,理清安全与生产、安全与效益、安全与

个人家庭幸福的关系。“融情于教”,即班组在安全宣传过程中注意以情动人、以情感人,如组织员工开展“话安全、诉心声”座谈活动,以血的教训向广大员工宣传安全的重要性。“融乐于教”,即用危险源亲情提示、安全谚语等形式进行宣传。 所谓“四到”,即安全宣传工作到井口、到班组、到工作地点、到员工心中,并充分利用从员工更衣室到队会议室之间的一段路程,组织员工排队高喊“安全生产从我做起、远离‘三违’我要安全”的口号,同时定期开展“安全宣传日”活动,以造成强大声势。 所谓“五性”,即针对性、及时性、实用性、季节性、独特性。针对性就是对所有从事井下作业的人员按工种分类进行安全培训;及时性是及时对“三违”人员进行“过六关”安全技术培训;实用性是结合实际对员工进行现场作业措施等知识培训;季节性是针对节假日搞好宣传,做好收心工作,稳定员工情绪;独特性是制定出让员工接受的宣传规划,独特、鲜明且能深入人心。 班组员工在工作中做到“三严六转”法。“三严”:即严格按规程措施作业;严格按操作程序作业;严格按安全质量标准化要求作业,永远做到“干标准活、干放心活”。“六转”:即本人的安全目标由“零事故”向“零违章”转变;现场的安全质量由“静态”向“动态”转变;现场的安全管理由“事后分析”向“超前预防”转变;本

linux系统下C编译器GCC入门

linux系统下C编译器— gcc 入门 <一>gcc简介 Linux系统下的gcc(GNU C Compiler)是GNU推出的功能强大、性能优越的多平台编译器,是GNU的代表作品之一。gcc是可以在多种硬体平台上编译出可执行程序的超级编译器,其执行效率与一般的编译器相比平均效率要高20%~30%。gcc编译器能将C、C++语言源程序、汇程式化序和目标程序编译、连接成可执行文件,如果没有给出可执行文件的名字,gcc将生成一个名为 a.out的文件。在Linux系统中,可执行文件没有统一的后缀,系统从文件的属性来区分可执行文件和不可执行文件。而gcc则通过后缀来区别输入文件的类别,下面我们来介绍gcc所遵循的部分约定规则。 .c为后缀的文件,C语言源代码文件; .a为后缀的文件,是由目标文件构成的档案库文件; .C,.cc或.cxx 为后缀的文件,是C++源代码文件; .h为后缀的文件,是程序所包含的头文件; .i 为后缀的文件,是已经预处理过的C源代码文件; .ii为后缀的文件,是已经预处理过的C++源代码文件; .m为后缀的文件,是Objective-C源代码文件; .o为后缀的文件,是编译后的目标文件; .s为后缀的文件,是汇编语言源代码文件; .S为后缀的文件,是经过预编译的汇编语言源代码文件。 <二>gcc的执行过程 虽然我们称gcc是C语言的编译器,但使用gcc由C语言源代码文件生成可执行文件的过程不仅仅是编译的过程,而是要经历四个相互关联的步骤∶预处理(也称预编译,Preprocessing)、编译(Compilation)、汇编(Assembly)和连接(Linking)。命令gcc首先调用cpp进行预处理,在预处理过程中,对源代码文件中的文件包含(include)、预编译语句(如宏定义define等)进行分析。接着调用cc1进行编译,这个阶段根据输入文件生成以.o为后缀的目标文件。汇编过程是针对汇编语言的步骤,调用as进行工作,一般来讲,. S为后缀的汇编语言源代码文件和汇编,.s为后缀的汇编语言文件经过预编译和汇编之后都生成以.o为后缀的目标文件。当所有的目标文件都生成之后,gcc就调用ld来完成最后的关键性工作,这个阶段就是连接。在连接阶段,所有的目标文件被安排在可执行程序中的恰当的位置,同时,该程序所调用到的库函数也从各自所在的档案库中连到合适的地方。 <三>gcc的基本用法和选项 在使用gcc编译器的时候,我们必须给出一系列必要的调用参数和文件名称。g cc编译器的调用参数大约有100多个,其中多数参数我们可能根本就用不到,这里只介绍其中最基本、最常用的参数。

《Linux操作系统》实验十-UNIX gcc编译器的使用与编程环境

《Linux操作系统》 实验报告 实验十:UNIX gcc编译器的使 用与编程环境

一、实验目的 (1)掌握gcc和g++的用法; (2)了解目标代码、库函数的使用; (3)掌握静态库和共享库的构造与使用; (4)掌握多模块和多语言联合开发方法; (5)掌握make命令和Makefile文件的使用。 二、实验环境 一台装有Windows操作系统PC机,上装有虚拟机系统VMWare,实验过程通过VMWare系统启Linux系统工作。 三、实验内容与实验过程及分析 一、C/C++编程 1、C语言版“Hello World” 用vi编辑一个名为hello.c的文件,其内容为 #include main() { printf(”Hello World! C\n”); } 编译并执行程序。 编译方法为: cc hello.c // 生成可执行程序 a.out cc –o hello hello.c // 生成可执行程序hello cc –c hello.c //生成目标文件hello.o cc –S hello.c //生成汇编语言程序hello.s 执行程序: ./a.out #执行当前目录内,刚编译生成的a.out程序 ./hello #执行当前目录内,刚编译生成的hello程序

2、组合编程 设有C语言文件f1.c,内容为: #include f1(int arg){ printf(”f1: you passed %d\n”,arg); } C语言文件f2.c。内容为: #include f2(char *arg){ printf(”f2: you passed %s\n”,arg); } C语言文件m.c。内容为: #include main(){ f1(16); f2(”Hello World!”); } 请使用vi编辑并生成以上程序,分别用以下方法编译,观察生成文件或运行生成的可执行程序: cc –c f1.c f2.c #生成 f1.o 和 f2.o cc –S f1.c f2.c # 生成 f1.s 和 f2.s;可用vi或cat查看它们的内容cc –o mp m.c f1.c f2.c # 生成mp,执行方法为:./mp cc –o m m.c f1.o f2.o # 生成m,执行方法为:./m

《领导胜任力提升》中试题及答案

领导胜任力提升》中试题及答案 判断 第 1 题. 兴趣对提高人的工作效率并没有帮助。 A. 正确 B. 错误标准答案:B 第 2 题. 物质需要的满足是长期的。 A. 正确 B. 错误标准答案:B 第 3 题. 清楚判断要达到何种目的的能力是目标管理需要的能力之一。 A. 正确 B. 错误标准答案:A 第 4 题. 清晰的自我意识是品尝快乐的根源。 A. 正确 B. 错误标准答案:A 第 5 题. 自我的三个层面物质自我、社会自我、精神自我。 A. 正确 B. 错误标准答案:A 第 6 题. 事业成功源于兴趣。 A. 正确 B. 错误标准答案:A 第7 题. 健康心态是影响领导胜任力的关键心理因素之一。 A. 正确 B. 错误标准答案:A 第8 题. 成就动机是一种重要的社会性动机,它对个体的工作和学习都有很大的推动作用。 A. 正确 B. 错误标准答案:A 第9 题. 坚持不懈是卓越领导的要素之一。 A. 正确 B. 错误标准答案:A 第10 题. 从个体的角度而言,成就动机是一个人在社会化过程中逐渐形成的适应社会生活的重要素质。 A. 正确 B. 错误标准答案:A

单选 第 1 题. 从厅局级干部的选择频次上来看,选择频次较高的合作共事能力占() A. 10.04% B. 8.90% C. 7.32% D. 6.74% 标准答案:C 第 2 题. 从28 项能力要素的分布趋势上来看,解决实际问题的能力占() A. 7.38% B. 8.04% C. 7.29% D. 5.97% 标准答案:B 第 3 题. 从厅局级干部的选择频次上来看,选择频次较高的政治鉴别能力占() A. 10.04% B. 8.90% C. 7.32% D. 6.74% 标准答案:A 第 4 题. 厅局级领导干部关键品质提及频次最高的是()。 A. 公道正派 B. 务实精神 C. 责任心 D. 大局意识 标准答案:B 第 5 题. 以下不属于自我的三个层面的是()

最新GCC编译器选项及优化提示

G C C编译器选项及优 化提示

GCC编译器选项及优化提示 GCC编译器选项及优化提示2010-08-01 19:41很多弟兄可能都很关心如何优化编译自己的程序,虽然本人不赞成"骨灰"玩法,却也不得不承认这是掌握gcc的绝佳途径; 因此献上此帖,以供各位玩家参考,绝对原创噢 = 大多数程序和库在编译时默认的优化级别是"2"(使用gcc选项:"-O2")并且在Intel/AMD平台上默认按照i386处理器来编译。 如果你只想让编译出来的程序运行在特定的平台上,就需要执行更高级的编译器优化选项,以产生只能运行于特定平台的代码。 一种方法是修改每个源码包中的Makefile文件,在其中寻找CFLAGS和CXXFLAGS变量(C和C++编译器的编译选项)并修改它的值。 一些源码包比如binutils,gcc,glibc等等,在每个子文件夹中都有Makefile文件,这样修改起来就太累了! 另一种简易做法是设置CFLAGS和CXXFLAGS环境变量。大多数configure 脚本会使用这两个环境变量代替Makefile文件中的值。 但是少数configure脚本并不这样做,他们必须需要手动编辑才行。 为了设置CFLAGS和CXXFLAGS环境变量,你可以在bash中执行如下命令(也可以写进.bashrc以成为默认值): export CFLAGS="-O3-march="&&CXXFLAGS=$CFLAGS 这是一个确保能够在几乎所有平台上都能正常工作的最小设置。

"-march"选项表示为特定的cpu类型编译二进制代码(不能在更低级别的cpu上运行), Intel通常是: pentium2,pentium3,pentium3m,pentium4,pentium4m,pentium- m,prescott,nocona 说明:pentium3m/pentium4m是笔记本用的移动P3/P4;pentium-m是迅驰I/II代笔记本的cpu; prescott是带SSE3的P4(以滚烫到可以煎鸡蛋而闻名);nocona则是最新的带有EMT64(64位)的P4(同样可以煎鸡蛋) AMD通常是:k6,k6-2,k6-3,athlon,athlon-tbird,athlon-xp,athlon-mp,opteron,athlon64,athlon-fx 用AMD的一般都是DIYer,就不必解释了吧。 如果编译时没有抱怨"segmentation fault,core dumped",那么你设定的"-O"优化参数一般就没什么问题。 否则请降低优化级别("-O3"-"-O2"-"-O1"-取消)。 个人意见:服务器使用"-O2"就可以了,它是最安全的优化参数(集合);桌面可以使用"-O3"; 不鼓励使用过多的自定义优化选项,其实他们之间没什么明显的速度差异(有时"-O3"反而更慢)。 编译器对硬件非常敏感,特别是在使用较高的优化级别的时候,一丁点的内存错误都可能导致致命的失败。 所以在编译时请千万不要超频你的电脑(我编译关键程序时总是先降频然的)。

相关主题
文本预览
相关文档 最新文档