목록전체 글 (8)
Paul's Developer Diary
변수란? 변수 : 프로그램을 실행하는 도중에 임의의 값을 저장해 두고 읽을 수 있는 가상의 공간 변수의 선언과 생성? - 변수를 만드는 것을 말한다. 1) 'var' 키워드 2) '변수이름' 3) '세미콜론(;)' /* var: variables(변수)의 약자, name: 변수이름, 세미콜론(;) */ var name; 변수의 초기화? - 변수를 생성하면 비어있는 공간만 생성된다. - 비어있는 공간에 처음으로 값을 집어넣는 과정을 '초기화'라고 한다. - 변수를 초기화할때 등호(=)를 사용하는데 수학에서의 등호와 프로그래밍에서의 등호는 다른 의미를 가진다. - 프로그래밍에서 등호(=)란 변수에 값을 넣겠다는 대입의 의미를 가지고, 이를 대입연산자라고 부른다. - JavaScript에서 양변의 값이 같음을..
책소개 JavaScript 공부는 왼쪽에 있는 책을 기준으로 시작했습니다. 이 책의 챕터를 기준으로 공부한 내용을 정리하겠습니다.
리엑트(React) 란? 1) 리엑트(React)는 페이스북에서 만든 자바스크립트 라이브러리(JavaScript Library)입니다. - JavaScript로 프론트엔드 개발을 하는데 도움을 주는 것이 '리엑트' 입니다. 2) 개발을 하는데 어떤 도움을 주는데? - 컴포넌트(Component)라는 기능을 제공합니다. 이 기능은 '사용자 정의 태그' 라고 생각할 수 있습니다. 3) 컴포넌트(Component)를 쓰면 뭐가 좋은데? (아래 예시는 실제 리엑트의 사용방법이 아닌 이해를 돕기위한 예시입니다!) - HTML로 복잡한 웹페이지를 만들다보면 태그가 수백, 수천개가 생긴다. - 이 부분이 '네비게이션 바'를 구현한건지... '사이드 바'를 구현한건지... '메인 페이지'를 구현한건지도 모르게 복잡하다..
HTML 태그는 크게 3가지로 구성되어있다. : 태그 이름, 태그에서 제공하는 속성, 속성의 값으로 구성된다. 내용(Content): 해당 태그로 구성된 컨테이너에 들어갈 값을 입력한다. : 해당 태그가 종료됐음을 의미한다. 예시 구글바로가기 예시결과: 구글바로가기 href: 구글 홈페이지로 링크를 연결하도록 설정 target: 구글 홈페이지로 이동할 때 새 페이지를 생성해 이동하도록 설정
HTML(Hyper Text Markup Language)은 위와 같은 기본구조를 가지고 있다. 각 태그의 설명은 아래와 같다. (1) !DOCTYPE 선언 DOCTYPE 선언은 태그는 아니다. 하지만,태그를 정의하기 전 가장 먼저 선언되어야 한다.DOCTYPE이란 Document Type(문서의 타입)을 명시해주는 것으로 웹브라우저에게 이 문서가 HTML 문서임을 알려주는 태그다. (2) HTML 태그 태그는 HTML 문서의 시작(root)을 정의할 때 사용한다. 태그는 DOCTYPE 선언을 제외한 HTML의 모든 태그들의 컨테이너이다. (3) HEAD 태그 태그는 HTML 문서작성에 필요한 메타데이터(MetaData)를 정의할 때 사용한다. 메타데이터란, 웹브라우저에 직접적으로 보이지 않는 정보로 H..
1. 이진트리(BinaryTree) Source# -*- coding: utf-8 -*- class BinaryTree: class Node: def __init__(self, item, parent=None, left=None, right=None): self.item = item self.parent = parent self.left = left self.right = right def __init__(self): self.root = None def is_empty(self): if self.root is None: return True else: return False def push(self, item): if self.is_empty(): self.root = self.Node(item) el..