본문 바로가기

전체 글186

mysql rownum 구현하기 mysql을 쓰다보면 oracle 처럼 rownum을 써야하는 경우가 생긴다. 혹은, 자동으로 1씩 증가하는 for 문의 변수(주로 integer i)와 같은 형태의 컬럼의 쿼리에서 구현하는 것이 편할 때가 있다. 주로 ordering이나 grouping 후 순위를 매길 때가 그런 경우인데, 그럴 때 쓸 수 있는 rownum이 mysql에도 있다. ex 1 )SELECT @RNUM := @RNUM + 1 AS ROWNUMFROM ( SELECT @RNUM := 0 ) R ex 2 )SELECT @RNUM := @RNUM + 1 AS ROWNUM, t.*FROM ( SELECT * FROM table ORDER BY column1 ) t, ( SELECT @RNUM := 0 ) R ex 2 처럼 구현하게 .. 2013. 5. 3.
Android GCM 활용해서 푸시 메세지 전송기 GCM의 특징GCM의 특징은 아래와 같다. Android 애플리케이션에 메시지를 보낼 수있는 3'rd Party 애플리케이션 서버를 허용한다.GCM은 메시지의 전달과 순서를 보장하지 않는다.메시지를 수신하기 위해 Android 디바이스의 Android 애플리케이션이 실행되고 있을 필요는 없다. 애플리케이션이 적절한 broadcast receiver와 권한을 설정하는 경우, 메시지가 도착했을 때, 시스템은 Intent broadcast가 Android 앱을 깨운다.메시지 데이터를 위해 내장 사용자 인터페이스 및 기타 다른 처리는 제공하지 않고 있다. GCM은 단순히 원시 메시지 데이터를 그대로 Android 앱에 전달하고, 메시지의 처리는 앱이 완벽하게 제어 할 수 있다. 예를 들어 애플리케이션은 노티를 .. 2013. 4. 24.
Google Cloud Messaging for Android Google Cloud Messaging for AndroidGoogle Cloud Messaging for Android (GCM) is a service that allows you to send data from your server to your users' Android-powered device. This could be a lightweight message telling your app there is new data to be fetched from the server (for instance, a movie uploaded by a friend), or it could be a message containing up to 4kb of payload data (so apps like in.. 2013. 4. 24.
How to build an Apple Push Notification provider server (tutorial) One of the widely anticipated features of the new iPhone OS 3.0 is push notifications which allow messages to be sent directly to an individual device relevant to the application that has been installed. Apple have demoed this as useful for news alerts, or IM notifications however it fits in perfectly with the nature of our server monitoring service, Server Density.As part of the product, we hav.. 2013. 4. 24.