자바_한글_api[1].part01.exe


자바_한글_api[1].part02.rar


자바_한글_api[1].part03.rar


세개 압축파일 풀고, 자바 프로젝트 생성 후에 시스템라이브러리보면

rt.jar라고 있음.


rt.jar에서 Property누르고 Javadoc Location에다 압축푼 디렉터리 경로지정하면됨


가끔 Javadoc location 메뉴 위에 Java Source Attachment 라는 메뉴에


External Location 으로 경로가 잡혀있는 경우  Javadoc Location에 경로를 잡아줘도 


안되는 경우가 있다.

블로그 이미지

왕왕왕왕

,

public class Robot {


public static void main(String[] args) {

// TODO 자동 생성된 메소드 스텁

PointerInfo pointerinfo;

String tmp = null;

while (true) {

pointerinfo = MouseInfo.getPointerInfo();

if (pointerinfo.getLocation().toString().equals(tmp) == false) {

tmp = pointerinfo.getLocation().toString();

System.out.println(pointerinfo.getLocation().toString());

}

}


}


}


마우스가 움직일때만 위치 출력해주는 간단한 소스

'JAVA > 자바' 카테고리의 다른 글

자바로 윈도우프로그램실행  (0) 2015.06.24
자바 한글 API Doc문서  (0) 2015.06.22
자바 한글인코딩  (0) 2015.06.11
자바 리스트 중복제거하는법 contains  (0) 2015.05.28
jsoup 서원대학교 연혁페이지 파싱  (0) 2015.05.08
블로그 이미지

왕왕왕왕

,

잡메모

2015. 6. 17. 19:22

HaloBelt- LED 형식의 벨트 나중에 살것


'' 카테고리의 다른 글

windbg 링크  (0) 2016.03.19
서로 잘어울리는 색상  (0) 2015.11.07
개같은 오류증상들 or 팁  (0) 2015.06.11
sds  (0) 2014.12.09
노트북 유선랜으로 핫스팟만들기  (0) 2014.12.06
블로그 이미지

왕왕왕왕

,

자바

오류

1.Nullpoint 머시기들은 대부분 초기화안된경우 메모리오류로보임. 어딘가 안된 초기화부터 찾아봐라

2.ArrayIndexof 머시기들은 배열 차원수를 빼먹거나 암튼 배열 사이즈문제가 대부분이였다.

3.표준입력할때 next()와 nextLine()사용을 주의해라. 출력하다가 한놈 건너뛰고 이상해질때가있음.

1. 1,2,3이라는 클래스가있을때, 2클래스가 1클래스를 생성하고있다고하면, 3클래스에서 1클래스를 쓰고싶은데 어떤이유에서 

그렇게 하기 어렵다면 2클래스에서 메소드생성해서 그안에 1클래스에서쓸메소드를 그냥 호출해라. 그리고 그메소드를 3클래스에서 호출하면 뭐 그냥 이상한 꼼수



JSP

오류

1. 디비 드라이버를 찾을수 없다고나올때(WEB-INF/lib/에다 jar파일 복붙으로해결)

1.get방식으로 넘겼을때 인코딩이깨질수도 post로 해결


MYSQL
오류
1. Data source rejected establishment of connection,  message from server: "Too many connections" 
데이터 소스 연결을 거부 설립 , 서버에서 메시지 : " 너무 많은 연결 "
Mysql server restart로 해결



'' 카테고리의 다른 글

서로 잘어울리는 색상  (0) 2015.11.07
잡메모  (0) 2015.06.17
sds  (0) 2014.12.09
노트북 유선랜으로 핫스팟만들기  (0) 2014.12.06
PowerMockup!!  (0) 2014.10.09
블로그 이미지

왕왕왕왕

,

자바 한글인코딩

JAVA/자바 2015. 6. 11. 20:07

