목록
'전체 글' 732건
코드로 놀고, 언어로 성장하는 공방.
-
FormDataHTML form 태그의 데이터를 동적으로 제어할 수 있는 기능입니다. 주로 AJAX와 함께 사용됩니다.먼저 FormData 생성자로 formData 객체를 만듭니다.const formData = new FormData();formData.append('name', 'zzangchae');formData.append('item', 'purple');formData.append('item', 'orange');formData.has('item'); // trueformData.has('money'); // falseformData.get('item'); // purpleformData.getAll('item'); // ['purple', 'orange']';formData.append('test', ['h..
-
C Programming포인터 Example 1#include int main(){ int var = 5; printf("var : %d\n", var); printf("var 주소: %p", &var); return 0;} 실행 결과var : 5 var 주소: 000000E56A0FFD24 포인터 Example 2#include int main(){ int* pc, c; c = 5; pc = &c; printf("%d", *pc);} 실행 결과5 포인터 Example 3#include int main(){ int* pc, c; c = 5; pc = &c; c = 1; printf("%d", c); printf("%d", *pc);} 실행 결과11 포인터 Example 5#include int main(){ in..
-
영화 상세 정보 기능 만들어 보기route props란 라우팅 대상이 되는 컴포넌트에 넘겨주는 기본 props를 말합니다. 다시 말하자면 우리가 직접 넘겨주지 않아도 기본으로 넘어가는 route props라는 것이 있습니다. route props 살펴보기우선 console.log()를 통해 About으로 어떤 props가 넘어오는지 살펴봅시다.import React from "react";import "./About.css";function About(props) { console.log(props); return ( "Freedom is th freedom to say that two plus two make four. If that is granted, all else follows."..
-
Java Programming 3상속 Emample 1class Dog { protected String species = "푸들"; public void dark() { System.out.println("왈왈!"); }}public class MyDog extends Dog{ private String myDogName = "흑설탕"; public static void main(String[] args) { MyDog she = new MyDog(); she.dark(); System.out.println(she.species + " " + she.myDogName); }} 실행 결과왈왈! 푸들 흑설탕 상속 Example 2class Calcul..
-
패키지(Package)디렉토리를 자바에서는 패키지(Package)라고 부르고, 파일의 경로명은 다음과 같이 점(.)을 찍어 표현합니다.Project.fileIO.Tools.classProject,UI.Tools.class 자바의 모듈과 패키지 클래스 경로명자바에서 패키지(package)란 서로 관련 있는 클래스나 인터페이스의 컴파일된 클래스(.class) 파일들을 한 곳에 뮦어 놓은 것입니다. 그러므로 패키지는 디렉터리와 연관되는데, 하나의 패키지는 관련된 클래스 파일 파일들이 들어 있는 디렉터리로 보면 됩니다.자바 JDK는 개발자들에게 많은 클래스들을 패키지 형태로 제공하는데, JDK9 부터는 패키지들을 모듈(module)이라는 단위를 묶어, 100개에 가까운 모듈을 제공합니다. 모듈은 JDK 설치 디렉터리 밑의 jmods..
-
Java Programing 2public class BungeoBBangTI { int x = 10; public static void main(String[] args) { BungeoBBangTI Bungeo1 = new BungeoBBangTI(); System.out.println(Bungeo1.x); }} 실행 결과10 public class BungeoBBangTI { int x = 10; public static void main(String[] args) { BungeoBBangTI Bungeo1 = new BungeoBBangTI(); Bungeo1.x = 30; System.out.println(Bungeo1.x); }}..