2012. 5. 26. 20:26

He will not let you be tempted beyond what you can bear


^^

2012. 5. 26. 16:05

\n = CR (Carriage Return) // Used as a new line character in Unix


\r = LF (Line Feed) // Used as a new line character in Mac OS


\n\r = CR + LF // Used as a new line character in Windows

2012. 5. 24. 14:20

This post is from http://www.roseindia.net/jsp/SetAttributeMethod.shtml

 

This method sets the value of the attribute for the request which is retrieved later either in the current JSP page or the another JSP page by passing the request object through the dispatcher method. The set value of the attribute is retrieved by the getAttribute(String) method of the request object.

 

Here is the JSP code of the SetAttributeMethod.jsp file

<%
        request
.setAttribute("AttributeName","This is the Attribute value.");
       
String strViewPage="SetAttributeMethod1.jsp";
       
RequestDispatcher dispatcher = request.getRequestDispatcher(strViewPage);
       
if (dispatcher != null){
                dispatcher
.forward(request, response);
       
}
%>

 

Here is the JSP code of the SetAttributeMethod1.jsp file

<%
        out
.println(request.getAttribute("AttributeName"));
%>

 

 

 

2012. 5. 23. 14:57

1. install eclipse (http://www.eclipse.org/) - install Eclipse IDE for Java EE Developers.

2. install JDK (http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u4-downloads-1591156.html)

3. install tomcat (http://tomcat.apache.org/)

4. Select Windows -> Preferences -> Server -> Runtime Environments to configure WTP to use Tomcat Press Add.

5. File → New → Other → Search "Dynamic Web Project" and then click it.

6. Input project name → Finish

7. Project Explorer → formed project → WebContent → right click → New → JSP file → input file name(usually

   index.jsp) → Finish

8. Beween <body> and </body> input "Hello JSP!!!!" and run or ctrl + F11

9. The end.

2012. 5. 17. 20:35

<script type="text/javascript" SRC="/marvin/marvin.js"></script>

<script type="text/javascript">

mview_begin("/marvin", 200, 200);

mview_param("mol", "marvin/mols-2d/caffeine.mol");

mview_end();

</script>

 

<applet CODEBASE="/marvin" ARCHIVE="appletlaunch.jar" CODE="JMViewLaunch" WIDTH=200 HEIGHT=200>

<param NAME="mol" VALUE="/marvin/mols-2d/caffeine.mol">

<strong>Your browser does not support the applet tag.</string>

</applet>

 

It's soooo easy : )

2012. 5. 15. 14:27

Create index when creating table.

 

CREATE TABLE table_name
(
ID SMALLINT UNSIGNED NOT NULL,
ModelID SMALLINT UNSIGNED NOT NULL,
PRIMARY KEY (ID),
INDEX (ModelID)  # set index on which you want
);

2012. 5. 14. 19:22

# 테이블 생성

create table 생성할 테이블명 (

필드명 데이터타입(),

필드명 데이터타입, ...);

 

# 테이블 삭제

drop table 테이블명;

 

# 테이블 확인

show tables;

 

# 테이블 구조

desc 테이블명;

 

# 데이터 입력

insert into 테이블명 [(필드명1, 필드명2, ...,)]

values (필드값);

 

# 데이터 삭제

delete from 테이블명 [ where 검색조건 ]

 

# 모든 데이터 삭제

delete from 테이블명

 

# 데이터 검색

select [DISTINCT] 필드명

from 테이블명

[where 검색조건]

[order by 핑드명 [asc or desc]]

[group by 필드명]

[having 검색조건]

 

# 데이터 수정

update 테이블명 set 필드명=필드값 또는 산술식 [where 검색조건]

 

# 백업

mysqldump -u [db 사용자명] -p [복구할 데이터베이스명] > [외부에 저장될 파일명]

 

# 복구

mysql -u [db 사용자명] -p [복구할 데이터베이스명] < [외부에 저장된 파일명]