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
-ea | |
-server | |
-Xms1G | |
-Xmx2048M | |
-Xss2m | |
-XX:MaxMetaspaceSize=1G | |
-XX:ReservedCodeCacheSize=512m | |
-XX:MetaspaceSize=512m | |
-XX:+UseConcMarkSweepGC | |
-XX:+DoEscapeAnalysis |
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
#!/usr/bin/env bash | |
PID_FILE="consumer.pid" | |
PID_FILE_STORE_PATH="" | |
MAIN_CLASS="com.oneapm.touch.alert.consumer.Consumer" | |
function ensure_pid_path() { | |
if [ "x$PID_FILE_STORE_PATH" = "x" ]; then | |
# Default PID path in bin path | |
PID_FILE_STORE_PATH="${BASE_DIR}/bin" |
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
object Count extends App { | |
def sliceFromMaxElement(array: Array[Int]) = { | |
val (left, right) = array.span(_ < array.max) | |
(left, right.tail.reverse) | |
} | |
def fold(array: Array[Int], result: Int = 0): Int = { | |
if (array.isEmpty) { | |
result | |
} else { |
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.concurrent.*; | |
import java.util.*; | |
public class Untitled { | |
public static void main(String[] args) { | |
long total = 235; | |
long startTime = System.currentTimeMillis(); | |
for (int i = 1; i <= total; i = i + 3) { | |
try { |
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.platform.gateway.domain.util; | |
import java.time.*; | |
import java.util.Date; | |
import org.springframework.core.convert.converter.Converter; | |
public final class JSR310DateConverters { | |
private JSR310DateConverters() {} |
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.net.InetAddress; | |
import java.net.UnknownHostException; | |
import java.util.logging.Logger; | |
import javax.servlet.http.HttpServletRequest; | |
public class IpHelper { | |
private static final Logger logger = Logger.getLogger("IpHelper"); | |
private static String LOCAL_IP_STAR_STR = "192.168."; | |
public static final String LOCAL_IP; | |
public static final String HOST_NAME; |
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.platform.gateway.service; | |
import java.io.File; | |
import java.util.Arrays; | |
import java.util.Optional; | |
/** | |
* Title: FileScanner | |
* Create Date: 2016-06-21 10:23 | |
* Description: |
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.mall.modules.utils; | |
import org.joda.time.DateTime; | |
/** | |
* Title: UIDGenerator | |
* Description: Unique id for common business order number | |
* | |
* @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
worker_processes 1; | |
events { | |
worker_connections 4096; | |
} | |
http { | |
server { | |
listen 8080; | |
location / { |
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; |