1.部署一个简单的测试环境

测试geoserver REST接口,我们可使用python来测试,很方便。需要下载包:

python,http://python.org/。我下载的是Python27版本。

cURL,几个简单的命令行工具,很容易使用命令交互, 地址为http://curl.haxx.se/download.html,下载curl-7.53.1-win64-mingw版本。

Requests,一个给phtyon提供REST支持的插件,https://github.com/kennethreitz/requests

三个包现在后,配置python的环境变量。打开Requests下载后的目录。在该目录下执行以下命令:

  1. python setup.py install
  1. ~$ python
  2. >>> import requests

2.使用curl获取工作区列表

解压curl下载包,进入目录“curl-7.53.1-win64-mingw\bin”,执行cmd命令。输入以下命令:

  1. curl -u admin:geoserver -v -XGET -H 'Accept: text/xml' http://localhost:8082/geoserver/rest/workspaces -o E:\workspaces.xml

参数说明: -u表示验证的用户名和密码,-v表示输入版本, -X表示请求的方式,-H表示输入的请求头信息,-o打印输出文件。但实际不知道-o文件输出到哪里去了,没找到。 输出结果如下:

3.使用python获取工作区

打开用于输出的一个目录,在该目录下执行cmd指令。分别一步一步执行以下python指令:

  1. python
  2. import requests
  3. myUrl = 'http://localhost:8082/geoserver/rest/workspaces'
  4. headers = {'Accept': 'text/xml'}
  5. resp = requests.get(myUrl,auth=('admin','geoserver'),headers=headers)
  6. resp.status_code
  7. file = open('workspaces_py.xml','w')
  8. file.write(resp.text)
  9. file.close()

打开workspaces_py.xml文件查看输出结果。额curl输出结果一样。

4.查看工作区下的数据存储

指令和3相似,myUrl有点区别:myUrl = 'http://localhost:8082/geoserver/rest/workspaces/tiger'。查询结果:

  1. <workspace>
  2. <name>tiger</name>
  3. <dataStores>
  4. <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8082/geoserver/rest/workspaces/tiger/datastores.xml" type="application/xml"/>
  5. </dataStores>
  6. <coverageStores>
  7. <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8082/geoserver/rest/workspaces/tiger/coveragestores.xml" type="application/xml"/>
  8. </coverageStores>
  9. <wmsStores>
  10. <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8082/geoserver/rest/workspaces/tiger/wmsstores.xml" type="application/xml"/>
  11. </wmsStores>
  12. </workspace>

5.查询命名空间

查询命名空间列表url:http://localhost:8082/geoserver/rest/namespaces

查询某个具体的命名空间url:http://localhost:8080/geoserver/rest/namespaces/tiger

6.创建命名空间

使用curl创建,指令如下:

  1. curl -u admin:geoserver -XPOST -H 'Content-type: text/xml' -d '<namespace><prefix>newWorkspace</prefix><uri>http://geoserver.org</uri></namespace>' http://localhost:8082/geoserver/rest/namespaces

使用python创建,指令如下:

  1. >>> myUrl = 'http://localhost:8082/geoserver/rest/namespaces'
  2. >>> file = open('requestBody.xml','r')
  3. >>> payload = file.read()
  4. >>> headers = {'Content-type': 'text/xml'}
  5. >>> resp = requests.post(myUrl, auth=('admin','geoserver'),data=payload, headers=headers)
  6. >>> resp.status_code

requestBody.xml内容:

  1. <namespace><prefix>newWorkspace</prefix><uri>http://geoserver.org</uri></namespace>

7.修改命名空间

使用python指令如下:

  1. >>> myUrl = 'http://localhost:8082/geoserver/rest/namespaces/newWorkspace'
  2. >>> file = open('requestBody.xml','r')
  3. >>> payload = file.read()
  4. >>> headers = {'Content-type': 'text/xml'}
  5. >>> resp = requests.put(myUrl,auth=('admin','geoserver'),data=payload, headers=headers)

requestBody.xml内容:

  1. <namespace><prefix>newWorkspace</prefix><uri>http://localhost:8082/geoserver</uri></namespace>

8.删除命名空间

使用python指令如下:

  1. >>> myUrl = 'http://localhost:8082/geoserver/rest/workspaces/newWorkspace'
  2. >>> headers = {'Accept': 'text/xml'}
  3. >>> resp = requests.delete(myUrl, auth=('admin','geoserver'),headers=headers)
  4. >>> resp.status_code

