2011년 5월 30일 월요일

png로 저장

PNG 로 저장하기

UIImage* im = [UIImage imageWithCGImage:cgImage]; // make image from CGRef
NSData* imdata = UIImagePNGRepresentation ( im ); // get PNG representation
UIImage* im2 = [UIImage imageWithData:imdata]; // wrap UIImage around PNG representation
UIImageWriteToSavedPhotosAlbum(im2, nil, nil, nil); // save to photo album
NSLog(@"Saved PNG");


Jpg로 저장하기 (compression)
UIImage *image_out=[UIImage imageWithCGImage:cgImage];
UIImageWriteToSavedPhotosAlbum(image_out, nil, nil, nil);

2011년 5월 28일 토요일

맥주

Jameican 맥주~
마누라와 닥터후 보는 시간 ㅋㅋ



- Posted using BlogPress from my iPhone

2011년 5월 27일 금요일

Color Lava

요즘 비슷한거 코딩하고 있었는데..
손에 뭍은 물감을 물에 닦는 Interaction 메타포는 정말 신선하다.
http://www.photoshop.com/products/mobile/colorlava

VolutEar Event

꽃 심기 자원봉사

단체촬영 :)

2011년 5월 20일 금요일

Tom Welling

V 여주인공 Laura Vandervoort 이 나온다길래 새롭게 시작한 미드.
Smallville.

남자 주인공. Tom Welling.
77년 생이네.

2011년 5월 19일 목요일

get_by_id

google application engine에 대한 정보를 잘 못찾겠다. -_-
매뉴얼 부실.
SELECT * FROM dbname __key__ = KEY('ahJzfmNvZmZlZXBpdHRzYnVyZ2hyDgsSB0RCVG91Y1gY6QcM')
어쨋든 이런 식으로 search
entity = dbname.get_by_id(int(self.request.get('id')))
strQry = "SELECT * FROM dbname where __key__ = KEY('" + str(entity.key())
strQry = strQry +"')"
self.response.out.write( strQry)
rows = db.GqlQuery(strQry)
for row in rows:
           self.response.out.write(cgi.escape(row.content))

ID/Name in Google Application Engine

10 년전 군대에서 책으로 배운 mysql 에 익숙한 나...
새로운 것에 익숙해져야 할 때다.

  • Tip: SELECT __key__ queries are faster and cost less CPU than SELECT * queries.

ID/Name 를 뽑는 방법


keys  = db.GqlQuery("SELECT __key__ FROM tablename")
        for key in keys:
       self.response.out.write('%s' % key.id())

2011년 5월 16일 월요일

0xCDCDCDCD

0xCDCDCDCD is a debugging value that comes from the bowels of the C runtime library. When you allocate a block of memory in a debug build, it's initialized to this spurious value in the hope of catching bugs. 0xCDCDCDCD is non-NULL and is never a valid memory pointer.

.
.
.

 If you want your pointer to start out NULL, all you have to do is initialize it to NULL in your constructor.


http://www.microsoft.com/msj/1198/c/c1198.aspx

Qt build directory 설정


ParentDirectory = "C:\\Users\\..."
RCC_DIR = "$$ParentDirectory\Build\RCCFiles"
UI_DIR = "$$ParentDirectory\Build\UICFiles"
MOC_DIR = "$$ParentDirectory\Build\MOCFiles"
OBJECTS_DIR = "$$ParentDirectory\Build\ObjFiles"

CONFIG(debug, debug|release) { 
    DESTDIR = "$$ParentDirectory\debug"
}
CONFIG(release, debug|release) { 
    DESTDIR = "$$ParentDirectory\release"
}

2011년 5월 15일 일요일

생활의 발견

마누라에게 말린 개콘.
이건 대박이다. 앞으로 탕수육 먹을때  한 동안 생각날 듯.

2011년 5월 14일 토요일

Dreams - 윤도현

You know what it ain't easy sometimes to go on

with the flow that we call life
But you got to hold on hold on to your dreams
Beacause all in the end what you got is what it is
(If you wanna play You've got to face the day)

오래된 이야기지 꿈을 꾸었던 것 너무나도 또렷한 기억인데
시간이 흘러버리고 변해버린건 어린시절 아름답던 마음속

희미해져 버린건 추억만이 아니지 
가슴 속 가득안고 있던 꿈은 어디에

Don't give up you got to find your dreams
다시 오진 않아 한번뿐인 당신만의 시간
Don't give up you got to live your dreams
걱정하지는 마 후회할 필요 없어 지금부터야

(Take it slow Take it slow now Take it slow Take it slow now)

상상속에 살고 있다해도 설레임으로 잠 못이루던 그땔 기억해봐
지금도 늦지 않았어 고개를 들어 가꿔왔던 그 모든걸 잊지마

------
너무 멋있다는 말 밖에..

2011년 5월 13일 금요일

Unicode

-_-


#ifdef _UNICODE
#error "Unicode not yet suported"
#endif

Life is burritoful


나는 멕시코 음식 좋다 ㅋㅋ


Life is burritoful :-)

2011년 5월 9일 월요일

장독대

집에서 보내주신 장독대 사진. 
예쁘다. 

2011년 5월 7일 토요일

젊은 날의 단편

95년 가을 길거리 리어커에서 샀던 테잎.
그 안에 들어 있던 류시원의 노래.
"젊은 날의 단편"
우연히 mp3를 발견하여 요즘 다시 듣는다.

신기한 느낌이다.
고1때의 교실이 떠오른다 ㅋㅋ

2011년 5월 3일 화요일

Ok, I apologize, but I'm still right


한 평생 길어야 100년이다. 이렇게 살지 말자.


지식채널e 722 '미안하다' -KAIST 정재승 교수-
from http://koosy.blogspot.com/2011/04/e-722-110418-hdtv-x264-nalu.html

“I DON’T WANT YOUR APOLOGY – I WANT YOU TO BE SORRY.”


"난 당신이 '미안하다'고 말해주길 원하는게 아니에요. 당신이 미안하다고 느끼는 것을 원하지.."

“I DON’T WANT YOUR APOLOGY – I WANT YOU TO BE SORRY.”

가끔 우리는 언어에 구속되어 스스로
그렇게 느끼고 있다고 착각할 때가 있다.


  • 지식채널e 722 '미안하다' -KAIST 정재승 교수-
    from http://koosy.blogspot.com/2011/04/e-722-110418-hdtv-x264-nalu.html
  • 원 그림
    from http://www.nscblog.com/miscellaneous/i-dont-want-your-apology-i-want-you-to-be-sorry/


이 글을 쓰고 나니까 생각나는건데,
사실 나는 말뿐인 좌우명 싫다.
그렇게 살고자 하는 목표일텐데, 어쩜 그렇게 반대로 사는 사람들이 많은지..