當前位置: 首頁>>代碼示例>>C++>>正文


C++ DT函數代碼示例

本文整理匯總了C++中DT函數的典型用法代碼示例。如果您正苦於以下問題:C++ DT函數的具體用法?C++ DT怎麽用?C++ DT使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了DT函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: main

int main(int argc, char *argv[])
{
    try {
      QApplication app(argc, argv);
      app.setOrganizationName(ORG_NAME);
      app.setApplicationName(APP_NAME);
      int mainRows, mainCols, subRows, subCols;
      {
	QSettings settings(app.organizationName(), app.applicationName());
	settings.beginGroup("grid");
	mainRows = settings.value("mainRows", VIDEO_MAIN_ROWS).toInt();
	mainCols = settings.value("mainCols", VIDEO_MAIN_COLS).toInt();
	subRows  = settings.value( "subRows", VIDEO_SUB_ROWS ).toInt();
	subCols  = settings.value( "subCols", VIDEO_SUB_ROWS ).toInt();
	settings.endGroup();
      }
      Frontend* win = new Frontend(mainRows, mainCols, subRows, subCols);
      // calculator.Run();
      win->start();
      app.exec();
      delete win;
      DT("Frontend exit from main");
      app.exit(0);
    }
    catch (EX e) {
      DT("Frontend exception (%s)", e.what());
    }
    return 0;
}
開發者ID:119-org,項目名稱:TND,代碼行數:29,代碼來源:main-frontend.cpp

示例2: _dbgSigHandler

// THE signal handler
static void _dbgSigHandler(int sig)
{
  DT("Debug: signal #%d (%s) catched", sig, strsignal(sig));
  switch(sig) {
    // all signals to trace are "cased" here
    case SIGABRT:
    case SIGSEGV:
    case SIGBUS :
    case SIGILL :
    case SIGFPE :
      DBG_BTRACE2(2, false);	// in release mode no dump occurs
      break;
    default:
      //DBG_BTRACE(2, false);	// uncomment just for testing backtrace dump on all signals
      break;
  }
  //DT("looking for prev sig handler");
  SigMap::const_iterator is = _sigMap.find(sig);
  if(is != _sigMap.end()) {
    //DT("prev sig handler found");
    sighandler_t h = is->second;
    if(h && h!=SIG_ERR) {
      h(sig);		// exec previously defined signal handler
      DT("prev sig handler executed");
    }
  }
  //DT("shutdown...");
  _dbgSigShutdown(sig);
  //DT("shutdown DONE");
  exit(sig);
  //DT("exit!!!!");
}
開發者ID:119-org,項目名稱:TND,代碼行數:33,代碼來源:dbg.cpp

示例3: sort_elem

static int		sort_elem(t_list **alst)
{
	t_list	*t[3] = {*alst, (*alst)->next, *alst};

	if (DT(*(((T_FP *)(t[0]->CT))->td), *(((T_FP *)(t[1]->CT))->td)) < 0)
	{
		t[0]->next = t[1]->next;
		t[1]->next = t[0];
		*alst = t[1];
	}
	t[0] = t[1];
	t[1] = t[1]->next;
	while (t[1])
	{
		if (DT(*(((T_FP *)(t[0]->CT))->td), *(((T_FP *)(t[1]->CT))->td)) < 0)
		{
			t[0]->next = t[1]->next;
			t[1]->next = t[0];
			t[2]->next = t[1];
			return (1);
		}
		t[2] = t[0];
		t[0] = t[1];
		t[1] = t[1]->next;
	}
	return (0);
}
開發者ID:vvaleriu,項目名稱:ecole,代碼行數:27,代碼來源:ft_sort_date.c

示例4: switch

AnyTensor AnyTensor::vertcat(const std::vector<AnyScalar>& v) {
  switch (AnyScalar::type(v)) {
    case TENSOR_DOUBLE: return DT(AnyScalar::as_double(v), {static_cast<int>(v.size())});
    case TENSOR_SX: return ST(SX::vertcat(AnyScalar::as_SX(v)), {static_cast<int>(v.size())});
    case TENSOR_MX: return MT(MX::vertcat(AnyScalar::as_MX(v)), {static_cast<int>(v.size())});
    default: tensor_assert(false); return DT();
  }
}
開發者ID:meco-group,項目名稱:tensor-tools,代碼行數:8,代碼來源:any_tensor.cpp

示例5: DT

