Archive for 2007年4月

MS向亚洲教育进军

从MSN Alert中看到了Taking Action on the Vision for High-Quality Education,发现MS果然开始向教育界进军了。

虽然是意料之中的事,但是Bill Gates在北京宣布公开Student Innovation Suite的消息还是令我吃惊不小。尤其是这一套装还包含了操作系统。

Poole称:The Microsoft Student Innovation Suite includes Microsoft Windows XP Starter Edition, Microsoft Office Home and Student 2007, Microsoft Math 3.0, Learning Essentials 2.0 for Microsoft Office, and Windows Live Mail desktop. It will be available at a nominal fee to governments purchasing bulk orders of computers for primary and secondary students. Through our Partners in Learning program, we will offer this suite for US$3, so we’re really intending this to help transform education in underserved student groups worldwide. The cost of the media is not included in this price. Governments can purchase the software suite on various types of distribution media through Microsoft “Authorized Replicators” and OEM [original equipment manufacturer] partners.

可想而知,当初MS是多么的反对OLPC计划,因为OLPC无法运行Windows。

使用过Student 2007之后,就会发现它并不适合亚洲的儿童:全是英文不说,内容完全是关于美国的,很难适合以中国为代表的广大发展中国家的国情。

PS:文中还放出了北京儿童使用Student Innovation Suite在课后学习的照片,让我想起了OLPC……只是,OLPC被用来当电灯照明的惨淡遭遇会不会在MS身上重演呢?

Students from a village outside of Beijing, China, use Microsoft Student Innovation Suite to study together after school. February 2007.

Students from a village outside of Beijing, China, use Microsoft Student Innovation Suite to study together after school. February 2007.

Click for larger version.

Windows Mobile 6 SDK 中的 GPS 工具(转)

转载于http://www.cnblogs.com/upto/archive/2007/02/15/gps-tools-in-wm6sdk.html

GPS Intermediate Driver
自从 Windows Mobile 5.0 引进了 GPS Intermediate Driver(GPS 中间驱动程序,以下简称 GPSID),开发基于 GPS(Global Positioning System,全球定位系统)的 Windows Mobile 应用程序变得简单多了。原因是它在开发人员编写的应用程序和 GPS 设备之间加入了一个中间层,使开发人员不需要通过串口直接访问 GPS 设备,而是访问 GPSID 提供的 API 函数,GPSID 再去访问 GPS 设备。这样一来,编写出来的 GPS 应用程序具有设备无关性。另外,GPSID 还有下面两个好处:
1. 多个应用程序可以同时访问同一个 GPS 设备,因为你访问的是 GPSID
2. 不需要去解析 NMEA 命令,GPSID 帮你解析好了
关于 GPSID 的详细介绍请参阅 GPS Intermediate Driver Reference,还可以观看张汝颇的 Windows Mobile 轻松接轨GPS Webcast,在本文不会展开讨论。
这次 Windows Mobile 6 SDK 提供的 Fake GPS 和 GPS Settings 这两个针对 GPSID 开发和使用的辅助工具,基于 .NET Compact Framework 1.0 编写,所以适用于 Windows Mobile 5.0。在 C:Program FilesWindows Mobile 6 SDKToolsGPS 目录下可以找到这两个小工具。
Fake GPS

如果你想开发一个运行在 Windows Mobile 系统的 GPS 应用程序,但是找不到 GPS 设备用来调试,或者你在室内调试程序,GPS 设备接收不到卫星信号,那 Fake GPS 正是你急需的工具了。
GPSID 的所有设置信息都保存在注册表中,可以通过修改注册表来更改 GPSID 的设置。其中有个一个设置,可以让 GPSID 从一个包含 NMEA 命令的 .txt 文件读取 GPS 数据,而不需要从 GPS 设备读取数据。这个在张汝颇的 Windows Mobile 轻松接轨GPS 中也有介绍。Fake GPS 的工作原理就是修改注册表的 GPSID 设备,让  GPSID 从一个文本文件读取 GPS 数据。而对于我们开发的应用程序来说,跟访问真实的设备并没有两样。
在使用 Fake GPS 之前需要将它安装到你 Windows Mobile 设备上或者仿真器上,安装文件是 FakeGPS.CAB。这里我把 Fake GPS 安装到 Windows Mobile 6 Standard 的仿真器里。安装成功后在开始菜单中找到它并运行。

