[원문] : http://blog.springsource.org/2010/01/25/ajax-simplifications-in-spring-3-0/
group by 절을 사용 할 때 , row 개수를 알 고 싶다면,
mysql count (distinct uid) 다음과 같이 사용 하면 된다 .
중복된 uid의 개수를 알 수 있다.
group by 절을 사용 할 때 , row 개수를 알 고 싶다면,
mysql count (distinct uid) 다음과 같이 사용 하면 된다 .
중복된 uid의 개수를 알 수 있다.
<select id="selectPostIn" resultType="domain.blog.Post" parameterType="java.util.List">Just make sure collection name should be "list" only
SELECT * FROM POST P WHERE ID in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
</select>
|
Description |
Size for iPhone and iPod touch(in pixels) |
Size for iPad (in pixels) |
|
Application icon (required) |
57 x 57 114 x 114 (high resolution) |
72 x 72 |
|
App Store icon (required) |
512 x 512 |
512 x 512 |
|
Small icon for Spotlight search results and Settings (recommended) |
29 x 29 58 x 58 (high resolution) |
50 x 50 for Spotlight search results 29 x 29 for Settings |
|
Document icon (recommended for custom document types) |
22 x 29 44 x 58 (high resolution) |
64 x 64 320 x 320 |
|
Web Clip icon (recommended for web applications and websites) |
57 x 57 114 x 114 (high resolution) |
72 x 72 |
|
Toolbar and navigation bar icon (optional) |
Approximately 20 x 20 Approximately 40 x 40 (high resolution) |
Approximately 20 x 20 |
|
Tab bar icon (optional) |
Approximately 30 x 30 Approximately 60 x 60 (high resolution) |
Approximately 30 x 30 |
|
Launch image (required) |
320 x 480 640 x 960 (high resolution) |
For Portrait: 768 x 1004 For landscape: 1024 x 748 |
plist 파일을 열어
Application does not run in background 항목을 YES 로 설정한다.
어플리케이션이 강제 종료 되더라도 백그라운드에서 돌지 않는다.
[원문]: http://explainextended.com/2009/07/20/hierarchical-data-in-mysql-parents-and-children-in-one-query/
[원문] : http://blog.naver.com/PostView.nhn?blogId=justis1&logNo=40091860278
Oracle에서는 Connect by로 쉽게 해결되는데 Mysql에서는 고생하시는 분 많으 실것 같아서 올립니다
Mysql 계층 구조 (Tree 구조)에서
테이블 구조가 아래와 같은 경우
| ID | PARENT_ID | ETC |
| 1 | 0 | ROOT |
| 2 | 1 |
CHILD |
| 3 | 2 | CHILD OF 2 |
| 4 | 2 | CHILD OF 2 |
| 5 | 2 |
CHILD OF 2 |
Depth가 깊어 질수록 부모노드를 찾기가 힘들어 진다 . 이럴 경우 특정 자식 노드에서 Root까지의 부모노드를 가져오고 싶은 경우 아래의 쿼리를 사용하면 쉽게 해결된다.
SELECT @r as _ID,
(
SELECT @r := PARENT_ID FROM TABLE WHERE ID = _ID
) AS _PARENT_ID, @l := @l + 1 AS level
FROM (
SELECT @r := 5
) vars, TABLE h
WHERE @r <> 0
)A, TABLE B
결과
|
_ID |
PARENT_ID | LEVEL |
| 1 | 0 | 1 |
| 2 | 1 | 2 |
| 5 | 2 | 3 |
web.xml에 추가해주세요
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>