개발
-
php - join() 함수개발 2009. 8. 20. 00:35
join() 함수는 implode() 함수의 별칭으로 배열의 원소를 특정문자와 함께 결합하여 문자열을 반환한다. string implode ( string $glue , array $pieces ) 예를 들어보자. 그런데 다음과 같이 배열을 선언하는 경우 오류메세지를 보인다. 하지만 오류메세지도 같이 뿌려준다. Warning: join() [function.join]: Invalid arguments passed in /home/segio/cell000/html/segio/works/namecard/group_send.php on line 111 배열값을 print_r() 함수로 살펴보면 위의 배열과 아래의 배열은 동일한 값을 나타낸다. print_r($array) Array ( [0] => 'lastn..
-
JPanel 에 그라디언트 주기개발 2009. 8. 19. 12:47
public class GPanel extends JPanel { public void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2 = (Graphics2D)g; Point2D start = new Point2D.Float(getWidth()/2, 1); Point2D end = new Point2D.Float(getWidth(), getHeight()/2); System.out.println(start); System.out.println(end); GradientPaint gp = new GradientPaint(start, Color.RED, end, Color.BLUE, false); g2.setPaint(gp); g2...
-
동적인 자바스크립트를 만들자개발 2009. 8. 6. 19:04
노드 종류 노드의 종류는 모두 12가지가 있지만 그 중 많이 사용하는 것은 다음의 3가지이다. 요소노드 : 태그이름 속성노드 : 속성 텍스트노드 : 텍스트 개미놀다 예를들면 위의 문장에서 ’p’ 는 속성노드가 되고 ’베짱이’ 가 속성노드, ’개미놀다’ 가 텍스트 노드가 된다. 자 이제 시작해보자. ’p’ 태그를 선택하고 싶으면 어떻게 할까? getElementById(’아이디’) 메소드를 이용한다. (대소문자에 주의하자) var tmp = document.getElementById(’ani’); 또 다른 방법으로는 getElementsByTagName(’태그이름’) 을 이용할 수 있다. var tmp2 = document.getElementsByTagName(’p’); 위와 같이하면 영역안에 있는 모든 ..
-
오라클 컬럼 수정, 삭제, 추가개발 2009. 6. 3. 10:07
- 테이블명 변경 rename 변경전 테이블명 to 변경후 테이블 명; -> oracle 8i부터 지원 - 컬럼명변경 alter table [table name] rename column [column] to [new column]; -> oracle 9i부터 지원 - 컬럼수정 alter table [table name] modify ( [column] varchar2(20) ); - 컬럼추가 alter table [table name] add ( [column] number(10,2) default 1000 ); - 컬럼삭제 alter table [table name] drop ( [column] ); 출처 : http://blog.naver.com/tcp/50029795520
-
자바로 xml 파싱하기개발 2009. 5. 18. 23:24
자주 사용하는 것임에도 불구하고 자꾸 잊어버린다. 그래서 간단한 xml 을 예제로서 적어본다. 아래 xml은 구글에서 제공하는 비공식(2009년 5월) 날씨 API이다. 지역은 대전. 먼저 xml 파싱을 위한 패키지를 import 한다. import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.xml.sax.InputSource; import org.xml.sax.SAXExceptio..