C++ Template 사용법을 찾다가 MFC

C/C++를 사용해온지 오래되었지만 자주 사용하지 않는 기능이 있다. 
자주 사용하지 않다보니 잊어버리는 것들... 
좀더 업그레이드 시켜서 정리하고 싶은 마음에 찾아본 사이트인데 괜찮은듯 하다. 
자세한 내용은 봐야겠지만 말이다.


MFC Library one of the goods MFC


MFC 에서 String 처리 MFC

아주 명료하게 잘 정리되어 있다.
이 사람의 다른 글들도 유용한 것들이 많은것 같다.

The Complete Guide to C++ Strings, Part I - Win32 Character Encodings

http://www.codeproject.com/KB/string/cppstringguide1.aspx

The Complete Guide to C++ Strings, Part II - String Wrapper Classes





묵상 일상

사람은 에너지를 만들어 내는 방식이 다양하다.
기본적인 육체적 에너지가 기본이 되겠지만
내면에서 영과 혼에서 생성되는 에너지를 가지고 일을 하게 되면
지치지 않고 주님의 일들을 감당할 수 있는 그런 능력의 삶을 살아갈 수 있을것이라고 생각하게 된다.

사람은 말한마디에 힘이나고 김이새거나 너무나 연약한 모습을 갖고 있지만
대체로 사람들은 이 부분을 간과 하게 되는 경우가 많다.

사람을 만나서 에너지를 얻기도 하고 뺏기기도 하고
성향적으로도 비슷한 경우가 발생하고
주어진 상황에 따라 비슷한 경우가 발생하게 되는것 같다.

영의 깊은곳에서 솟아나오는 이 에너지는 마르지 않는 샘과 같고 
새로운 에너지의 원천이 된다는 것을 잊어서는 안된다.

매일의 삶 가운데 묵상을 통해서 이 생수를 퍼올리는 자만이
생명을 살리는 삶을...
영혼을 살리는 삶을...
하나님나라와 주님의 영광을 위해 온전하게 살아나가는 비결인것이다.

약한 자존감은 에너지 생성을 잘 하지 못한다.
인간은 약할 수 밖에 없다. 
그러므로 절대자이신 하나님!
예수님의 십자가를 통한 그 사랑만을 의지하며
이 모든것들이 힘의 원천이 되어야 한다.


Visual C/C++ GPIB Project 할때 생성시 유의 사항 MFC

Test Environment

Compiler : Visual C/C++ 4.0 ~
GPIB Card : NI-488.2 USB

NI에서 제공하는 CD의 관련파일들을 설치하고 나면 아래의 예와 같은 폴더에 지원파일들이 설치된다.

Library Directory
C:\Program Files\National Instruments\Shared\ExternalCompilerSupport\C\lib32

Include Directory
C:\Program Files\National Instruments\Shared\ExternalCompilerSupport\C\include

새롭게 MFC를 지원하는 프로젝트를 생성해서 작업을 하려면
다음 설정이 변경되어 있어야 한다.

Properties --> Configuration Properties --> General --> VC++ Directories --> Include Directories
Properties --> Configuration Properties --> General --> VC++ Directories --> Reference Directories
Properties --> Configuration Properties --> General --> Use of MFC --> Use MFC in a Shared DLL

 


묵상


하나님을 인간의 지식범위 내에서 한정짓고 제한하는 오류를 범하는 경우가 많다.
신앙은 삶이 모든것이지 사람이 자신의 지식과 한계로 규정할 만한 것이 아니다.
종교라는 이름으로 허전한 구석을 메우는 하나의 철학쯤으로 생각하는 것.
그것이 죄악된 세태의 모습일 것이다.
예수님의 십자가 보혈이 이 세상의 어떠한 무엇으로도 바꿀 수 없듯이
말씀이신 예수님의 그 능력을 떠나서는 유한한 세상을 살아가는 유기체일 뿐이다.
하나님은 동행하시며 그 존재를 늘 계시하시는 분이시다.
이미 천국은 이땅에 삶가운데 임하고 있지만
많은 사람들은 그것을 외면한체 자신의 오만과 자신의 자신됨을 가지고 살아간다.
그것을 깨우치시려고 주님은 비유를 통해 다양하고도 입체적인 말씀으로
늘 다가오시며 노크하고 계신다.
듣는귀가 있는자 누구인가...

호흡이며 대화의 주체이신 주님과의 동행하는 삶만이
이 세상에서 천국을 체험하는 유일한 길이다.
죄인임을 고백하고 십자가 보혈로 우리죄를 대속하신 주님을 유일한 구원의 주로 고백하는 길만이 
죄된 본성에서 떠나 영원을 향한 첫발임을 잊어서는 안된다.


Reversing Android Apps 101 - 퍼온글


TUESDAY, SEPTEMBER 28, 2010

Reversing Android Apps 101

