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
/** | |
* Firefoxのクイック検索を無効化 | |
* @author yoichiro | |
*/ | |
let isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1; | |
if (isFirefox) { | |
window.addEventListener("keydown", function(e){ | |
if(e.key == "'" || e.key == '/'){ | |
e.preventDefault(); | |
} |
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
<?php | |
function is_utf8($str) | |
{ | |
$len = strlen($str); | |
for ($i = 0; $i < $len; $i++) { | |
$c = ord($str[$i]); | |
if ($c > 128) { | |
if (($c > 247)) { | |
return false; | |
} elseif ($c > 239) { |
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
<?php | |
//WordやExcelからのリクエストが来た場合は、何も返さない。 | |
//ログイン判定を行うと、Excelではログインしていないため、ログインページにリダイレクトされてしまう | |
if (strpos(strtolower($_SERVER['HTTP_USER_AGENT'] ?? ''), 'office') !== false) { | |
exit; | |
} |
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
<html> | |
<head> | |
<script | |
src="https://code.jquery.com/jquery-3.2.1.slim.min.js" | |
integrity="sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g=" | |
crossorigin="anonymous"></script> | |
</head> | |
<body> | |
<h1>情報セキュリティマネジメント試験 平成29年秋</h1> | |
<p>問題文は別途配布します。</p> |
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
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<script | |
src="https://code.jquery.com/jquery-3.4.1.min.js" | |
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" | |
crossorigin="anonymous"></script> | |
</head> | |
<body> | |
<h1>足し算ジェネレータ</h1> |
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
function makeQuizExec(){ | |
var min = parseInt(jQuery("#math_gen_min").val()); | |
var max = parseInt(jQuery("#math_gen_max").val()); | |
var op = jQuery("[name=op]:checked").val(); | |
var count = parseInt(jQuery("#math_gen_count").val()); | |
jQuery("#math_gen_result").val(makeQuizN(min, max, op, count)); | |
} | |
function handleDownload(){ | |
var data = jQuery("#math_gen_result").val(); | |
var blob = new Blob([data], {type: "text/plain"}); |
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
function makeQuiz(min, max, op){ | |
var v1 = makeRandom(min, max); | |
var v2 = makeRandom(min, max); | |
var str = ""; | |
str += v1 + " " + op + " " + v2 + " =\n"; | |
str += "sa:\n"; | |
//正答を作る | |
var answerArray = []; | |
var answer = calc(v1, v2, op); | |
answerArray.push(answer); |