- フロントエンド全般の設計・実装
- JSでのバックエンド設計・実装
- 特に Prisma に興味があります
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 add = (a: number, b: number): number => { | |
let l = true; const check = () => { const r = new (window.SpeechRecognition || window.webkitSpeechRecognition)(); r.lang='en'; r.onresult = ({results}) => { const word = results.item(0).item(0).transcript; l = word !== 'water'; if (l) { alert('NG:' + word); check(); } else { alert(`🎉🎉🎉🎉🎉Congratulations🎉🎉🎉🎉🎉\n\n${yeah(a,b)}`); }; }; r.start(); }; check(); } ;function yeah(a, b) { | |
return a + b; | |
} | |
add(1,2); |
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
use std::{thread, time}; | |
const BOARD_SIZE: usize = 10; | |
fn main() { | |
let mut board: Vec<Vec<i32>> = vec![ | |
vec![0, 0, 0, 0, 0, 0, 0, 0, 0, 0], | |
vec![0, 1, 0, 0, 0, 1, 1, 1, 1, 0], | |
vec![0, 1, 0, 0, 0, 0, 1, 1, 0, 0], | |
vec![0, 1, 0, 1, 1, 1, 0, 0, 0, 0], |
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
/* | |
- 基本ルールはfizzbuzz | |
- 第2引数に真偽値を受け取って、trueだったら「割り切れる」と「割り切れない」の条件を反転 | |
- 第1引数が負の数の場合、さらに「割り切れる」と「割り切れない」の条件を反転 | |
*/ | |
module.exports.fizzbuzz = ((...arrs) => (num, type) => arrs[((num < 0 ? 1 : 0) + (type ? 1 : 0)) % 2][Math.abs(num % 15)] || `${num}`)( | |
['FizzBuzz', null, null, 'Fizz', null, 'Buzz', 'Fizz', null, null, 'Fizz', 'Buzz', null, 'Fizz', null, null], | |
[ null, 'FizzBuzz', 'FizzBuzz', 'Buzz', 'FizzBuzz', "Fizz", 'Buzz', 'FizzBuzz', 'FizzBuzz', 'FizzBuzz', "Fizz", 'FizzBuzz', 'Buzz', 'FizzBuzz', 'FizzBuzz'] |
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
// 既定値を上書きするには、このファイル内にキー バインドを挿入します | |
[ | |
{ | |
"key": "ctrl+shift+a", | |
"command": "cursorHomeSelect", | |
"when": "editorTextFocus" | |
}, | |
{ | |
"key": "ctrl+shift+e", | |
"command": "cursorEndSelect", |
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
# http://nabetani.sakura.ne.jp/hena/ord18notfork/ | |
require 'minitest/unit' | |
require 'minitest/autorun' | |
class Regi | |
POWER = [ | |
2, 7, 3, 5, 2 | |
] |
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 { EventEmitter } from 'events'; | |
import _ from 'lodash'; | |
export const emitter = new EventEmitter(); | |
export const createStore = (updater) => { | |
let store = {}; | |
emitter.on('pub', (...args) => { | |
const beforeStore = store; | |
store = updater(store, ...args); |
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
module Q2 | |
PATTERN = [ | |
[1], [2], [3], [4], [5], [6], [7], [8], [9], | |
[1, 2], | |
[2, 3], | |
[3, 6], | |
[6, 9], | |
[9, 8], | |
[8, 7], | |
[7, 4], |