Fake GPS 的设置默认没有生效,我们可以在第一个输入框把它的状态改为 Enabled,现在可以在第二个输入框中选择从哪个文件读取 GPS 数据。Fake GPS 默认带了两个测试文件,fakegpsdata.txt 在打开后会让 GPSID 马上接收到位置信息,而 dixies.txt 需要等待一段时间才能接收到位置信息。

如果你想使用自己的测试数据,可以将编写好的 .txt 文件复制到 Program FilesFakeGPSGPSFiles 目录下,在重新运行 Fake GPS 就可以在 NMEA File 列表中看到了。

下面有一段 NMEA 数据可供测试:

$GPGLL,4738.0173,N,12211.1874,W,191934.767,A*21
$GPGSA,A,3,08,27,10,28,13,19,,,,,,,2.6,1.4,2.3*3E
$GPGSV,3,1,9,8,71,307,43,27,78,59,41,3,21,47,0,10,26,283,40*77
$GPGSV,3,2,9,29,13,317,0,28,37,226,37,13,32,155,36,19,37,79,42*42
$GPGSV,3,3,9,134,0,0,0*46
$GPRMC,191934.767,A,4738.0173,N,12211.1874,W,0.109623,12.14,291004,,*21
$GPGGA,191935.767,4738.0172,N,12211.1874,W,1,06,1.4,32.9,M,-17.2,M,0.0,0000*75
$GPGLL,4738.0172,N,12211.1874,W,191935.767,A*21
$GPGSA,A,3,08,27,10,28,13,19,,,,,,,2.6,1.4,2.3*3E
$GPRMC,191935.767,A,4738.0172,N,12211.1874,W,0.081611,15.81,291004,,*2A

这里我选择了 fakegpsdata.txt  作为测试数据。点击 done 按钮保存设置并关闭 Fake GPS。然后运行我前段时间编写的一个坐标采集工具 Smart GPS Tracker,它是基于 Windows Mobile 5.0 GPSID 编写的,效果如下:

到此为止,我没有用到一台真实的设备。Fake GPS 适用于 Pocket PC 和 Smartphone 两种操作系统,它会自适应。
GPS Settings
在 Windows Mobile 5.0 和 Windows Mobile 6 的 Pocket PC 版操作系统中自带了一个 GPSID 的配置程序,在 Windows Mobile 6 Professional 中可以通过选择“Start–>Settings–>System–>External GPS”打开。

而 Smartphone 版的操作系统中并没有自带类似的 GPSID 配置程序,这为开发 Smartphone 上的 GPS 应用程序带了一些不便。我是自己写了一个,其实也不难,就是读/写几个注册表的键值。
Windows Mobile 6 SDK 中提供了一个叫 GPS Settings 的工具,用于在 Smartphone 的操作系统配置 GPSID,功能跟 Pocket PC 上的一样。在 C:Program FilesWindows Mobile 6 SDKToolsGPS 目录下找到 Settings.exe,并将它复制到 Smartphone 上运行。

关于 GPSID 如何设置,这里不展开了,如果你感兴趣可以看我上面推荐的学习资料
总结
GPS Intermediate Driver 为我们开发 GPS 应用程序带来了很多好处,而 Windows Mobile 6 SDK 中提供的 Fake GPS 和 GPS Settings 这两个小工具,弥补了 Windows Mobile 5.0 SDK 中的空缺,使得开发基于 GPSID 的应用程序更加方便。如果你对这两个工具的工作原理感兴趣,可以自己用 Reflector 打开它们的程序集,好好研究一番,不明白的地方可以查 SDK 的帮助。另外,Windows Mobile 6 SDK 自带了一个 GPSID 示例的完整项目代码,对于理解 GPSID 的工作原理很有帮助,并且它的代码具有很高的重用价值,在 D:Program FilesWindows Mobile 6 SDKSamplesPocketPCCSGPS 目录下可以找到这个示例。
参考:
What’s New for Developers in Windows Mobile 6
GPS Intermediate Driver Reference

