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
You must complete the following tasks | |
# Task 1 | |
- **Itemize** the user input in English. | |
- Don't omit contents | |
- You can use indent | |
- Output the formulas in LaTeX format. | |
- Note that formulas in LaTeX format must be enclosed in $ $. | |
- Important parts should be bolded. |
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
import satori from 'satori' | |
import fs from 'fs' | |
// fetch font information | |
const endpoint = new URL('https://www.googleapis.com/webfonts/v1/webfonts'); | |
endpoint.searchParams.set('family', 'M PLUS Rounded 1c'); | |
endpoint.searchParams.set('key', process.env.GOOGLE_FONTS_API_KEY); | |
const fontInfo = await fetch(endpoint).then(res => res.json()); | |
// fetch font |
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
type SingleDigit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | |
type Succ<N extends SingleDigit> = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0][N] | |
type EQ<N1, N2> = | |
[N1 extends N2 ? true : false, N2 extends N1 ? true : false] extends [true, true] ? true : false | |
// N1 < N2 | |
type LT<N1 extends SingleDigit, N2 extends SingleDigit> = | |
Succ<N1> extends 0 |
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
x=$(defaults read com.apple.inputmethod.Kotoeri JIMPrefPunctuationTypeKey) | |
if [[ $x == 0 ]] then | |
defaults write com.apple.inputmethod.Kotoeri JIMPrefPunctuationTypeKey -int 3 | |
echo "カンマ・ピリオド に切り替えました" | |
else | |
defaults write com.apple.inputmethod.Kotoeri JIMPrefPunctuationTypeKey -int 0 | |
echo "句点・読点 に切り替えました" | |
fi | |
killall -HUP JapaneseIM-RomajiTyping |
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
/* 掲示板の投稿一覧を見やすくするCSS */ | |
.def_tree_div { | |
/* ツリーを最上部に固定 */ | |
position: sticky; | |
top: 10px; | |
} | |
div.def_block { | |
/* sticky の有効化に必要 */ |
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
import os, sys, subprocess | |
extfrom: str | |
extto: str | |
def sips_convert(filename: str): | |
outputname = filename.replace(extfrom, extto) | |
subprocess.call([ | |
'sips', '-s', 'format', extto, | |
filename, '-o', outputname |
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
:root { | |
--google-margin-left: calc((100vw - 600px) / 2); | |
} | |
@media (min-width:1600px) { | |
.A8SBwf { | |
margin-left: calc(var(--google-margin-left) - 37px); | |
} | |
.MUFPAc { |
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
PVector A, B; | |
void halfStraightLine(float x1, float y1, float x2, float y2) { | |
final int INF = 10000; | |
line(x1, y1, x1 + (x2 - x1) * INF, y1 + (y2 - y1) * INF); | |
} | |
PVector calcQ(float x, float y) { | |
float theta = atan2(B.y - A.y, B.x - A.x); | |
float d = dist(A.x, A.y, B.x, B.y); |
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
package net.trpfrog.latex_table_generator; | |
import java.awt.*; | |
import java.awt.datatransfer.Clipboard; | |
import java.awt.datatransfer.StringSelection; | |
import java.util.Scanner; | |
public class LaTeXTableMaker { | |
public static final String INDENT = " "; |
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
WIDTH = 500 | |
HEIGHT = 500 | |
Pixel = Struct.new(:r,:g,:b) | |
$img = Array.new(HEIGHT) do | |
Array.new(WIDTH) do Pixel.new(255,255,255) end | |
end | |
def clear | |
$img = Array.new(HEIGHT) do |
NewerOlder