06 2011 档案
摘要:通过如下sql语句SELECTcol_description(a.attrelid,a.attnum)ascomment,format_type(a.atttypid,a.atttypmod)astype,a.attnameasname,a.attnotnullasnotnullFROMpg_classasc,pg_attributeasawherec.relname='tablename'anda.attrelid=c.oidanda.attnum>0
阅读全文
摘要:1. 将Postgresql的bin目录加入你环境变量的path路径2. psql -U postgres -c "CREATE DATABASE postgis_sample OWNER postgres TEMPLATE template_postgis ENCODING 'UTF8';" postgis_sample是你的数据库名字3. psql -d postgis_sample -U postgres -f D:\PostDbBak\SharpMap\postgisdemodb.backup postgisdemodb.backup是bak文件
阅读全文
摘要:两个错误:1. Run-Time Check Failure #0 - The value of ESP was not properly saved across afunction call. This is usually a result of calling a function declared with onecalling convention with a function pointer declared with a different calling convention 先把dll的项目属性中C/C++->Code Generation->Basic Ru
阅读全文
摘要:1. 首先,在Visual Studio中,我们建立一个Visual C++的项目 类型选择Win32 Project,继续选择Dll类型 该项目取名叫做myDll 1) 添加myDll.h头文件,代码如下:#ifdefA_EXPORTS#defineDLL_API__declspec(dllexport)#else#defineDLL_API__declspec(dllimport)#endifextern"C"DLL_APIvoidHelloWorld(); 这里HelloWorld()就是等下我们要暴露给C#调用的C方法。 注意:必须给函数增加extern "
阅读全文
摘要:The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.解决方法:1. VC6 工程->设置->C/C++->工程选项 直接把 /GZ 给去掉2. VC.NET 项目属性->C/C++->代码
阅读全文
摘要:The netCDF library is implemented as a Windows dynamic link library (DLL).To install a DLL, you just have to leave it in some directory, and (possibly) tell yourcompiler in which directory to look for it.Similarly, you will need to put the header file, netcdf.h, somewhere that you compilercan find i
阅读全文
摘要:1. What Is netCDF? NetCDF (network Common Data Form) 是一种跨平台的用于描述科学数据的格式。 目前可支持的语言版本有(Java, C/C++, Fortran)2. How do I convert netCDF data to ASCII or text? 参考 http://www.unidata.ucar.edu/software/netcdf/docs/ncdump-man-1.html 3. NetCDF的后缀名 ".nc" ( The recommended extension for netCDF files
阅读全文
摘要:东西半球的坐标范围是-180到180负坐标代表西半球,正坐标代表东半球伦敦位于东西半球的交界,所以伦敦的横坐标是0南北半球的坐标范围是-90到90负坐标代表南半球,正坐标代表北半球
阅读全文
摘要:1. 首先创建一个多边形的表CREATETABLEshp_polygon(polygon_idserialNOTNULL,"name"charactervarying(40),CONSTRAINTpk_shp_polygonPRIMARYKEY(polygon_id)USINGINDEXTABLESPACEpg_default)WITH(OIDS=FALSE)TABLESPACEpg_default;2. 使用Postgresql自带的“AddGeometryColumn”函数增加图形关系AddGeometryColumn会自动为你所要的表增加一个代表坐标点的数据列,名为:
阅读全文
摘要:问题: 新建一个Class项目,在类中为了使用ConfigurationManager这个类, 引用了System.Configuration命名空间 using System.Configuration;但是发现在程序中,系统确不认识ConfigurationManager关键字. 解决:在你的Project引用中,需要add reference -> System.Configuration
阅读全文
摘要:问题: windows开启防火墙后IIS下的网站外网无法访问 解决方法:控制面板 - Windows 防火墙 - 例外 - 添加端口:名称任意,端口为 80 ,协议为 TCP ,点 更改范围 可修改 80 端口对哪些计算机开放,确定即可。也可以在 Windows 防火墙 - 例外 - 勾选‘Web 服务器(HTTP)’,设置完成。
阅读全文
摘要:问题: 使用.NET自带的命令可以对WebConfig中某个节点的内容进行加密步骤: 1. cmd模式下 cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.507272. 加密: aspnet_regiis -pef "connectionStrings" "D:\SharpMapSource\DemoWebSite"3. 解密: aspnet_regiis -pdf "connectionStrings" "D:\SharpMapSource\DemoWebSite"问题: 加
阅读全文
摘要:1. 装箱(boxing) 用于把一个值类型转换为引用类型inti=20;objecto=i;//隐式转换2. 拆箱(unboxing) 将以前装箱的值类型转换回引用类型inti=20;objecto=i;intj=(int)o;
阅读全文
摘要:在PostgreSQL中,如果表名或者字段名中存在大写字符,这个sql执行就会错误。解决方法: 给带有大写字母的表名或者字段名加上引号。 eg: "Employee" "Name"这种情况在客户端编程也一样,如果是C#客户端,也必须加上引号。 我们创建一个如下的表:CREATETABLE"Employee"("Name"charactervarying(20),"Age"integer,"Id"serialNOTNULL)WITH(OIDS=FALSE);ALTERTABLE
阅读全文