CFrame*                                       
CFrameTable::Create(CComPtr<IHTMLDocument2> document)
{
	DT(TRACE_I(FS(_T("C_FrameTable::Create(doc=%08X)"), document)));
	if (GetFrameId(document)!=NULL_FRAME) return Find(document);

	CFrame* pkFrame = new CFrame(document, *this);
	// !!! don't dispatch mesages here
	CFrame* res = Insert(pkFrame);
	ATLASSERT(res);
	if (!res) delete pkFrame;
	DT(Dump());
	// ok free to dispatch messages
	return res;
}
開發者ID:cherry-wb,項目名稱:upgradr,代碼行數:15,代碼來源:FrameTable.cpp

示例6: Sleep

STDMETHODIMP 
CUpgradrScriptDebugger::OnConnectDebugger(IApplicationDebugger __RPC_FAR *pad)
{
	Sleep(0);
	DT(TRACE_W("CUpgradrScriptDebugger::OnConnectDebugger()"));
	return S_OK;
}
開發者ID:cherry-wb,項目名稱:upgradr,代碼行數:7,代碼來源:UpgradrScriptDebugger.cpp

示例7: DT

STDMETHODIMP 
CUpgradrHelperbar::GetWindow(HWND *phwnd)
{
	DT(TRACE_I(FS(_T("Helperbar[%08X]: GetWindow(%08X)"), this, phwnd)));
	*phwnd = m_MainWindow;
	return S_OK;
}
開發者ID:cherry-wb,項目名稱:upgradr,代碼行數:7,代碼來源:UpgradrHelperbar.cpp

示例8: DT

STDMETHODIMP 
CXRefreshToolbar::GetWindow(HWND *phwnd)
{
	DT(TRACE_I(FS(_T("Toolbar[%08X]: GetWindow(%08X)"), this, phwnd)));
	*phwnd = m_Toolbar;
	return S_OK;
}
開發者ID:chzh,項目名稱:xrefresh,代碼行數:7,代碼來源:XRefreshToolbar.cpp

示例9: m_kToolbar

// CUpgradrToolbar
CUpgradrToolbar::CUpgradrToolbar():
m_kToolbar(TOOLBARCLASSNAME, this, ALT_MAP_TB_TOOLBAR),
m_dwBandId(0), 
m_dwViewMode(0), 
m_iToolbarHeight(22)
{
	DT(TRACE_I(FS(_T("Toolbar[%08X]: constructor"), this)));

	CBitmap toolbar;
	CBitmap mask;

	m_kAccelerator.LoadAccelerators(MAKEINTRESOURCE(IDR_ACCELERATOR1));
	if (m_kAccelerator.IsNull()) throw CUpgradrWindowsError(GetLastError());

	toolbar.LoadBitmap(MAKEINTRESOURCE(IDB_TOOLBAR));
	if (toolbar.IsNull()) throw CUpgradrWindowsError(GetLastError());

	mask.LoadBitmap(MAKEINTRESOURCE(IDB_TOOLBARMASK));
	if (mask.IsNull()) throw CUpgradrWindowsError(GetLastError());

	CDPIHelper::ScaleBitmap(toolbar);
	CDPIHelper::ScaleBitmap(mask);

	int width = (int)CDPIHelper::ScaleX(16);
	int height = (int)CDPIHelper::ScaleY(16);
	m_kImageList.Create(width, height, ILC_COLOR24 | ILC_MASK, 3, 3);
	if (m_kImageList.IsNull()) throw CUpgradrWindowsError(GetLastError());
	if (m_kImageList.Add(toolbar, mask) == -1) throw CUpgradrWindowsError(GetLastError());
}
開發者ID:cherry-wb,項目名稱:upgradr,代碼行數:30,代碼來源:UpgradrToolbar.cpp

示例10: DT

STDMETHODIMP 
CUpgradrToolbar::SetSite(IUnknown *pUnknownSite)
{
	DT(TRACE_I(FS(_T("Toolbar[%08X]: SetSite(%08X)"), this, pUnknownSite)));
	try {
		if (!!pUnknownSite)
		{
			// attach the window
			HWND hMyWindow;
			CComPtr<IUnknown> site(pUnknownSite);
			CComQIPtr<IOleWindow> window(site);
			window->GetWindow(&hMyWindow);
			if (!hMyWindow) 
			{
				TRACE_E(FS(_T("Toolbar[%08X]: Cannot retrieve toolbar base window"), this));
				return E_FAIL;
			}
			SubclassWindow(hMyWindow);

			// get a WebBrowser reference
			CComQIPtr<IServiceProvider> serviceProvider(site);
			serviceProvider->QueryService(IID_IWebBrowserApp, IID_IWebBrowser2, (void**)&m_spWebBrowser);
			site->QueryInterface(IID_IInputObjectSite, (void**)&m_spSite);

			// create main window
			CreateMainWindow();
		}
	}
	catch (CUpgradrRuntimeError &ex)
	{
		HandleError(ex.ErrorMessage());
		return E_FAIL;
	}
	return S_OK;
}
開發者ID:cherry-wb,項目名稱:upgradr,代碼行數:35,代碼來源:UpgradrToolbar.cpp

