Author Archives: nanzt

低级错误

犯了一个十分低级的错误,居然花了我很长时间才找到原因。
const QString& PmKeywords::Keyword()
{
return keywords.toString();
}
而 这里,keywords被定义成QValueVector,toString返回QString。大家明白问题出在哪 了吗?由于toString返回QString,而不是QString&,是局部变量,而Keyword属性返回QString&,是一 个引用,即是将局部变量的引用返出来了,但局部变量在scope出了后,就被销毁,这样返出来的就是一个无效的引用。由于整个代码已经近5000行,查错 查起来很麻烦,好歹还是找着了,前面还一直怀疑是否QSqlCursor有问题,在进行QSqlCursor Update的时候发生错误,但根本在于上面描述。一个教训,轻易不要怀疑这些大公司写的商业代码,只能从自己的代码上找原因,这样也许会更有助于除错。

ms sharepoint portal server 2003的卸载问题

I had this issue and solved it by doing the following:
SYMPTOMS
When you use the Add/Remove Programs tool to remove SharePoint Portal Server and Windows SharePoint Services from your server, you may receive the following error message in a SPSADM.EXE – Common Language Runtime Debugging Services dialog box:
Application has generated an exception that cannot be handled.

Process id=0xb60 (2912), Thread id=0x1dc (476)

Click OK to terminate the application.
Click CANCEL to debug the application.
Additionally, you may receive the following error message in a Microsoft Office SharePoint Portal Server 2003 Setup dialog box:
Installation ended prematurely because of an error.
CAUSE
This issue occurs if you do not remove SharePoint Portal Server and Windows SharePoint Services in the correct order. This issue occurs if you remove Windows SharePoint Services before you remove SharePoint Portal Server from the server.

To fully remove SharePoint Portal Server from the server, you must remove the programs in the following order:
SharePoint Portal Server
Windows SharePoint Services
Microsoft SQL Server Desktop Engine (MSDE), if it is installed on the server
WORKAROUND
To recover a server where SharePoint Portal Server and Windows SharePoint Services are not removed in the correct order:
Log on to the server as a member of the local Administrators group.
Click Start, and then click Run.
In the Open box, type cmd, and then click OK.
Switch to the drive where SharePoint Portal Server is installed.
Type the following line, where CDimage is the path of the shared folder that contains the SharePoint Portal Server CD files, and then press ENTER:
msiexec /qb /i <CDimage>WSSSts.msi /L*v <full path>STS_Install.log LAUNCHEDFROMSETUPSTS=1

Switch to the drive where Windows is installed.
Type the following line, and then press ENTER:
cd %programfiles%Common FilesMicrosoft SharedWeb Server Extensions60Config

Type the following line, and then press ENTER:
copy Web.config Web.config.bak

Type the following line, where CDimage is the path of the shared folder that contains the SharePoint Portal Server CD files, and then press ENTER:
msiexec /qb /I <CDimage>SPSSps.msi /L*v <full path>SPS_Binary_Upgrade.log REBOOT=ReallySuppress

Type the following line, where CDimage is the path of the shared folder that contains the SharePoint Portal Server files, and then press ENTER:
msiexec /qb /famsv <CDimage>SPSSps.msi /L*v <full path>SPS_Repair.log REBOOT=ReallySuppress DONTSTARTSERVICE=1

When Setup completes and you are prompted to restart the server, click No.
Use the Add/Remove Programs tool to remove SharePoint Portal Server, Windows SharePoint Services, and MSDE (if it is installed on the server).

Important Make sure that you remove the programs in this exact order.
To avoid this issue when you remove SharePoint Portal Server from the server, use the Add/Remove Programs tool to remove the programs in the following order:
SharePoint Portal Server
Windows SharePoint Services
MSDE (if it is installed on the server)
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

windows firewall & passive mode ftp

windows (sp2及2003)自带的防火墙允许配置例外,包括程序例外,和端口例外两
种。两者有区别,程序例外是允许程序打开的链接(connection)能够通过防火墙,但
防火墙外不能在程序启动前打开某一端口来连接到此程序。端口例外将开放此指定的端
口,允许防火墙内外的程序通过此端口交互。举个例子,当使用servuDeamon.exe建立
passive mode的端口为ftp,除了在程序例外中,指定servuDeamon.exe外,还要指定
2200端口例外。由于在ftp通讯前,客户端需要先行通过2200端口与服务器建立链接,
如果不指定2200例外,防火墙将阻止2200。当2200的cmd端口打开后,servuDaemon.exe
将打开新端口建立data链接,进入passive(比如servu passive端口是从
40000-40049)状态,这时程序例外必须启动。

Qt里的用于文字显示的控件

QLable: 显示文字或图片,不提供用户交互
QSimpleRichText: 用于显示由stylesheet定制的rich text,一但构造完成,不能被修

QTextEdit: 支持修改和显示rich text
QTextBrowser: 支持显示rich text,适合有超文本接连的场合,不能被修改。

Arcims 9 installation

