Study 64

[백준 / Python] 14503 - 로봇 청소기

결과 메모리 123264 KB 시간 116 ms 알게된 것 bfs에서 도중에 return 하는 예시도 연습해봤다. 푼 과정 directions 순서가 방향마다 달라서 getDirections를 만들었다. bfs 처음에 매번 print(a, b) 해서 내가 의도한대로 동작하는지 다 따라가봤다. 역시 직접 해보는게 제일 빠르다! 제출 코드 # 제출 N, M = map(int, input().split()) robotR, robotC, currentD = map(int, input().split()) area = [list( map(int, input().split()) ) for _ in range(N)] directions = [(0, -1), (1, 0), (0, 1), (-1, 0)] # 북 기준 de..

Study/Algorithm 2020.11.25

GQL서버 init

1. inityarn init 2. src/index.ts 생성 3. 설치yarn add @babel/{node,cli,core} nodemon 4. package.json "scripts": { "dev": "nodemon --exec babel-node src/index.ts" } 5. nodemon.json 파일 생성 (root에)nodemon이 감시해야 할 파일의 확장자 지정{ "ext": "js graphql"} 6. yarn add nexusyarn add graphql   7. import 인식못해서yarn add @babel/preset-env .babelrc{ "presets": ["@babel/preset-env"]} 8. yarn add ts-node -Dyarn add..

Study/GraphQL 2020.04.10

[GraphQL] passport로 인증기능 만들기

server.js require("dotenv").config(); import logger from "morgan"; // 필요한지 잘 모르겠지만 import "./passport"; import passport from "passport"; // import { ApolloServer } from "apollo-server-express"; // 이걸로 하면 request context에 제대로 안날아옴 import { GraphQLServer } from "graphql-yoga"; import schema from "./schema"; import { authenticateJwt } from "./passport"; import express from "express"; import { isAut..

Study/GraphQL 2020.03.23

[GraphQL / Apollo] 도입해보기

https://coding-dahee.tistory.com/111아폴로 습득 후 직접 해보기! 목적: redux, context 대체. 1. isLoggedIn 이라는 변수 만들고 cache에서 가져와보기 client/src/apollo/Apollo.jsimport {resolvers, typeDefs} from './resolvers';import {ApolloClient} from 'apollo-client';import {HttpLink} from 'apollo-link-http';import {InMemoryCache} from 'apollo-cache-inmemory';const cache = new InMemoryCache();const link = new HttpLink({ uri: 'ht..

Study/GraphQL 2020.03.02

[GraphQL / Apollo] 오프라인 노트앱 만들기

[Stack]- GraphQL- Apollo- ReactJS- StyledComponent https://github.com/daheeahn/nomad-notes daheeahn/nomad-notesOffline-First Markdown Note Taking App bulit with Apollo오프라인 노트앱 만들기 - daheeahn/nomad-notesgithub.com GraphQL, Apollo로 local state 관리, 오프라인으로.Redux(x) Context Api(x) 니꼴피셜: 리덕스 버림. Apollo, GQL과 함께면, 리덕스 필요 없음 GQL이 Redux의 API 부분만 대체하는줄 아는데,GQL로 local state 다루는걸 보여줄 것. api 없이, 다 local sta..

Study/GraphQL 2020.02.16

[React] 실전형 React Hooks 10개

https://academy.nomadcoders.co/courses/enrolled/546456 실전형 리액트 Hooks[중급] JavaScript, ReactJSacademy.nomadcoders.co  useState, useEffect  npm에는 자신의 use~ 라이브러리를 많이 배포하고수많은 사람들이 자신의 hooks을 공유한다. useTitle: react document의 title을 몇개의 hooks와 함께 바꾸는 것useInput: 그냥 input 역할usePageLeave: 유저가 page를 벗어나는 시점을 발견하고 함수를 실행함useClick: 누군가 element 클릭하는 시점을 발견해useFadeIn: 어떤 element든 상관없이 애니메이션을 element 안으로 서서히 사라..

Study/Frontend 2020.02.05
출처: https://mingos-habitat.tistory.com/34 [밍고의서식지:티스토리]