Skip to content

Instantly share code, notes, and snippets.

View znxkznxk1030's full-sized avatar
🌮
Taco

Arthur 金 znxkznxk1030

🌮
Taco
View GitHub Profile
let fs = require('fs');
try {
let code = fs.readFileSync('in.txt', 'utf8');
// console.log(code);
let codelines = code.split("\n").map(codeline => {
return "\"" + codeline.replace("\r","") + "\""
}).join(",\n");
{
// Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
let input = [[3,1,1],[2,5,1],[1,5,5],[2,1,1]]
let y = 4;
let x = 3;
function init3d(x, y) {
let dp = new Array(y);
for (let i = 0; i < y; i++ ) {
dp[i] = new Array(x + 2);
for (let j = 0; j < x + 2; j++ ) {
dp[i][j] = new Array(x + 2);
import Board
main = do
let board = initboard
putStr $ showBoard board
module Board (
Cell(..),
Row,
Board,
initboard,
showBoard
) where
import Data.List
{-# LANGUAGE RecordWildCards #-}
module Block (
Shape(..),
Block(..),
genblock,
block2coords
) where
data Shape = I | L | J | O | S | Z | T deriving(Eq)
data Block = Block {shape :: Shape, rotate :: Int, coords :: (Int, Int)}
import System.Environment
import System.Directory ( removeFile, renameFile )
import System.IO
( hClose,
openFile,
hGetContents,
hPutStr,
openTempFile,
IOMode(ReadMode) )
import Data.List ( delete )
{-# LANGUAGE RecordWildCards #-}
import System.Environment
import Data.List
data Player = PlayerX | PlayerO
data State = Done | Progress
data Cell = X | O | Empty
type Row = [Cell]
type Board = [Row]
인사/허락 리스트
- 혜정이
- 부모님 (송탄)
- 동생
- 할머니 (동해시)
- 영수
- 부모님 (수원)
- 형 (사당)
= 할머니 (의정부)
function fakeAjax (url, cb) {
var fake_responses = {
file1: 'The first text',
file2: 'The middle text',
file3: 'The last text'
}
var randomDelay = (Math.round(Math.random() * 1e4) % 8000) + 1000
console.log('Requesting: ' + url)