9.获取数据存储列表

使用python指令如下:

  1. >>> myUrl = 'http://localhost:8082/geoserver/rest/workspaces/tiger/datastores'
  2. >>> headers = {'Accept': 'text/xml'}
  3. >>> resp = requests.get(myUrl,auth=('admin','geoserver'),headers=headers)
  4. >>> file = open('tiger_datastores.xml','w')
  5. >>> file.write(resp.text)
  6. >>> file.close()

输出的tiger_datastores.xml内容如下:

  1. <dataStores>
  2. <dataStore>
  3. <name>50m-rivers-lake-centerlines</name>
  4. <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8082/geoserver/rest/workspaces/tiger/datastores/50m-rivers-lake-centerlines.xml" type="application/xml"/>
  5. </dataStore>
  6. <dataStore>
  7. <name>ne_10m_railroads</name>
  8. <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8082/geoserver/rest/workspaces/tiger/datastores/ne_10m_railroads.xml" type="application/xml"/>
  9. </dataStore>
  10. </dataStores>

10.获取某个存储的具体数据

使用python指令如下:

  1. >>> myUrl = 'http://localhost:8082/geoserver/rest/workspaces/tiger/datastores/ne_50m_populated_places'
  2. >>> headers = {'Accept': 'text/html'}
  3. >>> resp = requests.get(myUrl,auth=('admin','geoserver'),headers=headers)
  4. >>> file = open('tiger_ne_50m_populated_places_datastores.xml','w')
  5. >>> file.write(resp.text)
  6. >>> file.close()

输出结果如下:

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4. <head>
  5. <title>GeoServer Configuration</title>
  6. <meta name="ROBOTS" content="NOINDEX, NOFOLLOW"/>
  7. </head>
  8. <body>
  9.  
  10. Data Store "ne_50m_populated_places"
  11. <ul>
  12. <li><a href="http://localhost:8082/geoserver/rest/workspaces/tiger/datastores/ne_50m_populated_places/featuretypes/ne_50m_populated_places.html">ne_50m_populated_places</a></li>
  13. </ul>
  14. </body>
  15. </html>

11.添加数据存储

使用python指令如下:

  1. >>> myUrl = 'http://localhost:8082/geoserver/rest/workspaces/tiger/datastores'
  2. >>> file = open('tigerCounties.xml','r')
  3. >>> payload = file.read()
  4. >>> headers = {'Content-type': 'text/xml','Accept': 'text/xml'}
  5. >>> resp = requests.post(myUrl, auth=('admin','geoserver'),data=payload, headers=headers)
  6. >>> resp.status_code

传递的tigerConties.xml内容如下:

  1. <dataStore>
  2. <name>tl_2011_47_concity_REST</name>
  3. <description>tiger counties created from REST</description>
  4. <!-- 上传数据存储的类型 -->
  5. <type>Shapefile</type>
  6. <!-- 数据存储是否可用-->
  7. <enabled>true</enabled>
  8. <connectionParameters>
  9. <!-- 使用内存映射的缓冲区 -->
  10. <entry key="memory mapped buffer">false</entry>
  11. <!-- 如果缺少空间索引或者空间索引过时,重新建立空间索引 -->
  12. <entry key="create spatial index">true</entry>
  13. <!-- DBF的字符集 -->
  14. <entry key="charset">ISO-8859-1</entry>
  15. <!-- 数据文件类型 -->
  16. <entry key="filetype">shapefile</entry>
  17. <!-- 如果缺少空间索引或者空间索引过时,重新建立空间索引 -->
  18. <entry key="cache and reuse memory maps">true</entry>
  19. <!-- 上传数据文件的路径 -->
  20. <entry key="url">E:\ebook\GeoServer_Beginners+Guide\output\tl_2011_47_concity\tl_2011_47_concity.shp</entry>
  21. <entry key="namespace">http://www.census.gov</entry>
  22. </connectionParameters>
  23. <__default>false</__default>
  24. </dataStore>

12.修改数据存储

和新增数据存储相似,配置文件tigerCounties.xml修改后。上传该文件,提交使用“PUT”方式。

  1. resp = requests.put(myUrl, auth=('admin','geoserver'),data=payload, headers=headers)

13.删除数据存储

