傳說(shuō)中的100句背7000單詞!
1. Typical of the grassland dwellers of the continent is the American antelope, or pronghorn.
1.美洲羚羊,或稱(chēng)叉角羚,是該大陸典型的草原動(dòng)物。
2. Of the millions who saw Haley’s comet in 1986, how many people will live long enough to see it return in the twenty-first century.
2. 1986年看見(jiàn)哈雷慧星的千百萬(wàn)人當(dāng)中,有多少人能夠長(zhǎng)壽到足以目睹它在二十一世紀(jì)的回歸呢?
3. Anthropologists have discovered that fear, happiness, sadness, and surprise are universally reflected in facial expressions.
3.人類(lèi)學(xué)家們已經(jīng)發(fā)現(xiàn),恐懼,快樂(lè),悲傷和驚奇都會(huì)行之于色,這在全人類(lèi)是共通的。
????? 4. Because of its irritating effect on humans, the use of phenol as a general antiseptic has been largely discontinued.
4.由于苯酚對(duì)人體帶有刺激性作用,它基本上已不再被當(dāng)作常用的防腐劑了。
5. In group to remain in existence, a profit-making organization must, in the long run, produce something consumers consider useful or desirable.
5.任何盈利組織若要生存,最終都必須生產(chǎn)出消費(fèi)者可用或需要的產(chǎn)品。
6. The greater the population there is in a locality, the greater the need there is for water, transportation, and disposal of refuse.
6.一個(gè)地方的人口越多,其對(duì)水,交通和垃圾處理的需求就會(huì)越大。
7. It is more difficult to write simply, directly, and effectively than to employ flowery but vague expressions that only obscure one’s meaning.
7.簡(jiǎn)明,直接,有力的寫(xiě)作難于花哨,含混而意義模糊的表達(dá)。
8. With modern offices becoming more mechanized, designers are attempting to personalize them with warmer, less severe interiors.
8.隨著現(xiàn)代辦公室的日益自動(dòng)化,設(shè)計(jì)師們正試圖利用較為溫暖而不太嚴(yán)肅的內(nèi)部裝飾來(lái)使其具有親切感。
9. The difference between libel and slander is that libel is printed while slander is spoken.
9.誹謗和流言的區(qū)別在于前者是書(shū)面的,而后者是口頭的。
10. The knee is the joints where the thigh bone meets the large bone of the lower leg.
10.膝蓋是大腿骨和小腿脛的連接處。
11. Acids are chemical compounds that, in water solution, have a sharp taste, a corrosive action on metals, and the ability to turn certain blue vegetable dyes red.
11.酸是一種化合物,它在溶于水時(shí)具有強(qiáng)烈的氣味和對(duì)金屬的腐蝕性,并且能夠使某些藍(lán)色植物染料變紅。
12. Billie Holiday’s reputation as a great jazz-blues singer rests on her ability to give emotional depth to her songs.
12. Billie Holiday’s作為一個(gè)爵士布魯斯樂(lè)杰出歌手的名聲建立在能夠賦予歌曲感情深度的能力。
13. Essentially, a theory is an abstract, symbolic representation of what is conceived to be reality.
13.理論在本質(zhì)上是對(duì)認(rèn)識(shí)了的現(xiàn)實(shí)的一種抽象和符號(hào)化的表達(dá)。
14. Long before children are able to speak or understand a language, they communicate through facial expressions and by making noises.
14.兒童在能說(shuō)或能聽(tīng)懂語(yǔ)言之前,很久就會(huì)通過(guò)面部表情和靠發(fā)出噪聲來(lái)與人交流了。
15. Thanks to modern irrigation, crops now grow abundantly in areas where once nothing but cacti and sagebrush could live.
15.受當(dāng)代灌溉(技術(shù)設(shè)施)之賜,農(nóng)作物在原來(lái)只有仙人掌和蕎屬科植物才能生存的地方旺盛的生長(zhǎng)。
16. The development of mechanical timepieces spurred the search for more accurate sundials with which to regulate them.
16.機(jī)械計(jì)時(shí)器的發(fā)展促使人們尋求更精確的日晷,以便校準(zhǔn)機(jī)械計(jì)時(shí)器。
17. Anthropology is a science in that anthropologists use a rigorous set of methods and techniques to document observations that can be checked by others.
17.人類(lèi)學(xué)是一門(mén)科學(xué),因?yàn)槿祟?lèi)學(xué)家采用一整套強(qiáng)有力的方法和技術(shù)來(lái)記錄觀測(cè)結(jié)果,而這樣記錄下來(lái)的觀測(cè)結(jié)果是供他人核查的。
18. Fungi are important in the process of decay, which returns ingredients to the soil, enhances soil fertility, and decomposes animal debris.
18.真菌在腐化過(guò)程中十分重要,而腐化過(guò)程將化學(xué)物質(zhì)回饋于土壤,提高其肥力,并分解動(dòng)物糞便。
19. When it is struck, a tuning fork produces an almost pure tone, retaining its pitch over a long period of time.
19.音叉被敲擊時(shí),產(chǎn)生幾乎純質(zhì)的音調(diào),其音量經(jīng)久不衰。
20. Although pecans are most plentiful in the southeastern part of the United States, they are found as far north as Ohio and Illinois.
20.雖然美洲山河桃樹(shù)最集中于美國(guó)的東南部但是在北至俄亥俄州及伊利諾州也能看見(jiàn)它們。
21. Eliminating problems by transferring the blame to others is often called scape-goating.
21.用怪罪別人的辦法來(lái)解決問(wèn)題通常被稱(chēng)為尋找替罪羊。
22. The chief foods eaten in any country depend largely on what grows best in its climate and soil.
22.一個(gè)國(guó)家的主要食物是什么,大體取決于什么作物在其天氣和土壤條件下生長(zhǎng)得最好。
23. Over a very large number of trials, the probability of an event’s occurring is equal to the probability that it will not occur.
23.在大量的實(shí)驗(yàn)中,某一事件發(fā)生的幾率等于它不發(fā)生的幾率。
24. Most substance contract when they freeze so that the density of a substance’s solid is higher than the density of its liquid.
24.大多數(shù)物質(zhì)遇冷收縮,所以他們的密度在固態(tài)時(shí)高于液態(tài)。
25. The mechanism by which brain cells store memories is not clearly understood.
25.大腦細(xì)胞儲(chǔ)存記憶的機(jī)理并不為人明白。
26. By the middle of the twentieth century, painters and sculptors in the United States had begun to exert a great worldwide influence over art.
26.到了二十一世紀(jì)中葉,美國(guó)畫(huà)家和雕塑家開(kāi)始在世界范圍內(nèi)對(duì)藝術(shù)產(chǎn)生重大影響。
27. In the eastern part of New Jersey lies the city of Elizabeth, a major shipping and manufacturing center.
27.伊麗莎白市,一個(gè)重要的航運(yùn)和制造業(yè)中心,坐落于新澤西州的東部。
28. Elizabeth Blackwell, the first woman medical doctor in the United States, founded the New York Infirmary, an institution that has always had a completely female medical staff.
28. Elizabeth Blackwell,美國(guó)第一個(gè)女醫(yī)生,創(chuàng)建了員工一直為女性紐約診所。
29. Alexander Graham Bell once told his family that he would rather be remembered as a teacher of the deaf than as the inventor of the telephone.
29. Alexander Graham Bell曾告訴家人,他更愿意讓后人記住他是聾子的老師,而非電話(huà)的發(fā)明者。
30. Because its leaves remain green long after being picked, rosemary became associated with the idea of remembrance.
30.采摘下的迷迭香樹(shù)葉常綠不衰,因此人們把迷迭香樹(shù)與懷念聯(lián)系在一起。
31. Although apparently rigid, bones exhibit a degree of elasticity that enables the skeleton to withstand considerable impact.
31.骨頭看起來(lái)是脆硬的,但它也有一定的彈性,使得骨骼能夠承受相當(dāng)?shù)拇驌簟?
32. That xenon could not FORM chemical compounds was once believed by scientists.
32.科學(xué)家曾相信:氙氣是不能形成化合物的。
33. Research into the dynamics of storms is directed toward improving the ability to predict these events and thus to minimize damage and avoid loss of life.
33.對(duì)風(fēng)暴動(dòng)力學(xué)的研究是為了提高風(fēng)暴預(yù)測(cè)從而減少損失,避免人員傷亡。
34. The elimination of inflation would ensure that the amount of money used in repaying a loan would have the same value as the amount of money borrowed.
34.消除通貨膨脹應(yīng)確保還貸的錢(qián)應(yīng)與所貸款的價(jià)值相同。
35. Futurism, an early twentieth-century movement in art, rejected all traditions and attempted to glorify contemporary life by emphasizing the machine and motion.
35.未來(lái)主義,二十世紀(jì)早期的一個(gè)藝術(shù)思潮。拒絕一切傳統(tǒng),試圖通過(guò)強(qiáng)調(diào)機(jī)械和動(dòng)態(tài)來(lái)美化生活。
36. One of the wildest and most inaccessible parts of the United States is the Everglades where wildlife is abundant and largely protected.
36. Everglades是美國(guó)境內(nèi)最為荒涼和人跡罕至的地區(qū)之一,此處有大量的野生動(dòng)植物而且大多受(法律)保護(hù)。
37. Lucretia Mott's influence was so significant that she has been credited by some authorities as the originator of feminism in the United States.
37. Lucretia Mott's的影響巨大,所以一些權(quán)威部門(mén)認(rèn)定她為美國(guó)女權(quán)運(yùn)動(dòng)的創(chuàng)始人。
38. The activities of the international marketing researcher are frequently much broader than those of the domestic marketer.
38.國(guó)際市場(chǎng)研究者的活動(dòng)范圍常常較國(guó)內(nèi)市場(chǎng)研究者廣闊。
39. The continental divide refers to an imaginary line in the North American Rockies that divides the waters flowing into the Atlantic Ocean from those flowing into the Pacific.
39.大陸分水嶺是指北美洛磯山脈上的一道想象線(xiàn),該線(xiàn)把大西洋流域和太平洋流域區(qū)分開(kāi)來(lái)。
40. Studies of the gravity field of the Earth indicate that its crust and mantle yield when unusual weight is placed on them.
40.對(duì)地球引力的研究表明,在不尋常的負(fù)荷之下地殼和地幔會(huì)發(fā)生位移。
41. The annual worth of Utah's manufacturing is greater than that of its mining and farming combined.
41.尤它州制造業(yè)的年產(chǎn)值大于其工業(yè)和農(nóng)業(yè)的總和。
42. The wallflower is so called because its weak stems often grow on walls and along stony cliffs for support.
42.墻花之所以叫墻花,是因?yàn)槠浯嗳醯闹Ω山?jīng)常要靠墻壁或順石崖生長(zhǎng),以便有所依附。
43. It is the interaction between people, rather than the events that occur in their lives, that is the main focus of social psychology.
43.社會(huì)心理學(xué)的主要焦點(diǎn)是人與人之間的交往,而不是他們各自生活中的事件。
44. No social crusade aroused Elizabeth Williams' enthusiasm more than the expansion of educational facilities for immigrants to the United States.
44.給美國(guó)的新移民增加教育設(shè)施比任何社會(huì)運(yùn)動(dòng)都更多的激發(fā)了Elizabeth Williams的熱情。
45. Quails typically have short rounded wings that enable them to spring into full flight instantly when disturbed in their hiding places.
45.典型的鵪鶉都長(zhǎng)有短而圓的翅膀,憑此他們可以在受驚時(shí)一躍而起,飛離它們的躲藏地。
46. According to anthropologists, the earliest ancestors of humans that stood upright resembled chimpanzees facially, with sloping foreheads and protruding brows.
46.根據(jù)人類(lèi)學(xué)家的說(shuō)法,直立行走的人的鼻祖面部輪廓與黑猩猩相似,額頭后傾,眉毛突出。
47. Not until 1866 was the fully successful transatlantic cable finally laid.
47.直到1866年第一條橫跨大西洋的電纜才完全成功的架通。
48. In his writing, John Crowe Ransom describes what he considers the spiritual barrenness of society brought about by science and technology.
48. John Crowe Ransom在他的著作中描述了他認(rèn)為是由科學(xué)技術(shù)給社會(huì)帶來(lái)的精神貧困。
49. Children with parents whose guidance is firm, consistent, and rational are inclined to possess high levels of self-confidence.
49.父母的教導(dǎo)如果堅(jiān)定,始終如一和理性,孩子就有可能充滿(mǎn)自信。
50. The ancient Hopewell people of North America probably cultivated corn and other crops, but hunting and gathering were still of critical importance in their economy.
50.北美遠(yuǎn)古的Hopewell人很可能種植了玉米和其他農(nóng)作物,但打獵和采集對(duì)他們的經(jīng)濟(jì)貿(mào)易仍是至關(guān)重要的。
51. Using many symbols makes it possible to put a large amount of inFORMation on a single map.
51.使用多種多樣的符號(hào)可以在一張地圖里放進(jìn)大量的信息。
52. Anarchism is a term describing a cluster of doctrines and attitudes whose principal uniting feature is the belief that government is both harmful and unnecessary.
52.無(wú)政府主義這個(gè)詞描述的是一堆理論和態(tài)度,它們的主要共同點(diǎn)在于相信政府是有害的,沒(méi)有必要的。
53. Probably no man had more effect on the daily lives of most people in the Untied States than did Henry Ford a pioneer in automobile production.
53.恐怕沒(méi)有誰(shuí)對(duì)大多數(shù)美國(guó)人的日常生活影響能超過(guò)汽車(chē)生產(chǎn)的先驅(qū)亨利.福特。
54. The use of well-chosen nonsense words makes possible the testing of many basic hypotheses in the field of language learning.
54.使用精心挑選的無(wú)意義詞匯,可以檢驗(yàn)語(yǔ)言學(xué)科里許多基本的假定。
55. The history of painting is a fascinating chain of events that probably began with the very first pictures ever made.
55.優(yōu)化歷史是由一連串的迷人事件組成,其源頭大概可以上溯到最早的圖畫(huà)。
56. Perfectly matched pearls, strung into a necklace, bring a far higher price than the same pearls told individually.
56.相互般配的珍珠,串成一條項(xiàng)鏈,就能賣(mài)到比單獨(dú)售出好得多的價(jià)錢(qián)。
57. During the eighteenth century, Little Turtle was chief of the Miami tribe whose territory became what is now Indiana and Ohio.
57.十八世紀(jì)時(shí),"小烏龜"是邁阿密部落的酋長(zhǎng),該部落的地盤(pán)就是今天的印第安那州和俄亥俄州。
58. Among almost seven hundred species of bamboo, some are fully grown at less than a foot high, while others can grow three feet in twenty-four hours.
58.在竹子的近七百個(gè)品種中,有的全長(zhǎng)成還不到一英尺,有的卻能在二十四小時(shí)內(nèi)長(zhǎng)出三英尺。
59. Before staring on a sea voyage, prudent navigators learn the sea charts, study the sailing directions, and memorize lighthouse locations to prepare themselves for any conditions they might encounter.
59.謹(jǐn)慎的航海員在出航前,會(huì)研究航向,記錄的燈塔的位置,以便對(duì)各種可能出現(xiàn)的情況做到有備無(wú)患。
60. Of all the economically important plants, palms have been the least studied.
60.在所有的經(jīng)濟(jì)作物中,棕櫚樹(shù)得到的研究最少。
61. Buyers and sellers should be aware of new developments in technology can and does affect marketing activities.
61.購(gòu)買(mǎi)者和銷(xiāo)售者都應(yīng)該留意技術(shù)的新發(fā)展,原因很簡(jiǎn)單,因?yàn)榧夹g(shù)能夠并且已經(jīng)影響著營(yíng)銷(xiāo)活動(dòng)。
62. The application of electronic controls made possible by the microprocessor and computer storage have multiplied the uses of the modern typewriter.
62.電腦儲(chǔ)存和由于電子微處理機(jī)得以實(shí)現(xiàn)的電控運(yùn)用成倍的增加了現(xiàn)代打字機(jī)的功能。
63. The human skeleton consists of more than two hundred bones bound together by tough and relatively inelastic connective tissues called ligaments.
63.人類(lèi)骨骼有二百多塊骨頭組成,住些骨頭石油堅(jiān)韌而相對(duì)缺乏彈性的,被稱(chēng)為韌帶的結(jié)蒂組連在一起。
64. The pigmentation of a pearl is influenced by the type of oyster in which it develops and by the depth, temperature, and the salt content of the water in which the oyster lives.
64.珍珠的色澤受到作為其母體牡蠣種類(lèi)及牡蠣生活水域的深度,溫度和含鹽度的制約。
65. Although mockingbirds superbly mimic the songs and calls of many birds, they can nonetheless be quickly identified as mockingbirds by certain aural clues.
65.盡管模仿鳥(niǎo)學(xué)很多種鳥(niǎo)的鳴叫聲惟妙惟肖,但人類(lèi)還是能夠依其聲音上的線(xiàn)索很快識(shí)別它們。
66. Not only can walking fish live out of water, but they can also travel short distances over land.
66.鲇魚(yú)不僅可以離開(kāi)水存活,還可以在岸上短距離移動(dòng)。
67. Scientists do not know why dinosaurs became extinct, but some theories postulate that changers in geography, climate, and sea levels were responsible.
67.科學(xué)家不知道恐龍為何絕種了,但是一些理論推斷是地理,氣候和海平面的變化造成的。
68. The science of horticulture, in which the primary concerns are maximum yield and superior quality, utilizes inFORMation derived from other sciences.
68.主要目的在于豐富和優(yōu)質(zhì)的農(nóng)藝學(xué)利用了其他科學(xué)的知識(shí)。
69. Snow aids farmers by keeping heart in the lower ground levels, thereby saving the seeds from freezing.
69.雪對(duì)農(nóng)民是一種幫助,因?yàn)樗3值貙油寥赖臏囟龋狗N子不致凍死。
70. Even though the precise qualities of hero in literary words may vary over time, the basic exemplary function of the hero seems to remain constant.
70.歷代文學(xué)作品中的英雄本色雖各有千秋,但其昭世功力卻是恒古不變的。
71. People in prehistoric times created paints by grinding materials such as plants and clay into power and then adding water.
71.史前的人們制造顏料是將植物和泥土等原料磨成粉末,然后加水。
72. Often very annoying weeds, goldenrods crowd out less hardy plants and act as hosts to many insect pests.
72.黃菊花通常令人生厭,它擠走不那么頑強(qiáng)的植物,并找來(lái)很多害蟲(chóng)。
73. Starting around 7000 B.C., and for the next four thousand years, much of the Northern Hemisphere experienced temperatures warmer than at present.
73.大約從公元前七千年開(kāi)始,在四千年當(dāng)中,北半球的溫度比現(xiàn)在高。
74. When Henry Ford first sought financial backing for making cars, the very notion of farmers and clerks owning automobiles was considered ridiculous.
74.當(dāng)亨利.福特最初制造汽車(chē)為尋求資金支持時(shí),農(nóng)民和一般職員也能擁有汽車(chē)的想法被認(rèn)為是可笑的。
75. Though once quite large, the population of the bald eagle across North America has drastically declined in the past forty years.
75.北美禿頭鷹的數(shù)量一度很多,但在近四十年中全北美的禿頭鷹數(shù)量急劇下降。
76. The beaver chews down trees to get food and material with which to build its home.
76.水獺啃倒樹(shù)木,以便取食物并獲得造窩的材料。
77. Poodles were once used as retrievers in duck hunting, but the American Kennel Club does not consider them sporting dogs because they are now primarily kept as pets.
77.長(zhǎng)卷毛狗曾被用作獵鴨時(shí)叼回獵物的獵犬,但是美國(guó)Kennel Club卻不承認(rèn)它們?yōu)楂C犬,因?yàn)樗鼈儸F(xiàn)在大多數(shù)作為寵物飼養(yǎng)。
78. As a result of what is now know in physics and chemistry, scientists have been able to make important discoveries in biology and medicine.
78.物理學(xué)和化學(xué)的一個(gè)成果是使得科學(xué)家們能在生物學(xué)和醫(yī)學(xué)上獲得重大發(fā)現(xiàn)。
79. The practice of making excellent films based on rather obscure novels has been going on so long in the United States as to constitute a tradition.
79.根據(jù)默默無(wú)聞的小說(shuō)制作優(yōu)秀影片在美國(guó)由來(lái)已久,已經(jīng)成為傳統(tǒng)。
80. Since the consumer considers the best fruit to be that which is the most attractive, the grower must provide products that satisfy the discerning eye.
80.因?yàn)轭櫩驼J(rèn)為最好的水果應(yīng)該看起來(lái)也是最漂亮的,所以種植者必須提供能滿(mǎn)足挑剔眼光的產(chǎn)品。
81. Television the most pervasive and persuasive of modern technologies, marked by rapid change and growth, is moving into a new era, an era of extraordinary sophistication and versatility, which promises to reshape our lives and our world.
81.電視,這項(xiàng)從迅速變化和成長(zhǎng)為標(biāo)志的最普及和最有影響力的現(xiàn)代技術(shù),正在步入一個(gè)新時(shí)代,一個(gè)極為成熟和多樣化的時(shí)代,這將重塑我們的生活和世界。
82. Television is more than just an electronics; it is a means of expression, as well as a vehicle for communication, and as such becomes a powerful tool for reaching other human beings.
82.電視不僅僅是一件電器;它是表達(dá)的手段和交流的載體并因此成為聯(lián)系他人的有力工具。
83. Even more shocking is the fact that the number and rate of imprisonment have more than doubled over the past twenty years, and recidivism------that is the rate for re-arrest------is more than 60 percent.
83.更讓人吃驚的事實(shí)是監(jiān)禁的數(shù)目和比例在過(guò)去的二十年中翻了一番還有余,以及累犯率——即再次拘押的比例——為百分之六十強(qiáng)。
84. His teaching began at the Massachusetts Institute of Technology, but William Rainey Harper lured him to the new university of Chicago, where he remained officially for exactly a generation and where his students in advanced composition found him terrifyingly frigid in the classroom but sympathetic and understanding in their personal conferences.
84.他的教書(shū)生涯始于麻省理工學(xué)院,但是William Rainey Harper把他吸引到了新成立的芝加哥大學(xué)。他在那里正式任職長(zhǎng)達(dá)整整一代人的時(shí)間。他的高級(jí)作文課上的學(xué)生覺(jué)得他在課上古板得可怕,但私下交流卻富有同情和理解。
85. The sloth pays such little attention to its personal hygiene that green algae grow on its coarse hair and communities of a parasitic moth live in the depths of its coat producing caterpillars which graze on its mouldy hair. Its muscles are such that it is quits incapable of moving at a speed of over a kilometer an hour even over the shortest distances and the swiftest movement it can make is a sweep of its hooked arm.
85.樹(shù)獺即不講究衛(wèi)生,以至于它粗糙的毛發(fā)上生出綠苔,成群的寄生蛾生長(zhǎng)在它的皮毛深處,變成毛毛蟲(chóng),并以它的臟毛為食。她的肌肉不能讓他哪怕在很短的距離以?xún)?nèi)以每小時(shí)一公里的速度移動(dòng)。它能做的最敏捷的動(dòng)作就是揮一揮它彎曲的胳膊。
86. Artificial flowers are used for scientific as well as for decorative purposes. They are made from a variety of materials, such as way and glass, so skillfully that they can scarcely be distinguished from natural flowers.
86.人造花卉即可用于科學(xué)目的,也可用于裝飾目的,它們可以用各種各樣的材料制成,臂如蠟和玻璃;其制作如此精巧,幾乎可以以假亂真。
87. Three years of research at an abandoned coal mine in Argonne, Illinois, have resulted in findings that scientists believe can help reclaim thousands of mine disposal sites that scar the coal-rich regions of the United States.
87.在伊利諾州Angonne市的一個(gè)廢棄煤礦的三年研究取得了成果,科學(xué)家們相信這些成果可以幫助改造把美國(guó)產(chǎn)煤區(qū)弄得傷痕累累的數(shù)千個(gè)舊煤場(chǎng)。
88. When the persuading and the planning for the western railroads had finally been completed, the really challenging task remained: the dangerous, sweaty, backbreaking, brawling business of actually building the lines.
88.當(dāng)有關(guān)西部鐵路的說(shuō)服和規(guī)劃工作終于完成后,真正艱難的任務(wù)還沒(méi)有開(kāi)始;即危險(xiǎn),吃力,需要傷筋動(dòng)骨和吵吵嚷嚷的建造這些鐵路的實(shí)際工作。
89. Because of the space crunch, the Art Museum has become increasingly cautious in considering acquisitions and donations of art, in some cases passing up opportunities to strengthen is collections.
89.由于空間不足,藝術(shù)博物館在考慮購(gòu)買(mǎi)和接受捐贈(zèng)的藝術(shù)品是越來(lái)越慎重,有些情況下放棄其進(jìn)一步改善收藏的機(jī)會(huì)。
90. The United States Constitution requires that President be a natural-born citizen, thirty-five years of age or older, who has lived in the United States for a minimum of fourteen years.
90.美國(guó)憲法要求總統(tǒng)是生于美國(guó)本土的公民,三十五歲以上,并且在美國(guó)居住了至少十四年。
91. Arid regions in the southwestern United States have become increasingly inviting playgrounds for the growing number of recreation seekers who own vehicles such as motorcycles or powered trail bikes and indulge in hill-climbing contests or in caving new trails in the desert.
91.美國(guó)西部的不毛之地正成為玩耍的地方,對(duì)越來(lái)越多擁有摩托車(chē)或越野單車(chē)類(lèi)車(chē)輛的,喜歡放縱于爬坡比賽或開(kāi)辟新的沙漠通道的尋歡作樂(lè)者具有不斷增長(zhǎng)的吸引力。
92. Stone does decay, and so tools of long ago have remained when even the bones of the man who made them have disappeared without trace.
92.石頭不會(huì)腐爛,所以以前的(石器)工具能保存下來(lái),雖然它們的制造者已經(jīng)消失的無(wú)影無(wú)蹤。
93. Insects would make it impossible for us to live in the world; they would devour all our crops and kill our flocks and herds, if it were not for the protection we get from insect-eating animals.
93.昆蟲(chóng)就將會(huì)使我們無(wú)法在這個(gè)世界上居住;如果我們沒(méi)有受到以昆蟲(chóng)為食的動(dòng)物的保護(hù),昆蟲(chóng)就會(huì)吞嚼掉我們所有的莊稼并殺死我們飼養(yǎng)的禽獸。
94. It is true that during their explorations they often faced difficulties and dangers of the most perilous nature, equipped in a manner which would make a modern climber shudder at the thought, but they did not go out of their way to court such excitement.
94.確實(shí),他們?cè)谔诫U(xiǎn)中遇到了極具威脅性的困難和危險(xiǎn),而他們的裝備會(huì)讓一個(gè)現(xiàn)代登山者想一想都會(huì)渾身顫栗。不過(guò)他們并不是刻意去追求刺激的。
95. There is only one difference between an old man and a young one: the young man has a glorious future before him and old one has a splendid future behind him: and maybe that is where the rub is.
95.老人和年輕人之間只有一個(gè)區(qū)別:年輕人的前面有輝煌的未來(lái),老年人燦爛的未來(lái)卻已在它們身后。這也許就是困難之所在。
96. I find young people exciting. They have an air of freedom, and they have not a dreary commitment to mean ambitions or love comfort. They are not anxious social climbers, and they have no devotion to material things.
96.我們位年強(qiáng)人振奮。它們帶有自由的氣息,他們不會(huì)為狹隘的野心和貪婪享受而孜孜以求。他們不是焦慮的向上爬的人,他們不會(huì)對(duì)物質(zhì)性的東西難舍難分。
97. I am always amazed when I hear people saying that sport creates goodwill between the nations, and that if only the common peoples of the world could meet one another at football or cricket, they would have no inclination to meet on the battlefield.
97.每次我聽(tīng)說(shuō)體育運(yùn)動(dòng)能夠在國(guó)家間建立起友好感情,說(shuō)世界各地的普通人只要能在足球場(chǎng)或板球場(chǎng)上相遇就會(huì)沒(méi)有興趣在戰(zhàn)場(chǎng)上相遇的話(huà),我都倍感詫異。
98. It is impossible to say simply for the fun and exercise: as soon as the question of prestige arises, as soon as you feel that you and some larger unit will be disgraced if you lose, the most savage combative instincts are around.
98.沒(méi)有可能僅僅為了娛樂(lè)或鍛煉而運(yùn)動(dòng):一旦有了問(wèn)題,一旦你覺(jué)得你輸了你和你所屬團(tuán)體會(huì)有失體面時(shí),你最野蠻的好斗本能就會(huì)被激發(fā)出來(lái)。
99. It has been found that certain bats emit squeaks and by receiving the echoes, they can locate and steer clear of obstacles------or locate flying insects on which they feed. This echo-location in bats is often compared with radar, the principle of which is similar.
99.人們已經(jīng)發(fā)現(xiàn),某些蝙蝠發(fā)出尖叫聲并靠接受回響來(lái)鎖定和避免障礙物——或者找到它們賴(lài)以為生的昆蟲(chóng)。蝙蝠這種回響定位法常拿來(lái)和原理與之很相近似的雷達(dá)相比。
100. As the time and cost of making a clip drop to a few days and a few hundred dollars, engineers may soon be free to let their imaginations soar without being penalized by expensive failure.
100.隨著芯片制造時(shí)間和費(fèi)用降低到了幾天和幾百美元,工程師們可能很快可以任他們的想象馳騁而不會(huì)被昂貴的失敗所懲罰。
概述
本手冊(cè)包含conf/server.xml文件中所有配置指示符(directives)的參考信息,這些指示符決定了Tomcat?5的行為。本手冊(cè)并不描述應(yīng)該使用哪個(gè)配置指示符來(lái)完成特定的任務(wù),請(qǐng)參考對(duì)應(yīng)的HOW-TO文件。?
配置元素的描述按照如下主目錄來(lái)組織:
????頂級(jí)元素-
????連接器(Connectors)-代表外部客戶(hù)之間的接口。外部客戶(hù)向特定的Service發(fā)送請(qǐng)求,并接收響應(yīng);?
????容器-代表一些組件。這些組件的功能是處理進(jìn)來(lái)的請(qǐng)求,生成對(duì)應(yīng)的響應(yīng)。引擎(Engine)處理一個(gè)Service的所有請(qǐng)求,Host處理一個(gè)特定虛擬主機(jī)的所有請(qǐng)求。Context處理某個(gè)特定web應(yīng)用的所有請(qǐng)求;?
????嵌入組件-代表可以嵌入容器的某個(gè)元素之中的元素。有些元素可以嵌入任何容器,而另一些元素只能嵌入在Context中。?
對(duì)每個(gè)元素,對(duì)應(yīng)的文檔按照如下方式組織:?
概述-對(duì)這個(gè)特定組件的整體描述。每個(gè)組件在org.apache.catalina包中存在一個(gè)對(duì)應(yīng)的Java接口,可能有一個(gè)或多個(gè)標(biāo)準(zhǔn)實(shí)現(xiàn)實(shí)現(xiàn)了這個(gè)接口;?
屬性-該元素的合法屬性。一般來(lái)說(shuō),這又分成公共屬性和標(biāo)準(zhǔn)實(shí)現(xiàn)屬性。公共屬性是所有實(shí)現(xiàn)了該Java接口的實(shí)現(xiàn)都具有的屬性。標(biāo)準(zhǔn)實(shí)現(xiàn)屬性是實(shí)現(xiàn)了該Java接口的某個(gè)特定Java類(lèi)具有的屬性。必需的屬性用粗體標(biāo)出;?
嵌套組件-列舉了可以合法地嵌在這個(gè)元素下的組件;?
專(zhuān)有特性-描述了該接口的標(biāo)準(zhǔn)實(shí)現(xiàn)支持的專(zhuān)有特性的配置,與每個(gè)元素類(lèi)型有關(guān);
頂級(jí)元素:Server??Service
連接器:HTTP/1.1??JK?
容器:Context??Engine??Host?
嵌套組件:
Default?Context?
Global?Resources?
Loader?
Logger?
Manager?
Realm?
Resources?
Valve?
Log4j基本使用方法
(轉(zhuǎn)http://blogger.org.cn/blog/more.asp?name=dashee&id=6431)
Log4j由三個(gè)重要的組件構(gòu)成:日志信息的優(yōu)先級(jí),日志信息的輸出目的地,日志信息的輸出格式。日志信息的優(yōu)先級(jí)從高到低有ERROR、WARN、
INFO、DEBUG,分別用來(lái)指定這條日志信息的重要程度;日志信息的輸出目的地指定了日志將打印到控制臺(tái)還是文件中;而輸出格式則控制了日志信息的顯示內(nèi)容。
一、定義配置文件
其實(shí)您也可以完全不使用配置文件,而是在代碼中配置Log4j環(huán)境。但是,使用配置文件將使您的應(yīng)用程序更加靈活。Log4j支持兩種配置文件格式,一種是XML格式的文件,一種是Java特性文件(鍵=值)。下面我們介紹使用Java特性文件做為配置文件的方法:
1.配置根Logger,其語(yǔ)法為:
log4j.rootLogger
= [ level ] , appenderName, appenderName, …
其中,level
是日志記錄的優(yōu)先級(jí),分為OFF、FATAL、ERROR、WARN、INFO、DEBUG、ALL或者您定義的級(jí)別。Log4j建議只使用四個(gè)級(jí)別,優(yōu)先級(jí)從高到低分別是ERROR、WARN、INFO、DEBUG。通過(guò)在這里定義的級(jí)別,您可以控制到應(yīng)用程序中相應(yīng)級(jí)別的日志信息的開(kāi)關(guān)。比如在這里定義了INFO級(jí)別,則應(yīng)用程序中所有DEBUG級(jí)別的日志信息將不被打印出來(lái)。
appenderName就是指B日志信息輸出到哪個(gè)地方。您可以同時(shí)指定多個(gè)輸出目的地。
2.配置日志信息輸出目的地Appender,其語(yǔ)法為:
log4j.appender.appenderName
=
fully.qualified.name.of.appender.class
log4j.appender.appenderName.option1
= value1
…
log4j.appender.appenderName.option =
valueN
其中,Log4j提供的appender有以下幾種:
org.apache.log4j.ConsoleAppender(控制臺(tái)),
org.apache.log4j.FileAppender(文件),
org.apache.log4j.DailyRollingFileAppender(每天產(chǎn)生一個(gè)日志文件),
org.apache.log4j.RollingFileAppender(文件大小到達(dá)指定尺寸的時(shí)候產(chǎn)生一個(gè)新的文件),
org.apache.log4j.WriterAppender(將日志信息以流格式發(fā)送到任意指定的地方)
3.配置日志信息的格式(布局),其語(yǔ)法為:
log4j.appender.appenderName.layout
=
fully.qualified.name.of.layout.class
log4j.appender.appenderName.layout.option1
= value1
…
log4j.appender.appenderName.layout.option =
valueN
其中,Log4j提供的layout有以e幾種:
org.apache.log4j.HTMLLayout(以HTML表格形式布局),
org.apache.log4j.PatternLayout(可以靈活地指定布局模式),
org.apache.log4j.SimpleLayout(包含日志信息的級(jí)別和信息字符串),
org.apache.log4j.TTCCLayout(包含日志產(chǎn)生的時(shí)間、線(xiàn)程、類(lèi)別等等信息)
Log4J采用類(lèi)似C語(yǔ)言中的printf函數(shù)的打印格式格式化日志信息,打印參數(shù)如下:
%m 輸出代碼中指定的消息
%p 輸出優(yōu)先級(jí),即DEBUG,INFO,WARN,ERROR,F(xiàn)ATAL
%r
輸出自應(yīng)用啟動(dòng)到輸出該log信息耗費(fèi)的毫秒數(shù)
%c 輸出所屬的類(lèi)目,通常就是所在類(lèi)的全名
%t 輸出產(chǎn)生該日志事件的線(xiàn)程名
%n
輸出一個(gè)回車(chē)換行符,Windows平臺(tái)為“\r\n”,Unix平臺(tái)為“\n”
%d
輸出日志時(shí)間點(diǎn)的日期或時(shí)間,默認(rèn)格式為ISO8601,也可以在其后指定格式,比如:%d{yyy MMM dd
HH:mm:ss,SSS},輸出類(lèi)似:2002年10月18日 22:10:28,921
%l
輸出日志事件的發(fā)生位置,包括類(lèi)目名、發(fā)生的線(xiàn)程,以及在代碼中的行數(shù)。舉例:Testlog4.main(TestLog4.java:10)
二、在代碼中使用Log4j
1.得到記錄器
使用Log4j,第一步就是獲取日志記錄器,這個(gè)記錄器將負(fù)責(zé)控制日志信息。其語(yǔ)法為:
public
static Logger getLogger( String
name)
通過(guò)指定的名字獲得記錄器,如果必要的話(huà),則為這個(gè)名字創(chuàng)建一個(gè)新的記錄器。Name一般取本類(lèi)的名字,比如:
static
Logger logger = Logger.getLogger ( ServerWithLog4j.class.getName ()
)
2.讀取配置文件
當(dāng)獲得了日志記錄器之后,第二步將配置Log4j環(huán)境,其語(yǔ)法為:
BasicConfigurator.configure
(): 自動(dòng)快速地使用缺省Log4j環(huán)境。
PropertyConfigurator.configure ( String
configFilename) :讀取使用Java的特性文件編寫(xiě)的配置文件。
DOMConfigurator.configure ( String
filename )
:讀取XML形式的配置文件。
3.插入記錄信息(格式化日志信息)
當(dāng)上兩個(gè)必要步驟執(zhí)行完畢,您就可以輕松地使用不同優(yōu)先級(jí)別的日志記錄語(yǔ)句插入到您想記錄日志的任何地方,其語(yǔ)法如下:
Logger.debug
( Object message ) ;
Logger.info ( Object message ) ;
Logger.warn (
Object message ) ;
Logger.error ( Object message ) ;
效果:
<span>SPAN標(biāo)記有一個(gè)重要而實(shí)用的特性,即它什么事也不會(huì)做,它的唯一目的就是圍繞你的HTML代碼中的其它元素,這樣你就可以為它們指定樣式了。在此例中,<span>標(biāo)識(shí)符允許你將一個(gè)段落分成不同的部分。
還有一個(gè)標(biāo)識(shí)符具有類(lèi)似的功能,<div>DIV也被用來(lái)在HTML文件中建立邏輯部分。但與<div>SPAN不同,<div>工作于文本塊一級(jí),它在它所包含的HTML元素的前面及后面都引入了行分隔。
隨著2005年Ajax這個(gè)名詞的流行,關(guān)于Ajax技術(shù)本身的爭(zhēng)論就一直喋喋不休。有些人為這種技術(shù)而激動(dòng),興奮得投入到 Ajax的大潮中。有些人對(duì)Ajax大為詬病,認(rèn)為其不過(guò)是一種炒作,其類(lèi)似技術(shù)早已實(shí)現(xiàn),毫無(wú)新意。也有些人還持一種觀望的狀態(tài),等到大勢(shì)所趨時(shí),才進(jìn) 行投入。總之,一個(gè)新興事物的誕生之初,有不同的觀點(diǎn)進(jìn)行爭(zhēng)論是很正常的現(xiàn)象。作者作為支持Ajax的一派,對(duì)這個(gè)新生事物,可以說(shuō)是傾注了很多精 力。從最初的不懂,到略知一二,再到深刻認(rèn)識(shí),發(fā)現(xiàn)Ajax背后隱藏的趨勢(shì),多少有些亢奮。憑此文,希望能夠把自己的觀點(diǎn),表達(dá)一二。
Ajax在2005年異軍突起,伴隨著Web2.0,成為了本年度最為流行的名詞之一。很多人看到這樣一門(mén)技術(shù),可能會(huì)很奇怪,感到很突兀。
如果你僅僅試圖從Ajax本身去尋找這些問(wèn) 題的答案,你可能會(huì)一無(wú)所獲。如果你僅能夠看到Ajax本身,那就如同瞎子摸象、管中窺豹,不能領(lǐng)略全局,當(dāng)然也不能領(lǐng)會(huì)其意義。相反,如果你能夠從一個(gè) 更好的高度上去思考Ajax所帶來(lái)的好處,把Ajax放到一個(gè)相關(guān)的語(yǔ)境中去體會(huì),你就會(huì)有另一番發(fā)現(xiàn)。
與Ajax相連的,還有這么兩個(gè)名詞—RiA和Web2.0。
什么是RiA?
RiA就是Rich Internet Application的縮寫(xiě)。
“Rich”代表功能強(qiáng)大,高交互性,高用戶(hù)體驗(yàn)。
“Internet”代表方便。應(yīng)用程序部署方便,用戶(hù)使用方便。跨系統(tǒng),跨語(yǔ)言。
其實(shí)RiA實(shí)際上一種基于Web的C/S架構(gòu)(我稱(chēng)之為C/S/B)。由于有一個(gè)客戶(hù)端,所以RiA應(yīng)用可以提供強(qiáng)大的功能,讓用戶(hù)體驗(yàn)到高交互性,高 用戶(hù)體驗(yàn)。同時(shí),RiA又是基于Internet瀏覽器的應(yīng)用,所以,用戶(hù)使用RiA非常方便。理想來(lái)說(shuō),用戶(hù)使用RiA應(yīng)當(dāng)像現(xiàn)在使用普通網(wǎng)頁(yè)一樣方 便。用戶(hù)不需要安裝任何的客戶(hù)端軟件,只要擁有瀏覽器。當(dāng)用戶(hù)通過(guò)瀏覽器發(fā)出指令,希望運(yùn)行某種RiA應(yīng)用程序時(shí),一切都會(huì)飛快的建立在客戶(hù)端機(jī)器上,就 像你在Web上點(diǎn)擊一個(gè)頁(yè)面一樣。
目前,典型的RiA的代表有如下幾種技術(shù):
應(yīng)該說(shuō),各大廠商均看到了RiA美好的未來(lái),紛紛行動(dòng)起來(lái)希望分一杯羹。只有Ajax技術(shù)在這些技術(shù)中有些特立獨(dú)行。
Ajax并不屬于任何廠商,相反,Ajax代表的是一種開(kāi)源的風(fēng)格。由于Ajax所采用的各種技術(shù)要么是基于標(biāo)準(zhǔn)的,要么也沒(méi)有被各大廠商所壟斷,所以 Ajax真正是一個(gè)平民化的技術(shù),誰(shuí)都可以用它。同時(shí),由于Ajax采用的各種技術(shù)基于現(xiàn)有的瀏覽器,所以兼容性最好。用Ajax技術(shù)建立的網(wǎng)站,目前均 可以直接運(yùn)行,不需要任何客戶(hù)端的改變。
其他的各種技術(shù)與Ajax比較起來(lái),目前或多或少的還有些兼容性的問(wèn)題。雖然這些技術(shù)功能強(qiáng) 大,但是目前它們應(yīng)用起來(lái)還并不是很方便。不過(guò)可以看到,隨著時(shí)間的推進(jìn),相信,未來(lái)還是屬于功能更強(qiáng)大的一方。除非Ajax本身的功能有所加強(qiáng)。這樣, 就看Javascript的功力了。
RiA實(shí)際上代表的是一種回歸。
最開(kāi)始流行的C/S結(jié)構(gòu),因?yàn)楣δ軓?qiáng)大,而且范圍有限,不需要害怕部署問(wèn)題。之后隨著用戶(hù)的增加,部署問(wèn)題越來(lái)越大,導(dǎo)致B/S模式的產(chǎn)生。
B/S模式雖然功能有限,但是卻使用非常方便。從長(zhǎng)期來(lái)看,方便的作用還是非常巨大的。功能可以不斷增強(qiáng),但是如果不方便,將嚇走所有的客戶(hù)。實(shí)際上觀 察一下Web的發(fā)展,就會(huì)發(fā)現(xiàn),如今百花齊放的Web開(kāi)發(fā)技術(shù),其目的都是為了提高B/S架構(gòu)的交互性,讓他更能適應(yīng)需要而已。
不過(guò), 隨著目前越來(lái)越多的應(yīng)用需要一直到Web上,人們終于發(fā)現(xiàn)B/S模式的缺點(diǎn)。各種技術(shù)上的硬性問(wèn)題均限制著B(niǎo)/S模式的發(fā)展。從最基本的請(qǐng)求/相應(yīng)模型, HTTP協(xié)議,到所有負(fù)載均運(yùn)行在服務(wù)器上的事實(shí),讓我們迫切需要一種方式來(lái)提高Web的交互能力,但同時(shí)又不能喪失它的使用方便性。
于是,RiA誕生了。RiA就是基于瀏覽器的C/S結(jié)構(gòu)。它將部分的服務(wù)器負(fù)載轉(zhuǎn)移到客戶(hù)端,同時(shí)又不會(huì)喪失使用和部署上的方便性。所以說(shuō),RiA就是一次回歸,只不過(guò)這次回歸我們沒(méi)有原地不動(dòng),相反,我們找到了最佳結(jié)合點(diǎn)。如圖1所示:
圖1、RiA就是一種回歸
但是,我們知道了RiA是一種回歸。可是,為什么RiA會(huì)盛行呢?這就需要我們把RiA放到Web2.0的環(huán)境中去思考。
什么是Web2.0?
目前,對(duì)于Web2.0并沒(méi)有明確的定義。在《What Is Web 2.0》這篇文章里,對(duì)Web2.0應(yīng)用所需要具備的各種特點(diǎn)進(jìn)行了總結(jié),并且提了出來(lái)。
雖然有這么多特性,但是Web2.0背后最本質(zhì)的東西就只有兩點(diǎn):
正是基于這兩點(diǎn),Web2.0時(shí)代迫切需要一種使用方便,高交互性的應(yīng)用程序,而此重任,就落在了RiA身上。
通過(guò)圖2,你可以看到由Web1.0到Web2.0的變化。
圖2、Web1.0向Web2.0的演變
還是在《What Is Web 2.0》那篇文章里,勾勒出了一幅Web2.0的Meme Map。這張圖的中心代表的是Web2.0的核心概念,而旁邊是Web2.0概念的延伸。在這張圖里,我試圖勾勒出一些迫切需要RiA的特征點(diǎn)。實(shí)際上, 你可以看到,在Web2.0的Meme Map里,到處充滿(mǎn)了RiA的倩影。如圖3所示:
圖3、Web2.0中的RiA倩影
看看大象本身
介紹了這么多,讓我們總結(jié)一下。
隨著軟件和互聯(lián)網(wǎng)的發(fā)展,需求導(dǎo)致一種新的計(jì)算模型出現(xiàn)。這種計(jì)算模型的特色就是,軟件逐漸的有前臺(tái)推向后臺(tái),以平臺(tái)的方式提供服務(wù),讓用戶(hù)在前臺(tái)表演。
計(jì)算模型的變化,導(dǎo)致Web2.0的出現(xiàn)。盡管僅僅是開(kāi)始,但是,從Web2.0的身上你依然可以依稀看到這種變化的趨勢(shì)。不過(guò)Web2.0要想有如此變化,要想讓用戶(hù)參與進(jìn)來(lái),就必須提供一個(gè)用戶(hù)功能強(qiáng)大的,使用方便的用戶(hù)接口(UI)。
于是,需求導(dǎo)致了RiA的出現(xiàn)。RiA提供了一個(gè)滿(mǎn)足需求的用戶(hù)接口,使得大家可以參與到Web2.0中來(lái)。但是,RiA要想應(yīng)用起來(lái),可能還需要一個(gè)過(guò)程。
于是,幾種RiA技術(shù)中,目前使用起來(lái)最合適的Ajax凸現(xiàn)出來(lái)。正是由于Ajax出色的兼容性,讓他走到了歷史的前臺(tái)。有了它,我們開(kāi)始了一場(chǎng)新的革命。
圖4顯示了這些名詞之間的關(guān)系。把它們放在一起看,也許你會(huì)發(fā)現(xiàn)不一樣的東西。
圖4、Ajax、RiA與Web2.0
未來(lái)的樣子
當(dāng)我走在北京的街頭,我在想,如果我有一臺(tái)智能手機(jī),可以訪問(wèn)百度的map服務(wù),也許我就不會(huì)像現(xiàn)在這樣擔(dān)心迷路了。實(shí)際上,類(lèi)似的例子還有很多。如果Web2.0的明天已經(jīng)到來(lái),我們的生活會(huì)發(fā)生很多改變。
我不知道,盡管我很想知道。如果我真的能夠看到未來(lái)的樣子,再具備一些必要的執(zhí)行力的話(huà),也許我就是下一個(gè)比爾。不過(guò),看到目前的這一點(diǎn),已經(jīng)令我非常興奮。不管怎么樣,我們都有權(quán)利想象。也有權(quán)利,用我們的手去改變世界。
怎么樣?開(kāi)始吧?Let’s do it!
February 18, 2005
If anything about current interaction design can be called “glamorous,” it’s creating Web applications. After all, when was the last time you heard someone rave about the interaction design of a product that wasn’t on the Web? (Okay, besides the iPod.) All the cool, innovative new projects are online.
Despite this, Web interaction designers can’t help but feel a little envious of our colleagues who create desktop software. Desktop applications have a richness and responsiveness that has seemed out of reach on the Web. The same simplicity that enabled the Web’s rapid proliferation also creates a gap between the experiences we can provide and the experiences users can get from a desktop application.
That gap is closing. Take a look at Google Suggest. Watch the way the suggested terms update as you type, almost instantly. Now look at Google Maps. Zoom in. Use your cursor to grab the map and scroll around a bit. Again, everything happens almost instantly, with no waiting for pages to reload.
Google Suggest and Google Maps are two examples of a new approach to web applications that we at Adaptive Path have been calling Ajax. The name is shorthand for Asynchronous JavaScript + XML, and it represents a fundamental shift in what’s possible on the Web.
Ajax isn’t a technology. It’s really several technologies, each flourishing in its own right, coming together in powerful new ways. Ajax incorporates:
The classic web application model works like this: Most user actions in the interface trigger an HTTP request back to a web server. The server does some processing — retrieving data, crunching numbers, talking to various legacy systems — and then returns an HTML page to the client. It’s a model adapted from the Web’s original use as a hypertext medium, but as fans of The Elements of User Experience know, what makes the Web good for hypertext doesn’t necessarily make it good for software applications.
Figure 1: The traditional model for web applications (left) compared to the Ajax model (right).
This approach makes a lot of technical sense, but it doesn’t make for a great user experience. While the server is doing its thing, what’s the user doing? That’s right, waiting. And at every step in a task, the user waits some more.
Obviously, if we were designing the Web from scratch for applications, we wouldn’t make users wait around. Once an interface is loaded, why should the user interaction come to a halt every time the application needs something from the server? In fact, why should the user see the application go to the server at all?
An Ajax application eliminates the start-stop-start-stop nature of interaction on the Web by introducing an intermediary — an Ajax engine — between the user and the server. It seems like adding a layer to the application would make it less responsive, but the opposite is true.
Instead of loading a webpage, at the start of the session, the browser loads an Ajax engine — written in JavaScript and usually tucked away in a hidden frame. This engine is responsible for both rendering the interface the user sees and communicating with the server on the user’s behalf. The Ajax engine allows the user’s interaction with the application to happen asynchronously — independent of communication with the server. So the user is never staring at a blank browser window and an hourglass icon, waiting around for the server to do something.
Figure 2: The synchronous interaction pattern of a traditional web application (top) compared with the asynchronous pattern of an Ajax application (bottom).
Every user action that normally would generate an HTTP request takes the form of a JavaScript call to the Ajax engine instead. Any response to a user action that doesn’t require a trip back to the server — such as simple data validation, editing data in memory, and even some navigation — the engine handles on its own. If the engine needs something from the server in order to respond — if it’s submitting data for processing, loading additional interface code, or retrieving new data — the engine makes those requests asynchronously, usually using XML, without stalling a user’s interaction with the application.
Google is making a huge investment in developing the Ajax approach. All of the major products Google has introduced over the last year — Orkut, Gmail, the latest beta version of Google Groups, Google Suggest, and Google Maps — are Ajax applications. (For more on the technical nuts and bolts of these Ajax implementations, check out these excellent analyses of Gmail, Google Suggest, and Google Maps.) Others are following suit: many of the features that people love in Flickr depend on Ajax, and Amazon’s A9.com search engine applies similar techniques.
These projects demonstrate that Ajax is not only technically sound, but also practical for real-world applications. This isn’t another technology that only works in a laboratory. And Ajax applications can be any size, from the very simple, single-function Google Suggest to the very complex and sophisticated Google Maps.
At Adaptive Path, we’ve been doing our own work with Ajax over the last several months, and we’re realizing we’ve only scratched the surface of the rich interaction and responsiveness that Ajax applications can provide. Ajax is an important development for Web applications, and its importance is only going to grow. And because there are so many developers out there who already know how to use these technologies, we expect to see many more organizations following Google’s lead in reaping the competitive advantage Ajax provides.
The biggest challenges in creating Ajax applications are not technical. The core Ajax technologies are mature, stable, and well understood. Instead, the challenges are for the designers of these applications: to forget what we think we know about the limitations of the Web, and begin to imagine a wider, richer range of possibilities.
It’s going to be fun.
1、表單驗(yàn)證,如何不提交就驗(yàn)證,是通過(guò)鼠標(biāo)選中其他輸入框表示前一個(gè)輸入框輸入完畢,就可以自動(dòng)進(jìn)行驗(yàn)證。2、http://www.chinaren.com/ 大家都去過(guò)吧,首頁(yè)頂部搜索條“學(xué)校、班機(jī)、同學(xué)、熱貼、網(wǎng)頁(yè)、音樂(lè)、圖片”這些標(biāo)簽,點(diǎn)一個(gè)下面的內(nèi)
容就換成與所點(diǎn)搜索項(xiàng)有關(guān)的,這是如何實(shí)現(xiàn)的呢?我要做這個(gè)功能
一.資源類(lèi)網(wǎng)站
1,國(guó)內(nèi)網(wǎng)站
1)Ajax中國(guó)(推薦)
一個(gè)專(zhuān)業(yè)的ajax技術(shù)網(wǎng)站,分類(lèi)清晰,有大量的電子版教程,以及AJAX源碼下載!
2)ajaxcn.org
李琨老師的blog。李琨:《ajax實(shí)戰(zhàn)》譯者.
3)www.ajaxw3c.com
2,國(guó)外網(wǎng)站
1)、Ajax的誕生
Ajax:ANewApproachtoWebApplications
www.adaptivepath.com/publications/essays/archives/000385.php
2)、AJAXMatters
關(guān)于Ajax技術(shù)一個(gè)信息量非常大的網(wǎng)站,有點(diǎn)像Ajax世界中的TSS。
3)、AJAXPatterns
與AJAX設(shè)計(jì)模式相關(guān)的資源。
www.softwareas.com/ajax-patterns
二.熱門(mén)文章
1.什么是AJAX
www.okajax.com/info/net/20060510.html
2.ajax技術(shù)簡(jiǎn)介
www.okajax.com/info/basic/200604654.html
3.ajax.net
www.okajax.com/info/basic/200604556.html
www.okajax.com/info/tech/200605589.html
weblogs.asp.net/mschwarz/archive/2005/04/11/399893.aspx(英文)
三.ajax相關(guān)下載(電子書(shū)教程/源碼)
1.Ajax基礎(chǔ)教程電子版
www.okajax.com/info/bookdown/200604950.htm
2.《AJAX實(shí)戰(zhàn)》ajaxinaction電子版
www.okajax.com/info/bookdown/200604366.htm
3.AJAX開(kāi)發(fā)簡(jiǎn)略
www.okajax.com/info/bookdown/20060538.htm
4.AJAX版CD管理系統(tǒng)(jsp)
www.okajax.com/info/codedown/200604327.htm
5.Alexa查詢(xún)系統(tǒng)(Xmlhttp+Ajax)
www.okajax.com/info/codedown/200604982.htm
6.ASP.NET+AJAX解決網(wǎng)頁(yè)打開(kāi)等待問(wèn)題
www.okajax.com/info/codedown/200604166.htm
7.Ajax技術(shù)簡(jiǎn)介(ajaxdemo)
www.okajax.com/info/codedown/200604576.htm
四.ajax相關(guān)圖書(shū)
1.《Ajax實(shí)戰(zhàn)》(目前Ajax領(lǐng)域最為全面深入的一本著作)
www.china-pub.com/computers/common/info.asp?id=28433
2.《Ajax基礎(chǔ)教程》(亞馬遜計(jì)算機(jī)榜首圖書(shū),國(guó)內(nèi)第1本Ajax圖書(shū),中文pdf版)
http://www.devworld.cn/art2527.aspx
3.《Ajax修煉之道-Web2.0入門(mén)》(Ajax從小工到專(zhuān)家的首選圖書(shū))
www.china-pub.com/computers/common/info.asp?id=29430
4.《征服Ajax+Lucene構(gòu)建搜索引擎》
www.china-pub.com/computers/common/info.asp?id=29996
5.《征服Ajax--Web2.0快速入門(mén)與項(xiàng)目實(shí)踐(.net)》
www.china-pub.com/computers/common/info.asp?id=29995
6.《Ajax開(kāi)發(fā)精要--概念、案例與框架》
www.china-pub.com/computers/common/info.asp?id=30006
7.AJAX——新手快車(chē)道
???????????
http://www.sp1.cn/ajax/info/bookdown/200605663.htm
8,Ajax 探密 (Ajax Hacks )
http://www.sp1.cn/ajax/info/bookdown/20060540.htm
9.Ajax基礎(chǔ)教程電子版
???????????
http://wh.wlha.com.cn/bbs/pic/ajaxbasic.rar
???????????????
五.部分技術(shù)文章
www.dragonson.com/doc/ajax.html
Ajax內(nèi)部交流文檔
info96.k12studio.com/~nio/comments.php?id=242_0_1_0_C
簡(jiǎn)單地對(duì)Ajax進(jìn)行描述介紹
www.adaptivepath.com/publications/essays/archives/000385.php
Ajax:ANewApproachtoWebApplications
jibbering.com/2002/4/httprequest.html
UsingtheXMLHTTPRequestobject
developer.apple.com/internet/webcontent/xmlhttpreq.html
DynamicHTMLandXML:TheXMLHttpRequestObject
del.icio.us/popular/ajax
www.fiftyfoureleven.com/resources/programming/xmlhttprequest/examples
XMLHttpRequest&AjaxWorkingExamples
www.xml.com/lpt/a/2005/02/09/xml-http-request.html
VeryDynamicWebInterfaces
www.standards-schmandards.com/index.php?2005/03/01/16-ajax-and-accessibility
AJAXandAccessibility
www.xml.com/lpt/a/2005/05/11/ajax-error.html
ErrorsandAJAX
www.softwareas.com/ajax-patterns
AJAXPatterns:DesignPatternsforAJAXUsability
www.backbase.com/download/Whitepaper%20Backbase%20AJAX%20and%20Beyond.pdf
WhitepaperBackbaseAJAXandBeyond
www.ajaxpatterns.org/index.php?title=Main_Page
AJAXpatterns
www.onlamp.com/pub/a/onlamp/2005/05/19/xmlhttprequest.html
六、補(bǔ)充內(nèi)容
在增加一個(gè),有些基礎(chǔ)教程,雖然不多,但是都蠻有用的!
http://www.sp1.cn/ajax/info/basic/index.htm?
Ajax & XMLHttpRequset
http://tech.acnow.net/Html/Web/ASP/ASP_Skill/2006-6/15/163322869.shtml
了解Ajax框架
http://kb.csdn.net/java/Articles/200606/0964add7-c017-484e-9652-5d85030222c5.html?
標(biāo)題 實(shí)現(xiàn)無(wú)刷新閃爍二級(jí)聯(lián)動(dòng)下拉菜單
http://www.seaskyer.net/Index/Catalog11/266.html
???
從最簡(jiǎn)單的角度來(lái)說(shuō),DWR 是一個(gè)引擎,可以把服務(wù)器端 Java 對(duì)象的方法公開(kāi)給 JavaScript 代碼。使用 DWR
可以有效地從應(yīng)用程序代碼中把 Ajax 的全部請(qǐng)求-響應(yīng)循環(huán)消除掉。這意味著客戶(hù)端代碼再也不需要直接處理 XMLHttpRequest
對(duì)象或者服務(wù)器的響應(yīng)。不再需要編寫(xiě)對(duì)象的序列化代碼或者使用第三方工具才能把對(duì)象變成 XML。甚至不再需要編寫(xiě) servlet 代碼把 Ajax 請(qǐng)求調(diào)整成對(duì) Java 域?qū)ο蟮恼{(diào)用。
???
DWR 是作為 Web 應(yīng)用程序中的 servlet 部署的。把它看作一個(gè)黑盒子,這個(gè) servlet
有兩個(gè)主要作用:首先,對(duì)于公開(kāi)的每個(gè)類(lèi),DWR 動(dòng)態(tài)地生成包含在 Web 頁(yè)面中的 JavaScript。生成的 JavaScript
包含存根函數(shù),代表 Java 類(lèi)上的對(duì)應(yīng)方法并在幕后執(zhí)行 XMLHttpRequest
。
這些請(qǐng)求被發(fā)送給 DWR,這時(shí)它的第二個(gè)作用就是把請(qǐng)求翻譯成服務(wù)器端 Java 對(duì)象上的方法調(diào)用并把方法的返回值放在 servlet
響應(yīng)中發(fā)送回客戶(hù)端,編碼成 JavaScript。DWR 還提供了幫助執(zhí)行常見(jiàn)的用戶(hù)界面任務(wù)的 JavaScript 工具函數(shù)。
---------------------------------
概述
這篇文章闡述了使用開(kāi)源項(xiàng)目DWR(直接Web遠(yuǎn)程控制)和AJAX(異步JavaScript和XML)的概念來(lái)提高Web應(yīng)用的可用性。作者一步步來(lái)展示DWR如何使得AJAX的應(yīng)用既簡(jiǎn)單又快捷。(1600字;2005年6月20日)
AJAX,
或者說(shuō)是異步JavaScript和XML,描述了一種使用混合了HTML(或XHTML)和層疊樣式表作為表達(dá)信息,來(lái)創(chuàng)建交互式的Web應(yīng)用的開(kāi)發(fā)技
術(shù);文檔對(duì)象模型(DOM),JavaScript,動(dòng)態(tài)地顯示和與表達(dá)信息進(jìn)行交互;并且,XMLHttpRequest對(duì)象與Web服務(wù)器異步地交換
和處理數(shù)據(jù)。
因特網(wǎng)上許多例子展示了在一個(gè)HTML文件內(nèi)部使用XMLHttpRequest與服務(wù)器端進(jìn)行交互的必要的步驟。當(dāng)手工地
編寫(xiě)和維護(hù)XMLHttpRequest代碼時(shí),開(kāi)發(fā)者必須處理許多潛在的問(wèn)題,特別是類(lèi)似于跨瀏覽器的DOM實(shí)現(xiàn)的兼容性這樣的問(wèn)題。這將會(huì)導(dǎo)致在編碼
和調(diào)試Javascript代碼上面花費(fèi)數(shù)不清的時(shí)間,這顯然對(duì)開(kāi)發(fā)者來(lái)說(shuō)很不友好。
DWR(直接Web遠(yuǎn)程控制)項(xiàng)目是在Apache
許可下的一個(gè)開(kāi)源的解決方案,它供給那些想要以一種簡(jiǎn)單的方式使用AJAX和XMLHttpRequest的開(kāi)發(fā)者。它具有一套Javascript功能
集,它們把從HTML頁(yè)面調(diào)用應(yīng)用服務(wù)器上的Java對(duì)象的方法簡(jiǎn)化了。它操控不同類(lèi)型的參數(shù),并同時(shí)保持了HTML代碼的可讀性。
DWR
不是對(duì)一個(gè)設(shè)計(jì)的插入,也不強(qiáng)迫對(duì)象使用任何種類(lèi)的繼承結(jié)構(gòu)。它和servlet框架內(nèi)的應(yīng)用配合的很好。對(duì)缺少DHTML編程經(jīng)驗(yàn)的開(kāi)發(fā)者來(lái)說(shuō),DWR
也提供了一個(gè)JavaScript庫(kù)包含了經(jīng)常使用的DHTML任務(wù),如組裝表,用item填充select下拉框,改變HTML元素的內(nèi)容,如<
div>和<span>
DWR網(wǎng)站是詳盡的并且有大量的文檔,這也是這篇文章的基礎(chǔ)。一些例子用來(lái)展示DWR如何使用和用它的庫(kù)可以完成什么樣的工作。
這篇文章讓讀者看到了一個(gè)使用了DWR的Web應(yīng)用是如何一步步建立的。我會(huì)展示創(chuàng)建這個(gè)簡(jiǎn)單的示例應(yīng)用的必要的細(xì)節(jié),這個(gè)應(yīng)用是可下載的并且可以在你的環(huán)境中布署來(lái)看看DWR如何工作。
注意:找到有關(guān)AJAX的信息并不困難;網(wǎng)頁(yè)上有幾篇文章和博客的條目涵蓋了這個(gè)主題,每一個(gè)都試圖指出和評(píng)論這個(gè)概念的不同的方面。在資源部分,你會(huì)找到一些有趣的指向示例和文章的鏈接,來(lái)學(xué)習(xí)AJAX的更多的內(nèi)容。
示例應(yīng)用
這篇文章使用的示例應(yīng)用模擬了多倫多的一個(gè)公寓出租搜索引擎。用戶(hù)可以在搜索前選擇一組搜索標(biāo)準(zhǔn)。為了提高交互性,AJAX中以下兩種情況下使用:
·應(yīng)用通告用戶(hù)配合他的選擇會(huì)返回多少搜索結(jié)果。這個(gè)數(shù)字是實(shí)時(shí)更新的-使用AJAX-當(dāng)用戶(hù)選擇的臥室和浴室的數(shù)量,或者價(jià)格范圍變化時(shí)。當(dāng)符合標(biāo)準(zhǔn)的搜索結(jié)果沒(méi)有或太多時(shí),用戶(hù)就沒(méi)有必要點(diǎn)擊搜索按紐。
·數(shù)據(jù)庫(kù)查詢(xún)并取回結(jié)果是由AJAX完成的。當(dāng)用戶(hù)按下顯示結(jié)果按鈕時(shí),數(shù)據(jù)庫(kù)執(zhí)行搜索。這樣,應(yīng)用看起來(lái)更具響應(yīng)了,而整個(gè)頁(yè)面不需要重載來(lái)顯示結(jié)果。
數(shù)據(jù)庫(kù)
我們使用的數(shù)據(jù)庫(kù)是HSQL,它是一種占用資源很小的Java SQL數(shù)據(jù)庫(kù)引擎,可以不需要安裝和配置的與Web應(yīng)用捆綁在一起。一個(gè)SQL文件被用來(lái)在Web應(yīng)用的上下文啟動(dòng)時(shí)創(chuàng)建一個(gè)內(nèi)存中的表并添加一些記錄。
Java類(lèi)
應(yīng)
用包含了兩個(gè)主要的類(lèi)叫Apartment和ApartmentDAO。Apartment.java類(lèi)是一個(gè)有著屬性和getter/setter方法
的簡(jiǎn)單的Java類(lèi)。ApartmentDAO.java是數(shù)據(jù)訪問(wèn)類(lèi),用來(lái)查詢(xún)數(shù)據(jù)庫(kù)并基于用戶(hù)的搜索標(biāo)準(zhǔn)來(lái)返回信息。ApartmentDAO類(lèi)的實(shí)
現(xiàn)的直接了當(dāng)?shù)?它直接使用了Java數(shù)據(jù)庫(kù)聯(lián)接調(diào)用來(lái)得到公寓的總數(shù)和符合用戶(hù)請(qǐng)求的可用公寓的列表。
DWR配置和使用
設(shè)
置DWR的使用是簡(jiǎn)單的:將DWR的jar文件拷入Web應(yīng)用的WEB-INF/lib目錄中,在web.xml中增加一個(gè)servlet聲明,并創(chuàng)建
DWR的配置文件。DWR的分發(fā)中需要使用一個(gè)單獨(dú)的jar文件。你必須將DWR
servlet加到應(yīng)用的WEB-INF/web.xml中布署描述段中去。
????<servlet>
????????<servlet-name>dwr-invoker</servlet-name>
????????<display-name>DWR Servlet</display-name>
????????<description>Direct Web Remoter Servlet</description>
????????<servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
????????<init-param>
????????????<param-name>debug</param-name>
????????????<param-value>true</param-value>
????????</init-param>
????</servlet>
????<servlet-mapping>
????????<servlet-name>dwr-invoker</servlet-name>
????????<url-pattern>/dwr/*</url-pattern>
????</servlet-mapping>
一
個(gè)可選的步驟是設(shè)置DWR為調(diào)試模式—象上面的例子那樣—在servlet描述段中將debug參數(shù)設(shè)為true。當(dāng)DWR在調(diào)試模式時(shí),你可以從
HTMl網(wǎng)頁(yè)中看到所有的可訪問(wèn)的Java對(duì)象。包含了可用對(duì)象列表的網(wǎng)頁(yè)會(huì)出現(xiàn)在/WEBAPP/dwr這個(gè)url上,它顯示了對(duì)象的公共方法。所列方
法可以從頁(yè)面中調(diào)用,允許你,第一次,運(yùn)行服務(wù)器上的對(duì)象的方法。下圖顯示了調(diào)試頁(yè)的樣子:
調(diào)試頁(yè)
現(xiàn)
在你必須讓DWR知道通過(guò)XMLHttpRequest對(duì)象,什么對(duì)象將會(huì)接收請(qǐng)求。這個(gè)任務(wù)由叫做dwr.xml的配置文件來(lái)完成。在配置文件中,定義
了DWR允許你從網(wǎng)頁(yè)中調(diào)用的對(duì)象。從設(shè)計(jì)上講,DWR允許訪問(wèn)所有公布類(lèi)的公共方法,但在我們的例子中,我們只允許訪問(wèn)幾個(gè)方法。下面是我們示例的配置
文件:
<dwr>
????<allow>
????????<convert converter="bean" match="dwr.sample.Apartment"/>
????????<create creator="new" javascript="ApartmentDAO" class="dwr.sample.ApartmentDAO">
????????????<include method="findApartments"/>
????????????<include method="countApartments"/>
????????</create>
????</allow>
</dwr>
上
面的文件實(shí)現(xiàn)了我們例子中的兩個(gè)目標(biāo)。首先,<convert>標(biāo)記告訴DWR將dwr.sample.Apartment對(duì)象的類(lèi)型轉(zhuǎn)換為
聯(lián)合數(shù)組,因?yàn)椋鲇诎踩脑颍珼WR默認(rèn)的不會(huì)轉(zhuǎn)換普通bean。第二,<create>標(biāo)記讓DWR暴露出
dwr.sample.ApartmentDAO類(lèi)給JavaScript調(diào)用;我們?cè)陧?yè)面中使用JavaScript文件被javascript屬性定
義。我們必須注意<include>標(biāo)記,它指明了dwr.sample.ApartmentDAO類(lèi)的哪些方法可用。
HTML/JSP代碼
配
置完成后,你就可以啟動(dòng)你的Web應(yīng)用了,這時(shí)DWR會(huì)為從你的HTML或Java服務(wù)器端頁(yè)面(JSP)上調(diào)用所需方法作好準(zhǔn)備,并不需要你創(chuàng)建
JavaScript文件。在search.jsp文件中,
我們必須增加由DWR提供的JavaScript接口,還有DWR引擎,加入以下三行到我們的代碼中:
??<script src='dwr/interface/ApartmentDAO.js'></script>
??<script src='dwr/engine.js'></script>
??<script src='dwr/util.js'></script>
我
們注意到當(dāng)用戶(hù)改變搜索標(biāo)準(zhǔn)時(shí),這是AJAX在示例程序中的首次應(yīng)用;正如他所看到的,當(dāng)標(biāo)準(zhǔn)改變時(shí),可用的公寓數(shù)量被更新了。我創(chuàng)建了兩個(gè)
JavaScript函數(shù):當(dāng)某一個(gè)選擇下拉框中的值變化時(shí)被調(diào)用。ApartmentDAO.countApartments()函數(shù)是最重要的部分。
最有趣的是第一個(gè)參數(shù),
loadTotal()函數(shù),它指明了當(dāng)接收到服務(wù)端的返回時(shí)DWR將會(huì)調(diào)用的JavaScript方法。loadTotal于是被調(diào)用來(lái)在HTML頁(yè)面
的<div>中顯示結(jié)果。下面是在這個(gè)交互場(chǎng)景中所使用到的JavaScript函數(shù):
function updateTotal() {
????$("resultTable").style.display = 'none';
????var bedrooms = document.getElementById("bedrooms").value;
????var bathrooms = document.getElementById("bathrooms").value;
????var price = document.getElementById("price").value;
????ApartmentDAO.countApartments(loadTotal, bedrooms, bathrooms, price);
}
function loadTotal(data) {
????document.getElementById("totalRecords").innerHTML = data;
}
很明顯,用戶(hù)想看到符合他的搜索條件的公寓列表。那么,當(dāng)用戶(hù)對(duì)他的搜索標(biāo)準(zhǔn)感到滿(mǎn)意,并且總數(shù)也是有效的話(huà),他會(huì)按下顯示結(jié)果的按紐,這將會(huì)調(diào)用updateResults() JavaScript方法:
function updateResults() {
????
????DWRUtil.removeAllRows("apartmentsbody");
????var bedrooms = document.getElementById("bedrooms").value;
????var bathrooms = document.getElementById("bathrooms").value;
????var price = document.getElementById("price").value;
????ApartmentDAO.findApartments(fillTable, bedrooms, bathrooms, price);
????$("resultTable").style.display = '';
}
function fillTable(apartment) {
????DWRUtil.addRows("apartmentsbody", apartment, [ getId, getAddress, getBedrooms, getBathrooms, getPrice ]);
}