Skip to content

Instantly share code, notes, and snippets.

View nk4dev's full-sized avatar
:octocat:
make app🛠

Nknight AMAMIYA nk4dev

:octocat:
make app🛠
View GitHub Profile
import java.util.*;
public class f22aa021_Maeda {
public static void main(String[] args) {
// Exception handling with Try Catch System.
// case to determine the month -> if it is over 12, it is treated as an exception.
// write by Nknight AMAMIYA.
try {
Scanner sc = new Scanner(System.in);
Integer intake = sc.nextInt();
@nk4dev
nk4dev / tsconfig.json
Created February 13, 2023 02:27
my tsconfig
{
"compilerOptions": {
"target": "ES2022",
"sourceMap": false,
"module": "CommonJS",
"rootDir": "src/lib",
"outDir": "src/runner"
}
}
@nk4dev
nk4dev / testreact.html
Last active February 2, 2023 05:21
single code React on html.
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>React jsx-esm-standalone</title>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<!-- @babel/standaloneでESModuleを利用するために、data-type="module"を追加 -->
<script type="text/babel" data-type="module">
// CDN経由でReactを読み込む(ESModuleであればブラウザから直接利用可能)
import React, {useEffect , useState } from "https://cdn.skypack.dev/react";
import ReactDOM from "https://cdn.skypack.dev/react-dom ";
import type { NextPage } from 'next'
import { useEffect } from 'react'
import * as THREE from 'three'
const Home: NextPage = () => {
let canvas: HTMLElement
useEffect(() => {
if (canvas) return
// canvasを取得
canvas = document.getElementById('canvas')!