使用python指令如下:

  1. >>> myUrl = 'http://localhost:8082/geoserver/rest/workspaces/tiger/datastores/tl_2011_47_concity_REST'
  2. >>> headers = {'Accept': 'text/xml'}
  3. >>> resp = requests.delete(myUrl, auth=('admin','geoserver'),headers=headers)

14.使用put方式增加shapefile文件

这种方式是直接把shapfile文件上传到geoserver服务器上,所有必须是*.zip包。使用python命令如下:

  1. >>> myUrl = 'http://localhost:8082/geoserver/rest/workspaces/tiger/datastores/Natural+Earth+Countries/file.shp'
  2. >>> file = open('110m-admin-0-countries.zip','rb')
  3. >>> payload = file.read()
  4. >>> headers = {'Content-type': 'application/zip'}
  5. >>> resp = requests.put(myUrl, auth=('admin','geoserver'),data=payload, headers=headers)

“Natural+Earth+Countries”表示数据存储名字为“Natural Earth Countries”;url中的file.shpe是指上传到服务器上存储的shape文件名字;“110m-admin-0-countries.zip”即是需要上传的shape文件压缩包。上传过后,可以在geoserver服务界面查看文件路径:

对应的物理路径在geoserver安装目录下的data目录下。

15.把PostGIS中的一个表添加到一个图层

之前在工作空间cite有创建过一个PostGIS的数据存储,叫做myPostGIS。假如我们已经在PostgreSQL数据库中增加了一个表“ne_110m_admin”,现在我想把表映射到数据存储myPostGIS下的一个图层。

使用python指令如下:

  1. >>> myUrl = 'http://localhost:8082/geoserver/rest/workspaces/cite/datastores/myPostGIS/featuretypes'
  2. >>> payload = '<featureType><name>ne_110m_admin</name></featureType>'
  3. >>> headers = {'Content-type': 'text/xml'}
  4. >>> resp = requests.post(myUrl, auth=('admin','geoserver'),data=payload, headers=headers)

以上命令执行后,可在图层列表总看到一个新的图层“ne_110m_admin”。

如果我们想增加更多的图层配置,例如显示名称“name”、唯一标示名称“nativeName”、keywords包含表字段。如下:

  1. <featureType>
  2. <name>World boundaries</name>
  3. <nativeName>ne_110m_admin</nativeName>
  4. <title>World boundaries</title>
  5. <abstract>World administrative boundaries at small scale</abstract>
  6. <keywords>
  7. <string>Political</string>
  8. <string>World</string>
  9. </keywords>
  10. <featureType>

如果我们想创建一个新表,可以在配置信息中配置表的字段、srs等。例如:

  1. <featureType>
  2. <name>rivers</name>
  3. <nativeName>rivers</nativeName>
  4. <title>World River</title>
  5. <srs>EPSG:4326</srs>
  6. <attributes>
  7. <attribute>
  8. <name>geom</name>
  9. <binding>com.vividsolutions.jts.geom.Polyline</binding>
  10. </attribute>
  11. <attribute>
  12. <name>name</name>
  13. <binding>java.lang.String</binding>
  14. <length>30</length>
  15. </attribute>
  16. <attribute>
  17. <name>country_code</name>
  18. <binding>java.lang.String</binding>
  19. <length>8</length>
  20. </attribute>
  21. </attributes>
  22. </featureType>

16.查询样式

使用python指令如下:

  1. >>> myUrl = 'http://localhost:8082/geoserver/rest/styles/PopulatedPlacesLabeled'
  2. >>> headers = {'Accept: application/vnd.ogc.sld+xml'}
  3. >>> resp = requests.get(myUrl, auth=('admin','geoserver'),headers=headers)
  4. >>> file = open('PopulatedPlacesBlueLabeled.xml','w')
  5. >>> file.write(resp.text)
  6. >>> file.close()

17.新增样式

使用python指令如下:

  1. >>> myUrl = 'http://localhost:8082/geoserver/rest/styles'
  2. >>> file = open('PopulatedPlacesBlueLabeled.xml','r')
  3. >>> payload = file.read()
  4. >>> headers = {'Content-type': 'application/vnd.ogc.sld+xml'}
  5. >>> resp = requests.post(myUrl, auth=('admin','geoserver'),data=payload, headers=headers)

