Friday, November 30, 2012

Social Media in Disasters

http://challenge.gov/

A case study from Australia

http://www.police.qld.gov.au/services/reportsPublications/other/socialmedia.htm

Tuesday, January 31, 2012

wxString conversion

wxString logBuf;
wxLogMessage( wxT("%s"), logBuf.c_str() );
 
wxString->char*
        wxString wx_string=_T("hello");
        char ansi_string[30];
        strcpy(ansi_string,wx_string.mb_str());
char*->wxString
        char ansii_string[100] = "我hello";
        wxString wx_string(ansii_string,wxConvUTF8);
wxString->TCHAR*
        wxString wx_string=_T("hello");
        TCHAR wchar_string[30];
        wcscpy(wchar_string,wx_string.wc_str());
TCHAR*->wxString
        TCHAR *tchar_string = _T("hello");
        wxString wx_string(tchar_string,wxConvUTF8);

char*->TCHAR*
        char *ansii_string = "hello";
        int size = strlen(ansii_string);
        TCHAR unicode_string[100];
        mbstowcs(unicode_string, ansii_string, size+1);
TCHAR*->char*
        TCHAR* unicode_string=_T("unicode string");
        int size= wcslen(unicode_string);
        char ansi_string[30];
        wcstombs(ansi_string, unicode_string, size+1);

wxString Message("打开源文件失败!",wxConvLocal);
wxMessageBox(Message);

char rsdata[100];
sprintf(rsdata,"刚读取的数据存放在:");
wxString mess(rsdata,wxConvLocal);
wxMessageBox(mess);

Sunday, January 29, 2012