<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>无风的港湾 &#187; 组件</title>
	<atom:link href="http://www.5bay.cn/tag/%E7%BB%84%E4%BB%B6/feed" rel="self" type="application/rss+xml" />
	<link>http://www.5bay.cn</link>
	<description>让你我停泊~</description>
	<lastBuildDate>Fri, 16 Dec 2011 09:18:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Android在线开发工具 App Inventor</title>
		<link>http://www.5bay.cn/android%e7%ac%94%e8%ae%b0/androidzaixiankaifagongjuappinventor.html</link>
		<comments>http://www.5bay.cn/android%e7%ac%94%e8%ae%b0/androidzaixiankaifagongjuappinventor.html#comments</comments>
		<pubDate>Wed, 29 Jun 2011 06:20:36 +0000</pubDate>
		<dc:creator>江小邪</dc:creator>
				<category><![CDATA[Android笔记]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[上传]]></category>
		<category><![CDATA[属性]]></category>
		<category><![CDATA[工具]]></category>
		<category><![CDATA[幸福]]></category>
		<category><![CDATA[成功]]></category>
		<category><![CDATA[浏览器]]></category>
		<category><![CDATA[组件]]></category>
		<category><![CDATA[网站]]></category>
		<category><![CDATA[连接]]></category>
		<category><![CDATA[页面]]></category>

		<guid isPermaLink="false">http://www.5bay.cn/?p=578</guid>
		<description><![CDATA[<a href="http://www.5bay.cn/android%e7%ac%94%e8%ae%b0/androidzaixiankaifagongjuappinventor.html"><img align="left" hspace="5" width="150" src="http://images.cnblogs.com/cnblogs_com/shenzhoulong/app%20inventor/20110525/projects.png" class="alignleft wp-post-image tfe" alt="" title="" /></a>最近在博客园看到一篇报道关于一个人好像是别出心裁的用android程序求婚，最后成功了，在留言部分看到很多园友说：好浪漫，好幸福；文章中提到的一个在线开发程序，叫做app invertor，于是在网上稍微看了一下，下班回到家之后马上下载，起先是用迅雷下载的，结果下载进度一点也不动，于是乎，***用IE9 下载，下载了两次没有成功，原因可能是保存路径有问题，建议先保存到桌面，然后再安装，下载地址如下http://dl.google.com/dl/appinventor/installers/windows/appinventor_setup_installer_v_1_2.exe（建议***）；下载好之后安装就可以了，好像官方建议安装过程中的路径不要修改，以防在加载模拟器的时候找不到路径，当然你也可以自己定义路径，不过在使用模拟器的时候需要人工的输入模拟器的路径，以后就不会出现这种问题了，下面就可以进入按android的在线编辑页面了，请在浏览器的地址栏中输入：http://appinventor.googlelabs.com/ 就可以看到了，先放图··· 第一次进入是会出现下面的界面，请点击new，并填写相应的项目名称即可，我填写的是First 进入First项目，界面如下 &#160; 整个界面简洁，横向的可以分为四个部分，分别为palette（字典意思是调色板，就是工具），viewer（指示器），components（组件），properties（属性）； Palette：为我们所有将要用到的控件 Viewer：为android模拟器面板，可拖放控件至此 Components：Viewer中的空间都会在此显示其控件名称 Properties：当某个控件处于编辑状态时，显示其属性可编辑 下面建立我自己的第一个Demo 1.修改标题 2.拖放控件，修改属性 3.从本地上传文件 5.此时是图片正在上传图片，因为我们是在线编辑的，所以建议各位不要上传太大的图片 6.点击右上角的“Blocks Editor”按钮进入编辑界面，此时会显示正在下载，即从网站现在我们的程序，此时有可能会要求下载java6，点击下载即可，下载完成之后如果你的app inventor路径不是默认的，需要填写仿真器的路径 &#160; &#160; 7.连接本人的android2.2手机效果如下 &#160; 作者：神舟龙 出处：http://www.cnblogs.com/shenzhoulong/ &#160; 相关博文2010年05月23日 -- mysql优化及全文搜索 (0)2010年07月26日 -- PHP和Socket简介 (0)2010年07月26日 -- Ajax的工作原理 (1)2010年07月26日 -- AJAX的各种控件和类库 (0)2010年07月26日 -- 使用Ajax时的十个常犯的错误 (0)2010年07月26日 -- 基于JSON的高级AJAX开发技术 (0)2010年05月23日 -- Rsync详解 (0)2010年05月23日 -- 《高性能网站建设指南》读书笔记 (0)2010年07月28日 -- ASP防注入新方式，希望对大家是有用的 (0)2010年07月28日 -- [...]]]></description>
			<content:encoded><![CDATA[<div id="cnblogs_post_body">
<p>最近在博客园看到一篇报道关于一个人好像是别出心裁的用android程序求婚，最后成功了，在留言部分看到很多园友说：好浪漫，好幸福；文章中提到的一个在线开发程序，叫做app invertor，于是在网上稍微看了一下，下班回到家之后马上下载，起先是用迅雷下载的，结果下载进度一点也不动，于是乎，***用IE9 下载，下载了两次没有成功，原因可能是保存路径有问题，建议先保存到桌面，然后再安装，下载地址如下<a href="http://dl.google.com/dl/appinventor/installers/windows/appinventor_setup_installer_v_1_2.exe">http://dl.google.com/dl/appinventor/installers/windows/appinventor_setup_installer_v_1_2.exe</a>（建议***）；下载好之后安装就可以了，好像官方建议安装过程中的路径不要修改，以防在加载模拟器的时候找不到路径，当然你也可以自己定义路径，不过在使用模拟器的时候需要人工的输入模拟器的路径，以后就不会出现这种问题了，下面就可以进入按android的在线编辑页面了，请在浏览器的地址栏中输入：<a href="http://appinventor.googlelabs.com/">http://appinventor.googlelabs.com/</a> 就可以看到了，先放图···</p>
<p>第一次进入是会出现下面的界面，请点击new，并填写相应的项目名称即可，我填写的是First</p>
<p><img src="http://images.cnblogs.com/cnblogs_com/shenzhoulong/app%20inventor/20110525/projects.png" border="0" alt="" width="1000" height="528" /></p>
<p>进入First项目，界面如下<span id="more-578"></span></p>
<p><img src="http://images.cnblogs.com/cnblogs_com/shenzhoulong/app%20inventor/20110525/1.jpg" border="0" alt="" width="1000" height="538" /></p>
<p>&nbsp;</p>
<p>整个界面简洁，横向的可以分为四个部分，分别为palette（字典意思是调色板，就是工具），viewer（指示器），components（组件），properties（<a href="http://www.5bay.cn/tag/%E5%B1%9E%E6%80%A7" class="st_tag internal_tag" rel="tag" title="标签 属性 下的日志">属性</a>）；</p>
<p>Palette：为我们所有将要用到的控件</p>
<p>Viewer：为android模拟器面板，可拖放控件至此</p>
<p>Components：Viewer中的空间都会在此显示其控件名称</p>
<p>Properties：当某个控件处于编辑状态时，显示其属性可编辑</p>
<p>下面建立我自己的第一个Demo</p>
<p>1.修改标题</p>
<p><img src="http://images.cnblogs.com/cnblogs_com/shenzhoulong/app%20inventor/20110525/2.jpg" border="0" alt="" width="1000" height="543" /></p>
<p>2.拖放控件，修改属性</p>
<p><img src="http://images.cnblogs.com/cnblogs_com/shenzhoulong/app%20inventor/20110525/3.jpg" border="0" alt="" width="1000" height="544" /></p>
<p>3.从本地上传文件</p>
<p><img src="http://images.cnblogs.com/cnblogs_com/shenzhoulong/app%20inventor/20110525/4.jpg" border="0" alt="" width="1000" height="328" /></p>
<p>5.此时是图片正在上传图片，因为我们是在线编辑的，所以建议各位不要上传太大的图片</p>
<p><img src="http://images.cnblogs.com/cnblogs_com/shenzhoulong/app%20inventor/20110525/5.jpg" border="0" alt="" width="758" height="112" /></p>
<p>6.点击右上角的“Blocks Editor”按钮进入编辑界面，此时会显示正在下载，即从网站现在我们的程序，此时有可能会要求下载java6，点击下载即可，下载完成之后如果你的app inventor路径不是默认的，需要填写仿真器的路径</p>
<p><img src="http://images.cnblogs.com/cnblogs_com/shenzhoulong/app%20inventor/20110525/6.jpg" border="0" alt="" width="321" height="141" /></p>
<p><img src="http://images.cnblogs.com/cnblogs_com/shenzhoulong/app%20inventor/20110525/7.jpg" border="0" alt="" width="1000" height="489" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>7.连接本人的android2.2手机效果如下</p>
<p><img src="http://images.cnblogs.com/cnblogs_com/shenzhoulong/app%20inventor/20110525/8.png" border="0" alt="" width="236" height="447" /></p>
<p>&nbsp;</p>
</div>
<div id="MySignature">
<div>作者：<a href="http://www.cnblogs.com/shenzhoulong/" target="_blank">神舟龙</a></div>
<div>出处：<a href="http://www.cnblogs.com/shenzhoulong/" target="_blank">http://www.cnblogs.com/shenzhoulong/</a></div>
</div>
<p>&nbsp;</p>
<h2  class="related_post_title">相关博文</h2><ul class="related_post"><li>2010年05月23日 -- <a href="http://www.5bay.cn/server-building/mysqlyouhuajiquanwensousuo.html" title="mysql优化及全文搜索">mysql优化及全文搜索</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/phpeecketee.html" title="PHP和Socket简介">PHP和Socket简介</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/ajaxeeee.html" title="Ajax的工作原理">Ajax的工作原理</a> (1)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/ajax.html" title="AJAX的各种控件和类库">AJAX的各种控件和类库</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/eejaxeeeeee.html" title="使用Ajax时的十个常犯的错误">使用Ajax时的十个常犯的错误</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/eesoneeajaxeehuai.html" title="基于JSON的高级AJAX开发技术">基于JSON的高级AJAX开发技术</a> (0)</li><li>2010年05月23日 -- <a href="http://www.5bay.cn/server-building/rsyncxiangjie.html" title="Rsync详解">Rsync详解</a> (0)</li><li>2010年05月23日 -- <a href="http://www.5bay.cn/server-building/gaoxingnengwangzhanjianshezhinandushubiji.html" title="《高性能网站建设指南》读书笔记">《高性能网站建设指南》读书笔记</a> (0)</li><li>2010年07月28日 -- <a href="http://www.5bay.cn/server-building/aspeaojie.html" title="ASP防注入新方式，希望对大家是有用的">ASP防注入新方式，希望对大家是有用的</a> (0)</li><li>2010年07月28日 -- <a href="http://www.5bay.cn/server-building/eeprn-asp-jpg.html" title="如何删除删不掉的”PRN.asp:.jpg”">如何删除删不掉的”PRN.asp:.jpg”</a> (0)</li><li>2010年07月28日 -- <a href="http://www.5bay.cn/server-building/eeeeeeee-2.html" title="防止网卡被禁用的具体配置方法">防止网卡被禁用的具体配置方法</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/eeeeeeee.html" title="最令PHP初学者头痛的十四个问题">最令PHP初学者头痛的十四个问题</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/phpeeeeeeeehuai.html" title="PHP对文本数据库的基本操作方法">PHP对文本数据库的基本操作方法</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/ajaxeeaoe.html" title="AJAX应用程序开发七宗罪">AJAX应用程序开发七宗罪</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/innerhtmleenertexteeterhtmlqia.html" title="innerHTML、innerText和outerHTML的用法">innerHTML、innerText和outerHTML的用法</a> (0)</li></ul>
	标签Tags：<a href="http://www.5bay.cn/tag/android" title="android" rel="tag">android</a>, <a href="http://www.5bay.cn/category/android%e7%ac%94%e8%ae%b0" title="Android笔记" rel="tag">Android笔记</a>, <a href="http://www.5bay.cn/tag/div" title="div" rel="tag">div</a>, <a href="http://www.5bay.cn/tag/google" title="google" rel="tag">google</a>, <a href="http://www.5bay.cn/tag/%E4%B8%8A%E4%BC%A0" title="上传" rel="tag">上传</a>, <a href="http://www.5bay.cn/tag/%E5%B1%9E%E6%80%A7" title="属性" rel="tag">属性</a>, <a href="http://www.5bay.cn/tag/%E5%B7%A5%E5%85%B7" title="工具" rel="tag">工具</a>, <a href="http://www.5bay.cn/tag/%E5%B9%B8%E7%A6%8F" title="幸福" rel="tag">幸福</a>, <a href="http://www.5bay.cn/tag/%E6%88%90%E5%8A%9F" title="成功" rel="tag">成功</a>, <a href="http://www.5bay.cn/tag/%E6%B5%8F%E8%A7%88%E5%99%A8" title="浏览器" rel="tag">浏览器</a>, <a href="http://www.5bay.cn/tag/%E7%BB%84%E4%BB%B6" title="组件" rel="tag">组件</a>, <a href="http://www.5bay.cn/tag/%E7%BD%91%E7%AB%99" title="网站" rel="tag">网站</a>, <a href="http://www.5bay.cn/tag/%E8%BF%9E%E6%8E%A5" title="连接" rel="tag">连接</a>, <a href="http://www.5bay.cn/tag/%E9%A1%B5%E9%9D%A2" title="页面" rel="tag">页面</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.5bay.cn/android%e7%ac%94%e8%ae%b0/androidzaixiankaifagongjuappinventor.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>网上整理的android权限大全</title>
		<link>http://www.5bay.cn/android%e7%ac%94%e8%ae%b0/wangshangzhenglideandroidquanxiandaquan.html</link>
		<comments>http://www.5bay.cn/android%e7%ac%94%e8%ae%b0/wangshangzhenglideandroidquanxiandaquan.html#comments</comments>
		<pubDate>Wed, 29 Jun 2011 03:53:26 +0000</pubDate>
		<dc:creator>江小邪</dc:creator>
				<category><![CDATA[Android笔记]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[大全]]></category>
		<category><![CDATA[应用程序]]></category>
		<category><![CDATA[数据库]]></category>
		<category><![CDATA[更新]]></category>
		<category><![CDATA[精华]]></category>
		<category><![CDATA[系统]]></category>
		<category><![CDATA[系统服务]]></category>
		<category><![CDATA[组件]]></category>
		<category><![CDATA[网站大流量问题]]></category>
		<category><![CDATA[连接]]></category>

		<guid isPermaLink="false">http://www.5bay.cn/?p=550</guid>
		<description><![CDATA[<a href="http://www.5bay.cn/android%e7%ac%94%e8%ae%b0/wangshangzhenglideandroidquanxiandaquan.html"><img align="left" hspace="5" width="150" height="150" src="http://www.5bay.cn/wp-content/plugins/thumbnail-for-excerpts/tfe_no_thumb.png" class="alignleft wp-post-image tfe" alt="" title="" /></a>android.permission.ACCESS_CHECKIN_PROPERTIES 允许读写访问 “properties”表在checkin数据库中，改值可以修改上传( Allows read/write access to the “properties” table inthe checkin database, to change values that get uploaded) android.permission.ACCESS_COARSE_LOCATION 允许一个程序访问CellID或WiFi热点来获取粗略的位置(Allows an application to access coarse (e.g., Cell-ID, WiFi)location) android.permission.ACCESS_FINE_LOCATION 允许一个程序访问精良位置(如GPS) (Allows an application to access fine(e.g., GPS) location) android.permission.ACCESS_LOCATION_EXTRA_COMMANDS 允许应用程序访问额外的位置提供命令(Allows an application to access extra location provider commands) android.permission.ACCESS_MOCK_LOCATION 允许程序创建模拟位置提供用于测试(Allows an application to create [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.5bay.cn/tag/android" class="st_tag internal_tag" rel="tag" title="标签 android 下的日志">android</a>.permission.ACCESS_CHECKIN_PROPERTIES 允许读写访问 “properties”表在checkin数据库中，改值可以修改上传( Allows read/write access to the “properties” table inthe checkin database, to change values that get uploaded)<br />
android.permission.ACCESS_COARSE_LOCATION 允许一个程序访问CellID或WiFi热点来获取粗略的位置(Allows an application to access coarse (e.g., Cell-ID, WiFi)location)<br />
android.permission.ACCESS_FINE_LOCATION 允许一个程序访问精良位置(如GPS) (Allows an application to access fine(e.g., GPS) location)<br />
android.permission.ACCESS_LOCATION_EXTRA_COMMANDS 允许应用程序访问额外的位置提供命令(Allows an application to access extra location provider commands)<br />
android.permission.ACCESS_MOCK_LOCATION 允许程序创建模拟位置提供用于测试(Allows an application to create mock location providers fortesting)<span id="more-550"></span><br />
android.permission.ACCESS_NETWORK_STATE 允许程序访问有关GSM网络信息(Allows applications to accessinformation about networks)<br />
android.permission.ACCESS_SURFACE_FLINGER 允许程序使用SurfaceFlinger底层特性(Allows an application touse SurfaceFlinger&#8217;s low level features)<br />
android.permission.ACCESS_WIFI_STATE 允许程序访问Wi-Fi网络状态信息(Allows applications to accessinformation about Wi-Fi networks)<br />
android.permission.ADD_SYSTEM_SERVICE 允许程序发布系统级服务(Allows an application to publish system-level services).<br />
android.permission.BATTERY_STATS 允许程序更新手机电池统计信息(Allows an application to update the collected battery statistics)<br />
android.permission.BLUETOOTH 允许程序连接到已配对的蓝牙设备(Allows applications to connect to paired bluetooth devices)<br />
android.permission.BLUETOOTH_ADMIN 允许程序发现和配对蓝牙设备(Allows applications to discover and pair bluetooth devices)<br />
android.permission.BRICK 请求能够禁用设备(非常危险)(Required to be able to disable the device (very dangerous!).)<br />
android.permission.BROADCAST_PACKAGE_REMOVED 允许程序广播一个提示消息在一个应用程序包已经移除后(Allows an application to broadcast a notification that anapplication package has been removed)<br />
android.permission.BROADCAST_STICKY .允许一个程序广播常用intents(Allows an application to broadcast sticky intents)<br />
android.permission.CALL_PHONE 允许一个程序初始化一个电话拨号不需通过拨号用户界面需要用户确认(Allows an application to initiate a phone call without goingthrough the Dialer user interface for the user to confirm the call beingplaced.)<br />
android.permission.CALL_PRIVILEGED 允许一个程序拨打任何号码，包含紧急号码无需通过拨号用户界面需要用户确认(Allows an application to call any phone number, including emergencynumbers, without going through the Dialer user interface for the user toconfirm the call being placed)<br />
android.permission.CAMERA 请求访问使用照相设备(Required to be able to access the camera device. )<br />
android.permission.CHANGE_COMPONENT_ENABLED_STATE 允许一个程序是否改变一个组件或其他的启用或禁用(Allows an application to change whether an application component(other than its own) is enabled or not. )<br />
android.permission.CHANGE_CONFIGURATION 允许一个程序修改当前设置，如本地化(Allows an application to modify the current configuration, such aslocale. )<br />
android.permission.CHANGE_NETWORK_STATE 允许程序改变网络连接状态(Allows applications to change network connectivity state)<br />
android.permission.CHANGE_WIFI_STATE 允许程序改变Wi-Fi连接状态(Allows applications to changeWi-Fi connectivity state)<br />
android.permission.CLEAR_APP_CACHE 允许一个程序清楚缓存从所有安装的程序在设备中(Allows an application to clear the caches of all installedapplications on the device. )<br />
android.permission.CLEAR_APP_USER_DATA 允许一个程序清除用户设置(Allows an application to clear user data)<br />
android.permission.CONTROL_LOCATION_UPDATES 允许启用禁止位置更新提示从无线模块(Allows enabling/disabling location update notifications from theradio. )<br />
android.permission.DELETE_CACHE_FILES 允许程序删除缓存文件(Allows an application to delete cache files)<br />
android.permission.DELETE_PACKAGES 允许一个程序删除包(Allows an application to delete packages)<br />
android.permission.DEVICE_POWER 允许访问底层电源管理(Allows low-level access to power management)<br />
android.permission.DIAGNOSTIC 允许程序RW诊断资源(Allows applications to RW todiagnostic resources. )<br />
android.permission.DISABLE_KEYGUARD 允许程序禁用键盘锁(Allows applications to disable the keyguard )<br />
android.permission.DUMP 允许程序返回状态抓取信息从系统服务(Allows an application to retrieve state dump information fromsystem services.)<br />
android.permission.EXPAND_STATUS_BAR 允许一个程序扩展收缩在状态栏,Android开发网提示应该是一个类似Windows Mobile中的托盘程序(Allows an application to expand or collapse the status bar. )<br />
android.permission.FACTORY_TEST 作为一个工厂测试程序，运行在root用户(Run as a manufacturer testapplication, running as the root user. )<br />
android.permission.FLASHLIGHT 访问闪光灯,Android开发网提示HTC Dream不包含闪光灯(Allows access to the flashlight )<br />
android.permission.FORCE_BACK 允许程序强行一个后退操作是否在顶层activities(Allows an application to force a BACK operation onwhatever is the top activity. )<br />
android.permission.FOTA_UPDATE 暂时不了解这是做什么使用的，Android开发网分析可能是一个预留权限.<br />
android.permission.GET_ACCOUNTS 访问一个帐户列表在Accounts Service中(Allows access to the listof accounts in the Accounts Service)<br />
android.permission.GET_PACKAGE_SIZE 允许一个程序获取任何package占用空间容量(Allows an application to findout the space used by any package. )<br />
android.permission.GET_TASKS 允许一个程序获取信息有关当前或最近运行的任务，一个缩略的任务状态，是否活动等等(Allows an application to get information about the currently orrecently running tasks: a thumbnail representation of the tasks, whatactivities are running in it, etc.)<br />
android.permission.HARDWARE_TEST 允许访问硬件(Allows access to hardware peripherals. )<br />
android.permission.INJECT_EVENTS 允许一个程序截获用户事件如按键、触摸、轨迹球等等到一个时间流，Android开发网提醒算是hook技术吧(Allows an application to inject user events (keys, touch, trackball)into the event stream and deliver them to ANY window.)<br />
android.permission.INSTALL_PACKAGES 允许一个程序安装packages(Allows an application to install packages. )<br />
android.permission.INTERNAL_SYSTEM_WINDOW 允许打开窗口使用系统用户界面(Allows an application to open windows that are for use by parts ofthe system user interface. )<br />
android.permission.INTERNET 允许程序打开网络套接字(Allows applications to open network sockets)<br />
android.permission.MANAGE_APP_TOKENS 允许程序管理(创建、催后、z -order默认向z轴推移)程序引用在窗口管理器中(Allows an application to manage(create, destroy, Z-order) application tokens in the window manager. )<br />
android.permission.MASTER_CLEAR 目前还没有明确的解释，Android开发网分析可能是清除一切数据，类似硬格机<br />
android.permission.MODIFY_AUDIO_SETTINGS 允许程序修改全局音频设置(Allows an application to modify global audio settings)<br />
android.permission.MODIFY_PHONE_STATE 允许修改话机状态，如电源，人机接口等(Allows modification of the telephony state &#8211; power on, mmi, etc. )<br />
android.permission.MOUNT_UNMOUNT_FILESYSTEMS 允许挂载和反挂载文件系统可移动存储(Allows mounting and unmounting file systems for removable storage.)<br />
android.permission.PERSISTENT_ACTIVITY 允许一个程序设置他的activities显示(Allow an application to makeits activities persistent. )<br />
android.permission.PROCESS_OUTGOING_CALLS 允许程序监视、修改有关播出电话(Allows an application to monitor, modify, or abort outgoing calls)<br />
android.permission.READ_CALENDAR 允许程序读取用户日历数据(Allows an application to read the user&#8217;s calendar data.)<br />
android.permission.READ_CONTACTS 允许程序读取用户联系人数据(Allows an application to read the user&#8217;s contacts data.)<br />
android.permission.READ_FRAME_BUFFER 允许程序屏幕波或和更多常规的访问帧缓冲数据(Allows an application to take screen shots and more generally getaccess to the frame buffer data)<br />
android.permission.READ_INPUT_STATE 允许程序返回当前按键状态(Allows an application to retrieve the current state of keys andswitches. )<br />
android.permission.READ_LOGS 允许程序读取底层系统日志文件(Allows an application to read the low-level system log files. )<br />
android.permission.READ_OWNER_DATA 允许程序读取所有者数据(Allows an application to read the owner&#8217;s data)<br />
android.permission.READ_SMS 允许程序读取短信息(Allows an application to read SMS messages.)<br />
android.permission.READ_SYNC_SETTINGS 允许程序读取同步设置(Allows applications to read the sync settings)<br />
android.permission.READ_SYNC_STATS 允许程序读取同步状态(Allows applications to read the sync stats)<br />
android.permission.REBOOT 请求能够重新启动设备(Required to be able to reboot the device. )<br />
android.permission.RECEIVE_BOOT_COMPLETED 允许一个程序接收到 ACTION_BOOT_COMPLETED广播在系统完成启动(Allows anapplication to receive the ACTION_BOOT_COMPLETED that is broadcast after thesystem finishes booting. )<br />
android.permission.RECEIVE_MMS 允许一个程序监控将收到MMS彩信,记录或处理(Allowsan application to monitor incoming MMS messages, to record or performprocessing on them. )<br />
android.permission.RECEIVE_SMS 允许程序监控一个将收到短信息，记录或处理(Allows an application to monitor incoming SMS messages, to record orperform processing on them.)<br />
android.permission.RECEIVE_WAP_PUSH 允许程序监控将收到WAP PUSH信息(Allows an application to monitorincoming WAP push messages. )<br />
android.permission.RECORD_AUDIO 允许程序录制音频(Allows an application to record audio)<br />
android.permission.REORDER_TASKS 允许程序改变Z轴排列任务(Allows an application to change theZ-order of tasks)<br />
android.permission.RESTART_PACKAGES 允许程序重新启动其他程序(Allows an application to restart other applications)<br />
android.permission.SEND_SMS 允许程序发送SMS短信(Allows an application to send SMSmessages)<br />
android.permission.SET_ACTIVITY_WATCHER 允许程序监控或控制activities已经启动全局系统中Allows an application towatch and control how activities are started globally in the system.<br />
android.permission.SET_ALWAYS_FINISH 允许程序控制是否活动间接完成在处于后台时Allows an application to control whether activities are immediatelyfinished when put in the background.<br />
android.permission.SET_ANIMATION_SCALE 修改全局信息比例(Modify the global animation scaling factor.)<br />
android.permission.SET_DEBUG_APP 配置一个程序用于调试(Configure an application for debugging.)<br />
android.permission.SET_ORIENTATION 允许底层访问设置屏幕方向和实际旋转(Allows low-level access to setting the orientation (actuallyrotation) of the screen.)<br />
android.permission.SET_PREFERRED_APPLICATIONS 允许一个程序修改列表参数PackageManager.addPackageToPreferred() 和PackageManager.removePackageFromPreferred()<a href="http://www.5bay.cn/tag/%E6%96%B9%E6%B3%95" class="st_tag internal_tag" rel="tag" title="标签 方法 下的日志">方法</a>(Allows an application to modify the list of preferred applicationswith the PackageManager.addPackageToPreferred() andPackageManager.removePackageFromPreferred() methods.)<br />
android.permission.SET_PROCESS_FOREGROUND 允许程序当前运行程序强行到前台(Allows an application to force any currently running process to bein the foreground.)<br />
android.permission.SET_PROCESS_LIMIT 允许设置最大的运行进程数量(Allows an application to set the maximum number of (not needed)application processes that can be running. )<br />
android.permission.SET_TIME_ZONE 允许程序设置时间区域(Allows applications to set the system time zone)<br />
android.permission.SET_WALLPAPER 允许程序设置壁纸(Allows applications to set the wallpaper )<br />
android.permission.SET_WALLPAPER_HINTS 允许程序设置壁纸hits(Allows applications to set the wallpaper hints)<br />
android.permission.SIGNAL_PERSISTENT_PROCESSES 允许程序请求发送信号到所有显示的进程中(Allow an application to request that a signal be sent to allpersistent processes)<br />
android.permission.STATUS_BAR 允许程序打开、关闭或禁用状态栏及图标Allows an application to open, close, or disable the status bar andits icons.<br />
android.permission.SUBSCRIBED_FEEDS_READ 允许一个程序访问订阅RSS Feed内容提供(Allows an application to allowaccess the subscribed feeds ContentProvider. )<br />
android.permission.SUBSCRIBED_FEEDS_WRITE 系统暂时保留改设置,Android开发网认为未来版本会加入该功能。<br />
android.permission.SYSTEM_ALERT_WINDOW 允许一个程序打开窗口使用 TYPE_SYSTEM_ALERT，显示在其他所有程序的顶层(Allows anapplication to open windows using the type TYPE_SYSTEM_ALERT, shown on top ofall other applications. )<br />
android.permission.VIBRATE 允许访问振动设备(Allows access to the vibrator)<br />
android.permission.WAKE_LOCK 允许使用PowerManager的 WakeLocks保持进程在休眠时从屏幕消失( Allows usingPowerManager WakeLocks to keep processor from sleeping or screen from dimming)<br />
android.permission.WRITE_APN_SETTINGS 允许程序写入API设置(Allows applications to write the apnsettings)<br />
android.permission.WRITE_CALENDAR 允许一个程序写入但不读取用户日历数据(Allows an application to write (but not read) the user&#8217;s calendardata. )<br />
android.permission.WRITE_CONTACTS 允许程序写入但不读取用户联系人数据(Allows an application to write (but not read) the user&#8217;s contactsdata. )<br />
android.permission.WRITE_GSERVICES 允许程序修改Google服务地图(Allows an application to modifythe <a href="http://www.5bay.cn/tag/google" class="st_tag internal_tag" rel="tag" title="标签 google 下的日志">Google</a> service map. )<br />
android.permission.WRITE_OWNER_DATA 允许一个程序写入但不读取所有者数据(Allows an application to write (but not read) the owner&#8217;s data.)<br />
android.permission.WRITE_SETTINGS 允许程序读取或写入系统设置(Allows an application to read or write the system settings. )<br />
android.permission.WRITE_SMS 允许程序写短信(Allows an application to write SMS messages)<br />
android.permission.WRITE_SYNC_SETTINGS 允许程序写入同步设置(Allows applications to write the sync settings</p>
<h2  class="related_post_title">相关博文</h2><ul class="related_post"><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/ajaxeeee.html" title="Ajax的工作原理">Ajax的工作原理</a> (1)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/phpeecketee.html" title="PHP和Socket简介">PHP和Socket简介</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/phpeeeeeeeehuai.html" title="PHP对文本数据库的基本操作方法">PHP对文本数据库的基本操作方法</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/eejaxeeeeee.html" title="使用Ajax时的十个常犯的错误">使用Ajax时的十个常犯的错误</a> (0)</li><li>2010年05月23日 -- <a href="http://www.5bay.cn/server-building/rsyncxiangjie.html" title="Rsync详解">Rsync详解</a> (0)</li><li>2010年05月23日 -- <a href="http://www.5bay.cn/server-building/mysqlyouhuajiquanwensousuo.html" title="mysql优化及全文搜索">mysql优化及全文搜索</a> (0)</li><li>2008年10月17日 -- <a href="http://www.5bay.cn/game-development/%E5%A4%9A%E8%BF%9B%E7%A8%8B%E7%9A%84%E6%B8%B8%E6%88%8F%E6%9C%8D%E5%8A%A1%E5%99%A8%E8%AE%BE%E8%AE%A1.html" title="多进程的游戏服务器设计">多进程的游戏服务器设计</a> (0)</li><li>2008年10月17日 -- <a href="http://www.5bay.cn/game-development/%E5%A4%9A%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%9A%84%E7%94%A8%E6%88%B7%E8%BA%AB%E4%BB%BD%E8%AE%A4%E8%AF%81%E6%96%B9%E6%A1%88.html" title="多服务器的用户身份认证方案">多服务器的用户身份认证方案</a> (0)</li><li>2011年06月29日 -- <a href="http://www.5bay.cn/android%e7%ac%94%e8%ae%b0/androidzaixiankaifagongjuappinventor.html" title="Android在线开发工具 App Inventor">Android在线开发工具 App Inventor</a> (0)</li><li>2010年07月28日 -- <a href="http://www.5bay.cn/server-building/aspeaojie.html" title="ASP防注入新方式，希望对大家是有用的">ASP防注入新方式，希望对大家是有用的</a> (0)</li><li>2010年07月28日 -- <a href="http://www.5bay.cn/server-building/eeeeeeee-2.html" title="防止网卡被禁用的具体配置方法">防止网卡被禁用的具体配置方法</a> (0)</li><li>2010年07月28日 -- <a href="http://www.5bay.cn/server-building/eeeeee389.html" title="无需输入密码登陆3389">无需输入密码登陆3389</a> (0)</li><li>2010年07月28日 -- <a href="http://www.5bay.cn/server-building/yaoeeechueeeeeeee.html" title="完美解决“由于这台计算机没有终端服务器客户端访问许可证”">完美解决“由于这台计算机没有终端服务器客户端访问许可证”</a> (0)</li><li>2010年07月28日 -- <a href="http://www.5bay.cn/server-building/aoeempirebakeebshell.html" title="帝国备份王(Empirebak)拿webshell">帝国备份王(Empirebak)拿webshell</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/eeeeeeee.html" title="最令PHP初学者头痛的十四个问题">最令PHP初学者头痛的十四个问题</a> (0)</li></ul>
	标签Tags：<a href="http://www.5bay.cn/tag/access" title="access" rel="tag">access</a>, <a href="http://www.5bay.cn/category/android%e7%ac%94%e8%ae%b0" title="Android笔记" rel="tag">Android笔记</a>, <a href="http://www.5bay.cn/tag/%E5%A4%A7%E5%85%A8" title="大全" rel="tag">大全</a>, <a href="http://www.5bay.cn/tag/%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F" title="应用程序" rel="tag">应用程序</a>, <a href="http://www.5bay.cn/tag/%E6%95%B0%E6%8D%AE%E5%BA%93" title="数据库" rel="tag">数据库</a>, <a href="http://www.5bay.cn/tag/%E6%9B%B4%E6%96%B0" title="更新" rel="tag">更新</a>, <a href="http://www.5bay.cn/tag/caz" title="精华" rel="tag">精华</a>, <a href="http://www.5bay.cn/tag/%E7%B3%BB%E7%BB%9F" title="系统" rel="tag">系统</a>, <a href="http://www.5bay.cn/tag/%E7%B3%BB%E7%BB%9F%E6%9C%8D%E5%8A%A1" title="系统服务" rel="tag">系统服务</a>, <a href="http://www.5bay.cn/tag/%E7%BB%84%E4%BB%B6" title="组件" rel="tag">组件</a>, <a href="http://www.5bay.cn/tag/%E7%BD%91%E7%AB%99%E5%A4%A7%E6%B5%81%E9%87%8F%E9%97%AE%E9%A2%98" title="网站大流量问题" rel="tag">网站大流量问题</a>, <a href="http://www.5bay.cn/tag/%E8%BF%9E%E6%8E%A5" title="连接" rel="tag">连接</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.5bay.cn/android%e7%ac%94%e8%ae%b0/wangshangzhenglideandroidquanxiandaquan.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>防止网卡被禁用的具体配置方法</title>
		<link>http://www.5bay.cn/server-building/eeeeeeee-2.html</link>
		<comments>http://www.5bay.cn/server-building/eeeeeeee-2.html#comments</comments>
		<pubDate>Wed, 28 Jul 2010 01:58:21 +0000</pubDate>
		<dc:creator>江小邪</dc:creator>
				<category><![CDATA[服务器构建&安全]]></category>
		<category><![CDATA[属性]]></category>
		<category><![CDATA[方法]]></category>
		<category><![CDATA[模板]]></category>
		<category><![CDATA[策略]]></category>
		<category><![CDATA[组件]]></category>
		<category><![CDATA[连接]]></category>

		<guid isPermaLink="false">http://www.5bay.cn/?p=523</guid>
		<description><![CDATA[<a href="http://www.5bay.cn/server-building/eeeeeeee-2.html"><img align="left" hspace="5" width="150" height="150" src="http://www.5bay.cn/wp-content/plugins/thumbnail-for-excerpts/tfe_no_thumb.png" class="alignleft wp-post-image tfe" alt="" title="" /></a>防止网卡被意外禁用，这个对大家可能没有多大的用途，但如果你有服务器托管在外面，那可就有用了，如果你那天不小心点到了“禁用”，呵呵，那后果我就不用说了吧，你的服务器马上就跟你说拜拜了，而且必须进入机房去重新启用网卡才可以（我就碰到了这样的倒霉事啊）。 闲话不多说，下面说重点： 实现的方法，用组策略来实现。 　　步骤： 　　1、运行——》gpedit.msc 　　2、导航至：用户配置——》管理模板——》网络——》网络连接 　　3.1、找到“禁止启用/禁用 LAN 连接的组件”，设置为“已启用” 　　3.2、找到“启用/禁用 LAN 连接的能力”，设置为“已禁用” 　　3.3、找到“为管理员启用 Windows 2000 网络连接设置”，设置为“已启用” 　　4、运行——》gpupdate /force 　　你现在检查一下本地连接的属性，“禁用”按钮已经变成灰色的不可用状态，这下你再也不用担心意外点中，让你的服务器跟你说拜拜了。 相关博文2011年06月29日 -- Android在线开发工具 App Inventor (0)2010年07月26日 -- Ajax的工作原理 (1)2010年05月23日 -- Rsync详解 (0)2011年06月29日 -- 网上整理的android权限大全 (0)2010年07月28日 -- ASP防注入新方式，希望对大家是有用的 (0)2010年07月28日 -- 无需输入密码登陆3389 (0)2010年07月26日 -- php的文档句法(heredoc)]]></description>
			<content:encoded><![CDATA[<p>防止网卡被意外禁用，这个对大家可能没有多大的用途，但如果你有服务器托管在外面，那可就有用了，如果你那天不小心点到了“禁用”，呵呵，那后果我就不用说了吧，你的服务器马上就跟你说拜拜了，而且必须进入机房去重新启用网卡才可以（我就碰到了这样的倒霉事啊）。</p>
<p>闲话不多说，下面说重点：</p>
<p>实现的方法，用组策略来实现。</p>
<p>　　步骤：</p>
<p>　　1、运行——》gpedit.msc</p>
<p>　　2、导航至：用户配置——》管理模板——》网络——》网络连接</p>
<p>　　3.1、找到“禁止启用/禁用 LAN 连接的组件”，设置为“已启用”</p>
<p>　　3.2、找到“启用/禁用 LAN 连接的能力”，设置为“已禁用”</p>
<p>　　3.3、找到“为管理员启用 Windows 2000 网络连接设置”，设置为“已启用”</p>
<p>　　4、运行——》gpupdate /force</p>
<p>　　你现在检查一下本地连接的属性，“禁用”按钮已经变成灰色的不可用状态，这下你再也不用担心意外点中，让你的服务器跟你说拜拜了。</p>
<h2  class="related_post_title">相关博文</h2><ul class="related_post"><li>2011年06月29日 -- <a href="http://www.5bay.cn/android%e7%ac%94%e8%ae%b0/androidzaixiankaifagongjuappinventor.html" title="Android在线开发工具 App Inventor">Android在线开发工具 App Inventor</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/ajaxeeee.html" title="Ajax的工作原理">Ajax的工作原理</a> (1)</li><li>2010年05月23日 -- <a href="http://www.5bay.cn/server-building/rsyncxiangjie.html" title="Rsync详解">Rsync详解</a> (0)</li><li>2011年06月29日 -- <a href="http://www.5bay.cn/android%e7%ac%94%e8%ae%b0/wangshangzhenglideandroidquanxiandaquan.html" title="网上整理的android权限大全">网上整理的android权限大全</a> (0)</li><li>2010年07月28日 -- <a href="http://www.5bay.cn/server-building/aspeaojie.html" title="ASP防注入新方式，希望对大家是有用的">ASP防注入新方式，希望对大家是有用的</a> (0)</li><li>2010年07月28日 -- <a href="http://www.5bay.cn/server-building/eeeeee389.html" title="无需输入密码登陆3389">无需输入密码登陆3389</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/phpeefangeredoc.html" title="php的文档句法(heredoc)<<<和PHP字符串操作">php的文档句法(heredoc)<<<和PHP字符串操作</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/phpeeeeeeeehuai.html" title="PHP对文本数据库的基本操作方法">PHP对文本数据库的基本操作方法</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/ajax.html" title="AJAX的各种控件和类库">AJAX的各种控件和类库</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/eejaxeeeeee.html" title="使用Ajax时的十个常犯的错误">使用Ajax时的十个常犯的错误</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/xmlhttpe.html" title="XMLHTTP对象封装技术">XMLHTTP对象封装技术</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/eesoneeajaxeehuai.html" title="基于JSON的高级AJAX开发技术">基于JSON的高级AJAX开发技术</a> (0)</li><li>2010年05月23日 -- <a href="http://www.5bay.cn/server-building/mysqlyouhuajiquanwensousuo.html" title="mysql优化及全文搜索">mysql优化及全文搜索</a> (0)</li><li>2010年05月23日 -- <a href="http://www.5bay.cn/network-programming/phpzhongdememcachehanshukumemcachefunctions.html" title="PHP中的Memcache函数库（Memcache Functions）">PHP中的Memcache函数库（Memcache Functions）</a> (0)</li><li>2010年05月23日 -- <a href="http://www.5bay.cn/server-building/gaoxingnengwangzhanjianshezhinandushubiji.html" title="《高性能网站建设指南》读书笔记">《高性能网站建设指南》读书笔记</a> (0)</li></ul>
	标签Tags：<a href="http://www.5bay.cn/tag/%E5%B1%9E%E6%80%A7" title="属性" rel="tag">属性</a>, <a href="http://www.5bay.cn/tag/%E6%96%B9%E6%B3%95" title="方法" rel="tag">方法</a>, <a href="http://www.5bay.cn/category/server-building" title="服务器构建&amp;安全" rel="tag">服务器构建&amp;安全</a>, <a href="http://www.5bay.cn/tag/%E6%A8%A1%E6%9D%BF" title="模板" rel="tag">模板</a>, <a href="http://www.5bay.cn/tag/%E7%AD%96%E7%95%A5" title="策略" rel="tag">策略</a>, <a href="http://www.5bay.cn/tag/%E7%BB%84%E4%BB%B6" title="组件" rel="tag">组件</a>, <a href="http://www.5bay.cn/tag/%E8%BF%9E%E6%8E%A5" title="连接" rel="tag">连接</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.5bay.cn/server-building/eeeeeeee-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>《高性能网站建设指南》读书笔记</title>
		<link>http://www.5bay.cn/server-building/gaoxingnengwangzhanjianshezhinandushubiji.html</link>
		<comments>http://www.5bay.cn/server-building/gaoxingnengwangzhanjianshezhinandushubiji.html#comments</comments>
		<pubDate>Sat, 22 May 2010 21:06:26 +0000</pubDate>
		<dc:creator>江小邪</dc:creator>
				<category><![CDATA[服务器构建&安全]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[中国特色]]></category>
		<category><![CDATA[人]]></category>
		<category><![CDATA[图片]]></category>
		<category><![CDATA[方法]]></category>
		<category><![CDATA[更新]]></category>
		<category><![CDATA[浏览器]]></category>
		<category><![CDATA[组件]]></category>
		<category><![CDATA[网站]]></category>
		<category><![CDATA[表]]></category>
		<category><![CDATA[解决]]></category>
		<category><![CDATA[设计]]></category>
		<category><![CDATA[重定向]]></category>
		<category><![CDATA[页面]]></category>

		<guid isPermaLink="false">http://www.5bay.cn/?p=346</guid>
		<description><![CDATA[<a href="http://www.5bay.cn/server-building/gaoxingnengwangzhanjianshezhinandushubiji.html"><img align="left" hspace="5" width="150" height="150" src="http://www.5bay.cn/wp-content/plugins/thumbnail-for-excerpts/tfe_no_thumb.png" class="alignleft wp-post-image tfe" alt="" title="" /></a>规则1，减少HTTP请求 这是最重要的原则，如果14条规则里只能选一条，那就是它了。可以通过多种方法减少HTTP请求，例如合并图片，合并JS和CSS等等。这一点薄荷网有很多改进的余地，首先应该把现在的JS合并了。 规则2，使用内容发布网络 内容发布网络就是CDN了，但是CDN似乎挺贵的，目前还不适合薄荷网，不过可以考虑自己弄一个网通的静态资源服务器解决有中国特色的可恶的南北互通问题。 规则3，添加Expires头 这个没什么好说的，是个建网站的人都应该知道。目前薄荷网图片,css,js,flash过期时间设置了3年，可以说是永久了，：） Expires有个麻烦的地方是内容更新问题，Ruby on Rails这方面处理的非常棒，它是在文件名后面自动带了 资源文件的timestamp，完美解决。 规则4，压缩组件 这个也没什么好说的，配置一下web server的压缩功能，减少服务器带宽，加快响应，立杆见影。 规则5，将样式表放在顶部 这条有点新鲜，虽然平常都是这么做的，但是没有想过不这样做有什么麻烦。如果不这样，浏览器是不能做到边下载边显示，用户体验很糟糕。薄荷网现在有部分样式没放在顶部，回头检查测试一下看看。 规则6，将脚本放在底部 这条是第一次听说，有些震惊。原因在于浏览器下载执行脚本的时候，会阻塞其他资源的下载，这样导致整体响应时间变长。薄荷网的脚本几乎都是放在顶部的，回头测试比较下看看。 规则7，避免CSS表达式 CSS表达是简直像个Bug，可以弃用，寻求变通的解决方便，比如事件处理器等。 规则8，使用外部的JavaScript和CSS 相信大家大部分情形下都是使用外联的，但纯粹的处理而已，内联JS和CSS似乎更快，考虑到缓存和复用，大部分情况显然是外联更划算。因此，在一些情景，例如首页，还是可以使用内联的。 规则9，减少DNS查找 DNS耗费的时间是相当可观的，因此同一页面的域名数量最好控制在2~4之间。 规则10，精简JavaScript 精简JavaScript可以显著减少Js文件的大小，减少下载时间。 规则11，避免重定向 get的重定向可以通过web server的url rewrite很好解决。 规则12，移除重复脚本 重复的脚本既增加一次http请求，又要重复执行，当然坚决移除了。 规则13，配置ETag 目前web server的ETag实现不但起不到好的效果，通常还使性能变得更差，真是一个糟糕的设计。 所以静态资源尽量去除ETag配置。但是对于刷新频率不高的Rails动态页面，这个似乎是个不错的大幅 加快响应的方法，值得再深入好好研究一番。 规则14，使Ajax可缓存 就是使用之前的规则应用于Ajax请求，：） 相关博文2010年07月26日 -- 使用Ajax时的十个常犯的错误 (0)2010年05月23日 -- nginx的rewrite规则 (1)2010年07月26日 -- AJAX应用程序开发七宗罪 (0)2010年07月26日 -- AJAX的各种控件和类库 (0)2010年07月26日 -- ajax的缺点 (0)2010年07月26日 -- [...]]]></description>
			<content:encoded><![CDATA[<p><strong>规则1，减少HTTP请求</strong></p>
<p>这是最重要的原则，如果14条规则里只能选一条，那就是它了。可以通过多种方法减少HTTP请求，例如合并图片，合并JS和CSS等等。这一点薄荷网有很多改进的余地，首先应该把现在的JS合并了。</p>
<p><strong>规则2，使用内容发布网络</strong></p>
<p>内容发布网络就是CDN了，但是CDN似乎挺贵的，目前还不适合薄荷网，不过可以考虑自己弄一个网通的静态资源服务器解决有中国特色的可恶的南北互通问题。</p>
<p><strong>规则3，添加Expires头</strong></p>
<p>这个没什么好说的，是个建网站的人都应该知道。目前薄荷网图片,<a href="http://www.5bay.cn/tag/css" class="st_tag internal_tag" rel="tag" title="标签 css 下的日志">css</a>,js,flash过期时间设置了3年，可以说是永久了，：） Expires有个麻烦的地方是内容更新问题，Ruby on Rails这方面处理的非常棒，它是在文件名后面自动带了</p>
<p>资源文件的timestamp，完美解决。<span id="more-346"></span></p>
<p><strong>规则4，压缩组件</strong></p>
<p>这个也没什么好说的，配置一下web server的压缩功能，减少服务器带宽，加快响应，立杆见影。</p>
<p><strong>规则5，将样式表放在顶部</strong></p>
<p>这条有点新鲜，虽然平常都是这么做的，但是没有想过不这样做有什么麻烦。如果不这样，浏览器是不能做到边下载边显示，用户体验很糟糕。薄荷网现在有部分样式没放在顶部，回头检查测试一下看看。</p>
<p><strong>规则6，将脚本放在底部</strong></p>
<p>这条是第一次听说，有些震惊。原因在于浏览器下载执行脚本的时候，会阻塞其他资源的下载，这样导致整体响应时间变长。薄荷网的脚本几乎都是放在顶部的，回头测试比较下看看。</p>
<p><strong>规则7，避免CSS表达式</strong></p>
<p>CSS表达是简直像个Bug，可以弃用，寻求变通的解决方便，比如事件处理器等。</p>
<p><strong>规则8，使用外部的JavaScript和CSS</strong></p>
<p>相信大家大部分情形下都是使用外联的，但纯粹的处理而已，内联JS和CSS似乎更快，考虑到缓存和复用，大部分情况显然是外联更划算。因此，在一些情景，例如首页，还是可以使用内联的。</p>
<p><strong>规则9，减少DNS查找</strong></p>
<p>DNS耗费的时间是相当可观的，因此同一页面的域名数量最好控制在2~4之间。</p>
<p><strong>规则10，精简JavaScript</strong></p>
<p>精简JavaScript可以显著减少Js文件的大小，减少下载时间。</p>
<p><strong>规则11，避免重定向</strong></p>
<p>get的重定向可以通过web server的url rewrite很好解决。</p>
<p><strong>规则12，移除重复脚本</strong></p>
<p>重复的脚本既增加一次http请求，又要重复执行，当然坚决移除了。</p>
<p><strong>规则13，配置ETag</strong></p>
<p>目前web server的ETag实现不但起不到好的效果，通常还使性能变得更差，真是一个糟糕的设计。</p>
<p>所以静态资源尽量去除ETag配置。但是对于刷新频率不高的Rails动态页面，这个似乎是个不错的大幅</p>
<p>加快响应的方法，值得再深入好好研究一番。</p>
<p><strong>规则14，使Ajax可缓存</strong></p>
<p>就是使用之前的规则应用于Ajax请求，：）</p>
<h2  class="related_post_title">相关博文</h2><ul class="related_post"><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/eejaxeeeeee.html" title="使用Ajax时的十个常犯的错误">使用Ajax时的十个常犯的错误</a> (0)</li><li>2010年05月23日 -- <a href="http://www.5bay.cn/server-building/nginxderewriteguize.html" title="nginx的rewrite规则">nginx的rewrite规则</a> (1)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/ajaxeeaoe.html" title="AJAX应用程序开发七宗罪">AJAX应用程序开发七宗罪</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/ajax.html" title="AJAX的各种控件和类库">AJAX的各种控件和类库</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/ajaxxuan.html" title="ajax的缺点">ajax的缺点</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/eesoneeajaxeehuai.html" title="基于JSON的高级AJAX开发技术">基于JSON的高级AJAX开发技术</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/eeeeeeee.html" title="最令PHP初学者头痛的十四个问题">最令PHP初学者头痛的十四个问题</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/ajaxeeee.html" title="Ajax的工作原理">Ajax的工作原理</a> (1)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/ajaxeeieeeeeting.html" title="AJAX初学:IE缓存页面的问题">AJAX初学:IE缓存页面的问题</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/xmlhttpe.html" title="XMLHTTP对象封装技术">XMLHTTP对象封装技术</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/phpeezhanchang.html" title="PHP安全之数据过滤">PHP安全之数据过滤</a> (0)</li><li>2010年05月23日 -- <a href="http://www.5bay.cn/server-building/rsyncxiangjie.html" title="Rsync详解">Rsync详解</a> (0)</li><li>2010年05月23日 -- <a href="http://www.5bay.cn/network-programming/phpfengzhuangchangyongjavascriptweijsleiyibiankuaisudiaoyong.html" title="PHP封装常用Javascript为JS类以便快速调用">PHP封装常用Javascript为JS类以便快速调用</a> (1)</li><li>2010年07月28日 -- <a href="http://www.5bay.cn/server-building/aspeaojie.html" title="ASP防注入新方式，希望对大家是有用的">ASP防注入新方式，希望对大家是有用的</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/phpeecketee.html" title="PHP和Socket简介">PHP和Socket简介</a> (0)</li></ul>
	标签Tags：<a href="http://www.5bay.cn/tag/ajax" title="ajax" rel="tag">ajax</a>, <a href="http://www.5bay.cn/tag/css" title="css" rel="tag">css</a>, <a href="http://www.5bay.cn/tag/flash" title="flash" rel="tag">flash</a>, <a href="http://www.5bay.cn/tag/javascript" title="javascript" rel="tag">javascript</a>, <a href="http://www.5bay.cn/tag/js" title="js" rel="tag">js</a>, <a href="http://www.5bay.cn/tag/server" title="server" rel="tag">server</a>, <a href="http://www.5bay.cn/tag/url" title="url" rel="tag">url</a>, <a href="http://www.5bay.cn/tag/web" title="web" rel="tag">web</a>, <a href="http://www.5bay.cn/tag/%E4%B8%AD%E5%9B%BD%E7%89%B9%E8%89%B2" title="中国特色" rel="tag">中国特色</a>, <a href="http://www.5bay.cn/tag/%E4%BA%BA" title="人" rel="tag">人</a>, <a href="http://www.5bay.cn/tag/%E5%9B%BE%E7%89%87" title="图片" rel="tag">图片</a>, <a href="http://www.5bay.cn/tag/%E6%96%B9%E6%B3%95" title="方法" rel="tag">方法</a>, <a href="http://www.5bay.cn/tag/%E6%9B%B4%E6%96%B0" title="更新" rel="tag">更新</a>, <a href="http://www.5bay.cn/category/server-building" title="服务器构建&amp;安全" rel="tag">服务器构建&amp;安全</a>, <a href="http://www.5bay.cn/tag/%E6%B5%8F%E8%A7%88%E5%99%A8" title="浏览器" rel="tag">浏览器</a>, <a href="http://www.5bay.cn/tag/%E7%BB%84%E4%BB%B6" title="组件" rel="tag">组件</a>, <a href="http://www.5bay.cn/tag/%E7%BD%91%E7%AB%99" title="网站" rel="tag">网站</a>, <a href="http://www.5bay.cn/tag/%E8%A1%A8" title="表" rel="tag">表</a>, <a href="http://www.5bay.cn/tag/%E8%A7%A3%E5%86%B3" title="解决" rel="tag">解决</a>, <a href="http://www.5bay.cn/tag/%E8%AE%BE%E8%AE%A1" title="设计" rel="tag">设计</a>, <a href="http://www.5bay.cn/tag/%E9%87%8D%E5%AE%9A%E5%90%91" title="重定向" rel="tag">重定向</a>, <a href="http://www.5bay.cn/tag/%E9%A1%B5%E9%9D%A2" title="页面" rel="tag">页面</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.5bay.cn/server-building/gaoxingnengwangzhanjianshezhinandushubiji.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adodb.Stream 组件的使用说明</title>
		<link>http://www.5bay.cn/network-programming/asp/adodbstream%E7%BB%84%E4%BB%B6%E7%9A%84%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.html</link>
		<comments>http://www.5bay.cn/network-programming/asp/adodbstream%E7%BB%84%E4%BB%B6%E7%9A%84%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.html#comments</comments>
		<pubDate>Wed, 02 Jan 2008 19:44:11 +0000</pubDate>
		<dc:creator>江小邪</dc:creator>
				<category><![CDATA[ASP]]></category>
		<category><![CDATA[adodb.stream]]></category>
		<category><![CDATA[组件]]></category>
		<category><![CDATA[说明]]></category>

		<guid isPermaLink="false">?p=276</guid>
		<description><![CDATA[<a href="http://www.5bay.cn/network-programming/asp/adodbstream%E7%BB%84%E4%BB%B6%E7%9A%84%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.html"><img align="left" hspace="5" width="150" height="150" src="http://www.5bay.cn/wp-content/plugins/thumbnail-for-excerpts/tfe_no_thumb.png" class="alignleft wp-post-image tfe" alt="" title="" /></a>Adodb.Stream是ADO的Stream对象,提供存取二进制数据或者文本流,从而实现对流的读、写和管理等操作.有下列方法：Cancel 方法使用方法如下Object.Cancel说明：取消执行挂起的异步 Execute 或 Open 方法的调用。Close 方法使用方法如下Object.Close：关闭对像CopyTo 方法使用方法如下Object.CopyTo(destStream,[CharNumber])说明：将对像的数据复制，destStream指向要复制的对像，CharNumber为可选参数，指要复制的字节数，不选为全部复制。Flush 方法使用方法如下Object.Flush说明：LoadFromFile 方法使用方法如下Object.LoadFromFile(FileName)说明:将FileName指定的文件装入对像中,参数FileName为指定的用户名。Open 方法 使用方法如下Object.Open(Source,[Mode],[Options],[UserName],[Password])说明：打开对像，参数说明：Sourece 对像源，可不指定Mode 指定打开模式，可不指定，可选参数如下：adModeRead =1adModeReadWrite =3adModeRecursive =4194304adModeShareDenyNone =16adModeShareDenyRead =4adModeShareDenyWrite =8adModeShareExclusive =12adModeUnknown =0adModeWrite =2Options 指定打开的选项，可不指定，可选参数如下：adOpenStreamAsync =1adOpenStreamFromRecord =4adOpenStreamUnspecified=-1UserName 指定用户名，可不指定。Password 指定用户名的密码Read 方法使用方法如下：Object.Read(Numbytes)说明：读取指定长度的二进制内容。参数说明：Numbytes指定的要读取的找度，不指定则读取全部。ReadText 方法 使用方法如下：Object.ReadText(NumChars)说明：读取指定长度的文本参数说明：NumChars指定的要读取的找度，不指定则读取全部。SaveToFile 方法 使用方法如下：Object.SaveToFile(FileName,[Options])说明：将对像的内容写到FileName指定的文件中参数说明：FileName指定的文件Options 存取的选项，可不指定，可选参数如下：adSaveCreateNotExist =1adSaveCreateOverWrite =2SetEOS 方法使用方法如下：Object.setEOS()说明：SkipLine 方法使用方法如下：Object.SkipLine()说明：Write 方法使用方法如下：Object.Write(Buffer)说明：将指定的数据装入对像中。参数说明：Buffer 为指定的要写入的内容。WriteText 方法使用方法如下：Object.Write(Data,[Options])说明：将指定的文本数据装入对像中。参数说明：Data 为指定的要写入的内容。Options 写入的选项，可不指定，可选参数如下：adWriteChar =0adWriteLine =1有下列属性：Charset EOS 返回对像内数据是否为空。LineSeparator 指定换行格式，可选参数有adCR =13adCRLF =-1adLF =10Mode 指定或返加模式。Position 指定或返加对像内数据的当前指针。Size 返回对像内数据的大小。State 返加对像状态是否打开。Type [...]]]></description>
			<content:encoded><![CDATA[<p>Adodb.Stream是ADO的Stream对象,提供存取二进制数据或者文本流,从而实现对流的读、写和管理等操作.<span id="more-276"></span><br/><br/>有下列方法：<br/>Cancel <a href="http://www.5bay.cn/tag/%E6%96%B9%E6%B3%95" class="st_tag internal_tag" rel="tag" title="标签 方法 下的日志">方法</a><br/>使用方法如下<br/>Object.Cancel<br/><a href="http://www.5bay.cn/tag/%E8%AF%B4%E6%98%8E" class="st_tag internal_tag" rel="tag" title="标签 说明 下的日志">说明</a>：取消执行挂起的异步 Execute 或 Open 方法的调用。<br/>Close 方法<br/>使用方法如下<br/>Object.Close<br/>：关闭对像<br/>CopyTo 方法<br/>使用方法如下<br/>Object.CopyTo(destStream,[CharNumber])<br/>说明：将对像的数据复制，destStream指向要复制的对像，CharNumber为可选参数，指要复制的字节数，不选为全部复制。<br/>Flush 方法<br/>使用方法如下<br/>Object.Flush<br/>说明：<br/>LoadFromFile 方法<br/>使用方法如下<br/>Object.LoadFromFile(FileName)<br/>说明:将FileName指定的文件装入对像中,参数FileName为指定的用户名。<br/>Open 方法 <br/>使用方法如下<br/>Object.Open(Source,[Mode],[Options],[UserName],[Password])<br/>说明：打开对像，<br/>参数说明：Sourece 对像源，可不指定<br/>Mode 指定打开模式，可不指定，可选参数如下：<br/>adModeRead =1<br/>adModeReadWrite =3<br/>adModeRecursive =4194304<br/>adModeShareDenyNone =16<br/>adModeShareDenyRead =4<br/>adModeShareDenyWrite =8<br/>adModeShareExclusive =12<br/>adModeUnknown =0<br/>adModeWrite =2<br/>Options 指定打开的选项，可不指定，可选参数如下：<br/>adOpenStreamAsync =1<br/>adOpenStreamFromRecord =4<br/>adOpenStreamUnspecified=-1<br/>UserName 指定用户名，可不指定。<br/>Password 指定用户名的密码<br/>Read 方法<br/>使用方法如下：<br/>Object.Read(Numbytes)<br/>说明：读取指定长度的二进制内容。<br/>参数说明：Numbytes指定的要读取的找度，不指定则读取全部。<br/><br/>ReadText 方法 <br/>使用方法如下：<br/>Object.ReadText(NumChars)<br/>说明：读取指定长度的文本<br/>参数说明：NumChars指定的要读取的找度，不指定则读取全部。<br/><br/>SaveToFile 方法 <br/>使用方法如下：<br/>Object.SaveToFile(FileName,[Options])<br/>说明：将对像的内容写到FileName指定的文件中<br/>参数说明：FileName指定的文件<br/>Options 存取的选项，可不指定，可选参数如下：<br/>adSaveCreateNotExist =1<br/>adSaveCreateOverWrite =2<br/><br/>SetEOS 方法<br/>使用方法如下：<br/>Object.setEOS()<br/>说明：<br/>SkipLine 方法<br/>使用方法如下：<br/>Object.SkipLine()<br/>说明：<br/>Write 方法<br/>使用方法如下：<br/>Object.Write(Buffer)<br/>说明：将指定的数据装入对像中。<br/>参数说明：Buffer 为指定的要写入的内容。<br/>WriteText 方法<br/>使用方法如下：<br/>Object.Write(Data,[Options])<br/>说明：将指定的文本数据装入对像中。<br/>参数说明：Data 为指定的要写入的内容。<br/>Options 写入的选项，可不指定，可选参数如下：<br/>adWriteChar =0<br/>adWriteLine =1<br/><br/><br/><br/>有下列属性：<br/>Charset <br/>EOS 返回对像内数据是否为空。<br/><br/>LineSeparator 指定换行格式，可选参数有<br/>adCR =13<br/>adCRLF =-1<br/>adLF =10<br/><br/>Mode 指定或返加模式。<br/><br/>Position 指定或返加对像内数据的当前指针。<br/><br/>Size 返回对像内数据的大小。<br/><br/>State 返加对像状态是否打开。<br/><br/>Type 指定或返回的数据类型，可选参数为：<br/>adTypeBinary =1<br/>adTypeText =2 <br/></p>
<h2  class="related_post_title">相关博文</h2><ul class="related_post"><li>2011年06月29日 -- <a href="http://www.5bay.cn/android%e7%ac%94%e8%ae%b0/androidzaixiankaifagongjuappinventor.html" title="Android在线开发工具 App Inventor">Android在线开发工具 App Inventor</a> (0)</li><li>2011年06月29日 -- <a href="http://www.5bay.cn/android%e7%ac%94%e8%ae%b0/wangshangzhenglideandroidquanxiandaquan.html" title="网上整理的android权限大全">网上整理的android权限大全</a> (0)</li><li>2010年07月28日 -- <a href="http://www.5bay.cn/server-building/eeeeeeee-2.html" title="防止网卡被禁用的具体配置方法">防止网卡被禁用的具体配置方法</a> (0)</li><li>2010年07月28日 -- <a href="http://www.5bay.cn/server-building/webshelleechueeee.html" title="Webshell下破解计算机管理员密码">Webshell下破解计算机管理员密码</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/ajaxeeee.html" title="Ajax的工作原理">Ajax的工作原理</a> (1)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/innerhtmleenertexteeterhtmlqia.html" title="innerHTML、innerText和outerHTML的用法">innerHTML、innerText和outerHTML的用法</a> (0)</li><li>2010年05月23日 -- <a href="http://www.5bay.cn/server-building/rsyncxiangjie.html" title="Rsync详解">Rsync详解</a> (0)</li><li>2010年05月23日 -- <a href="http://www.5bay.cn/server-building/gaoxingnengwangzhanjianshezhinandushubiji.html" title="《高性能网站建设指南》读书笔记">《高性能网站建设指南》读书笔记</a> (0)</li><li>2010年05月23日 -- <a href="http://www.5bay.cn/website/gaoxiaomanhuatujiejidalanqidequbie.html" title="搞笑漫画图解几大浏览器的区别">搞笑漫画图解几大浏览器的区别</a> (2)</li><li>2008年11月17日 -- <a href="http://www.5bay.cn/me/urlseopatchsforphpok30simple.html" title="URLSEO patchs for PHPOK3.0 simple">URLSEO patchs for PHPOK3.0 simple</a> (0)</li><li>2007年12月29日 -- <a href="http://www.5bay.cn/network-programming/asp/%E7%94%A8%E6%AD%A3%E5%88%99%E8%A7%A3%E6%9E%90%E5%9B%BE%E7%89%87%E5%9C%B0%E5%9D%80%E5%B9%B6%E5%88%A9%E7%94%A8xmlhttp%E7%BB%84%E4%BB%B6%E5%B0%86%E5%85%B6%E4%BF%9D%E5%AD%98.html" title="用正则解析图片地址,并利用XMLHTTP组件将其保存">用正则解析图片地址,并利用XMLHTTP组件将其保存</a> (0)</li><li>2006年12月11日 -- <a href="http://www.5bay.cn/me/%E7%BD%91%E7%AB%99%E6%95%B4%E5%90%88%E4%B9%8B%E4%B8%AD%EF%BC%8C%E6%9B%B4%E6%96%B0%E6%9A%82%E7%BC%93%7E.html" title="网站整合之中，更新暂缓~">网站整合之中，更新暂缓~</a> (0)</li><li>2006年02月19日 -- <a href="http://www.5bay.cn/me/%E8%BD%AF%E4%BB%B6%E7%89%88%E6%9C%AC%E5%8F%B7%E8%AF%B4%E6%98%8E.html" title="软件版本号说明">软件版本号说明</a> (0)</li></ul>
	标签Tags：<a href="http://www.5bay.cn/tag/adodbstream" title="adodb.stream" rel="tag">adodb.stream</a>, <a href="http://www.5bay.cn/category/network-programming/asp" title="ASP" rel="tag">ASP</a>, <a href="http://www.5bay.cn/tag/%E7%BB%84%E4%BB%B6" title="组件" rel="tag">组件</a>, <a href="http://www.5bay.cn/tag/%E8%AF%B4%E6%98%8E" title="说明" rel="tag">说明</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.5bay.cn/network-programming/asp/adodbstream%E7%BB%84%E4%BB%B6%E7%9A%84%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用正则解析图片地址,并利用XMLHTTP组件将其保存</title>
		<link>http://www.5bay.cn/network-programming/asp/%E7%94%A8%E6%AD%A3%E5%88%99%E8%A7%A3%E6%9E%90%E5%9B%BE%E7%89%87%E5%9C%B0%E5%9D%80%E5%B9%B6%E5%88%A9%E7%94%A8xmlhttp%E7%BB%84%E4%BB%B6%E5%B0%86%E5%85%B6%E4%BF%9D%E5%AD%98.html</link>
		<comments>http://www.5bay.cn/network-programming/asp/%E7%94%A8%E6%AD%A3%E5%88%99%E8%A7%A3%E6%9E%90%E5%9B%BE%E7%89%87%E5%9C%B0%E5%9D%80%E5%B9%B6%E5%88%A9%E7%94%A8xmlhttp%E7%BB%84%E4%BB%B6%E5%B0%86%E5%85%B6%E4%BF%9D%E5%AD%98.html#comments</comments>
		<pubDate>Sat, 29 Dec 2007 19:49:54 +0000</pubDate>
		<dc:creator>江小邪</dc:creator>
				<category><![CDATA[ASP]]></category>
		<category><![CDATA[xmlhttp]]></category>
		<category><![CDATA[图片地址]]></category>
		<category><![CDATA[正则解析]]></category>
		<category><![CDATA[组件]]></category>

		<guid isPermaLink="false">?p=272</guid>
		<description><![CDATA[<a href="http://www.5bay.cn/network-programming/asp/%E7%94%A8%E6%AD%A3%E5%88%99%E8%A7%A3%E6%9E%90%E5%9B%BE%E7%89%87%E5%9C%B0%E5%9D%80%E5%B9%B6%E5%88%A9%E7%94%A8xmlhttp%E7%BB%84%E4%BB%B6%E5%B0%86%E5%85%B6%E4%BF%9D%E5%AD%98.html"><img align="left" hspace="5" width="150" height="150" src="http://www.5bay.cn/wp-content/plugins/thumbnail-for-excerpts/tfe_no_thumb.png" class="alignleft wp-post-image tfe" alt="" title="" /></a>现在基于WEB页的HTML的编辑器在新闻系统，文章系统中用得越来越广，一个网页一粘就可以保持原来的样式，同时图片也可以在这个页中保持。但是在使用过程中，如果所粘贴页中的图片被删除，就会在自己的页面上留下一个大大的“X”，影响美观。以前只好把这个图片保存下来，再重新上传到服务器上，这样实在麻烦。能不能让服务器自动去下载图片保存在服务器并且替换页面上的链接？答案是肯定的。 要实现这个功能需要经过三个步骤： 一，取得原页中的图片的地址。方法很多，可以用分割字符串，也可以用正则匹配。实践证明用正则匹配最为简单。经过分析图片的地址都保存在&#60;img&#62;标签中。我们可以先取得所有这个标签。过程如下： Set objRegExp = New Regexp&#039;设置配置对象 objRegExp.IgnoreCase = True’忽略大小写 objRegExp.Global = True’设置为全文搜索 objRegExp.Pattern = &#34;&#60;img.+?&#62;&#34;&#039;为了确保能准确地取出图片地址所以分为两层配置：首先找到里面的&#60;img&#62;标签，然后再取出里面的图片地址后面的getimgs函数就是实现后一个功能的。 strs=trim(str) Set Matches =objRegExp.Execute(strs)’开始执行配置 For Each Match in Matches RetStr = RetStr &#38;getimgs( Match.Value )’执行第二轮的匹配 Next 所有的图片在里面都是这样的src=&#34;http://图片的地址&#34;，所以可以这样来取得确切的图片地址： function getimgs(str) getimgs=&#34;&#34; Set objRegExp1 = New Regexp objRegExp1.IgnoreCase = True objRegExp1.Global = True objRegExp1.Pattern = &#34;http://.+?&#34;&#34;&#34;’取出里面的地址 set mm=objRegExp1.Execute(str) For Each [...]]]></description>
			<content:encoded><![CDATA[<p>现在基于WEB页的HTML的编辑器在新闻系统，文章系统中用得越来越广，一个网页一粘就可以保持原来的样式，同时图片也可以在这个页中保持。但是在使用过程中，如果所粘贴页中的图片被删除，就会在自己的页面上留下一个大大的“X”，影响美观。以前只好把这个图片保存下来，再重新上传到服务器上，这样实在麻烦。能不能让服务器自动去下载图片保存在服务器并且替换页面上的链接？答案是肯定的。 <span id="more-272"></span><br/>要实现这个功能需要经过三个步骤： <br/>一，取得原页中的图片的地址。方法很多，可以用分割字符串，也可以用正则匹配。实践证明用正则匹配最为简单。经过分析图片的地址都保存在&lt;img&gt;标签中。我们可以先取得所有这个标签。过程如下： <br/>Set objRegExp = New Regexp&#039;设置配置对象 <br/>objRegExp.IgnoreCase = True’忽略大小写 <br/>objRegExp.Global = True’设置为全文搜索 <br/>objRegExp.Pattern = &quot;&lt;img.+?&gt;&quot;&#039;为了确保能准确地取出图片地址所以分为两层配置：首先找到里面的&lt;img&gt;标签，然后再取出里面的图片地址后面的getimgs函数就是实现后一个功能的。 <br/>strs=trim(str) <br/>Set Matches =objRegExp.Execute(strs)’开始执行配置 <br/>For Each Match in Matches <br/>RetStr = RetStr &amp;getimgs( Match.Value )’执行第二轮的匹配 <br/>Next <br/><br/>所有的图片在里面都是这样的src=&quot;http://图片的地址&quot;，所以可以这样来取得确切的图片地址： <br/>function getimgs(str) <br/>getimgs=&quot;&quot; <br/>Set objRegExp1 = New Regexp <br/>objRegExp1.IgnoreCase = True <br/>objRegExp1.Global = True <br/>objRegExp1.Pattern = &quot;http://.+?&quot;&quot;&quot;’取出里面的地址 <br/>set mm=objRegExp1.Execute(str) <br/>For Each Match1 in mm <br/>getimgs=getimgs&amp;&quot;&#124;&#124;&quot;&amp;left(Match1.Value,len(Match1.Value)-1)’把里面的地址串起来备用 <br/>next <br/>end function <br/><br/>取得了所有的图片的地址，我们就可以进行第二步的操作了。 <br/>二，下载图片并保存在服务器上。这个又可以分为两个步骤：一个是取得图片的内容，另一个是保存在服务器上。取得图片的内容是通过下面的函数来实现的： <br/>function getHTTPPage(<a href="http://www.5bay.cn/tag/url" class="st_tag internal_tag" rel="tag" title="标签 url 下的日志">url</a>) <br/>on error resume next <br/>dim http <br/>set http=server.createobject(&quot;MSXML2.XMLHTTP&quot;)‘使用xmlhttp的方法来获得图片的内容 <br/>Http.open &quot;GET&quot;,url,false <br/>Http.send() <br/>if Http.readystate&lt;&gt;4 then <br/>exit function <br/>end if <br/>getHTTPPage=Http.responseBody <br/>set http=nothing <br/>if err.number&lt;&gt;0 then err.Clear <br/>end function <br/>取得了图片的内容要保存，给人一种感觉是用FSO来作就可以了，但实际上不行，这样保存程序就会出错，因为FSO不支持流式的文件，所以我们要调用另一个对象：ADO.STREM。具体的过程如下： <br/>function saveimage(from,tofile) <br/>dim geturl,objStream,imgs <br/>geturl=trim(from) <br/>imgs=gethttppage(geturl)&#039;取得图片的具休内容的过程 <br/>Set objStream = Server.CreateObject(&quot;<a href="http://www.5bay.cn/tag/adodbstream" class="st_tag internal_tag" rel="tag" title="标签 adodb.stream 下的日志">ADODB.Stream</a>&quot;)&#039;建立ADODB.Stream对象，必须要ADO 2.5以上版本 <br/>objStream.Type =1&#039;以二进制模式打开 <br/>objStream.Open <br/>objstream.write imgs&#039;将字符串内容写入缓冲 <br/>objstream.SaveToFile server.mappath(tofile),2&#039;-将缓冲的内容写入文件 <br/>objstream.Close()&#039;关闭对象 <br/>set objstream=nothing <br/>end function <br/>所以只要用一个循环来把刚才取得的地址中的图片全部保存下来，具体过程如下： <br/>arrimg=split(retstr,&quot;&#124;&#124;&quot;)&#039;分割字串，取得里面地址列表 <br/>allimg=&quot;&quot; <br/>newimg=&quot;&quot; <br/>for i=1 to ubound(arrimg) <br/>if arrimg(i)&lt;&gt;&quot;&quot; and instr(allimg,arrimg(i))&lt;1 then&#039;看这个图片是否已经下载过 <br/>fname=baseurl&amp;cstr(i&amp;mid(arrimg(i),instrrev(arrimg(i),&quot;.&quot;))) <br/>saveimage(arrimg(i),fname)‘保存地址的函数，过程见上面 <br/>allimg=allimg&amp;&quot;&#124;&#124;&quot;&amp;arrimg(i)&#039;把保存下来的图片的地址串回起来，以确定要替换的地址 <br/>newimg=newimg&amp;&quot;&#124;&#124;&quot;&amp;fname&#039;把本地的地址串回起来 <br/>end if <br/>next <br/>第三步就是替换原来的地址了。具体的过程就是下面了： <br/>arrnew=split(newimg,&quot;&#124;&#124;&quot;)&#039;取得原来的图片地址列表 <br/>arrall=split(allimg,&quot;&#124;&#124;&quot;)&#039;取得已经保存下来的图片的地址列表 <br/>for i=1 to ubound(arrnew)&#039;执行循环替换原来的地址 <br/>strs=replace(strs,arrall(i),arrnew(i)) <br/>next <br/>cctv=strs <br/>讲到这里，这个函数的基本过程就是这样了，当然可以对它进行改造就可以实现更多的功能，如：加上图片大小的限制，加上对本地机上的图片下载的限制，以免造成重复下载图片。同时也应该看到这个函数的不足之处是只能处理静态的图片文件，不能适用程序生成的图片。<br/></p>
<h2  class="related_post_title">相关博文</h2><ul class="related_post"><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/ajax.html" title="AJAX的各种控件和类库">AJAX的各种控件和类库</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/eejaxeeetpit.html" title="了解Ajax中的Get和Post ">了解Ajax中的Get和Post </a> (0)</li><li>2011年06月29日 -- <a href="http://www.5bay.cn/android%e7%ac%94%e8%ae%b0/androidzaixiankaifagongjuappinventor.html" title="Android在线开发工具 App Inventor">Android在线开发工具 App Inventor</a> (0)</li><li>2011年06月29日 -- <a href="http://www.5bay.cn/me/kaiyuanruanjiandeyinglimoshi.html" title="开源软件的盈利模式">开源软件的盈利模式</a> (0)</li><li>2011年06月29日 -- <a href="http://www.5bay.cn/android%e7%ac%94%e8%ae%b0/wangshangzhenglideandroidquanxiandaquan.html" title="网上整理的android权限大全">网上整理的android权限大全</a> (0)</li><li>2010年07月28日 -- <a href="http://www.5bay.cn/server-building/aspeaojie.html" title="ASP防注入新方式，希望对大家是有用的">ASP防注入新方式，希望对大家是有用的</a> (0)</li><li>2010年07月28日 -- <a href="http://www.5bay.cn/server-building/eeprn-asp-jpg.html" title="如何删除删不掉的”PRN.asp:.jpg”">如何删除删不掉的”PRN.asp:.jpg”</a> (0)</li><li>2010年07月28日 -- <a href="http://www.5bay.cn/server-building/eeeeeeee-2.html" title="防止网卡被禁用的具体配置方法">防止网卡被禁用的具体配置方法</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/ajaxeeee.html" title="Ajax的工作原理">Ajax的工作原理</a> (1)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/eejaxeeeeee.html" title="使用Ajax时的十个常犯的错误">使用Ajax时的十个常犯的错误</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/ajaxeeieeeeeting.html" title="AJAX初学:IE缓存页面的问题">AJAX初学:IE缓存页面的问题</a> (0)</li><li>2010年07月26日 -- <a href="http://www.5bay.cn/network-programming/xmlhttpe.html" title="XMLHTTP对象封装技术">XMLHTTP对象封装技术</a> (0)</li><li>2010年05月23日 -- <a href="http://www.5bay.cn/website/nginxtongguouser-agentpanduanshoujizhongduan.html" title="nginx 通过user-agent判断手机终端">nginx 通过user-agent判断手机终端</a> (0)</li><li>2010年05月23日 -- <a href="http://www.5bay.cn/server-building/gaoxingnengwangzhanjianshezhinandushubiji.html" title="《高性能网站建设指南》读书笔记">《高性能网站建设指南》读书笔记</a> (0)</li><li>2008年01月2日 -- <a href="http://www.5bay.cn/network-programming/asp/adodbstream%E7%BB%84%E4%BB%B6%E7%9A%84%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.html" title="Adodb.Stream 组件的使用说明">Adodb.Stream 组件的使用说明</a> (0)</li></ul>
	标签Tags：<a href="http://www.5bay.cn/category/network-programming/asp" title="ASP" rel="tag">ASP</a>, <a href="http://www.5bay.cn/tag/asp" title="ASP" rel="tag">ASP</a>, <a href="http://www.5bay.cn/tag/xmlhttp" title="xmlhttp" rel="tag">xmlhttp</a>, <a href="http://www.5bay.cn/tag/%E5%9B%BE%E7%89%87%E5%9C%B0%E5%9D%80" title="图片地址" rel="tag">图片地址</a>, <a href="http://www.5bay.cn/tag/%E6%AD%A3%E5%88%99%E8%A7%A3%E6%9E%90" title="正则解析" rel="tag">正则解析</a>, <a href="http://www.5bay.cn/tag/%E7%BB%84%E4%BB%B6" title="组件" rel="tag">组件</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.5bay.cn/network-programming/asp/%E7%94%A8%E6%AD%A3%E5%88%99%E8%A7%A3%E6%9E%90%E5%9B%BE%E7%89%87%E5%9C%B0%E5%9D%80%E5%B9%B6%E5%88%A9%E7%94%A8xmlhttp%E7%BB%84%E4%BB%B6%E5%B0%86%E5%85%B6%E4%BF%9D%E5%AD%98.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