18.所有REST接口查询地址

  1. http://docs.geoserver.org/stable/en/user/rest/api/styles.html#rest-api-styles-post-put

19.查询WFS服务的能力

使用ptyhon指令如下:

  1. myUrl = 'http://localhost:8082/geoserver/wfs?service=wfs&version=1.0.0&request=GetCapabilities'
  2. headers = {'Accept': 'text/xml'}
  3. resp = requests.get(myUrl,auth=('admin','geoserver'),headers=headers)
  4. resp.status_code
  5. file = open('getCapabilities.xml','w')
  6. file.write(resp.text)
  7. file.close()

查看getCapabilities.xml文件,内容比较多,包含了所有的图层信息FeatureType。FeatureType部分内容如下:

  1. <FeatureType>
  2. <Name>NaturalEarth:10m_railroads</Name>
  3. <Title>10m_railroads</Title>
  4. <Abstract/>
  5. <Keywords>10m_railroads, features</Keywords>
  6. <SRS>EPSG:4326</SRS>
  7. <LatLongBoundingBox minx="-150.08159339101002"
  8. miny="8.329046942181577" maxx="-59.94810950429127"
  9. maxy="64.93097565311908"/>
  10. </FeatureType>

20.查询featureType的完整描述

使用python指令如下:

  1. myUrl = "http://localhost:8082/geoserver/wfs?
  2. service=wfs&version=1.0.0&request=DescribeFeatureType&TypeName=tiger:tiger_roads"
  3. headers = {'Accept': 'text/xml'}
  4. resp = requests.get(myUrl,auth=('admin','geoserver'),headers=headers)
  5. resp.status_code
  6. file = open('tiger_roads.xml','w')
  7. file.write(resp.text)
  8. file.close()

查看getFeature.xml文件,内容如下:

  1. <?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:gml="http://www.opengis.net/gml"
  2.  
  3. xmlns:tiger="http://www.census.gov" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  4.  
  5. elementFormDefault="qualified" targetNamespace="http://www.census.gov"> <xsd:import
  6.  
  7. namespace="http://www.opengis.net/gml"
  8.  
  9. schemaLocation="http://localhost:8082/geoserver/schemas/gml/2.1.2/feature.xsd"/> <xsd:complexType
  10.  
  11. name="tiger_roadsType"> <xsd:complexContent> <xsd:extension base="gml:AbstractFeatureType">
  12.  
  13. <xsd:sequence> <xsd:element maxOccurs="1" minOccurs="0" name="the_geom" nillable="true"
  14.  
  15. type="gml:MultiLineStringPropertyType"/> <xsd:element maxOccurs="1" minOccurs="0" name="CFCC"
  16.  
  17. nillable="true" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="NAME"
  18.  
  19. nillable="true" type="xsd:string"/> </xsd:sequence> </xsd:extension> </xsd:complexContent>
  20.  
  21. </xsd:complexType> <xsd:element name="tiger_roads" substitutionGroup="gml:_Feature"
  22.  
  23. type="tiger:tiger_roadsType"/></xsd:schema>

21.查看featureType的数据

使用python指令如下:

  1. myUrl = "http://localhost:8082/geoserver/wfs?
  2. service=wfs&version=1.1.0&request=GetFeature&TypeName=tiger:tiger_roads&maxFeatures=1"
  3. headers = {'Accept': 'text/xml'}
  4. resp = requests.get(myUrl,auth=('admin','geoserver'),headers=headers)
  5. resp.status_code
  6. file = open('getFeature.xml','w')
  7. file.write(resp.text)
  8. file.close()

maxFeaturres参数指定参数feature的条数,这里只查询了一条。有时候我们还需要一些额外的空间属性过滤条件。例如可以使用bbox参数设置查询边界。

  1. "http://localhost:8082/geoserver/wfs?service=wfs&version=1.0.0&request=GetFeature&TypeName=tiger_roads&bbox=-116.68,36.29,-111.36,39.90"