示例11: m_BrowserId

CXRefreshBHO::CXRefreshBHO():
m_BrowserId(NULL_BROWSER),
m_Logger(NULL_BROWSER),
m_ConnectionManager(this),
m_Paused(false)
{
	InitRoot();
	DT(TRACE_I(FS(_T("BHO[%08X]: constructor"), this)));
}
開發者ID:JackTheHack,項目名稱:xrefresh,代碼行數:9,代碼來源:XRefreshBHO.cpp

示例12: erzhi

/****************************二值化******************************/
void erzhi(void)
{
	uint8_t i;
	DT();
	for(i = 0;i <= 128;i++)
  {
    if(Pixel[i] > AverageValue) Pixel[i] = 255;
    else 												Pixel[i] = 0;
  }
}
開發者ID:oldjohnh,項目名稱:car,代碼行數:11,代碼來源:ccd.c

示例13: m_BandId

// CUpgradrHelperbar
CUpgradrHelperbar::CUpgradrHelperbar():
m_BandId(0), 
m_ViewMode(0),
m_BrowserId(NULL_BROWSER),
m_Toolbar(TOOLBARCLASSNAME, this, ALT_MAP_HELPERBAR_TOOLBAR),
m_UnpinButtonIndex(-1)
{
	InitRoot();
	DT(TRACE_I(FS(_T("Helperbar[%08X]: constructor"), this)));
}
開發者ID:cherry-wb,項目名稱:upgradr,代碼行數:11,代碼來源:UpgradrHelperbar.cpp

示例14: DT

///диспетчер выполнения процесса определения масштаба страницы.
float GMainEditor::setScaleOCR(GBitmap *pechaImg_){

    //cout<<"Start#1 "<<inputData.data["inputFile"]<<endl;
    if(!pechaImg_){cout_<<"no open file"<<inputData.data["inputFile"]<<endl; return 1;}
    pechaImg=pechaImg_;
    float pageScale=1;
    int border;
    string str;
    int print=0;
    
	DT("@4_1");
    //vectorBase[0].allVectorCount=0;
	border=0; 
    if(!strArray.size()){
        setBit=GBitset::createResize(pechaImg_,1,1,1);
        DT("@4_2");
        setBit->pageStringDetector(strArray,1); // Подпрограмма выделения строк и букв ПЕЧА ( РЕЛЬСЫ  )
        DT("@4_3"); 
        border=setBit->border_size();
        DT("@4_4");
        setOCR=GBitsetOCR::createResize(pechaImg_,1,1);
        //if(NewLetterOnlyBtn->Checked==true) {mode=NEWLETTERINBOOK;}else{mode=ALL_LETTER;}
        str=fileName(inputData.data["inputFile"]); DT("@@@ file="<<str);
        
        setOCR->setData(
                        aliKali,
                        strArray,
                        correctionTable,
                        logicProcessor,
                        iLeft,
                        iTop,
                        border,
                        OCR_NORMALISATION);

    }
    //fontEditor->setLanguage();
    pageScale=setOCR->setScaleOCR(logicProcessor, OCR_NORMALISATION);
    return pageScale;
    
    //cout<<"done "<<inputData.data["inputFile"]<<endl;
    
}//________________________________________________________________________________________________________________
開發者ID:RimeOCRLIB,項目名稱:OCRLib,代碼行數:43,代碼來源:setScaleOCR.cpp

示例15: erzhi

/****************************二值化******************************/
void erzhi(void)
{
	uint8_t i;
//	unsigned char AverageValue;
	DT();
	for(i=0;i<127;i++)
  {
    if(Pixel[i]>AverageValue) Pixel[i] = 255;
    else 											Pixel[i] = 0;
  }
}
開發者ID:oldjohnh,項目名稱:car,代碼行數:12,代碼來源:ccd.c


注:本文中的DT函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。