String word = "무궁화 꽃이 피었습니다.";
System.out.println("utf-8 -> euc-kr        : " + new String(word.getBytes("utf-8"), "euc-kr"));
System.out.println("utf-8 -> ksc5601       : " + new String(word.getBytes("utf-8"), "ksc5601"));
System.out.println("utf-8 -> x-windows-949 : " + new String(word.getBytes("utf-8"), "x-windows-949"));
System.out.println("utf-8 -> iso-8859-1    : " + new String(word.getBytes("utf-8"), "iso-8859-1"));

System.out.println("iso-8859-1 -> euc-kr        : " + new String(word.getBytes("iso-8859-1"), "euc-kr"));
System.out.println("iso-8859-1 -> ksc5601       : " + new String(word.getBytes("iso-8859-1"), "ksc5601"));
System.out.println("iso-8859-1 -> x-windows-949 : " + new String(word.getBytes("iso-8859-1"), "x-windows-949"));
System.out.println("iso-8859-1 -> utf-8         : " + new String(word.getBytes("iso-8859-1"), "utf-8"));

System.out.println("euc-kr -> utf-8         : " + new String(word.getBytes("euc-kr"), "utf-8"));
System.out.println("euc-kr -> ksc5601       : " + new String(word.getBytes("euc-kr"), "ksc5601"));
System.out.println("euc-kr -> x-windows-949 : " + new String(word.getBytes("euc-kr"), "x-windows-949"));
System.out.println("euc-kr -> iso-8859-1    : " + new String(word.getBytes("euc-kr"), "iso-8859-1"));

System.out.println("ksc5601 -> euc-kr        : " + new String(word.getBytes("ksc5601"), "euc-kr"));
System.out.println("ksc5601 -> utf-8         : " + new String(word.getBytes("ksc5601"), "utf-8"));
System.out.println("ksc5601 -> x-windows-949 : " + new String(word.getBytes("ksc5601"), "x-windows-949"));
System.out.println("ksc5601 -> iso-8859-1    : " + new String(word.getBytes("ksc5601"), "iso-8859-1"));

System.out.println("x-windows-949 -> euc-kr     : " + new String(word.getBytes("x-windows-949"), "euc-kr"));
System.out.println("x-windows-949 -> utf-8      : " + new String(word.getBytes("x-windows-949"), "utf-8"));
System.out.println("x-windows-949 -> ksc5601    : " + new String(word.getBytes("x-windows-949"), "ksc5601"));
System.out.println("x-windows-949 -> iso-8859-1 : " + new String(word.getBytes("x-windows-949"), "iso-8859-1"));

 

블로그 이미지

왕왕왕왕

,

select [destinct] 테이블명 {, 테이블명} * from  필드명 {. 필드명} * [where 검색조건] [order by 필드명 [asc or desc] {, 필드명 [asc or desc]} *] [group by 필드명 {, 필드명} *] [having  검색조건] ; 

1. 일반적 검색 
mysql>  select name, id  from uncle where level='a' ; 
=> uncle 테이블에 level이 a인 데이터의 name, id을 보여준다. 

mysql>  select * from uncle; 
=> uncle 테이블에 있는 모든 데이터를 보여준다. 

2. 결과 레코드의 중복 제거 
mysql>  select distinct level from uncle; 
=> uncle 데이블에 level의 종류가 몇개인지 알수가 있다. 

