카테고리 없음

221209

Berylly 2022. 12. 9. 18:19

T. 김동식

 

 

if

https://sanghee.tistory.com/39

 

221207

T. 김동식 + 서치보완 ++ 와 -- ++a; a에게 +1하라 b--; b가 다음에나오면 -1하라 비트연산자 (0, 1), 2진수 &(엔터샌드 AND) |(파이프 OR) ^(캐럿 XOR) ~(틸데 NOT) A> B: A를 B만큼 옮기겠다 if와 else if if(score >= 90)

sanghee.tistory.com

 

 

switch

https://sanghee.tistory.com/41/#beryl_switch

 

221208

T. 김동식 ctrl shift F: 들여쓰기 단축키 if, switch, for, while, do while if https://sanghee.tistory.com/39 221207 T. 김동식 + 서치보완 ++ 와 -- ++a; a에게 +1하라 b--; b가 다음에나오면 -1하라 비트연산자 (0, 1), 2진수 &(

sanghee.tistory.com

 

 

for

https://sanghee.tistory.com/41/#beryl_forEx

 

221208

T. 김동식 ctrl shift F: 들여쓰기 단축키 if, switch, for, while, do while if https://sanghee.tistory.com/39 switch if문과 switch는 비슷하나, 범위는 if문, 값은 switch문이 좋다. switch-case문: 키오스크를 생각하자 int menu

sanghee.tistory.com

for(int y=0;y<5;y++) { //세로
	System.out.println("■");
	for(int x=0;x<5;x++) {
		System.out.print("■");//가로
	}
	System.out.println();
}

for문은 사각형과 같다.

 

 

 

while

int total = 0;
int i2 = 0;
while(i2<=10) {
	total = total+i2;
	i2++;
}
System.out.println(total);

while로 for문과 똑같이 할 수 있다. 방법이 다를뿐..

 

while(true) {
	System.out.println("HI");
}

무한으로 돔

 

while(false) {
	System.out.println("HI");
}

실행되지않음

 

 

 

 

do while

int num = 1;
int sum = 0;

do{
	sum=sum+num;
	num++;
}while(num<=10);
System.out.println(sum);

우선 한번 실행시키고 실행결과에 따라서 반복실행을 시작할지 결정하는 경우 사용함.

 

 

 

 

continue

continue와 break는 반복문과 함께 사용된다

int num = 0;
	for(int i=0;i<=100;i++){
		if(i%2 == 0) {
			continue; //이 조건을 제하고 진행해라 = 홀수만 이용하라.
		}
		num = num+i;
	}
System.out.println("continue로 인해 홀수의 합 "+num+"이 출력됩니다.");

이 조건을 제하고 진행해라

 

 

 

break

continue와 break는 반복문과 함께 사용된다

int sum = 0;
int i;
for(i=0;;i++) { // ;; 비워놓으면 무조건 true
	sum=sum+i;
	if(sum>=100) {
		break;
	}
}
System.out.println(i);
System.out.println(sum);

이제 그만, 출력해라.

 

 

 

홀수

for(int j=1;j<=10;j++) {
	if(j%2 == 0) {
	}else if(j%2 != 0) {
		System.out.print(j);
	}
}

단순히 생각하라, 2를 나누어 떨어지지 않으면 홀수

 

 

 

짝수

for(int i=1;i<=10;i++){
	if(i%2 ==0) {
	}else if(i%2 !=0) {
		System.out.print(i);
	}
}

단순히 생각하라, 2를 나누어 떨어지면 짝수

 

 

 

 

html 모던웹을 위한 HTML5+CSS3 바이블_Part1_CHAPTER 01~04

기존 프론트였던 경험을 바탕으로, 복습개념으로 적어놓기만 한다.

hover: 공중을 맴돌다
ruby: 루비 문자 선언 태그
rt: 위에 위치하는 작은 문자 태그
rp: ruby 태그를 지원할 경우 출력되지 않는 태그

dl: 정의 목록
dt: 정의 용어 태그
dd: 정의 설명 태그

preload: 음악을 재생하기 전에 모두 불러올지 지정
poster: 비디오 준비 중일 때의 이미지 파일 경로
preload: 비디오를 재생하기 전에 모두 불러올지 결정

form action="데이터를 전달받을 url"
form method="get(저장, 보안의 취약점, 데이터 길이의 제한)"  or "post(저장되지 않음, 데이터 길이의 제한이 없음)"

input 태그의 type 속성값
button, checkbox, file, hidden, image, password, radio, reset, submit, text
color, date, datetime(날짜 선택 양식), datetime-local(지역 날짜 선택 양식), email, month, number, range, search, tel, time, url, week

textarea 속성: cols, rows

select
multiple="multiple": 여러개목록을 서낵하고 싶을때
optgroup: 옵션을 그룹화

fieldset: 입력양식 묶음
legend: 입력양식 title

CSS 선택자
input [type = text]
div [data-role ~ = row]
속성 안의 값이 특정 값을 단어로 포함하는 태그를 선택
div [data-role| = row]
속성 안의 값이 특정 값을 단어로 포함하는 태그를 선택
div [data-role^ = row]
속성 안의 값이 특정 값으로 시작하는 태그를 선택
div [data-role$ = 9]
속성 안의 값이 특정 값으로 끝나는 태그를 선택
div [data-role*= row]
속성 안의 값이 특정 값을 포함하는 태그를 선택
li:nth-child(2n+1)
li:nth-last-child(2n+1)
h1:first-of-type
형제 관계 중에서 첫 번째로 등장하는 특정 태그를 선택
h1:last-of-type
형제 관계 중에서 마지막으로 등장하는 특정 태그를 선택
h1:nth-of-type(2n+1)
형제 관계 중에서 앞에서 수열 번째로 등장하는 특정 태그를 선택
h1:nth-last-of-type(2n+1)
형제 관계 중에서 뒤에서 수열 번째로 등장하는 특정 태그를 선택
input:enabled
input:disabled
a:link
a:visited
p::first-letter
p::first-line
p::selection
사용자가 드래그한 글자를 선택함
li:not(.item)
아닌것, 반대로

p{counter-increment: rint;}
p::before{content: content(rint) ".";}
p::after{content:"-" attr(data-page) "page"}

<p data-page="53">lorem</p>

1 .lorem - 52page


$: ~로 끝날경우 (.test img[src$=png])
li:nth-child(2n): 짝수
li:nth-child(2n+1): 홀수

기준이 되는 값을 지정된 배수로 변환해 표현한 크기
rem: 최상위 태그의 font-size 값이 기준
em: 현재 요소의 font-size 값이 기준

#000000:  HEX 코드 단위
rgb(red, green, blue):  RGB 색상 단위
rgba(red, green, blue, alpha):  RGBA 색상 단위
hsl(hue, saturation, lightness):  HSL 색상 단위

background-attachment: scroll 
화면 스크롤에 따라 배경 이미지가 함께 이동

background-attachment: fixed
스크롤을 내려도 배경 이미지는 고정

position
static(위에서 아래로 순서대로 배치)
relative(초기 위치 상태)
absolute
fixed

벤더프리픽스
-ms-: 익스
-webkit-: 크롬, 사파리
-moz-: 파폭
-o-: 오페라