This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.oneapm.research.alert.utils; | |
import lombok.Getter; | |
import java.util.concurrent.TimeUnit; | |
public class Timer { | |
private static final long INITIAL_TIME = 0L; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.common.collect.Maps; | |
import org.I0Itec.zkclient.IZkDataListener; | |
import org.I0Itec.zkclient.ZkClient; | |
import java.util.Map; | |
import java.util.ResourceBundle; | |
/** | |
* 类名称: ZkClientUtils <br> | |
* 类描述: A sync tool based on zkCli, inspired by sharp-config. (LOL)<br> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class CalendarUtils { | |
private static final String[] weekTitle = {"一", "二", "三", "四", "五", "六", "日"}; | |
private static final String[] monthTitle = {"一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"}; | |
private static final int[] monthSize = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; | |
private CalendarUtils() { | |
// No Construct function |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.common.collect.Lists; | |
import java.util.List; | |
/** | |
* Title: StringMatchUtil | |
* Description: | |
* | |
* @author Yufan | |
* @version 1.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# nginx - this script starts and stops the nginx daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
# proxy and IMAP/POP3 proxy server | |
# processname: nginx | |
# config: /usr/local/nginx/conf/nginx.conf | |
# pidfile: /var/run/nginx.pid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.blueocn.user.server; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.PrintWriter; | |
import java.io.Reader; | |
import java.sql.Connection; | |
import java.util.Properties; | |
import javax.sql.DataSource; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function(window, document, $) { | |
var isInputSupported = 'placeholder' in document.createElement('input'), | |
isTextareaSupported = 'placeholder' in document.createElement('textarea'), | |
prototype = $.fn, | |
valHooks = $.valHooks, | |
hooks, | |
placeholder; | |
if (isInputSupported && isTextareaSupported) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.blueocn.api.support.csrf; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpSession; | |
import java.util.UUID; | |
/** | |
* CSRF Token控制器, 获取Session和请求中的Token | |
* 如果Session中Token不存在, 表明是第一次请求, 附加上Token参数 | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.blueocn.api.support.csrf; | |
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; | |
import org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
/** | |
* A Spring MVC <code>HandlerInterceptor</code> which is responsible to enforce CSRF token validity on incoming posts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.blueocn.user.server.v2.common; | |
import com.google.common.base.Preconditions; | |
import com.google.common.collect.Maps; | |
import org.springframework.util.Assert; | |
import java.io.Serializable; | |
import java.util.Map; | |
import java.util.concurrent.TimeUnit; | |
import java.util.regex.Matcher; |