- A. super
- B. begin
- C. try
- D. goto
解答
C,D
// ==UserScript== | |
// @name IT passport Ads Remover | |
// @namespace https://gist.github.com/YoshiTheChinchilla/ | |
// @version 1.0.0 | |
// @description Removing the ads on www.itpassportsiken.com | |
// @author Takashi Yoshimura | |
// @encoding utf-8 | |
// @homepage https://gist.github.com/YoshiTheChinchilla/ | |
// @match https://www.itpassportsiken.com/* | |
// @license MIT |
/// "2$4$8$16" | |
/// ↓ | |
/// "$"を"#"に置換 | |
/// ↓ | |
/// "2#4#8#16" | |
/// ↓ | |
/// "#"を区切り文字に配列へ分割 | |
/// その要素数を表示 | |
/// ↓ |
fn to_rgb(r: usize, g: usize, b: usize) -> String { | |
format!("#{:02X}{:02X}{:02X}", r, g, b) | |
} | |
fn main() { | |
// let mut args = std::env::args(); | |
// args.skip().next().unwrap(), args.next().unwrap(), args.next().unwrap() | |
assert_eq!(to_rgb(200, 15, 1), "#C80F01"); | |
} |
// $ npm i --save benchmark microtime | |
const Benchmark = require('benchmark') | |
const suite = new Benchmark.Suite | |
const str = 'E0123' | |
const compiledRegex = new RegExp(/E\d{4}/) | |
suite | |
.add('RegExp#match', function() { | |
const matched = str.match(/E\d+/) |
#![feature(const_generics)] | |
#![feature(const_evaluatable_checked)] | |
use std::mem::size_of; | |
pub fn zero_array_of<T>() -> [u8; size_of::<T>()] { | |
[0u8; { size_of::<T>() }] | |
} | |
#[cfg(test)] |
[ | |
{"year": 1983, "slogan": "これまでで一番強くかつ攻撃的な味"}, | |
{"year": 1985, "slogan": "近年にない上物"}, | |
{"year": 1992, "slogan": "過去2年のものよりフルーティーで、軽い"}, | |
{"year": 1995, "slogan": "ここ数年で一番出来が良い"}, | |
{"year": 1996, "slogan": "10年に1度の逸品"}, | |
{"year": 1997, "slogan": "まろやかで濃厚。近年まれにみるワインの出来で過去10年間でトップクラス"}, | |
{"year": 1998, "slogan": "例年のようにおいしく、フレッシュな口当たり"}, | |
{"year": 1999, "slogan": "1000年代最後の新酒ワインは近年にない出来"}, | |
{"year": 2000, "slogan": "今世紀最後の新酒ワインは色鮮やか、甘みがある味"}, |
<template> | |
<div class="iframe-container"> | |
<iframe class="iframe-content" src="https://www.youtube.com/embed/g06zI68Blzk"></iframe> | |
</div> | |
</template> | |
<script> | |
export default {} | |
</script> |
use std::time::Instant; | |
use nom::character::complete::*; | |
use nom::error::ParseError; | |
use nom::{AsChar, InputIter, InputTakeAtPosition, Slice}; | |
fn parse_spaces<T, E: ParseError<T>>(mut input: T) -> i32 | |
where | |
T: InputTakeAtPosition + InputIter + Slice<std::ops::RangeFrom<usize>>, | |
<T as InputTakeAtPosition>::Item: AsChar + Clone, |
struct UnionFind { | |
par: Vec<usize>, | |
rank: Vec<usize>, | |
} | |
impl UnionFind { | |
fn new(n: usize) -> UnionFind { | |
let mut par = Vec::with_capacity(n); | |
for i in 0..n { | |
par[i] = i; |