• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            華劍緣
            一切都在這個過程中獲得,將那些目標埋藏于心中
            posts - 19,comments - 20,trackbacks - 0
            /*
             * GridTest.h
             *
             *  Created on: 2009-2-27
             *      Author: Administrator
             
            */

            #ifndef GRIDTEST_H_
            #define GRIDTEST_H_

            class GridTest {
                
            static const int x=3,y=4;
            public:
                GridTest();

                
            virtual ~GridTest();
                typedef 
            int (GridTest:: *memberFuncType)(int x, int y);
                
            void display();
                
            int foreach(memberFuncType fn, int i, int j);
                
            int test1(int x, int y);
                
            int test2(int x, int y);
                
            int test3(int x, int y);
                
            int test4(int x, int y);
            };

            #endif /* GRIDTEST_H_ */



            /*
             * GridTest.cpp
             *
             *  Created on: 2009-2-27
             *      Author: Administrator
             
            */

            #include 
            "GridTest.h"
            #include 
            <iostream>
            using namespace std;

            GridTest::GridTest() {
                
            // TODO Auto-generated constructor stub

            }


            GridTest::
            ~GridTest() {
                
            // TODO Auto-generated destructor stub
            }

            int GridTest::foreach(memberFuncType fn, int x, int y){
                cout
            <<"GridTest::foreach(memberFuncType fn, int x, int y)執(zhí)行了"<<endl;
                cout
            <<"fn(x,y)"<<(this->*fn)(x, y);
                
            return (this->*fn)(x, y);
            }

            int GridTest::test1(int x, int y){
                cout
            <<"GridTest::test1(int x, int y)執(zhí)行了!"<<endl;
                
            return 0;
            }
            int GridTest::test2(int x, int y){
                cout
            <<"GridTest::test2(int x, int y)執(zhí)行了!"<<endl;
                
            return 0;
            }
            int GridTest::test3(int x, int y){
                cout
            <<"GridTest::test3(int x, int y)執(zhí)行了!"<<endl;
                
            return 0;
            }
            int GridTest::test4(int x, int y){
                cout
            <<"GridTest::test4(int x, int y)執(zhí)行了!"<<endl;
                
            return 0;
            }
            void GridTest::display(){
                cout
            << this->foreach( this->test1, 4, 5); 
            //一直報錯:no matching function for call to `GridTest::foreach(<unknown type>, int, int)'
            }

            int main()
            {
                GridTest 
            *grid;
                grid
            = new GridTest();
                grid
            ->display();
                
            return 0;
            }

            這段代碼在VC6.0上就沒有問題,在Eclipse上編譯就報錯 no matching function for call to `GridTest::foreach(<unknown type>, int, int)'
            }
            posted @ 2009-03-09 17:14 華劍緣 閱讀(1593) | 評論 (5)編輯 收藏
            #include? " stdio.h "
            #include?
            " stdlib.h "
            typedef?
            struct
            {
            ?
            int ?number;
            ?
            int ?dicper;
            }
            ElemType;
            typedef?
            struct ?node
            {
            ?ElemType?data;
            ?
            struct ?node? * next;
            }
            Node, * LinkList;
            void ?Initiatte(LinkList? & L)
            {
            ?
            if ((L = (LinkList)malloc( sizeof (Node))) == NULL)exit( 1 );
            ?L
            -> next = L;
            }

            int ?Insert(LinkList? & L, int ?i,ElemType?x)
            {
            ?LinkList?q,p;
            ?p
            = L -> next;
            ?
            int ?j = 1 ;
            ?
            while (p != L? && ?j < i - 1 )
            ?
            {
            ??p
            = p -> next;
            ??j
            ++ ;
            ?}

            ?
            if (j != i - 1 ? && ?i != 1 )
            ?
            {
            ??printf(
            " 插入位置參數(shù)錯! " );
            ??
            return ? 0 ;
            ?}

            ?q
            = (LinkList)malloc( sizeof (Node));
            ?
            if ( ! q)exit( 1 );
            ?q
            -> data = x;
            ?q
            -> next = p -> next;
            ?p
            -> next = q;
            ?
            return ? 1 ;
            }

            int ?IsNotEmpty(LinkList?L)
            {
            ?
            if (L -> next == L) return ? 0 ;
            ?
            else ? return ? 1 ;
            }

            int ?Delete(LinkList? & p)
            {
            ?LinkList?q;
            ?q
            = p -> next;
            ?p
            -> next = p -> next -> next;
            ?free(q);
            ?
            return ? 1 ;
            }

            void ?output(LinkList? & L, int ?m)
            {
            ?LinkList?pre,q;
            ?pre
            = L;
            q
            = L -> next;
            ?
            while (IsNotEmpty(L) == 1 )
            ?
            {
            ??
            for ( int ?i = 1 ;i < m;i ++ )
            ??
            {
            ???pre;
            ???q
            = q -> next;
            ???
            if (q == L)
            ???
            {
            ????pre
            = q;
            ???q
            = q -> next;
            ???}

            ??}

            printf(
            " %d** " ,q -> data.number);
            ?m
            = q -> data.dicper;
            ?q
            = q -> next;
            ?
            if (q == L)q = q -> next;
            ?Delete(pre);
            ?}

            }

            int ?main()
            {
            ?
            int ?n;
            ?printf(
            " 請輸入人數(shù)的值:\n " );
            ?scanf(
            " %d " , & n);
            ?ElemType?
            * P;
            ?LinkList?L;
            ?Initiatte(L);
            ?
            int ?i,m;
            P?
            = ? new ?ElemType?[n];
            ?
            for (?i = 0 ;i < n;i ++ )
            ?
            {
            ?P[i].number
            = i + 1 ;
            ??printf(
            " 第%d個人輸入密碼 " ,i + 1 );
            ??printf(
            " \n " );
            ??scanf(
            " %d " , & P[i].dicper);
            ?}

            ??
            for (i = 1 ;i <= n;i ++ )
            ??Insert(L,i,P[i
            - 1 ]);
            ?printf(
            " 對m的數(shù)值進行初始化: " );
            ?scanf(
            " %d " , & m);
            ?printf(
            " 結(jié)果輸出: " );
            ?output(L,m);
            ?delete?[]?P;
            ?printf(
            " \n " );
            ?
            return ? 0 ;
            }


            12
            posted @ 2006-12-18 22:53 華劍緣 閱讀(251) | 評論 (0)編輯 收藏

            實驗一、Joseph問題

            ??? 問題描述 :約瑟夫(Joseph)問題的一種描述是:編號為12, 。。。,nn個人按順時針方向圍坐一圈,每人持有一個密碼(正整數(shù))。一開始任選一個正整數(shù)作為報數(shù)上限值m,從第一個人開始按順時針方向自1開始順序報數(shù),報到m時停止報數(shù)。報到m的人出列,將他的密碼作為新的m值,從他在順時針方向上的下一個人開始重新從1報數(shù),如此下去,直到所有人全部出列為止。試設(shè)計一個程序求出出列順序。

            這是我們數(shù)據(jù)結(jié)構(gòu)第一個實驗題目。大部分都用C語言寫。我用C++寫的,寫到一半編譯通過了,run的時候出了問題。還沒有寫完,只把用用到的類寫了出來。第一次這樣寫,不知道那里除了問題。

            代碼:

            ??1 #include? " iostream.h "
            ??2 // #include?"String.h"
            ??3
            ??4
            ??5
            ??6 class ?PersonList;
            ??7 class ?Joseph;
            ??8
            ??9 class ?Person {
            ?10 // friend?PersonList;
            ?11 private :
            ?12 ??? char ?num;
            ?13 ??? int ?value;
            ?14 ?? // ?Person?*next;
            ?15 public :
            ?16 ?Person? * next;
            ?17 ?Person();
            ?18 ????Person( char , int );
            ?19 ????Person(Person?? & A);
            ?20 }
            ;
            ?21
            ?22 Person::Person( char ?A, int ?Val)
            ?23 {
            ?24 ????num = A;
            ?25 ????value = Val;
            ?26
            ?27 }

            ?28 Person::Person(Person? & B)
            ?29 {
            ?30 ????num = B.num;
            ?31 ????value = B.value;
            ?32 ????next = B.next;
            ?33 }

            ?34 class ?PersonList {
            ?35 friend?Joseph;
            ?36 public :
            ?37 ????Person? * head, * tail;
            ?38 ? int ?sum;
            ?39 public :
            ?40 ????PersonList();
            ?41 ???? ~ PersonList();
            ?42 ???? void ?initialPL();
            ?43 ???? void ?insertPl(PersonList? & Pl,Person?x);
            ?44 ???? void ?DeleteBlPerson(Person?y);
            ?45 ???? bool ?NEmpty();
            ?46 }
            ;
            ?47
            ?48 PersonList::PersonList()
            ?49 {
            ?50 ?Person? * head = new ?Person;
            ?51 ?Person? * tail = head;
            ?52
            ?53 }

            ?54
            ?55 void ?PersonList::insertPl(PersonList? & PL,Person?x)
            ?56 {
            ?57 ????Person? * p = new ?Person(x);
            ?58 ????PL.tail -> next = p;
            ?59 ????PL.tail = p;
            ?60 ????PL.tail -> next = head;
            ?61
            ?62 }

            ?63 void ?PersonList::DeleteBlPerson(Person?y)
            ?64 {
            ?65 ????Person?p =* y.next;
            ?66 ?y.next = y.next -> next;
            ?67
            ?68 }

            ?69
            ?70
            ?71 class ?Joseph {
            ?72 private :
            ?73 ?PersonList?List;
            ?74
            ?75 public :
            ?76 ? char ? * JosephList;?? //用來存放輸出序列
            ?77 ?Joseph();
            ?78
            ?79
            ?80 }
            ;
            ?81
            ?82 Joseph::Joseph()
            ?83 {
            ?84 ?PersonList?P;
            ?85 ?P.initialPL();
            ?86 ?cout << " 人數(shù)?: " << endl;
            ?87 ?cin >> P.sum;
            ?88 ? for ( int ?i = P.sum;i > 0 ;i -- )
            ?89 ? {
            ?90 ??cout << " 代號 " << endl;
            ?91 ?? char ?a;
            ?92 ??cin >> a;
            ?93 ??cout << " " << endl;
            ?94 ?? int ?x;
            ?95 ??cin >> x;
            ?96 ??Person?Z(x,a);
            ?97 ??P.insertPl(P,Z);
            ?98 ?}

            ?99
            100
            101 }

            102
            103
            104
            105 int ?main()
            106 {
            107 ????Joseph?B;
            108 ????cout << " 輸入 " ;
            109
            110
            111 ???? return ? 0 ;
            112 }

            113



            ?

            posted @ 2006-12-12 22:59 華劍緣 閱讀(458) | 評論 (3)編輯 收藏
            ?this指針只能在一個類的成員函數(shù)中調(diào)用,它表示當前對象的地址。下面是一個例子:
            ????void Date::setMonth( int mn )
            ????{
            ???? month = mn; // 這三句是等價的
            ???? this->month = mn;
            ???? (*this).month = mn;
            ????}


            1. this只能在成員函數(shù)中使用。
            全局函數(shù),靜態(tài)函數(shù)都不能使用this。
            實際上,成員函數(shù)默認第一個參數(shù)為T* const register this。
            如:
            class A{public: int func(int p){}};
            其中,func的原型在編譯器看來應(yīng)該是: int func(A* const register this, int p);

            2. 由此可見,this在成員函數(shù)的開始前構(gòu)造的,在成員的結(jié)束后清除。
            這個生命周期同任一個函數(shù)的參數(shù)是一樣的,沒有任何區(qū)別。
            當調(diào)用一個類的成員函數(shù)時,編譯器將類的指針作為函數(shù)的this參數(shù)傳遞進去。如:
            A a;
            a.func(10);
            此處,編譯器將會編譯成: A::func(&a, 10);
            嗯,看起來和靜態(tài)函數(shù)沒差別,對嗎?不過,區(qū)別還是有的。編譯器通常會對this指針做一些優(yōu)化的,因此,this指針的傳遞效率比較高--如vc通常是通過ecx寄存器來傳遞this參數(shù)。

            3. 回答
            #1:this指針是什么時候創(chuàng)建的?
            this在成員函數(shù)的開始執(zhí)行前構(gòu)造的,在成員的執(zhí)行結(jié)束后清除。
            #2:this指針存放在何處? 堆,棧,全局變量,還是其他?
            this指針會因編譯器不同,而放置的位置不同??赡苁菞?,也可能是寄存器,甚至全局變量。
            #3:this指針如何傳遞給類中函數(shù)的?綁定?還是在函數(shù)參數(shù)的首參數(shù)就是this指針.那么this指針又是如何找到類實例后函數(shù)的?
            this是通過函數(shù)參數(shù)的首參數(shù)來傳遞的。this指針是在調(diào)用之前生成的。類實例后的函數(shù),沒有這個說法。類在實例化時,只分配類中的變量空間,并沒有為函數(shù)分配空間。自從類的函數(shù)定義完成后,它就在那兒,不會跑的。
            #4:this指針如何訪問類中變量的/?
            如果不是類,而是結(jié)構(gòu)的話,那么,如何通過結(jié)構(gòu)指針來訪問結(jié)構(gòu)中的變量呢?如果你明白這一點的話,那就很好理解這個問題了。
            在C++中,類和結(jié)構(gòu)是只有一個區(qū)別的:類的成員默認是private,而結(jié)構(gòu)是public。
            this是類的指針,如果換成結(jié)構(gòu),那this就是結(jié)構(gòu)的指針了。

            #5:我們只有獲得一個對象后,才能通過對象使用this指針,如果我們知道一個對象this指針的位置可以直接使用嗎?
            this指針只有在成員函數(shù)中才有定義。因此,你獲得一個對象后,也不能通過對象使用this指針。所以,我們也無法知道一個對象的this指針的位置(只有在成員函數(shù)里才有this指針的位置)。當然,在成員函數(shù)里,你是可以知道this指針的位置的(可以&this獲得),也可以直接使用的。
            #6:每個類編譯后,是否創(chuàng)建一個類中函數(shù)表保存函數(shù)指針,以便用來調(diào)用函數(shù)?
            普通的類函數(shù)(不論是成員函數(shù),還是靜態(tài)函數(shù)),都不會創(chuàng)建一個函數(shù)表來保存函數(shù)指針的。只有虛函數(shù)才會被放到函數(shù)表中。
            但是,既使是虛函數(shù),如果編譯器能明確知道調(diào)用的是哪個函數(shù),編譯器就不會通過函數(shù)表中的指針來間接調(diào)用,而是會直接調(diào)用該函數(shù)。

            # 7:這些編譯器如何做到的?8:能否模擬實現(xiàn)?
            知道原理后,這兩個問題就很容易理解了。
            其實,模擬實現(xiàn)this的調(diào)用,在很多場合下,很多人都做過。
            例如,系統(tǒng)回調(diào)函數(shù)。系統(tǒng)回調(diào)函數(shù)有很多,如定時,線程啊什么的。

            舉一個線程的例子:
            class A{
            int n;
            public:
            static void run(void* pThis){
            A* this_ = (A*)pThis;
            this_->process();
            }
            void process(){}
            };

            main(){
            A a;
            _beginthread( A::run, 0, &a );
            }

            這里就是定義一個靜態(tài)函數(shù)來模擬成員函數(shù)。

            也有許多C語言寫的程序,模擬了類的實現(xiàn)。如freetype庫等等。
            其實,有用過C語言的人,大多都模擬過。只是當時沒有明確的概念罷了。
            如:
            typedef struct student{
            int age;
            int no;
            int scores;
            }Student;
            void initStudent(Student* pstudent);
            void addScore(Student* pstudent, int score);
            ...
            如果你把 pstudent改成this,那就一樣了。

            它相當于:
            class Student{
            public:
            int age; int no; int scores;
            void initStudent();
            void addScore(int score);
            }

            const常量可以有物理存放的空間,因此是可以取地址的


            ///this指針是在創(chuàng)建對象前創(chuàng)建.
            this指針放在棧上,在編譯時刻已經(jīng)確定.
            并且當一個對象創(chuàng)建后,并且運行整個程序運行期間只有一個this指針.

            posted @ 2006-08-10 14:53 華劍緣 閱讀(308) | 評論 (0)編輯 收藏
                 摘要: /**/ /////////////////////////////////////// / //?????????????????????????????????????////????????????????????????????????????////數(shù)值分析??直接三角分...  閱讀全文
            posted @ 2006-05-30 21:22 華劍緣 閱讀(1897) | 評論 (0)編輯 收藏

            做題的意義

            ???????????????????????????????????????????????????????????????????????????????????????????????????????? ?By EmilMatthew 06/04/16

            ????????????????????? ?

            我可以有相當?shù)睦碛桑J為自己是一個喜愛學習的人,但是,我亦不得不承認,我的這份對學習的熱愛是有所偏失的,自然也就無法享受到學習的全然樂趣。尤其在做到一些稍難的問題的時候,長長是久攻不下,于是心生疑問,我這等熱情的投入學習,怎為何還無法去攻克難題,體會一些學科精妙之處。

            ?? ????????????? ??????? ?

            實際,這是一個謬誤,攻克難題,除了有 PASSION ,有知識上的積累,更為關(guān)鍵的,需要的是一種思維能力。而這種思維能力,對于理工科的學習而言,做題是個必不可少的環(huán)節(jié)。有 PASSION ,喜歡看書是我的現(xiàn)狀,這是好事情,但這絕不是說,有了這些就一定會有好的思維能力,雖然好的 PASSION 可以去激發(fā)一定的思維力,但好的思維力卻是必須要有訓練的這一環(huán)節(jié)的,否則,就會像一層窗戶紙,一捅就破,經(jīng)不起有難度,有深度問題的考驗。

            ??? ????????????????????????????????????????????????????????????? ???????? ?

            ??? 自從進了大學后,實際上我對考試的熱情是逐漸下降的,對什么為考試而準備,忙的不可開焦之類的事甚為不齒。的確,到了大學還為考試而學習卻實沒什么意思,但是由厭惡考試而順帶著產(chǎn)生厭惡做題的情緒就是個很不好的結(jié)果了。其實我的學習熱情一直是高漲的,尤其是大一感受了程序設(shè)計的美妙之后,更是曾經(jīng)一度為之廢寢忘食,再加上我對物理及數(shù)學那點或發(fā)自內(nèi)心的或出于敬仰的喜愛,我對去解決一些有實際背景的問題還是充滿熱情的,每當能發(fā)現(xiàn)自己要能發(fā)現(xiàn)些或創(chuàng)造什么小成果的時候,更是令人心潮澎湃。但是,我對解題,也就是做傳統(tǒng)的書面上的試題卻一直提不起精神,盡管多數(shù)的題目自己是解得下來的,但是每當面對難題時,我仍舊是力不從心的。而且,我也發(fā)現(xiàn),在自己看書的時候,很多最關(guān)鍵的證明,推導都相當?shù)某粤?。比如自動機的一些理論,較難的證明看幾眼就開始暈了;再如算法分析理論方面的證明,很多時候也都是望而卻步。究其原因,我想,最關(guān)鍵的一點,就是這其中的一個整體思路令人無法把握。而這思路,恰恰是思維過程的一個體現(xiàn),光有知識的積累是遠遠不夠的,解題是思維能力訓練的一個至關(guān)重的環(huán)節(jié)。高中是也許由于過度的應(yīng)試對解題心生厭倦了,但是到了大學里,如果你想學得深入的話對解題仍舊不能有絲毫的松懈。

            ??? ????????????????????????????????????????????????????? ???? ??? ? ??? ?

            ??? 讀書,更多的時候是側(cè)重吸收與理解,對于理工科類的書籍而言,讀書是否讀的透還與一個人的思維能力有著相當?shù)年P(guān)聯(lián)。在僅知道向量及線性代數(shù)的基礎(chǔ)上看張量的概念,有的人看的不知所云,有的人一知半解 ( 我就屬于這種 ) ,有的人一看就懂了;再如一些力學中的分析及演算,對于學的不扎實的人來說,可能把各個小步驟分解了看都懂是怎么回事,可以綜合到一起,就很難看出個所以然了。究其原因,在讀書能力基本一致的前提下,關(guān)鍵就是看你在看到這樣的一個概念闡述的時候,你在思維上能對它做出怎樣的反應(yīng)。而這種思維上反應(yīng)的高下,和讀書一樣,也是要有一個積累的過程的,而這種過程的積累,在我看來,很大一部分就是通過做題來提高的。

            ??? 思維的過程有歸納,推理,演繹,發(fā)散等許多方式,我們對某個問題的解決有意識和無意識中都用到了這些思維過程。無論是實際的工程問題,抑或是抽象出來的問題,如習題,思維能力起著至關(guān)重要的作用。當然,知識的積累在解決問題的過程中亦是舉足輕重的。用唯物論的觀點來看,二者的關(guān)系是相輔相承的。工程的,實際的問題相對要復雜和冗繁,但未必都很艱深,而習題中的抽象問題規(guī)模相對小,對問題的剖析能達到相當?shù)纳疃取K裕魏我粋€有理性思考的人都可以看到,在學校把解決問題的基礎(chǔ)打好了,無論是以后做研究還是去投入到生產(chǎn)實踐中去,不說游刃有余,最起碼,在經(jīng)過一定的適應(yīng)后,是完全可以掌控的。而通過習題在思維層上的訓練,更是可以使你在理工科 ---- 這樣一個富于理性化分析,精巧構(gòu)建,高度技巧化的領(lǐng)域中達到融會貫通,觸類旁通的作用。所以,以前我放棄或輕視做題的行為是何等的可笑!

            ????????????????????? ???

            ??? 之所以對解題提不起太多興趣,其中很大的一部分原因是由于多數(shù)情況下我們的解題處于一種被動的局面。也就是說,被老師“追著趕”,在這樣一種情緒下解題,一者難有好的心情,二者目的以完成任務(wù)為主,雖然能學到一些東西,但終究有些情非得已的意味。想有效而又快樂的解題,個人認為最好的法子就是主動出擊,自己去找題來做,不必多找,找一兩本較好出版社或在某一方面特別有實力的學校出的書是肯定不會錯的。然后,就是自己的解題,回顧與體會了。至于解題的多少只能是因人而異了,這和你個人的實際情況有很大關(guān)聯(lián),但有一點,就是解題一定要投入,一定要重視自己做的這些題的從哪個角度去考查思維力以及對知識的運用、掌握,否則,妄想以多做題來達到思維飛躍的想法是徒勞的。個人認為,這學習的主動性一旦被調(diào)動起來之后,你馬上會感受到解題也竟然和看書一樣,有著許多收獲的喜悅與驚奇。而從解題中可以直接得到的最為重要的好處在于:一來你對某門課程本身的體系和知識結(jié)構(gòu)加深了理解和掌握;二來你的思維能力體系又得到了再一次的加強,遇到新問題的時候(哪怕和原來的領(lǐng)域不相關(guān)),你的活躍的思路也必定會給你帶來解決問題的更多、更好的啟示。

            ?

            ??? 所以,作為一個理工科學生的你,無論是以后想做科研,還是想盡快投入生產(chǎn)實踐,思維能力是極其重要的,而做題,則是其中的一條必由之路。當你真正投入時,你會發(fā)現(xiàn),做題原來也可以這般的享受。

            ????????????????????????????

            posted @ 2006-05-15 23:01 華劍緣 閱讀(240) | 評論 (0)編輯 收藏
            1.某公司采用公用電話傳遞10組數(shù)據(jù),每組數(shù)據(jù)必須由四位整數(shù)組成,數(shù)據(jù)在傳遞過程中是加密的,加密規(guī)則如下:每組數(shù)據(jù)中的每位數(shù)字都加上5,然后用和除以10的余數(shù)代替該數(shù)字,再將第一位和第四位交換,第二位和第三位交換。編程輸出加密前后的數(shù)據(jù)。
            posted @ 2006-04-21 23:26 華劍緣 閱讀(228) | 評論 (0)編輯 收藏
            2005圖靈獎獲得者產(chǎn)生
            ????? 3月1日,ACM(美國計算機學會)決定將2005年圖靈獎頒發(fā)給Peter Naur,以表彰他在設(shè)計Algol 60語言上的貢獻。由于其定義的清晰性,Algol 60成為了許多現(xiàn)代程序設(shè)計語言的原型。在語法描述中廣泛使用的BNF范式,其中的“N”便是來自Peter Naur的名字。圖靈獎被稱為“計算科學界的諾貝爾獎”,它創(chuàng)立于1960年,現(xiàn)在的獎金10萬美元,由Intel公司贊助。??
            ??????詳文如下:
            ??????
            SOFTWARE PIONEER PETER NAUR WINS ACM'S TURING AWARD

            Dane's Creative Genius Revolutionized Computer Language Design

            New York, March 01, 2006??--??The Association for Computing Machinery (ACM) has named Peter Naur the winner of the 2005 A.M. Turing Award. The award is for Naur's pioneering work on defining the Algol 60 programming language. Algol 60 is the model for many later programming languages, including those that are indispensable software engineering tools today. The Turing Award, considered the "Nobel Prize of Computing" was first awarded in 1966, and is named for British mathematician Alan M. Turing. It carries a $100,000 prize, with financial support provided by Intel Corporation.

            Dr. Naur was editor in 1960 of the hugely influential "Report on the Algorithmic Language Algol 60." He is recognized for the report's elegance, uniformity and coherence, and credited as an important contributor to the language's power and simplicity. The report made pioneering use of what later became known as Backus-Naur Form (BNF) to define the syntax of programs. BNF is now the standard way to define a computer language. Naur is also cited for his contribution to compiler design and to the art and practice of computer programming.

            "Dr. Naur's ALGOL 60 embodied the notion of elegant simplicity for algorithmic expression," said Justin Rattner, Intel senior fellow and Chief Technology Officer. "Over the years, programming languages have become bloated with features and functions that have made them more difficult to learn and less effective. This award should encourage future language designers who are addressing today's biggest programming challenges, such as general-purpose, multi-threaded computation, to achieve that same level of elegance and simplicity that was the hallmark of ALGOL 60."

            Contributions Signal Birth of Computing Science

            In 2002, former Turing Award winner Edsger Dijkstra characterized the development of Algol 60 as "an absolute miracle" that signaled the birth of what he called "computing science" because it showed the first ways in which automatic computing could and should become a topic of academic concern. The development of Algol 60 was the result of an exceptionally talented group of people, including several who were later named Turing Award winners.

            Dr. Naur's contribution to Algol 60, was seminal. John Backus, another former Turing Award winner, acknowledged Naur as the driving intellectual force behind the definition of Algol 60. He commented that Naur's editing of the Algol report and his comprehensive preparation for the January 1960 meeting in which Algol was presented "was the stuff that really made Algol 60 the language that it is, and it wouldn't have even come about, had he not done that."

            Before publication of the Algol 60 Report, computer languages were informally defined by their prose manuals and the compiler code itself. The report, with its use of BNF to define the syntax, and carefully chosen prose to define the semantics, was concise, powerful, and unambiguous.

            The 17-page Algol 60 Report presented the complete definition of an elegant, transparent language designed for communication among humans as well as with computers. It was deliberately independent of the properties of any particular computer. The new language was a major challenge to compiler writers. Dr. Naur went on to co-author the GIER Algol Compiler (for the transistorized electronic computer developed in Denmark known as GIER), one of the first compilers to deal fully and correctly with the language's powerful procedure mechanism.

            "Dr. Naur's contribution was a watershed in the computing field, and transformed the way we define programming languages," said James Gray of Microsoft Research, and Chair of the 2005 Turing Committee. "Many of the programming constructs we take for granted today were introduced in the Algol Report, which introduced a concise block-structured language that improved the way we express algorithms."

            Dr. Naur was instrumental in establishing software engineering as a discipline. He made pioneering contributions to methodologies for writing correct programs through his work on assertions that enable programmers to state their assumptions, and on structured programming. "His work, though formal and precise, displays an exceptional understanding of the limits and uses of formalism and precision," said Gray. Through these activities, and his development of an influential computer science curriculum, Dr. Naur contributed fundamental components of today's computing knowledge and skills.

            Early Experience in Practical Calculations and Applications

            Dr. Naur began his scientific pursuits as an astronomer, where he was involved in computations of the orbits of comets and minor planets. He obtained a magister of science degree (the equivalent of a master's degree) from Copenhagen University in 1949. He later returned there to earn a doctorate in astronomy in 1957. During the 1950-51 academic year, Dr. Naur studied astronomy at King's College in Cambridge, U.K., and came to the U.S. to further his work in the field. This work involved using early computers (starting with EDSAC, the world's first practical stored program electronic computer) for his astronomical calculations. In 1953, he returned to Denmark and served as a scientific assistant at Copenhagen Observatory.

            In 1959, he joined the staff of the compiler design group at Regnecentralen, the first Danish computer company. There he organized the Algol Bulletin and was editor of the 13-person international Algol 60 team's report that defined Algol 60. He became a professor at the Copenhagen University Institute of Datalogy in 1969, retiring in 1998.

            Dr. Naur was awarded the G. A. Hagemann Gold Medal from the Danish Technical University in 1963, the Jens Rosenkjaer Prize from the Danish Radio in 1966, and the Computer Pioneer Award from the Institute of Electrical and Electronics Engineers in 1986.
            ACM will present the Turing Award at the annual ACM Awards Banquet on May 20, 2006, at the Westin St. Francis Hotel in San Francisco, CA.

            About the A.M. Turing Award

            The A.M. Turing Award was named for Alan M. Turing, the British mathematician who articulated the mathematical foundation and limits of computing, and who was a key contributor to the Allied cryptanalysis of the German Enigma cipher during World War II. Since its inception, the Turing Award has honored the computer scientists and engineers who created the systems and underlying theoretical foundations that have propelled the information technology industry. For additional information, please see the A. M. Turing Awards site.

            About ACM

            ACM, the Association for Computing Machinery (http://www.acm.org), is an educational and scientific society uniting the world's computing educators, researchers and professionals to inspire dialogue, share resources and address the field's challenges. ACM strengthens the profession's collective voice through strong leadership, promotion of the highest standards, and recognition of technical excellence. ACM supports the professional growth of its members by providing opportunities for life-long learning, career development, and professional networking.
            posted @ 2006-04-15 16:52 華劍緣 閱讀(867) | 評論 (0)編輯 收藏


            幻方:

            #include? " iostream.h "

            int ?main()
            {
            ????????
            int ?N,i,j,count;
            ????????cout
            << " Please?enter?N: " ;
            ????????cin
            >> N;
            ????????
            int ? ** arr = new ? int * ?[N];
            ????????
            for (i = 0 ;i < N;i ++ )
            ????????????????arr[i]
            = new ? int [N];
            ????????
            for (i = 0 ;i < N;i ++ )
            ????????????????
            for (j = 0 ;j < N;j ++ )
            ????????????????????????arr[i][j]
            = 0 ;
            ????????arr[
            0 ][(N + 1 ) / 2 - 1 ] = 1 ;
            ????????
            for (count = 1 ,i = 0 ,j = (N + 1 ) / 2 - 1 ;count < N * N;count ++ )
            ????????
            {
            ????????????????i
            -- ;
            ????????????????j
            -- ;
            ????????????????
            if (i ==- 1 )
            ????????????????????????i
            = N - 1 ;
            ????????????????
            if (j ==- 1 )
            ????????????????????????j
            = N - 1 ;
            ????????????????
            if (arr[i][j] == 0 )
            ????????????????????????arr[i][j]
            = count + 1 ;
            ????????????????
            else ? if (arr[i][j] > 0 )
            ????????????????
            {
            ????????????????????????i
            = i + 2 ;
            ????????????????????????j
            = j + 1 ;
            ????????????????????????
            if (j == N)
            ????????????????????????????????j
            = 0 ;
            ????????????????????????
            if (i == N)
            ????????????????????????????????i
            = 0 ;
            ????????????????????????
            else ? if (i == N + 1 )
            ????????????????????????????????i
            = 1 ;
            ????????????????????????arr[i][j]
            = count + 1 ;
            ????????????????}

            ????????}

            ????????
            for (i = 0 ;i < N;i ++ )
            ????????
            {
            ????????????????
            for (j = 0 ;j < N;j ++ )
            ????????????????
            {
            ????????????????????????cout
            << arr[i][j] << " ? " ;
            ????????????????}

            ????????????????cout
            << " \n " ;
            ????????}

            ?????????????????????
            for (i = 0 ;i < N;i ++ )
            ????????????????delete?[]?arr[i];
            ????????delete?[]?arr;
            ????????
            return ? 1 ;
            }
            posted @ 2006-04-09 22:58 華劍緣 閱讀(491) | 評論 (3)編輯 收藏
            僅列出標題  下一頁
            91精品国产综合久久婷婷| 久久人人爽人人爽人人片av麻烦| 久久人人爽人人人人爽AV | 久久99精品久久久久久不卡| 久久国产乱子伦免费精品| 久久久久波多野结衣高潮| 一本大道久久东京热无码AV| 久久男人AV资源网站| 久久人人爽人人澡人人高潮AV| 狠狠色综合网站久久久久久久 | 久久久久无码精品| 精品一久久香蕉国产线看播放| 国产福利电影一区二区三区久久久久成人精品综合 | 欧美一级久久久久久久大片| 国产福利电影一区二区三区,免费久久久久久久精| 亚洲欧美伊人久久综合一区二区 | 亚洲国产一成人久久精品| av色综合久久天堂av色综合在| 亚洲国产精品无码久久久不卡 | 99久久99久久精品国产| 久久99国产一区二区三区| 欧美粉嫩小泬久久久久久久| 久久人妻无码中文字幕| 久久人人爽人人爽人人AV东京热| 精品久久久久久无码专区不卡| 韩国无遮挡三级久久| 国产一区二区精品久久岳 | 国产精品久久久久久久久软件| 国产偷久久久精品专区| 亚洲精品tv久久久久久久久| 久久精品国产一区| 尹人香蕉久久99天天拍| 97久久精品无码一区二区| 久久久久久无码国产精品中文字幕 | 久久免费观看视频| 伊人久久精品无码av一区| 国产精品一久久香蕉国产线看| 久久国产成人午夜aⅴ影院| 久久一日本道色综合久久| 一级做a爰片久久毛片16| 亚洲人成伊人成综合网久久久|