Skip to content

Instantly share code, notes, and snippets.

View codingmiao's full-sized avatar
🎯
Focusing

刘雨 codingmiao

🎯
Focusing
  • Kunming City, Yunnan Province, China
View GitHub Profile
@codingmiao
codingmiao / click.js
Created June 30, 2017 05:55
openlayers跨域请求 geoserver wms点击
map.on('click', function (evt) {
var viewResolution = (map.getView().getResolution());
var url = pwLayer.getSource().getGetFeatureInfoUrl(
evt.coordinate,
viewResolution,
'EPSG:4326',
{'INFO_FORMAT': 'text/javascript'});
$.ajax({
url: url,
data: "",
@codingmiao
codingmiao / oracle spatial表供geoserver使用.sql
Created March 23, 2017 05:41
oracle spatial表供geoserver使用
--http://gis.stackexchange.com/questions/103760/tif-tfw-to-geotiff
--http://stackoverflow.com/questions/32324726/how-to-get-projectionespg-number-from-fif-or-tfw-file
INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
VALUES ('V_POWER_CUT_NET_DFG_CABLE', 'SHAPE',
@codingmiao
codingmiao / 生成装饰器模式的ResultSet代码.java
Created March 20, 2017 07:56
生成装饰器模式的ResultSet代码
package org.wowtools.dao;
import java.sql.SQLException;
import java.util.function.IntConsumer;
/**
* @author liuyu
* @date 2017/3/20
*/
public class T44 {
@codingmiao
codingmiao / RouteSearch.java
Created March 2, 2017 03:29
寻找图中两个点间所有可达路径
package switchtest;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Stack;
/**
* 寻找图中两个点间所有可达路径
*/
public class RouteSearch {
@codingmiao
codingmiao / RouteSearch.java
Created March 2, 2017 03:28
寻找图中两个点间所有可达路径
package switchtest;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Stack;
/**
* 寻找图中两个点间所有可达路径
*/
public class RouteSearch {
@codingmiao
codingmiao / maven中配置scala依赖和插件_pom.xml
Last active February 16, 2017 06:08
maven中配置scala依赖和插件
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.wowtools.lean-opencv</groupId>
<artifactId>opencvcookbook</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
@codingmiao
codingmiao / getFontSize.html
Created February 13, 2017 08:50
js获取输入文本的大小
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Title</title>
</head>
<script src="http://apps.bdimg.com/libs/jquery/1.6.4/jquery.min.js"></script>
<body>
<span id="ruler"></span><-- add ' style="visibility: hidden;" ' to hidden it<br/>
@codingmiao
codingmiao / openlayer动态样式.html
Created February 9, 2017 01:43
openlayer动态样式demo 注意,若动态样式中包含图片样式icon,icon需要提前在其它地方展现一下才能正常工作--
<!DOCTYPE html>
<html>
<head>
<title>Custom Animation</title>
<link rel="stylesheet" href="https://openlayers.org/en/v3.20.1/css/ol.css" type="text/css">
<!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
<script src="https://openlayers.org/en/v3.20.1/build/ol.js"></script>
</head>
<body>
1、编写脚本restart.sh
/usr/local/tomcat/bin/catalina.sh stop
sleep 1m
/usr/local/tomcat/bin/catalina.sh start
2、上传脚本到服务器,修改权限
执行测试 /usr/local/tomcat/bin/restart.sh
如果sleep出错,运行
dos2unix restart.sh
可能要安装 dos2unix