1. 네이버에서 제공하는 지도를 사용하기 위해서는 네이버 개발자 센터에서 키를 발급받아야한다.(http://developer.naver.com) 들어가서 키 발급/관리 메뉴에서 지도 api키를 발급한다. 테스트할 서버의 url이나 로컬url(포트포함)을 써주고 키발급을 하면된다. 2. 지도를 보기 위해서 기본 골격을 jsp페이지에 넣어준다.(여러가지 기능을 테스트 해보고 싶으면 네이버 개발자 api참고) - 자바스크립트코드 Colored By Color Scripter™ 1 Colored By Color Scripter™ 1 2 3 4 5 6 7 8 9 10 window.onload = function(){ new nhn.api.map.Map('map',{ point : mapPoint, zoom:10,..
책을 따라가며 3일동안 고생하며 MySQL을 설치하고 윈도우환경 MySQL클라이언트에서 리눅스의 MySQL서버에 접속하기를 해보았습니다. 책에 의존하다 보니 다 되는 것은 아니라서 여기저기 검색을 활용하기도 했습니다. 1. 먼저 리눅스에서 MySQL을 다운받아서 설치해야 합니다. http://www.mysql.com 두가지를 다운 받습니다.(mysql community server) MySQL-serverXXXXX.glibcXX.i386.rpm MySQL-clientXXXXX.glibcXX.i386.rpm 터미널에 접속해서 ]# yum -y install perl-DBI 명령어를 쳐줍니다.(mysql관련 패키지라고 적혀있음) 관련 패키지 설치가 끝났으면 다운받은 MySQL을 설치해줍니다. 강제로... ]..
openSSH를 사용하면 원격으로 리눅스터미널에 접근하여 리눅스를 관리 할 수있다. 리눅스를 관리할 수 있는 것으로 텔넷도 있지만 텔넷은 로그인시 계정정보가 암호화가 되지 않기 때문에 해킹의 위험이 있다고 한다. openSSH를 사용하면 로그인시 계정정보가 암호화된다고 한다. 그러니 openSSH사용 -_- 시범환경은 vmware에 레드헷리눅스다. 리눅스 상에서 openSSH가 서비스되고 있는지 확인해본다 터미널을 열고 (root 사용자로 접근해야한다.) rpm -qa openssh-server (openSSH가 설치되어 있는지 확인) service sshd status (현재 openSSH가 실행되고 있는지 확인) 현재 실행되고 있지 않다면 service sshd start 입력 - 레드헷은 기본적으로..
구글차트로 방문자수를 일주일 단위로 집계하려고 하다 보니 매주 월요일 0시가 되면 방문자수가 카운트되는 DB가 초기화가 되게 해야되서 스케쥴러를 찾다가 쿼츠 스케쥴러를 찾았다. (사실 스프링에 @scheduled 라는 스케쥴러를 지원하는 어노테이션이 있지만 나중에야 알았다....-_-) 1. Maven에 의존 라이브러리 주입(pom.xml) 그룹아이디 : org.quartz-scheduler 아티팩트아이디 : quartz 2. QuartzJobBean추상클래스를 상속받아 executeInternal()메서드를 오버라이딩 하는 클래스를 작성한다. 이 메서드에 스케쥴러가 돌아가는 시점에 수행 할 코드(작업)를 정의한다. BoardService라는 객체는 sql을 수행하는 dao단을 호출하는 비즈니스 로직 클..
배열은 같은 타입의 변수 여러개를 정의할 수 있는 자료구조이다. ○ 배열 선언 방법 int num[ ] = {1,2,3,4,5}; //컴파일러에 의해 길이정보가 채워진다. int num[5] = {1,2,3,4,5}; int num[5] = {1,2}; //배열에 채울 값이 없으면 0으로 채워진다. ○ 배열의 접근- 배열의 시작 index는 0부터이다. int num[3] = {1,2,3}; 일때 num[0] 은 1이고,num[1] 은 2이고,num[2] 은 3이다. □ 배열을 이용한 문자열 표현 문자열 배열 선언char str1[6] = "choon";char str2[] = "choon"; 위 두 문자열의 길이는 6이다. choon이라서 문자열 길이가 5가 되어야 하겠지만, C언어에서 표현하는 모든 ..
○ 상수 상수는 변경이 불가능한 값이다 int no = 30;30이라는 값 자체를 이름없는 상수 혹은 리터럴이라고 한다.30이라는값 자체도 상수로써 메모리 공간에 할당된다.(하지만 변수 no과는 다르게 메모리상에 할당된 이름은 없다.) 상수도 변수로써 표현 가능(const 키워드) const int NO = 30;자료형의 앞에 const키워드를 붙이면 상수형 변수가 된다.(값이 한번 정해지면 변경할 수 없는 변수) const int NO;NO = 100; //불가함 위의 표현은 불가능 하다. 컴파일 하게되면 NO이라는 상수형 변수는 컴파일러에 의해 쓰레기 값으로 초기화가 되고, 그 자체로 값의 변경이 불가능해지기 때문이다. ○ 형변환 - 형변환이라는 것은 자료형의 변환을 뜻 한다.- 형변환은 자동 형 변..
서식문자 내용 문자 관련 %c char형 표현 %s char[]형 표현 정수 관련 %hd short형 표현 %d int형 표현 %ld long형 표현 %lld long long형 데이터 표현 %u 부호없는 10진 정수 표현 %o 해당 데이터 값을 8진 정수로 표현 %x 해당 데이터의 값을 16진 정수로 표현 실수 관련 %f float형의 경우 입력(scanf)할 때화 출력(printf)할 때 모두 쓰이지만, double형의 경우 출력시에만 사용 %lf double형 및 long double 형의 입력(scanf)를 담당함 포인터 관련 %p 주소값의 출력(scanf)에 사용
리눅스의 명령어 정리 * pwd : 현재 사용자가 위치한 디렉토리 확인 * cd : 디렉토리 이동예)cd folders : folders 디렉토리로 이동cd ~ : 루트 디렉토리로 이동cd .. : 이전 디렉토리로 이동 * cp : 파일이나 디렉토리 복사예)cp new.txt new2.txt : new.txt 파일을 new2.txt에 복사 파일이 없어도 생성됨.cp -r folders1 folders2 : 디렉토리 복사 * mv : 파일이나 디렉토리의 이름을 변경하거나 이동예)mv folder1 folder2 folder3 : folder1과 folder2디렉토리를 folder3디렉토리로 이동시킨다.mv new.txt new1.txt : new1.txt파일의 이름을 new2.txt파일이름으로 변경한다. ..
contentType이란 프로퍼티를 명시하여야 한다.
http://download.eclipse.org/technology/subversive/0.7/update-site/ 위 주소를 이클립스에서(위 주소는 indigo 릴리즈 2 버전에서 시험 한 것.) help - install new software - work with에 추가한다. 그럼 설치 창이 뜨게 되고 설치하고 리스타트 후에 창이 뜨게 되는데 거기서 svn kit 버전 아무거나 하나만 선택하고 finish를 누른다.
열거형이란 의미상 관련이 있는 상수값들의 집합을 의미한다. 어떤 클래스에 상수로 정의된 변수가 있다고 했을 때, 그 상수의 변경으로 인해서 상수를 참조하는 다른 특정 클래스들도 모두 컴파일을 해야 적용이 되었는데, 상수 대신 열거형을 사용하면 컴파일 하지 않아도 된다. 열거형을 정의 하는 방법은 간단하다. enum 열거형이름 { 열거형상수명1, 열거형상수명2, ....... } enum Military { ARMY, NAVY, AIRFORCE } 열거형의 상수에 접근하는 방법은 간단하다. 마치 클래스의 static멤버의 접근방법과 같은 방법을 취한다.열거형이름.상수명Military.ARMY 모든 열거형은 java.lang.Enum클래스를 조상으로 한다.이 Enum클래스에는 몇가지 메서드가 정의되어 있다...
HashSet은 - Set인터페이스가 구현하고 있는 대표적인 클래스 - 데이터의 저장순서를 유지하지 않고, 데이터 중복을 허용하지 않는다. Colored By Color Scripter™ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 import java.util.*; public class HashSetEx1 { public static void main(String[] args){ HashSet set = new HashSet(); Object[] obj = {"1",new Integer(1),5,8,2,4,10,2,"4","6","8","10"}; for(int i =0; i