#备份TEST库
/home/kingbase/ES/V8/Server/bin/sys_dump -U username -F c -f /home/kingbase/test.dmp TEST
#备份TEST库下的test模式
/home/kingbase/ES/V8/Server/bin/sys_dump -U username -F c -n test -f /home/kingbase/test.dmp TEST
#备份TEST库下的test模式的test表
This file contains 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
export default function BrowserType () { | |
// 权重:系统 + 系统版本 > 平台 > 内核 + 载体 + 内核版本 + 载体版本 > 外壳 + 外壳版本 | |
const ua = navigator.userAgent.toLowerCase(); | |
const testUa = regexp => regexp.test(ua); | |
const testVs = regexp => ua.match(regexp) | |
.toString() | |
.replace(/[^0-9|_.]/g, "") | |
.replace(/_/g, "."); | |
// 系统 | |
let system = "unknow"; |
This file contains 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
<script language="javascript"> | |
/* | |
* 写成类的方法格式如下:str.trim() | |
*/ | |
String.prototype.trim=function(){ //删除左右两端的空格 | |
return this.replace(/(^\s*)|(\s*$)/g, ""); | |
} | |
String.prototype.ltrim=function(){ //删除左边的空格 | |
return this.replace(/(^\s*)/g,""); | |
} |
This file contains 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
/* | |
* Amount2RMB.java 2008-6-15 | |
*/ | |
package test; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class Amount2RMB { | |
private static final Pattern AMOUNT_PATTERN = |
This file contains 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 net.binjoo.demo; | |
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.util.List; | |
import org.apache.oro.text.regex.MalformedPatternException; | |
import org.apache.oro.text.regex.MatchResult; | |
import org.apache.oro.text.regex.Pattern; | |
import org.apache.oro.text.regex.PatternCompiler; |
This file contains 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.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class HTMLSpirit{ | |
public static String delHTMLTag(String htmlStr){ | |
String regEx_script="<script[^>]*?>[\\s\\S]*?<\\/script>"; //定义script的正则表达式 | |
String regEx_style="<style[^>]*?>[\\s\\S]*?<\\/style>"; //定义style的正则表达式 | |
String regEx_html="<[^>]+>"; //定义HTML标签的正则表达式 | |
Pattern p_script=Pattern.compile(regEx_script,Pattern.CASE_INSENSITIVE); |
This file contains 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
Java 3 hrs 40 mins ███████████░░░░░░░░░░ 52.6% | |
Markdown 1 hr 27 mins ████▍░░░░░░░░░░░░░░░░ 20.9% | |
YAML 45 mins ██▎░░░░░░░░░░░░░░░░░░ 11.0% | |
EJS 24 mins █▏░░░░░░░░░░░░░░░░░░░ 5.8% | |
JSON 13 mins ▋░░░░░░░░░░░░░░░░░░░░ 3.2% |
This file contains 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
FROM openjdk:8-jdk-alpine | |
ADD springboot.jar app.jar | |
EXPOSE 8080 | |
ENV ACTIVE dev | |
ENTRYPOINT ["java", "-Xmx128m", "-Xss256k", "-XX:ParallelGCThreads=2", "-Djava.compiler=NONE", "-jar", "/app.jar", "--spring.profiles.active=${ACTIVE}"] | |
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime | |
RUN echo 'Asia/Shanghai' >/etc/timezone |
This file contains 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.math.BigDecimal; | |
/** | |
* 由于Java的简单类型不能够精确的对浮点数进行运算,这个工具类提供精确的浮点数运算,包括加减乘除和四舍五入。 | |
*/ | |
public class Arith { // 默认除法运算精度 | |
private static final int DEF_DIV_SCALE = 10; // 这个类不能实例化 | |
private Arith() { | |
} |
This file contains 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
public class TrendsJava { | |
public static void main(String[] args) { | |
int i = 10; | |
String code = "System.out.println(\"Hello World!\"+(13+2*5/3));"; | |
code += "for(int i=0;i<" + i + ";i++){"; | |
code += " System.out.println(Math.pow(i,2));"; | |
code += "}"; | |
try { | |
run(code); |