Skip to content

Instantly share code, notes, and snippets.

View taichi's full-sized avatar
😸
shaving...

taichi taichi

😸
shaving...
View GitHub Profile
import static org.junit.Assert.assertNotSame;
import java.security.MessageDigest;
import org.junit.Test;
public class P327Test {
/** ハッシュアルゴリズム */
private static final String ALG = "SHA-256";
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
public class SesFixaGuardFirstServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class EscapeHtmlTest {
/**
* 引数で与えられた文字列にHTMLエスケープを行った結果文字列を返す
*
* @param str
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class RegexpSample {
/** 英数字の1文字以上5文字以下 */
private static final String REGEX = "[0-9a-z]{1,5}";
/**
* 正規表現を満たすかどうかの判定メソッド