1. Windows server 2003 sp1 chs
2. J2SE SDK 1.4.2_08 (jre updates to 1.5.0.20)
3. IIS 6.0
4. ms sql server 2000 sp4
*set the authentication mode to both sql server and windows by enterprise
management
5. arcsde 9 for sql sp3
6. dot net framework sdk 1.1
*this component is to enable the .net link connector when installing arcims
9. Actually, I’ve installed the visual studio .net 2003 which will be used
as the asp.net editor.
7. Tomcat 5.5.9
*type http://localhost:8080 to see if the setup is completed.
8. configure isapi_redirect.dll
*install isapi_redirect-1.2.13.exe from apache website; it will help you to
creat most of things you have to do without this executable file, for
example, creating proper register settings, adding jakarta virtual directory
to the IIS console.
*add Jakarta extension within IIS console
9. arcims 9
*install arcims 9, and perform post installation with the option of IIS6
with Tomcat 4.x.
*edit the uriworkermap.properties file under the jk1 connector conf
directory, adding the appropriate mappings.*try the diagnostics facity to
test 1 and 2. If error 006 occurs, plz check the machine setting in the
Esrimap_prop file under the webapps directory in Tomcat root.
10. enjoy the arcims 9

arcsde for sql svr 2k

安装完arcsde 9 for sql server 2000,发现启动不了iomgr服务。
查看sde etc目录下的log,发现sde用户不能登录进sql server 2000。
查google,发现是由于在安装sql server时,设定成windows用户验证的登录方式。用
企业管理器,将仅windows验证,改成sql server和windows验证选项。再启动arcsde,
成功!

安装arsde for oracle失败

arcsde for oracle 9i要求的最低oracle 9i版本是9.2.0.3,不知道小冉最早安装的时
候,如何将9.0.0.1版本装上了,居然也可以。不过我还得重新从oracle网站上下载
9.2.0.3。好象9.2.0.4只有linux版本。
从9.2.0.1升级到9.2.0.3需要OUI 2.2.0.18,不能从metalink.oracle.com获取,失败
是否要考虑用sql server 2000

ArcIMS架构

1. ArcIMS架构包括Presentation Tier, Business Logic Tier, Data Tier。 还提供
了一些管理应用程序来管理Business logic tier。

2. ArcIMS工作于Java环境。 运行ArcIMS还包括一个Web server, Java VM,和servlet
engine。servlet engine是Java VM的扩展,建立Java VM和Web server间的连接

3. Business Logic Tier包括Application Server Connectors, ArcIMS Application
Server, 和ArcIMS Spatial Server。Connectors在Web Server和Application Server
间建立连接。在Business logic tier间的通讯通过ArcXML。
3.1 Application Server只接收ArcXML格式的请求。因此connectors的作用就是将直接
ArcXML请求(ArcIMS servlet connector)递交到application server、或从
coldFusion、ASP、.NET、JSP(ColdFusion connector, activex connector, .net
link, java connector)形成ArcXML然后再递交到application server
3.2 ArcIMS Servlet Connector是默认的connector,用于将客户端产生(如Html
Viewer)的ArcXML递交到application server。arcims servlet connector还包括一个
wms connector,允许兼容于wms的客户端可以访问arcims服务
3.3 使用java的connectors(arcims servlet connector和java connector)必须在底
层使用servlet engine,以在web server和java vm间建立关系
3.4 spatial server包括image server, feature server, query server, extract
server, geocode server和metadata server(此6个server可以共存于一个spatial
server上),以及arcmap server(一个spatial server只能存在一个arcmap
server)。前6个server接收arcxml请求,arcmap server接收arcmap mxd文档。
3.5 spatail server的实例(instance)和service。一个实例可以认为是一个线程。除
arcmap server,其它server默认情况下启动2个instances。arcmap server由两个
spatial server启动,一个spatial server只能启动一个arcmap server。arcims提供
四种service,即image service, feature service, metadata service, 和arcmap
image service。每个service由一个或多个server共同完成。
3.6 在一个arcims站点上,可以有多个spatial server,可以在一台机器上,也可以分
布在不同机器。在管理的时候,多个spatial server上的各种server type实际上形成
虚拟的server type,由applicaiton server来具体管理这些虚拟的server type是如何
对应到实际的server type上去。

4 arcims可以使用arcsde 作为后台的数据库。在通常情况下,到arcsde的连接等于
instances的数目。比如,如果只有一个spatial server,默认情况下建立一个image
service,将建立2个image server instances和2个query server instances, 这时到
arcsde的连接数等于4。如果部署了2个spatial server,这时一个image service到
arcsde的连接数等于8。但当再建立一个image service的时候,arcims会重用已有这些
的instances和已有的相同连接。
4.1 arcims到arcsde的连接可以是无限的,不受限于arcsde的license限制。但arcims
也支持连接的pooling,以提高连接效率。

5 表示层。HTML viewer, Java viewer(包括可定制和不可定制两种), 使用各种
connector定制的viewers.

关于swig和boost

刚听冯m讲过这两个东西,以前都不知道,孤陋寡闻了。swig可将c/c++的代码转换成如
python, tck等脚本,也可以转换成c#等代码。据说象gdal就是通过swig将原有代码转
换成.net代码的。boost是一套c++库,看起来好象有包含了很强大的功能。