3. 조건검색 
mysql>  select name, id from uncle where age > 20 and level = 'a'; 
=> uncle 데이블에 age가 20보다 크고 level 이 a인 name, id을 보여준다. 
(검색조건을 표시하는 where절에는 비교연산자 > , >=, <, <=, = 와 논리연산자 and, or, not 을 사용할수 있다. 

4. 검색 결과의 정렬 
mysql>  select name, id from uncle where age > 20 order by level desc; 
=> uncle 데이블에 age가 20보다  큰 name, id을 level 내림차순으로 보여준다. 
(asc 는 오름차순, desc는 내림차순 asc나 desc가 없이 order by만 쓴다면 기본값 asc로 설정된다.) 

5. 검색 결과에 대한 산술 계산 및 문자열 처리 
mysql>  select name, '님의 아이디는', id, '입니다.'  from uncle where age > 20 order by level ; 
=> uncle 데이블에 age가 20보다  큰 name, id을 level 오림차순으로 보여준다. 
결과는 ' name 님의 아이디는 id 입니다. ' 이렇게 보인다. 

mysql>  select name, age+5  from uncle where id = 'uncle' ; 
=> uncle 데이블에 id가 uncle 인 레코드의 name, 원래 age보다 +5 해서 결과를 보여준다. 

6. 그룹함수(group function)를 이용한 검색 
mysql>  select count(*)  from uncle where level = 'a' ; 
=> uncle 데이블에 level 이 a을 만족하는 레코드 결과를 보여준다. 
* count(필드명) : 조건을 만족하는 레코드의 개수 
* sum(필드명)  : 해당 필드의 합 
* min(필드명)    : 해당 필드의 최대값 
* max(필드명)  : 해당 필드의 최소값 
* avg(필드명)    : 해당 필드의 평균값 

7. group by를 이용한 검색 
mysql>  select level max(age), min(age), avg(age) from uncle group by level ; 
=> uncle 데이블에 level 과 최대 age값, 최소 age값, 평균 age 값을 level 별로 결과를 보여준다. 

8. having을 이용한 검색 
mysql>  select level max(age), min(age), avg(age) from uncle group by level having level = 'a' ; 
=> uncle 데이블에 level 과 최대 age값, 최소 age값, 평균 age 값을 level a의 결과만 보여준다. 
(having문은 group by에서 지정한 필드에 대한 검색 조건문이다.) 

9. between  연산자를 이용한 검색 
mysql>  select name, id from uncle where level = 'a' and age between 20 and 25 ; 
=> uncle 데이블에 age가 20 ~ 25 이고 level 이 a 인 레코드의 name, id 을 보여준다. 
* mysql>  select name, id from uncle where level = 'a' and age >= 20 and  age <=25 ; 와 같다. 

mysql>  select name, id from uncle where level in ('a', 'b') ; 
=> uncle 데이블에 level이 a, b 인 name, id을 보여준다. 

mysql>  select name, id from uncle where level not in ('a', 'b') ; 
=> uncle 데이블에 level이 a, b 을 제외한 name, id을 보여준다. 

10. like을 이용한 검색 
mysql>  select name, id from uncle where name like '%용%' ; 
=> uncle 데이블에 name에 '용' 포함되어 있는 name, id을 보여준다. 
('%용' 이면 용으로 끝나는 레코드를 '용%'이면 용으로 시작하는 레코드를 보여준다.) 

11. null 값을 이용한 검색 
mysql>  select name, id from uncle where level is null ; 
=> uncle 데이블에 level 값이 null 인 name, id을 보여준다.

블로그 이미지

왕왕왕왕

,

for (String str : overlist) {

if (!urllist.contains(str)) {

urllist.add(str);

}

}


짜잘짜잘

'JAVA > 자바' 카테고리의 다른 글

자바 마우스커서 움직이면 위치파악  (0) 2015.06.22
자바 한글인코딩  (0) 2015.06.11
jsoup 서원대학교 연혁페이지 파싱  (0) 2015.05.08
자바 URL주소로 이미지 저장  (0) 2015.05.08
자바 쓰레드 Runnable  (0) 2015.03.19
블로그 이미지

왕왕왕왕

,

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    android:paddingBottom="@dimen/activity_vertical_margin"

    android:paddingLeft="@dimen/activity_horizontal_margin"

    android:paddingRight="@dimen/activity_horizontal_margin"

    android:paddingTop="@dimen/activity_vertical_margin"

    android:orientation="vertical"

    tools:context=".MainActivity" >

 

    <EditText

        android:id="@+id/address"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:hint="Address" />

    <EditText

        android:id="@+id/port"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:hint="Port" />

    <Button

        android:id="@+id/connect"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:text="Connect..."/>

    <Button

        android:id="@+id/clear"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:text="Clear"/>

    <TextView

        android:id="@+id/response"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"/>

 

</LinearLayout>

블로그 이미지

왕왕왕왕

,