愚直なバリデーションが、
<?php
$isError = false;
if(!$isError && !isset($_GET['id']))
$_GET['id'] = 0;
if(!$isError && !is_numeric($_GET['id'])) {
$isError = true;
$error = 'ユーザ ID は整数です';
}
/* side bar */ | |
[aria-label="調べたいものを検索"], | |
[aria-label="ブックマーク"], | |
[aria-label="その他のメニュー項目"], | |
[aria-label="ツイートする"], | |
/* side bar icon */ | |
.css-1dbjc4n.r-1awozwy.r-15d164r.r-1x0uki6 .css-1dbjc4n.r-1niwhzg.r-vvn4in.r-u6sd8q.r-4gszlv.r-1p0dtai.r-1pi2tsx.r-1d2f490.r-u8s1d.r-zchlnj.r-ipm5af.r-13qz1uu.r-1wyyakw, | |
/* header */ | |
[role="heading"], |
#if 1 | |
#pragma GCC optimize "O3" | |
#include <array> | |
#include <bitset> | |
#include <deque> | |
#include <map> | |
#include <queue> | |
#include <set> | |
#include <unordered_set> | |
#include <unordered_map> |
// Topcoder Server の時間計測は rdtsc 以外壊れています | |
// 以下のコードで正しく時間計測ができます | |
// サブミットするときに #define LOCAL を消してください | |
#define LOCAL | |
#ifdef LOCAL | |
#include <chrono> | |
inline double getTime() { | |
using namespace std::chrono; | |
return duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count() / 1000.0; |
#if 1 | |
#include <array> | |
#include <bitset> | |
#include <deque> | |
#include <map> | |
#include <queue> | |
#include <set> | |
#include <unordered_set> | |
#include <unordered_map> | |
#include <vector> |
import problem.Point; | |
import problem.Type; | |
import java.awt.*; | |
import java.awt.image.*; | |
import java.io.*; | |
import java.util.Scanner; | |
import javax.imageio.*; | |
public class Output { |
#include <algorithm> | |
#include <cmath> | |
#include <functional> | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
#define U(v) cerr << #v << ": " << (v) << endl | |
double getTime() { | |
unsigned long long a, d; |
2 4 | |
2 4 | |
2 4 | |
2 4 | |
2 4 | |
2 4 | |
2 4 | |
2 4 | |
2 4 | |
2 4 |
// Plugin info {{ =========================================================== // | |
var PLUGIN_INFO = | |
<KeySnailPlugin> | |
<name>HoK</name> | |
<description>Hit a hint for KeySnail</description> | |
<description lang="ja">キーボードでリンクを開く</description> | |
<version>1.4.2</version> | |
<updateURL>https://github.com/mooz/keysnail/raw/master/plugins/hok.ks.js</updateURL> | |
<iconURL>https://github.com/mooz/keysnail/raw/master/plugins/icon/hok.icon.png</iconURL> |
愚直なバリデーションが、
<?php
$isError = false;
if(!$isError && !isset($_GET['id']))
$_GET['id'] = 0;
if(!$isError && !is_numeric($_GET['id'])) {
$isError = true;
$error = 'ユーザ ID は整数です';
}