반응형

블로그를 하기 위해서는 트렌드를 무시 할 수 없습니다.

물론 많은 사용자들이 독자적인 트렌드를 사용하면서 많은 블로그를 운영하고 있지만, 초보자는 쉽지가 않죠.

오늘은 구글 트렌드 분석 도구를 사용해서 트렌드 방향성을 예측해보겠습니다.

구글 트렌드 분석 사이트 입니다.

www.google.com/trends/?hl=ko

구글 트렌드-1

메인 화면입니다.

주제 탐색에 트렌드 분석을 원하는 내용을 입력하면 검색 주기에 해당되는 트렌트 분포도가 출력 됩니다.

요즘 뜨고 있는 BigData를 탐색해 보았습니다.

구글 트렌드-2

구글 트렌드에서 "시간 흐름에 따른 관심도 변화"입니다.

정확하게 2011년 부터 트렌드 흐름이 상승하고 있습니다.

구글 트렌드-3

구글 트렌드에서 "지역 관심도"입니다.

인도, 대한민국에서 핫하게 관심이 있네요.

한글로 검색하면 대한민국만 나오니 될 수 있으면 영어로 검색을 권합니다. ^^

구글 트렌드-4

구글 트렌드에서 "관련 검색어"입니다.

BigData에 관련된 검색 정보가 출력 됩니다.

구글 트렌드를 사용하면 현재 트렌드 방향을 확인 할 수 있지만,

맹신하기 보다는 참고하는 방향으로 사용하시면 좋을 것 같습니다.

구글 트렌드 사용법을 마치겠습니다.

감사합니다.

반응형
반응형

오늘은 그루보드5 관리자 비밀번호 변경 방법입니다.

많은 사용자들이 관리자를 자주 사용 안 하면 잊어 버리기 쉽죠.

그루보드5는 관리자 ID 및 비밀번호를 g5_number 테이블에 관리합니다.

컬럼은 mb_id, mb_password를 사용하며,  mb_password는 암호화 되어 저장 됩니다.

여러가지 방법이 있지만, 대부분 호스팅해서 사용하기 때문에 QUERY를 사용해서 변경하는 방법입니다.

phpMyAdmin 관리자로 로그인 하신 후 SQL실행 창에서 아래와 같이 QUERY를 실행하시면, 바로 변경 됩니다.

admin

update g5_member set mb_password = password('1234567') where mb_id='admin'

*password부분만 변경 해주시면 됩니다.

이상으로 마치겠습니다.

반응형
반응형

 

-요약-

슬라이딩 윈도(Sliding window)는 두 개의 네트워크 호스트간의 패킷의 흐름을 제어하기 위한 방법이다.

TCP와 같이 데이터의 전달을 보증하는 프로토콜에서는 패킷 하나하나가 전달되었음을 확인 신호(acknowledgement, 이하 ACK)를 받아야하며, 만약 패킷이 중도에 잘못되었거나 분실되어 확인받지 못하는 경우, 해당 패킷을 재전송해야하는 필요가 있다. 슬라이딩 윈도는 일단 '윈도(메모리 버퍼의 일정 영역)'에 포함되는 모든 패킷을 전송하고, 그 패킷들의 전달이 확인되는대로 이 윈도를 옆으로 옮김(slide)으로서 그 다음 패킷들을 전송하는 방식이다.

슬라이딩 윈도는 아직 확인을 받지 않고도 여러 패킷을 보내는 것을 가능케 하기 때문에, 매번 전송한 패킷에 대해 확인을 받아야만 그 다음 패킷을 전송하는 방법(stop-and-wait)을 사용하는 것보다 훨씬 네트워크를 효율적으로 사용할 수 있다.


-정의-
1)송신측에서는 윈도우 사이즈 갯수 만큼의 프레임을 연속해서 전송할 수 있으며 수신측에서는 이 윈도우 크기를 조절해 나간다. '윈도우 크기'란 한꺼번에 송신측이 연속해서 전송할 수 있는 최대 프레임의 갯수를 뜻한다. 아래 그림 (b)에서 송신측에서는 연속해서 W 개의 프레임을 전송하고 있다. 수신측에서는 적절한 간격으로 이 W를 조절해 나감으로써 송신측의 데이타 흐름을 조절해 나간다.

