분류 전체보기 720

[CSS] CSS구축 Component-Driven, BEM,7-1pattern

Clean CSS clean modular Reusable Ready for growth CSS 구축 Think : about Layout of your webpage or app before writimg code Build : your layout in HTML and CSS with a consistent structure fornaming classes Architect : Create a logical architecture for your CSS with files and filders 1. Component-Driven Design(디자인에 대한 Thinking이 먼저.) modular building blocks that make up interfaces(컴포넌트 드리븐 디자인을 통해 페이..

frontend/CSS&Design 2021.08.02

[CSS] CSS units 와 REM을 사용해야하는이유.

CSS에서 사용하는 unit! 백분율, ems, rems,vh! 픽셀 이외의 단위를 사용할 떄마다 그것이 궁극적으로 px로 변한다는걸 알아야한다. 예측과 제어를 위해. 총 6단계 Declared value(author declared) - 선언된 값(140px, 66%) Cascaded value(after the cascade) - cascading으로 결정된 값 66% / font-size브라우저기본값16px Specified value(defaulting, if there is no cascaded value) 선언이 안된경우 initial value를 줌(padding의 경우 아무것도 원하지 않기 때문에 0px이 부여됨.) 부모에게서 상속 받을 수도 있음. Computed value(convert..

frontend/CSS&Design 2021.08.02

[CSS] CSS cascoding 및 HTML과 CSS관련 고려사항들

CSS HTML중요. 반응형 디자인 fluid layouts media queys responsive images correct units desktop-first vs mobile-first 유지가능하고 확장 가능한 코드작성 Clean easy-to-understand growth reusable how to organize files how to name classes how to strucure HTML 웹 성능 더 빠르고 크기를 작게 만드는 법.(사용자가 더 적은 데이터를 다운받아야함. Less HTTP requests less code compress code use a css preprocessor Less images Compress images 우리가 프로젝트를 하는동안 항상 자문해야될 것..

frontend/CSS&Design 2021.08.02

[CSS] BOX MODEL

Rendering Tree 이후 Website rendering. CSS의 시각적 서식모델은 Dimensions of boxes: the box model Box type: inline, block, inline block Positioning schme: floats and positioning stacking context other elements in the rendertree(형제, 부모등) Viewport size, dimensions of images, etc. Box Model 웹 페이지의 레이아웃을 위해 알아야함. 요소가 어떻게 구성되는지 정의하는 요소 중 하나. 각각의 모든 요소는 웹페이지에서 사각형 상자로 볼수있다. 각 상자는 width height, padding 그리고 border..

frontend/CSS&Design 2021.08.02

[백준][Python] 1194 달이차오른다 가자

비트마스트 bfs. 외판원순회처럼dfs로 해보려다가 중대한 문제점을 발견했다. 내가 dfs return값, 메모이제이션 설계를 잘 못한다는 것이었다.. 특히 분기가 많아질수록.. 다음번엔 그거 보완해야겠다. 큰 깨달음을 얻은 문제. from collections import deque import sys input = sys.stdin.readline dx = [1, -1, 0, 0] dy = [0, 0, -1, 1] def bfs(): while q: x, y, key, cnt = q.popleft() for i in range(4): nx = x + dx[i] ny = y + dy[i] if 0

[백준][Python] 1766 문제집

또상정렬. heap써서 완전한 위상정렬은 아니고 그냥 앞숫자부터 빼주는위상정렬. import sys input = sys.stdin.readline from heapq import heappop,heappush def topological_sort(): heap=[] for i in range(1,N+1): if not level[i]: heappush(heap,i) while heap: cur_solve = heappop(heap) answer.append(cur_solve) for next_solve in ordered[cur_solve]: level[next_solve] -=1 if not level[next_solve]: heappush(heap,next_solve) # 문제는 모두 풀어야한다. ..

[백준][Python] 1497기타콘서트

코드는 한방에 짰는데 1갯수 확인하는 코드에서 노래수만큼이 아니라 기타수만큼 반복문돌려서 7번 틀렸다.. import sys input = sys.stdin.readline from itertools import combinations # 기타 플레이 리스트 이진수로 바꿔서 set에 저장. N,M = map(int,input().split()) guitars = set() for _ in range(N): name,pos = input().split() bin_change='' for chr in pos: if chr=="Y": bin_change += '1' else: bin_change += '0' guitars.add(int(bin_change,2)) # 셋에서 0 제거하고 비었으면 -1출력후 종료..

[백준][Python] 1102 발전소

발전소 최솟값으로 키는 문제. 꺼져있으면 켜져있는 발전소중에 제일 싼 발전소로 선택해 키는게 상태값 최저가면 최신화. import sys input = sys.stdin.readline from collections import deque def make_electic(start,cur_cnt): queue = deque() dp[start] = 0 answer=float('inf') if target_cnt==0 or cur_cnt>=target_cnt: return 0 elif cur_cnt==0: return -1 else: queue.append([start,0]) while target_cnt > cur_cnt: # 한 순회에 하나씩 킬꺼임. circle_SIZE = len(queue) for ..