Skip to content

Instantly share code, notes, and snippets.

View grapgrap's full-sized avatar
:shipit:

Kim Jong Hyen grapgrap

:shipit:
View GitHub Profile
const fs = require("fs");
const getLine = () => fs.readFileSync("/dev/stdin").toString().split("\n");
const getChunk = () => fs.readFileSync("/dev/stdin").toString().split(" ");
const input = getLine();
// const input = ["4", "1 0", "5", "4 2", "1 2 3 4", "6 0", "1 1 9 1 1 1", '10 2', '1 1 2 3 5 1 4 3 2 6 3 4 2 1' ];
const testCaseNumber = +input[0];
const cases = [];
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"declaration": true,
"outDir": "./",
"strict": true,
"sourceMap": true,
"lib": [ "es2015", "dom" ]
},
@grapgrap
grapgrap / README-Template.md
Created October 3, 2018 07:11 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@grapgrap
grapgrap / mergeMap
Last active July 31, 2018 07:12
mergeMap example
const { from, interval } = require('rxjs');
const { mergeMap, concatMap, take, tap } = require('rxjs/operators');
from([0, 1, 2, 3, 4]).pipe(
mergeMap(data =>
interval(data > 2 ? 1000 : 3000).pipe(
take(1),
tap(() => console.log(data))
)
)
@grapgrap
grapgrap / concatmap
Last active July 31, 2018 07:17
concatMap Example
const { from, interval } = require('rxjs');
const { mergeMap, concatMap, take, tap } = require('rxjs/operators');
from([0, 1, 2, 3, 4]).pipe(
concatMap(data =>
interval(data > 2 ? 1000 : 3000).pipe(
take(1),
tap(() => console.log(data))
)
)
1. create-react-app
- 설치 방법:
- 커맨드 창을 켠다.
- npm install -g create-react-app 를 입력해 create-react-app을 설치한다.
- 사용 방법:
- 커맨드 창을 켠다.
- 코드를 위치할 폴더로 이동한다.
- create-react-app "프로젝트 명" 을 입력해 프로젝트를 생성한다.
- 프로젝트 명으로 만들어진 폴더로 들어가 yarn start 를 입력한다.
-- this is an example
group: nameOfTheNewGroup
Offices = {
city:string, target:number, office:number
'구미', 300, 1
}
int i;
int start_prime, end_prime;
int * result_set;
printf("어디부터 소수를 찾을까요? : ");
scanf("%d", &start_prime);
printf("어디까지 소수를 찾을까요? : ");
scanf("%d", &end_prime);
npm install -g @angular/cli
@grapgrap
grapgrap / subscribe 예시
Last active December 29, 2017 09:12
subscribe 예시
this.http.get<User>(this.url)
.subscribe(
(data: User) => { // handle data for view },
(error: HttpErrorResponce) => { // When HTTP request has something wrong, you can do handle error },
() => { // When HTTP request complete, you can do something }
);