First blog post in a long time, so I figured I should start back off with something I've been getting a lot of questions about lately, which is how to get started with learning more about Android application security. 

I think the absolute best way to understand what's going on is to start looking at real world applications. This tutorial will show you how to download an Android application and convert it back into a format that we prefer, which is its original Java code. Hopefully this will be the first tutorial of many, so be sure to check back from time to time.

I hope this post can be of use to developers as well, in order to better understand that the code they allow to be distributed on mobile devices can easily be decompiled. If you are storing hardcoded credentials or reference other things you don't want the user (or bad guys) to know about, you should re-evaluate that design choice.

My disclaimer is that this should not be used for malicious purposes, etc etc and all of the other stuff no one will likely listen to.

To get started, you will need these applications on your box:
-Android SDK
-dex2jar
-apktool (JAR and dependencies)
-JD (or a similar Java decompiler)

The first step is to download the Android SDK (Software Development Kit). You will rely on this heavily when testing applications and interacting with Android devices. There are many useful utilities bundled with it including Android Debug Bridge (ADB) and the emulator.

The next step is to download an interesting application to rip open. Most of us are Twitter fans, so why don't we take a look at the Twitter application for Android? 

At this point, you have 2 choices:

-Download it to your physical Android device
-Download it to a virtual device running in the Android emulator

By default, the virtual devices available using the emulator that comes with the Android SDK do not have the Google Market application installed. You can either 1) spend time finding ways around this or 2) install an image that has the software pre-loaded. Here is an excellent tutorial on how to go that route, although you may want to use a more up to date image than the ones referenced. They use older versions of Android.

Android Emulator Tutorial

Assuming you have either plugged your phone in or started an Android virtual machine, in the tools folder of the Android SDK folder, you'll find several utilities incuding ADB. I recommend familiarizing yourself with it, as you will use it almost constantly if you are working with the Android platform.

ADB allows us to do many things including connect to the device and have shell access. We first need to figure out where the application we downloaded is stored. Under the /data/app/ directory, we will find all of the APK files for applications we've downloaded. Under /system/app is all of the applications included with your Android distribution. For this tutorial, we are concerned with /data/app as this is where our Twitter application will be located.



Now that we know what we want to download, we need to transfer the file to our local system for further analysis. This can be achieved also by using ADB. 

We will not be using the shell this time, but rather the "pull" command which allows us to select and retrieve files from the Android device. The general format for this command is: adb pull apk_file destination_directory



Now that we have the APK file, we'll need to unzip it. The APK is simply in standard ZIP format, so any of your existing ZIP compatible utilities will work. 

After unzipping the APK file, there are two things you should be primarily concerned with at this point: looking at the manifest file, and getting the .DEX file into a more desirable format to work with. The manifest contains juicy information like permissions, intent filters, and lots more. If you aren't familiar with the manifest file and how its used with Android applications, I highly recommend reading the documentation on the Android development site:

Manifest Intro

If you try to open the AndroidManifest.xml file that was just unzipped, you'll find that it isn't in plain text. We'll use apktool at this point to convert it into a format we are comfortable with. We'll use apktool to decode the entire APK, and then the manifest file should be much easier on the eyes:



After running apktool, this is what the AndroidManifest.xml file should look like when viewed in a text editor or Eclipse:



The classes.dex file in the originally unzipped APK file is the crown jewel here. It contains all of the application's code, but in the Dalvik Executable format. 

There are tools such as dedexer and apktool that will convert .DEX into smali assembly format, but again we are concerned with looking at the Java code. We can use dex2jar to achieve this:

dex2jar.bat path_to_classes.dex

Once we've run dex2jar, there will be a classes.dex.dex2jar.jar file in the folder where the original .DEX file was located. Simply unzip this JAR file. Upon unzipping it, we see a bunch of .class files.



Nothing to worry about, this is familiar territory at this point. Simply use your favorite Java decompiler to convert from bytecode to easily readable code. 



We now have complete access to the entire client application. In the tutorials to come, I'll show you some things you should be paying close attention to when reviewing or designing an Android application. 



오픈소스 클라우드 컴퓨팅 솔루션


오픈소스 클라우드 컴퓨팅 솔루션

클라우드 컴퓨팅에 대한 많은 자료들이 인터넷을 돌고있다. 기술 또한 각 용어들과 기능들이 저마다 달라 누가 먼저 선점하고 나가느냐에 따라서 용어의 의미와 정의가 달라지는 격변기에 있다고 해도 과언은 아닌듯 하다. 
실제 아마존과 그외에 VMWare, Citrix등 상용업체들이 이미 서비스를 시작하고 있고 그외에도 수많은 업체들이 자신들의 솔루션을 들고나와 자신들의 목소리와 힘을 펼쳐보려고 노력하고 있는 상황임에 틀림이 없다. 이 부분에 있어서 별달리 힘없는 나같은 개발자에게 있어서 오픈소스 진영의 흐름은 큰 도움이 될때가 많다. 
현재 많은 오픈소스기반의 클라우드 컴퓨팅 솔루션들이 하나씩 등장해서 이미 많이 자리잡고 있음을 검색을 통해서 알 수 있고 위키에 이미 정의 되어 올라온 솔루션만 해도 넉넉히 많다. 이 모든 솔루션들을 다 테스트해 보지는 못하겠지만 할 수만 있다면 하나씩 테스트해서 그 특징과 그 기능의 적용범위를 점검해 봤으면 하는 것이 솔직한 심정이다. 일단 먼저 어떤 솔루션이 있는지 정리부터 해보도록 하자.





