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 を生成するためのテンプレートを提供する. | |
テンプレートには変数で値を置き換えるために, | |
以下のようにプレースホルダを含めることができる. | |
<p>こんにちは <%= name %> さん</p> | |
変数の値はデフォルトで HTML エスケープされるため, | |
意図しない XSS (Cross Site Scripting) 脆弱性を防ぐことができる. |
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
""" | |
High and Low における戦略別の的中率を求める. | |
背景 | |
---- | |
あるゲーム内のミニゲームに High and Low があった. | |
* 連続的中回数に応じてアイテムを獲得できる. | |
* アイテムの獲得は 1 日 1 回までであり, 毎日リセットされる. | |
* 1 回目にコインを支払えば, 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
#!/usr/bin/env bash | |
set -eu -o posix -o pipefail | |
shopt -s extglob | |
declare -gr EXIT_STATUS_SUCCESS=0 | |
declare -gr EXIT_STATUS_NO_ARGUMENTS=1 | |
declare -gr EXIT_STATUS_INVALID_FORMAT=2 | |
declare -gr STANDARD_BREAK_TIME_IN_MINUTES=60 |
OlderNewer