Skip to content

Instantly share code, notes, and snippets.

View toshimasa-nanaki's full-sized avatar

Toshimasa Nanaki toshimasa-nanaki

  • 日本(東京)
View GitHub Profile
@toshimasa-nanaki
toshimasa-nanaki / LibrePdfOutputTest.java
Last active June 20, 2022 14:39
JODConverter4.1.0 PDF出力テストコード
package jp.example;
import java.io.File;
import org.jodconverter.core.DocumentConverter;
import org.jodconverter.core.office.OfficeException;
import org.jodconverter.core.office.OfficeManager;
import org.jodconverter.local.LocalConverter;
import org.jodconverter.local.office.LocalOfficeManager;
@toshimasa-nanaki
toshimasa-nanaki / domain.xml
Created November 5, 2017 14:41
Payara Server(GlassFish Sever)の文字化け対策
<!-- 175行目あたり -->
<java-config classpath-suffix="" debug-options="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009" system-classpath="">
<!-- 下記最後尾に追加 -->
<jvm-options>-Dfile.encoding=UTF-8</jvm-options>
</java-config>
@toshimasa-nanaki
toshimasa-nanaki / index.html
Created November 6, 2017 12:59
don't use printThis
<!DOCTYPE html>
<html>
<head>
<title>テスト</title>
</head>
<body>
<main>
<article>
<div style="height:100px; width:300px; overflow-y:scroll;">
<table border="1" id="tb">
@toshimasa-nanaki
toshimasa-nanaki / index.html
Created November 6, 2017 13:00
use printThis
<!DOCTYPE html>
<html>
<head>
<title>テスト</title>
  <script src="jquery.js"></script>
<script src="printThis.js"></script>
</head>
<body>
<main>
<article>
@toshimasa-nanaki
toshimasa-nanaki / LibrePdfOutputTest.java
Created November 6, 2017 13:15
JODConverter4.1.0 tmpファイルエラー
import java.io.File;
import org.jodconverter.DocumentConverter;
import org.jodconverter.LocalConverter;
import org.jodconverter.office.LocalOfficeManager;
import org.jodconverter.office.OfficeException;
import org.jodconverter.office.OfficeManager;
public class LibrePdfOutputTest {
public static final String SRC_FILE_PATH = "D:\\temp\\test.tmp";
@toshimasa-nanaki
toshimasa-nanaki / index.html
Created November 12, 2017 13:12
API を呼び出し(失敗)
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
</head>
<body>
<script>
$(document).ready(function(){
$.ajax({
url: 'http://jvndb.jvn.jp/myjvn?method=getVulnDetailInfo&vulnId=JVNDB-2017-004616',
@toshimasa-nanaki
toshimasa-nanaki / test.html
Created November 13, 2017 11:16
APIを呼び出し(成功)
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
</head>
<body>
<script>
$(document).ready(function(){
$('#submit').on("click", function() {
@toshimasa-nanaki
toshimasa-nanaki / hello.py
Created November 16, 2017 14:32
Hello World API Python
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
name = "This is the route."
return name
@app.route('/hello')
def hello():
@toshimasa-nanaki
toshimasa-nanaki / hello.py
Created November 17, 2017 11:47
Hello World API Python(render template)
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html', title='test', userName='kentei')
@app.route('/hello')
def hello():
name = "Hello world!"
@toshimasa-nanaki
toshimasa-nanaki / hello.py
Last active November 18, 2017 12:36
Hello World API Python Request
from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html', title='test', userName='kentei')
@app.route('/hello', methods=['GET','POST'])
def hello():
if request.method == 'POST':