返回数据格式如下:

  1. <wfs:FeatureCollection

  2. >
  3. <gml:boundedBy>
  4. <gml:null>unknown</gml:null>
  5. </gml:boundedBy>
  6. <gml:featureMember>
  7. <NaturalEarth:10m_railroads fid="10m_railroads.481">
  8. <NaturalEarth:the_geom>
  9. <gml:MultiLineString srsName="http://www.opengis.
  10. net/gml/srs/epsg.xml#4326">
  11. <gml:lineStringMember>
  12. <gml:LineString>
  13. <gml:coordinates xmlns:gml="http://
  14. www.opengis.net/gml" decimal="." cs="," ts=" ">-
  15. 116.86064613,34.86170075 -116.85924232,34.86536286
  16. ...
  17. -112.16722572,40.70233796
  18. -112.15178382,40.70752595</gml:coordinates>
  19. </gml:LineString>
  20. </gml:lineStringMember>
  21. </gml:MultiLineString>
  22. </NaturalEarth:the_geom>
  23. <NaturalEarth:ScaleRank>8</NaturalEarth:ScaleRank>
  24. <NaturalEarth:FeatureCla>Railroad</
  25. NaturalEarth:FeatureCla>
  26. <NaturalEarth:SOV_A3>USA</NaturalEarth:SOV_A3>
  27. <NaturalEarth:UIDENT>49706</NaturalEarth:UIDENT>
  28. </NaturalEarth:10m_railroads>
  29. </gml:featureMember>
  30. </wfs:FeatureCollection>

22.查询WCS服务能力

使用ptyhon指令如下:

  1. myUrl = "http://localhost:8082/geoserver/wcs?service=wcs&version=1.0.0&request=GetCapabilities"
  2. headers = {'Accept': 'text/xml'}
  3. resp = requests.get(myUrl,auth=('admin','geoserver'),headers=headers)
  4. file = open('getCapabilities.xml','w')
  5. file.write(resp.text)
  6. file.close()

返回结果包含了每个coverage影像的描述信息。nurc:Img_Sample影像的描述信息如下:

  1. <wcs:CoverageOfferingBrief>
  2. <wcs:description>A very rough imagery of North America</
  3. wcs:description>
  4. <wcs:name>nurc:Img_Sample</wcs:name>
  5. <wcs:label>North America sample imagery</wcs:label>
  6. <wcs:lonLatEnvelope srsName="urn:ogc:def:crs:OGC:1.3:CRS84">
  7. <gml:pos>-130.85168 20.7052</gml:pos>
  8. <gml:pos>-62.0054 54.1141</gml:pos>
  9. </wcs:lonLatEnvelope>
  10. <wcs:keywords>
  11. <wcs:keyword>WCS</wcs:keyword>
  12. <wcs:keyword>worldImageSample</wcs:keyword>
  13. <wcs:keyword>worldImageSample_Coverage</wcs:keyword>
  14. </wcs:keywords>
  15. </wcs:CoverageOfferingBrief>

23.查询WCS某个图层的详细描述

使用python指令如下:

  1. myUrl ="http://localhost:8082/geoserver/wcs?
  2. service=wcs&version=1.0.0&request=DescribeCoverage&Coverage=nurc:Img_Sample"
  3. headers = {'Accept': 'image/tiff'}
  4. resp = requests.get(myUrl,auth=('admin','geoserver'),headers=headers)
  5. file = open('describeCoverage.xml','w')
  6. file.write(resp.text)
  7. file.close()

返回结果包含了该图层的详细描述。

24.查看WCS图层的数据

查询影响图层数据,必须传递bbox、width以及height参数。使用python指如下:

  1. myUrl = "http://localhost:8082/geoserver/wcs?
  2. service=wcs&version=1.0.0&request=GetCoverage&coverage=nurc:Img_Sample&crs=EPSG:4326&bbox=-
  3. 130.85168,20.7052,-62.0054,54.1141&width=982&height=597&format=geotiff&bands=1"
  4. headers = {'Accept': 'text/xml'}
  5. resp = requests.get(myUrl,auth=('admin','geoserver'),headers=headers)
  6. file = open('coverage.tiff','w')
  7. file.write(resp.text)
  8. file.close()

查询结果返回一个tiff格式的图片文件。