image

2)슬라이딩 윈도우(sliding window)를 이용한 흐름제어 continuous ARQ는 윈도우 개념을 사용하는데, 윈도우란 송신측에서 수신측의 응답(ACK/NAK)없이 전송하는 프레임의 수를 제한하는 것으로 전송 가능한 최대 프레임 수를 최대 윈도우 크기라고 한다. 초기화 시 윈도우를 최대 윈도우 크기로 설정하여 송신측에서 프레임을 전송 시마다 윈도우를 하나씩 줄이고, 응답이 접수될 때마다 윈도우를 하나씩 늘리는데, 윈도우가 있는 한 계속 프레임을 전송하는 방법으로  흐름제어하는 것을 슬라이딩 윈도우를 이용한 흐름제어라 한다.

 

슬라이딩 윈도우 방식 설명※

전 이중 링크로 연결된 두 스테이션이 있다고 가정을 하자. 스테이션 B는 n(window size)개의 프레임을 수신할 수 있으며,  A는 B의 ACK를 기다리지 않고 n개의  프레임을 보내는 것이 가능하다. 각각의 프레임은 순서번호가 있다.  따라서 B는 전송이 기대되는 다음 프레임의 순서번호를 포함한 ACK를 A에게 전송함에 의해 ACK 한다.  이 ACK는 B가 규정된 번호로 시작되는 다음 n개의 프레임을 수신 할 준비가 되어 있음을 암시적으로 통보하는 것이다.
예를 들면 B는 프레임 2, 3, 4를 수신하고, 순서번호 5를 가진 ACK를 A에게 보냄에 의해 B는 한 번에 프레임 2, 3, 4를 ACK 한 것이 된다. A는 송신하려는 순서번호의 목록을 유지하고  B는 수신할 준비가 되어 있는 순서번호 목록을 유지한다. 이들 각 목록은 프레임의 윈도우로 생각할 수 있다. 이러한 동작을 슬라이딩 윈도우 흐름제어라고 한다.

참고
http://ko.wikipedia.org/wiki
www.google.com
 
반응형
반응형

The full sequence of events fired for a Window object are as follows.

On application startup, if the Window is the application’s main window.

(Application events are also shown in the correct sequence).

  • Application.Startup
  • Window.Initialized
  • Window.IsVisibleChanged
  • Window.SizeChanged
  • Window.LayoutUpdated
  • Window.SourceInitialized
  • Application.Activated
  • Window.Activated
  • Window.PreviewGotKeyboardFocus
  • Window.IsKeyboardFocusWithinChanged
  • Window.IsKeyboardFocusedChanged
  • Window.GotKeyboardFocus
  • Window.LayoutUpdated
  • Window.Loaded
  • Window.ContentRendered

On normal application shutdown, the event sequence is:

  • Window.Closing
  • Window.IsVisibleChanged
  • Window.Deactivated
  • Application.Deactivated
  • Window.IsKeyboardFocusWithinChanged
  • Window.IsKeyboardFocusedChanged
  • Window.LostKeyboardFocus
  • Window.Closed
  • Application.Exit

When application/window loses focus (user switches to another application):

  • Window.Deactivated
  • Application.Deactivated
  • Window.IsKeyboardFocusWithinChanged
  • Window.IsKeyboardFocusedChanged
  • Window.LostKeyboardFocus

When application/window gains focus (user switches back to application):

  • Application.Activated
  • Window.Activated
  • Window.PreviewGotKeyboardFocus
  • Window.IsKeyboardFocusWithinChanged
  • Window.IsKeyboardFocusChanged
  • Window.GotKeyboardFocus

 

When Developing Windows Applications using Windows Forms,

you will most likely find yourself needing to make user of the form’s

events, and this requires you to know when each form event fires.

In this short reference artivle I will show you the sequence of the form

events when the Form is being started and when it is being shut down.

 

When Form Start up

  • Control.HandleCreated
  • Control.BindingContextChanged
  • Form.Load
  • Control.VisibleChanged
  • Form.Activated
  • Form.Shown

