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 / MainUi.java
Last active February 3, 2017 06:28
向七牛云上传图片的swing程序
package org.wowtools.img.qiniuimg;
import com.qiniu.common.QiniuException;
import com.qiniu.http.Response;
import com.qiniu.storage.UploadManager;
import com.qiniu.util.Auth;
import org.json.JSONObject;
import org.wowtools.common.utils.ResourcesReader;
@codingmiao
codingmiao / 各种开源协议选择简图.md
Created February 4, 2017 02:45
各种开源协议选择简图.md

启动

直接点击Nginx目录下的nginx.exe 或者 cmd运行start nginx

关闭

nginx -s stop 或者 nginx -s quit

stop表示立即停止nginx,不保存相关信息

@codingmiao
codingmiao / 0_reuse_code.js
Created February 4, 2017 06:39
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
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
@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>
@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 / 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 / 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 / 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 {