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 com.zhuhai; | |
import com.auth0.jwt.JWT; | |
import com.auth0.jwt.JWTVerifier; | |
import com.auth0.jwt.algorithms.Algorithm; | |
import com.auth0.jwt.exceptions.JWTCreationException; | |
import com.auth0.jwt.exceptions.JWTVerificationException; | |
import com.auth0.jwt.interfaces.DecodedJWT; | |
import com.auth0.jwt.interfaces.Verification; |
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 RsaUtil { | |
/** | |
* 密钥位数 | |
*/ | |
private static final int RAS_KEY_SIZE = 1024; | |
/** | |
* 加密算法RSA | |
*/ |
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
/** | |
* Created by zhuhai on 2016/6/3. | |
*/ | |
public class ProtostuffUtil { | |
private static Map<Class<?>, Schema<?>> schemaMap = new ConcurrentHashMap<Class<?>, Schema<?>>(); | |
public static <T> Schema<T> getSchema(Class<T> clazz) { | |
Schema<T> schema = (Schema<T>) schemaMap.get(clazz); |
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
DROP TABLE IF EXISTS dim_date; | |
CREATE TABLE dim_date ( | |
the_date datetime NOT NULL , | |
date varchar(20) NOT NULL , | |
the_year char(6) , | |
the_halfyear char(6), | |
the_quarter char(6), | |
the_month char(6), | |
the_day char(4), |
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 List<String> getDateList(String startDate,String endDate) throws ParseException{ | |
List<String> list = new ArrayList<String>(); | |
list.add(startDate); | |
Calendar calendar = Calendar.getInstance(); | |
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); | |
calendar.setTime(sdf.parse(startDate)); | |
boolean flag = true; | |
while(flag){ | |
calendar.add(Calendar.DAY_OF_MONTH, 1); | |
if(sdf.parse(endDate).compareTo(calendar.getTime())>=0){ |
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 com.kaishengit.web; | |
import java.io.BufferedInputStream; | |
import java.io.BufferedOutputStream; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.util.HashMap; |
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 com.kaishengit.web; | |
import java.io.BufferedInputStream; | |
import java.io.BufferedOutputStream; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.List; | |
import java.util.UUID; |
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
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> | |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>拖动上传</title> | |
<link rel="stylesheet" href="css/bootstrap.min.css"> | |
<style type="text/css"> | |
#droparea{ | |
width:700px; |
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 com.kaishengit.entity; | |
import java.io.Serializable; | |
public class Account implements Serializable{ | |
private static final long serialVersionUID = 1L; | |
private int id; | |
private String username; | |
private int age; |
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 L5{ | |
public static void main(String[] args){ | |
int[] nums=new int[5]; | |
for(int a=0;a<nums.length;a++){ | |
System.out.println("请输入"+(a+1)+"个整数的值:"); | |
nums[a]=input.nextInt(); | |
} | |
System.out.println("你输入的数为:"); | |
for(int a=0;a<nums.length;a++){ |
NewerOlder