Alexa Information

今天看到Alexa上的PageView已经达到10/d了,哈哈
详情请访问这里
只要把以下代码复制到HTML,即可看到
 
<!– Alexa Graph Widget from http://www.alexa.com/site/site_stats/signup –>

<script type="text/javascript"
src="http://widgets.alexa.com/traffic/javascript/graph.js"></script&gt;

<script type="text/javascript">/*
<![CDATA[*/

   // USER-EDITABLE VARIABLES
   // enter up to 3 domains, separated by a space
   var sites      = [‘http://biggates.spaces.live.com  ‘%5D;
   var opts = {
      width:      380,  // width in pixels (max 400)
      height:     300,  // height in pixels (max 300)
      type:       ‘r’,  // "r" Reach, "n" Rank, "p" Page Views
      range:      ‘6m’, // "7d", "1m", "3m", "6m", "1y", "3y", "5y", "max"
      bgcolor:    ‘e6f3fc’ // hex value without "#" char (usually "e6f3fc")
   };
   // END USER-EDITABLE VARIABLES
   AGraphManager.add( new AGraph(sites, opts) );

//]]></script>

<!– end Alexa Graph Widget –>


 

系统盘到底要多少空间?

转自http://www.csdn.net/develop/author/netauthor/jiangsheng/

最近我在一台计算机上安装了Windows XP。安装完之后,我去Windows Update去下载更新。为了偷懒,我选了全部组件更新,包含Windows Media Player 11.Net 3.0这样未必会用到的组件。更新的结果是10G的硬盘只剩下3G。

OK,我承认这个分区是小了点,但是那个硬盘一共只有30G,在我的80G的硬盘上,16G的C盘也不足以安装Visual Studio 2005 SP1。这是因为尽管我的应用软件,例如Office 2003Visual Studio 2003Visual Studio 2005Windows Vista SDKSQL Server 2005都没有安装在C盘,但是它们都强制把一部分组件安装在系统盘中,而且Windows Installer也缓存安装文件,以至于剩余空间不足以运行安装程序。

OK,我们来看看Visual Studio 2005 SP1安装的时候到底做了什么。

  • 解压到%temp%临时目录(对于我的Visual Studio 2005 Team System,这需要C:Documents and SettingsAdministratorLocal SettingsTemp下面1个多GB的空间)
  • 把自己复制到%temp%下(400多MB)
  • 把自己复制到%windows%Installer下(C:Windows Installer下400多MB)
  • 解压到%windows%InstallerPatchCache(1个多GB)

安装过程中还会生成临时文件(C:Config.msi和%temp%下面的日志文件)。也就是说,要成功安装Visual Studio 2005 SP1的话,所需空闲空间大大超出成功安装Visual Studio 2005所需的空间。在SP1的下载页面,列出的空间要求是6.2GB(这还是在没有安装多个Visual Studio 产品的情况下)。

为了节约系统盘空间,我以前采取的措施包括

  • 安装应用程序时不安装到系统盘
  • 将用户的“我的文档”目录,%temp%目录和IE的缓存移动到非系统盘
  • 运行磁盘清理,压缩旧文件
  • 将Windows的磁盘交换文件移动到非系统盘

但是这一次我不得不压缩%windows%Installer目录才可以正常安装Visual Studio 2005 SP1。

考虑到Windows Installer会在%windows%Installer目录缓存安装文件,安装一些很大的应用程序也会同样占用系统盘的空间。所以在给计算机分区的时候,尽量给系统盘较大的空间。

SharpMap: an open source GIS library

sharpmap logo.png
SharpMap is an easy-to-use mapping library for use in web and desktop applications. It provides access to many types of GIS data, enables spatial querying of that daharpMta, and renders beautiful maps.
The engine is written in C# and based on the .Net 2.0 framework. SharpMap is released under GNU Lesser General Public License.

Getting Started

Going Deeper

Development