When Form Shutdown

  • Form.Closing
  • Form.FormClosing
  • Form.Closed
  • Form.FormClosed
  • Form.Deactivate

참고

http://wpf.2000things.com/2012/07/30/613-window-event-sequence/

http://www.daveoncsharp.com/2009/06/windows-forms-event-sequence/

반응형
반응형

C Language String Types and Classes

String Type

Description

char/wchar/TCHAR The C strings for ANSI and Unicode
CString The C++/MFC class wrapper for C strings
BSTR The Visual Basic string type
_bstr_t A C++ class wrapper for the Visual Basic string type
CComBSTR Yet another C++ class wrapper for the Visual Basic string type used predominately in ATL code

 

Demo Code

 

BSTR to CString and CString to BSTR

 

void BSTRtoCString(BSTR bStr){
    CString csStr =bStr;
}

void CStringtoBSTR()
{
    CString csStr = NULL;

    csStr = "Hello BelieveIT!";

    BSTR bStr = csStr.AllocSysString();

    BSTRtoCString(bStr);

    ::SysFreeString(bStr); //finished using the BSTR

}

 

Base Code

BSTR GetBSTR()
{
    _bstr_t bstrt(_T("This is the test string!"));

    BSTR bstr;

    bstr = bstrt.copy();

    return bstr;
}

CComBSTR GetComBSTR()
{
    CComBSTR bstr("This is the test string!");

    return bstr;

}

void ShowBSTR(BSTR bstr)
{
    _bstr_t bstrt(bstr);

    CString cstr;

    cstr.Format(_T("%s"),(LPCTSTR)bstrt);

    AfxMessageBox(cstr);

}

 

Conversions Code

 

_bstr_t BSTRto_bstr_t()
{
    BSTR bstr = GetBSTR();

    _bstr_t bstrFinal(bstr);

    ShowBSTR(bstrFinal);

    bstrFinal = bstr;

    return bstrFinal;
}

 

BSTR _bstr_ttoBSTR()
{
    _bstr_t bstr(_T("This is Converting string"));

    BSTR bstrFinish;

    bstrFinish = bstr.copy();

    ShowBSTR(bstrFinish);

    bstrFinish = bstr;

    return bstrFinish;

}

 

BSTR CComBSTRtoBSTR()
{
    CComBSTR bstr(_T("This is Converting string"));

    BSTR bstrFinish;

    bstrFinish = bstr;

    ShowBSTR(bstrFinish);

    bstrFinish = bstr.Copy();

    return bstrFinish;

}

 

CComBSTR _bstr_ttoCComBSTR()
{
    _bstr_t bstr(_T("This is Converting string"));

    CComBSTR bstrFinish;

    bstrFinish.AppendBSTR(bstr);

    return bstrFinish;

}

 

CString BSTRtoCString()
{
    //conversion that only works in Unicode
    BSTR bstr;

    bstr = GetBSTR();

    TCHAR szFinal[255] = {0,};

    _stprintf(szFinal, _T("%s"), (LPCTSTR)bstr);

    AfxMessageBox(szFinal);

    _bstr_t bstrIntermediate(bstr);

    CString strFinal;

    _stprintf(szFinal, _T("%s"), (LPCTSTR)bstrIntermediate);

    strFinal.Format(_T("%s"),(LPCTSTR)bstrIntermediate);

    return strFinal;

}

 

CString _bstr_ttoCString()
{
    _bstr_t bstr(_T("This is Converting string"));

    TCHAR szFinal[255] = {0,};

    _stprintf(szFinal,_T("%s"),(LPCTSTR)bstr);

    return szFinal;
}

 

LPCTSTR CComBSTRtoLPCTSTR()
{

    CComBSTR bstr("This is Converting string");

    _bstr_t bstrIntermediate(bstr);

    TCHAR szFinal[255] = {0,};

    _stprintf(szFinal, _T("%s"),(LPCTSTR)bstrIntermediate);

    return szFinal;
}

 

