<?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://chinarui.yo2.cn/category/study/feed" rel="self" type="application/rss+xml" />
	<link>http://chinarui.yo2.cn</link>
	<description>关注计算机软件、互联网应用，记录生活点滴，分享情感片段</description>
	<lastBuildDate>Sun, 17 Jul 2011 09:43:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>酷派S100手机DIY教程之二-修改主菜单</title>
		<link>http://chinarui.yo2.cn/study/coolpad-s100-mod-tutorial-main_menu.html</link>
		<comments>http://chinarui.yo2.cn/study/coolpad-s100-mod-tutorial-main_menu.html#comments</comments>
		<pubDate>Fri, 13 Nov 2009 15:18:05 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[技术|学习]]></category>
		<category><![CDATA[BREW]]></category>
		<category><![CDATA[刷机]]></category>
		<category><![CDATA[天翼]]></category>
		<category><![CDATA[手机]]></category>
		<category><![CDATA[酷派]]></category>

		<guid isPermaLink="false">http://www.chinarui.net/?p=40240</guid>
		<description><![CDATA[这次的教程，其实很简单，依然只需要对一个配置文件做简单的修改即可。修改后，你可以：
   1. 按照自己的喜好灵活安排主界面菜单的排列；
   2. 为主界面菜单换上自己中意的图标；
   3. 换上自己喜欢的开关机动画。
    * 准备工作
   1. 手机充满电；
   2. 准备好驱动程序，以及上次提到过的工具软件；
   3. 图片编辑软件，要求是可以将图片保存成png格式的，例如Photoshop或者Fireworks，Windows 7的画图也可以。]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: medium;"><span style="color: #ff0000;"><span style="font-size: small;">（原创内容，转载请注明：<a title="阿芮的博客" href="http://www.chinarui.net">阿芮的博客</a>-</span></span></span> <span style="font-size: medium;"><span style="color: #ff0000;"><span style="font-size: small;"><a href="http://www.chinarui.net/article/study/coolpad-s100-mod-tutorial-main_menu.html">http://www.chinarui.net/article/study/coolpad-s100-mod-tutorial-main_menu.html</a></span></span></span><span style="font-size: medium;"><span style="color: #ff0000;"><span style="font-size: small;">）</span></span></span></p>
<p style="padding-left: 30px;"><span style="font-size: medium;"><span style="color: #ff0000;"><span style="font-size: small;">阿芮原创酷派DIY教程系列：</span></span></span></p>
<p style="padding-left: 30px;"><span style="font-size: medium;"><span style="color: #ff0000;"><span style="font-size: small;"><a title="破解电信锁定的快捷图标" href="../article/study/coolpad-s100-mod-shortcut.html">教程一：破解电信锁定的快捷图标</a></span></span></span><a title="修改主菜单" href="../article/study/coolpad-s100-mod-tutorial-main_menu.html"><br>
教程二：修改主菜单</a></p>
<p><a href="http://www.chinarui.net/article/study/coolpad-s100-mod-shortcut.html" target="_self">上次写到酷派S100手机去掉电信定制机快捷图标的方法</a>，不少朋友都很关注，我也答应继续写一些DIY的教程，无奈最近被压迫得比较厉害，老是加班，没时间写。今天抽空写个简单但实用的，后面也会陆续将我自己玩机的经验写出来供大家参考。废话不多说，转入正题。</p>
<p><span style="font-size: medium;"><span style="color: #ff0000;">（特别提示：刷机有风险，请谨慎！）</span></span></p>
<ul>
<li><span style="color: #ff6600;">效果说明</span></li>
</ul>
<p>这次的教程，其实很简单，依然只需要对一个配置文件做简单的修改即可。修改后，你可以：</p>
<ol>
<li>按照自己的喜好灵活安排主界面菜单的排列；</li>
<li>为主界面菜单换上自己中意的图标；</li>
<li>换上自己喜欢的开关机动画。</li>
</ol>
<ul>
<li><span style="color: #ff6600;">准备工作</span></li>
</ul>
<ol>
<li>手机充满电；</li>
<li>准备好驱动程序，以及<a href="http://www.chinarui.net/article/study/coolpad-s100-mod-shortcut.html" target="_self">上次</a>提到过的工具软件；</li>
<li>图片编辑软件，要求是可以将图片保存成png格式的，例如Photoshop或者Fireworks，Windows 7的画图也可以。</li>
</ol>
<ul>
<li><span style="color: #ff6600;">开始DIY</span></li>
</ul>
<ol>
<li>按照<a href="http://www.chinarui.net/article/study/coolpad-s100-mod-shortcut.html" target="_self">上次</a>讲过的方法，连接好手机；</li>
<li>用QPST的EFS Explorer打开手机文件系统目录，这回我们需要动手术的是这个目录：/brew/mod/coreapp以及其子目录zhcn，还有/brew/mod/skin目录：
<div class="mceTemp mceIEcenter">
<dl id="attachment_40241" class="wp-caption aligncenter" style="width: 601px;">
<dt class="wp-caption-dt"><img class="size-large wp-image-40241" title="coreapp-1" src="http://www.chinarui.net/wp-content/uploads/414/41448/2009/11/coreapp-1-660x465.png" alt="coreapp-1" width="591" height="416"></dt>
</dl>
</div>
</li>
<li><span style="color: #ff0000;">更换开关机动画。</span>看见/brew/mod/coreapp目录下的startgif.gif和powergif.gif了吧，这就是默认的开关机动画图片，其中startgif.gif是开机动画，powergif.gif是关机动画。现在你可以不必每天看电信天翼了，你可以换上你自己喜欢的GIF图片，没什么特别的要求，注意尺寸是240×320，文件大小尽量控制在50k左右，开机动画命名为startgif.gif，关机动画命名为powergif.gif，可以事先备份原来的图片。</li>
<li><span style="color: #ff0000;">重新排列主菜单。</span>现在看/brew/mod/coreapp/zhcn目录，该目录下有个desktop.ini文件，这个就是今天的主角了。
<div class="mceTemp mceIEcenter">
<dl id="attachment_40250" class="wp-caption aligncenter" style="width: 600px;">
<dt class="wp-caption-dt"><img class="size-large wp-image-40250" title="coreapp-2" src="http://www.chinarui.net/wp-content/uploads/414/41448/2009/11/coreapp-2-660x459.png" alt="coreapp-2" width="590" height="410"></dt>
</dl>
</div>
</li>
<li>desktop.ini文件其实就是主界面菜单的配置文件，通过修改这个文件，就可以实现主界面菜单的重排。desktop.ini原来的配置大概是这样的：<span style="color: #ff9900;">﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿[SET]</span>// 配置页的数目PageCount =1// 皮肤的数目
<p>Skin =2</p>
<p>// 桌面支持几套图标, 如果只有一套图标，则所有外观都采用第一套默认图标</p>
<p>// 2018取消桌面图标设置功能，只需一套图标就行了</p>
<p>IconCount =1</p>
<p><span style="color: #ff9900;">// 默认图标</span></p>
<p>[SKIN1]</p>
<p>// 图标路径</p>
<p>IconDir =fs:/mod/coreapp/zhcn/0/</p>
<p>IconSkin =SKIN1</p>
<p><span style="color: #ff9900;">// 每一项页图标数目</span></p>
<p>// 第一页图标</p>
<p>IconNum1 =12</p>
<p>// 图标次序</p>
<p>Tab1Icon1 =app_dial.bar<span style="color: #ff0000;">（拨号盘）</span></p>
<p>Tab1Icon2 =app_sms.bar<span style="color: #ff9900;"><span style="color: #ff0000;">（短信）</span></span></p>
<p>Tab1Icon3 =app_qdial.bar<span style="color: #ff0000;">（快速拨号）</span></p>
<p>Tab1Icon4 =app_ctwap.bar<span style="color: #ff0000;">（互联星空）</span></p>
<p>Tab1Icon5 =app_telecom.bar<span style="color: #ff0000;">（天翼）</span></p>
<p>Tab1Icon6 =app_knowall.bar<span style="color: #ff0000;">（号码百事通）</span></p>
<p>Tab1Icon7 =app_address.bar<span style="color: #ff0000;">（联系人）</span></p>
<p>Tab1Icon8 =app_pdaware.bar<span style="color: #ff0000;">（商务应用）</span></p>
<p>Tab1Icon9 =app_callhistory.bar<span style="color: #ff0000;">（通话记录）</span></p>
<p>Tab1Icon10 =app_customser.bar<span style="color: #ff0000;">（客户服务）</span></p>
<p>Tab1Icon11 =app_multimedia.bar<span style="color: #ff0000;">（影音娱乐）</span></p>
<p>Tab1Icon12 =app_setting.bar<span style="color: #ff0000;">（应用设置）</span></p>
<p><span style="color: #ff9900;">// 第二套图标</span></p>
<p>[SKIN2]</p>
<p>// 图标路径</p>
<p>IconDir =fs:/mod/coreapp/zhcn/0/</p>
<p>IconSkin =SKIN1</p>
<p><span style="color: #ff9900;">// 第三套图标</span></p>
<p>[SKIN3]</p>
<p>// 图标路径</p>
<p>IconDir =fs:/mod/coreapp/zhcn/0/</p>
<p>IconSkin =SKIN1</p>
<p>重点关注“图标次序”这部分，这个就是主界面从左到右，从上到下，3列4行共12个图标位置所对应的菜单资源文件了，每个不同的bar文件，指示了点击该菜单所导向的功能界面。现在你可以根据自己的喜好，自由进行配置了（例如你想把联系人放到第一个位置，那么就可以配置Tab1Icon1 =app_address.bar）。</p>
<p>其实这些bar文件是对应到/brew/mod/coreapp/zhcn/0这个目录的，如果你在你的/brew/mod/coreapp/zhcn/0目录下发现有其他的bar文件，你也可以尝试配置到desktop.ini文件试试。特别提示：如果你对一不小心就碰到互联星空导致上网产生费用非常的不爽，教你一招，那就是把Tab1Icon4 =app_ctwap.bar这一项换成别的，或者干脆空起来（Tab1Icon4 =），这样你点击那个位置，就会进入你换的那个bar对应的功能，或者干脆没反应了。</p>
</li>
<li><span style="color: #ff0000;">更换主菜单图标。</span>上面更改了菜单的排列，为了视觉上看到的菜单项和实际上调整的功能项位置对应，就需要修改桌面主菜单图标了。现在看/brew/mod/skin目录，里面有两个子目录0和1，分别对应两套皮肤：
<div class="mceTemp mceIEcenter">
<dl id="attachment_40251" class="wp-caption aligncenter" style="width: 600px;">
<dt class="wp-caption-dt"><img class="size-large wp-image-40251" title="coreapp-3" src="http://www.chinarui.net/wp-content/uploads/414/41448/2009/11/coreapp-3-660x459.png" alt="coreapp-3" width="590" height="410"></dt>
</dl>
</div>
<p>现在要修改的就是formback.png这个图片文件，你可以在原来图片的基础上修改，也可以按照自己的设计全新制作，总之是自由发挥了，注意要跟上面一步中调整的菜单位置一一对应， 尺寸是240×290，文件大小尽量控制在50k左右。</p>
</li>
<li>最后一步，重启手机，看效果吧。
<p>懒得贴效果图了，都是很简单的操作，大家自由发挥吧。</p>
<p>至此，本节教程基本完毕，阿芮有空也将继续写后续教程，祝大家玩得愉快！</p>
</li>
</ol>
<p><span style="font-size: medium;"><span style="color: #ff0000;">再次提醒：刷机有风险，请谨慎！刷坏手机或丢失资料后果自负，本人不承担任何责任。</span></span></p>
<p><span style="font-size: medium;"><span style="color: #ff0000;"><span style="font-size: small;">（原创内容，转载请注明：<a title="阿芮的博客" href="http://www.chinarui.net">阿芮的博客</a>- <a href="http://www.chinarui.net/article/study/coolpad-s100-mod-tutorial-main_menu.html" target="_self">http://www.chinarui.net/article/study/coolpad-s100-mod-tutorial-main_menu.html</a></span></span></span><span style="font-size: medium;"><span style="color: #ff0000;"><span style="font-size: small;">）</span></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://chinarui.yo2.cn/study/coolpad-s100-mod-tutorial-main_menu.html/feed</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>酷派S100手机DIY教程之一-破解电信锁定的快捷图标</title>
		<link>http://chinarui.yo2.cn/study/coolpad-s100-mod-shortcut.html</link>
		<comments>http://chinarui.yo2.cn/study/coolpad-s100-mod-shortcut.html#comments</comments>
		<pubDate>Sun, 30 Aug 2009 14:32:50 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[技术|学习]]></category>
		<category><![CDATA[BREW]]></category>
		<category><![CDATA[刷机]]></category>
		<category><![CDATA[天翼]]></category>
		<category><![CDATA[手机]]></category>
		<category><![CDATA[酷派]]></category>

		<guid isPermaLink="false">http://chinarui.net/?p=35245</guid>
		<description><![CDATA[最近公司要求统一使用电信的天翼189号码，发了一部宇龙酷派S100手机终端。
……
这几个快捷方式一不小心就会点到，尤其是互联星空，占着第一个位置，一点就启动浏览器开始上网，关都来不及关，很是不爽。之前也看到网上有机友在抱怨这种做法，但目前好像还没有人拿出解决办法。今天刚好有空，就研究了一番，最后这个问题终于被我成功解决了。下面是破解过程的说明。]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: medium;"><span style="color: #ff0000;"><span style="font-size: small;">（原创内容，转载请注明：<a title="阿芮的博客" href="http://www.chinarui.net">阿芮的博客</a>- <a href="http://www.chinarui.net/article/study/coolpad-s100-mod-shortcut.html">http://www.chinarui.net/article/study/coolpad-s100-mod-shortcut.html</a>）</span></span></span></p>
<p style="padding-left: 30px;"><span style="font-size: medium;"><span style="color: #ff0000;"><span style="font-size: small;">阿芮原创酷派DIY教程系列：</span></span></span></p>
<p style="padding-left: 30px;"><span style="font-size: medium;"><span style="color: #ff0000;"><span style="font-size: small;"><a title="破解电信锁定的快捷图标" href="http://www.chinarui.net/article/study/coolpad-s100-mod-shortcut.html">教程一：破解电信锁定的快捷图标</a><br>
<a title="修改主菜单" href="http://www.chinarui.net/article/study/coolpad-s100-mod-tutorial-main_menu.html">教程二：修改主菜单</a><br></span></span></span></p>
<p>最近公司要求统一使用电信的天翼189号码，发了一部宇龙酷派S100手机终端。</p>
<p>这部机子宣传资料上打出了PDA智能机的招牌，但实际上其操作系统是基于高通6030平台的BREW的系统，而且不支持Kjava的应用扩展，只能在电信的BREW应用商城里订购安装BREW应用，且不说这种定制软件是要包月订购才能使用，目前电信软件商城里能下载到的软件个数也是少得可怜，连QQ和UCWEB都没有！这点非常让人郁闷！</p>
<p>不过如果不讲究扩展应用，只是需要一般的电话及简单商务功能，这部机器倒是还不错的，因为它提供了挺丰富的功能和设置，全屏手写也做得还不错。</p>
<p>上面是几句啰嗦话，今天的主题来了。这部机器在待机界面下面本来是可以设置5个快捷方式的，但电信定制机把前两个固定死了，第1个图标是互联星空，第2个则是号码百事通，这两个不能通过待机设置来改变的，只能修改后面3个。这几个快捷方式一不小心就会点到，尤其是互联星空，占着第一个位置，一点就启动浏览器开始上网，关都来不及关，很是不爽。</p>
<p>之前也看到网上有机友在抱怨这种做法，但目前好像还没有人拿出解决办法。今天刚好有空，就研究了一番，最后这个问题终于被我成功解决了。下面是破解过程的说明。</p>
<p><span style="font-size: medium;"><span style="color: #ff0000;">（特别提示：刷机有风险，请谨慎！）</span></span></p>
<p>主要步骤：</p>
<ul>
<li><span style="color: #ff6600;">准备工作</span></li>
</ul>
<ol>
<li>手机充满电；</li>
<li>下载安装相关驱动和工具软件：</li>
</ol>
<p>▲酷派S100的驱动程序（CoolPad Suite里面带有驱动程序）。<a href="http://www.coolpad.cn/product/download.jsp?product=s100" target="_blank">点这里下载</a></p>
<p>▲QPST（(Qualcomm Product Support Tool）高通公司的产品支持工具，刷机就靠它了。<a href="http://www.heimao.cn/html/shoujisoft/20070826/137.html" target="_blank">点这里下载</a></p>
<p>▲ EditPlus或者Ultra Edit等文本编辑工具（非必须，用记事本应该也可以，不错我没测试）。</p>
<ul>
<li><span style="color: #ff6600;">开始刷机</span></li>
</ul>
<ol>
<li>用随机附带的数据线连接手机和电脑，如果前面装好了驱动，应该会被电脑识别；</li>
<li>打开电脑的设备管理器,用右键点击“我的电脑”图标,选择“属性”,在“系统属性”窗口中点击“硬件”那一页，然后点击“设备管理器”按钮；在设备管理器中点击“端口”前面的“＋”号，展开的项目显示为“ZTE Diagnostics Interface 3197 CDMA 1X（COM5）” ——根据各人电脑的区别，不一定显示为“COM5”，也可能是“COM6”或“COM7”，记住这个端口号。</li>
<li>启动QPST程序，切换到端口页，点击该窗口右下角“Add New Port”按钮，输入刚才看到的端口号，比如“COM5”，点击“确定”，这时QPST应该已经识别手机并成功连接，出现下述界面（黑块部分是隐藏了的ESN号码，每个人的手机都会不同的）：<img class="aligncenter size-full wp-image-35253" title="QPST-1" src="http://chinarui.net/wp-content/uploads/414/41448/2009/08/1.png" alt="QPST-1" width="581" height="393"></li>
<li>点击“QPST Configuration”程序的“开始客户端程序”菜单（“QPST Configuration”程序5个菜单中的中间的那个菜单），点击启动“EFS EXPLORER”程序；<img class="aligncenter size-full wp-image-35254" title="QPST-2" src="http://chinarui.net/wp-content/uploads/414/41448/2009/08/2.png" alt="QPST-2" width="585" height="395"></li>
<li>启动“EFS EXPLORER”程序后，首先会显示一个“电话选择”的菜单，这时窗口中应该有一个设备，这就是你的手机，还需要填一个SPC密码，默认是“000000”，不用管，直接点击“确定”；<img class="aligncenter size-large wp-image-35255" title="QPST-3" src="http://chinarui.net/wp-content/uploads/414/41448/2009/08/2-1-660x476.png" alt="QPST-3" width="586" height="423"></li>
<li>手机开始向电脑上传输已存储的数据，这个过程可能要持续1到两分钟，如果有报错说部分目录不能正常读取，也没关系，点确定。<img class="aligncenter size-large wp-image-35256" title="QPST-4" src="http://chinarui.net/wp-content/uploads/414/41448/2009/08/3-660x476.png" alt="QPST-4" width="586" height="422"></li>
<li>完毕后会看见窗口中类似Windows资源管理器一样的目录树，我们就从这里面的文件下手进行修改；我们要改的是/brew/sys/目录下的一个配置文件idle.ini。选中idle.ini，右键，选择“copy from phone”，选择一个路径，将idle.ini文件存到电脑上；<img class="aligncenter size-large wp-image-35257" title="QPST-5" src="http://chinarui.net/wp-content/uploads/414/41448/2009/08/4-660x487.png" alt="QPST-5" width="586" height="432"></li>
<li>将用idle.ini拷贝一份另存作为备份，用Editplus打开idle.ini进行编辑。找到这一部分：<br>
[SHORTCUT]<br>
//bComboSelEn: 1表示该项为TURE，即选项选中<br>
//iCombo1Index选项: 拨号盘＝0，快速拨号＝1，数码图册＝2，联系人＝3，短信＝4<br>
//coolpad播放=5，modem=6，邮件=7, 日程安排=8，手机下载=9, 互联星空=10(对应90.bar文件), 号码百事通= 11(对应91.bar文件)<br>
//此序号必须与app_idlesettings.bar文件中选项的序号一致<br>
bComboSelEn =1
<p><span style="color: #ff0000;">iCombo1Index =11（第一个快捷键，如果改成短信，就将数字改成4）</span></p>
<p><span style="color: #ff0000;">iCombo2Index =12（第二个快捷键，如果改成邮件，就将数字改成7）</span></p>
<p>iCombo3Index =0</p>
<p>iCombo4Index =3</p>
<p>iCombo5Index =5</p>
</li>
<li>根据自己需要设置这两个快捷键，保存。然后将修改过的idle.ini拖进刚才下载它那个目录，即/brew/sys/目录，覆盖原来的旧文件，点击左上角的红色弯箭头按钮，重启手机。<img class="aligncenter size-large wp-image-35258" title="QPST-6" src="http://chinarui.net/wp-content/uploads/414/41448/2009/08/5-660x485.png" alt="QPST-6" width="586" height="430"></li>
<li>手机重启后，切换到待机界面，就会发现快捷菜单已经被成功修改，讨厌的互联星空和号码百事通已经被自己设置的短信和邮件（或其他）所代替！至此大功告成，结束后别忘了长按开机键开启一下通信功能。<img class="aligncenter size-full wp-image-35259" title="Coolpad S100 MOD SUCCESS" src="http://chinarui.net/wp-content/uploads/414/41448/2009/08/6.png" alt="Coolpad S100 MOD SUCCESS" width="488" height="651"></li>
</ol>
<p>其实使用QPST还可以对手机进行更多的DIY，比如修改开关机铃声、图片、菜单等等，大家可以一起慢慢摸索。</p>
<p><span style="font-size: medium;"><span style="color: #ff0000;">再次提醒：刷机有风险，请谨慎！刷坏手机或丢失资料后果自负，本人不承担任何责任。</span></span></p>
<p><span style="font-size: medium;"><span style="color: #ff0000;"><span style="font-size: small;">（原创内容，转载请注明：<a title="阿芮的博客" href="http://www.chinarui.net">阿芮的博客</a>- <a href="http://www.chinarui.net/article/study/coolpad-s100-mod-shortcut.html" target="_self">http://www.chinarui.net/article/study/coolpad-s100-mod-shortcut.html</a></span></span></span><span style="font-size: medium;"><span style="color: #ff0000;"><span style="font-size: small;">）</span></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://chinarui.yo2.cn/study/coolpad-s100-mod-shortcut.html/feed</wfw:commentRss>
		<slash:comments>100</slash:comments>
		</item>
		<item>
		<title>Ext Core 3.0 Beta 发布,未包含可视化开发环境</title>
		<link>http://chinarui.yo2.cn/study/extjs_core_v3_beta.html</link>
		<comments>http://chinarui.yo2.cn/study/extjs_core_v3_beta.html#comments</comments>
		<pubDate>Sun, 26 Apr 2009 10:17:58 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[技术|学习]]></category>
		<category><![CDATA[ExTJS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[开发框架]]></category>

		<guid isPermaLink="false">http://chinarui.yo2.cn/articles/%45%78%74%20%43%6f%72%65%20%33%2e%30%20%42%65%74%61%20%e5%8f%91%e5%b8%83%2c%e6%9c%aa%e5%8c%85%e5%90%ab%e5%8f%af%e8%a7%86%e5%8c%96%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83.html</guid>
		<description><![CDATA[上次说到ExtJs 3.0将在4月14日左右发布，其实早在4月4日，ExtJs在其官方博客上发布了相关的消息，同时对外发布了Ext Core 3.0 Beta 版并提供下载。但是这次的发布并没有包含之前所说的可视化开发环境，只包含了源码、示例、文档及许可信息等内容，这不免令人有点失望。

我注意到原文中有这么一句：

"Ext Core is a subset of the upcoming Ext JS 3.0 release optimized for speed &#38; file size."

即：(这次发布的)Ext Core 3.0 是即将发布的Ext JS 3.0的一个子集，Ext JS 3.0在速度和文件体积上将有所优化。

还是没有提到可视化开发环境，难道这只是传言么？看来只能等待正式版发布才能知晓了……]]></description>
			<content:encoded><![CDATA[<p><a href="http://chinarui.net/article/Study/ExtJS_V3&amp;IDE.html" target="_blank">上次</a>说到ExtJs 3.0将在4月14日左右发布，其实早在4月4日，ExtJs在其<a href="http://extjs.com/blog/2009/04/04/ext-core-30-beta-released/" target="_blank">官方博客</a>上发布了相关的消息，同时对外发布了Ext Core 3.0 Beta 版并提供<a href="http://extjs.com/products/extcore/download.php?dl=extcore3b" target="_blank">下载</a>。但是这次的发布并没有包含之前所说的可视化开发环境，只包含了源码、示例、文档及许可信息等内容，这不免令人有点失望。</p>
<p>我注意到原文中有这么一句：</p>
<p><span style="color: #ff0000;">"Ext Core is a subset of the upcoming Ext JS 3.0 release optimized for speed &amp;amp; file size."</span></p>
<p>即：<span style="&quot;color:">(这次发布的)<span style="color: #ff0000;">Ext Core 3.0 是即将发布的Ext JS 3.0的一个子集，Ext JS 3.0在速度和文件体积上将有所优化。</span></span></p>
<p>还是没有提到可视化开发环境，难道这只是传言么？看来只能等待正式版发布才能知晓了。</p>
<p>在EXT JS官方网站上，包含在线可观看的例子，刚看到<a href="http://extjs.org.cn/node/340">EXT JS 中文资讯站</a>说其中有4个例子是被隐藏起来的，也不知道是出于什么样的原因，这里给出链接地址，有兴趣的可以去看看：</p>
<p>明确给出的例子（没找到Index页面，只能从顶部一个个点进去看）：</p>
<p><a href="http://extjs.com/products/extcore/" target="_blank">http://extjs.com/products/extcore/</a></p>
<p>被隐藏的4个例子：（<span style="&quot;color:">特别提示：请使用FireFox浏览器，IE可能会有些问题</span>）</p>
<p><strong>Ext.Direct</strong>（远程调用和数据流的服务器推模式，这么说不知确切否？）<br>
<a href="http://ux.extjs.org.cn/ext-3.0-rc1/examples/direct/direct.php" target="_blank">http://ux.extjs.org.cn/ext-3.0-rc1/examples/direct/direct.php</a></p>
<p><strong>Charts</strong>（结合Flash展现的图表）<br>
<a href="http://ux.extjs.org.cn/ext-3.0-rc1/examples/chart/charts.html" target="_blank">http://ux.extjs.org.cn/ext-3.0-rc1/examples/chart/charts.html</a></p>
<p><strong>Writer</strong>（编辑器）<br>
<a href="http://ux.extjs.org.cn/ext-3.0-rc1/examples/writer/writer.html" target="_blank">http://ux.extjs.org.cn/ext-3.0-rc1/examples/writer/writer.html</a></p>
<p><strong>Spinner</strong>（没看出来到底是个什么东东）<br>
<a href="http://ux.extjs.org.cn/ext-3.0-rc1/examples/spinner/index.html" target="_blank">http://ux.extjs.org.cn/ext-3.0-rc1/examples/spinner/index.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chinarui.yo2.cn/study/extjs_core_v3_beta.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在.NET Compact Framework调用PPC设备的震动功能[转]</title>
		<link>http://chinarui.yo2.cn/study/ppc_led.html</link>
		<comments>http://chinarui.yo2.cn/study/ppc_led.html#comments</comments>
		<pubDate>Tue, 21 Apr 2009 03:27:21 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[技术|学习]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[PPC]]></category>
		<category><![CDATA[震动]]></category>

		<guid isPermaLink="false">http://chinarui.yo2.cn/articles/%e5%9c%a8%2e%4e%45%54%20%43%6f%6d%70%61%63%74%20%46%72%61%6d%65%77%6f%72%6b%e8%b0%83%e7%94%a8%50%50%43%e8%ae%be%e5%a4%87%e7%9a%84%e9%9c%87%e5%8a%a8%e5%8a%9f%e8%83%bd%5b%e8%bd%ac%5d.html</guid>
		<description><![CDATA[利用C#开发Pocket PC程序，想在程序里调用设备的震动功能，至少再wm5中还没有这样的API，上网查了不少例子，都只能再c++下调用。既然这样，那唯一的办法是运用P/Invoke了，在"coredll.dll"中有这样两个函数 C++代码 BOOL INAPI NLedGetDeviceInfo( UINT nInfoId, void *pOutput ); BOOL WINAPI NLedSetDevice( UINT nDeviceId, void *pInput ); NLedGetDeviceInfo 是获得LED数量，NLedSetDevice是来设置LED状态的，我们只有通过它来启动或者关闭Pocket PC设备的震动与否。说明一下：一般PPC设备都有两个LED，一个就是扬声器0（Radio LED），另一个则是振动器1（Vibrator）了。在我的PPC设备上发现第二个是Vibrator，不知道是不是所有的PPC都是这样子的。后来查到"On the HTC Himalaya the vibration device is implemented at index 1。"也就是HTC内核的都是1. C#代码 using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; using System.Threading; namespace BluetoothChatPPC { class LED { class NLED_SETTINGS_INFO { public [...]]]></description>
			<content:encoded><![CDATA[<p>利用C#开发Pocket PC程序，想在程序里调用设备的震动功能，至少再wm5中还没有这样的API，上网查了不少例子，都只能再c++下调用。既然这样，那唯一的办法是运用P/Invoke了，在"coredll.dll"中有这样两个函数<br>
C++代码<br>
<pre class="cpp">
BOOL INAPI NLedGetDeviceInfo( UINT nInfoId, void *pOutput );
BOOL WINAPI NLedSetDevice( UINT nDeviceId, void *pInput );
</pre><br>
NLedGetDeviceInfo 是获得LED数量，NLedSetDevice是来设置LED状态的，我们只有通过它来启动或者关闭Pocket PC设备的震动与否。说明一下：一般PPC设备都有两个LED，一个就是扬声器0（Radio LED），另一个则是振动器1（Vibrator）了。在我的PPC设备上发现第二个是Vibrator，不知道是不是所有的PPC都是这样子的。后来查到"On the HTC Himalaya the vibration device is implemented at index 1。"也就是HTC内核的都是1.</p>
<p>C#代码</p>
<p>using System;<br>
using System.Collections.Generic;<br>
using System.Text;<br>
using System.Runtime.InteropServices;<br>
using System.Threading;<br>
namespace BluetoothChatPPC {<br>
class LED {<br>
class NLED_SETTINGS_INFO {<br>
public uint LedNum;<br>
public uint OffOnBlink;<br>
public int TotalCycleTime;<br>
public int OnTime;<br>
public int OffTime;<br>
public int MetaCycleOn;<br>
public int MetaCycleOff;<br>
}<br>
class NLED_COUNT_INFO {<br>
public int cLeds;<br>
}<br>
const int NLED_COUNT_INFO_ID = 0;<br>
const int NLED_SETTINGS_INFO_ID = 2;<br>
//振动器状态<br>
public enum Status {<br>
OFF=0,<br>
ON,<br>
BLINK<br>
}<br>
/// &lt;summary&gt;<br>
/// 获得LED个数<br>
/// &lt;/summary&gt;<br>
[DllImport("coredll.dll", CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Unicode,<br>
EntryPoint="NLedGetDeviceInfo",PreserveSig=true,SetLastError=true)]<br>
extern static bool NLedGetDeviceInfo(uint nID, NLED_COUNT_INFO pOutput);<br>
/// &lt;summary&gt;<br>
/// 设置LED状态<br>
/// &lt;/summary&gt;<br>
[DllImport("coredll.dll", CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Unicode,<br>
EntryPoint = "NLedSetDevice", PreserveSig = true, SetLastError = false)]<br>
extern static bool NLedSetDevice(uint nID, NLED_SETTINGS_INFO pOutput);<br>
/// &lt;summary&gt;<br>
/// 获得LED个数<br>
/// &lt;/summary&gt;<br>
public int GetLedCount() {<br>
int wCount=0;<br>
NLED_COUNT_INFO nci=new NLED_COUNT_INFO();<br>
if (NLedGetDeviceInfo(NLED_COUNT_INFO_ID, nci)) {<br>
wCount = nci.cLeds;<br>
}<br>
return wCount;<br>
}<br>
/// &lt;summary&gt;<br>
/// 设置LED状态<br>
/// &lt;/summary&gt;<br>
/// &lt;param name="wLed"&gt;Led（1/0），一般是1，即第二个LED&lt;/param&gt;<br>
/// &lt;param name="wStatus"&gt;状态&lt;/param&gt;<br>
public void SetLedStatus(int wLed, Status wStatus) {<br>
NLED_SETTINGS_INFO nsi = new NLED_SETTINGS_INFO();<br>
nsi.LedNum = (uint)wLed;<br>
nsi.OffOnBlink = (uint)wStatus;<br>
NLedSetDevice(NLED_SETTINGS_INFO_ID, nsi);<br>
}<br>
/// &lt;summary&gt;<br>
/// 设置LED状态<br>
/// &lt;/summary&gt;<br>
/// &lt;param name="wLed"&gt;Led（1/0）&lt;/param&gt;<br>
/// &lt;param name="wStatus"&gt;状态&lt;/param&gt;<br>
/// &lt;param name="millisecondsTimeout"&gt;持续时间&lt;/param&gt;<br>
public void SetLedStatus(int wLed, Status wStatus,int millisecondsTimeout) {<br>
this.SetLedStatus(wLed, wStatus);<br>
System.Threading.Thread.Sleep(millisecondsTimeout);<br>
//关闭震动<br>
NLED_SETTINGS_INFO nsi = new NLED_SETTINGS_INFO();<br>
nsi.LedNum = (uint)wLed;<br>
nsi.OffOnBlink = (uint)Status.OFF;<br>
NLedSetDevice(NLED_SETTINGS_INFO_ID, nsi);<br>
}<br>
////&lt;summary&gt;<br>
/// 设置LED状态<br>
/// &lt;/summary&gt;<br>
/// &lt;param name="wStatus"&gt;状态&lt;/param&gt;<br>
public void SetLedStatus(Status wStatus) {<br>
NLED_SETTINGS_INFO nsi = new NLED_SETTINGS_INFO();<br>
nsi.OffOnBlink = (uint)wStatus;<br>
//自动查找震动LED<br>
for (int i = 0; i &lt; this.GetLedCount(); i++) {<br>
nsi.LedNum = (uint)i;<br>
NLedSetDevice(NLED_SETTINGS_INFO_ID, nsi);<br>
}<br>
}<br>
/// &lt;summary&gt;<br>
/// 设置LED状态<br>
/// &lt;/summary&gt;<br>
/// &lt;param name="wStatus"&gt;状态&lt;/param&gt;<br>
/// &lt;param name="millisecondsTimeout"&gt;持续时间&lt;/param&gt;<br>
public void SetLedStatus(Status wStatus, int millisecondsTimeout) {<br>
this.SetLedStatus(wStatus);<br>
System.Threading.Thread.Sleep(millisecondsTimeout);<br>
//关闭震动<br>
NLED_SETTINGS_INFO nsi = new NLED_SETTINGS_INFO();<br>
nsi.OffOnBlink = (uint)Status.OFF;<br>
for (int i = 0; i &lt; this.GetLedCount(); i++) {<br>
nsi.LedNum = (uint)i;<br>
NLedSetDevice(NLED_SETTINGS_INFO_ID, nsi);<br>
}<br>
}<br>
/// &lt;summary&gt;<br>
/// 循环震动<br>
/// &lt;/summary&gt;<br>
/// &lt;param name="times"&gt;次数&lt;/param&gt;<br>
public void CycleVibrate(int times) {<br>
for (int i = 0; i &lt; times; i++) {<br>
this.SetLedStatus(Status.ON);<br>
Thread.Sleep(400);<br>
this.SetLedStatus(Status.OFF);<br>
Thread.Sleep(200);<br>
}<br>
}<br>
}<br>
}</p>
<p>在程序里调用</p>
<p>LED led=new LED();<br>
led.SetLedStatus(LED.Status.ON,500);//震动500毫秒</p>
<p>以上就是自己通过P/Invoke来实现震动效果，还有一段文字值得注意的：</p>
<p><span style="color: #ff6600;">for example some devices contain a notification Led at position 0 and a vibration device at position 5. There is no way to programmatically determine the index of the vibration device, you can only determine the overall count of devices. Also the vibration device can only be turned on or off so the Blink setting behaves exactly as On would.</span></p>
<p>当然你可以直接使用OpenNETCF的类库，如下：</p>
<p>C#代码</p>
<p>OpenNETCF.Notification.Led led = new OpenNETCF.Notification.Led();<br>
//turn on vibration</p>
<p>led.SetLedStatus(1, OpenNETCF.Notification.Led.LedState.On);<br>
//turn off vibration</p>
<p>led.SetLedStatus(1, OpenNETCF.Notification.Led.LedState.Off);</p>
]]></content:encoded>
			<wfw:commentRss>http://chinarui.yo2.cn/study/ppc_led.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>期待：ExtJS 3.0及其可视化编程环境</title>
		<link>http://chinarui.yo2.cn/study/extjs_v3ide.html</link>
		<comments>http://chinarui.yo2.cn/study/extjs_v3ide.html#comments</comments>
		<pubDate>Tue, 31 Mar 2009 02:12:21 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[技术|学习]]></category>
		<category><![CDATA[ExTJS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[开发框架]]></category>

		<guid isPermaLink="false">http://chinarui.yo2.cn/articles/%e6%9c%9f%e5%be%85%ef%bc%9a%45%78%74%4a%53%20%33%2e%30%e5%8f%8a%e5%85%b6%e5%8f%af%e8%a7%86%e5%8c%96%e7%bc%96%e7%a8%8b%e7%8e%af%e5%a2%83.html</guid>
		<description><![CDATA[我目前做过的几个项目，在界面方面基本上都使用了ExtJS框架。从yui-ext，到Ext2.1，再到目前的Ext2.2，称不上精通，也算是比较熟悉了。 昨天在Ext中文资讯站看到消息说，ExtJS3.0及其IDE可视化编程环境将在近期（很可能是4月14日）发布。真是个好消息，这意味着我们将可以直接拖拉控件到界面，从而省去了很多手工写代码的麻烦，而且，用户可以制作自定义的可重用的控件，真的是无比强大！ Ext JS 3.0的一些新特性： Ext JS Road Map Ext JS 3.0 (Early 2009) * All new lightweight, high-speed core base library * Flash Charting API * Ext.Direct - Remoting and data streaming/comet support * Integrated client-server data binding/marshaling of updates * ListView component * Enhanced Button and Toolbar components * ARIA/Section 508 accessibility improvements [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-24217" title="extjs" src="http://chinarui.net/wp-content/uploads/414/41448/2009/03/extjs.gif" alt="extjs" width="120" height="90">我目前做过的几个项目，在界面方面基本上都使用了ExtJS框架。从yui-ext，到Ext2.1，再到目前的Ext2.2，称不上精通，也算是比较熟悉了。</p>
<p>昨天在Ext中文资讯站看到消息说，ExtJS3.0及其IDE可视化编程环境将在近期（很可能是4月14日）发布。真是个好消息，这意味着我们将可以直接拖拉控件到界面，从而省去了很多手工写代码的麻烦，而且，用户可以制作自定义的可重用的控件，真的是无比强大！</p>
<p><strong>Ext JS 3.0的一些新特性：</strong></p>
<p><span style="font-weight: bold;">Ext JS Road Map</span><br>
Ext JS 3.0 (Early 2009)<br>
* All new lightweight, high-speed core base library<br>
* Flash Charting API<br>
* Ext.Direct - Remoting and data streaming/comet support<br>
* Integrated client-server data binding/marshaling of updates<br>
* ListView component<br>
* Enhanced Button and Toolbar components<br>
* ARIA/Section 508 accessibility improvements<br>
* CSS updates for reset style scoping and easier custom theming<br>
* Update the Ext event registration model<br>
* Ext.Ajax enhancements<br>
* Browser history support (released in 2.2)</p>
<p><strong>下面是可视化环境演示视频：</strong></p>
<p><object width="560" height="480" data="http://content.screencast.com/users/JackSlocum/folders/Default/media/f7450651-778b-4bbc-9fc4-4e921a7a2705/Designer_controller.swf" type="application/x-shockwave-flash"><param name="src" value="http://content.screencast.com/users/JackSlocum/folders/Default/media/f7450651-778b-4bbc-9fc4-4e921a7a2705/Designer_controller.swf"></object></p>
<p><strong>或者你可以到这里观看：</strong></p>
<p><a href="http://www.screencast.com/t/c4T3Gbfhn" target="_blank">www.screencast.com/t/c4T3Gbfhn</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chinarui.yo2.cn/study/extjs_v3ide.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>关于File.separator</title>
		<link>http://chinarui.yo2.cn/study/java_file_separator.html</link>
		<comments>http://chinarui.yo2.cn/study/java_file_separator.html#comments</comments>
		<pubDate>Tue, 24 Feb 2009 03:01:25 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[技术|学习]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[开发]]></category>
		<category><![CDATA[笔记]]></category>

		<guid isPermaLink="false">http://chinarui.yo2.cn/articles/%e5%85%b3%e4%ba%8e%46%69%6c%65%2e%73%65%70%61%72%61%74%6f%72.html</guid>
		<description><![CDATA[最近有个在页面上传Excel文件至服务器指定目录并进行数据校验、最后入库及进行进一步处理的应用情境，我写好代码在模拟环境下测试，完全没问题；但客户试用的时候，却老是报告“No such file or diretory ”的异常，上传不了。后来发现是文件路径的问题。我的模拟测试环境是windows+tomcat，而客户的环境是linux+tomcat，文件路径的分隔符在windows系统和linux系统中是不一样。 比如说要在temp目录下建立一个test.txt文件，在Windows下应该这么写： File file1 = new File ("C:\tmp\test.txt" ; 在Linux下则是这样的： File file2 = new File ("/tmp/test.txt" ; 如果要考虑跨平台，则最好是这么写： File myFile = new File("C:" + File.separator + "tmp" + File.separator, "test.txt" ; File类有几个类似separator的静态字段，都是与系统相关的，在编程时应尽量使用。 separatorChar public static final char separatorChar 与系统有关的默认名称分隔符。此字段被初始化为包含系统属性 file.separator 值的第一个字符。在 UNIX 系统上，此字段的值为 '/'；在 Microsoft Windows 系统上，它为 '\'。 separator public [...]]]></description>
			<content:encoded><![CDATA[<p>最近有个在页面上传Excel文件至服务器指定目录并进行数据校验、最后入库及进行进一步处理的应用情境，我写好代码在模拟环境下测试，完全没问题；但客户试用的时候，却老是报告“No such file or diretory ”的异常，上传不了。后来发现是文件路径的问题。我的模拟测试环境是windows+tomcat，而客户的环境是linux+tomcat，文件路径的分隔符在windows系统和linux系统中是不一样。</p>
<p>比如说要在temp目录下建立一个test.txt文件，在Windows下应该这么写：<br>
<font color="blue">File file1 = new File ("C:\tmp\test.txt" <img src='http://chinarui.yo2.cn/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley'> ;</font><br>
在Linux下则是这样的：<br>
<font color="blue">File file2 = new File ("/tmp/test.txt" <img src='http://chinarui.yo2.cn/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley'> ;</font></p>
<p>如果要考虑跨平台，则最好是这么写：<br>
<font color="blue">File myFile = new File("C:" + File.separator + "tmp" + File.separator, "test.txt" <img src='http://chinarui.yo2.cn/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley'> ;</font></p>
<p>File类有几个类似separator的静态字段，都是与系统相关的，在编程时应尽量使用。</p>
<p><b>separatorChar</b></p>
<p><font color="red">public static final char separatorChar</font></p>
<p>与系统有关的默认名称分隔符。此字段被初始化为包含系统属性 file.separator 值的第一个字符。在 UNIX 系统上，此字段的值为 '/'；在 Microsoft Windows 系统上，它为 '\'。</p>
<p><b>separator</b></p>
<p><font color="red">public static final String separator</font></p>
<p>与系统有关的默认名称分隔符，为了方便，它被表示为一个字符串。此字符串只包含一个字符，即 separatorChar。</p>
<p><b>pathSeparatorChar</b></p>
<p><font color="red">public static final char pathSeparatorChar</font></p>
<p>与系统有关的路径分隔符。此字段被初始为包含系统属性 path.separator 值的第一个字符。此字符用于分隔以路径列表 形式给定的文件序列中的文件名。在 UNIX 系统上，此字段为 ':'；在 Microsoft Windows 系统上，它为 ';'。</p>
<p><b>pathSeparator</b></p>
<p><font color="red">public static final String pathSeparator</font></p>
<p>与系统有关的路径分隔符，为了方便，它被表示为一个字符串。此字符串只包含一个字符，即 pathSeparatorChar。</p>
]]></content:encoded>
			<wfw:commentRss>http://chinarui.yo2.cn/study/java_file_separator.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[转]nls_characterset oracle数据库的定海神针</title>
		<link>http://chinarui.yo2.cn/study/oracle_nls_characterset.html</link>
		<comments>http://chinarui.yo2.cn/study/oracle_nls_characterset.html#comments</comments>
		<pubDate>Wed, 17 Dec 2008 02:55:15 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[技术|学习]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[数据库]]></category>

		<guid isPermaLink="false">http://chinarui.yo2.cn/articles/%5b%e8%bd%ac%5d%6e%6c%73%5f%63%68%61%72%61%63%74%65%72%73%65%74%20%6f%26%23%31%31%34%3b%61%63%6c%65%e6%95%b0%e6%8d%ae%e5%ba%93%e7%9a%84%e5%ae%9a%e6%b5%b7%e7%a5%9e%e9%92%88.html</guid>
		<description><![CDATA[# oracle中nls_characterset与nls_nchar_characterset的设置及其影响 在众多的资料中，仅是说了 nls_characterset数据库字符集　nls_nchar_characterset数据库国家字符集或者国际化设置字符集 nls_characterset与数据库中char、varchar blob类型的属性字段有密切的关系 nls_nchar_characterset与nchar、nvarchar2属性字段类型相关 　　偶然的一个机会，让我怀疑，虽然，还没有查到确切的文献依据，nls_characterset　Oracle数据库字符集的设置,对C/S结构下的数据库访问应用有比较大的影响。在这种结构中存在一个不起眼的细节，即在C/S结构下的数据库访问中，客户端经常将要执行的SQL语句发送到数据服务器端DBMS去执行，而这个SQL语句必定是要按照一定的字符集进行编码的。发送SQL语句编码的这个字符集或者是约定或者是客户端和服务器端协商得到的。但是，不管这个字符集是如何确定的，这个对我们要说明的问题影响不是太大，我们所需假设的即这个发送到服务器端执行的SQL语句是按照某种字符集编码。 　　　一般情况下，服务器端只要对客户端发送过来的SQL语句解码正确，我们是不会发现其有异常的。但是，在国际化数据库应用下或扩展已有的数据库应用成为国际化版本时，如果nls_nchar_characterset设置欠乏考虑，就会出现写入数据库的数据，在字节级的信息就是乱码，更况论其显示值了，那就更是错误百出了，因为根基就是错的！观察表属性的字节级信息，在oracle里是通过dump(columnName,16)观察。 　　　例如，在某个数据库中nls_nchar_characterset的设置为GBK，为了应付国际化，数据库应用对数据库表中可能包含非GBK字符集范围的列，全部定义为nachar（注：觉得应该是nvarchar）或者其他国际化属性类型。按照通常网上资料或者简明Oracle说明书，这样的设置应该是没有问题，但是，在这里再次强调下，我们出问题的不起眼的源头，某些C/S结构下的数据库访问，客户端是通过发送SQL语句到数据库执行的方式，达到访问数据库的效果。这样架构下，就会牵扯数据库服务器端，会以何种字符集，让DBMS统一看待、处理SQL语句呢？我想，这里Oracle数据库系统，可能会简单地以ASCII字符集处理SQL关键字、分割符，而以nls_characterset设定的字符集应对SQL语句中非关键字，例如查询条件、赋值等。或者它会以更简单、明快的处理方案，将客户端不管以何种编码过来的SQL语句串都转换到nls_characterset设定的字符集，统一进入SQL后续执行的核心区。不管Oracle可能会采用这两种可能的哪一种，对于客户端发送过来的SQL语句中非SQL规范关键字范畴的部分，数据库服务器端可能都会采用nls_characterset设定的字符集在后期进行处理，这样，在后面的继续处理中就会发生问题。 　　关于Oracle客户端访问程序，其发送过来的SQL语句的字符集可以和Oracle数据库nls_characterset设置是不同的，而不是像有些网上文档说的两者之间要保持严格相同。实际上，Oracle可能提供了对客户端不同编码格式的数据进行解码的过程，但是,Oracle解码完成后的终点基座、最终的目标可能是Oracle自身设置的nls_characterset数据库字符集。 　　呵呵，在这里声明一下，我也是以概念逻辑上的推测、猜度别人，而非查到第一手的关键文献资料。但是，上面所有基于猜测，都是某次Oracle故障后，自己找出的唯一比较近乎合理的解释！我也没有强求这个文档的真金白银的价值，只希望对大家有用，提供一个可能的新视角，对其价值看做仅作参考即可。很多时候，我喜欢的编程生活是，不需要懂得太多的技术细节，只需要知道它的概念逻辑即可，即其可能的实现是什么就可以了！懂得太深，会耗去很多宝贵的时间的。而且，只要你懂得其概念逻辑和模型后，后面的全部只是时间问题，也和具体实现语言也没有太大的关系，这就是概念逻辑的优势，在没有硝烟的战场是取得胜利。在这里将这次的故障总结写入博客，也是希望有人能够指出其中纰露　：） 　基于上面的所有分析，我们就可以看出来，如果客户端JDBC访问以utf-8方式将要在服务器端执行的SQL语句发送到服务器端，而其insert或者update的值域信息里面含有非nls_characterset，这个时候，请注意，字节级的乱码就出现了。因为两个字符集间utf-8&#60;--&#62;nls_characterset的映射关系，在事实上确实也并不是完全包含的。当然，你可以严格限定你的客户端发送到服务器端的utf-8字符编码，就是nls_characterset的一个子集，这样你也就不会出现乱码问题。但是，当你扩展你这个数据库应用，来应付更多的国际化的时间，你一定要小心了。虽然，Oracle JDBC驱动为了处理国际化的问题，已经将自己发送到服务器端的SQL语句的字符编码按照utf-8字符集进行实施，它可以是被认为近乎无限的语言处理能力，但是，你的数据库服务器端，在Oracle9i版本，未必有能力能够处理，因为它可能按照nls_characterset字符集的设定去处理客户端发送过来的SQL语句。不过，实际上Oracle可以作的更多，它可以进一步分析，如果SQL语句中含有nchar的属性列的处理，就不能以nls_characterset来处理SQL中的"值域“信息，我们程序员的控制力是还有很大空间的 。从故障的各方面分析来看，在Oracle9i版本好似还没有这样的特殊智能。 　验证我这个推测的一个佐证是查看V$SQLArea视图的定义，可以看到其SQL_TEXT列的类型为varchar(1000)，即这个号称可以共享SQL语句的缓存统计表，处理客户端发送过来的SQL语句，其存储的字符集为nls_characterset！ 欢迎大家指正！ [face32]以上文章是我在写上一篇《ArcSDE启动发生GEOMETRY_COLUMNS相关错误的解决办法》后查nls_characterset相关资料时找到的，粗略看了一下，没有细究，但觉得很有见解，收藏。]]></description>
			<content:encoded><![CDATA[<p># oracle中nls_characterset与nls_nchar_characterset的设置及其影响<br>
在众多的资料中，仅是说了<br>
nls_characterset数据库字符集　nls_nchar_characterset数据库国家字符集或者国际化设置字符集<br>
nls_characterset与数据库中char、varchar blob类型的属性字段有密切的关系<br>
nls_nchar_characterset与nchar、nvarchar2属性字段类型相关</p>
<p>　　偶然的一个机会，让我怀疑，虽然，还没有查到确切的文献依据，nls_characterset　Oracle数据库字符集的设置,对C/S结构下的数据库访问应用有比较大的影响。在这种结构中存在一个不起眼的细节，即在C/S结构下的数据库访问中，客户端经常将要执行的SQL语句发送到数据服务器端DBMS去执行，而这个SQL语句必定是要按照一定的字符集进行编码的。发送SQL语句编码的这个字符集或者是约定或者是客户端和服务器端协商得到的。但是，不管这个字符集是如何确定的，这个对我们要说明的问题影响不是太大，我们所需假设的即这个发送到服务器端执行的SQL语句是按照某种字符集编码。<br>
　　　一般情况下，服务器端只要对客户端发送过来的SQL语句解码正确，我们是不会发现其有异常的。但是，在国际化数据库应用下或扩展已有的数据库应用成为国际化版本时，如果nls_nchar_characterset设置欠乏考虑，就会出现写入数据库的数据，在字节级的信息就是乱码，更况论其显示值了，那就更是错误百出了，因为根基就是错的！观察表属性的字节级信息，在oracle里是通过dump(columnName,16)观察。<br>
　　　例如，在某个数据库中nls_nchar_characterset的设置为GBK，为了应付国际化，数据库应用对数据库表中可能包含非GBK字符集范围的列，全部定义为nachar<span style="color: red;">（注：觉得应该是nvarchar）</span>或者其他国际化属性类型。按照通常网上资料或者简明Oracle说明书，这样的设置应该是没有问题，但是，在这里再次强调下，我们出问题的不起眼的源头，某些C/S结构下的数据库访问，客户端是通过发送SQL语句到数据库执行的方式，达到访问数据库的效果。这样架构下，就会牵扯数据库服务器端，会以何种字符集，让DBMS统一看待、处理SQL语句呢？我想，这里Oracle数据库系统，可能会简单地以ASCII字符集处理SQL关键字、分割符，而以nls_characterset设定的字符集应对SQL语句中非关键字，例如查询条件、赋值等。或者它会以更简单、明快的处理方案，将客户端不管以何种编码过来的SQL语句串都转换到nls_characterset设定的字符集，统一进入SQL后续执行的核心区。不管Oracle可能会采用这两种可能的哪一种，对于客户端发送过来的SQL语句中非SQL规范关键字范畴的部分，数据库服务器端可能都会采用nls_characterset设定的字符集在后期进行处理，这样，在后面的继续处理中就会发生问题。<br>
　　关于Oracle客户端访问程序，其发送过来的SQL语句的字符集可以和Oracle数据库nls_characterset设置是不同的，而不是像有些网上文档说的两者之间要保持严格相同。实际上，Oracle可能提供了对客户端不同编码格式的数据进行解码的过程，但是,Oracle解码完成后的终点基座、最终的目标可能是Oracle自身设置的nls_characterset数据库字符集。</p>
<p>　　呵呵，在这里声明一下，我也是以概念逻辑上的推测、猜度别人，而非查到第一手的关键文献资料。但是，上面所有基于猜测，都是某次Oracle故障后，自己找出的唯一比较近乎合理的解释！我也没有强求这个文档的真金白银的价值，只希望对大家有用，提供一个可能的新视角，对其价值看做仅作参考即可。很多时候，我喜欢的编程生活是，不需要懂得太多的技术细节，只需要知道它的概念逻辑即可，即其可能的实现是什么就可以了！懂得太深，会耗去很多宝贵的时间的。而且，只要你懂得其概念逻辑和模型后，后面的全部只是时间问题，也和具体实现语言也没有太大的关系，这就是概念逻辑的优势，在没有硝烟的战场是取得胜利。在这里将这次的故障总结写入博客，也是希望有人能够指出其中纰露　：）</p>
<p>　基于上面的所有分析，我们就可以看出来，如果客户端JDBC访问以utf-8方式将要在服务器端执行的SQL语句发送到服务器端，而其insert或者update的值域信息里面含有非nls_characterset，这个时候，请注意，字节级的乱码就出现了。因为两个字符集间utf-8&lt;--&gt;nls_characterset的映射关系，在事实上确实也并不是完全包含的。当然，你可以严格限定你的客户端发送到服务器端的utf-8字符编码，就是nls_characterset的一个子集，这样你也就不会出现乱码问题。但是，当你扩展你这个数据库应用，来应付更多的国际化的时间，你一定要小心了。虽然，Oracle JDBC驱动为了处理国际化的问题，已经将自己发送到服务器端的SQL语句的字符编码按照utf-8字符集进行实施，它可以是被认为近乎无限的语言处理能力，但是，你的数据库服务器端，在Oracle9i版本，未必有能力能够处理，因为它可能按照nls_characterset字符集的设定去处理客户端发送过来的SQL语句。不过，实际上Oracle可以作的更多，它可以进一步分析，如果SQL语句中含有nchar的属性列的处理，就不能以nls_characterset来处理SQL中的"值域“信息，我们程序员的控制力是还有很大空间的 <img src='http://chinarui.yo2.cn/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'> 。从故障的各方面分析来看，在Oracle9i版本好似还没有这样的特殊智能。</p>
<p>　验证我这个推测的一个佐证是查看V$SQLArea视图的定义，可以看到其SQL_TEXT列的类型为varchar(1000)，即这个号称可以共享SQL语句的缓存统计表，处理客户端发送过来的SQL语句，其存储的字符集为nls_characterset！</p>
<p>欢迎大家指正！</p>
<p>[face32]以上文章是我在写上一篇<a href="http://chinarui.net/article.asp?id=35">《ArcSDE启动发生GEOMETRY_COLUMNS相关错误的解决办法》</a>后查nls_characterset相关资料时找到的，粗略看了一下，没有细究，但觉得很有见解，收藏。</p>
]]></content:encoded>
			<wfw:commentRss>http://chinarui.yo2.cn/study/oracle_nls_characterset.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ArcSDE启动发生GEOMETRY_COLUMNS相关错误的解决办法</title>
		<link>http://chinarui.yo2.cn/study/arcsde_error_geometry_columns.html</link>
		<comments>http://chinarui.yo2.cn/study/arcsde_error_geometry_columns.html#comments</comments>
		<pubDate>Wed, 17 Dec 2008 02:37:20 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[技术|学习]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[ArcSDE]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[UTF16]]></category>
		<category><![CDATA[UTF8]]></category>

		<guid isPermaLink="false">http://chinarui.yo2.cn/articles/%41%72%63%53%44%45%e5%90%af%e5%8a%a8%e5%8f%91%e7%94%9f%47%45%4f%4d%45%54%52%59%5f%43%4f%4c%55%4d%4e%53%e7%9b%b8%e5%85%b3%e9%94%99%e8%af%af%e7%9a%84%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95.html</guid>
		<description><![CDATA[同事去客户现场安装调试ArcSDE时遇到问题，SDE安装过程很顺利，显示成功安装。但是在启动SDE时却报了一个错误。 [sde@SDE_SERVER bin]$ ./sdemon -o start -p sde@sdedbsid ------------------------------------------------------- ArcSDE 9.2 for oracle10g Build 1081 Sun Sep 17 16:01:22 2006 ------------------------------------------------------- ST_Geometry Schema Owner: (SDE) Type Release: 1007 Instance initialized for ((sde)) . . . Connected to instance . . . Inconsistent data type in GEOMETRY_COLUMNS table. Could not start ArcSDE -- Check Network, $SDEHOME [...]]]></description>
			<content:encoded><![CDATA[<p>同事去客户现场安装调试ArcSDE时遇到问题，SDE安装过程很顺利，显示成功安装。但是在启动SDE时却报了一个错误。</p>
<blockquote>
<p>[sde@SDE_SERVER bin]$ ./sdemon -o start -p sde@sdedbsid</p>
<p>-------------------------------------------------------<br>
ArcSDE 9.2 for oracle10g Build 1081 Sun Sep 17 16:01:22 2006<br>
-------------------------------------------------------</p>
<p>ST_Geometry Schema Owner: (SDE) Type Release: 1007</p>
<p>Instance initialized for ((sde)) . . .</p>
<p>Connected to instance . . .</p>
<p>Inconsistent data type in GEOMETRY_COLUMNS table.</p>
<p>Could not start ArcSDE -- Check Network, $SDEHOME disk, DBMS settings and dbinit.sde.</p>
</blockquote>
<p>同事照着安装文档重新安装SDE几次，都是安装成功，到启动时就报这个错误，搞得很郁闷。我去看了$SDEHOME/etc目录下的log文件，也没有发现什么问题，于是上网查。</p>
<p>找到了几条Inconsistent data type in GEOMETRY_COLUMNS table类似的网页，基本上都是在ESRI社区上的。其中一条是：</p>
<blockquote>
<p>Error: Inconsistent data type in GEOMETRY_COLUMNS table<br>
Article ID: 29292<br>
Software: ArcSDE 9.0, 9.1, 9.2<br>
Platforms: N/A</p>
<p>Error Message<br>
The following error may occur when attempting to start the ArcSDE Application Server for ArcSDE 9.x for oracle:</p>
<p>&gt;sdemon -o start<br>
esri_sde service failed during initialization.<br>
Please check event log or error log files.<br>
Error starting esri_sde service(997)<br>
Could not start ArcSDE -- Check Network, $SDEHOME disk, DBMS settings and<br>
dbinit.sde.</p>
<p>The SDE error log file in $SDEHOME/etc may contain the following error:</p>
<p>-------------------------------------------------------<br>
ArcSDE 9.0 oracle9i Build 1093 Fri Mar 19 13:28:50 PST 2004<br>
-------------------------------------------------------<br>
db_get_dbms_release::Current Release 9.2.0.4.0 is assumed to be compatible with 9.0.0.0.0<br>
Instance initialized for SDE . . .<br>
Connected to instance . . .<br>
Inconsistent data type in GEOMETRY_COLUMNS table.</p>
<p>Cause<br>
This error can occur if an upgrade to the oracle software on the RDBMS server was not completely successful, for example an upgrade from oracle 9.2.0.0 to oracle 9.2.0.5.</p>
<p>This error can also occur if the oracle software was upgraded successfully, but the required upgrade of the oracle database following the software upgrade was either omitted or not completed successfully.</p>
<p>Solution or Workaround<br>
Reapply the oracle software upgrade and/or redo the database upgrade procedures as required to make sure that the both the software upgrade and the database upgrade were successful. Consult the oracle documentation or contact oracle Technical Support if assistance is required.</p>
<p>This error can also occur with fresh installations of oracle and ArcSDE during ArcSDE's Post-Installation procedures when it attempts to start the Application Server for the first time. For these cases, the following procedure should resolve the problem:</p>
<p>Drop the oracle database.<br>
If ArcSDE is running on a Windows platform, perform the following step. Otherwise, proceed to step 3.</p>
<p>Delete the ArcSDE service using the sdeservice -o delete command. Refer to the ArcSDE Developer Help for information on the usage of this command.<br>
Reapply the oracle software upgrade.<br>
Build a new oracle database.</p>
<p>Run the ArcSDE Post-Install procedure as described in the ArcSDE Installation Guide for your server platform.</p>
<p>Created: 5/18/2005<br>
Last Modified: 9/8/2008</p>
</blockquote>
<p>我们的Oracle数据库和SDE都是全新安装，不存在数据库版本升级的问题，但是这使得我们把注意力集中到数据库这边来，认为出现这个问题的原因很可能就是Oracle数据库安装或者配置有问题。<br>
于是让同事再次重新安装Oracle，重建database，结果还是出现那样的问题！这时候，我在ESRI Surport Center上看到了这样的回答：</p>
<blockquote>
<p>Checked the NLS_NCHAR_CHARACTERSET, is it UTF8?</p>
<p>原文地址：<a href="http://forums.esri.com/Thread.asp?c=158&amp;f=2285&amp;t=232603">http://forums.esri.com/Thread.asp?c=158&amp;f=2285&amp;t=232603</a></p>
</blockquote>
<p>难道是Oracle数据库字符集的问题？于是以sysdba身份登陆数据库，在SQLPLUS里执行相关SQL语句：</p>
<p><pre class="php">
SQL&gt;select * from nls_database_parameters
SQL&gt; /

PARAMETER VALUE
------------------------------ ----------------------------------------
NLS_LANGUAGE SIMPLIFIED CHINESE
NLS_TERRITORY CHINA
NLS_CURRENCY ?
NLS_ISO_CURRENCY CHINA
NLS_NUMERIC_CHARACTERS .,
<font color="red">NLS_CHARACTERSET ZHS16CGB231280</font>
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE SIMPLIFIED CHINESE
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY ?
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
<font color="red">NLS_NCHAR_CHARACTERSET UTF8</font>
NLS_RDBMS_VERSION 10.2.0.1.0

20 rows selected.
</pre></p>
<p>果然，数据库的字符集设置与系统及相关软件不匹配。<br>
于是让他drop掉database，重新建立一个，数据库国家字符集和数据库字符集分别设置为ZHS16GBK和AL16UTF16，重新安装SDE后，启动终于正常了！</p>
<p>这时再执行上面的查询：</p>
<p><pre class="php">
SQL&gt;select * from nls_database_parameters
SQL&gt; /

PARAMETER VALUE
------------------------------ ---------------------------------------------------------------------
NLS_LANGUAGE SIMPLIFIED CHINESE
NLS_TERRITORY CHINA
NLS_CURRENCY ?
NLS_ISO_CURRENCY CHINA
NLS_NUMERIC_CHARACTERS .,
<font color="red">NLS_CHARACTERSET ZHS16GBK</font>
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE SIMPLIFIED CHINESE
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY ?
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
<font color="red">NLS_NCHAR_CHARACTERSET AL16UTF16</font>
NLS_RDBMS_VERSION 10.2.0.1.0

20 rows selected.
</pre></p>
<p>顺便说一下，我们的系统是RedHat Linux AS4 update7，SDE版本是ArcSDE 9.2，Oracle版本是Oracle Database 10g Release 2 (10.2.0.1.0) Enterprise Edition for Linux x86。</p>
<p>看来Oracle字符集设置还是非常重要的。</p>
]]></content:encoded>
			<wfw:commentRss>http://chinarui.yo2.cn/study/arcsde_error_geometry_columns.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[转]ArcGIS 坐标系统文件</title>
		<link>http://chinarui.yo2.cn/study/arcgis_coordinate_system.html</link>
		<comments>http://chinarui.yo2.cn/study/arcgis_coordinate_system.html#comments</comments>
		<pubDate>Sun, 23 Nov 2008 01:05:28 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[技术|学习]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[坐标系统]]></category>

		<guid isPermaLink="false">http://chinarui.yo2.cn/articles/%5b%e8%bd%ac%5d%41%72%63%47%49%53%20%e5%9d%90%e6%a0%87%e7%b3%bb%e7%bb%9f%e6%96%87%e4%bb%b6.html</guid>
		<description><![CDATA[坐标是GIS数据的骨骼框架，能够将我们的数据定位到相应的位置，为地图中的每一点提供准确的坐标。 ArcGIS自带了多种坐标系统，在${ArcGISHome}\Coordinate Systems\目录下可以看到三个文件夹，分别是Geographic Coordinate Systems、Projected Coordinate Systems、Vertical Coordinate Systems，中文翻译为地理坐标系、投影坐标系、垂直坐标系。 关于地理坐标系和投影坐标系的区别，网络上有相关的文章介绍－－地理坐标系与投影坐标系的区别，简而言之，投影坐标系＝地理坐标系＋投影过程。 1 Geographic Coordinate Systems 在Geographic Coordinate Systems目录中，我们可以看到已定义的许多坐标系信息，典型的如Geographic Coordinate Systems\World目录下的WGS 1984.prj，里面所定义的坐标参数： GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137, 298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 里面描述了地理坐标系的名称、大地基准面、椭球体、起始坐标参考点、单位等。 2 Projected Coordinate Systems 在Projected Coordinate Systems目录中同样存在许多已定义的投影坐标系，我国大部分地图所采用的北京54和西安80坐标系的投影文件就在其中，它们均使用高斯-克吕格投 影，前者使用克拉索夫斯基椭球体，后者使用国际大地测量协会推荐的IAG 75地球椭球体。如Beijing 1954 3 Degree GK CM 75E.prj定义的坐标参数： PROJCS["Beijing_1954_3_Degree_GK_CM_75E",GEOGCS["GCS_Beijing_1954", DATUM["D_Beijing_1954",SPHEROID["Krasovsky_1940",6378245.0,298.3]], PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Gauss_Kruger"], PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0], PARAMETER["Central_Meridian",75.0],PARAMETER["Scale_Factor",1.0], PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] 可以看出，参数里除了包含地理坐标系的定义外，还有投影方式的信息。 北京54和西安80是我们使用最多的坐标系，在ArcGIS文件中，对于这两种坐标系统的命名有一些不同，简单看去很容易让人产生迷惑。在此之前，先简单 介绍高斯-克吕格投影的基本知识，了解就直接跳过，我国大中比例尺地图均采用高斯-克吕格投影，其通常是按6度和3度分带投影，1:2.5万－1:50万 比例尺地形图采用经差6度分带，1:1万比例尺的地形图采用经差3度分带。具体分带法是：6度分带从本初子午线开始，按经差6度为一个投影带自西向东划 分，全球共分60个投影带，带号分别为1－60；3度投影带是从东经1度30秒经线开始，按经差3度为一个投影带自西向东划分，全球共分120个投影带。 为了便于地形图的测量作业，在高斯-克吕格投影带内布置了平面直角坐标系统，具体方法是，规定中央经线为X轴，赤道为Y轴，中央经线与赤道交点为坐标原 点，x值在北半球为正，南半球为负，y值在中央经线以东为正，中央经线以西为负。由于我国疆域均在北半球，x值均为正值，为了避免y值出现负值，规定各投 影带的坐标纵轴均西移500km，中央经线上原横坐标值由0变为500km。为了方便带间点位的区分，可以在每个点位横坐标y值的百千米位数前加上所在带 号，如20带内A点的坐标可以表示为YA=20 745 921.8m。 [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: Verdana; font-size: x-small;">坐标是GIS数据的骨骼框架，能够将我们的数据定位到相应的位置，为地图中的每一点提供准确的坐标。</span></p>
<p>ArcGIS自带了多种坐标系统，在${ArcGISHome}\Coordinate Systems\目录下可以看到三个文件夹，分别是Geographic Coordinate Systems、Projected Coordinate Systems、Vertical Coordinate Systems，中文翻译为地理坐标系、投影坐标系、垂直坐标系。</p>
<p><span style="font-size: 10pt;"><span style="font-family: Verdana;"><img style="cursor: pointer;" title="在新窗口打开图片" src="http://chinarui.net/attachments/month_0811/x20081123211736.gif" border="0" alt=""></span></span></p>
<p><span style="font-size: 10pt;">关于地理坐标系和投影坐标系的区别，网络上有相关的文章介绍－－</span><a href="http://www.cnblogs.com/jetz/archive/2005/03/29/127547.html" target="_blank"><span style="font-size: 10pt;">地理坐标系与投影坐标系的区别</span></a><span style="font-size: 10pt;">，简而言之，投影坐标系＝地理坐标系＋投影过程。</span></p>
<p><strong>1 Geographic Coordinate Systems</strong></p>
<p>在Geographic Coordinate Systems目录中，我们可以看到已定义的许多坐标系信息，典型的如Geographic Coordinate Systems\World目录下的WGS 1984.prj，里面所定义的坐标参数：</p>
<p>GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,<br>
298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]</p>
<p>里面描述了地理坐标系的名称、大地基准面、椭球体、起始坐标参考点、单位等。</p>
<p><strong>2 Projected Coordinate Systems</strong></p>
<p>在Projected Coordinate Systems目录中同样存在许多已定义的投影坐标系，我国大部分地图所采用的北京54和西安80坐标系的投影文件就在其中，它们均使用高斯-克吕格投 影，前者使用克拉索夫斯基椭球体，后者使用国际大地测量协会推荐的IAG 75地球椭球体。如Beijing 1954 3 Degree GK CM 75E.prj定义的坐标参数：</p>
<p>PROJCS["Beijing_1954_3_Degree_GK_CM_75E",GEOGCS["GCS_Beijing_1954",<br>
DATUM["D_Beijing_1954",SPHEROID["Krasovsky_1940",6378245.0,298.3]],<br>
PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Gauss_Kruger"],<br>
PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],<br>
PARAMETER["Central_Meridian",75.0],PARAMETER["Scale_Factor",1.0],<br>
PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]</p>
<p>可以看出，参数里除了包含地理坐标系的定义外，还有投影方式的信息。</p>
<p>北京54和西安80是我们使用最多的坐标系，在ArcGIS文件中，对于这两种坐标系统的命名有一些不同，简单看去很容易让人产生迷惑。在此之前，先简单 介绍高斯-克吕格投影的基本知识，了解就直接跳过，我国大中比例尺地图均采用高斯-克吕格投影，其通常是按6度和3度分带投影，1:2.5万－1:50万 比例尺地形图采用经差6度分带，1:1万比例尺的地形图采用经差3度分带。具体分带法是：6度分带从本初子午线开始，按经差6度为一个投影带自西向东划 分，全球共分60个投影带，带号分别为1－60；3度投影带是从东经1度30秒经线开始，按经差3度为一个投影带自西向东划分，全球共分120个投影带。 为了便于地形图的测量作业，在高斯-克吕格投影带内布置了平面直角坐标系统，具体方法是，规定中央经线为X轴，赤道为Y轴，中央经线与赤道交点为坐标原 点，x值在北半球为正，南半球为负，y值在中央经线以东为正，中央经线以西为负。由于我国疆域均在北半球，x值均为正值，为了避免y值出现负值，规定各投 影带的坐标纵轴均西移500km，中央经线上原横坐标值由0变为500km。为了方便带间点位的区分，可以在每个点位横坐标y值的百千米位数前加上所在带 号，如20带内A点的坐标可以表示为Y<sub>A</sub>=20 745 921.8m。</p>
<p>在Coordinate Systems\Projected Coordinate Systems\Gauss Kruger\Beijing 1954目录中，我们可以看到四种不同的命名方式：</p>
<p>Beijing 1954 3 Degree GK CM 75E.prj<br>
Beijing 1954 3 Degree GK Zone 25.prj<br>
Beijing 1954 GK Zone 13.prj<br>
Beijing 1954 GK Zone 13N.prj</p>
<p>对它们的说明分别如下：</p>
<p>三度分带法的北京54坐标系，中央经线在东75度的分带坐标，横坐标前不加带号<br>
三度分带法的北京54坐标系，中央经线在东75度的分带坐标，横坐标前加带号<br>
六度分带法的北京54坐标系，分带号为13，横坐标前加带号<br>
六度分带法的北京54坐标系，分带号为13，横坐标前不加带号</p>
<p>在Coordinate Systems\Projected Coordinate Systems\Gauss Kruger\Xian 1980目录中，文件命名方式又有所变化：</p>
<p>Xian 1980 3 Degree GK CM 75E.prj<br>
Xian 1980 3 Degree GK Zone 25.prj<br>
Xian 1980 GK CM 75E.prj<br>
Xian 1980 GK Zone 13.prj</p>
<p>西安80坐标文件的命名方式、含义和北京54前两个坐标相同，但没有出现“带号+N”这种形式，为什么没有采用统一的命名方式？让人看了有些费解。</p>
<p><strong>3 Vertical Coordinate Systems</strong></p>
<p>Vertical Coordinate Systems定义了测量海拔或深度值的原点，具体的定义，英文描述的更为准确：</p>
<p>A vertical coordinate system defines the origin for height or depth values. Like a horizontal coordinate system, most of the information in a vertical coordinate system is not needed unless you want to display or combine a dataset with other data that uses a different vertical coordinate system.</p>
<p>Perhaps the most important part of a vertical coordinate system is its unit of measure. The unit of measure is always linear (e.g., international feet or meters). Another important part is whether the z values represent heights (elevations) or depths. For each type, the z-axis direction is positive "up" or "down", respectively.</p>
<p>One z value is shown for the height-based mean sea level system. Any point that falls below the mean sea level line but is referenced to it will have a negative z value. The mean low water system has two z values associated with it. Because the mean low water system is depth-based, the z values are positive. Any point that falls above the mean low water line but is referenced to it will have a negative z value.</p>
<p>需要注意的是，大家经常希望能够通过坐标转换，将北京54或西安80中的地理坐标系转换到WGS84，实际上这样做是不准确的，北京54或西安80的投影 坐标可以通过计算转换到其对应的地理坐标系，但由于我国北京54和西安80中的地理坐标系到WGS84的转换参数没有公开，因此无法完成其到WGS84坐 标的精准计算。其他公开了转换参数的坐标系都可以在ArcToolbox中完成转换。</p>
<p>参考资料：</p>
<p>蔡孟裔等.新编地图学教程.高等教育出版社<br>
ArcGIS 9.2 Desktop Help</p>
<p>感谢<a href="http://bbs.esrichina-bj.cn/ESRI/index.php" target="_blank"><span style="font-size: 10pt;">ESRI中国社区</span></a><span style="font-size: 10pt;">版主isnotnull的帮助</span></p>
]]></content:encoded>
			<wfw:commentRss>http://chinarui.yo2.cn/study/arcgis_coordinate_system.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>遍历JavaScript对象的属性和值</title>
		<link>http://chinarui.yo2.cn/study/iterate_an_js_object-s_properties_and_values.html</link>
		<comments>http://chinarui.yo2.cn/study/iterate_an_js_object-s_properties_and_values.html#comments</comments>
		<pubDate>Sat, 08 Nov 2008 02:35:10 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[技术|学习]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[值]]></category>
		<category><![CDATA[对象]]></category>
		<category><![CDATA[属性]]></category>
		<category><![CDATA[遍历]]></category>

		<guid isPermaLink="false">http://chinarui.yo2.cn/articles/%e9%81%8d%e5%8e%86%4a%61%76%61%53%63%72%69%70%74%e5%af%b9%e8%b1%a1%e7%9a%84%e5%b1%9e%e6%80%a7%e5%92%8c%e5%80%bc.html</guid>
		<description><![CDATA[JavaScript调试起来很不方便，有时候需要知道某个对象有哪些属性和值，利用下面的代码就可以了： function getAttribute(obj) { // 用来保存所有的属性名称和值 var props = ""; // 开始遍历 for(var p in obj){ // 方法 if(typeof(obj[p])=="function" { obj[p](); }else{ if(typeof(obj[p])=="object" { //递归 getAttribute(obj[p]); }else{ // p 为属性名称，obj[p]为对应属性的值 props+= p + "=" + obj[p] + "t"; } } } // 最后显示所有的属性 document.write(props + " " ; }]]></description>
			<content:encoded><![CDATA[<p>JavaScript调试起来很不方便，有时候需要知道某个对象有哪些属性和值，利用下面的代码就可以了：</p>
<p><pre class="php">
function getAttribute(obj) {
// 用来保存所有的属性名称和值
var props = "";
// 开始遍历
for(var p in obj){
// 方法
if(typeof(obj[p])=="function" <img src='http://chinarui.yo2.cn/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley'> {
obj[p]();
}else{
if(typeof(obj[p])=="object" <img src='http://chinarui.yo2.cn/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley'> {
//递归
getAttribute(obj[p]);
}else{
// p 为属性名称，obj[p]为对应属性的值
props+= p + "=" + obj[p] + "t";
}
}
}
// 最后显示所有的属性
document.write(props + "
" <img src='http://chinarui.yo2.cn/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley'> ;
}
</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://chinarui.yo2.cn/study/iterate_an_js_object-s_properties_and_values.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