하둡 이것 저것...


인터넷에 많은 자료들이 있지만 이를 잘 정리해 놓은 사이트는 많지 않은것 같다.
하나씩 정리하다 보면 좋은 일이 생길 것이다. ㅎㅎㅎ
상당부분 많은 지식과 노력들이 하둡에 집중되고 있슴을 알 수 있다.
검색해서 찾아가면 갈수록 많은 자료들이 지금 이 시간도 만들어지고 있다. 세간의 관심사임에 틀림이 없다.
다음은 Hadoop과 MapReduce에 관한 자료들을 검색및 링크등을 통해 짧은 주석을 달아 정리해나가는 중이다.

하둡의 공식사이트는 검색엔진에서 하둡이라고 치면 바로 연결되는 사이트가 아파치의 사이트이다.

http://hadoop.apache.org/

그동안의 이력과 진행상황등을 잘 알 수 있고 현재 버전도 다운로드받거나 Contribution 할 수 있는 기회가 주어지며 어떻게 하는지에 대해서도 상세히 설명을 해주고 있다.

일단 먼저 하둡을 테스트해 보려면 아래의 사이트에 나와있는대로 Ubuntu Linux를 설치해서 해볼 수 있다.
하둡은 싱글노드에서도 멀티노드에서도 잘 돌아가는 훌륭한 시스템이다. 먼저 공부를 목적으로 싱글노드에서 돌려 보도록 하자.

http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-single-node-cluster/

하둡과 맵리듀스를 처음 설치하려고 검색을 하면 처음 나타나는 것이 이 페이지이다.  실제 Ubuntu에서 그대로 동작하고 MapReduce를 배우는데 있어서 좋은 첫 설치메뉴얼인것 같다. 설치후 하둡에서 제공하는 예제를 실행시켜 볼 수도 있다.

얼마전 알게된 사이트 사실 야후에서도 많은 지원을 하고 있는것 같다.
http://developer.yahoo.com/hadoop/tutorial/

http://www.mapreduce.org/ 
에서도 필요한 자료및 링크들을 모아 놓아 기술을 공유하고 있다.

Data Intensive Text Processing with Mapreduce 의 공동저자중 한 사람인 Jimmy Lin의 홈페이지
http://www.umiacs.umd.edu/~jimmylin/book.html


다양한 리눅스 설치방법

1. 전통적인 리눅스 설치방법은 생략한다. 인터넷에 널린것이 그것이기에... ^^

2. 그 중 Ubuntu는 윈도우즈 상태에서 직접 설치할 수 있도록 Wubi라는 프로그램을 제공해서 초보자도 쉽게 리눅스를 설치할 수 있도록 도와주고 있다.

3. 야후의 하둡 튜터리얼 사이트에 가면 VMPlayer에서 사용할 수 있는 리눅스가상 이미지를 제공한다. 물론 그 이미지는 하둡이 설치가 되어있고 하둡을 실행시키고 직접 소스를 작업해서 실행시켜 볼 수 있는 환경이다. 또한 사용자가 자바로 새로운 프로그램을 만들고 싶을때 Eclipse를 이용해서 어떻게 할 수 있는지를 아주 자세히 설명하고 있다.

4. VMPlayer를 이용해도 되지만 맘에 들지 않으면 VirtualBox라는 공개 가상머신을 통해서 리눅스를 설치해서 테스트해 볼 수도 있다. VirtualBox는 리눅스, 맥, 윈도우즈, 선등을 지원한다.

YouTube에서 GoogleDevelopers로 검색하면 정말 많은 자료들을 공유하고 있다.




OpenCL 과 Cuda와의 만남

음... 정말 Nice한 기술이다.
기술들이 넘쳐나다 못해 철철넘친다.
각각의 기술들이 아주 높은 수준에서의 API를 제공하고 있고 이 API간의 상호연동과 융합이라는 주제가
나에게 다가오고 있다.

위키를 통해 기본 용어들과 시작에 대한 설명들이 잘되어있다.
그리고 관련 몇몇 사이트를 통해서 놀라운 기술의 세계가 펼쳐지고 있다는 것이 정말 흥미롭다.








1 2 3 4 5 6 7 8 9 10 다음