전체 글 107

jQuery validate 사용 시 input name이 같은 경우 해결 방법

jQuery validate 사용 시 input name이 같은 경우 해결 방법 ( 2개 이상 시 ) $('#formName').validate({ // 유효성체크 성공 후 서브밋 이벤트 발생 시 // 바꾼이름을 다시 돌려놓습니다. submitHandler: function(form) { $('#formName').find('input[alt="imgFile"]').each(function(index) { $(this).attr('name', $(this).attr('alt')); $(this).removeAttr('alt'); }); form.submit(); }, rules: { title: { required: true, maxlength: 150 } }, messages: { title: { re..

jquery 2021.12.23

[Eclipse] 이클립스 단축키

◈ Java Editor 단축키 Ctrl + Shift + M : 특정 클래스 Import 시키기 Ctrl + Shift + O : 자동으로 Import 시키기 Ctrl + L : 특정 줄 번호로 가기 Ctrl + 마우스커서(혹은 F3) : 클래스나 메소드 혹은 멤버를 상세 검색 ALT + Left , ALT + Right : 이전, 이후 작업 화면 Ctrl + Shift + G : 특정 메소드나 필드를 Reference하고 있는 곳을 검색 Ctrl + , or : 다음 annotation(에러, 워닝, 북마크 가능)으로 점프 Ctrl + T : hierarchy 팝업 창 띄우기(인터페이스 구현 클래스간 이동 시 편리) F4 : hierachy view 퍼스펙티브 생성 Ctrl + O : 메소드나 필드 ..

Eclipse 2021.12.21

[JAVA] 연산자

1. 연산자 1) 연산자의 우선순위 단항 연산자 : : (1) * / % (2) + - (3) > >>> 비교 연산자 : -> : (1) = instanceof (2) == != 논리 연산자 : -> : (1) & (2) ^ (3) | (4) && (5) || 삼항 연산자 : -> : ?: 대입 연산자 : >>= &= ^= |= 2) ex -x + 3 : x를 먼저 부호를 -로 바뀐 뒤 3과 +연산을 한다. x + 3 * y : 3과 y를 *연산한 후 x와 +연산 한다. x 3 && x 연산하고 x와 5를 3 && x 논리 > 대입 순의 우선순위가 되겠으며, 단항 > 이항 ..

JAVA 2021.12.21

[JAVA] Scanner 클래스

/* * Scanner 클래스 * 예외처리를 명시하지 않아도 가능 */ package com.test0520; import java.util.Scanner; public class Test2 { public static void main(String[] args) { String name; int kor, eng; Scanner sc = new Scanner(System.in); /* System.out.println("이름 ? "); name = sc.next(); System.out.println("국어? "); kor = sc.nextInt(); System.out.println("영어? "); eng = sc.nextInt(); */ /* //스캐너 기본 공백구분 System.out.print("..

JAVA 2021.12.20

[JAVA] DATE 클래스 살아온날수

import java.util.Date; import java.text.SimpleDateFormat; public class DateTest{ /* SimpleDateFormat : DateFormat을 상속 받은 클래스 -문자열 -> Date 문자열을 Date형식으로 -Date -> 문자열 Date형식을 문자열으로. */ public static void main(String[] args){ Date date1 = new Date(); System.out.println(date1); //현재시간을 1970.1.1 0:0:0초를 기준으로 밀리초 long lo = date1.getTime(); System.out.println(lo); SimpleDateFormat sdf = new SimpleDateF..

JAVA 2021.12.19