This file contains hidden or 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 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')! |
This file contains hidden or 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
<!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 "; |
This file contains hidden or 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
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "ES2022", | |
"sourceMap": false, | |
"module": "CommonJS", | |
"rootDir": "src/lib", | |
"outDir": "src/runner" | |
} | |
} |
This file contains hidden or 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 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(); |
This file contains hidden or 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
set number | |
set t_Co=256 | |
set cmdheight=2 | |
set backspace=indent,eol,start | |
call plug#begin() | |
Plug 'vim-airline/vim-airline' | |
Plug 'vim-airline/vim-airline-themes' | |
Plug 'ryanoasis/vim-devicons' | |
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } |
This file contains hidden or 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
public class StrUtil { | |
public static void main(String[] args) { | |
// 文字列編集 | |
String str = "aaa/aaaaaaa___________a"; | |
// lastIndexOf -> 一致する複数の文字列の最後のやつを返す | |
// endStr.length() | |
String endStr = "/"; | |
int endIndex = str.lastIndexOf(endStr) + endStr.length(); |
This file contains hidden or 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
public class UpperCaseTest { | |
public static void main (String[] args) { | |
// toUpperCaseTest | |
String stunum = ""; | |
String upperStunum = stunum.toUpperCase(); | |
System.out.println(upperStunum); | |
// toLowerCaseTest | |
String myName = ""; | |
String lowerStunum = myName.toLowerCase(); |
This file contains hidden or 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
String x = "sss"; | |
if (x.endWith("s") && x.startWith("s") ) { | |
// other code | |
} |
This file contains hidden or 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
//クラス名は必ずMainにする必要があります。 | |
import java.util.*; | |
public class Main { | |
public static void main(String args[] ) throws Exception { | |
Scanner sc = new Scanner(System.in); | |
String s = sc.next(); | |
String s2 = sc.next(); | |
String s3 = sc.next(); | |
int sleng = s.length(); |
This file contains hidden or 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 React from 'react'; | |
interface TextBoxState { | |
text: string; | |
} | |
class TextBox extends React.Component<{}, TextBoxState> { | |
constructor(props: {}) { | |
super(props); | |
this.state = { |
OlderNewer