정규식 파일명 구하기 테스트 파일명 제목_곡명.mp4 (대소문자 무시) 1var reg_exp = /^([ㄱ-ㅎ가-힣0-9a-zA-Z.@#$%^&-= '!()\[\]{}])+_([ㄱ-ㅎ가-힣0-9a-zA-Z.@#$%^&-= '!()\[\]{}])+\.(mp4|avi)$/g; Eclipse/Example 7년 전
예제- 달력(일수/윤년/평년) public static void main(String[] args) { int year = 2018;int month = 1;int days_of_month=0;month =2;switch (month) {case 1: case 3: case 5: case 7: case 8: case 10: case 12:days_of_month = 31;break;case 4: case 6: case 9: case 11:days_of_month = 30;break;case 2:if ((year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0))days_of_month = 29;elsedays_of_month = 28;break;}System.out.println(days_o.. Eclipse/Example 7년 전
Indent Guide (들여쓰기 가이드) 추가 하기 1) Indent Guide (들여쓰기 가이드) 추가 하기 2) Indent Guide - http://kiritsuku.github.io/IndentGuide/update/ 링크와 이름 입력(그림 주소가 변경되었습니다) 3) Indent Guide 선택 4) 최종 Finish 까지 진행 5) eclipse 재시작 6) eclipse 종료 후Eclipse 프로그램을 종료 하고 아래 첨부파일을 .metadata/.plugins/org.eclipse.core.runtime/.settings 경로에 복사한 후 Eclipse를 실행 하세요 위 와 같이 선행을 하지 않으면 그리드가 표기 되지 않습니다.(버그로 생각 됩니다)Eclipse 실행후 환경 설정을 보면 아래와 같이 설정되어 있습니다.이상태로 쓰셔도 되지만.. Eclipse 7년 전
연습 - 년도(윤년/평년) 구하기 year = 2018; String leaf_msg = "미정"; // 년도 가 4의 배수 이고 년도가 100의 배수가 아니거나 년도가 400배수인 경우 if ((year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0)) leaf_msg = "윤년"; else leaf_msg = "평년"; System.out.println(leaf_msg); // 윤년 함수 GregorianCalendar gregori = new GregorianCalendar(); if (gregori.isLeapYear(year)) System.out.println("윤년입니다."); else System.out.println("평년입니다."); Eclipse/Example 7년 전
연습-미성년 오후10시이전까지 import java.util.Calendar; public class PcBang { public static void main(String[] args) { // 임시 데이터 18세int age = 18;int nowHour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);// 미성년자 구분boolean unage = age < 19;System.out.println("미성년:" + unage);// 미성년자 22시 미만boolean hourCheck = nowHour < 22;System.out.println("10시이전:" + hourCheck ); // 미성년/성년/이용 가능시간 검사boolean pcBang = unage ? hourCheck : un.. Eclipse/Example 7년 전
연습-퍼센트 전체값에서 일부값은 몇 퍼센트? 계산법 공식일부값 / 전체값 * 100 예제) 300에서 105는 몇퍼센트?답: 35% 전체값의 몇 퍼센트는 얼마? 계산법 공식전체값 * 퍼센트 / 100 예제) 300의 35퍼센트는 얼마?답) 105 숫자를 몇 퍼센트 증가시키는 공식숫자 * (1 + 퍼센트 ÷ 100) 예제) 1548을 66퍼센트 증가하면?답) 2569.68 숫자를 몇 퍼센트 감소하는 공식숫자 * (1 - 퍼센트 / 100) 예제) 1548을 66퍼센트 감소하면?답) 526.32 Eclipse/Example 7년 전