목록

'전체 글' 731건

코드로 놀고, 언어로 성장하는 공방.

  • 클래스
    프로그래밍 언어/NODE JS · 댓글
    다른 언어처럼 클래스 기반으로 동작하는 것이 아니라 여전히 프로토타입 기반으로 동작합니다. 프로토타입 기반 문법을 보기 위해 클래스로 바꾼 것이라고 이해하면 됩니다. 다음은 프로토타입 상속 예제 코드입니다.var Human = function(type) { this.type = type || 'human';};Human.isHuman = function(human) { return human instanceof Human;}Human.prototype.breathe = function() { alert('h-a-a-a-m');}var Zero = function(type, fistName, lastName) { Human.apply(this, arguments); this.firstName = fistN..
  • 영화 앱 멋지게 스타일링하기
    프로그래밍 언어/REACT · 댓글 1
    App.css 파일 수정하기@font-face { font-family: "Ownglyph_wiseelist-Rg"; src: url("https://fastly.jsdelivr.net/gh/projectnoonnu/2501-1@1.1/Ownglyph_wiseelist-Rg.woff2") format("woff2"); font-weight: normal; font-style: normal;}* { box-sizing: border-box;}body { margin: 0; padding: 0; font-family: "Ownglyph_wiseelist-Rg"; background-color: #eff3f7; height: 100%;} Movie.css 파일 수정하기   .movies..
  • 업캐스팅과 instanceof 연산자
    프로그래밍 언어/JAVA · 댓글
    캐스팅(casting)이란 타입 변환을 말합니다. 클래스에 대한 캐스팅은 업캐스팅(upcasting)과 다운캐스팅(downcasting)으로 나뉩니다. 업캐스팅서브 클래스는 슈퍼 클래스의 속성을 상속받기 때문에, 서브 클래스의 객체는 슈퍼 클래스의 멤버를 모두 가집니다. 그러므로 서브 클래스의 객체를 슈퍼 클래스의 객체로 취급할 수 있습니다.서브 클래스의 객체에 대한 레퍼런스를 슈퍼 클래스 타입을 변환하는 것을 업캐스팅(upcasting)이라고 합니다.업캐스팅은 슈퍼 클래스의 레퍼런스로 서브 클래스의 객체를 가리키게 합니다.Person p;Student s = new Student();p = s; // 업캐스팅 이 코드에서, 슈퍼 클래스 타입의 레퍼런스 p가 서브 클래스 객체(s)를 가리키도록 치환되는 ..
  • 연계 데이터 & 연계 메커니즘 구현
    정보처리기사 실기/통합 구현 · 댓글
    연계 데이터 구성통합 구현단위 기능을 하는 모듈 간에 연게와 통합 연계 시스템 구성 요소별 수행 역할 및 기능구성 요소수행 역활 및 기능송신 시스템과 모듈송신모듈-전송하고자 하는 데이터를 생성하여 필요에 따라 변환 후 송신모니터링-데이터 생성 및 송신 상태를 모니터링통계 시스템외부 시스템 간의 연계, 인터넷망(Internet)과 인트라넷망(Intranet)을 연결중계 모듈-송신된 데이터의 오류 처리, 수신 시스템의 데이터 형식으로 변환수신 시스템과 모듈수신모듈-수신 받은 데이터를 정제(Cleansing)하고, 응용 애플리케이션이나 데이터베이스의 테이블에 적합하도록 변환하여 반영연계 데이터송수신되는 데이터데이터베이스(DB: Database)의 테이블과 컬럼, 파일, text, xml, csv네트워크물리적인..
  • 구조 분해 할당
    프로그래밍 언어/NODE JS · 댓글
    구조 분해 할당을 사용하면 객체와 배열로부터 속성이나 요소를 쉽게 꺼낼 수 있습니다.var candy Machine = { status: { status: 'node', count: 5, }, getCandy: function () { this.status.count--; return this.status.count; },};var getCandy = candyMachine.getCandy;var count = candyMachine.status.count; 이 코드를 다음과 같이 바꿀 수 있습니다.const candyMachine = { status: { name: 'node', count: 5, }, getCandy() { this.status.count--; return ..
  • 영화 앱 전체 모습 수정하기
    카테고리 없음 · 댓글 1
    App.css 내용 모두 지우기 노마드 코더 영화 API에서 장르 키 살펴보기 Movie 컴포넌트에 genres props 넘겨주기Movie 컴포넌트 인자에 genres을 추가하고, Moive.propTypes에는 genres props가 문자열 배열 arrayOf(PropTypes.string)이며 반드시 필요함(isRequired)을 추가합시다.import React from "react";import PropTypes from "prop-types";import "./Movie.css";const Movie = ({ title, year, summary, poster, genres }) => { return ( {title} {year} ..

클래스

다른 언어처럼 클래스 기반으로 동작하는 것이 아니라 여전히 프로토타입 기반으로 동작합니다. 프로토타입 기반 문법을 보기 위해 클래스로 바꾼 것이라고 이해하면 됩니다. 다음은 프로토타입 상속 예제 코드입니다.var Human = function(type) { this.type = type || 'human';};Human.isHuman = function(human) { return human instanceof Human;}Human.prototype.breathe = function() { alert('h-a-a-a-m');}var Zero = function(type, fistName, lastName) { Human.apply(this, arguments); this.firstName = fistN..

영화 앱 멋지게 스타일링하기

App.css 파일 수정하기@font-face { font-family: "Ownglyph_wiseelist-Rg"; src: url("https://fastly.jsdelivr.net/gh/projectnoonnu/2501-1@1.1/Ownglyph_wiseelist-Rg.woff2") format("woff2"); font-weight: normal; font-style: normal;}* { box-sizing: border-box;}body { margin: 0; padding: 0; font-family: "Ownglyph_wiseelist-Rg"; background-color: #eff3f7; height: 100%;} Movie.css 파일 수정하기   .movies..

업캐스팅과 instanceof 연산자

캐스팅(casting)이란 타입 변환을 말합니다. 클래스에 대한 캐스팅은 업캐스팅(upcasting)과 다운캐스팅(downcasting)으로 나뉩니다. 업캐스팅서브 클래스는 슈퍼 클래스의 속성을 상속받기 때문에, 서브 클래스의 객체는 슈퍼 클래스의 멤버를 모두 가집니다. 그러므로 서브 클래스의 객체를 슈퍼 클래스의 객체로 취급할 수 있습니다.서브 클래스의 객체에 대한 레퍼런스를 슈퍼 클래스 타입을 변환하는 것을 업캐스팅(upcasting)이라고 합니다.업캐스팅은 슈퍼 클래스의 레퍼런스로 서브 클래스의 객체를 가리키게 합니다.Person p;Student s = new Student();p = s; // 업캐스팅 이 코드에서, 슈퍼 클래스 타입의 레퍼런스 p가 서브 클래스 객체(s)를 가리키도록 치환되는 ..

연계 데이터 & 연계 메커니즘 구현

연계 데이터 구성통합 구현단위 기능을 하는 모듈 간에 연게와 통합 연계 시스템 구성 요소별 수행 역할 및 기능구성 요소수행 역활 및 기능송신 시스템과 모듈송신모듈-전송하고자 하는 데이터를 생성하여 필요에 따라 변환 후 송신모니터링-데이터 생성 및 송신 상태를 모니터링통계 시스템외부 시스템 간의 연계, 인터넷망(Internet)과 인트라넷망(Intranet)을 연결중계 모듈-송신된 데이터의 오류 처리, 수신 시스템의 데이터 형식으로 변환수신 시스템과 모듈수신모듈-수신 받은 데이터를 정제(Cleansing)하고, 응용 애플리케이션이나 데이터베이스의 테이블에 적합하도록 변환하여 반영연계 데이터송수신되는 데이터데이터베이스(DB: Database)의 테이블과 컬럼, 파일, text, xml, csv네트워크물리적인..

구조 분해 할당

구조 분해 할당을 사용하면 객체와 배열로부터 속성이나 요소를 쉽게 꺼낼 수 있습니다.var candy Machine = { status: { status: 'node', count: 5, }, getCandy: function () { this.status.count--; return this.status.count; },};var getCandy = candyMachine.getCandy;var count = candyMachine.status.count; 이 코드를 다음과 같이 바꿀 수 있습니다.const candyMachine = { status: { name: 'node', count: 5, }, getCandy() { this.status.count--; return ..

영화 앱 전체 모습 수정하기

App.css 내용 모두 지우기 노마드 코더 영화 API에서 장르 키 살펴보기 Movie 컴포넌트에 genres props 넘겨주기Movie 컴포넌트 인자에 genres을 추가하고, Moive.propTypes에는 genres props가 문자열 배열 arrayOf(PropTypes.string)이며 반드시 필요함(isRequired)을 추가합시다.import React from "react";import PropTypes from "prop-types";import "./Movie.css";const Movie = ({ title, year, summary, poster, genres }) => { return ( {title} {year} ..