Skip to content

Instantly share code, notes, and snippets.

@pluiez
Created September 26, 2015 08:33
Show Gist options
  • Save pluiez/6143e2c2dcf709240e91 to your computer and use it in GitHub Desktop.
Save pluiez/6143e2c2dcf709240e91 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8" ?>
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your site. -->
<!-- It contains information about your site's posts, pages, comments, categories, and other content. -->
<!-- You may use this file to transfer that content from one site to another. -->
<!-- This file is not intended to serve as a complete backup of your site. -->
<!-- To import this information into a WordPress site follow these steps: -->
<!-- 1. Log in to that site as an administrator. -->
<!-- 2. Go to Tools: Import in the WordPress admin panel. -->
<!-- 3. Install the "WordPress" importer from the list. -->
<!-- 4. Activate & Run Importer. -->
<!-- 5. Upload this file using the form provided on that page. -->
<!-- 6. You will first be asked to map the authors in this export file to users -->
<!-- on the site. For each author, you may choose to map to an -->
<!-- existing user on the site or to create a new user. -->
<!-- 7. WordPress will then import each of the posts, pages, comments, categories, etc. -->
<!-- contained in this file into your site. -->
<!-- generator="WordPress/4.3.1" created="2015-09-26 08:33" -->
<rss version="2.0"
xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:wp="http://wordpress.org/export/1.2/"
>
<channel>
<title>那些花儿</title>
<link>http://wp.junglefish.cc</link>
<description>最亲爱的人啊,路途遥远我们在一起吧。</description>
<pubDate>Sat, 26 Sep 2015 08:33:07 +0000</pubDate>
<language>zh-CN</language>
<wp:wxr_version>1.2</wp:wxr_version>
<wp:base_site_url>http://wp.junglefish.cc</wp:base_site_url>
<wp:base_blog_url>http://wp.junglefish.cc</wp:base_blog_url>
<wp:author><wp:author_id>1</wp:author_id><wp:author_login>pluiefox</wp:author_login><wp:author_email>hh.cc.anonymous@gmail.com</wp:author_email><wp:author_display_name><![CDATA[狐狸雨]]></wp:author_display_name><wp:author_first_name><![CDATA[]]></wp:author_first_name><wp:author_last_name><![CDATA[]]></wp:author_last_name></wp:author>
<generator>http://wordpress.org/?v=4.3.1</generator>
<item>
<title>Linux 简史</title>
<link>http://wp.junglefish.cc/linux/linux-history</link>
<pubDate>Sat, 18 Jul 2015 08:00:04 +0000</pubDate>
<dc:creator><![CDATA[pluiefox]]></dc:creator>
<guid isPermaLink="false">http://www.junglefish.cc/?p=33</guid>
<description></description>
<content:encoded><![CDATA[<span style="font-size: 12pt;"><span style="color: #19b6ee; font-size: 14pt;">1950s</span>,计算机只能用于批处理。</span>
<hr />
<span style="font-size: 12pt;"><span style="color: #19b6ee; font-size: 14pt;">1960s</span>,出现了分时系统,time-sharing operating system,不同用户通过不同终端使用同一台计算机,计算机轮流执行每个用户的指令。</span>
<span style="font-size: 12pt;">        其中一个优秀的分时系统叫Multics,它创新性地发明了层次结构的文件系统等,被现代操作系统采用,但并没有占据重要的市场份额。</span>
<!--more-->
<span style="font-size: 12pt;">        贝尔实验室曾经是该项目的参与者,从Multics项目退出后创造了他们自己的操作系统:Unix。Unix一开始时是可自由分发的,并在许多大学中流行。</span>
<span style="font-size: 12pt;">        之后Unix实现了TCP/IP协议栈,并为早期工作站在面临操作系统选择时所采用。</span>
<hr />
&nbsp;
<p data-select-like-a-boss="1"><span style="font-size: 14pt; color: #19b6ee;" data-select-like-a-boss="1">1990s</span>,<span style="font-size: 12pt;">Unix在服务器市场占据强势地位,特别是在大学。但当时Unix已经成为商业操作系统,并且十分地昂贵。相应地,唯一便宜的选择是Minix,一个由 Andrew Tanenbaum编写的用于教学目的的有限制的类Unix系统。此外,还有386BSD,它是NetBSD,FreeBSD和OpenBSD前驱,但它还不成熟,而且要求比许多人家里的计算机更高性能的终端硬件。</span></p>
<hr />
<span style="font-size: 12pt;"><span style="color: #19b6ee; font-size: 14pt;">1991年10月</span>,出于以上原因,Linus Torvalds编写了他自己的操作系统Linux。</span>
<span style="font-size: 12pt;">        Linux本身只是一个操作系统的内核。所有的程序都是运行在内核之上的,内核实现了多任务(Multitasking),硬件设备管理等。</span>
<span style="font-size: 12pt;">        许多程序都是必要的,比如Command line interpreter(shell)。这些程序并不全是Linus自己编写的,而是利用现有的免费版本代替。这样大大减少了获得一个工作环境所需要付出的代价。事实上,Linus经常修改内核以使许多现有的程序能够更容易地运行在Linux上,而不是重新开发编写这些程序。</span>
<span style="font-size: 12pt;">         许多重要的系统软件,包括C compiler都来自于FSF的GNU项目。</span>
<span style="font-size: 12pt;">        GNU项目始于1984年,旨在建立一个完全免费的Unix-Like操作系统,所以它的名字是GNU's Not Unix的递归首字母缩写。为此,人们喜欢谈到Linux时,喜欢把它称为GNU/Linux。但是GNU也是有他们自己的内核的。</span>
<hr />
<span style="font-size: 12pt;"><span style="color: #19b6ee; font-size: 14pt;">1992-1993年间</span>,Linux内核获得了所有代替Unix工作站所需要的特性,包括TCP/IP协议栈和graphical windowing system(X window system)。</span>
<hr />
<span style="font-size: 12pt;"><span style="color: #19b6ee; font-size: 14pt;" data-select-like-a-boss="1">1994年3月</span>,Linux-1.0版本发布。从那时开始Linux(内核)就在经历持续的开发周期,每次周期大概1年或3年。工作包括重新设计和重写内核以适应新的需求,比如外设的连接方式,要求高性能的大型系统,还有小型的系统(Embedded Linux)。</span>
<hr />
<span style="font-size: 12pt;"><span style="color: #19b6ee; font-size: 14pt;" data-select-like-a-boss="1">1997年</span>,Netscape决定将他们的浏览器作为自由软件发布,'open source' 这一词汇就是由此创造的。</span>
<hr />
&nbsp;
<span style="font-size: 16pt; color: #38b44a;" data-select-like-a-boss="1">Linux</span>
<span style="font-size: 12pt;">        Linux大部分的代码量都是关于设备驱动的,像实现多任务和多用户等核心功能相比之下占比很少。</span>
<span style="font-size: 12pt;">        作为Unix-like,意味着实现Unix操作系统的接口以使得为Unix编写的程序,仅仅通过重新编译就可以运行在Linux上。也就是说,Linux 使用了和Unix一样的大部分抽象,比如创建和控制进程的方式在Linux和Unix中都是一样的。</span>
<span style="font-size: 12pt;">        当时的操作系统还有微软的Windows,苹果的Max OS,OpenVMS。Linux选择Unix作为模型,一部分原因是出于Unix对于系统程序员的审美情趣,还有一部分原因是Unix是当时他所知的最好的操作系统。</span>
<span style="font-size: 12pt;">        Unix模型也为Linux带来两个最重要的特点:多任务和多用户。Linux和Unix一样,一开始就被设计为能够相互独立地运行多个进程。实现多任务特别需要关注到操作系统的每个层次,所以在做出一个操作系统之后再加0入Multitasking是很困难的。这也是Windows 95系列,MacOS(后来是MacOS X)的多任务做的很差的原因:他们的多任务是后来加上去的,而不是全新设计的。这也是Windows NT系列,MacOS X以及Linux的多任务做的好的多的原因。</span>
<span style="font-size: 12pt;">        一个优秀的多任务的实现,除了其他事项外,要求正确的内存管理。操作系统在处理器中利用内存保护支持来防止正在运行的程序受其他程序影响。否则一个错误的程序,可能会损坏其他程序或者操作系统本身,引起怪异的行为或系统崩溃,可能造成丢失数据和未保存的工作。</span>
<span style="font-size: 12pt;">        当Multitasking起作用后,支持多用户并发就比较简单了。你只需要用一个特定的用户来标注每一个运行程序的实例,然后防止程序篡改其他用户的文件。</span>
<hr />
<span style="color: #38b44a; font-size: 16pt;">Portable and scalable</span>
<span style="font-size: 12pt;">        Linux最初是为Intel 386处理器编写的,自然也适用于所有后续的处理器。大约经过3年的开发,开始了将Linux适配(移植)到其他处理器系列的工作。</span>
<span style="font-size: 12pt;">        这些处理器有的是32位,比如Intel 386,有的是64位,比如Alpha。Alpha是除开i386外最先适配的处理器。支持这些不同的处理器对与Linux是很有好处的,要求设计系统正确地使用模块化和优秀的抽象,这也在改进着Linux的代码质量。</span>
<span style="font-size: 12pt;">        大量支持各种处理器还显示了Linux的可伸缩性:它可以工作在非常小的系统,比如嵌入式计算机,手持设备和手机,也可以工作在非常大的系统,比如IBM大型机。</span>
<span style="font-size: 12pt;">        使用集群技术,比如Beowulf,Linux可以运行在超级计算机上。美国的Lawrence Livemore国家实验室购买了一个有着1920个处理器的集群,搭建了一个超级计算机。</span>
<hr />
<span style="font-size: 16pt; color: #38b44a;">Linux distributions</span>
<span style="font-size: 12pt;">        Linux发行版是以Linux为内核,加上一个安装程序,再加上一些运行在内核之上的程序。</span>
<span style="font-size: 12pt;"> 所有发行版使用的几乎都是相同的软件,不过他们的区别在于:</span>
<ol style="padding-left: 4em;">
<li><span style="font-size: 12pt;">不同发行版所包含的软件;</span></li>
<li><span style="font-size: 12pt;">所选择的内核版本(稳定版或最新版);</span></li>
<li><span style="font-size: 12pt;">软件是如何预先配置的;</span></li>
<li><span style="font-size: 12pt;">系统是如何安装和管理的.</span></li>
</ol>]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>33</wp:post_id>
<wp:post_date>2015-07-18 16:00:04</wp:post_date>
<wp:post_date_gmt>2015-07-18 08:00:04</wp:post_date_gmt>
<wp:comment_status>open</wp:comment_status>
<wp:ping_status>open</wp:ping_status>
<wp:post_name>linux-history</wp:post_name>
<wp:status>publish</wp:status>
<wp:post_parent>0</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type>post</wp:post_type>
<wp:post_password></wp:post_password>
<wp:is_sticky>0</wp:is_sticky>
<category domain="category" nicename="linux"><![CDATA[Linux]]></category>
<wp:postmeta>
<wp:meta_key>_edit_last</wp:meta_key>
<wp:meta_value><![CDATA[1]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>freedom_page_layout</wp:meta_key>
<wp:meta_value><![CDATA[default_layout]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>_thumbnail_id</wp:meta_key>
<wp:meta_value><![CDATA[54]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>_aioseop_keywords</wp:meta_key>
<wp:meta_value><![CDATA[Linux 历史]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>_aioseop_title</wp:meta_key>
<wp:meta_value><![CDATA[Linux 发展 历史]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>_wp_old_slug</wp:meta_key>
<wp:meta_value><![CDATA[linux-%e7%ae%80%e5%8f%b2]]></wp:meta_value>
</wp:postmeta>
</item>
<item>
<title>vim tips</title>
<link>http://wp.junglefish.cc/vim/vim-tips</link>
<pubDate>Sun, 19 Jul 2015 06:31:07 +0000</pubDate>
<dc:creator><![CDATA[pluiefox]]></dc:creator>
<guid isPermaLink="false">http://www.junglefish.cc/?p=71</guid>
<description></description>
<content:encoded><![CDATA[<ul>
<li>为什么会把<span style="padding: 0 3px; background: #FFF7F0; border: 1px solid #CCCCCC; font-family: 'Courier New', Courier, monospace !important;">hjkl</span>设计为方向键?</li>
</ul>
<p style="padding-left: 30px;"><a href="http://en.wikipedia.org/wiki/Bill_Joy" target="_blank">Bill Joy</a>创造vi的时候,使用的是<a href="https://en.wikipedia.org/wiki/ADM-3A" target="_blank">ADM-3A terminal</a>,它在<span style="padding: 0 3px; background: #FFF7F0; border: 1px solid #CCCCCC; font-family: 'Courier New', Courier, monospace !important;">hjkl</span>按键上就标记着方向,从而很自然地,就沿用了<span style="padding: 0 3px; background: #FFF7F0; border: 1px solid #CCCCCC; font-family: 'Courier New', Courier, monospace !important;">hjkl</span>作为方向键。</p>
&nbsp;
[caption id="" align="aligncenter" width="328"]<img class="" src="http://www.catonmat.net/images/why-vim-uses-hjkl/adm-3a-hjkl-keyboard.jpg" alt="ADM-3A keyboard's hjkl keys with arrows." width="328" height="136" /> ADM-3A keyboard's hjkl keys with arrows.[/caption]
<!--more-->
[caption id="" align="aligncenter" width="600"]<img class="" src="http://www.catonmat.net/images/why-vim-uses-hjkl/lsi-adm3a-full-keyboard.jpg" alt="Lear Siegler's ADM-3A computer terminal's full keyboard." width="600" height="210" /> Lear Siegler's ADM-3A computer terminal's full keyboard.[/caption]
<ul>
<li>Why the <span style="padding: 0 3px; background: #FFF7F0; border: 1px solid #CCCCCC; font-family: 'Courier New', Courier, monospace !important;">Esc</span> key is used to switch between modes?</li>
</ul>
<p style="padding-left: 30px;"><span style="padding: 0 3px; background: #FFF7F0; border: 1px solid #CCCCCC; font-family: 'Courier New', Courier, monospace !important;">Esc</span>在字母左侧,距离很近,所以<span style="padding: 0 3px; background: #FFF7F0; border: 1px solid #CCCCCC; font-family: 'Courier New', Courier, monospace !important;">Esc</span>被当做visual mode和insert mode的切换快捷键。</p>
<ul>
<li>为什么<span style="padding: 0 3px; background: #FFF7F0; border: 1px solid #CCCCCC; font-family: 'Courier New', Courier, monospace !important;">~</span>表示Home目录?</li>
</ul>
<p style="padding-left: 30px;" data-select-like-a-boss="1">在上图的键盘中,<span style="padding: 0 3px; background: #FFF7F0; border: 1px solid #CCCCCC; font-family: 'Courier New', Courier, monospace !important;">Home</span>键上正好就标注着<span style="padding: 0 3px; background: #FFF7F0; border: 1px solid #CCCCCC; font-family: 'Courier New', Courier, monospace !important;">~</span>。</p>]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>71</wp:post_id>
<wp:post_date>2015-07-19 14:31:07</wp:post_date>
<wp:post_date_gmt>2015-07-19 06:31:07</wp:post_date_gmt>
<wp:comment_status>open</wp:comment_status>
<wp:ping_status>open</wp:ping_status>
<wp:post_name>vim-tips</wp:post_name>
<wp:status>publish</wp:status>
<wp:post_parent>0</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type>post</wp:post_type>
<wp:post_password></wp:post_password>
<wp:is_sticky>0</wp:is_sticky>
<category domain="category" nicename="vim"><![CDATA[Vim]]></category>
<wp:postmeta>
<wp:meta_key>_edit_last</wp:meta_key>
<wp:meta_value><![CDATA[1]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>_oembed_eeffea1c7001f5d5f5426d8b2dcb3e72</wp:meta_key>
<wp:meta_value><![CDATA[{{unknown}}]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>_oembed_64c7ff0819b2d2ba0ef4a85de6ce612f</wp:meta_key>
<wp:meta_value><![CDATA[{{unknown}}]]></wp:meta_value>
</wp:postmeta>
</item>
<item>
<title>build vs. compile</title>
<link>http://wp.junglefish.cc/whats-the-difference/build-vs-compile</link>
<pubDate>Sun, 19 Jul 2015 14:33:48 +0000</pubDate>
<dc:creator><![CDATA[pluiefox]]></dc:creator>
<guid isPermaLink="false">http://www.junglefish.cc/?p=190</guid>
<description></description>
<content:encoded><![CDATA[Compiling is <em>part</em> of a build process.
<p data-select-like-a-boss="1">A build process can include testing, packaging and other activities apart from compilation.</p>
build是一个笼统的概念,表示应用构建的过程,而编译是构建过程的其中一个步骤。]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>190</wp:post_id>
<wp:post_date>2015-07-19 22:33:48</wp:post_date>
<wp:post_date_gmt>2015-07-19 14:33:48</wp:post_date_gmt>
<wp:comment_status>open</wp:comment_status>
<wp:ping_status>open</wp:ping_status>
<wp:post_name>build-vs-compile</wp:post_name>
<wp:status>publish</wp:status>
<wp:post_parent>0</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type>post</wp:post_type>
<wp:post_password></wp:post_password>
<wp:is_sticky>0</wp:is_sticky>
<category domain="category" nicename="whats-the-difference"><![CDATA[What‘s the difference?]]></category>
<wp:postmeta>
<wp:meta_key>_edit_last</wp:meta_key>
<wp:meta_value><![CDATA[1]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>_aioseop_title</wp:meta_key>
<wp:meta_value><![CDATA[build vs compile]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>_aioseop_description</wp:meta_key>
<wp:meta_value><![CDATA[build与compile的区别]]></wp:meta_value>
</wp:postmeta>
</item>
<item>
<title>Android application 概览</title>
<link>http://wp.junglefish.cc/android/android-application-overview</link>
<pubDate>Fri, 07 Aug 2015 07:26:32 +0000</pubDate>
<dc:creator><![CDATA[pluiefox]]></dc:creator>
<guid isPermaLink="false">http://www.junglefish.cc/?p=195</guid>
<description></description>
<content:encoded><![CDATA[<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal; margin-bottom: 5px;"><span style="font-family: 黑体, SimHei;">1.3 安卓平台组件</span></p>
<ul class=" list-paddingleft-2" style="list-style-type: circle;">
<li>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal; margin-bottom: 5px;"><span style="font-family: 黑体, SimHei; color: #00b050;"><em data-select-like-a-boss="1">Applications</em></span></p>
</li>
<li>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal; margin-bottom: 5px;"><span style="font-family: 黑体, SimHei; color: #00b050;"><em>Application</em></span><span style="font-family: 黑体, SimHei;"><em> <span style="font-family: 黑体, SimHei; color: #00b050;">Framework</span></em> // 一个允许高层应用与Android交互的API</span></p>
</li>
<li>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal; margin-bottom: 5px;"><span style="font-family: 黑体, SimHei; color: #00b050;"><em>Libraries|Runtime</em></span><span style="font-family: 黑体, SimHei;"> // Application Framework的许多功能的库,包括图形渲染,数据存储,网页浏览等,还有用来运行Android应用的Java库;Dalvik运行时</span></p>
</li>
<li>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal; margin-bottom: 5px;"><span style="font-family: 黑体, SimHei; color: #00b050;"><em>Linux Kernel</em></span><span style="font-family: 黑体, SimHei;"> // 底层硬件的通信层</span></p>
</li>
</ul>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><!--more--></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">2.Android 开发工具</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">2.1 Android SDK</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    Android Software Development Kit。包含必要的用来create、compile and package Android applications.这些工具大部分都是基于命令行的。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">2.2 Android debug bridge(adb)</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    Android SDK 包含了 adb,这是一个能够允许你连接到虚拟或真实的Android设备的工具,目的是管理设备或者调试应用。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">2.3 Gradle 和 Gradle插件</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    Android工具包使用Gradle作为构建系统。Android团队提供了一个Gradle插件用来构建安卓应用,要使用它,需要在Android Project的根目录建立一个build.gradle文件。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">2.4 使用Android Studio作为Android开发工具</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">2.5 Android Run Time(ART)</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    Android 5.0 使用ART作为所有Android应用的运行时。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">   ART使用了提前编译机制。就是说,一个应用在部署到Android设备的过程中,应用代码就被转换成了机器码。这将使得多出大约30%的编译后代码,但能够提高应用的运行速度。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">   这也能延长电池寿命,因为只需要在应用首次运行时编译一次就可以了。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    dex2oat工具把由Android 工具创建的.dex文件修改并编译成一个可运行和可链接的格式(Executable and Linkable Format,ELF file)。这个文件包含了dex code,即编译的本地代码和元数据。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    ART的垃圾收集机制也已经经过优化,从而减少应用冻结不响应的时间。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">2.6 如何开发Android applications</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    开发者需要创建Android特定的配置文件并编写应用程序的逻辑。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    然后Android工具对用户透明地把这些应用文件转换成一个Android应用。当他们触发部署操作的时候,整个Android应用被编译,打包,部署,并运行。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">2.7 从源代码转换到Android应用</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    java源文件通过Java编译器转换成class 文件。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">   Android SDK包含一个叫做dx的工具,用来把Java的class file转换成一个.dex(Dalvik Executable)文件。Dalvik是Google开发的用于Android平台的Java虚拟机。应用的所有class文件都被放在这个.dex文件里。.dex文件中去除了class文件中的大量冗余信息。因而这些.dex文件比对应的class文件要小得多。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    .dex文件和Android project的资源文件(图片,XML文件等)都被打包成一个.apk(Android Package)文件。一个叫做aapt(Android Asset Packaging Tool)的应用执行了这个步骤。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    最后的.apk文件包含了使应用得以运行所需的所有数据,并且可以通过adb工具把它部署到Android设备上。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">3. Security and permissions</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    Android系统为每一个安装的Android application使用一个唯一的user和group ID。每个应用的文件都是私有于这个生成的用户,也就是说,其他应用不能访问这些文件。另外,每个Android application都运行在自己的进程中(与其他应用进程没有父子关系)。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    因此,基于Linux 内核的底层机制,每个Android应用都与其他运行的应用隔离开来。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    如果需要共享一些数据,那么Application必须显示的说明,通过一个处理共享数据的Android组件。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">3.2 Permission concept in Android</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    Android包含一个权限系统,为一些特定的任务预定义了权限。每个Application 都可以请求需要的权限,也可以定义新的权限。比如说一个应用可以声明,它需要有访问Internet的权限。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    权限具有不同的层级。一些权限由Android系统自动地授予,一些则被自动地拒绝。大多数情况下,应用所请求的权限都在安装的时候展示给了用户,用户需要决定这些权限是否应该被授予这个应用。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    如果用户拒绝了一个请求的权限,那么就不能安装对应的应用。权限的检查只在安装的时候执行,安装之后就不能再拒绝或授予权限。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">9. Android应用的组成部分</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">9.1 Android application</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    一个Android应用就是一个单独的可安装单元,独立于其他应用运行。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    Android应用可以有一个application class,在应用开始的时候初始化,在应用关闭的时候停止。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    Android应用由Android software components和资源文件组成。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    Android应用组件可以基于一个 task description(intent)与其他应用的组件连接。通过这种方式可以创建跨应用的任务。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">9.2 Android software components</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    可以在Android应用中定义下列四种组件:</span></p>
<ul class=" list-paddingleft-2" style="list-style-type: circle;">
<li>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="color: #00b050;"><em><span style="font-family: 黑体, SimHei;" data-select-like-a-boss="1">Activities</span></em></span></p>
</li>
<li>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal; margin-left: 0em;"><span style="color: #00b050;"><em><span style="font-family: 黑体, SimHei;" data-select-like-a-boss="1">Services</span></em></span></p>
</li>
<li>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="color: #00b050;"><em><span style="font-family: 黑体, SimHei;" data-select-like-a-boss="1">BroadcastReceivers</span></em></span><span style="font-family: 黑体, SimHei;">(short:receivers)</span></p>
</li>
<li>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal; margin-left: 0em;"><span style="color: #00b050;"><em><span style="font-family: 黑体, SimHei;" data-select-like-a-boss="1">ContentProviders</span></em></span><span style="font-family: 黑体, SimHei;">(short:providers)</span></p>
</li>
</ul>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">9.3 Context</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    android.content.Context的实例提供给应用到运行它的Android系统的连接。它可提供项目资源的访问和运行环境的全局信息。比如当前设备的尺寸。Context类还提供对Android服务的访问,Activities 和 Services可以扩展Context类,这样就可以直接使用这些功能了。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">10. Android应用组件概览</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">10.1 Activity</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    Activity是Android应用的可视化表示,一个应用可以有多个activity。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    Activities使用views和fragments来创建用户界面,与用户交互。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    10.2 BroadcastReceivers</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    接受者可以经过注册后,监听系统的messages and intents,当特定的事件发生的时候,系统就会告知接收者。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">10.3 Service</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    Service执行任务,没有用户界面。他们可以与其他Android组件通信,比如通过Android的notification Framework通知消息接收者。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    10.4 ContentProvider</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    provider定义应用数据的结构化的接口,用来访问应用内的数据,也可以用来与其他应用共享数据。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    Android包含了SQLite数据库,通常与provider结合使用。SQLite存储数据,然后通过provider访问数据。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">11. Android的基本用户界面组件</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">11.1 Activity</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    Activity是Android用户界面的基础。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">11.2 Fragments</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    Fragments是在activity的上下文中运行的组件。Fragment封装了应用代码,所以可以更容易地复用它们和支持不同大小的设备。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">11.3 Views and layout manager</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    Views是用户界面的小部件,比如按钮和文本框,它们有可以定义外观和行为的属性。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    ViewGroup负责负责组织各种view,也被当做是layout manager。这些layout manager的基类是android.view.ViewGroup,ViewGroup又继承了 android.view.View,View是views的基类。Layout managers可以通过嵌套来创建复杂的布局。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">11.4 特定于设备配置的布局</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">13. Android manifest</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">13.1 Android应用的配置</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    Android应用的组件和设置是使用AndroidManifest.xml文件来描述的。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    manifest文件也为应用定义一些额外的元数据,比如图标和版本号。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    这个文件由系统在安装应用的时候读取,系统解析配置文件并确定应用的能力。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">13.2 在manifest文件里声明组件</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    应用的所有Activities,Services和ContentProviders 组件都必须在manifest文件中静态地声明,BroadcastReceiver可以静态地在文件中定义,也可以动态地在运行时定义。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">13.3 权限</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    manifest文件中必须指定应用程序所需要的权限。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">14. 关于Android manifest的更多细节</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">14.1 version and package</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    manifest元素的package属性定义了在当前文件里的Java对象所在的包名,如果某个Java对象不在package属性所定义的包里,那么就需要为它指定一个完全限定的名称。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    Google play要求每个应用程序的包名都是唯一的,所以以你的反向域名作为包名的一部分是个好习惯,可以避免与其他Android应用冲突。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    android:versionName 和 android:versionCode 指定了应用的版本。versionName是展示给用户看的,可以是任何字符串。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    versionCode必须是一个整数,Android市场根据versionCode确定是否需要更新应用。通常从1开始,如果推出新版本的话则versionCode递增1。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">14.2 Application 和 components</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    &lt;application&gt;允许定义应用的元数据,同时可选地定义一个application类,另外也是声明Android应用的组件的容器。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    &lt;activity&gt;标签定义一个activity组件,name属性指向类,相对于package属性所定义的package(如果不是完全限定名称的话)。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    &lt;intent-filter&gt;部分,如果是在activity中时,则告诉Android运行时:这个activity应该注册成为应用程序的一个入口。也就是说,&lt;name&gt;标签告诉系统,应用程序的入口是此activity,而&lt;category&gt;标签的category android:name="android.intent.category.LAUNCHER" 告诉系统,这个程序应当显示在应用程序列表中。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">14.3 minSdkVersion和targetSdkVersion</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    minSdkVersion定义你的应用所支持的最低Android版本,用来给应用商店作为过滤条件的值。</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    </span><span style="font-family: 黑体, SimHei;">targetSdkVersion是你的引用所测试和开发的Android版本,如果和Android设备的API版本不同,那么Android系统可能会对你的应用做出修改以实现向上或向下的兼容。最好的实践经验是,总是把这个值设为最新的Android API版本,来利用最新的Android特性和优化。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">14.4 权限</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    &lt;permission&gt;可以用来声明应用所定义的权限,&lt;uses-permission&gt;定义应用所请求的权限。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">15. Resources</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">15.1 Resources文件</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    资源文件存储在/res文件夹下的特定目录里。比如drawable,values,layout,animator,raw,menu等。</span></p>
<p style="color: #19b6ee; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">15.3 Resource qualifiers</span></p>
<p style="color: #333333; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 24px; white-space: normal;"><span style="font-family: 黑体, SimHei;">    为资源文件/文件夹添加限定名可以指示这个文件/文件夹只能用于特定的配置,比如只有在某个屏幕大小下指定的layout文件才是可用的。</span></p>
&nbsp;]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>195</wp:post_id>
<wp:post_date>2015-08-07 15:26:32</wp:post_date>
<wp:post_date_gmt>2015-08-07 07:26:32</wp:post_date_gmt>
<wp:comment_status>open</wp:comment_status>
<wp:ping_status>open</wp:ping_status>
<wp:post_name>android-application-overview</wp:post_name>
<wp:status>publish</wp:status>
<wp:post_parent>0</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type>post</wp:post_type>
<wp:post_password></wp:post_password>
<wp:is_sticky>0</wp:is_sticky>
<category domain="category" nicename="android"><![CDATA[Android]]></category>
<wp:postmeta>
<wp:meta_key>_edit_last</wp:meta_key>
<wp:meta_value><![CDATA[1]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>_wp_old_slug</wp:meta_key>
<wp:meta_value><![CDATA[android-application-%e6%a6%82%e8%a7%88]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>_wp_old_slug</wp:meta_key>
<wp:meta_value><![CDATA[android-application-preview]]></wp:meta_value>
</wp:postmeta>
</item>
<item>
<title>Brief History of Machine Learning</title>
<link>http://wp.junglefish.cc/machine-learning/brief-history-of-machine-learning</link>
<pubDate>Thu, 13 Aug 2015 04:24:44 +0000</pubDate>
<dc:creator><![CDATA[pluiefox]]></dc:creator>
<guid isPermaLink="false">http://www.junglefish.cc/?p=209</guid>
<description></description>
<content:encoded><![CDATA[转自http://www.erogol.com/brief-history-machine-learning/
<p style="text-align: center;"><a class="cboxElement hoverZoomLink" style="color: #336699; text-decoration: none;" href="http://www.erogol.com/wp-content/uploads/2014/05/test.jpg" target="_blank" rel="example_group"><img style="border: none; max-width: 100%;" src="http://www.junglefish.cc/wp-content/uploads/2015/08/37111439439819.jpg" alt="My subjective ML timeline" width="600" height="400" /></a></p>
<p style="text-align: center;">My subjective ML timeline</p>
<p style="text-align: center;"><!--more--></p>
Since the initial standpoint of science, technology and AI, scientists following Blaise Pascal and Von Leibniz ponder about a machine that is intellectually capable as much as humans. Famous writers like Jules
<img class="aligncenter" style="border: none; max-width: 100%; text-align: center; display: block;" src="http://www.junglefish.cc/wp-content/uploads/2015/08/1021439439821.jpg" alt="Pascal's machine performing subtraction and summation - 1642" />
<p style="text-align: center;">Pascal's machine performing subtraction and summation - 1642</p>
Machine Learning is one of the important lanes of AI which is very spicy hot subject in the research or industry. Companies, universities devote many resources to advance their knowledge. Recent advances in the field propel very solid results for different tasks, comparable to human performance (98.98% at <a style="color: #336699; text-decoration: none;" href="http://benchmark.ini.rub.de/?section=gtsrb&amp;subsection=results&amp;subsubsection=ijcnn" target="_blank" rel="nofollow,noindex">Traffic Signs</a> - higher than human-).
Here I would like to share a crude timeline of Machine Learning and sign some of the milestones by no means complete. In addition, you should add "up to my knowledge" to beginning of any argument in the text.
First step toward prevalent ML was proposed by <strong>Hebb</strong> , in 1949, based on a neuropsychological learning formulation. It is called <strong>Hebbian Learning</strong> theory. With a simple explanation, it pursues correlations between nodes of a Recurrent Neural Network (RNN). It memorizes any commonalities on the network and serves like a memory later. Formally, the argument states that;
&nbsp;
Let us assume that the persistence or repetition of a reverberatory activity (or "trace") tends to induce lasting cellular changes that add to its stability.… When an  <a style="color: #336699; text-decoration: none;" href="http://en.wikipedia.org/wiki/Axon" target="_blank" rel="nofollow,noindex">axon</a>  of cell  <em>A</em> is near enough to excite a cell  <em>B</em> and repeatedly or persistently takes part in firing it, some growth process or metabolic change takes place in one or both cells such that  <em>A'</em>s efficiency, as one of the cells firing  <em>B</em>, is increased.[1]
&nbsp;
<img class="aligncenter" style="border: none; max-width: 100%; display: block;" src="http://www.junglefish.cc/wp-content/uploads/2015/08/59451439439822.jpg" alt="" />
<p style="text-align: center;">Arthur Samuel</p>
<strong>In 1952</strong> , <strong>Arthur Samuel</strong> at IBM, developed a program playing <strong>Checkers</strong> . The program was able to observe positions and learn a implicit model that gives better moves for the latter cases. Samuel played so many games with the program and observed that the program was able to play better in the course of time.
With that program Samuel confuted the general providence dictating machines cannot go beyond the written codes and learn patterns like human-beings. He coined “machine learning, ” which he defines as;
&nbsp;
a field of study that gives computer the ability without being explicitly programmed.
&nbsp;
<img class="aligncenter" style="border: none; max-width: 100%; display: block;" src="http://www.junglefish.cc/wp-content/uploads/2015/08/75121439439823.jpg" alt="" />
<p style="text-align: center;">F. Rosenblatt</p>
<strong>In 1957</strong> , <strong>Rosenblatt's Perceptron</strong> was the second model proposed again with neuroscientific background and it is more similar to today's ML models. It was a very exciting discovery at the time and it was practically more applicable than Hebbian's idea. Rosenblatt introduced the Perceptron with the following lines;
&nbsp;
The perceptron is designed to illustrate some of the fundamental properties of intelligent systems in general, without becoming too deeply enmeshed in the special, and frequently unknown, conditions which hold for particular biological organisms.[2]
&nbsp;
After 3 years later, <strong>Widrow [4]</strong>  engraved <strong>Delta Learning rule</strong> that is then used as practical procedure for Perceptron training. It is also known as <strong>Least Square</strong>  problem. Combination of those two ideas creates a good linear classifier. However, Perceptron's excitement was hinged by <strong>Minsky</strong> [3] in 1969 . He proposed the famous<strong>XOR</strong> problem and the inability of Perceptrons in such linearly inseparable data distributions. It was the Minsky's tackle to NN community. Thereafter, NN researches would be dormant up until 1980s
<img class="aligncenter" style="border: none; max-width: 100%; display: block;" src="http://www.junglefish.cc/wp-content/uploads/2015/08/50111439439823.gif" alt="" />
<p style="text-align: center;">XOR problem which is nor linearly seperable data orientation</p>
There had been not to much effort until the intuition of <strong>Multi-Layer Perceptron (MLP)</strong>  was suggested by<strong>Werbos[6]</strong> in 1981 with NN specific <strong>Backpropagation(BP)</strong> algorithm, albeit BP idea had been proposed before by  <strong>Linnainmaa [5]</strong>  in 1970 in the name "reverse mode of automatic differentiation". Still BP is the key ingredient of today's NN architectures. With those new ideas, NN researches accelerated again. In 1985 - 1986 NN researchers successively presented the idea of <strong>MLP </strong> with practical <strong>BP</strong> training (Rumelhart, Hinton, Williams [7] -  Hetch, Nielsen[8])
<img class="aligncenter" style="border: none; max-width: 100%; display: block;" src="http://www.junglefish.cc/wp-content/uploads/2015/08/34601439439825.png" alt="From Hetch and Nielsen [7]" />
<p style="text-align: center;">From Hetch and Nielsen [8]</p>
At the another spectrum, a very-well known ML algorithm was proposed by <strong>J. R. Quinlan [9]</strong> in 1986 that we call <strong>Decision Trees</strong> , more specifically <strong>ID3</strong> algorithm. This was the spark point of the another mainstream ML.  Moreover, ID3 was also released as a software able to find more real-life use case with its simplistic rules and its clear inference, contrary to still black-box NN models.
After ID3, many different alternatives or improvements have been explored by the community (e.g. ID4, Regression Trees, CART ...) and still it is one of the active topic in ML.
<img class="aligncenter" style="border: none; max-width: 100%; display: block;" src="http://www.junglefish.cc/wp-content/uploads/2015/08/61581439439826.png" alt="From Quinlan []" />
<p style="text-align: center;">From Quinlan [9]</p>
One of the most important ML breakthrough was <strong>Support Vector Machines</strong> (Networks) (SVM), proposed by <strong>Vapnik and Cortes[10]</strong>  in <strong>1995</strong> with very strong theoretical standing and empirical results. That was the time separating the ML community into two crowds as NN or SVM advocates. However the competition between two community was not very easy for the NN side  after <strong>Kernelized</strong> version of SVM by <strong>near 2000s</strong> .(I was not able to find the first paper about the topic), SVM got the best of many tasks that were occupied by NN models before. In addition, SVM was able to exploit all the profound knowledge of convex optimization, generalization margin theory and kernels against NN models. Therefore, it could find large push from different disciplines causing very rapid theoretical and practical improvements.
<img style="border: none; max-width: 100%; display: inline;" src="http://www.junglefish.cc/wp-content/uploads/2015/08/78341439439827.png" alt="From Vapnik and Cortes [10]" />From Vapnik and Cortes [10]
NN took another damage by the work of Hochreiter's thesis [40] in 1991 and   <strong>Hochreiter et. al.[11] in 2001</strong> , showing the gradient loss after the saturation of NN units as we apply BP learning. Simply means, it is redundant to train NN units after a certain number of epochs owing to saturated units hence NNs are very inclined to over-fit in a short number of epochs.
Little before, another solid ML model was proposed by <strong>Freund and Schapire </strong> in <strong>1997</strong> prescribed with boosted ensemble of weak classifiers called  <strong>Adaboost.</strong> This work also gave the Godel Prize to the authors at the time. Adaboost trains weak set of classifiers that are easy to train, by giving more importance to hard instances. This model still the basis of many different tasks like face recognition and detection. It is also a realization of <strong>PAC  (Probably Approximately Correct)</strong> learning theory. In general, so called weak classifiers are chosen as simple decision stumps (single decision tree nodes). They introduced Adaboost as ;
&nbsp;
The model we study can be interpreted as a broad, abstract extension of the well-studied on-line prediction model to a general decision-theoretic setting...[11]
&nbsp;
Another ensemble model explored by <strong>Breiman</strong> [12] in <strong>2001</strong> that ensembles multiple decision trees where each of them is curated by a random subset of instances and each node is selected from a random subset of features. Owing to its nature,  it is called <strong>Random Forests(RF)</strong> . RF has also theoretical and empirical proofs of endurance against over-fitting. Even AdaBoost shows weakness to over-fitting and outlier instances in the data, RF <strong> </strong> is more robust model against these caveats.(For more detail about RF, refer tomy old post.). RF shows its success in many different tasks like Kaggle competitions as well.
&nbsp;
Random forests are a combination of tree predictors such that each tree depends on the values of a
random vector sampled independently and with the same distribution for all trees in the forest. The generalization error for forests converges a.s. to a limit as the number of trees in the forest becomes large[12]
&nbsp;
As we come closer today, a new era of NN called <strong>Deep Learning</strong> has been commerced. This phrase simply refers NN models with many wide successive layers. The 3rd rise of NN has begun roughly in   <strong>2005</strong>  with the conjunction of many different discoveries from past and present by  recent mavens Hinton, LeCun, Bengio, Andrew Ng and other valuable older researchers. I enlisted some of the important headings (I guess, I will dedicate complete post for Deep Learning specifically) ;
<ul class=" list-paddingleft-2">
<li>GPU programming</li>
<li>Convolutional NNs [18][20][40]
<ul class=" list-paddingleft-2" style="list-style-type: square;">
<li>Deconvolutional Networks [21]</li>
</ul>
</li>
<li>Optimization algorithms
<ul class=" list-paddingleft-2" style="list-style-type: square;">
<li>Stochastic Gradient Descent [19][22]</li>
<li>BFGS and L-BFGS [23]</li>
<li>Conjugate Gradient Descent [24]</li>
<li>Backpropagation [40][19]</li>
</ul>
</li>
<li>Rectifier Units</li>
<li>Sparsity [15][16]</li>
<li>Dropout Nets [26]
<ul class=" list-paddingleft-2" style="list-style-type: square;">
<li>Maxout Nets  [25]</li>
</ul>
</li>
<li>Unsupervised NN models [14]
<ul class=" list-paddingleft-2" style="list-style-type: square;">
<li>Deep Belief Networks [13]</li>
<li>Stacked Auto-Encoders [16][39]</li>
<li>Denoising NN models [17]</li>
</ul>
</li>
</ul>
With the combination of all those ideas and non-listed ones, NN models are able to beat off state of art at very different tasks such as Object Recognition, Speech Recognition, NLP etc. However, it should be noted that this absolutely does not mean, it is the end of other ML streams. Even Deep Learning success stories grow rapidly , there are many critics directed to training cost and tuning exogenous parameters of  these models. Moreover, still SVM is being used more commonly owing to its simplicity. (said but may cause a huge debate <img style="border: none; max-width: 100%; display: inline;" src="http://www.junglefish.cc/wp-content/uploads/2015/08/2821439439827.gif" alt=":)" /> )
Before finish, I need to touch on one another relatively young ML trend. After the growth of WWW and Social Media, a new term,  <strong>BigData</strong>  emerged and affected ML research wildly. Because of the large problems arising from BigData , many strong ML algorithms are useless for reasonable systems (not for giant Tech Companies of course). Hence, research people come up with a new set of simple models that are dubbed  <strong>Bandit Algorithms [27 - 38]</strong> (formally predicated with <strong>Online Learning</strong> ) <strong> </strong> that makes learning easier and adaptable for large scale problems.
I would like to conclude this infant sheet of ML history. If you found something wrong (you should <img style="border: none; max-width: 100%; display: inline;" src="http://www.junglefish.cc/wp-content/uploads/2015/08/2821439439827.gif" alt=":)" /> ), insufficient or non-referenced, please don't hesitate to warn me in all manner.
<h2 style="margin: 0px; padding: 0px;"><a style="color: #336699;" name="t1"></a><strong>References ----</strong></h2>
[1] Hebb D. O., The organization of behaviour. New York: Wiley &amp; Sons.
[2] Rosenblatt, Frank. "The perceptron: a probabilistic model for information storage and organization in the brain."  <em>Psychological review</em> 65.6 (1958): 386.
[3] Minsky, Marvin, and Papert Seymour. "Perceptrons." (1969).
[4]Widrow, Hoff  "Adaptive switching circuits." (1960): 96-104.
[5]S. Linnainmaa. The representation of the cumulative rounding error of an algorithm as a Taylor
expansion of the local rounding errors. Master’s thesis, Univ. Helsinki, 1970.
[6] P. J. Werbos. Applications of advances in nonlinear sensitivity analysis. In Proceedings of the 10th
IFIP Conference, 31.8 - 4.9, NYC, pages 762–770, 1981.
[7]  Rumelhart, David E., Geoffrey E. Hinton, and Ronald J. Williams.  <em>Learning internal representations by error propagation</em>. No. ICS-8506. CALIFORNIA UNIV SAN DIEGO LA JOLLA INST FOR COGNITIVE SCIENCE, 1985.
[8]  Hecht-Nielsen, Robert. "Theory of the backpropagation neural network."  <em>Neural Networks, 1989. IJCNN., International Joint Conference on</em>. IEEE, 1989.
[9]  Quinlan, J. Ross. "Induction of decision trees."  <em>Machine learning</em> 1.1 (1986): 81-106.
[10]  Cortes, Corinna, and Vladimir Vapnik. "Support-vector networks."  <em>Machine learning</em> 20.3 (1995): 273-297.
[11]  Freund, Yoav, Robert Schapire, and N. Abe. "A short introduction to boosting." <em>Journal-Japanese Society For Artificial Intelligence</em> 14.771-780 (1999): 1612.
[12]  Breiman, Leo. "Random forests."  <em>Machine learning</em> 45.1 (2001): 5-32.
[13]  Hinton, Geoffrey E., Simon Osindero, and Yee-Whye Teh. "A fast learning algorithm for deep belief nets."  <em>Neural computation</em> 18.7 (2006): 1527-1554.
[14] Bengio, Lamblin, Popovici, Larochelle, "Greedy Layer-Wise
Training of Deep Networks", NIPS’2006
[15] Ranzato, Poultney, Chopra, LeCun " Efficient Learning of  Sparse Representations with an Energy-Based Model ", NIPS’2006
[16] Olshausen B a, Field DJ. Sparse coding with an overcomplete basis set: a strategy employed by V1? <em>Vision Res</em>. 1997;37(23):3311–25. Available at: http://www.ncbi.nlm.nih.gov/pubmed/9425546.
[17] Vincent, H. Larochelle Y. Bengio and P.A. Manzagol,  <a style="color: #336699; text-decoration: none;" href="http://www.iro.umontreal.ca/~lisa/publications2/index.php/publications/show/217" target="_blank" rel="nofollow,noindex">Extracting and Composing Robust Features with Denoising Autoencoders</a> , Proceedings of the Twenty-fifth International Conference on Machine Learning (ICML‘08), pages 1096 - 1103, ACM, 2008.
[18]  Fukushima, K. (1980). Neocognitron: A self-organizing neural network model for a mechanism of pattern recognition unaffected by shift in position. Biological Cybernetics, 36, 193–202.
[19]  LeCun, Yann, et al. "Gradient-based learning applied to document recognition." <em>Proceedings of the IEEE</em> 86.11 (1998): 2278-2324.
[20]  LeCun, Yann, and Yoshua Bengio. "Convolutional networks for images, speech, and time series."  <em>The handbook of brain theory and neural networks</em>3361 (1995).
[21]  Zeiler, Matthew D., et al. "Deconvolutional networks."  <em>Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on</em>. IEEE, 2010.
[22] S. Vishwanathan, N. Schraudolph, M. Schmidt, and K. Mur- phy. Accelerated training of conditional random fields with stochastic meta-descent. In International Conference on Ma- chine Learning (ICML ’06), 2006.
[23] Nocedal, J. (1980). ”Updating Quasi-Newton Matrices with Limited Storage.” Mathematics of Computation 35 (151): 773782. doi:10.1090/S0025-5718-1980-0572855-
[24] S. Yun and K.-C. Toh, “A coordinate gradient descent method for l1- regularized convex minimization,” Computational Optimizations and Applications, vol. 48, no. 2, pp. 273–307, 2011.
[25] Goodfellow I, Warde-Farley D. Maxout networks. <em>arXiv Prepr arXiv …</em>. 2013. Available at: http://arxiv.org/abs/1302.4389. Accessed March 20, 2014.
[26] Wan L, Zeiler M. Regularization of neural networks using dropconnect. <em>Proc …</em>. 2013;(1). Available at: http://machinelearning.wustl.edu/mlpapers/papers/icml2013_wan13. Accessed March 13, 2014.
[27]  <a style="color: #336699; text-decoration: none;" href="http://www.cs.berkeley.edu/~alekh/" target="_blank" rel="nofollow,noindex">Alekh Agarwal</a> ,  <a style="color: #336699; text-decoration: none;" href="http://olivier.chapelle.cc/" target="_blank" rel="nofollow,noindex">Olivier Chapelle</a> ,  <a style="color: #336699; text-decoration: none;" href="http://www.cs.cmu.edu/~mdudik/" target="_blank" rel="nofollow,noindex">Miroslav Dudik</a> ,  <a style="color: #336699; text-decoration: none;" href="http://hunch.net/~jl" target="_blank" rel="nofollow,noindex">John Langford</a> ,  <a style="color: #336699; text-decoration: none;" href="http://arxiv.org/abs/1110.4198" target="_blank" rel="nofollow,noindex">A Reliable Effective Terascale Linear Learning System</a> , 2011
[28]  <a style="color: #336699; text-decoration: none;" href="http://www.cs.princeton.edu/~mdhoffma/" target="_blank" rel="nofollow,noindex">M. Hoffman</a> ,  <a style="color: #336699; text-decoration: none;" href="http://www.cs.princeton.edu/~blei/" target="_blank" rel="nofollow,noindex">D. Blei</a> ,  <a style="color: #336699; text-decoration: none;" href="http://www.di.ens.fr/~fbach/" target="_blank" rel="nofollow,noindex">F. Bach</a> ,  <a style="color: #336699; text-decoration: none;" href="http://www.cs.princeton.edu/~blei/papers/HoffmanBleiBach2010b.pdf" target="_blank" rel="nofollow,noindex">Online Learning for Latent Dirichlet Allocation</a> , in Neural Information Processing Systems (NIPS) 2010.
[29]  <a style="color: #336699; text-decoration: none;" href="http://hunch.net/~beygel" target="_blank" rel="nofollow,noindex">Alina Beygelzimer</a> ,  <a style="color: #336699; text-decoration: none;" href="http://cseweb.ucsd.edu/~djhsu/" target="_blank" rel="nofollow,noindex">Daniel Hsu</a> ,  <a style="color: #336699; text-decoration: none;" href="http://hunch.net/~jl" target="_blank" rel="nofollow,noindex">John Langford</a> , and  <a style="color: #336699; text-decoration: none;" href="http://stat.rutgers.edu/home/tzhang/" target="_blank" rel="nofollow,noindex">Tong Zhang</a>   <a style="color: #336699; text-decoration: none;" href="http://arxiv.org/abs/1006.2588" target="_blank" rel="nofollow,noindex">Agnostic Active Learning Without Constraints</a>  NIPS 2010.
[30]  <a style="color: #336699; text-decoration: none;" href="http://www.cs.berkeley.edu/~jduchi/" target="_blank" rel="nofollow,noindex">John Duchi</a> ,  <a style="color: #336699; text-decoration: none;" href="http://ie.technion.ac.il/~ehazan/" target="_blank" rel="nofollow,noindex">Elad Hazan</a> , and  <a style="color: #336699; text-decoration: none;" href="http://www.magicbroom.info/About.html" target="_blank" rel="nofollow,noindex">Yoram Singer</a> ,  <a style="color: #336699; text-decoration: none;" href="http://www.cs.berkeley.edu/~jduchi/projects/DuchiHaSi10.html" target="_blank" rel="nofollow,noindex">Adaptive Subgradient Methods for Online Learning and Stochastic Optimization</a> , JMLR 2011 &amp; COLT 2010.
[31]  <a style="color: #336699; text-decoration: none;" href="http://www.cs.cmu.edu/~mcmahan/" target="_blank" rel="nofollow,noindex">H. Brendan McMahan</a> ,  <a style="color: #336699; text-decoration: none;" href="http://www.cs.cmu.edu/~matts/" target="_blank" rel="nofollow,noindex">Matthew Streeter</a> ,  <a style="color: #336699; text-decoration: none;" href="http://arxiv.org/abs/1002.4908" target="_blank" rel="nofollow,noindex">Adaptive Bound Optimization for Online Convex Optimization</a> , COLT 2010.
[32]  <a style="color: #336699; text-decoration: none;" href="http://www.cs.cornell.edu/~nk/" target="_blank" rel="nofollow,noindex">Nikos Karampatziakis</a>  and  <a style="color: #336699; text-decoration: none;" href="http://hunch.net/~jl" target="_blank" rel="nofollow,noindex">John Langford</a> ,  <a style="color: #336699; text-decoration: none;" href="http://arxiv.org/abs/1011.1576" target="_blank" rel="nofollow,noindex">Importance Weight Aware Gradient Updates</a>  UAI 2010.
[33]  <a style="color: #336699; text-decoration: none;" href="http://www.cse.wustl.edu/~kilian/" target="_blank" rel="nofollow,noindex">Kilian Weinberger</a> ,  <a style="color: #336699; text-decoration: none;" href="http://research.yahoo.com/Anirban_Dasgupta/" target="_blank" rel="nofollow,noindex">Anirban Dasgupta</a> ,  <a style="color: #336699; text-decoration: none;" href="http://hunch.net/~jl" target="_blank" rel="nofollow,noindex">John Langford</a> ,  <a style="color: #336699; text-decoration: none;" href="http://alex.smola.org/" target="_blank" rel="nofollow,noindex">Alex Smola</a> ,  <a style="color: #336699; text-decoration: none;" href="http://www.linkedin.com/in/joshattenberg" target="_blank" rel="nofollow,noindex">Josh Attenberg</a> ,  <a style="color: #336699; text-decoration: none;" href="http://arxiv.org/pdf/0902.2206" target="_blank" rel="nofollow,noindex">Feature Hashing for Large Scale Multitask Learning</a> , ICML 2009.
[34]  <a style="color: #336699; text-decoration: none;" href="http://users.cecs.anu.edu.au/~qshi/" target="_blank" rel="nofollow,noindex">Qinfeng Shi</a> ,  <a style="color: #336699; text-decoration: none;" href="http://users.cecs.anu.edu.au/~jpetterson/" target="_blank" rel="nofollow,noindex">James Petterson</a> ,  <a style="color: #336699; text-decoration: none;" href="http://www2.mta.ac.il/~gideon/" target="_blank" rel="nofollow,noindex">Gideon Dror</a> ,  <a style="color: #336699; text-decoration: none;" href="http://hunch.net/~jl" target="_blank" rel="nofollow,noindex">John Langford</a> ,  <a style="color: #336699; text-decoration: none;" href="http://alex.smola.org/" target="_blank" rel="nofollow,noindex">Alex Smola</a> , and  <a style="color: #336699; text-decoration: none;" href="http://www.stat.purdue.edu/~vishy/" target="_blank" rel="nofollow,noindex">SVN Vishwanathan</a> , <a style="color: #336699; text-decoration: none;" href="http://hunch.net/~jl/projects/hash_reps/hash_kernels/hashkernel.pdf" target="_blank" rel="nofollow,noindex">Hash Kernels for Structured Data</a> , AISTAT 2009.
[35]  <a style="color: #336699; text-decoration: none;" href="http://hunch.net/~jl" target="_blank" rel="nofollow,noindex">John Langford</a> ,  <a style="color: #336699; text-decoration: none;" href="http://www.research.rutgers.edu/~lihong/" target="_blank" rel="nofollow,noindex">Lihong Li</a> , and  <a style="color: #336699; text-decoration: none;" href="http://stat.rutgers.edu/home/tzhang/" target="_blank" rel="nofollow,noindex">Tong Zhang</a> ,  <a style="color: #336699; text-decoration: none;" href="http://hunch.net/~jl/projects/interactive/sparse_online/paper_sparseonline.pdf" target="_blank" rel="nofollow,noindex">Sparse Online Learning via Truncated Gradient</a> , NIPS 2008.
[36]  <a style="color: #336699; text-decoration: none;" href="http://leon.bottou.org/" target="_blank" rel="nofollow,noindex">Leon Bottou</a> ,  <a style="color: #336699; text-decoration: none;" href="http://leon.bottou.org/projects/sgd" target="_blank" rel="nofollow,noindex">Stochastic Gradient Descent</a> , 2007.
[37]  <a style="color: #336699; text-decoration: none;" href="http://www.cs.cmu.edu/~avrim/" target="_blank" rel="nofollow,noindex">Avrim Blum</a> ,  <a style="color: #336699; text-decoration: none;" href="http://www.cs.cmu.edu/~akalai/" target="_blank" rel="nofollow,noindex">Adam Kalai</a> , and  <a style="color: #336699; text-decoration: none;" href="http://hunch.net/~jl" target="_blank" rel="nofollow,noindex">John Langford</a>   <a style="color: #336699; text-decoration: none;" href="http://hunch.net/~jl/projects/prediction_bounds/progressive_validation/coltfinal.pdf" target="_blank" rel="nofollow,noindex">Beating the Holdout: Bounds for KFold and Progressive Cross-Validation</a> . COLT99 pages 203-208.
[38]  <a style="color: #336699; text-decoration: none;" href="http://www.ece.northwestern.edu/faculty/Nocedal_Jorge.html" target="_blank" rel="nofollow,noindex">Nocedal, J.</a>  (1980). "Updating Quasi-Newton Matrices with Limited Storage". Mathematics of Computation 35: 773–782.
[39] D. H. Ballard. Modular learning in neural networks. In AAAI, pages 279–284, 1987.
<p data-select-like-a-boss="1">[40] S. Hochreiter. Untersuchungen zu dynamischen neuronalen Netzen. Diploma thesis, Institut f ̈ur In-
formatik, Lehrstuhl Prof. Brauer, Technische Universit ̈at M ̈unchen, 1991. Advisor: J. Schmidhuber.</p>
&nbsp;]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>209</wp:post_id>
<wp:post_date>2015-08-13 12:24:44</wp:post_date>
<wp:post_date_gmt>2015-08-13 04:24:44</wp:post_date_gmt>
<wp:comment_status>open</wp:comment_status>
<wp:ping_status>open</wp:ping_status>
<wp:post_name>brief-history-of-machine-learning</wp:post_name>
<wp:status>publish</wp:status>
<wp:post_parent>0</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type>post</wp:post_type>
<wp:post_password></wp:post_password>
<wp:is_sticky>0</wp:is_sticky>
<category domain="category" nicename="machine-learning"><![CDATA[Machine Learning]]></category>
<wp:postmeta>
<wp:meta_key>_edit_last</wp:meta_key>
<wp:meta_value><![CDATA[1]]></wp:meta_value>
</wp:postmeta>
</item>
<item>
<title>人物 —— 师涛</title>
<link>http://wp.junglefish.cc/freedom-of-the-press/people-shitao</link>
<pubDate>Sat, 29 Aug 2015 03:53:59 +0000</pubDate>
<dc:creator><![CDATA[pluiefox]]></dc:creator>
<guid isPermaLink="false">http://www.junglefish.cc/?p=230</guid>
<description></description>
<content:encoded><![CDATA[<p style="margin-top: 5px; margin-bottom: 5px; margin-left: 0; text-indent: 32px;">维基词条:<a href="https://zh.wikipedia.org/wiki/师涛" target="_blank"><span style="font-family: 黑体, SimHei;">师涛</span> -维基百科</a></p>
<p style="margin-top: 5px; margin-bottom: 5px; margin-left: 0; text-indent: 32px;"><a style="font-family: 黑体,SimHei; text-decoration: underline;" title="师涛" href="https://zh.wikipedia.org/wiki/%E5%B8%88%E6%B6%9B" target="_blank"><span style="font-family: 黑体, SimHei;">师涛</span></a><span style="font-family: 黑体, SimHei;">是一名记者。</span></p>
<p style="margin-top: 5px; margin-bottom: 5px; margin-left: 0;"><span style="font-family: 黑体, SimHei;"> </span></p>
<p style="margin-top: 5px; margin-bottom: 5px; margin-left: 0; text-indent: 32px;"><span style="font-family: 黑体, SimHei;">2004年4月20日,在针对即将到来的6月4日,考虑到海外民运人士可能在六四15周年纪念日期间回中国大陆,会影响社会稳定,朝廷下发一封通知,提醒各大喉舌禁止发布敏感事件的报道,其中包括普通群众上访等内容。因为师涛通过雅虎邮箱向海外网站发送了关于这封邮件的摘要,同时得益于伟大的“防火长城”,这封邮件被截获,后来应国安局的要求,雅虎香港提供了这封邮件发送者的个人信息。</span><!--more--></p>
<p style="margin-top: 5px; margin-bottom: 5px; margin-left: 0; text-indent: 32px;"></p>
<p style="margin-top: 5px; margin-bottom: 5px; margin-left: 0; text-indent: 32px;"></p>
<p style="margin-top: 5px; margin-bottom: 5px; margin-left: 0; text-indent: 32px;"><span style="font-family: 黑体, SimHei;">同年11月,师涛被逮捕。</span></p>
<p style="margin-top: 5px; margin-bottom: 5px; margin-left: 0; text-indent: 32px;"><span style="font-family: 黑体, SimHei;"> </span></p>
<p style="margin-top: 5px; margin-bottom: 5px; margin-left: 0; text-indent: 32px;"><span style="font-family: 黑体, SimHei;">2005年,师涛被以“非法向境外提供国家机密罪”,判刑10年。</span></p>
<p style="margin-top: 5px; margin-bottom: 5px; margin-left: 0; text-indent: 32px;"><span style="font-family: 黑体, SimHei;"> </span></p>
<p style="margin-top: 5px; margin-bottom: 5px; margin-left: 0; text-indent: 32px;"><span style="font-family: 黑体, SimHei;">后来师涛曾在香港和美国起诉雅虎香港和雅虎美国总公司。2007年11月,在一次美国国会听证会上,雅虎联合创始人杨致远向师涛以及另一位因类似事件而被捕的</span><a href="https://zh.wikipedia.org/wiki/王小宁" target="_blank"><span style="font-family: 黑体, SimHei;">王小宁</span></a><span style="font-family: 黑体, SimHei;">的家人道歉。王小宁在<a href="https://zh.wikipedia.org/wiki/六四事件" target="_blank">六四事件</a>后被北京警方列入反动分子名单,2002年被捕后,由于雅虎公司向政府提供王小宁的往来邮件和个人资料,导致王小宁被冠以</span><span style="font-family: 黑体, SimHei;">“煽动颠覆国家政权罪”之名入狱十年。
</span></p>]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>230</wp:post_id>
<wp:post_date>2015-08-29 11:53:59</wp:post_date>
<wp:post_date_gmt>2015-08-29 03:53:59</wp:post_date_gmt>
<wp:comment_status>open</wp:comment_status>
<wp:ping_status>open</wp:ping_status>
<wp:post_name>people-shitao</wp:post_name>
<wp:status>publish</wp:status>
<wp:post_parent>0</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type>post</wp:post_type>
<wp:post_password></wp:post_password>
<wp:is_sticky>0</wp:is_sticky>
<category domain="category" nicename="freedom-of-the-press"><![CDATA[新闻自由]]></category>
<wp:postmeta>
<wp:meta_key>_edit_last</wp:meta_key>
<wp:meta_value><![CDATA[1]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>_wp_old_slug</wp:meta_key>
<wp:meta_value><![CDATA[%e4%ba%ba%e7%89%a9-%e5%b8%88%e6%b6%9b-2]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>_wp_old_slug</wp:meta_key>
<wp:meta_value><![CDATA[%e4%ba%ba%e7%89%a9-%e5%b8%88%e6%b6%9b]]></wp:meta_value>
</wp:postmeta>
</item>
<item>
<title>定义</title>
<link>http://wp.junglefish.cc/linear-algebra/definitions</link>
<pubDate>Thu, 03 Sep 2015 09:51:10 +0000</pubDate>
<dc:creator><![CDATA[pluiefox]]></dc:creator>
<guid isPermaLink="false">http://www.junglefish.cc/?p=260</guid>
<description></description>
<content:encoded><![CDATA[<p style="white-space: normal;">行列式(Determinant):行列式的绝对值是单位立方体经过线性变换后的体积,对于二维矩阵,就是一个平行四边形的面积。可以把每个列向量当做点集,它们是从坐标系原点出发的向量,连接原点和这些向量的顶点,从而构成一个多面体。比如,有 $$A=\begin{bmatrix} 1 &amp; 3 \\ 3 &amp; 2 \end{bmatrix}$$ ,则行列式表示由向量$$\begin{bmatrix} 1 \\ 3 \end{bmatrix} , \begin{bmatrix} 3 \\ 2 \end{bmatrix}$$ 构成的平行四边形的面积。在三维矩阵中,就是一个平行六面体的体积。对于更高维的矩阵,则为多维情况下的多面体体积。</p><p style="white-space: normal;">&lt;!--more--&gt;</p><ul class=" list-paddingleft-2" style="list-style-type: disc;"><li><p style="white-space: normal;">$$|I|=1$$,正多面体的体积为1。</p></li><li><p style="white-space: normal;">给定矩阵 $$A \in \mathbb{R^{n\times n}}$$ ,对任意一行/列乘以常量$$t, t\in\mathbb{R}$$ ,那么$$|A|=t|A|$$ ,可以视为,如果伸缩多面体任意一维的长度,那么其体积也会相应的缩放相应倍数。</p></li><li><p style="white-space: normal;" data-select-like-a-boss="1">如果交换矩阵 $$A$$ 的任意两行,那么新矩阵的行列式为$$ -|A| $$。</p></li><li><p style="white-space: normal;">对于 $$A\in\mathbb{R^{n\times n}}, |A|=|A^{T}|$$。</p></li><li><p style="white-space: normal;">对于 $$A,B\in\mathbb{R^{n\times n}},|AB|=|A||B|$$。</p></li><li><p style="white-space: normal;">对于 $$A\in\mathbb{R^{n\times n}},|A|=0$$ 当且仅当 $$A$$ 是奇异矩阵。如果 $$A$$ 是奇异的,那么它的行/列向量就不是线性独立的,至少有2个或以上的向量是线性相关的,可以想象成,多面体的某一个平面上的两条边坍缩直到重合变成一条直线,因此多面体的体积变成0。</p></li><li><p style="white-space: normal;">对于 $$A\in\mathbb{R^{n\times n}}$$ ,且 $$A$$ 非奇异,那么 $$|A^{-1}|=1/|A|$$ 。</p></li></ul><p style="white-space: normal;"><br/></p><p style="white-space: normal;">伴随矩阵(Adjoint of a matrix):表示为 $$adj(A)$$ ,伴随矩阵是原矩阵的余子矩阵的转置,即要得到伴随矩阵,首先求出原矩阵的余子矩阵,然后其转置就是原矩阵的伴随阵。</p><ul class=" list-paddingleft-2" style="list-style-type: disc;"><li><p style="white-space: normal;" data-select-like-a-boss="1">$$A^{-1}=\frac{1}{|A|} adj(A)$$ 逆矩阵与伴随矩阵只差一个系数,可以看出,在数值计算上,有许多方法可以计算逆矩阵。这里要注意,即使是不可逆矩阵,仍然有伴随阵。</p></li></ul><p style="white-space: normal;"><br/></p><p style="white-space: normal;">矩阵乘法:A*B,A和B都有一组基,表示了他们所在的坐标系。E*A=A&#39;,这里A&#39;是等价与A的,A&#39;表示矩阵A的坐标系在单位坐标系E里表示成新的坐标系A&#39;。所以,矩阵乘法A*B=C就表示,B所在的坐标系在A的坐标系里,表示为C。矩阵乘法可以认为是坐标系的变换,矩阵乘法的结果,是相对于单位矩阵E的标准坐标系的。</p><p style="white-space: normal;"><br/></p><p style="white-space: normal;">矩阵乘法规则:矩阵乘法最初是为方便表示线性方程组而产生的,矩阵乘法的计算规则可以通过线性方程组的代换来证明。</p><p style="white-space: normal;"><br/></p><p style="white-space: normal;">范数(Norm):范数可以视为是对向量“长度”的一种度量。2-范数,也称为欧几里得范数,表示为$$\left \| x \right \|_2$$。</p><p data-select-like-a-boss="1" style="white-space: normal;"><br/></p><p style="white-space: normal;">秩(Rank):矩阵行(列)的秩是行(列)向量集内的线性独立(不相关)的向量的数量。对于$$A\in\mathbb{R}^{m\times{n}}$$,A的行秩和列秩是相等的。</p><p style="white-space: normal;"><br/></p><p style="white-space: normal;">子空间(Subspace):</p><p style="white-space: normal;">&nbsp; 对于一个子空间$$S$$,有如下性质:<br/></p><ul class=" list-paddingleft-2" style="list-style-type: disc;"><li><p style="white-space: normal;">$$\vec{0} \in S$$,空间$$S$$包含零向量</p></li><li><p style="white-space: normal;">对于 $$\vec{v_1},\vec{v_2} \in S$$ ,则有 $$\vec{v_1} + \vec{v_2} \in S$$,即这个空间对加法封闭</p></li><li><p style="white-space: normal;">对于 $$c \in \mathbb{R},\vec{v} \in S$$ ,则有 $$c\vec{v} \in S$$<br/></p></li></ul><p style="white-space: normal;"><br/></p><p style="white-space: normal;">生成子空间(Span):</p><ul class=" list-paddingleft-2" style="list-style-type: disc;"><li><p style="white-space: normal;" data-select-like-a-boss="1">向量组$$\{ \vec{x_1},\vec{x_2},...,\vec{x_n} \}$$的极大无关组的所有线性组合,被称为向量组的生成子空间,表示为$$span\{ \vec{x_1},\vec{x_2},...,\vec{x_n} \}=\{ \vec{v}:\vec{v}=\sum\limits_{i=1}^{n} \alpha_i \vec{x_i}, \alpha_i \in \mathbb{R} \}$$。如果$$\{ \vec{x_1},\vec{x_2},...,\vec{x_n} \}$$是线性无关的,那么$$span\{ \vec{x_1},\vec{x_2},...,\vec{x_n} \}=\mathbb{R}^n$$。如果向量组$$X$$不是线性无关的,那么设$$X$$经过处理后的线性无关的向量组为$$X&#39;$$,那么$$X&#39;\subset X$$,并且它们的生成子空间相等。</p></li><li><p style="white-space: normal;">向量 $$\vec{y}\in\mathbb{R}^m$$ 在 $$\{ \vec{x_1},...,\vec{x_n} \}$$ 的生成子空间的投影(Projection) $$\vec{v}$$, &nbsp;$$\vec{v}\in span\{ \vec{x_1},...,\vec{x_n} \}$$。表示为 $$Proj\{ \vec{y};\{ \vec{x_1},...,\vec{x_n} \} \}=argmin_{\vec{v}\in span\{ \vec{x_1},...,\vec{x_n} \}}\left \| \vec{y}-\vec{v} \right \|_2$$ ,即向量$$\vec{y}$$在$${\vec{x_1},...,\vec{x_n}}$$的生成子空间上的投影,首先它属于向量组$$\vec{x}$$的生成子空间,其次它能够使得向量$$\vec{y}-\vec{v}$$的2-范数最小。</p></li><li><p style="white-space: normal;" data-select-like-a-boss="1">矩阵 $$A\in\mathbb{R^{m\times n}}$$ 的值域(range,有时也成为列空间columnspace),是它的所有列张成的向量空间,也就是说:$$R(A)=\{ v\in\mathbb{R}^m : v=Ax,x\in\mathbb{R}^n \}$$。</p></li><li><p style="white-space: normal;">向量 $$\vec{y}$$ 于矩阵&nbsp;$$A\in\mathbb{R}^{m\times n}$$ 上的投影,即&nbsp;$$\vec{y}$$ 于 $$A$$ 的值域(列空间)张成的向量空间上的投影。公式: $$Proj(\vec{y};A)=argmin_{\vec{v} \in R(A)}\left \| \vec{y}-\vec{v} \right \|_2=A(A^T A)^{-1}A^T \vec{y} $$,</p></li></ul><p style="white-space: normal;"><br/></p><p style="white-space: normal;">正交矩阵(Orthogonal Matrices):给定两个向量$$\vec{x},\vec{y}\in\mathbb{R}^{n}$$,有$$\vec{x}^{T}y=0$$,那么称$$\vec{x},\vec{y}$$是正交的。对于给定向量$$\vec{x}\in\mathbb{R}^{n}$$,如果$$\left \| \vec{x} \right \|_2=1$$,那么称$$\vec{x}$$是规范化的(normalized)。对于给定的一个方阵$$U\in\mathbb{R}^{n}$$,如果它的所有列是相互正交并且规范化的(这样的列被称为是规范正交化(orthonormal)的),那么矩阵$$U$$就是正交的。</p><p style="white-space: normal;"><br/></p><p style="white-space: normal;" data-select-like-a-boss="1">矩阵的零空间(Nullspace):满足 $$A\in\mathbb{R^{m\times n}}, \vec{x}\in\mathbb{R^n}, A\vec{x}=\vec{0}$$ 的所有解,构成一个解空间,表示为 $$N(A)=\{ \vec{x}\in\mathbb{R}^n |A\vec{x}=\vec{0} \}$$ ,亦即 $$A\vec{x}=\vec{0}$$ 的基础解系张成的子空间。 $$\vec{x}$$ 的所有解构成空间,是因为满足“子空间”的性质。</p><p style="white-space: normal;"><br/></p><p style="white-space: normal;"><br/></p>]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>260</wp:post_id>
<wp:post_date>2015-09-03 17:51:10</wp:post_date>
<wp:post_date_gmt>2015-09-03 09:51:10</wp:post_date_gmt>
<wp:comment_status>open</wp:comment_status>
<wp:ping_status>open</wp:ping_status>
<wp:post_name>definitions</wp:post_name>
<wp:status>publish</wp:status>
<wp:post_parent>0</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type>post</wp:post_type>
<wp:post_password></wp:post_password>
<wp:is_sticky>0</wp:is_sticky>
<category domain="category" nicename="linear-algebra"><![CDATA[线性代数]]></category>
<wp:postmeta>
<wp:meta_key>_edit_last</wp:meta_key>
<wp:meta_value><![CDATA[1]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>_wp_old_slug</wp:meta_key>
<wp:meta_value><![CDATA[%e5%ae%9a%e4%b9%89]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>_wp_old_slug</wp:meta_key>
<wp:meta_value><![CDATA[definitions-2]]></wp:meta_value>
</wp:postmeta>
</item>
</channel>
</rss>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment