새로 꺼내 입은 옷
같은 옷을 자주 입다 보면
아무리 멋진 옷이라도 싫증이 나기 마련입니다.
그럴 때는 그 옷을 1~2년 묵혀둡니다.
잊고 있다 1~2년 후에 다시 꺼내 보면
마치 새로 장만한 옷처럼 신선하게 느껴지니
신기한 일입니다. 마치 오랜 친구처럼
다시 어울리니 말입니다.
- 오오하시 시즈코의《멋진 당신에게》중에서 -
* 사람도 옷과 같습니다.
처음에는 반짝했다가도 차츰 시들해지기 쉽습니다.
그때는 잠시 떨어져 지내는 것이 좋습니다.
따로 여행을 떠나는 것도 한 방법입니다.
그러면 다시 소중하고 귀한 존재로
다가옵니다. 옷은 버릴 수 있지만
사람은 버릴 수 없습니다.
-----
이 글귀... 완전 공감한다.
주위의 사람에 대해 얘기를 하지만, 나 자신에 대해서도 적용을 하면,
나 또한 더욱 사랑 스러우며 뭔가 말할 수 없는 에너지를 찾는 느낌이랄까?
이 때문에 그냥 관광이 아닌 나를 위한 여행을 떠나 보는 것도 인생에서 큰 경험이 될 것이다.
혼자서 하는 여행... 외롭게 보일지 모르나, (위험한 곳은 off-topic 이다. -_-;)
이 보다 더 멋지고 많은 것을 경험 해볼 수 있는게 또 있나 싶다.
여행가고 싶다. 부모님과 동생과 함께... ^___^
Cheers,
June
월요일, 3월 15, 2010
일요일, 3월 07, 2010
Daft Punk: Harder, Better, Faster, Stronger
Daft Punk: Harder, Better, Faster, Stronger
UCC Video footage, long time ago but just enjoy ㅋㅋㅋ
Source: http://www.youtube.com/watch?v=bl6RJyZdBSU
daft punk bodies epic failure
Source: http://www.youtube.com/watch?v=aa_I_KaozEM
-----
I like Daft Punk Style... enjoy~ ㅋㅋㅋ
Cheers,
June
UCC Video footage, long time ago but just enjoy ㅋㅋㅋ
Source: http://www.youtube.com/watch?v=bl6RJyZdBSU
daft punk bodies epic failure
Source: http://www.youtube.com/watch?v=aa_I_KaozEM
-----
I like Daft Punk Style... enjoy~ ㅋㅋㅋ
Cheers,
June
Android Troubleshooting
Android Troubleshooting
Q: "Error generating final archive: Debug certificate expired on ..."
Source: http://www.mail-archive.com/android-beginners@googlegroups.com/msg14319.html
A:
Go to "C:/Documents and Settings//.android" OR
"C:/Documents and Settings//Local Settings/Application Data/Android" and
delete debug.keystore file.
Recompile the proj and the error is gone !!
Android Troubleshooting
Source: http://developer.android.com/guide/appendix/faq/troubleshooting.html
Q: "Please execute 'adb uninstall com.android.myProject' in a shell."
A:
To resolve the issue, you need to fully uninstall the preinstalled and then reinstall it using the adb tool. Here's how to do that:
1. In a terminal, change to the tools directory of the SDK.
2. If no emulator instance is running, start an emulator using using the command emulator &.
3. Uninstall the preinstalled app using the command adb uninstall com.android.samples.
4. Reinstall the app using the command adb install. If you are working in Eclipse/ADT, you can just compile and run the app in the normal way.
c:/android/sdk/tools> adb uninstall com.android.myProject
Q: "Can't run Emulator (AVD)."
A: if your username is non-english then you have to move your AVD to other directory like this.
C:/Documents and Settings/(_한글_username_)/.android/avd> Android move avd -n avdTest -p C:/android/AVD/avdTest
AVD 'avdTest' moved.
-----
I've faced that problems in my old source tree, but resolved...
Cheers,
June
Q: "Error generating final archive: Debug certificate expired on ..."
Source: http://www.mail-archive.com/android-beginners@googlegroups.com/msg14319.html
A:
Go to "C:/Documents and Settings/
"C:/Documents and Settings/
delete debug.keystore file.
Recompile the proj and the error is gone !!
Android Troubleshooting
Source: http://developer.android.com/guide/appendix/faq/troubleshooting.html
Q: "Please execute 'adb uninstall com.android.myProject' in a shell."
A:
To resolve the issue, you need to fully uninstall the preinstalled and then reinstall it using the adb tool. Here's how to do that:
1. In a terminal, change to the tools directory of the SDK.
2. If no emulator instance is running, start an emulator using using the command emulator &.
3. Uninstall the preinstalled app using the command adb uninstall com.android.samples.
4. Reinstall the app using the command adb install
c:/android/sdk/tools> adb uninstall com.android.myProject
Q: "Can't run Emulator (AVD)."
A: if your username is non-english then you have to move your AVD to other directory like this.
C:/Documents and Settings/(_한글_username_)/.android/avd> Android move avd -n avdTest -p C:/android/AVD/avdTest
AVD 'avdTest' moved.
-----
I've faced that problems in my old source tree, but resolved...
Cheers,
June
MIT 두 공대생이 148달러로 우주와 대기권을 찍은 영상
MIT 두 공대생이 148달러로 우주와 대기권을 찍은 영상
Source:
http://space.1337arts.com/
http://www.youtube.com/watch?v=MCBBRRp9DOQ&feature=player_embedded
-----
Great! good job guys...
Cheers,
June
Source:
http://space.1337arts.com/
http://www.youtube.com/watch?v=MCBBRRp9DOQ&feature=player_embedded
-----
Great! good job guys...
Cheers,
June
금요일, 3월 05, 2010
[謹弔] 2010년 3월 2일, 사촌동생의 갑작스러운 죽음...
엊그제 일이다...
어제 3일 오전에 집에 전화를 했더니, 갑자기 사촌동생(고모네)이 죽었다는 것이다.
정말 뭐라 말할 수도 없고 그냥 답답했다. 잘못 알았거나 거짓말 이라 생각했다.
오후에 다시 집에 전화를 걸어 엄마께 여쭤보니 맞다고 하셨다.
멀리 타지에서 일하던 아이인데, 이런 갑작스러운 소식에
부모님도 많이 슬퍼 하시고 우셨던것 같다.
자세히 알아보니 사실 세상을 떠난건 2010년 3월 2일 밤이라고 한다.
그날 병원에 다녀와서 약 먹고 잠을 잤는데 다음날 일어나지 않아서
병원에 데려가니 이미 전날 밤에 숨을 거두었다고 한다.
회사 기숙사에서 일어난 일이라서 현재 부검을 끝내고 장례식을 치르는 중이다.
부검 결과는 6주 후에 나온다고 하며, 내일 발인(發靷)을 한다고 한다.
화장한 후 가족묘에 (납골당) 안장할 줄 알았는데 바다에 뿌려준다고 한다.
광주로 데려와서 할 줄 았았는데 그곳(거제도)에서 치른다고 하신다.
때문에 부모님과 동생이 거제도로 가셨다.
같이 많이 어울리지는 않았지만, 애가 착하고 듬직하며 솔직한 아이인걸로 기억한다.
평소 보았을 때 참 건강해 보였는데 하루 아침에 이렇게 되니 참으로 가슴 아픈일이다.
오래전에 외할머니를 하늘나라로 보내 드릴때 가슴이 너무 아팠는데,
하물며 자식을 먼저 보내는 고모와 고모부의 마음은 얼마나 아플지 조금은 와 닿는다.
어렸을때는 몰랐지만, 나이를 먹어 감으로써 노환으로 친할머니도 돌아 가시고,
이번에 젊은 나이로 세상을 떠난 사촌동생을 떠나 보내니 건강한 것과
가족과 항상 함께 하는것이 얼마나 소중하고 중요한지 다시한번 깨닫게 된다.
몇번이고 서울을 떠나 집으로 내려가려고 했으나 현실은 쉽지 않았다.
가족이 생각나면 당장 이라도 내려가고 싶지만, 매일 전화만 드린다.
엄마도 걱정이 많이 되셨는지 내 건강을 많이 살피신다. 나는 그런 나 보다도
엄마 아빠와 내 동생이 항상 다치지 않고 건강하기를 더 바란다.
아직도 사실을 받아 들이기가 힘들다. 그냥 말이 안 된다고 생각한다.
가는 길 배웅이라도 해야 한는데, 너무 멀리 떨어져 있어서... 그냥 미안 하기만 하다.
제대로 된 기도는 아니지만 하늘나라에서 평안 하도록 기도를 하는 것 밖엔
내가 해줄 수 있는게 아무것도 없는 것 같다. 그래서 더 안타깝다.
사랑하는 재욱아,
명절이나 기타 다른 이유로 만나는 것 외에는
많이 만나지 못해서 더 가슴이 아프구나...
함께했던 시간이 많지는 않았지만, 너를 포함한 다른 손주들 모두
친 형제였고 어렴풋이 나마 어렸을 때 기억들도 생각이 난다.
아직 인생에 꽃도 피워 보지도 못한 채 왜 이렇게 먼저 급하게 간 거니?
나 뿐만 아니라 다른 형제들도 모두 사실을 받아 들이기 힘들거야...
왜 이렇게 벌써 갔어야 했니?
멀리 떨어져 있다는 핑계로 만나지도 않고 서로 안부 전화도 하지 않은게
이제와 너무 후회가 된다.
많이 그리울거야... 가는 길 배웅 해줘야 하는데 그러지 못해서 너무 미안해...
재욱아... 하늘나라에서 편히 보내길 바라며,
너를 사랑하는 가족, 고모와 고모부,
그리고 너에 동생을 항상 지켜주고 돌봐주길 바란다.
주제 넘는 말이지만,
너에 몫까지 항상 열심히, 성실하게 그리고 몸 건강하게 살아가도록 할게...
Haiku 로 마지막 인사 할게...
미안하다 / 사랑한다 / 그리울거야...
김호중 拜上
어제 3일 오전에 집에 전화를 했더니, 갑자기 사촌동생(고모네)이 죽었다는 것이다.
정말 뭐라 말할 수도 없고 그냥 답답했다. 잘못 알았거나 거짓말 이라 생각했다.
오후에 다시 집에 전화를 걸어 엄마께 여쭤보니 맞다고 하셨다.
멀리 타지에서 일하던 아이인데, 이런 갑작스러운 소식에
부모님도 많이 슬퍼 하시고 우셨던것 같다.
자세히 알아보니 사실 세상을 떠난건 2010년 3월 2일 밤이라고 한다.
그날 병원에 다녀와서 약 먹고 잠을 잤는데 다음날 일어나지 않아서
병원에 데려가니 이미 전날 밤에 숨을 거두었다고 한다.
회사 기숙사에서 일어난 일이라서 현재 부검을 끝내고 장례식을 치르는 중이다.
부검 결과는 6주 후에 나온다고 하며, 내일 발인(發靷)을 한다고 한다.
화장한 후 가족묘에 (납골당) 안장할 줄 알았는데 바다에 뿌려준다고 한다.
광주로 데려와서 할 줄 았았는데 그곳(거제도)에서 치른다고 하신다.
때문에 부모님과 동생이 거제도로 가셨다.
같이 많이 어울리지는 않았지만, 애가 착하고 듬직하며 솔직한 아이인걸로 기억한다.
평소 보았을 때 참 건강해 보였는데 하루 아침에 이렇게 되니 참으로 가슴 아픈일이다.
오래전에 외할머니를 하늘나라로 보내 드릴때 가슴이 너무 아팠는데,
하물며 자식을 먼저 보내는 고모와 고모부의 마음은 얼마나 아플지 조금은 와 닿는다.
어렸을때는 몰랐지만, 나이를 먹어 감으로써 노환으로 친할머니도 돌아 가시고,
이번에 젊은 나이로 세상을 떠난 사촌동생을 떠나 보내니 건강한 것과
가족과 항상 함께 하는것이 얼마나 소중하고 중요한지 다시한번 깨닫게 된다.
몇번이고 서울을 떠나 집으로 내려가려고 했으나 현실은 쉽지 않았다.
가족이 생각나면 당장 이라도 내려가고 싶지만, 매일 전화만 드린다.
엄마도 걱정이 많이 되셨는지 내 건강을 많이 살피신다. 나는 그런 나 보다도
엄마 아빠와 내 동생이 항상 다치지 않고 건강하기를 더 바란다.
아직도 사실을 받아 들이기가 힘들다. 그냥 말이 안 된다고 생각한다.
가는 길 배웅이라도 해야 한는데, 너무 멀리 떨어져 있어서... 그냥 미안 하기만 하다.
제대로 된 기도는 아니지만 하늘나라에서 평안 하도록 기도를 하는 것 밖엔
내가 해줄 수 있는게 아무것도 없는 것 같다. 그래서 더 안타깝다.
사랑하는 재욱아,
명절이나 기타 다른 이유로 만나는 것 외에는
많이 만나지 못해서 더 가슴이 아프구나...
함께했던 시간이 많지는 않았지만, 너를 포함한 다른 손주들 모두
친 형제였고 어렴풋이 나마 어렸을 때 기억들도 생각이 난다.
아직 인생에 꽃도 피워 보지도 못한 채 왜 이렇게 먼저 급하게 간 거니?
나 뿐만 아니라 다른 형제들도 모두 사실을 받아 들이기 힘들거야...
왜 이렇게 벌써 갔어야 했니?
멀리 떨어져 있다는 핑계로 만나지도 않고 서로 안부 전화도 하지 않은게
이제와 너무 후회가 된다.
많이 그리울거야... 가는 길 배웅 해줘야 하는데 그러지 못해서 너무 미안해...
재욱아... 하늘나라에서 편히 보내길 바라며,
너를 사랑하는 가족, 고모와 고모부,
그리고 너에 동생을 항상 지켜주고 돌봐주길 바란다.
주제 넘는 말이지만,
너에 몫까지 항상 열심히, 성실하게 그리고 몸 건강하게 살아가도록 할게...
Haiku 로 마지막 인사 할게...
미안하다 / 사랑한다 / 그리울거야...
김호중 拜上
토요일, 2월 27, 2010
Registry Tip
Registry Tip
- These code are let you show how to use API which relevant Windows Registry.
- Registry 에 관련된 것은 이곳에 정리를 해놓는다.
//
// Registry Usage
//
// Visual C++
// ...
// Delphi
uses
..., Registry;
procedure TEST_RegistryRW;
var
__REG: TRegistry;
str: string;
strREGKeyVal: string;
strNewKey: string;
begin
str := 'SOFTWARE\TEST' + '\REG_TEST';
strNewKey := 'TestKey';
__REG := TRegistry.Create( KEY_WRITE );
try
//__REG.RootKey := HKEY_LOCAL_MACHINE;
__REG.RootKey := HKEY_CURRENT_USER;
__REG.OpenKey( str, True );
__REG.WriteString( strNewKey, 'can you see this?' );
finally
__REG.Free;
ShowMessage( 'WRITE: finish' );
end;
__REG := TRegistry.Create( KEY_READ );
try
//__REG.RootKey := HKEY_LOCAL_MACHINE;
__REG.RootKey := HKEY_CURRENT_USER;
__REG.OpenKey( str, True );
strREGKeyVal := __REG.ReadString( strNewKey );
if( strREGKeyVal <> '' ) then ShowMessage( 'String: ' + strREGKeyVal );
finally
__REG.Free;
ShowMessage( 'READ: finish' );
end;
end;
// ---------------------------------------------------
//
// Checks Registered Object
//
// Visual C++
#include // Ole32.lib, Ole32.dll
CLSID ClsID;
char* pStrProgID = "Object.InterfaceName"; // Hello.Application
RESULT hr = CLSIDFromProgID( pStrProgID, &ClsID);
if( hr == S_OK )
// Registered
else
// Not Registered
// Delphi
uses
..., ActiveX;
procedure TEST_ChecksRegisteredObject
var
ClassID: TGUID;
strObject: string;
begin
strObject := 'Object.InterfaceName'; // Hello.Application
if( CLSIDFromProgID(PWideChar(WideString(strObject)), ClassID) = S_OK ) then begin
ShowMessage( 'Registered' );
end
else begin
ShowMessage( 'Not Registered' );
end;
end;
-----
Cheers,
June
일요일, 2월 21, 2010
Fingerprint Requirement For a Work-Study Job?
Fingerprint Requirement For a Work-Study Job?
Source: http://ask.slashdot.org/story/10/02/20/233200/Fingerprint-Requirement-For-a-Work-Study-Job
BonesSB writes:
-----
What the fuck is going on? requires fingerprint for a federal work-study?
i think this makes privacy violation.
although
Cheers,
June
Source: http://ask.slashdot.org/story/10/02/20/233200/Fingerprint-Requirement-For-a-Work-Study-Job
BonesSB writes:
QUOTE: "I'm a student at a university in Massachusetts, where I have a federal work-study position. Yesterday, I got an email from the office that is responsible for student run organizations (one of which I work for) saying that I need to go to their office and have my finger prints taken for the purposes of clocking in and out of work. This raises huge privacy concerns for me, as it should for everybody else. I am in the process of contacting the local newspaper, getting the word out to students everywhere, and talking directly to the office regarding this. I got an email back with two very contradictory sentences: 'There will be no image of your fingerprints anywhere. No one will have access to your fingerprints. The machine is storing your prints as a means of identifying who you are when you touch it.' Does anybody else attend a school that requires something similar? This is an obvious slippery slope, and something I am not taking lightly. What else should I do?"
-----
What the fuck is going on? requires fingerprint for a federal work-study?
i think this makes privacy violation.
although
QUOTE: 'There will be no image of your fingerprints anywhere. No one will have access to your fingerprints. The machine is storing your prints as a means of identifying who you are when you touch it.'who know? ;)
Cheers,
June
외국 대학 동영상 강의 (continued...)
외국 대학 동영상 강의
* 여러 대학 강의를 한 곳에 모음
- iTry College: http://www.itrycollege.com/content.php
- Academic Earth: http://www.academicearth.org/
* 기타
동영상 강의
2007/07/12 14:25:27
전과목
오른쪽 위 Other Semasters라고 적힌 combo box를 클릭하면 다른 학기 과목도 볼 수 있다.
내가 보고 있는 거: machine structures, OS, 신호및시스템, 일반생물1, 심리학, 영양학, 해부학,
보고 싶은 거: 프로그램이해(?), 영상처리, DSP, 미시경제, 거시경제, 전자회로, 세포생물학, 일반화학,
mit에서는 http://ocw.mit.edu/index.html 에 대부분 강의를 공유한다. 위 링크는 그 중 동영상강의를 공개하는 과목 목록.
내가 보는 거: 알고리즘, 컴퓨터시스템, 전자회로, 선형대수, 미분방정식, 응용수학, 일반물리1,2,3, 일반생물, 일반화학
보고 싶은 거: 16.885J Aircraft Systems Engineering, Fall 2005, 3.091 Introduction to Solid State Chemistry, Fall 2004
3. 강의 정리한 블로그: http://freescienceonline.blogspot.com/
각종 과학과목을 죄다 정리해두었다. 난 대부분의 강의 사이트 링크를 여기서 얻었다. 일부는 동으로부터, 일부는 google 검색, google video 검색 http://video.google.com/videosearch?q=lecture+genre%3Aeducational 으로부터.
블로거는 물리 전공이지만 theoretical cs랑 math에 관심이 많단다.
4. 플로리다 대학교
Computer
종합
1. ArsDigita: http://aduni.org/courses/
mit사람들이 가르치던데, 대학인지 아닌지도 모르겠다.
내가 보는 거: 프로그램이해(?), OOP(자바강의), 이산수학, 확률
보고 싶은 거: 전산수학, 계산이론, DBMS, AI
대학원 과정의 강의를 일부 동영상으로 공개한다. 2003년 이후의 강의는 워싱턴대에서 배포하는 프로그램을 설치하고 사용하면, 동영상+ppt+필기를 동시에 볼 수 있어서 좋다.
내가 보는 거: 프로그래밍언어론, 컴파일러, AI, HCI, 보안, DBMS, 전자거래
보고 싶은 거: 암호학, 컴퓨터구조, DBMS,
낱개
1. 연세대 마이크로프로세서 강좌: http://mpu.yonsei.ac.kr/Lecture/main_video_lect.htm
무슨 국가지원 사업의 일환으로 찍어뒀단다. 한국말 강의가 많다. 동영상에는 ppt파일만 보인다.
2. mit 프로그램이해 강좌: http://swiss.csail.mit.edu/classes/6.001/abelson-sussman-lectures/
선진 대학에는 이런 과목이 있더라. structures and interpretation of computer programs.
프 로그래밍 언어론의 선수과목이라고 해야 할까_ 프로그래밍언어를 멋있게 수학적으로 배운다. lisp이나 scheme같은 학교용 언어를 단계적으로 배운다. 이 강의에서는 lisp. 이건 1986년에 HP사람들 가르친 강좌래. 책도 온라인에 공개돼있다. http://www-mitpress.mit.edu/sicp/full-text/book/book.html
3. Prof. Shiv가 공개하는 네트워킹 강좌 3개: http://www.ecse.rpi.edu/Homepages/shivkuma/teaching/video_index.html
Instructor는 인도사람같아 보이는데, 영어발음은 적당하면서도 빨라서 괜찮다.
4. 퍼듀대 영상처리1 강좌: http://cobweb.ecn.purdue.edu/~bouman/ee637/lectures05/
5. 하버드대 컴퓨터입문 강좌: http://www.fas.harvard.edu/~cscie1/?page=podcast&type=static
6. 전북대 알고리즘 강좌: http://internet512.chonbuk.ac.kr
Machine Learning
Hi there, I thought you might be interested in reading my shared items using Google Reader. Click the link below to view these items:
Or, if you use a feed reader, you can subscribe to their feed by copying and pasting this feed URL into your feed reader:
Hi there, I thought you might be interested in reading my shared items using Google Reader. Click the link below to view these items:
Or, if you use a feed reader, you can subscribe to their feed by copying and pasting this feed URL into your feed reader:
1. Video Lectures
2. Free Science and Video Lectures Online!
Mathematics
2. 아이다호대: http://www.sci.uidaho.edu/polya/
3. 미국용 공짜교육사이트 대수학강좌: http://www.free-ed.net/free-ed/Math/Algebra/Algebra01_VidLect.asp
다른 과목도 많은데, 모두 미국 시민한테만 보여주나보다.
Physics
3. 짧은 quantum physics
Medicine
1. usc 6과목: http://pathmicro.med.sc.edu/book/video.htm
세미나
전과목
1. mitworld
Computer
1. Google TechTalks: http://video.google.com/videosearch?q=type%3Agoogle+engEDU
2. Donald Knuth's God & Computers: http://technetcast.ddj.com/tnc_program.html?program_id=50
Physics
물리강좌 비디오 모음. 버클리, 칼텍, 프린스턴, 하버드, 스탠포드, 코넬 등 학교 링크가 보인다.
링크를 따라가보면 물리 강좌 외 다른 강의도 많이 보인다.
2. 양자역학: http://bethe.cornell.edu/
3. 파인만강의: http://www.vega.org.uk/video/subseries/8
Medicine
기타
-----
Cheers,
June
수요일, 2월 10, 2010
How to privilege elevation without UAC Dialog Window in VISTA and higher.
How to privilege elevation without UAC Dialog Window in VISTA and higher.
한번씩 사용하게 되는데 잊어 버릴까봐 적어 둔다. -_-;
Below codes are works very well for me. (VC++, Delphi) ㅋㅋ
You can makes an UAC elevation executor binary for distribute ActiveX.
(confer section [hook] in xxx.inf)
아래 VC++ 와 Delphi 코드는 내가 테스트할 때에는 잘 동작했다.
UAC Elevation 은 아래 코드와 같이 사용하니 편하실 대로 적절히 변경해서 사용하면 될 것이다.
그리고 inf 에서 HOOK 을 사용할 때에도 아래를 보고 하면 된다.
like this... (xxx.inf)
[Add.Code]
test_vista.ocx=test_vista.ocx
uacelevator.exe=uacelevator.exe
;
[...]
...
[uacelevator.exe]
file=thiscab
FileVersion=1,0,0,1
[Setup Hooks]
hook1=hook1
[hook1]
Run=%EXTRACT_DIR%\uacelevator.exe "test_vista.ocx"
;
Codes are here...
Source:
http://stackoverflow.com/questions/923350/delphi-prompt-for-uac-elevation-when-needed
http://pascalfonteneau.developpez.com/articles/delphi/vista/uac/VistaUACandDelphi.pdf
// VC++
// Calls UAC Dialog Window
// Note:
// http://byung.egloos.com/2869040
BOOL RunAsAdmin( HWND hWnd, LPTSTR lpFile, LPTSTR lpParameters ) {
SHELLEXECUTEINFO sei;
ZeroMemory ( &sei, sizeof(sei) );
sei.cbSize = sizeof(SHELLEXECUTEINFOW);
sei.hwnd = hWnd;
sei.fMask = SEE_MASK_FLAG_DDEWAIT | SEE_MASK_FLAG_NO_UI;
sei.lpVerb = _TEXT("runas");
sei.lpFile = lpFile;
sei.lpParameters = lpParameters;
sei.nShow = SW_SHOWNORMAL;
if( ! ShellExecuteEx(&sei) ) {
printf( "Error: ShellExecuteEx failed 0x%x\n", GetLastError() );
return FALSE;
}
return TRUE;
}
// Delphi
// Without UAC Dialog Window ( * NOTE: DOES NOT WORK!)
// Note:
// http://stackoverflow.com/questions/923350/delphi-prompt-for-uac-elevation-when-needed
function RunAsAdmin(filename: string);
var
ProcInfo: PROCESS_INFORMATION;
StartInfo: TStartupInfo;
begin
ZeroMemory( @StartInfo, sizeof(StartInfo) );
StartInfo.cb := sizeof( StartInfo );
StartInfo.wShowWindow := SW_SHOW;
if not CreateProcessA(PAnsiChar(fileName), nil, nil, nil, false, CREATE_NEW_CONSOLE, nil, nil, StartInfo, ProcInfo) then
//if not CreateProcessW(PWideChar(fileNameW), nil, nil, nil, false, CREATE_NEW_CONSOLE, nil, nil, StartInfo, ProcInfo) then
//or: //if not CreateProcessW(nil,PWideChar(PathName), nil, nil, false, CREATE_NEW_CONSOLE, nil, nil, StartInfo, ProcInfo) then
//ShowMessage(Format(‘The application could not be started: (%d) %s’,[GetLastError,SysErrorMessage(GetLastError)]));
end;
// Delphi
// Calls UAC Dialog Window
uses
SysUtils, Windows, ShellApi, ShlObj, ComObj;
type
...
function RunAsAdmin(strFilename, strParam, strPath: string; opt: integer; handle: HWND; isVista: boolean);
var
sellExecuteInfo: TShellExecuteInfo;
begin
if( isVista ) then begin
sellExecuteInfo.lpVerb := 'runas';
if( handle <> 0 ) then sellExecuteInfo.Wnd := handle;
end;
sellExecuteInfo.lpFile := PChar( strFileName );
sellExecuteInfo.lpParameters := PChar( strParam );
sellExecuteInfo.lpDirectory := PChar( strPath );
sellExecuteInfo.nShow := opt; // SW_MINIMIZE, ...
Result := ShellExecuteEx( @sellExecuteInfo );
end;
RunAsAdmin( 'regsvr32', '/s', '.\' + 'test.ocx', SW_NORMAL, self.handle );
-----
i don't like above ways. i think just show UAC dialog window if needed it,
but why bypass this process?
if you learn more about the permission then i recommended you SHOULD use *NIX system.
so, i hate Windows series.
hmm... but i should work under the Windows for my job. shit...
Cheers,
June
한번씩 사용하게 되는데 잊어 버릴까봐 적어 둔다. -_-;
Below codes are works very well for me. (VC++, Delphi) ㅋㅋ
You can makes an UAC elevation executor binary for distribute ActiveX.
(confer section [hook] in xxx.inf)
아래 VC++ 와 Delphi 코드는 내가 테스트할 때에는 잘 동작했다.
UAC Elevation 은 아래 코드와 같이 사용하니 편하실 대로 적절히 변경해서 사용하면 될 것이다.
그리고 inf 에서 HOOK 을 사용할 때에도 아래를 보고 하면 된다.
like this... (xxx.inf)
[Add.Code]
test_vista.ocx=test_vista.ocx
uacelevator.exe=uacelevator.exe
;
[...]
...
[uacelevator.exe]
file=thiscab
FileVersion=1,0,0,1
[Setup Hooks]
hook1=hook1
[hook1]
Run=%EXTRACT_DIR%\uacelevator.exe "test_vista.ocx"
;
Codes are here...
Source:
http://stackoverflow.com/questions/923350/delphi-prompt-for-uac-elevation-when-needed
http://pascalfonteneau.developpez.com/articles/delphi/vista/uac/VistaUACandDelphi.pdf
// VC++
// Calls UAC Dialog Window
// Note:
// http://byung.egloos.com/2869040
BOOL RunAsAdmin( HWND hWnd, LPTSTR lpFile, LPTSTR lpParameters ) {
SHELLEXECUTEINFO sei;
ZeroMemory ( &sei, sizeof(sei) );
sei.cbSize = sizeof(SHELLEXECUTEINFOW);
sei.hwnd = hWnd;
sei.fMask = SEE_MASK_FLAG_DDEWAIT | SEE_MASK_FLAG_NO_UI;
sei.lpVerb = _TEXT("runas");
sei.lpFile = lpFile;
sei.lpParameters = lpParameters;
sei.nShow = SW_SHOWNORMAL;
if( ! ShellExecuteEx(&sei) ) {
printf( "Error: ShellExecuteEx failed 0x%x\n", GetLastError() );
return FALSE;
}
return TRUE;
}
// Delphi
// Without UAC Dialog Window ( * NOTE: DOES NOT WORK!)
// Note:
// http://stackoverflow.com/questions/923350/delphi-prompt-for-uac-elevation-when-needed
function RunAsAdmin(filename: string);
var
ProcInfo: PROCESS_INFORMATION;
StartInfo: TStartupInfo;
begin
ZeroMemory( @StartInfo, sizeof(StartInfo) );
StartInfo.cb := sizeof( StartInfo );
StartInfo.wShowWindow := SW_SHOW;
if not CreateProcessA(PAnsiChar(fileName), nil, nil, nil, false, CREATE_NEW_CONSOLE, nil, nil, StartInfo, ProcInfo) then
//if not CreateProcessW(PWideChar(fileNameW), nil, nil, nil, false, CREATE_NEW_CONSOLE, nil, nil, StartInfo, ProcInfo) then
//or: //if not CreateProcessW(nil,PWideChar(PathName), nil, nil, false, CREATE_NEW_CONSOLE, nil, nil, StartInfo, ProcInfo) then
//ShowMessage(Format(‘The application could not be started: (%d) %s’,[GetLastError,SysErrorMessage(GetLastError)]));
end;
// Delphi
// Calls UAC Dialog Window
uses
SysUtils, Windows, ShellApi, ShlObj, ComObj;
type
...
function RunAsAdmin(strFilename, strParam, strPath: string; opt: integer; handle: HWND; isVista: boolean);
var
sellExecuteInfo: TShellExecuteInfo;
begin
if( isVista ) then begin
sellExecuteInfo.lpVerb := 'runas';
if( handle <> 0 ) then sellExecuteInfo.Wnd := handle;
end;
sellExecuteInfo.lpFile := PChar( strFileName );
sellExecuteInfo.lpParameters := PChar( strParam );
sellExecuteInfo.lpDirectory := PChar( strPath );
sellExecuteInfo.nShow := opt; // SW_MINIMIZE, ...
Result := ShellExecuteEx( @sellExecuteInfo );
end;
RunAsAdmin( 'regsvr32', '/s', '.\' + 'test.ocx', SW_NORMAL, self.handle );
i don't like above ways. i think just show UAC dialog window if needed it,
but why bypass this process?
if you learn more about the permission then i recommended you SHOULD use *NIX system.
so, i hate Windows series.
hmm... but i should work under the Windows for my job. shit...
Cheers,
June
수요일, 2월 03, 2010
Qualcomm Brew MP: Build failed, Debug process stopped.
Qualcomm Brew MP: Build failed, Debug process stopped.
Problem: "Error: Build failed, Debug process stopped." build succeed, but failed.
Source: https://brewmobileplatform.qualcomm.com/bmpforum/posts/list/759.page
This problem is driving me crazy so frequently. -_-;
but these trick are makes me freely... ^___^
1. Clean Solution
2. Clean Project (name of project)
3. quit VC++
4. delete "PROJECTNAME_win32.brewmp" and "PROJECTNAME.suo"(Visual Studio Solution User Options) in your project home directory.
5. then restart VC++
That's it. pretty easy?
These are seems to work well for me.
Thanks.
-----
Regards,
Ho-Jung Kim
-----
my posted message in Brew MP Forum.
Cheers,
June
Problem: "Error: Build failed, Debug process stopped." build succeed, but failed.
Source: https://brewmobileplatform.qualcomm.com/bmpforum/posts/list/759.page
This problem is driving me crazy so frequently. -_-;
but these trick are makes me freely... ^___^
1. Clean Solution
2. Clean Project (name of project)
3. quit VC++
4. delete "PROJECTNAME_win32.brewmp" and "PROJECTNAME.suo"(Visual Studio Solution User Options) in your project home directory.
5. then restart VC++
That's it. pretty easy?
These are seems to work well for me.
Thanks.
-----
Regards,
Ho-Jung Kim
-----
my posted message in Brew MP Forum.
Cheers,
June
화요일, 2월 02, 2010
Nokia N900 can running Mac OSX 10.3.x by PearPC
Nokia N900 can running Mac OSX 10.3 by PearPC
Mac OS X 10.3 Installed On Nokia N900 Because It's Possible
Source: http://thenokiablog.com/2010/01/31/mac-os-x-nokia-n900/
Finnish geek Toni Nikkanen(http://www.tuug.fi/~toni/serendipity/index.php?/archives/13-Mac-OS-X-10.3-running-on-the-N900%21.html) shared on video that it’s possible to put Mac OS X 10.3 on the Nokia N900(http://thenokiablog.com/2009/11/13/nokia-n900-review/), although uselessly slow. It took 2 hours to boot up! I don’t know about you, but I’m not patient enough to use an old OS not built for a mobile device. Nevertheless, the project was just for fun to claim the title of making the N900 the first smartphone ever to run a full version of OS X.
-----
Damn, great!
Cheers,
June
Mac OS X 10.3 Installed On Nokia N900 Because It's Possible
Source: http://thenokiablog.com/2010/01/31/mac-os-x-nokia-n900/
Finnish geek Toni Nikkanen(http://www.tuug.fi/~toni/serendipity/index.php?/archives/13-Mac-OS-X-10.3-running-on-the-N900%21.html) shared on video that it’s possible to put Mac OS X 10.3 on the Nokia N900(http://thenokiablog.com/2009/11/13/nokia-n900-review/), although uselessly slow. It took 2 hours to boot up! I don’t know about you, but I’m not patient enough to use an old OS not built for a mobile device. Nevertheless, the project was just for fun to claim the title of making the N900 the first smartphone ever to run a full version of OS X.
-----
Damn, great!
Cheers,
June
Webkit Coding Style Guidelines
Webkit Coding Style Guidelines
Source: http://webkit.org/coding/coding-style.html
WebKit Coding Style Guidelines
-----
Cheers,
June
Source: http://webkit.org/coding/coding-style.html
WebKit Coding Style Guidelines
Indentation
- Use spaces, not tabs. Tabs should only appear in files that require them for semantic meaning, like Makefiles.
- The indent size is 4 spaces.
Right:
int main() { return 0; }Wrong:
int main() { return 0; } - Code inside a namespace should not be indented.
Right:
// Document.h namespace WebCore { class Document { Document(); ... }; } // namespace WebCore // Document.cpp namespace WebCore { Document::Document() { ... } } // namespace WebCoreWrong:
// Document.h namespace WebCore { class Document { Document(); ... }; } // namespace WebCore // Document.cpp namespace WebCore { Document::Document() { ... } } // namespace WebCore - A case label should line up with its switch statement. The case statement is indented.
Right:
switch (condition) { case fooCondition: case barCondition: i++; break; default: i--; }Wrong:
switch (condition) { case fooCondition: case barCondition: i++; break; default: i--; } - Boolean expressions at the same nesting level that span multiple lines should have their operators on the left side of the line instead of the right side.
Right:
if (attr->name() == srcAttr || attr->name() == lowsrcAttr || (attr->name() == usemapAttr && attr->value().domString()[0] != '#')) return;Wrong:
if (attr->name() == srcAttr || attr->name() == lowsrcAttr || (attr->name() == usemapAttr && attr->value().domString()[0] != '#')) return;
Spacing
- Do not place spaces around unary operators.
Right:
i++;
Wrong:
i ++;
- Do place spaces around binary and ternary operators.
Right:
y = m * x + b; f(a, b); c = a | b; return condition ? 1 : 0;
Wrong:
y=m*x+b; f(a,b); c = a|b; return condition ? 1:0;
- Do not place spaces before comma and semicolon.
Right:
for (int i = 0; i < 10; i++) doSomething(); f(a, b);Wrong:
for (int i = 0 ; i < 10 ; i++) doSomething(); f(a , b) ; - Place spaces between control statements and their parentheses.
Right:
if (condition) doIt();Wrong:
if(condition) doIt(); - Do not place spaces between a function and its parentheses, or between a parenthesis and its content.
Right:
f(a, b);
Wrong:
f (a, b); f( a, b );
Line breaking
- Each statement should get its own line.
Right:
x++; y++; if (condition) doIt();Wrong:
x++; y++; if (condition) doIt();
- An
elsestatement should go on the same line as a preceding close brace if one is present, else it should line up with theifstatement.
Right:
if (condition) { ... } else { ... } if (condition) doSomething(); else doSomethingElse(); if (condition) doSomething(); else { ... }Wrong:
if (condition) { ... } else { ... } if (condition) doSomething(); else doSomethingElse(); if (condition) doSomething(); else { ... } - An
else ifstatement should be written as anifstatement when the priorifconcludes with areturnstatement.
Right:
if (condition) { ... return someValue; } if (condition) { ... }Wrong:
if (condition) { ... return someValue; } else if (condition) { ... }
Braces
- Function definitions: place each brace on its own line.
Right:
int main() { ... }Wrong:
int main() { ... } - Other braces: place the open brace on the line preceding the code block; place the close brace on its own line.
Right:
class MyClass { ... }; namespace WebCore { ... } for (int i = 0; i < 10; i++) { ... }Wrong:
class MyClass { ... }; - One-line control clauses should not use braces unless comments are included or a single statement spans multiple lines.
Right:
if (condition) doIt(); if (condition) { // Some comment doIt(); } if (condition) { myFunction(reallyLongParam1, reallyLongParam2, ... reallyLongParam5); }Wrong:
if (condition) { doIt(); } if (condition) // Some comment doIt(); if (condition) myFunction(reallyLongParam1, reallyLongParam2, ... reallyLongParam5); - Control clauses without a body should use empty braces:
Right:
for ( ; current; current = current->next) { }Wrong:
for ( ; current; current = current->next);
Null, false and 0
- In C++, the null pointer value should be written as
0. In C, it should be written asNULL. In Objective-C and Objective-C++, follow the guideline for C or C++, respectively, but usenilto represent a null Objective-C object. - C++ and C
boolvalues should be written astrueandfalse. Objective-CBOOLvalues should be written asYESandNO. - Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.
Right:
if (condition) doIt(); if (!ptr) return; if (!count) return;Wrong:
if (condition == true) doIt(); if (ptr == NULL) return; if (count == 0) return; - In Objective-C, instance variables are initialized to zero automatically. Don't add explicit initializations to nil or NO in an init method.
Floating point literals
- Unless required in order to force floating point math, do not append
.0,.fand.0fto floating point literals.
Right:
const double duration = 60; void setDiameter(float diameter) { radius = diameter / 2; } setDiameter(10); const int framesPerSecond = 12; double frameDuration = 1.0 / framesPerSecond;Wrong:
const double duration = 60.0; void setDiameter(float diameter) { radius = diameter / 2.f; } setDiameter(10.f); const int framesPerSecond = 12; double frameDuration = 1 / framesPerSecond; // integer division
Names
- Use CamelCase. Capitalize the first letter, including all letters in an acronym, in a class, struct, protocol, or namespace name. Lower-case the first letter, including all letters in an acronym, in a variable or function name.
Right:
struct Data; size_t bufferSize; class HTMLDocument; String mimeType();
Wrong:
struct data; size_t buffer_size; class HtmlDocument; String MIMEType();
- Use full words, except in the rare case where an abbreviation would be more canonical and easier to understand.
Right:
size_t characterSize; size_t length; short tabIndex; // more canonical
Wrong:
size_t charSize; size_t len; short tabulationIndex; // bizarre
- Prefix C++ data members with "m_".
Right:
class String { ... short m_length; };Wrong:
class String { ... short length; }; - Prefix Objective-C instance variables with "_".
Right:
@class String ... short _length; @endWrong:
@class String ... short length; @end - Precede boolean values with words like "is" and "did".
Right:
bool isValid; bool didSendData;
Wrong:
bool valid; bool sentData;
- Precede setters with the word "set". Use bare words for getters. Setter and getter names should match the names of the variables being set/gotten.
Right:
void setCount(size_t); // sets m_count size_t count(); // returns m_count
Wrong:
void setCount(size_t); // sets m_theCount size_t getCount();
- Use descriptive verbs in function names.
Right:
bool convertToASCII(short*, size_t);
Wrong:
bool toASCII(short*, size_t);
- Leave meaningless variable names out of function declarations.
Right:
void setCount(size_t);
Wrong:
void setCount(size_t count);
- Objective-C method names should follow the Cocoa naming guidelines — they should read like a phrase and each piece of the selector should start with a lowercase letter and use intercaps.
- Enum members should user InterCaps with an initial capital letter.
- Prefer const to #define. Prefer inline functions to macros.
- #defined constants should use all uppercase names with words separated by underscores.
- Macros that expand to function calls or other non-constant computation: these should be named like functions, and should have parentheses at the end, even if they take no arguments (with the exception of some special macros like ASSERT). Note that usually it is preferable to use an inline function in such cases instead of a macro.
Right:
#define WBStopButtonTitle() \ NSLocalizedString(@"Stop", @"Stop button title")Wrong:
#define WB_STOP_BUTTON_TITLE \ NSLocalizedString(@"Stop", @"Stop button title") #define WBStopButtontitle \ NSLocalizedString(@"Stop", @"Stop button title") - #define, #ifdef "header guards" should be named exactly the same as the file (including case), replacing the '.' with a '_'.
Right:
// HTMLDocument.h #ifndef HTMLDocument_h #define HTMLDocument_h
Wrong:
// HTMLDocument.h #ifndef _HTML_DOCUMENT_H_ #define _HTML_DOCUMENT_H_
Other Punctuation
- Constructors for C++ classes should initialize all of their members using C++ initializer syntax. Each member (and superclass) should be indented on a separate line, with the colon or comma preceding the member on that line.
Right:
MyClass::MyClass(Document* doc) : MySuperClass() , m_myMember(0) , m_doc(doc) { } MyOtherClass::MyOtherClass() : MySuperClass() { }Wrong:
MyClass::MyClass(Document* doc) : MySuperClass() { m_myMember = 0; m_doc = doc; } MyOtherClass::MyOtherClass() : MySuperClass() {} - Pointer types in non-C++ code — Pointer types should be written with a space between the type and the * (so the * is adjacent to the following identifier if any).
- Pointer and reference types in C++ code — Both pointer types and reference types should be written with no space between the type name and the * or &.
Right:
Image* SVGStyledElement::doSomething(PaintInfo& paintInfo) { SVGStyledElement* element = static_cast(node()); const KCDashArray& dashes = dashArray(); Wrong:
Image *SVGStyledElement::doSomething(PaintInfo &paintInfo) { SVGStyledElement *element = static_cast(node()); const KCDashArray &dashes = dashArray();
#include Statements
- All implementation files must #include "config.h" first. Header files should never include "config.h".
Right:
// RenderLayer.h #include "Node.h" #include "RenderObject.h" #include "RenderView.h"
Wrong:
// RenderLayer.h #include "config.h" #include "RenderObject.h" #include "RenderView.h" #include "Node.h"
- All implementation files must #include the primary header second, just after "config.h". So for example, Node.cpp should include Node.h first, before other files. This guarantees that each header's completeness is tested. This also assures that each header can be compiled without requiring any other header files be included first.
- Other #include statements should be in sorted order (case sensitive, as done by the command-line sort tool or the Xcode sort selection command). Don't bother to organize them in a logical order.
Right:
// HTMLDivElement.cpp #include "config.h" #include "HTMLDivElement.h" #include "Attribute.h" #include "HTMLElement.h" #include "QualifiedName.h"
Wrong:
// HTMLDivElement.cpp #include "HTMLElement.h" #include "HTMLDivElement.h" #include "QualifiedName.h" #include "Attribute.h"
"using" Statements
- In header files, do not use "using" statements in namespace (or global) scope.
Right:
// wtf/Vector.h namespace WTF { class VectorBuffer { using std::min; ... }; } // namespace WTFWrong:
// wtf/Vector.h namespace WTF { using std::min; class VectorBuffer { ... }; } // namespace WTF - In header files in the WTF sub-library, however, it is acceptable to use "using" declarations at the end of the file to import one or more names in the WTF namespace into the global scope.
Right:
// wtf/Vector.h namespace WTF { } // namespace WTF using WTF::Vector;Wrong:
// wtf/Vector.h namespace WTF { } // namespace WTF using namespace WTF;Wrong:
// runtime/UString.h namespace WTF { } // namespace WTF using WTF::PlacementNewAdopt; - In C++ implementation files, do not use statements of the form "using std::foo" to import names in the standard template library. Use "using namespace std" instead.
Right:
// HTMLBaseElement.cpp using namespace std; namespace WebCore { } // namespace WebCoreWrong:
// HTMLBaseElement.cpp using std::swap; namespace WebCore { } // namespace WebCore - In implementation files, if a "using namespace" statement is for a nested namespace whose parent namespace is defined in the file, put the statement inside that namespace definition.
Right:
// HTMLBaseElement.cpp namespace WebCore { using namespace HTMLNames; } // namespace WebCoreWrong:
// HTMLBaseElement.cpp using namespace WebCore::HTMLNames; namespace WebCore { } // namespace WebCore - In implementation files, put all other "using" statements at the beginning of the file, before any namespace definitions and after any "include" statements.
Right:
// HTMLSelectElement.cpp using namespace std; namespace WebCore { } // namespace WebCoreWrong:
// HTMLSelectElement.cpp namespace WebCore { using namespace std; } // namespace WebCore
-----
Cheers,
June
토요일, 1월 30, 2010
일기 (2010.01.30)
오늘 모처럼 바람도 쐴겸 장을 보러 킴스클럽에 갔다.
장이라고 해봐야 그냥 먹고 싶은것 사러 가는 것이다.
나도 이제 나이를 먹었는지 마트에서 연인 또는 부부끼리 장을 보다
잠시 먹거리를 먹는 모습을 볼 땐 괜히 옆이 허전하다.
잠시 먹거리를 먹는 모습을 볼 땐 괜히 옆이 허전하다.
"나도 여친 있으면 장도 보면서 맛있는 것도 먹고 할텐데" 라고 속으로 생각만 하며
맛나는 것 많이 사서 집에가서 먹자라고 마음을 먹고 쇼핑을 한다... -_-;;;
맛나는 것 많이 사서 집에가서 먹자라고 마음을 먹고 쇼핑을 한다... -_-;;;
나 혼자 착각일지도 모르지만 이젠 외롭다... ㅠ.ㅠ
노력이라기 보단... 음.. 노력이 맞겠구나...
잘 어울려야 하는데 그저 나 밖에 모르니...
난 혼자 명상을 하거나 산책을 하거나, 혼자 하는게 참 좋다.
하지만 혼자 하는게 정말 싫은 것도 너무 많다...
이래서 늘 혼자서 보내다 보니 옆에 누가 없는게 정상인것 같다.
그래도 내가 그 사람이 좋다고 해서 나랑 사귀자고 할수는 없잖아...
하지만 혼자 하는게 정말 싫은 것도 너무 많다...
이래서 늘 혼자서 보내다 보니 옆에 누가 없는게 정상인것 같다.
그래도 내가 그 사람이 좋다고 해서 나랑 사귀자고 할수는 없잖아...
태어나서 미팅은 처음 해봤지만 아무래도 서로 다른 생활을 하던
사람끼리 만나니 어색하기도 하고, 많이 불편해서 얘기도 잘 못하고... 음...
사람끼리 만나니 어색하기도 하고, 많이 불편해서 얘기도 잘 못하고... 음...
아... 외롭다. 이젠 혼자서 밥 먹는 것도 싫고,
황금 같은 금요일 저녁, 퇴근 후 다들 누군가를 만나러 갈 때
나 혼자서 서점에서 이런저런 책이나 보다 썰렁한 집에가고... 에휴...궁상 맞다.
황금 같은 금요일 저녁, 퇴근 후 다들 누군가를 만나러 갈 때
나 혼자서 서점에서 이런저런 책이나 보다 썰렁한 집에가고... 에휴...궁상 맞다.
오늘 사다놓은 "새우 캘리포니아 롤" 을 내일 먹을 생각하니 기분이 좋아진다.
헤헤... 고거 참 맛나겠다. ^^
헤헤... 고거 참 맛나겠다. ^^
-----
Cheers,
June
금요일, 1월 29, 2010
Qualcomm BMP (Brew Mobile Platform)
Qualcomm Brew Mobile Platform (BMP)
Source:
http://www.qualcomm.com/products_services/developer_network.html
https://brewmobileplatform.qualcomm.com/devnet/index.jsp
Download page
https://brewmobileplatform.qualcomm.com/devnet/multiplatform_sdk.jsp
Setup for C/C++ Environment – Visual Studio
Procedure for Brew MP C/C++ development environment with one or more versions of Microsoft Visual Studio and Microsoft Windows XP or Vista (UAC disabled):
Prerequisites:
1. Microsoft .NET Framework 3.5 SP1 (or newer).
http://www.microsoft.com/downloads/details.aspx?FamilyId=AB99342F-5D1A-413D-8319-81DA479AB0D7&displaylang=en
2. Adobe Flash® Player 10 ActiveX (or newer). Important: download and install the Adobe Flash Player using Internet Explorer browser for ActiveX version.
http://get.adobe.com/flashplayer/
3. Microsoft Visual Studio 2005 or 2008. To enable the Brew MP API code completion feature in Visual Studio 2005, install Microsoft Visual Studio 2005 IDE Enhancements.
http://www.microsoft.com/visualstudio/
http://www.microsoft.com/downloads/details.aspx?FamilyID=CD7C6E48-E41B-48E3-881E-A0E6E97F9534&displaylang=en
Installation Procedure - For best results, follow the steps in the order specified:
1. Download & install Sourcery G++ Lite Edition. This includes a CodeSourcery ARM compiler and GNU tools to help build and debug applications.
http://www.codesourcery.com/sgpp/lite/arm/portal/release1033
2. Download & install Brew MP Multiplatform SDK.
http://brewmpsdk.qualcomm.com/BREWMPSDKMP.exe
3. Install Brew MP SDK Visual Studio Plugin through the SDK Manager tool (on Setup tab, click the Visual Studio Plugin Install link located within the current toolset).
To get started, please refer to the Brew MP C Visual Studio Primer.
https://brewmobileplatform.qualcomm.com/devnet/prod/resources/devEx/library/primers/c/C_VS/PDF/c_visual_studio_primer.pdf
[Tip]
* Brew 2.x Problem Analysis
http://www.eetasia.com/ARTICLES/2007AUG/PDF/EEOL_2007AUG10_DSP_EMS_AN.pdf?SOURCES=DOWNLOAD
-----
Cheers,
June
Source:
http://www.qualcomm.com/products_services/developer_network.html
https://brewmobileplatform.qualcomm.com/devnet/index.jsp
Download page
https://brewmobileplatform.qualcomm.com/devnet/multiplatform_sdk.jsp
Setup for C/C++ Environment – Visual Studio
Procedure for Brew MP C/C++ development environment with one or more versions of Microsoft Visual Studio and Microsoft Windows XP or Vista (UAC disabled):
Prerequisites:
1. Microsoft .NET Framework 3.5 SP1 (or newer).
http://www.microsoft.com/downloads/details.aspx?FamilyId=AB99342F-5D1A-413D-8319-81DA479AB0D7&displaylang=en
2. Adobe Flash® Player 10 ActiveX (or newer). Important: download and install the Adobe Flash Player using Internet Explorer browser for ActiveX version.
http://get.adobe.com/flashplayer/
3. Microsoft Visual Studio 2005 or 2008. To enable the Brew MP API code completion feature in Visual Studio 2005, install Microsoft Visual Studio 2005 IDE Enhancements.
http://www.microsoft.com/visualstudio/
http://www.microsoft.com/downloads/details.aspx?FamilyID=CD7C6E48-E41B-48E3-881E-A0E6E97F9534&displaylang=en
Installation Procedure - For best results, follow the steps in the order specified:
1. Download & install Sourcery G++ Lite Edition. This includes a CodeSourcery ARM compiler and GNU tools to help build and debug applications.
http://www.codesourcery.com/sgpp/lite/arm/portal/release1033
2. Download & install Brew MP Multiplatform SDK.
http://brewmpsdk.qualcomm.com/BREWMPSDKMP.exe
3. Install Brew MP SDK Visual Studio Plugin through the SDK Manager tool (on Setup tab, click the Visual Studio Plugin Install link located within the current toolset).
To get started, please refer to the Brew MP C Visual Studio Primer.
https://brewmobileplatform.qualcomm.com/devnet/prod/resources/devEx/library/primers/c/C_VS/PDF/c_visual_studio_primer.pdf
[Tip]
* Brew 2.x Problem Analysis
http://www.eetasia.com/ARTICLES/2007AUG/PDF/EEOL_2007AUG10_DSP_EMS_AN.pdf?SOURCES=DOWNLOAD
-----
Cheers,
June
일기 (2010.01.28)
오늘 MBC "뉴스후+" 를 보았다.
그 중, 강제징용에 대한 section 을 보았는데 정말 우리나라 정부의 한심함과 무지함의 극치를 보는 듯 했다.
과연 국회에서 정치인들은 뭘 하고 있는지...
세상에, 우리나라에서 발에 땀 나도록 과거사에 대해 조사를 하고 일본에 문제점을 지적과 요구를 해야 하는데,
우리나라 사람도 아닌 일본인들이 나서서 진상규명에 대해 조사를 하고 증거를 수집하고 일본 정부에 항의를 하고 있다.
아사히 신문에서 "99엔" 보상에 대해 기사가 났었다. 국내에서는 MBC 외에는 작게 보도를 하거나 아예 그런 기사는 없었다고 한다.
이게 말이 되는건지... 더욱이 어이가 없는것은 "강제징용진상위원회"(?) 가 곧 해체될 위기에 처했으며 일본에서 유골을 보내 주겠다고 하는데도 그 유골 반환에 쓰일 예산이 2009년 12월 말 예산안 심사에서 제외되어 삭감되었다는 것이다. 그 잘난 4대강 예산안 때문에 파행을 겪었던 그 때 말이다... 정치인들은 뭐라고들 하냐면 여야를 떠나 하나 같이 다들 몰랐다는 것이다.
한숨만 나온다...
음... 과연 우리나라가 선진국이라고 해도 되는 것일까? 나라가 힘이 없는것도 아니고... 하루빨리 국회의원들이 정신을 차려야 우리나라가 좀 더 깨끗하고 올바른 방향으로 가리라 생각한다. 그리고 국회의원 뽑을 때 제발 학력에 제한은 두었으면 한다.
물론 어려운 환경속에서 열심히 공부해서 좋은 대학에 간 사람도 있을 것이다. 하지만, 그렇지 않는 경우에는 머리가 똑똑해서인지... 음... blah blah...
에씨... 오늘 아침부터 저녁까지 밥 맛있게 먹었는데 정치인들과 정부의 무지함에 기분이 아주 안 좋다...
이런 글을 작성하는 것 자체가 어쩌면 시간 낭비인 것 같다. -_-;
TV CF 중에 "안보고 안듣고 말 안하고" 를 얘기하는게 있는데 아주 마음에 든다.
하지만 그러면 안 되겠지? ㅎㅎ
깨끗한 날이 분명 올 것이라고 믿는다.
-----
Cheers,
June
그 중, 강제징용에 대한 section 을 보았는데 정말 우리나라 정부의 한심함과 무지함의 극치를 보는 듯 했다.
과연 국회에서 정치인들은 뭘 하고 있는지...
세상에, 우리나라에서 발에 땀 나도록 과거사에 대해 조사를 하고 일본에 문제점을 지적과 요구를 해야 하는데,
우리나라 사람도 아닌 일본인들이 나서서 진상규명에 대해 조사를 하고 증거를 수집하고 일본 정부에 항의를 하고 있다.
아사히 신문에서 "99엔" 보상에 대해 기사가 났었다. 국내에서는 MBC 외에는 작게 보도를 하거나 아예 그런 기사는 없었다고 한다.
이게 말이 되는건지... 더욱이 어이가 없는것은 "강제징용진상위원회"(?) 가 곧 해체될 위기에 처했으며 일본에서 유골을 보내 주겠다고 하는데도 그 유골 반환에 쓰일 예산이 2009년 12월 말 예산안 심사에서 제외되어 삭감되었다는 것이다. 그 잘난 4대강 예산안 때문에 파행을 겪었던 그 때 말이다... 정치인들은 뭐라고들 하냐면 여야를 떠나 하나 같이 다들 몰랐다는 것이다.
한숨만 나온다...
음... 과연 우리나라가 선진국이라고 해도 되는 것일까? 나라가 힘이 없는것도 아니고... 하루빨리 국회의원들이 정신을 차려야 우리나라가 좀 더 깨끗하고 올바른 방향으로 가리라 생각한다. 그리고 국회의원 뽑을 때 제발 학력에 제한은 두었으면 한다.
물론 어려운 환경속에서 열심히 공부해서 좋은 대학에 간 사람도 있을 것이다. 하지만, 그렇지 않는 경우에는 머리가 똑똑해서인지... 음... blah blah...
에씨... 오늘 아침부터 저녁까지 밥 맛있게 먹었는데 정치인들과 정부의 무지함에 기분이 아주 안 좋다...
이런 글을 작성하는 것 자체가 어쩌면 시간 낭비인 것 같다. -_-;
TV CF 중에 "안보고 안듣고 말 안하고" 를 얘기하는게 있는데 아주 마음에 든다.
하지만 그러면 안 되겠지? ㅎㅎ
깨끗한 날이 분명 올 것이라고 믿는다.
-----
Cheers,
June
월요일, 1월 11, 2010
느낌 좋은 글... (출처를 알 수 없음)
Title: 출처를 알수 없음
Source: 원본 출처는 알수 없으나 손성윤 (^^) 미니홈피에서 가져왔음
(http://www.cyworld.com/sy7235)
-----
Cheers,
June
Source: 원본 출처는 알수 없으나 손성윤 (^^) 미니홈피에서 가져왔음
(http://www.cyworld.com/sy7235)
"하루는 학교 갔다와서 엄마방에 들어갔는데
엄마가 죽은 듯이 누워있는거야. 멀리서 잠자코 쳐다보고 있었어.
우선은, 근데 엄마가 십분이 지나도 이십분이 지나도
계속 그 상태로 누워서 일어나지 않는 거야. 뒤척이지도 않고.
정말 죽은 사람 처럼."
"그래서"
"가까이 가 봤지. 코 앞에서 내려다봤어.
숨도 쉬지 않는 것 같았어.그래서 생각했지. 울 엄마 죽은 걸까.
눈물이 나려는데 엄마가 눈을 번쩍 떴어.
그리곤 일어나서 방을 나가더니 점심을 차려서 다시 돌아왔지.
숟가락을 내 손에 쥐어주면서 그 일에 대해선 아무 설명도 안해줬어."
"넌 왜 안 물어봤는데?"
"왠지 물어보면 안 될 것 같은 생각이 들어서"
"으응"
"그리고 다음주 그 요일에, 또 그 다음주 그 요일에, 또 그런식이였어.
죽은 사람 처럼 꼼짝도 없이 누워서 내 시선을 받아내고 있었어.
그런게 네번째 인가 다섯번째인가
그날은 점심을 밥 대신 국수를 먹었거든. 내 생일이였어.
오래 살아야 된다면서 엄마가 이번엔 숟가락 대신 젓가락을 쥐여줬어.
막 국수를 한 가닥 끌여올렸는데 엄마가 그랬어.
궁금하지 않냐고. 왜 그러고 있는 건지.
사실 그때는 별로 궁금하지 않았지만 사소한 걸로 싸우기 싫으니까
어,말해줘. 그랬지. 그러니까 엄마가 그래.
죽는 연습 하는 거라고.
만약에 어느날 갑자기 또 어떤 이유로 그렇게 느닷없이
엄마가 죽어버릴 수도 있으니까 나를 단련시키는 연습을 하는 거라고."
"그래서 넌 뭐라고 했는데?"
"아, 그렇구나"
"그게..다야?"
"엄마도 대수롭지 않게 말했으니까.
그랬는데 내가 막 여름방학 하던 날이였나봐.
그 날도 엄마는 연습을 하고 있었거든. 그 쓸데없는 연습.
방해하지 않으려고 점심 안 먹어도 돼,
오늘. 그러고 방에 들어가서 좀 놀다가 왔는데
그때 까지도 엄마는 연습중이었어.
그래서 이번엔 나가서 놀다가 들어왔는데 그때도 엄마는
그 상태 그대로였어. 다음 날 자고 일어나서 방에 들어갔을 때도
그대로인 엄마를 보고야 알았어. 이번엔 연습이 아니네."
여전히 수잔과 남자는 걷고 있다.
느릿느릿 말하던 수잔의 고개는 지루한 듯 떨어진다.
마치 남의 얘기를 하고 있다는 듯이.
"그런데 효력이 있더라고. 별로 슬프지 않았어. 난 단단해져서 벌써"
"응."
"그러니까 우리 헤어지자."
우뚝 멈추어서지도 불쑥 끊겨버리지도 않는다.
그대로 흐르고 있다. 이 노곤하고 잔잔한 기류.
남자가 고갤 돌려 웃었다.
아니 웃는 걸까.
"훈련시키는 거냐, 나?"
"응, 그러니까 늘 긴장하고 있어.
언젠간 진짜 헤어지는 날이 와도 슬프지 않게."
-----
Cheers,
June
일요일, 1월 10, 2010
일기 (2010.01.09) 요즘 드라마... 그리고 나에 대한 얘기...
2010년 방송사 별 내가 요즘 관심있게 보는 드라마들 이다.
- MBC: "보석 비빔밥", "파스타"
- KBS: "추노", "공부의 신"(일본 만화 원작 - "최강입시전설 꼴찌, 동경대 가다!", TBS 방영 - "드래곤 사쿠라")
- SBS: "크리스마스에 눈이 올까요"
요즘 이 드라마 들에 푹 빠져있다.
story 는 내 마음을 잡기엔 충분한 것 같다. 현실에 맞는 상황 scene, 역사, 전문주제, 어울리다고는 생각하진 않지만 철학적인 것 등등, 이렇게 각각 엮이지 않고, 독특한 character 들이 있으며 급하게 진행하지 않는 부분들이 나에게 많은 즐거움을 준다.
또한 나에게 많은 지식과 작가들의 상상력을 배울수 있는 기회를 주기도 한다. 아직 재능이 부족해 완성하지 못한 대본 및 글들이 있다. 완성을 해야 하지만, 사실 이런 저런 핑계가 많아서 -게으르다는 표현이 좀더 정확하겠지? ㅎㅎ- 손을 대지 못하고 있다. 하지만 언젠가는 꼭 완성 할 것이다.
음악도 마찬가지이다. humming 으로 녹음 및 간단하게 작성한 score (MIDI), 여러 DAW, device 로 작업한 많은 sound 나 music 이 있다. 이것 역시 완성된 것은 거의 없다. legacy DAW 으로 작업한 곡들도 많이 있지만 modern DAW 으로 porting 하는 것이 여간 쉽지 않다.
나에게 올바른 방향이라고 함은, 이러한 것들이 완성이 되지 않아서 되도록 빠른 시일내에 완성을 하는 것이 아닌,... 꾸준한 시간을 갖고, 여유롭게 이러한 작업들을 즐기면서 완성도를 높이는 것이다.
어쩌면 내가 지금까지 이렇게 해왔던 것이 내 자신 스스로 즐기고 있던것은 아닐까? 늘 새로운 것을 좋아 하지만, 한번 손에 잡은 것을 바로 끝내는 것이 아닌 여유를 갖고 계속 즐기는 것이 어쩌면 내가 바라는, 내가 나도 모르게 실천해 오던 이상적인 작업은 아니였나 생각해 본다.
난 참, 나를 사랑한다.
이런 일들을 나 스스로 즐기며 발전 시키고, 연구 해 나가는 내 모습이 참 사랑스럽다. 비단 드라마, 음악만은 아니다. 관심있게 공부하는 Medical Science (Thoracic Surgery), 나에 전공인 Computer Engineering, Software Developer 및 Software Engineer 로써도 앞으로 생을 마감하는 날까지 공부는 끊임없이 계속할 것이며 배워나갈 것이다. 이러한 마음가짐과 행동은 지난 날 아주 어렸을 때 공부하지 않고 걱정만을 끼쳐 드렸던 부모님에 대한 예의 이며 효도라고 생각한다.
고등학교 입학하고 부터 마음 먹었던 그런 초심을 아직까지는 잘 유지하고 행동으로 잘 실천 하고는 있는 것 같다. 앞으로도 이러한 초심을 잃지 않고 공부 만큼은 열심히 하련다. 그저 이러한 것으로 인해 그 동안 어긋나지 않고 바르게 키워주신 부모님께, 앞으로는 물론 늘, 큰 도움이 되었으면 좋겠다.
-----
Cheers,
June
- MBC: "보석 비빔밥", "파스타"
- KBS: "추노", "공부의 신"(일본 만화 원작 - "최강입시전설 꼴찌, 동경대 가다!", TBS 방영 - "드래곤 사쿠라")
- SBS: "크리스마스에 눈이 올까요"
요즘 이 드라마 들에 푹 빠져있다.
story 는 내 마음을 잡기엔 충분한 것 같다. 현실에 맞는 상황 scene, 역사, 전문주제, 어울리다고는 생각하진 않지만 철학적인 것 등등, 이렇게 각각 엮이지 않고, 독특한 character 들이 있으며 급하게 진행하지 않는 부분들이 나에게 많은 즐거움을 준다.
또한 나에게 많은 지식과 작가들의 상상력을 배울수 있는 기회를 주기도 한다. 아직 재능이 부족해 완성하지 못한 대본 및 글들이 있다. 완성을 해야 하지만, 사실 이런 저런 핑계가 많아서 -게으르다는 표현이 좀더 정확하겠지? ㅎㅎ- 손을 대지 못하고 있다. 하지만 언젠가는 꼭 완성 할 것이다.
음악도 마찬가지이다. humming 으로 녹음 및 간단하게 작성한 score (MIDI), 여러 DAW, device 로 작업한 많은 sound 나 music 이 있다. 이것 역시 완성된 것은 거의 없다. legacy DAW 으로 작업한 곡들도 많이 있지만 modern DAW 으로 porting 하는 것이 여간 쉽지 않다.
나에게 올바른 방향이라고 함은, 이러한 것들이 완성이 되지 않아서 되도록 빠른 시일내에 완성을 하는 것이 아닌,... 꾸준한 시간을 갖고, 여유롭게 이러한 작업들을 즐기면서 완성도를 높이는 것이다.
어쩌면 내가 지금까지 이렇게 해왔던 것이 내 자신 스스로 즐기고 있던것은 아닐까? 늘 새로운 것을 좋아 하지만, 한번 손에 잡은 것을 바로 끝내는 것이 아닌 여유를 갖고 계속 즐기는 것이 어쩌면 내가 바라는, 내가 나도 모르게 실천해 오던 이상적인 작업은 아니였나 생각해 본다.
난 참, 나를 사랑한다.
이런 일들을 나 스스로 즐기며 발전 시키고, 연구 해 나가는 내 모습이 참 사랑스럽다. 비단 드라마, 음악만은 아니다. 관심있게 공부하는 Medical Science (Thoracic Surgery), 나에 전공인 Computer Engineering, Software Developer 및 Software Engineer 로써도 앞으로 생을 마감하는 날까지 공부는 끊임없이 계속할 것이며 배워나갈 것이다. 이러한 마음가짐과 행동은 지난 날 아주 어렸을 때 공부하지 않고 걱정만을 끼쳐 드렸던 부모님에 대한 예의 이며 효도라고 생각한다.
고등학교 입학하고 부터 마음 먹었던 그런 초심을 아직까지는 잘 유지하고 행동으로 잘 실천 하고는 있는 것 같다. 앞으로도 이러한 초심을 잃지 않고 공부 만큼은 열심히 하련다. 그저 이러한 것으로 인해 그 동안 어긋나지 않고 바르게 키워주신 부모님께, 앞으로는 물론 늘, 큰 도움이 되었으면 좋겠다.
-----
Cheers,
June
토요일, 1월 09, 2010
USB Web Camera Test in SKT WIPI Emulator
WIPI SDK Camera Test
- you have to have an USB Webcam(recommended Logitech device) for prepare to camera test in SKT WIPI SDK
- below codes are not tested but have an enjoy! lol ㅋㅋㅋ --- June
* Simple Camera Test code
void cameraTest(void) {
M_Int32 ret = -1;
M_Int32 fd = 0;
M_Byte buf[2048];
MC_CameraInfo info;
MC_CameraOption option;
MC_CameraSnapshot snapshot;
M_Uint32 memID_pByteBuf = 0;
M_Byte* pByteBuf = NULL;
memset( (void*)buf, 0x00, sizeof(buf) );
// Open Camera
fd = OEMC_ioDevOpen( "Camera", 0, NULL );
if( fd )
MC_knlPrintk( "Open Camera [OK]\n" );
else {
MC_knlPrintk( "Open Camera [Fail]\n" );
return;
}
ret = OEMC_ioDevControl( fd, "GETSTATUS", &buf, (void*)sizeof(buf) );
if( !ret )
MC_knlPrintk( "Camera Status:\n%s\n", buf );
else {
MC_knlPrintk( "Camera Status [Fail]\n" );
return;
}
if( !ret )
ret = OEMC_ioDevControl( fd, "GETOPTION", &option, NULL );
else {
MC_knlPrintk( "GETOPTION [Fail]\n" );
return;
}
option.nPreviewWidth = 100;
option.nPreviewHeight = 100;
option.nPreviewPosX = 0;
option.nPreviewPosY = 0;
option.nCurrentResolution = 1;
strncpy( option.szCurrentImageType, "image/jpeg", sizeof(option.szCurrentImageType) );
if( !ret )
ret = OEMC_ioDevControl( fd, "SETOPTION", &option, NULL );
else {
MC_knlPrintk( "SETOPTION [Fail]\n" );
return;
}
// Turn on Preview
if( !ret )
ret = OEMC_ioDevControl( fd, "SETPREVIEW", (void*)"on", NULL );
else {
MC_knlPrintk( "SETPREVIEW [Fail]\n" );
return;
}
// Take a snapshot
ret = MC_ioDevControl( fd, "GETSNAPSHOT", &snapshot, NULL );
if( !ret ) {
if( memID_pByteBuf )
MC_knlFree( memID_pByteBuf );
memID_pByteBuf = MC_knlAlloc( snapshot.nImageDataSize );
pByteBuf = (M_Byte*)MC_GETDPTR( memID_pByteBuf );
if( pByteBuf )
memset( (void*)pByteBuf, 0x00, sizeof(snapshot.nImageDataSize) );
else {
MC_knlPrintk( "Allocates buffer [Fail]\n" );
memID_pByteBuf = 0;
return;
}
ret = MC_ioDevRead( fd, pByteBuf, snapshot.nImageDataSize );
if( ret ) { // read size
M_Int32 hFile;
M_Int32 retMkDir = 0;
M_Int32 flag = MC_FILE_OPEN_WRTRUNC;
M_Char* pFilename = "test_out.jpg";
M_Int32 len = snapshot.nImageDataSize;
M_Char* pFileExt = snapshot.szImageType;
hFile = MC_fsOpen( pFilename, flag, MC_DIR_PRIVATE_ACCESS );
if( hFile < 0 ) {
MC_knlPrintk( "Open a file to write [Fail]\n" );
return;
}
MC_fsSeek( hFile, 0, MC_FILE_SEEK_END );
MC_fsWrite( hFile, pByteBuf, len );
MC_fsClose( hFile );
}
/*
{
M_Char retBuf[255] = { 0 };
M_Char* pFilename = "test_out2.jpg";
M_Int32 len = snapshot.nImageDataSize;
memset( (void*)retBuf, 0x00, sizeof(retBuf) );
strcpy( retBuf, "PHOTO" );
ret = MC_termResWrite( "PHOTO",
retBuf, sizeof(retBuf),
pFilename, "image/jpeg",
pByteBuf, len, MC_TERMRES_CREATE );
if( ret < 0 ) {
MC_knlPrintk( "MC_termResWrite [Fail]\n" );
return;
}
}
*/
}
// Release resource
if( fd ) ret = MC_ioDevClose( fd );
fd = 0;
if( memID_pByteBuf ) MC_knlFree( memID_pByteBuf );
memID_pByteBuf = 0;
}
* Camera image with mask-based foreground image
* - NOT TESTED
{
M_Int32 ret = -1;
M_Uint32 memID_pByteBufFrame = 0;
M_Byte* pByteBufFrame = NULL;
MC_CameraFrameInfo frameInfo;
MC_FileInfo fileInfo;
M_Int32 frameFileSize = 0;
M_Uint32 fd_res = 0;
#ifdef _VCDLL
if( MC_fsFileAttribute("PHOTO/test_frame.bmp", &fileInfo, MC_DIR_SYSTEM_ACCESS) < 0 ) {
MC_knlPrintk( "MC_fsFileAttribute [Fail]\n" );
return;
}
if( (fd_res = MC_fsOpen("PHOTO/test_frame.bmp", MC_FILE_OPEN_RDONLY, MC_DIR_SYSTEM_ACCESS)) < 0 ) {
MC_knlPrintk( "MC_fsOpen [Fail]\n" );
return;
}
frameFileSize = fileInfo.size;
if( memID_pByteBufFrame )
MC_knlFree( memID_pByteBufFrame );
memID_pByteBufFrame = MC_knlCalloc( frameFileSize );
if( memID_pByteBufFrame <= 0 ) {
MC_knlPrintk( "Allocates buffer [Fail]\n" );
}
pByteBufFrame = (M_Byte*)MC_GETDPTR( memID_pByteBufFrame );
if( MC_fsRead(fd_res, pByteBufFrame, frameFileSize) < 0 ) {
MC_knlPrintk( "MC_fsRead [Fail]\n" );
MC_knlFree( memID_pByteBufFrame );
MC_fsClose( fd_res );
return;
}
MC_fsClose( fd_res );
#else
frameFileSize = OEMC_termResGetSize( "PHOTO", "test_frame.bmp" );
if( frameFileSize < 0 ) {
MC_knlPrintk( OEMC_termResGetSize [Fail]\n" );
return;
}
if( memID_pByteBufFrame )
MC_knlFree( memID_pByteBufFrame );
memID_pByteBufFrame = MC_knlCalloc( frameFileSize );
if( memID_pByteBufFrame <= 0 ) {
MC_knlPrintk( "Allocates buffer [Fail]\n" );
}
pByteBufFrame = (M_Byte*)MC_GETDPTR( memID_pByteBufFrame );
if( OEMC_termResRead("PHOTO", "test_frame.bmp", pByteBufFrame, frameFileSize) < 0 ) {
MC_knlPrintk( "OEMC_termResRead [Fail]\n" );
MC_knlFree( memID_pByteBufFrame );
return;
}
#endif
//
// Frame
//
// Frame Image: Width(4 bytes), Height(4 bytes), 16 bit raw data (RGB: 565)
frameInfo.TransparencyColor = 0x00050605; // 0x00RRGGBB
frameInfo.pBmpBuffer = pByteBufFrame;
frameInfo.nBmpBufferSize = frameFileSize;
ret = OEMC_ioDevControl( fd, "SETFRAMEIMAGE", (void*)"on", &frameInfo );
if( ret < 0 ) {
MC_knlPrintk( "SETFRAMEIMAGE [Fail]\n" );
return;
}
}
-----
Cheers,
June
- you have to have an USB Webcam(recommended Logitech device) for prepare to camera test in SKT WIPI SDK
- below codes are not tested but have an enjoy! lol ㅋㅋㅋ --- June
* Simple Camera Test code
void cameraTest(void) {
M_Int32 ret = -1;
M_Int32 fd = 0;
M_Byte buf[2048];
MC_CameraInfo info;
MC_CameraOption option;
MC_CameraSnapshot snapshot;
M_Uint32 memID_pByteBuf = 0;
M_Byte* pByteBuf = NULL;
memset( (void*)buf, 0x00, sizeof(buf) );
// Open Camera
fd = OEMC_ioDevOpen( "Camera", 0, NULL );
if( fd )
MC_knlPrintk( "Open Camera [OK]\n" );
else {
MC_knlPrintk( "Open Camera [Fail]\n" );
return;
}
ret = OEMC_ioDevControl( fd, "GETSTATUS", &buf, (void*)sizeof(buf) );
if( !ret )
MC_knlPrintk( "Camera Status:\n%s\n", buf );
else {
MC_knlPrintk( "Camera Status [Fail]\n" );
return;
}
if( !ret )
ret = OEMC_ioDevControl( fd, "GETOPTION", &option, NULL );
else {
MC_knlPrintk( "GETOPTION [Fail]\n" );
return;
}
option.nPreviewWidth = 100;
option.nPreviewHeight = 100;
option.nPreviewPosX = 0;
option.nPreviewPosY = 0;
option.nCurrentResolution = 1;
strncpy( option.szCurrentImageType, "image/jpeg", sizeof(option.szCurrentImageType) );
if( !ret )
ret = OEMC_ioDevControl( fd, "SETOPTION", &option, NULL );
else {
MC_knlPrintk( "SETOPTION [Fail]\n" );
return;
}
// Turn on Preview
if( !ret )
ret = OEMC_ioDevControl( fd, "SETPREVIEW", (void*)"on", NULL );
else {
MC_knlPrintk( "SETPREVIEW [Fail]\n" );
return;
}
// Take a snapshot
ret = MC_ioDevControl( fd, "GETSNAPSHOT", &snapshot, NULL );
if( !ret ) {
if( memID_pByteBuf )
MC_knlFree( memID_pByteBuf );
memID_pByteBuf = MC_knlAlloc( snapshot.nImageDataSize );
pByteBuf = (M_Byte*)MC_GETDPTR( memID_pByteBuf );
if( pByteBuf )
memset( (void*)pByteBuf, 0x00, sizeof(snapshot.nImageDataSize) );
else {
MC_knlPrintk( "Allocates buffer [Fail]\n" );
memID_pByteBuf = 0;
return;
}
ret = MC_ioDevRead( fd, pByteBuf, snapshot.nImageDataSize );
if( ret ) { // read size
M_Int32 hFile;
M_Int32 retMkDir = 0;
M_Int32 flag = MC_FILE_OPEN_WRTRUNC;
M_Char* pFilename = "test_out.jpg";
M_Int32 len = snapshot.nImageDataSize;
M_Char* pFileExt = snapshot.szImageType;
hFile = MC_fsOpen( pFilename, flag, MC_DIR_PRIVATE_ACCESS );
if( hFile < 0 ) {
MC_knlPrintk( "Open a file to write [Fail]\n" );
return;
}
MC_fsSeek( hFile, 0, MC_FILE_SEEK_END );
MC_fsWrite( hFile, pByteBuf, len );
MC_fsClose( hFile );
}
/*
{
M_Char retBuf[255] = { 0 };
M_Char* pFilename = "test_out2.jpg";
M_Int32 len = snapshot.nImageDataSize;
memset( (void*)retBuf, 0x00, sizeof(retBuf) );
strcpy( retBuf, "PHOTO" );
ret = MC_termResWrite( "PHOTO",
retBuf, sizeof(retBuf),
pFilename, "image/jpeg",
pByteBuf, len, MC_TERMRES_CREATE );
if( ret < 0 ) {
MC_knlPrintk( "MC_termResWrite [Fail]\n" );
return;
}
}
*/
}
// Release resource
if( fd ) ret = MC_ioDevClose( fd );
fd = 0;
if( memID_pByteBuf ) MC_knlFree( memID_pByteBuf );
memID_pByteBuf = 0;
}
* Camera image with mask-based foreground image
* - NOT TESTED
{
M_Int32 ret = -1;
M_Uint32 memID_pByteBufFrame = 0;
M_Byte* pByteBufFrame = NULL;
MC_CameraFrameInfo frameInfo;
MC_FileInfo fileInfo;
M_Int32 frameFileSize = 0;
M_Uint32 fd_res = 0;
#ifdef _VCDLL
if( MC_fsFileAttribute("PHOTO/test_frame.bmp", &fileInfo, MC_DIR_SYSTEM_ACCESS) < 0 ) {
MC_knlPrintk( "MC_fsFileAttribute [Fail]\n" );
return;
}
if( (fd_res = MC_fsOpen("PHOTO/test_frame.bmp", MC_FILE_OPEN_RDONLY, MC_DIR_SYSTEM_ACCESS)) < 0 ) {
MC_knlPrintk( "MC_fsOpen [Fail]\n" );
return;
}
frameFileSize = fileInfo.size;
if( memID_pByteBufFrame )
MC_knlFree( memID_pByteBufFrame );
memID_pByteBufFrame = MC_knlCalloc( frameFileSize );
if( memID_pByteBufFrame <= 0 ) {
MC_knlPrintk( "Allocates buffer [Fail]\n" );
}
pByteBufFrame = (M_Byte*)MC_GETDPTR( memID_pByteBufFrame );
if( MC_fsRead(fd_res, pByteBufFrame, frameFileSize) < 0 ) {
MC_knlPrintk( "MC_fsRead [Fail]\n" );
MC_knlFree( memID_pByteBufFrame );
MC_fsClose( fd_res );
return;
}
MC_fsClose( fd_res );
#else
frameFileSize = OEMC_termResGetSize( "PHOTO", "test_frame.bmp" );
if( frameFileSize < 0 ) {
MC_knlPrintk( OEMC_termResGetSize [Fail]\n" );
return;
}
if( memID_pByteBufFrame )
MC_knlFree( memID_pByteBufFrame );
memID_pByteBufFrame = MC_knlCalloc( frameFileSize );
if( memID_pByteBufFrame <= 0 ) {
MC_knlPrintk( "Allocates buffer [Fail]\n" );
}
pByteBufFrame = (M_Byte*)MC_GETDPTR( memID_pByteBufFrame );
if( OEMC_termResRead("PHOTO", "test_frame.bmp", pByteBufFrame, frameFileSize) < 0 ) {
MC_knlPrintk( "OEMC_termResRead [Fail]\n" );
MC_knlFree( memID_pByteBufFrame );
return;
}
#endif
//
// Frame
//
// Frame Image: Width(4 bytes), Height(4 bytes), 16 bit raw data (RGB: 565)
frameInfo.TransparencyColor = 0x00050605; // 0x00RRGGBB
frameInfo.pBmpBuffer = pByteBufFrame;
frameInfo.nBmpBufferSize = frameFileSize;
ret = OEMC_ioDevControl( fd, "SETFRAMEIMAGE", (void*)"on", &frameInfo );
if( ret < 0 ) {
MC_knlPrintk( "SETFRAMEIMAGE [Fail]\n" );
return;
}
}
-----
Cheers,
June
피드 구독하기:
글 (Atom)