_bstr_t LPCTSTRto_bstr_t()
{
    LPCTSTR szStart = _T("This is Converting string");

    _bstr_t bstrFinal(szStart);

    ShowBSTR(bstrFinal);

    bstrFinal = szStart;

    return bstrFinal;
}

 

CComBSTR LPCTSTRtoComBSTR()
{
    LPCTSTR szStart = _T("This is Converting string");

    CComBSTR bstrFinal(szStart);

    ShowBSTR(bstrFinal);

    bstrFinal.Empty();

    bstrFinal.Append(szStart);

    return bstrFinal;
}

 

[ Reference ]

http://blog.naver.com/mismir?Redirect=Log&logNo=40013446819
http://www.codeproject.com/Articles/1282/Easy-way-to-manipulate-BSTR-using-CString-class

반응형
반응형

 

MFC 프로그램 사용 중 간헐적으로 아래와 같은 "서버 작업 중" 대화 상자가 출력될 때가 있다.

 

서버 작업 중 

 

<요 약>

MFC로 작성된 ActiveX클라이언트 애플리케이션이 ActiveX서버를 사용하려 할 때 다음과 같은 대화 상자가

나타나는 경우가 있습니다.


서버 작업 중 – 다른 프로그램이 사용 중이므로 이 작업을 완료할 수 없습니다. [전환]을 선택하여 사용 중인

프로그램을 활성화하여 문제를 해결하십시오.

Component Request Pending – This Action cannot be completed because the other application is busy.

Choose 'switch to' to activate the busy application and correct the problem


이 대화상자는 ActiveX서버가 클라이언트 애플리케이션에게 응답을 하지 못할 때 나타나게 됩니다.

 

<현상>

MFC로 작성된 ActiveX 클라이언트 애플리케이션이 ActiveX 서버를 사용하려 할 때 다음과 같은 대화상자

가 나타나는 경우가 있습니다.


"서버 작업 중 - 다른 프로그램이 사용 중이므로 이 작업을 완료할 수 없습니다. [전환]을 선택하여 사용 중인

프로그램을 활성화하여 문제를 해결하십시오"

"Component Request Pending - This Action cannot be completed because the other application is busy.

Choose 'switch to' to activate the busy application and correct the problem"


이때 '전환'을 선택하고 기다리면 정상적으로 동작합니다.

 

<원인>

사용하고자 하는 ActiveX 컨트롤이 어떤 이유로 인해 응답하지 못하고 있는 상태입니다. 다음과 같은 이유에서

발생할 수 있습니다.

1.ActiveX 컨트롤이 초기화되기 전에 클라이언트 애플리케이션이 이를 사용하려고 시도할 때

2.시스템이 느리거나 동시에 많은 애플리케이션이 동작 중이어서 ActiveX 컨트롤이 응답하지 못하는 경우

3.ActiveX 컨트롤의 설계에 문제가 있어서 응답이 늦도록 제작되어 있을 때

 

<해결 방법>

첫번째 방법은 다음과 같이 CWinApp::InitInstance()의 파생 함수에서 ColeMessageFilter::SetMessagePendingDelay() 함수를

이용하여 ActiveX 컨트롤의 응답을 기다리는 시간을 길게 설정하면 됩니다.

 

BOOL CMyApp::InitInstance() {

// ...

AfxOleInit();

COleMessageFilter * pFilter = AfxOleGetMessageFilter();

pFilter->SetMessagePendingDelay(5000);

// ...

}

 

여기서 SetMessagePendingDelay()의 인자는 클라이언트 애플리케이션이 ActiveX 서버의 응답을 기다리는 시간으로 밀리세컨드 단위입니다.

 

두번째 방법은 응답을 기다리는 시간을 설정하는 것이 아니라 메시지 박스를 출력하지 않게 하는 설정 입니다.

 

BOOL CMyApp::InitInstance() {

// ...

AfxOleInit();

COleMessageFilter * pFilter = AfxOleGetMessageFilter();

pFilter->EnableBusyDialog(FALSE);

pFilter->EnableNotRespondingDialog(FALSE);

// ...

}

 

END

MS 참고 사이트 입니다. (http://support.microsoft.com/default.aspx?scid=kb%3Bko%3B602164)

반응형

+ Recent posts