Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537 Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537 最近中文字幕在线播放,国产91精品久久久久久,亚洲一区视频在线播放

          整合營銷服務商

          電腦端+手機端+微信端=數據同步管理

          免費咨詢熱線:

          層疊樣式表CSS創始人闡述CSS誕生20周年簡史

          下文章來自于W3C 2016年12月17日發布在官網的英文紀念專題-CSS 20周年,總共5大部門,分別講述了CSS誕生前后的故事,與之密切相關的瀏覽器,做出貢獻的人和事,字體以及未來新方向:電子圖書和圖形處理接口。

          在最后展望未來的章節中,提及目前現在常見的電子書都是由CSS制作的,EPUB這一最廣泛的電子書格式標準將由W3C制定,也提及了最新發布的微信小程序對于APP的挑戰以及對CSS的新要求。

          https://www.w3.org/Style/CSS20/history.html

          紀念網站中以時間線的形式顯示了CSS發展各階段的事件。


          從1996年12月17日發布W3C發布第一個CSS標準,已經20年了

          CSS的故事

          The saga of CSS starts in 1994. H?kon Wium Lie works at CERN – the cradle of the Web – and the Web is starting to be used as a platform for electronic publishing. One crucial part of a publishing platform is missing, however: There is no way to style documents. For example, there is no way to describe a newspaper-like layout in a Web page. Having worked on personalized newspaper presentations at the MIT Media Laboratory, H?kon saw the need for a style sheet language for the Web.

          CSS的故事開始于1994年。H?konWium Lie在CERN(--萬維網的搖籃)工作 - ,Web當時正開始被用作電子出版的平臺。 然而,發布平臺的一個關鍵部分缺失:沒有辦法為文檔設計樣式。 例如,沒有辦法在網頁中描述像報紙一樣的布局。 有過在MIT媒體實驗室工作過個性化的報紙展示的H?kon認為需要一種用于Web的樣式表語言。

          Style sheets in browsers were not an entirely new idea. The separation of document structure from the document's layout had been a goal of HTML from its inception in 1990. Tim Berners-Lee wrote his NeXT browser/editor in such a way that he could determine the style with a simple style sheet. However, he didn't publish the syntax for the style sheets, considering it a matter for each browser to decide how to best display pages to its users. In 1992, Pei Wei developed a browser called Viola, which had its own style sheet language.

          瀏覽器中的樣式表不是一個全新的想法。 文檔結構與文檔布局的分離從1990年開始就是HTML的一個目標。Tim Berners-Lee寫了他的NeXT瀏覽器/編輯器,以使用簡單的樣式表來確定樣式的方式。 然而,他沒有發布樣式表的語法,認為這是每個瀏覽器決定如何最好地向用戶顯示頁面的事。 1992年,Pei Wei開發了一個名為Viola的瀏覽器,它有自己的樣式表語言。

          However, the browsers that followed offered their users fewer and fewer options to influence the style. In 1993, NCSA Mosaic, the browser that made the Web popular, came out. Stylewise, however, it was a backward step because it only allowed its users to change certain colors and fonts.

          然而,隨后的瀏覽器為他們的用戶提供了越來越少的選擇來影響風格。 在1993年,NCSA Mosaic,使Web流行的瀏覽器,出現了。 然而,在樣式表,它落后一步,因為它只允許其用戶更改某些顏色和字體。

          Meanwhile, writers of Web pages complained that they didn't have enough influence over how their pages looked. One of the first questions from an author new to the Web was how to change fonts and colors of elements. At that time, HTML did not provide this functionality – and rightfully so. This excerpt from a message sent to the www-talk mailing list early in 1994 gives a sense of the tensions between authors and implementors:

          同時,網頁的作者抱怨說,他們對他們的頁面看起來沒有足夠的影響。 來自剛接觸Web作者的第一個問題是如何更改元素的字體和顏色。 當時,HTML沒有提供這個功能 - 這是正確的。 摘自1994年初發送到www-talk郵件列表的消息,給出了作者和實現者之間的緊張感:

          The message is available from the archives at http://www.webhistory.org/www.lists/www-talk.1994q1/0648.html

          In fact, it has been a constant source of delight for me over the past year to get to continually tell hordes (literally) of people who want to -- strap yourselves in, here it comes -- control what their documents look like in ways that would be trivial in TeX, Microsoft Word, and every other common text processing environment: "Sorry, you're screwed."

          事實上,在過去的一年里,這成為我高興的不斷源頭,不斷地告訴那些人們,希望在這里能夠約束自己的文檔。 像在TeX,Microsoft Word和其他常見的文本處理環境中一樣:“對不起,你被擰了。"

          The author of the message was Marc Andreessen, one of the programmers behind NCSA Mosaic. He later became a co-founder of Netscape, a company eager to fulfill the request of authors. On October 13, 1994, Marc Andreessen announced to www-talk that the first beta release of Mozilla (which later turned into Netscape Navigator) was available for testing. Among the new tags the new browser supported was center, and more tags were to follow shortly.

          該消息的作者是Marc Andreessen,NCSA Mosaic背后的程序員之一。 他后來成為Netscape的聯合創始人,Netscape渴望完成作者的要求。 1994年10月13日,Marc Andreessen在www-talk宣布,首次測試版Mozilla(后來改成Netscape Navigator)可以測試。 在新標簽中,以支持新的瀏覽器為中心,并且很快會有更多標簽。

          The original is online.

          Three days before Netscape announced the availability of its new browser, H?kon published the first draft of the Cascading HTML Style Sheets proposal. Behind the scenes, Dave Raggett (the main architect of HTML 3.0) had encouraged the release of the draft to go out before the upcoming Mosaic and the Web conference in Chicago. Dave had realized that HTML would and should never turn into a page-description language and that a more purpose-built mechanism was needed to satisfy requirements from authors. Although the first version of the document was immature, it provided a useful basis for discussion.

          最開始是在線。

          在Netscape宣布推出新瀏覽器前三天,H?kon發布了“級聯HTML樣式表”提案的第一稿。 在幕后,Dave Raggett(HTML 3.0的主要架構師)鼓勵在即將到來的Mosaic和芝加哥網絡會議之前發布草稿。 Dave意識到HTML將也不應變成頁面描述語言,并且需要一個更專門的機制來滿足作者的需求。 雖然文件的第一個版本不成熟,但它為討論提供了有用的基礎。

          The Argo browser was part of a project to make the Internet accessible to scholars in the Humanities. It featured plug-ins (which it called applets) before Netscape added them. SeeStream-based Style sheet Proposal and Argo: summary of features.

          Argo瀏覽器是讓人文學者學習互聯網的項目的一部分。 它的特色插件(它稱為applets)在Netscape之前加入它們。 基于視圖的樣式表提案和Argo:特征摘要。

          Among the people who responded to the first draft of CSS was Bert Bos. At that time, he was building Argo, a highly customizable browser with style sheets, and he decided to join forces with H?kon. Both of the two proposals look different from present-day CSS, but it is not hard to recognize the original concepts.

          在回應CSS初稿的人中有Bert Bos。 當時,他正在建造Argo,一個高度可定制的瀏覽器與樣式表,他決定與H?kon聯手。 這兩個建議與現在的CSS看起來不同,但是不難識別原始的概念。

          One of the features of the Argo style language was that it was general enough to apply to other markup languages in addition to HTML. This also became a design goal in CSS and HTML was soon removed from the title of the specification. Argo also had other advanced features that didn't make it into CSS1, in particular, attribute selectors and generated text. Both features had to wait for CSS2.

          Argo樣式語言的一個特點是,除了HTML之外,它足夠適用于其他標記語言。 這也成為CSS的一個設計目標,HTML很快就從規范的標題中刪除。 Argo還有其他高級功能,沒有使它進入CSS1,特別是屬性選擇器和生成的文本。 這兩個功能都不得不等待CSS2。

          Robert Raisch's message to www-talk is at http://www.webhistory.org/www.lists/www-talk.1993q2/0445.html

          Cascading Style Sheets wasn't the only proposed style language at the time. There was Pei Wei's language from the Viola browser, and around 10 other proposals for style sheet languages were sent to the www-talk and www-html mailing lists. Then, there was DSSSL, a complex style and transformation language under development at ISO for printing SGML documents. DSSSL could conceivably be applied to HTML as well. But, CSS had one feature that distinguished it from all the others: It took into account that on the Web, the style of a document couldn't be designed by either the author or the reader on their own, but that their wishes had to be combined, or cascaded, in some way; and, in fact, not just the reader's and the author's wishes, but also the capabilities of the display device and the browser.

          層疊樣式表不是當時唯一提出的樣式語言。 有來自Viola瀏覽器的Pei Wei的語言,大約10個其他的樣式表語言提議被發送到www-talk和www-html郵件列表。 然后,DSSSL是一種復雜的樣式和轉換語言,在ISO下開發用于打印SGML文檔。 DSSSL也可以應用于HTML。 但是,CSS有一個特點,它區別于所有其他:它考慮到,在Web上,文檔的風格不能由作者或讀者自己設計,但他們的愿望, 以某種方式組合或層疊; 事實上,不僅是讀者和作者的愿望,而且還是顯示設備和瀏覽器尚未具備的能力。

          As planned, the initial CSS proposal was presented at the Web conference in Chicago in November 1994. The presentation at Developer's Day caused much discussion. First, the concept of a balance between author and user preferences was novel. A fictitious screen shot showed a slider with the label user on one side and author on the other. By adjusting the slider, the user could change the mix of his own preferences and those of the author. Second, CSS was perceived by some as being too simple for the task it was designed for. They argued that to style documents, the power of a full programming language was needed. CSS went in the exact opposite direction by making a point out of being a simple, declarative format.

          按計劃,最初的CSS提案在1994年11月在芝加哥的網絡會議上提出。在開發人員日的演講引起了很多討論。 首先,作者和用戶偏好之間的平衡的概念是新穎的。 虛擬屏幕截圖顯示了滑塊,標簽用戶在一邊,作者在另一邊。 通過調整滑塊,用戶可以改變他自己的偏好和作者的偏好的混合。 第二,一些人認為CSS對于它設計的任務來說太簡單了。 他們認為,要編寫文檔,需要一個完整的編程語言的力量。 CSS通過做出一個簡單的,聲明性的格式點走向了完全相反的方向。

          WWW3, the third conference in the WWW series, was held on April 10–14, 1995, in Darmstadt, Germany

          At the next WWW conference in April 1995, CSS was presented again. Both Bert and H?kon were there (in fact, this was the first time they met in person) and this time, they could also show implementations. Bert presented the support for style sheets in Argo, and H?kon showed a version of the Arena browser that had been modified to support CSS. Arena had been written by Dave Raggett as a testbed for new ideas, and one of them was style sheets. What started out as technical presentations ended up in political discussions about the author-reader balance. Representatives from the author side argued that the author ultimately had to be in charge of deciding how documents were presented. For example, it was argued that there may be legal requirements on how warning labels had to be printed and the user should not be able to reduce the font size for such warnings. The other side, where Bert and H?kon belong, argued that the user, whose eyes and ears ultimately have to decode the presentation, should be given the last word when conflicts arise.

          WWW3是WWW系列的第三次會議,于1995年4月10 - 14日在德國達姆施塔特舉行。

          在1995年4月的下一次WWW會議上,再次提出了CSS。 Bert和H?kon都在那里(事實上,這是他們第一次見面),這一次,他們也可以顯示實現。 Bert在Argo展示了對樣式表的支持,H?kon展示了一個經過修改以支持CSS的Arena瀏覽器版本。Arena 由Dave Raggett編寫,作為新想法的測試平臺,其中之一是樣式表。最開始的技術演示最終在關于作者 - 讀者平衡的政治討論。來自提交人一方的代表認為,提交人最終必須負責決定如何提交文件。例如,有人認為,可能存在關于如何打印警告標簽的法律要求,并且用戶不應該能夠減小這種警告的字體大小。 Bert和H?kon所屬的另一方認為,當眼睛和耳朵最終必須解碼演示時,用戶應該在出現沖突時給出最后一個詞。

          To subscribe to the mailing list or search the archives, see http://lists.w3.org/Archives/Public/www-style

          要訂閱郵件列表或搜索存檔,請參閱http://lists.w3.org/Archives/Public/www-style

          Outside of the political battles, the technical work continued. The www-style mailing list was created in May 1995, and the discussions there have often influenced the development of the CSS specifications. Almost 10 years later, there were more than 16,000 messages in the archives of the mailing list. And after 20 years, more than 80,000!

          在政治斗爭之外,技術工作繼續。 www樣式的郵件列表是1995年5月創建的,其中的討論經常影響CSS規范的開發。 近10年后,郵件列表的檔案中有超過16,000條信息。 而20年后,超過80,000!

          H?kon Wium Lie, 12 December 1995

          In 1995, the World Wide Web Consortium (W3C) also became operational. Companies were joining the Consortium at a high rate and the organization became established. Workshops on various topics were found to be a successful way for W3C members and staff to meet and discuss future technical development. It was therefore decided that another workshop should be organized, this time with style sheets as the topic. The W3C technical staff working on style sheets (namely H?kon and Bert) were now located in Sophia-Antipolis in Southern France where W3C had set up its European site. Southern France is not the worst place to lure workshop participants to, but because many of the potential participants were in the U.S., it was decided to hold the workshop in Paris, which is better served by international flights. The workshop was also an experiment to see if it was possible for W3C to organize events outside the U.S. Indeed, this turned out to be possible, and the workshop was a milestone in ensuring style sheets their rightful place on the Web. Among the participants was Thomas Reardon of Microsoft, who pledged support for CSS in upcoming versions of Internet Explorer.

          1995年,萬維網聯盟(W3C)也開始運作。公司以高速率加入聯盟并且組織成立。針對各種主題的研討會被發現是W3C成員和工作人員會面和討論未來技術發展的成功途徑。因此,決定組織另一個講習班,這次以樣式表為主題。 W3C技術人員(即H?kon和Bert)現在位于法國南部的Sophia-Antipolis,W3C已經建立了其歐洲網站。法國南部不是吸引工作室參與者的最糟糕的地方,但由于許多潛在的參與者在美國,決定在巴黎舉辦工作室,國際航班提供更好的服務。該研討會也是一個實驗,以查看W3C是否可能組織美國以外的活動。事實上,這是可能的,這個研討會是一個里程碑,確保樣式表在Web上的合法位置。與會者包括Microsoft的Thomas Reardon,他們承諾在即將到來的Internet Explorer版本中支持CSS。

          Bert Bos, 12 December 1995

          At the end of 1995, W3C set up the HTML Editorial Review Board (HTML ERB) to ratify future HTML specifications. Because style sheets were within the sphere of interest of the members of the new group, the CSS specification was taken up as a work item with the goal of making it into a W3C Recommendation. Among the members of the HTML ERB was Lou Montulli of Netscape. After Microsoft signaled that it was adding CSS support in its browser, it was also important to get Netscape on board. Otherwise, we could see the Web diverge in different directions with browsers supporting different specifications. The battles within the HTML ERB were long and hard, but CSS level 1 finally emerged as a W3C Recommendation in December 1996.

          在1995年年底,W3C成立了HTML編輯審查委員會(HTML ERB),以批準未來的HTML規范。 因為樣式表在新的小組成員們感興趣的范圍內,CSS規范被作為一個工作項,目標是使其成為一個W3C推薦。 在HTML ERB的成員是Netscape的Lou Montulli。 在微軟表示在瀏覽器中添加CSS支持后,獲得Netscape支持也很重要。 否則,我們可能看到Web在不同方向上分歧,瀏覽器支持不同的規范。 HTML ERB中的戰斗漫長而艱難,但是CSS level 1最終在1996年12月成為W3C推薦。

          In February 1997, CSS got its own working group inside W3C and the new group set out to work on the features which CSS1 didn't address. The group was chaired by Chris Lilley, a Scotsman recruited to W3C from the University of Manchester. CSS level 2 became a Recommendation in May 1998. Since then, the group has worked in parallel on new CSS modules and errata for CSS 2.

          1997年2月,CSS在W3C中有自己的工作組,新的小組開始研究CSS1沒有解決的功能。 該小組由克里斯Lilley主持,一個蘇格蘭男子,從曼徹斯特大學招聘到W3C。 CSS level 2在1998年5月成為一個建議書。從那時起,該小組并行地為CSS 2工作了新的CSS模塊和勘誤表。

          The W3C working group has members (around 15 in 1999, around 115 in 2016) who are delegated by the companies and organizations that are members of W3C. They come from all over the world, so themeetings are usually over the phone, and last about an hour every week. About four times each year, they meet somewhere in the world.

          W3C工作組的成員(1999年約15名,2016年約115名)由W3C成員的公司和組織授權。 他們來自世界各地,所以會議通常是通過電話,每個星期大約一個小時。 每年大約四次,他們在世界上的某個地方見面。

          Browsers 瀏覽器

          The CSS saga is not complete without a section on browsers. Had it not been for the browsers, CSS would have remained a lofty proposal of only academic interest. The first commercial browser to support CSS was Microsoft's Internet Explorer 3, which was released in August 1996. At that point, the CSS1 specification had not yet become a W3C Recommendation and discussions within the HTML ERB were to result in changes that Microsoft developers, led by Chris Wilson, could not foresee. IE3 reliably supports most of the color, background, font, and text properties, but it does not implement much of the box model.

          沒有一章節在瀏覽器,CSS的故事是不完整的。 如果不是為瀏覽器,CSS將仍然是一個崇高的建議,只有學術興趣。 第一個支持CSS的商業瀏覽器是微軟的Internet Explorer 3,它于1996年8月發布。此時,CSS1規范還沒有成為W3C推薦標準,HTML ERB中的討論導致了微軟開發人員, 由克里斯·威爾遜領導,無法預見的改變。 IE3可靠地支持大多數顏色,背景,字體和文本屬性,但它未實現大多數箱模型。

          The next browser to announce support for CSS was Netscape Navigator, version 4.0. Since its inception, Netscape had been skeptical toward style sheets, and the company's first implementation turned out to be a half-hearted attempt to stop Microsoft from claiming to be more standards-compliant than Netscape. The Netscape implementation supports a broad range of features – for example, floating elements – but the Netscape developers did not have time to fully test all the features that are supposedly supported. The result is that many CSS properties cannot be used in Navigator 4.

          下一個宣布支持CSS的瀏覽器是Netscape Navigator 4.0版。 自成立以來,Netscape一直對樣式表持懷疑態度,該公司的第一次實施是一個無熱心的嘗試,阻止微軟聲稱比Netscape更符合標準。 Netscape實現支持范圍廣泛的功能 - 例如,浮動元素 - 但Netscape開發人員沒有時間充分測試所有支持的功能。 結果是許多CSS屬性不能在Navigator 4中使用。

          Netscape implemented CSS internally by translating CSS rules into snippets of JavaScript, which were then run along with other scripts. The company also decided to let developers write JSSS, thereby bypassing CSS entirely. If JSSS had been successful, the Web would have had one more style sheet than necessary. This, fortunately for CSS, turned out not to be the case.

          Netscape通過將CSS規則轉換為JavaScript的代碼段來內部實現CSS,然后與其他腳本一起運行。 該公司還決定讓開發人員編寫JSSS,從而完全繞過CSS。 如果JSSS已經成功,那么Web會再有一個樣式表。 這個,對CSS來說是幸運的,結果沒有成為現實。

          Meanwhile, Microsoft continued its efforts to replace Netscape from the throne of reigning browsers. In Internet Explorer 4, the browser display engine, which among other things is responsible for rendering CSS, was replaced by a module code-named Trident. Trident removed many of the limitations in IE3, but also came with its own set of limitations and bugs. Microsoft was put under pressure by the Web Standards Project (WaSP), which published IE's Top 10 CSS Problems in November 1998 (see Figure 1).

          Subsequent versions of Internet Explorer have considerably improved the support for CSS.

          同時,微軟繼續努力取代Netscape從統治的瀏覽器的寶座。 在Internet Explorer 4中,瀏覽器顯示引擎(其中包括負責渲染CSS)被替換為代碼為Trident的模塊。 Trident刪除了IE3中的許多限制,但也帶來了自己的一套限制和錯誤。 微軟受到Web標準項目(WaSP,跟蹤瀏覽器對W3C建議書的一致性)的壓力,Web標準項目于1998年11月發布了IE的十大CSS問題(見圖1)。

          Internet Explorer的后續版本大大改進了對CSS的支持。

          圖1-Web標準項目于1998年11月發布的IE的十大CSS問題

          The third browser that ventured into CSS was Opera. The browser from the small Norwegian company made headlines in 1998 by being tiny (it fit on a floppy!) and customizable while supporting most features found in the larger offerings from Microsoft and Netscape. Opera 3.5 was released in November 1998, and supported most of CSS1. The Opera developers (namely Geir Ivars?y) also found time to test the CSS implementation before shipping, which is a novelty in this business. H?kon, was so impressed with Opera's technology that he joined the company as CTO in 1999. One important market for Opera's browser is mobile phones. By reformatting pages to fit on a small screen (@media is handy here), the Web has been freed from the desktop (see Figure 2).

          冒險進入CSS的第三個瀏覽器是Opera,來自挪威的小型公司的瀏覽器在1998年成為頭條新聞,因為它是微型的(它適合在軟盤上),并且可以自定義,同時支持Microsoft和Netscape的大型產品中的大多數功能。 Opera 3.5于1998年11月發布,支持大部分CSS1。 Opera開發者(即GeirIvars?y)投入時間來測試交付前的CSS實現,這在這個業務領域是新奇的。 H?kon對Opera的技術印象深刻,于1999年加入公司CTO。Opera瀏覽器的一個重要市場是手機。 通過重新格式化頁面以適應小屏幕(@media在這里很方便),Web已從桌面脫離(見圖2)。

          Figure 2. Opera小屏幕渲染傳送

          The people at Netscape responded to the increasing competition with a move that was novel at the time: They released the source code for the browser. With the source code public, anyone could inspect the internals of their product, improve it, and make competing browsers based on in. Much of the code, including the CSS implementation, was terminated shortly after the release, and the Mozillaproject was formed to build a new generation browser. CSS was in important specification to handle and countless hours have been spent by volunteers to make sure pages are displayed according to the specification. Several browsers have been based on the Mozilla code, including Galeon and Firefox.

          Netscape的職員對競爭的日益激烈作出反應,當時的小說是他們發布瀏覽器的源代碼。 隨著源代碼公開,任何人都可以檢查他們的產品的內部,改進它,并使競爭瀏覽器基于它。包括CSS實現的許多代碼在發布后不久被終止,并且Mozilla項目組件以構建 新一代瀏覽器。 CSS是一個處理的重要規范并且志愿者花費了無數小時,以確保頁面根據規范顯示。 有幾個瀏覽器基于Mozilla代碼,包括Galeon和Firefox。

          Apple is often seen as a technology pioneer, but for a long time, it did not spend much resources on Web browsers. Apple left it to Microsoft to build a browser for its machines, and Internet Explorer for Mac actually had better support for CSS than the Windows version of the browser. In 2003, Microsoft discontinued support for the Mac and Apple announced a new browser called Safari. Safari isn't entirely new – it is based on the open source Konqueror browser, which was developed for the KDE system running on Linux.

          蘋果通常被視為技術先驅,但很長一段時間,它沒有在Web瀏覽器上花費太多資源。 蘋果將它留給微軟為其機器構建一個瀏覽器,而Internet Explorer for Mac實際上比Windows版本的瀏覽器更好地支持CSS。 在2003年,微軟停止了對Mac的支持,蘋果宣布了一個名為Safari的新瀏覽器。 Safari不是全新的 - 它是基于開源的Konqueror瀏覽器,是為在Linux上運行的KDE系統開發的。

          Tantek ?elik is an editor of the CSS 2.1 specification and for a long time he was a Microsoft employee. His efforts within the company resulted in very good support for CSS in Internet Explorer for the MacIntosh. Unfortunately, the code was not been ported to the Windows platform.

          Tantek?elik是CSS 2.1規范的一個編寫者,很長一段時間他是一名微軟員工。 他在公司內的努力導致在MacIntosh中非常好的支持CSS的Internet Explorer。 不幸的是,代碼沒有移植到Windows平臺。

          For Web designers, it is good news to have several competing products based on Web standards. Although some efforts to test that your pages display well in all browsers are necessary, the fact that Web pages can be displayed on a wide range of machines is a huge improvement from the past:

          對于Web設計師來說,有幾個基于Web標準的競爭產品是個好消息。 雖然一些努力在測試您的網頁在所有瀏覽器中顯示良好是必要的,但事實上從過去網頁可以顯示在廣泛的機器上是一個巨大的進步:

          Anyone who slaps a this page is best viewed with Browser X label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network.

          – Tim Berners-Lee in Technology Review, July 1996

          任何使用此頁面的用戶最好查看網頁上顯示的X標簽,在Web之前,當您很少有機會閱讀在另一臺計算機上,另一個文字處理器, 或另一網絡寫的文檔。

          - Tim Berners-Lee在技術評論,1996年7月

          Beyond browsers 瀏覽器之外

          The CSS saga isn't only about Web browsers. Many people outside of the few that program Web browsers have made important contributions to CSS over the past years.

          CSS 的故事不僅僅是Web瀏覽器。 許多在少數幾個Web瀏覽器項目之外的人在過去幾年對CSS作出了重要貢獻。

          The CSS1 test suite was a landmark development for CSS and W3C. When the first two CSS implementations came out and could be compared, we realized there was a problem. You could not expect the style sheet tested only in one browser to work in the other browser. To rectify the situation, Eric Meyer – with help from countless other volunteers – developed a test suite that implementors would test against while there still was time to fix the problems. Todd Fahrner created the acid test in October 1998, which became the ultimate challenge. See Figure 3.

          CSS1測試套件是CSS和W3C的一個里程碑式的開發。 當 前兩個CSS實現出來并可以進行比較時,我們意識到有一個問題。 您不能期望只在一個瀏覽器中測試的樣式表在其他瀏覽器中工作。 為了糾正這種情況,Eric Meyer在無數其他志愿者的幫助下開發了一個測試套件,實施者將在有時間解決問題時進行測試。 Todd Fahrner在1998年10月創建了酸性測試,這成為了最終的挑戰。 參見圖3。

          Figure 3. The acid test.酸性測試

          Brian's index dot CSS is still available from http://www.blooberry.com/indexdot/css/index.html

          When a test suite is available, someone must do the testing. Brian Wilson has done a remarkable job of testing CSS implementations and making the results available on the Web.

          Brian的index點CSS仍然可以從http://www.blooberry.com/indexdot/css/index.html獲得

          當測試套件可用時,有人必須進行測試。 Brian Wilson在測試CSS實現方面做了出色的工作,并使結果在網絡上可用。

          We should also mention the work in more recent years of Gérard Talbot and Geoffrey Sneddon on the official CSS testuite. And of course of Peter Linss, whose Shepherd server is a great help in seeing what tests exist, running them, and generating reports of results.

          我們還應該提到最近幾年的GérardTalbot和Geoffrey Sneddon在官方CSS測試中的工作。 當然,Peter Linss,,他的牧羊人服務器是一個偉大的幫助,看看什么測試存在,運行它們,并生成結果的報告。

          Without compelling content, CSS hasn't served its purpose. Dave Shea created the CSS Zen garden to show fellow graphics artists why CSS should be taken seriously. He, along with the many people who created submissions, showed people how to use CSS creatively.

          The Web site for the Prince formatter is http://www.yeslogic.com

          沒有引人注目的內容,CSS無法達到它的目的。 Dave Shea創建了CSS Zen花園,向同伴們展示為什么應該認真考慮CSS。 他和許多創建提交的人一起,向人們展示了如何創造性地使用CSS。

          Prince formatter的網站是http://www.yeslogic.com

          The Web has been trapped on the desktop for too long. Making it available on mobile phones is one important escape. Michael Day and Xuehong Liu have shown us another way out: The Prince formatter converts HTML and XML documents to PDF and is entirely based on CSS. This product enabled H?kon and Bert to abandon traditional word processors and use Web standards. Their book was written entirely in HTML and CSS.

          Web已被困在桌面上太長時間了。 使它在手機上可用是一個重要的逃脫。 Michael Day和劉學紅向我們展示了另一種出路:王子格式化器將HTML和XML文檔轉換為PDF,完全基于CSS。 該產品使H?kon和Bert放棄了傳統的文字處理器并使用Web標準。 他們的書完全用HTML和CSS編寫

          Web Fonts 網頁

          CSS level 2 contained a feature called Web Fonts, i.e., the ability to embed fonts in a Web document. The idea was that a designer who wanted a specific font could actually provide the font along with the style sheet. During ten years, only Microsoft's Internet Explorer browser implemented that feature. (Netscape for a short period implemented an alternative, which didn't use CSS, wasn't as good, and was probably illegal in many countries because it slightly changed how each font looked.)

          CSS level 2包含一個稱為Web字體的功能,即在Web文檔中嵌入字體的能力。 想法是,想要一個特定字體的設計師實際上可以提供字體和樣式表。 十年來,只有微軟的Internet Explorer瀏覽器實現了這一功能。 (Netscape在短期內實現了一個替代方案,它沒有使用CSS,不是那么好,在許多國家可能是非法的,因為它稍微改變了每種字體的樣子。)

          The reason Web Fonts didn't get implemented was twofold. First of all there were few fonts whose copyright allowed them to be distributed. Most fonts could be used to print documents locally, but you weren't allowed to put them on the Web.

          Web Fonts沒有得到實現的原因有兩個。 首先,沒有幾個字體的版權允許他們分發。 大多數字體可以用于在本地打印文檔,但是不允許將它們放在Web上。

          Secondly, Microsoft and Monotype had developed a format called EOT (Embedded OpenType), which contained inside the fonts the names (URLs) of the documents that could be rendered with them. This allowed an EOT font to be made available on the Web alongside a document, because it now couldn't be used for any other document. But, the format was proprietary and nobody else but Microsoft could use it.

          其次,Microsoft和Monotype開發了一種名為EOT(Embedded OpenType)的格式,其中包含字體內可以用它們呈現的文檔的名稱(URLs)。 這允許EOT字體在文檔旁邊的Web上可用,因為它現在不能用于任何其他文檔。 但是,格式是專有的,僅微軟可以使用它。

          All that changed in early 2008. By then there were many more free fonts, i.e., fonts whose designers allowed them to be distributed for free on the Web. H?kon therefore started lobbying browser makers to finally implement Web Fonts (for fonts in the standard TrueType and OpenType formats) and Bert asked Microsoft if they couldn't open up EOT, so that others could implement it, too. In May, Microsoft and Monotype submitted EOT to W3C under a royalty-free license. And browsers started implementing support for downloading TrueType and OpenType fonts.

          所有這些都在2008年初發生了變化。那時,有更多的免費字體,即設計師允許他們在網上免費分發的字體。 H?kon因此開始游說瀏覽器制造商最終實現Web字體(對于標準TrueType和OpenType格式的字體),Bert詢問Microsoft是否無法開源EOT,以便其他人也能實現它。 5月,微軟和Monotype在免版稅許可證下向W3C提交了EOT。 瀏覽器開始實現下載TrueType和OpenType字體的支持。

          After further discussion, however, most browser makers decided not to implement EOT, but ask W3C to develop a new font format instead. The reason was that that they preferred to use the gzip compression algorithm (which was already used for HTTP) rather than add new code for the MicroType Express algorithm used by EOT.

          經過進一步的討論,然而,大多數瀏覽器制造商決定不實施EOT,而是要求W3C開發一種新的字體格式。 原因是他們更喜歡使用gzip壓縮算法(已經用于HTTP),而不是為EOT使用的MicroType Express算法添加新的代碼。

          That new format became WOFF. Rather than embed the URL of a document in the font, it relies on an HTTP feature (the origin header), which allows to give the domain part of a document's URL: less precise than a full URL, but still good enough for most font makers.

          這種新格式成為WOFF。 它不是將文檔的URL嵌入到字體中,而是依賴于HTTP特征(原始標題),這允許給予文檔的URL的域部分:不如完整的URL精確,但對于大多數字體制造商仍然足夠好 。

          In the end, however, WOFF still adopted parts of EOT's MicroType Express algorithm, and a new compression algorithm (Brotli), because it allowed better compression than gzip.

          最后,WOFF仍然采用EOT的MicroType Express算法的一部分和一個新的壓縮算法(Brotli),因為它允許比gzip更好的壓縮。

          Web Fonts have become very popular. Free fonts are used directly in the TrueType or OpenType format in which they were made. Less free fonts use the WOFF and EOT formats.

          Web字體已經變得非常受歡迎。 自由字體直接在TrueType或OpenType格式中使用。 較少的免費字體使用WOFF和EOT格式。

          Examples of font services are Font Library, Adobe Edge Web Fonts, Typekit (now owned by Adobe), Font Squirrel, Google Fonts,WebType and Type Network.

          字體服務的示例是字體庫,Adobe Edge Web字體,Typekit(現在由Adobe擁有),Font Squirrel,Google字體,WebType和類型網絡。

          There are now online services where you can find and download fonts (both free and non-free). And some even offer to host the fonts on their servers. In some cases even for free. (Which means they provide bandwidth, but in return they gather statistics on font usage).

          現在有在線服務,您可以在其中找到和下載字體(免費和非免費)。 有些甚至提供在他們的服務器上托管字體。 在某些情況下甚至是免費的。 (這意味著他們提供帶寬,但作為回報他們收集關于字體使用的統計數據)。

          New directions: books and GUIs新的方向:圖書和圖形用戶接口GUIs

          The development of CSS hasn't stopped. Far from it. CSS now has more than 60 modules that define different capabilities, some already part of the standard, some still in development.

          CSS的發展還沒有停止。 離停止還很遠。 CSS現在有超過60個模塊定義不同的功能,一些已經是標準的一部分,一些仍在開發中。

          E.g., between the summer of 2010 and the summer of 2016, French publisher Hachette Livre sold fifty million books made with CSS. (Data provided by Dave Cramer.)

          例如,在2010年夏天和2016年夏天之間,法國出版商Hachette Livre出售了五千萬本用CSS制作的書籍。 (數據由Dave Cramer提供。)

          It is now common that books are made with CSS. Not all books, though, because CSS is still missing features for the more complex layouts. That is one direction in which the language is being extended.

          現在常見的是書籍是用CSS制作的。 不是所有的書,雖然,因為CSS仍然缺少的功能更復雜的布局。 這是擴展語言的一個方向。

          E-books also use CSS, which requires yet other features. EPUB is the most widely implemented format for e-books. It was developed by IDPF. IDPF and W3C are currently (December 2016) in the process of merging their operations. The next EPUB version should then be made at W3C and the development of CSS features for books and e-books will be easier.

          電子書也使用CSS,這需要其他功能。 EPUB是電子書最廣泛實施的格式。 它是由IDPF開發的。 IDPF和W3C目前(2016年12月)正在合并其業務。 下一個EPUB版本應該在W3C制定,并且對于圖書和電子書的CSS功能的開發將更容易。

          The development of programs (apps) that use graphical user interfaces made out of HTML and CSS has also put new demands on CSS. Some of the latest modules of CSS deal with layout of user interfaces rather than documents. Although: as they are part of the same CSS, nothing prohibits their use for documents, too, if a part of a document happens to have a mark-up structure that allows it.

          使用由HTML和CSS制作的圖形用戶界面的程序(應用程序)的開發也對CSS提出了新的要求。 CSS的一些最新模塊處理用戶界面的布局,而不是文檔。 雖然:因為它們是同一CSS的一部分,所以如果文檔的一部分恰好具有允許它的標記結構,則也不禁止它們用于文檔。

          Over time, some browsers and other implementations have disappeared, and new ones have been created. There are now also languages derived from CSS for other purposes than styling documents. Probably the first language that used the syntax of CSS (but not the cascading and inheritance model) was STTS, by Daniel Glazman. That was in 1998. Since then others have made their appearance. Three that are currently in use are Qt Style Sheets for styling widgets in the Qt GUI toolkit, JavaFX Style Sheets, which does the same for the JavaFX UI widgets of Java, and MapCSS for describing the style of maps.

          隨著時間的推移,一些瀏覽器和其他實現消失了,并創建了新的。 現在還有從CSS派生的語言用于其他目的,而不是樣式文檔。 使用CSS的語法(但不是層疊和繼承模型)的第一種語言可能是由Daniel Glazman的STTS。 那是在1998年。從那時起,其他人出現了。 當前使用的三個是用于Qt GUI工具包中的樣式小部件的Qt樣式表,JavaFX樣式表,其對于Java的JavaFX UI小部件也是相同的,并且MapCSS用于描述地圖的樣式。

          It is difficult to count how widely CSS is used, but the number of HTML pages that does not use CSS is probably not more than a few percent. Many people make their living as CSS designers or from CSS conferences. And the number of books written about CSS can no longer be counted.

          很難計算CSS的使用范圍,但是不使用CSS的HTML頁面的數量可能不會超過百分之幾。 許多人將他們的生活作為CSS設計師或從CSS會議。 關于CSS書的數量不能再被計數。

          Some day CSS will be replaced by something else. But before that, CSS will have time to celebrate its 21st birthday…

          將來CSS會被別的東西取代。 但在此之前,CSS將有時間慶祝它的21歲生日...


          20 Years of CSS

          On December 17, 1996, W3C published the first standard for CSS. And thus from December 17, 2016 until one year later, CSS is 20 years old.

          • January 2017

            IDPF & W3C join to develop e-book standards

          • 17 December 2016

            20th anniversary of CSS level 1

          • 7 November 2016

            CSS Intro course, a MOOC on W3Cx

          • 12 April 2016

            First draft of 2nd revision of CSS level 2

          • 12 November 2014

            Philae lands on comet 67P

          • 25 June 2013

            W3C creates the Digital Publishing IG

          • 13 December 2012

            W3C Recommendation for WOFF 1.0

          • 3 April 2012

            Final version of jlreq

          • 18 June 2011

            MapCSS, CSS-like styles for maps

          • 11 March 2011

            Fukushima Daiichi nuclear disaster

          • 27 July 2010

            First draft of WOFF 1.0

          • April 2010

            caniuse.com (‘Can I use?’) browser support tables

          • August 2009

            LESS CSS pre-processor

          • 2 June 2009

            JavaFX CSS, CSS-like styles for GUIs

          • 26 May 2008

            Microsoft & Monotype open the EOT format

          • October 2007

            EPUB 2.0 standard released

          • 18 December 2006

            Fuji CSS Validator released (more)

          • October 2005

            Sass CSS pre-processor

          • 17/18 October 2006

            W3C Print Symposium in Heidelberg

          • 4 October 2006

            Qt Style Sheets, CSS-like styles for GUIs

          • 13 April 2005

            Acid2 test by H?kon Lie & Ian Hickson

          • 13–29 August 2004

            Summer Olympics in Athens

          • 7 May 2003

            Dave Shea launches the CSS Zen Garden

          • 2 August 2002

            First draft of revised CSS level 2.

          • 11 October 2001

            W3C Recommendation of XSL 1.0

          • 4 September 2001

            W3C Recommendation of SVG 1.0

          • 15 January 2001

            Start of Wikipedia

          • 22 June 1999

            First 3 CSS3 drafts: Color Profiles, Multi-column layout, and Paged Media

          • 29 January 1999

            CSS1 Test Suite (press release) with Todd Fahrner's Box Acid Test

          • 11 January 1999

            W3C revises CSS level 1 Recommendation

          • 4 September 1998

            Google is founded

          • 12 May 1998

            W3C publishes CSS level 2 Recommendation; read the press release

          • 30 March 1998

            First beta of CSS Validator announced.

          • 4 November 1997

            First Public Working Draft of CSS Level 2 (CSS2); read the press release

          • 17 December 1996

            W3C Recommendation of CSS level 1; read the press release

          • 13 August 1996

            MSIE 3 browser, with support for CSS

          • 5 July 1996

            Birth of Dolly the sheep

          • 27 November 1995

            Experimental support for CSS in W3C's Arena browser

          • 6-7 November 1995

            W3C Workshop on Style Sheets in Rocquencourt, France

          • 24 August 1995

            Release of Windows 95

          • 10 October 1994

            H?kon's e-mail to www-talk@w3.org

          平時的工作中經常碰到很多疑難問題的處理,在解決問題的同時,有一些工具起到了相當大的作用,在此書寫下來,一是作為筆記,可以讓自己后續忘記了可快速翻閱,二是分享,希望看到此文的同學們可以拿出自己日常覺得幫助很大的工具,大家一起進步。閑話不多說,開搞。

          Linux命令類

          tail

          最常用的tail -f

          tail -300f shopbase.log #倒數300行并進入實時監聽文件寫入模式

          grep

          grep forest f.txt     #文件查找
          grep forest f.txt cpf.txt #多文件查找
          grep 'log' /home/admin -r -n #目錄下查找所有符合關鍵字的文件
          cat f.txt | grep -i shopbase    
          grep 'shopbase' /home/admin -r -n --include *.{vm,java} #指定文件后綴
          grep 'shopbase' /home/admin -r -n --exclude *.{vm,java} #反匹配
          seq 10 | grep 5 -A 3    #上匹配
          seq 10 | grep 5 -B 3    #下匹配
          seq 10 | grep 5 -C 3    #上下匹配,平時用這個就妥了
          cat f.txt | grep -c 'SHOPBASE'

          awk

          1.基礎命令

          awk '{print $4,$6}' f.txt
          awk '{print NR,$0}' f.txt cpf.txt    
          awk '{print FNR,$0}' f.txt cpf.txt
          awk '{print FNR,FILENAME,$0}' f.txt cpf.txt
          awk '{print FILENAME,"NR="NR,"FNR="FNR,"$"NF"="$NF}' f.txt cpf.txt
          echo 1:2:3:4 | awk -F: '{print $1,$2,$3,$4}'

          2.匹配

          awk '/ldb/ {print}' f.txt   #匹配ldb
          awk '!/ldb/ {print}' f.txt  #不匹配ldb
          awk '/ldb/ && /LISTEN/ {print}' f.txt   #匹配ldb和LISTEN
          awk '$5 ~ /ldb/ {print}' f.txt #第五列匹配ldb

          3.內建變量

          NR:NR表示從awk開始執行后,按照記錄分隔符讀取的數據次數,默認的記錄分隔符為換行符,因此默認的就是讀取的數據行數,NR可以理解為Number of Record的縮寫。

          FNR:在awk處理多個輸入文件的時候,在處理完第一個文件后,NR并不會從1開始,而是繼續累加,因此就出現了FNR,每當處理一個新文件的時候,FNR就從1開始計數,FNR可以理解為File Number of Record。

          NF: NF表示目前的記錄被分割的字段的數目,NF可以理解為Number of Field。

          find

          sudo -u admin find /home/admin /tmp /usr -name *.log(多個目錄去找)
          find . -iname *.txt(大小寫都匹配)
          find . -type d(當前目錄下的所有子目錄)
          find /usr -type l(當前目錄下所有的符號鏈接)
          find /usr -type l -name "z*" -ls(符號鏈接的詳細信息 eg:inode,目錄)
          find /home/admin -size +250000k(超過250000k的文件,當然+改成-就是小于了)
          find /home/admin f -perm 777 -exec ls -l {} ; (按照權限查詢文件)
          find /home/admin -atime -1  1天內訪問過的文件
          find /home/admin -ctime -1  1天內狀態改變過的文件    
          find /home/admin -mtime -1  1天內修改過的文件
          find /home/admin -amin -1  1分鐘內訪問過的文件
          find /home/admin -cmin -1  1分鐘內狀態改變過的文件    
          find /home/admin -mmin -1  1分鐘內修改過的文件

          pgm

          批量查詢vm-shopbase滿足條件的日志

          pgm -A -f vm-shopbase 'cat /home/admin/shopbase/logs/shopbase.log.2017-01-17|grep 2069861630'

          tsar

          tsar是咱公司自己的采集工具。很好用, 將歷史收集到的數據持久化在磁盤上,所以我們快速來查詢歷史的系統數據。當然實時的應用情況也是可以查詢的啦。大部分機器上都有安裝。

          tsar  ##可以查看最近一天的各項指標
          tsar --live ##可以查看實時指標,默認五秒一刷
          tsar -d 20161218 ##指定查看某天的數據,貌似最多只能看四個月的數據
          tsar --mem
          tsar --load
          tsar --cpu
          ##當然這個也可以和-d參數配合來查詢某天的單個指標的情況 


          top

          top除了看一些基本信息之外,剩下的就是配合來查詢vm的各種問題了

          ps -ef | grep java
          top -H -p pid

          獲得線程10進制轉16進制后jstack去抓看這個線程到底在干啥

          其他

          netstat -nat|awk  '{print $6}'|sort|uniq -c|sort -rn 
          #查看當前連接,注意close_wait偏高的情況,比如如下

          排查利器

          btrace

          首當其沖的要說的是btrace。真是生產環境&預發的排查問題大殺器。簡介什么的就不說了。直接上代碼干

          1.查看當前誰調用了ArrayList的add方法,同時只打印當前ArrayList的size大于500的線程調用棧

          2.監控當前服務方法被調用時返回的值以及請求的參數

          其他功能集團的一些工具或多或少都有,就不說了。感興趣的請移步。https://github.com/btraceio/btrace

          注意:經過觀察,1.3.9的release輸出不穩定,要多觸發幾次才能看到正確的結果正則表達式匹配trace類時范圍一定要控制,否則極有可能出現跑滿CPU導致應用卡死的情況由于是字節碼注入的原理,想要應用恢復到正常情況,需要重啟應用。

          Greys

          Greys是@杜琨的大作吧。說幾個挺棒的功能(部分功能和btrace重合):

          sc -df xxx: 輸出當前類的詳情,包括源碼位置和classloader結構

          trace class method: 相當喜歡這個功能! 很早前可以早JProfiler看到這個功能。打印出當前方法調用的耗時情況,細分到每個方法。對排查方法性能時很有幫助,比如我之前這篇就是使用了trace命令來的:http://www.atatech.org/articles/52947

          其他功能部分和btrace重合,可以選用,感興趣的請移步。http://www.atatech.org/articles/26247

          另外相關聯的是arthas,他是基于Greys的,感興趣的再移步http://mw.alibaba-inc.com/products/arthas/docs/middleware-container/arthas.wiki/home.html?spm=a1z9z.8109794.header.32.1lsoMc

          javOSize

          就說一個功能classes:通過修改了字節碼,改變了類的內容,即時生效。所以可以做到快速的在某個地方打個日志看看輸出,缺點是對代碼的侵入性太大。但是如果自己知道自己在干嘛,的確是不錯的玩意兒。

          其他功能Greys和btrace都能很輕易做的到,不說了。

          可以看看我之前寫的一篇javOSize的簡介http://www.atatech.org/articles/38546官網請移步http://www.lxlinux.net/

          JProfiler

          之前判斷許多問題要通過JProfiler,但是現在Greys和btrace基本都能搞定了。再加上出問題的基本上都是生產環境(網絡隔離),所以基本不怎么使用了,但是還是要標記一下。官網請移步https://www.ej-technologies.com/products/jprofiler/overview.html

          大殺器

          eclipseMAT

          可作為eclipse的插件,也可作為單獨的程序打開。 詳情請移步http://www.eclipse.org/mat/

          zprofiler

          集團內的開發應該是無人不知無人不曉了。簡而言之一句話:有了zprofiler還要mat干嘛詳情請移步zprofiler.alibaba-inc.com

          Java三板斧,噢不對,是七把

          jps

          我只用一條命令:

          sudo -u admin /opt/taobao/java/bin/jps -mlvV


          jstack

          普通用法:

          sudo -u admin /opt/taobao/install/ajdk-8_1_1_fp1-b52/bin/jstack 2815


          native+java棧:

          sudo -u admin /opt/taobao/install/ajdk-8_1_1_fp1-b52/bin/jstack -m 2815


          jinfo

          可看系統啟動的參數,如下

          sudo -u admin /opt/taobao/install/ajdk-8_1_1_fp1-b52/bin/jinfo -flags 2815


          jmap

          兩個用途

          1.查看堆的情況

          sudo -u admin /opt/taobao/install/ajdk-8_1_1_fp1-b52/bin/jmap -heap 2815


          2.dump

          sudo -u admin /opt/taobao/install/ajdk-8_1_1_fp1-b52/bin/jmap -dump:live,format=b,file=/tmp/heap2.bin 2815

          或者

          sudo -u admin /opt/taobao/install/ajdk-8_1_1_fp1-b52/bin/jmap -dump:format=b,file=/tmp/heap3.bin 2815

          3.看看堆都被誰占了? 再配合zprofiler和btrace,排查問題簡直是如虎添翼

          sudo -u admin /opt/taobao/install/ajdk-8_1_1_fp1-b52/bin/jmap -histo 2815 | head -10

          jstat

          jstat參數眾多,但是使用一個就夠了

          sudo -u admin /opt/taobao/install/ajdk-8_1_1_fp1-b52/bin/jstat -gcutil 2815 1000 

          jdb

          時至今日,jdb也是經常使用的。 jdb可以用來預發debug,假設你預發的java_home是/opt/taobao/java/,遠程調試端口是8000.那么

          sudo -u admin /opt/taobao/java/bin/jdb -attach 8000.

          出現以上代表jdb啟動成功。后續可以進行設置斷點進行調試。具體參數可見oracle官方說明http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jdb.html

          CHLSDB

          CHLSDB感覺很多情況下可以看到更好玩的東西,不詳細敘述了。查詢資料聽說jstack和jmap等工具就是基于它的。

          sudo -u admin /opt/taobao/java/bin/java -classpath /opt/taobao/java/lib/sa-jdi.jar sun.jvm.hotspot.CLHSDB

          更詳細的可見R大此貼http://rednaxelafx.iteye.com/blog/1847971

          plugin of intellij idea

          key promoter

          快捷鍵一次你記不住,多來幾次你總能記住了吧?

          maven helper

          分析maven依賴的好幫手。

          VM options

          1. 你的類到底是從哪個文件加載進來的?
          -XX:+TraceClassLoading
          結果形如[Loaded java.lang.invoke.MethodHandleImpl$Lazy from D:programmejdkjdk8U74jrelibt.jar]
          1. 應用掛了輸出dump文件
          -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/admin/logs/java.hprof
          集團的vm參數里邊基本都有這個選項

          jar包沖突

          把這個單獨寫個大標題不過分吧?每個人或多或少都處理過這種煩人的case。我特么下邊這么多方案不信就搞不定你?

          mvn dependency:tree > ~/dependency.txt打出所有依賴

          mvn dependency:tree -Dverbose -Dincludes=groupId:artifactId只打出指定groupId和artifactId的依賴關系

          -XX:+TraceClassLoadingvm啟動腳本加入。在tomcat啟動腳本中可見加載類的詳細信息

          -verbosevm啟動腳本加入。在tomcat啟動腳本中可見加載類的詳細信息

          greys:scgreys的sc命令也能清晰的看到當前類是從哪里加載過來的

          tomcat-classloader-locate通過以下url可以獲知當前類是從哪里加載的curl http://localhost:8006/classloader/locate?class=org.apache.xerces.xs.XSObject

          ALI-TOMCAT帶給我們的驚喜(感謝@務觀)

          1.列出容器加載的jar列表curl http://localhost:8006/classloader/jars

          2.列出當前當當前類加載的實際jar包位置,解決類沖突時有用curl http://localhost:8006/classloader/locate?class=org.apache.xerces.xs.XSObject

          其他

          gprefhttp://www.atatech.org/articles/33317

          dmesg如果發現自己的java進程悄無聲息的消失了,幾乎沒有留下任何線索,那么dmesg一發,很有可能有你想要的。

          sudo dmesg|grep -i kill|less

          去找關鍵字oom_killer。找到的結果類似如下:

          [6710782.021013] java invoked oom-killer: gfp_mask=0xd0, order=0, oom_adj=0, oom_scoe_adj=0
          [6710782.070639] [<ffffffff81118898>] ? oom_kill_process+0x68/0x140 
          [6710782.257588] Task in /LXC011175068174 killed as a result of limit of /LXC011175068174 
          [6710784.698347] Memory cgroup out of memory: Kill process 215701 (java) score 854 or sacrifice child 
          [6710784.707978] Killed process 215701, UID 679, (java) total-vm:11017300kB, anon-rss:7152432kB, file-rss:1232kB

          以上表明,對應的java進程被系統的OOM Killer給干掉了,得分為854.解釋一下OOM killer(Out-Of-Memory killer),該機制會監控機器的內存資源消耗。當機器內存耗盡前,該機制會掃描所有的進程(按照一定規則計算,內存占用,時間等),挑選出得分最高的進程,然后殺死,從而保護機器。

          dmesg日志時間轉換公式:log實際時間=格林威治1970-01-01+(當前時間秒數-系統啟動至今的秒數+dmesg打印的log時間)秒數:

          date -d "1970-01-01 UTC `echo "$(date +%s)-$(cat /proc/uptime|cut -f 1 -d' ')+12288812.926194"|bc ` seconds"

          剩下的,就是看看為什么內存這么大,觸發了OOM-Killer了。

          新技能get


          子簡歷

          把每一次機會都當作新的開始虛心且踏實用盡全力走好每一步

          女28歲本科13800138000BD@100chui.com

          求職意向

          html5前端設計 廣州 薪資面議 隨時到崗

          教育背景

          2018.09 - 2022.06

          錘子簡歷理工大學

          前端開發

          GPA3.72/4

          GRE324

          工作經驗

          2022.03 - 至今

          錘子簡歷信息科技有限公司

          html5前端設計


          負責iOS/Android應用及前端站點的接口開發

          提供各產品業務對應的管理后臺

          參與后端性能優化數據分析及各類中間件開發


          2021.08 - 2022.03

          錘子簡歷網絡科技有限公司

          html5前端設計


          遵守研發部門工作流程開發規范主動發現并提出改善建議

          維護現有產品的功能模塊優化產品

          參與軟件產品功能模塊的詳細設計編碼實現和單元測試保證開發進度及產品品質


          項目經驗

          2021.11 - 至今

          項目工程

          負責人

          項目介紹為外包項目主要為其他公司進行PC端建站

          我的職責使用HTMLDIV+CSSCSS3jQueryJavaScript進行網站的結構布局把美工設計的效果圖轉化為可兼容多種瀏覽器的前端代碼實現網頁前端頁面

          與后臺開發人員密切配合完成前后端數據對接工作

          定期進行SEO優化工作提高網站排名

          負責網站內容的采編策劃完成相關欄目的日常更新工作

          自我評價

          本人掌握交際管理寫作電腦分析研究等技能具有良好的適應性和熟練的溝通技巧相信能夠協助主管人員出色地完成各項工作忠誠穩重堅守誠信正直原則勇于挑戰自我開發自身潛力本人希望自己能成為一名出色的員工這是本人的夢想也是本人的目標本人愿意同貴公司共同發展感謝您在百忙之中閱覽我的簡歷靜候佳音



          以上分享的簡歷案例范文,感謝您的閱讀,祝每個認真求職的你都能收到滿意的offer!


          主站蜘蛛池模板: 国产在线观看91精品一区| 久久久久人妻精品一区二区三区| 中文字幕一区日韩在线视频| 国产高清在线精品一区| 精品国产亚洲一区二区在线观看 | 国产精品无码一区二区三区不卡| 国产午夜精品一区二区三区不卡| 国产成人综合一区精品| 亚洲一区二区电影| 国产成人无码一区二区三区在线| 国产成人精品无码一区二区老年人| 无码AV天堂一区二区三区| 综合人妻久久一区二区精品| 国产精品第一区揄拍无码| 无码中文字幕乱码一区| 国产吧一区在线视频| 文中字幕一区二区三区视频播放 | 亚洲av成人一区二区三区| 久久国产高清一区二区三区| 后入内射国产一区二区| 国产精品成人99一区无码 | 久久久无码精品国产一区 | 亚洲AV无码国产精品永久一区| 乱子伦一区二区三区| 91精品福利一区二区| 一本一道波多野结衣一区| 国产韩国精品一区二区三区久久| 国产福利微拍精品一区二区| 亚洲图片一区二区| 中文字幕一区一区三区| 国产短视频精品一区二区三区| 亚洲一区二区三区写真| 亚洲av无码成人影院一区| 国产一区二区三区无码免费| 波多野结衣一区在线| 成人免费av一区二区三区| 亚洲老妈激情一区二区三区| 中文字幕日韩丝袜一区| 日韩成人一区ftp在线播放| 一区二区三区中文| 国产suv精品一区二区33|