Monday, July 12, 2010

About google & android terminal

구글의 안드로이드 OS는 개발사와의 제휴범위를 크게 3가지의 방식으로 채택하고 있다고 합니다.

1. 오픈소스: 안드로이드 OS의 오픈소스를 구글과의 별도 제휴없이 가져와 임의로 수정, 개발하는 방식
2. GMS (Google Mobile Service): 구글의 안드로이드 기반의 어플리케이션과 안드로이드 OS를 구글의 제휴 기반으로 그대로 가져와 사용하되 폰의 UI등은 임의로 수정, 변경하는 방식
3. GED (Google Experience Device): 구글과의 긴밀한 제휴에 의해서 구글의 UI를 활용해서 구글이 원하는 방식으로 폰의 UI를 만드는 방식

Thursday, April 1, 2010

Structure Comparision

Have you ever been to compare between 2 same structure data?

Example

#include
typedef struct tagMyTestType {
char TypeA;
int TypeB;
} MyTestType;

void TestApp1(void)
{
MyTestType t1;
MyTestType t2;

// add test code
//memset(&t1, 0x00, sizeof(MyTestType));
//memset(&t2, 0xFF, sizeof(MyTestType));

t1.TypeA = 100;
t1.TypeB = 100;

t2.TypeA = 100;
t2.TypeB = 100;

int nReturn = 0;

nReturn = memcmp(&t1, &t2, sizeof(MyTestType));
if (nReturn == 0)
{ // Equal
printf("Equal\n");
}
else
{ // Not Equal
printf("Not Equal\n");
}
}

Can you guess the result?

Wednesday, March 31, 2010

Member Initialization List

Do you know "Member Initialization List"?

For example.

class CMyTestClassA
{
public:
int width;
int height;

CMyTestClassA(int a, int b) : width(a), height(b)
{
}

int getArea(void)
{
return (width*height);
}
};

It is same as belowing,

class CMyTestClassB
{
public:
int width;
int height;

CMyTestClassB(int a, int b)
{
width = a;
height = b;
}

int getArea(void)
{
return (width*height);
}
};

From the document, 1st class is faster than send class.

Tuesday, March 30, 2010

Can you guess the result?

Let's see

// example 1
int i =0;
int nResult =0;
for (i=0; i<100, i<0; i++)
{
nResult += i;
}
What is the result value of nResult?

// example 2
int i =0;
int nResult =0;
for (i=0; i<0, i<100,; i++)
{
nResult += i;
}
What is the result value of nResult?

Can you guess the result without compile of thoes code?

The answers are
example 1: nResult = 0
example 2: nResult = 4950

Your guess is right?

Column Mode in UltraEdit

In the source code, if you want to edit some block
for example

// test code
int MyArray[5] = {0x00,};
MyArray[0] = 0;
MyArray[1] = 1;
MyArray[2] = 2;
MyArray[3] = 3;
MyArray[4] = 4;

in the code you want to change the value, add 10 to all array. How can you change the source code?
if the array size is more than 10 or more

// test code
int MyArray[5] = {0x00,};
MyArray[0] = 10;
MyArray[1] = 11;
MyArray[2] = 12;
MyArray[3] = 13;
MyArray[4] = 14;

If you ues UltraEdit, ues "Column Mode" function. It is very powerful function.
How to use UltraEdit's powerful column mode

In the Visual Studio, Alt + Mouse Left, you can set block mark.

Friday, March 19, 2010

If you want to book mark in your PDF file,

If you want to bookmark in your PDF file and you ues Acrobat Reader,
please visit this website
http://www.aldenta.com/2006/09/15/plugin-bookmark-a-page-in-your-pdf/

Wednesday, March 17, 2010

grep for windows

If you want to use grep (that is a command line text search utility originally written for Unix) in the windows OS

1. Ues windows OS function: findstr
2. open source: Grep for Windows
3. Windows Grep
Or if you install cygwin, you can ues grep too.

Tuesday, January 5, 2010