好心情的博客
cjx186 · 共 146 篇文章
Sublime Text 2的Preferences.sublime-settings文件
// While you can edit this file, it’s best to put your changes in // “User/Preferences.sublime-settings”, which overrides the settings in here. // // Settings may also be placed in file type specific options files, for // example, in Packages/Python/Python.sublime-settings for python files. { // Se…
2012-10-08 01:35 · Text Editor · 评论(0)
Sublime Text 2的java编译输出
可以在ST2里面新建一个Building System(Tools–>Building System–>New Building System),在弹出的文本框里面输入以下内容: { "cmd": ["javac -j-duser.country=US", "$file_name", "&&", "java", "$file_base_name"], "working_dir": "${project_path:${folder}}", "selector": "source.java", "shell": true //,"encoding":"gbk"// }
2012-10-08 00:39 · Text Editor · 评论(0)
geowebcache.xml完整列表
对地图的切片来讲,使用过tilecache,很短小精干,但是对于Geoserver自带的geowebcache(之前geowebcache是独立项目,后来成为了Geoserver的一部分),这个完整的体系中也是重要的一段。下面就开始整理吧! 发布Geoserver之后,在WEB-INF/classes文件夹下可以新建geowebcache.xml按需配置切片缓存方式。 <alignTopLeft>false</alignTopLeft>这里可以设置,对于不同系统的集成,省去两外编写代码匹配的麻烦。我曾经就遇到过,当时使用对称变换一些方法,通过编程完成,其实,如果在这里解决就省去一部分工作,当…
2012-09-27 21:03 · gis · 评论(0)
java持久化jpa笔记
@Entity//标识这个pojo是一个jpa实体 @Table(name = "users") //指定表名为users public class Users implements Serializable { @Id//设置主键 private String userId; //设置字段类型通过@Column注解设置,包含的设置如下 //name:字段名 //unique:是否唯一 //nullable:是否可以为空 //inserttable:是否可以插入 //updateable:是否可以更新 //columnDefinition: 定义建表时创建此列的DDL //secondary…
Java泛型接口
package me.cjx.example; interface Demo<T> { public void print(T param); } // 实现泛型接口一 class Imple1<T> implements Demo<T> { public void print(T param) { System.out.println("param = " + param); } } // 实现泛型接口二 class Imple2 implements Demo<Imple2> { public void print(Imple2 param) { System.out.println("…
2012-09-16 17:40 · java · 评论(0)
Windows中Java连接Access数据库
1、直接在Java代码内部Access数据库 package me.cjx.example; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.Statement; import java.util.Properties; public class ReadMDB { public static void main(String[] args) { try { Strin…
Hibernate本地方言本配置
在开发hibernate的程序时,需要进行SessionFactory的配置,简单地说,也就是建立与数据库之间连接的配置,在hibernate中一般使用xml文件来进行配置,但是在该文件的配置中需要设置dialect方言属性值,对于不同的数据库,方言的值dialect是不同的,那么下面就列出在不同的数据库中如何设置该dialect值(参见下表): |RDBMS|方言| |DB2|org.hibernate.dialect.DB2Dialect| |DB2 AS/400|org.hibernate.dialect.DB2400Dialect| |DB2 OS390|org.hibernate.…
2012-09-16 10:56 · database · 评论(0)
GeoServer模仿GoogleMap风格写sld
Polygon: <?xml version="1.0" encoding="ISO-8859-1"?> <StyledLayerDescriptor version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http:…
2012-08-29 01:43 · gis · 评论(0)
GeoServer中多边形内多个标签问题
GeoServer在生成多边形切片时会产生重复标签 这个问题可以使用过滤器的质心功能,中心位置。 |Name|Arguments|Description| |centroid|geometry:Geometry|Returns the centroid of the geometry. Can be often used as a label point for polygons, though there is no guarantee it will actually lie inside the geometry| <Rule> <TextSymbolizer> <Label><ogc…
2012-08-29 01:25 · gis · 评论(0)
GeoServer允许WMS地图旋转
http://localhost:8080/geoserver/wms? REQUEST=GetMap &SERVICE=WMS &VERSION=1.1.1 &LAYERS=masmap &STYLES= &FORMAT=image/png &BGCOLOR=0xD6EAB3 &TRANSPARENT=FALSE &SRS=EPSG:4326 &BBOX=101.53219,3.00787,101.54219,3.01787 &WIDTH=600 &HEIGHT=600 &reaspect=false &tiled=false &tilesOrigin=0,0 &angle=-322.73
2012-08-29 01:08 · gis · 评论(0)
GeoServer中使用SLD表现伪3D建筑
原文链接:pseudo-3D buildings in Geoserver Pseudo-3D or 2.5D or 3/4 perspective can be done in Geoserver using isometric function. <FeatureTypeStyle> <Rule> <PolygonSymbolizer> <Geometry> <ogc:Function name="isometric"> <ogc:PropertyName>geom</ogc:PropertyName> <ogc:Literal>7</ogc:Literal> </ogc:Functio…
2012-08-29 00:28 · gis · 评论(0)
CentOS 下 7z的安装
yum install p7zip [root@hostname ~]# wget http://sourceforge.net/projects/p7zip/files/p7zip/9.13/p7zip_9.13_src_all.tar.bz2/download [root@hostname ~]# tar jxvf p7zip_9.13_src_all.tar.bz2 [root@hostname ~]# cd p7zip_9.13 [root@hostname ~]# make [root@hostname ~]# make install /usr/local/bin /usr/lo…
2012-08-23 00:56 · Server · 评论(0)
windows下Nginx启动、关闭、重启bat工具
windows下Nginx启动、关闭、重启bat工具 cls @ECHO OFF SET NGINX_PATH=F: SET NGINX_DIR=F:\web\nginx-1.0.11 color 0a TITLE Nginx 管理程序 Power By ChenJianxiang GOTO MENU :MENU CLS ECHO. ECHO. * * * * Nginx 管理程序 Power By ChenJianxiang * * * ECHO. * * ECHO. * 1 启动Nginx * ECHO. * * ECHO. * 2 关闭Nginx * ECHO. * * ECHO. *…
2012-07-26 23:21 · Server · 评论(1)
maven使用时发生tools.jar错误
在Maven使用时会发生tools.jar这个包错误,查看Build Path发指指向的不是jdk1.6的,而是指向了1.5的。 12-7-26 下午05时01分20秒: Build errors for show; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project show: Could not resolve dependencies for project com.test:show:war:0.0.1-SNAPSHOT: Could not find ar…
2012-07-26 22:59 · java · 评论(0)
Tomcat用Maven远程部署
以Apache Tomcat/7.0.28例:(每个版本的地址和配置会不一样) 查看http://127.0.0.1/manager/html 在弹出的对话框中点取消就会出现401错误, 这里会例出这个版本的哪些角色,有什么权限,manager-gui图形管理 manager-script文本接口等。 1.先更改tomcat-users.xml文件 <?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="manager-gui"/> <role rolename="manager-script"/> <use…
2012-07-26 09:20 · Server · 评论(0)