geoserver REST使用的更多相关文章

  1. GeoServer中WMS、WFS的请求规范

    文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/ 1.背景 1.1WMS简介 Web地图服务(WMS)利用具有地理空间位置 ...

  2. [原]导入OpenStreetMap海图数据,并在GeoServer上发布

    转载请注明作者think8848和出处(http://think8848.cnblogs.com) 上回我们说到如何<在GeoServer中为OpenStreetMap数据设置OSM样式> ...

  3. [原]在GeoServer中为OpenStreetMap数据设置OSM样式

    转载请注明作者think8848和出处(http://think8848.cnblogs.com) 在前面几篇文章中,我们讲到了部署Postgresql,部署PostGis,部署GeoServer以及 ...

  4. Geoserver+Tomcat+GeoWebCache搭建地图服务

    依赖TomcatGeoserverGeoWebCache环境部署JDKTomcat服务器Geoserver配置GeoWebCache配置环境启动使用使用geowebcache进行切片 依赖 Tomca ...

  5. ElasticSearch+ElasticGeo+Geoserver发布ES地理数据

    依赖GeoserverElasticSearchElasticGeo部署部署ElasticGeo使用创建ES数据源并发布发布 依赖 Geoserver 环境搭建参考: ElasticSearch 环境 ...

  6. 简析Geoserver中获取图层列表以及各图层描述信息的三种方法

    文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/. 1.背景 实际项目中需要获取到Geoserver中的图层组织以及各图层 ...

  7. (十九)WebGIS中I查询的原理及设计(包含AGS、GeoServer、Supermap)

    文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/. 1.背景 我们在使用arcmap时,经常会用到被称为I查询的工具.具体 ...

  8. 简析GeoServer服务的内部文件组织以及GeoServer自动化服务发布工具的开发思路

    文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/. 1.前言 通过GeoServer发布的服务,在GeoServer内部有 ...

  9. 简析将shp导入Oracle并利用geoserver将导入的数据发布

    文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/. 1.环境准备 1.1 软件准备 首先要安装有支持空间数据的Oracle ...

  10. GeoServer中利用SLD配图之矢量图层配图

    文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/. 1 背景 我们在ArcMap中可以直接通过symbol功能对图层进行定 ...

随机推荐

  1. [Linux]基本I/O重定向

    在我们设置定时任务的时候经常会使用标准输出和标准错误输出.这个在Linux是一个非常重要的概念,而且这个很有用.程序应该有数据库的来源端.数据的目的端,以及报告问题的地方,它们被称为标准输入.标准输出 ...

  2. Java byte类型转换成int类型时需要 & 0XFF的原因

    Java byte类型转换成int类型时需要 & 0XFF的原因 假设有byte b  = -1; 那么b的二进制是:1111 1111. 如果将b直接转换为int类型,那么二进制是 1111 ...

  3. mybatis动态sql中的两个内置参数(_parameter和_databaseId)

    mybatis动态sql中的两个内置参数(_parameter和_databaseId)   <!-- mybatis动态sql的两个内置参数           不只是方法传递过来的参数可以被 ...

  4. jquery 发get post请求

    https://www.cnblogs.com/summers/p/3225375.html POST 方法不会缓存数据 $.get(URL,callback); 2个参数 callback 参数是请 ...

  5. minerd

    云服务器 ECS Linux 异常进程 minerd 导致系统 CPU 跑满 问题现象 云服务器 ECS Linux 服务器 CPU 跑满,或者使用服务器越来越慢. 问题原因 使用 top 命令看到有 ...

  6. r语言 工作空间内的对象

    objects.size() objects() 脚本举例 #将以下代码粘贴到编辑器中,另存为regression.r文件. rate<-c(20, 22, 24, 26, 28, 30, 32 ...

  7. Python 类的初见

    #定义一个Python类 class Cat: #self关键字相当于c++类中的this指针 def eat(self): print("i am eating .") def ...

  8. Golang (Go语言) Mac OS X下环境搭建 环境变量配置 开发工具配置 Sublime Text 2 【转】

    一.安装Golang的SDK 在官网 http://golang.org/ 直接下载安装包安装即可.下载pkg格式的最新安装包,直接双击运行,一路按照提示操作即可完成安装. 安装完成后,打开终端,输入 ...

  9. PCB设计与信号完整性

    之前在设计板卡时,只是听过相关的概念,但是未真正去研究关于SI相关的知识.将之前看过的一些资料整理如下: (1)信号完整性分析 与SI有关的因素:反射,串扰,辐射.反射是由于传输路径上的阻抗不匹配导致 ...

  10. Self_Java + Selenium + Maven 环境搭建步骤

    转自:http://www.jianshu.com/p/3c05e8c9ee81 我们使用Java+Selenium WebDriver 来进行环境的搭建,同样分为两个部分: 安装Java 和 int ...