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
| // 関数コンポーネント内で state を扱えるようにするため、React を import 時に useState を読み込む | |
| import React, { useState } from 'react' | |
| import './App.css' | |
| const VueForm = ({selectedValue}) => ( | |
| <p> | |
| 現在選択されている値:<b>{selectedValue}</b> | |
| </p> | |
| ) |
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 requests | |
| import json | |
| create_class = lambda prefix, n: [ f'{prefix}{i + 1:03}' for i in range(n)] | |
| base = 'https://judgeapi.u-aizu.ac.jp/users/' | |
| header = ['name', 'solved', 'submissions'] | |
| users = create_class('s20', 24) + create_class('n20', 30) | |
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
| /* | |
| Google Form Generator | |
| 以下のようなSpreadを作ってmainを実行してください | |
| - シート名がファイルの名前とタイトルになります | |
| - 答えはいくつでもOKです | |
| - 複数シートの場合該当シート上で関数を実行してください | |
| - [sample](https://docs.google.com/spreadsheets/d/1lDIZ7cicQUhGod4sTqF8XH9rLYCUspy9F78GMGqLRqY/edit?usp=sharing) | |
| 細かい説明を書く, point(空白にすると1点,数値を入れるとその点数), 1, 2, 3, 4 | |
| 問題文, , 正答のインデックス番号, 問1の 答え1, 問1の 答え2, 問1の 答え3, 問1の 答え4 | |
| 問題文, 5, 正答のインデックス番号, 問2の 答え1, 問2の 答え2, 問2の 答え3, 問2の 答え4 |
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
| /* checkAbsence.js | |
| # 欠席者メール送信プログラム | |
| Googleフォームと連携して欠席者のリストを送信するプログラム,Googleフォームのデータから | |
| 土日はメールの送信をrejectしています,祝祭日は未対応です(gas.sendEmail -> isWeekDay) | |
| 日別,週別,月別,あるいはすべてのデータを送信します(自動化は別途トリガーで)。 | |
| ## 使い方 |
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' | |
| import sa from 'superagent' | |
| class App extends React.Component { | |
| constructor (props) { | |
| super(props) | |
| this.state = { items: null } | |
| } | |
| async loadedJSON () { | |
| const getAPI = uri => |
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
| body { | |
| margin:0; | |
| padding: 20px; | |
| background: #FFF7FF; | |
| } | |
| .todo { | |
| width:100%; | |
| max-width:25rem; | |
| margin:0 auto; | |
| padding:20px; |
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' | |
| import { | |
| TextField, | |
| Button, | |
| FormControl, | |
| makeStyles, | |
| createStyles | |
| } from '@material-ui/core' | |
| const App = props => { |
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> | |
| <meta charset="utf-8"> | |
| <title>test</title> | |
| <script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script> | |
| <script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.min.js"></script> | |
| <div id="root"></div> | |
| <script type="text/babel"> |
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
| const getCurrentPosition = async () => { | |
| const geolocation = options => new Promise((resolve, reject) => | |
| navigator.geolocation.getCurrentPosition(resolve, reject, options) | |
| ) | |
| const options = { enableHighAccuracy: true } | |
| const position = await geolocation(options) | |
| .then(json => json.coords) | |
| .then(coords => ({ latitude: coords.latitude, longitude: coords.longitude })) | |
| .catch(error => console.log(error)) |
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' | |
| import { | |
| Card, | |
| CardHeader, | |
| CardContent, | |
| CardActions | |
| // List, | |
| // ListItem, | |
| // ListItemText, | |
| // TextField |