您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ Cut函数代码示例

51自学网 2021-06-01 20:16:29
  C++
这篇教程C++ Cut函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中Cut函数的典型用法代码示例。如果您正苦于以下问题:C++ Cut函数的具体用法?C++ Cut怎么用?C++ Cut使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了Cut函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: Clear

char* PathBuffer::Set( const char* path ){	Clear();	if ( !currentFsParam ) { return p.data(); }	if ( currentFsParam->server[0] )	{		if ( currentFsParam->user[0] )		{			Cut( const_cast<char*>( currentFsParam->user ) );			Cut( "@" );		}		Cut( const_cast<char*>( currentFsParam->server ) );		Cut( "/" );	}	if ( path )	{		if ( path[0] == '/' ) { path++; }		Cut( path );	}	return p.data();}
开发者ID:Serguei666,项目名称:WalCommander,代码行数:27,


示例2: v1

void TectonicPlateSimulation::randomCut(int n = 1) {    for(int i = 0; i < n; i++) {        if(drand48() < 0.5) {            b2Vec2 v1(-20, drand48() * 40);            b2Vec2 v2(20, drand48() * 40);            Cut(v1, v2);        } else {            b2Vec2 v1(drand48() * 40 - 20, 0);            b2Vec2 v2(drand48() * 40 - 20, 40);            Cut(v1, v2);        }    }}
开发者ID:bernhardfritz,项目名称:Bachelorarbeit,代码行数:13,


示例3: main

int main(){    int n, m, op;    scanf("%d", &n);    for (int i = 0; i < n; i++) scanf("%d", K + i);    for (int i = 0; i < n; i++) Link(&T[i], &T[min(i + K[i], n)]);    scanf("%d", &m);    while (m--)    {        scanf("%d", &op);        if (op == 1)        {            int x;            scanf("%d", &x);            makeRoot(&T[n]);            access(&T[x]), splay(&T[x]);            printf("%d/n", T[x].ch[0] ? T[x].ch[0]->sz : 0);        }        if (op == 2)        {            int x, y;            scanf("%d%d", &x, &y);            Cut(&T[x], &T[min(x + K[x], n)]);            K[x] = y;            Link(&T[x], &T[min(x + K[x], n)]);        }    }    return 0;}
开发者ID:crazymonkeylyc,项目名称:my_solutions,代码行数:29,


示例4: TFile

void SkimFlatCat::Loop(){   if (fChain == 0) return;      TFile *skimfile = new TFile("Skim.root","recreate");    fChain->LoadTree(0);       TTree *newtree = fChain->CloneTree(0);       Long64_t nentries = fChain->GetEntriesFast();   Int_t nselected = 0;   Long64_t nbytes = 0, nb = 0;   for (Long64_t jentry=0; jentry<nentries;jentry++) {     if(!(jentry%10000)) std::cout << jentry << " :  "<<  fChain->GetEntries() << std::endl;      Long64_t ientry = LoadTree(jentry);        if (ientry < 0) break;     nb = fChain->GetEntry(jentry);   nbytes += nb;          if (Cut(ientry) < 0) continue;     nselected++;          newtree->Fill();   }   std::cout << "Selected " << nselected << " out of " << fChain->GetEntries() << std::endl;    newtree->Write();   skimfile->Close();}
开发者ID:jalmond,项目名称:LQanalyzer,代码行数:31,


示例5: switch

void wxTextCtrl::OnKeyDown(wxKeyEvent& event){    if ( event.GetModifiers() == wxMOD_CONTROL )    {        switch( event.GetKeyCode() )        {            case 'A':                SelectAll();                return;            case 'C':                if ( CanCopy() )                    Copy() ;                return;            case 'V':                if ( CanPaste() )                    Paste() ;                return;            case 'X':                if ( CanCut() )                    Cut() ;                return;            default:                break;        }    }    // no, we didn't process it    event.Skip();}
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:28,


示例6: cut_input

void cut_input (char *DICT_PATH, char *HMM_PATH, char *USER_DICT) {  char *s;  Jieba handle = NewJieba (DICT_PATH, HMM_PATH, USER_DICT);  setlocale (LC_ALL, "");  printf ("Chinese word segmentation/n=========================/n/n");  while (s = getstr ()) {    if (strcmp (s, "EOF") == 0) {      free (s);      printf ("bye/n");      break;    } else {      size_t len = strlen (s);      CJiebaWord* words = Cut (handle, s, len);      CJiebaWord* x;      for (x = words; x && x->word; x++) {        /* printf ("%*.*s/", x->len, x->len, x->word); */        printf ("%d ", x->len / CJIEBA_WCHAR_SIZE);      }      printf ("/n");      free (s);      FreeWords (words);    }  }  FreeJieba (handle);}
开发者ID:kanglmf,项目名称:emacs-chinese-word-segmentation,代码行数:27,


示例7: Cut

 void Cut(const string& sentence,       vector<string>& words,       size_t max_word_len) const {   vector<Word> tmp;   Cut(sentence, tmp, max_word_len);   GetStringsFromWords(tmp, words); }
开发者ID:C-sjia,项目名称:cppjieba,代码行数:7,


示例8: switch

void CColorEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags){	// TODO: Add your message handler code here and/or call default	switch (nChar)	{	case 0x01:// Ctrl-A => handle SELECT_ALL		SetSel(0, -1);		return;	case 0x03:// Ctrl-C => handle WM_COPY		Copy();		return;	case 0x16:// Ctrl-V => handle WM_PASTE		Paste();		return;	case 0x18:// Ctrl-X => handle WM_CUT		Cut();		return;	case 0x1A:// Ctrl-Z => handle ID_EDIT_UNDO (EM_UNDO)		if(CanUndo())			Undo();		return;	}	CEdit::OnChar(nChar, nRepCnt, nFlags);}
开发者ID:KurzedMetal,项目名称:Jaangle,代码行数:25,


示例9: Cut

bool Track::SyncLockAdjust(double oldT1, double newT1){   if (newT1 > oldT1) {      // Insert space within the track      if (oldT1 > GetEndTime())         return true;      Track *tmp;      bool ret;      ret = Cut(oldT1, GetEndTime(), &tmp);      if (!ret) return false;      ret = Paste(newT1, tmp);      wxASSERT(ret);      delete tmp;      return ret;   }   else if (newT1 < oldT1) {      // Remove from the track      return Clear(newT1, oldT1);   }   // fall-through: no change   return true;}
开发者ID:ScorpioJonesy,项目名称:audacity,代码行数:28,


示例10: dfs

static voiddfs(Agraph_t * g, Agnode_t * u, bcstate * stp, Agnode_t * parent){    Agnode_t *v;    Agedge_t *e;    Agedge_t *ep;    Agraph_t *sg;    stp->count++;    Low(u) = N(u) = stp->count;    for (e = agfstedge(g, u); e; e = agnxtedge(g, e, u)) {	if ((v = aghead(e)) == u)	    v = agtail(e);	if (v == u)	    continue;	if (N(v) == 0) {	    push(&stp->stk, e);	    dfs(g, v, stp, u);	    Low(u) = min(Low(u), Low(v));	    if (Low(v) >= N(u)) {	/* u is an articulation point */		Cut(u) = 1;		sg = mkBlock(g, stp);		do {		    ep = pop(&stp->stk);		    agsubnode(sg, aghead(ep), 1);		    agsubnode(sg, agtail(ep), 1);		} while (ep != e);	    }	} else if (parent != v) {	    Low(u) = min(Low(u), N(v));	    if (N(v) < N(u))		push(&stp->stk, e);	}    }}
开发者ID:AhmedAMohamed,项目名称:graphviz,代码行数:35,


示例11: OpenDocument

STDMETHODIMP CECR::MoveCash(BSTR FirmID, LONG Money, LONG DirectionIn, LONG* ErrorCode){    DWORD dwDocType;    DirectionIn ? dwDocType = CashInDocument : dwDocType = CashOutDocument;    // открыть документ    OpenDocument(FirmID, DEP_NO, ErrorCode, dwDocType);    if (*ErrorCode == E_SUCCESS)    {        PrintBuffer(FirmID, ErrorCode);        if (*ErrorCode == E_SUCCESS)        {            InitCmd();            // команда            to_numeric(214, m_Cmd, 3, m_Len);   //SETTENDER            // пароль            to_char(OPERATOR_PASSWD, m_Cmd + m_Len, 4, m_Len);            // тип оплаты            to_numeric(0, m_Cmd + m_Len, 2, m_Len);               // сумма            to_smoney(Money, m_Cmd + m_Len, 10, m_Len);               m_RspLen = 11;            m_ECRList.PassCmd(FirmID, m_Cmd, m_Len, m_Rsp, m_RspLen, ErrorCode);            if (*ErrorCode == E_SUCCESS)                Cut(FirmID, 1, ErrorCode);        }    }    return S_OK;}
开发者ID:Dennis-Petrov,项目名称:Cash,代码行数:31,


示例12: switch

BOOL CMyComboBox::PreTranslateMessage(MSG* pMsg){	bool	ctrl = (GetKeyState(VK_CONTROL) & 0x8000) != 0;	if ( pMsg->message == WM_KEYDOWN){		switch( pMsg->wParam ){		case 'C':			if ( ctrl ){				Copy();				return TRUE;			}			break;		case 'X':			if ( ctrl ) {				Cut();				return TRUE;			}			break;		case 'V':			if ( ctrl ) {				Paste();				return TRUE;			}			break;		case VK_DOWN:			if ( GetDroppedState() == FALSE ){				ShowDropDown( TRUE );			}			break;		}	}	return CComboBox::PreTranslateMessage(pMsg);}
开发者ID:beketa,项目名称:jot-for-X01SC,代码行数:33,


示例13: GetCharCountAlongLine

void CPlainTextEditor::CutLine(CChars* pszDest){	int		iCount;	int		iStart;	int		iEnd;	if (!IsSelected())	{		iCount = GetCharCountAlongLine(miEditPos);		iStart = FindStartOfLine(miEditPos);		iEnd = FindEndOfLine(miEditPos);		if (CanGoRight(iEnd))		{			iEnd++;		}		pszDest->AppendSubString(mszText, iStart, iEnd);		mszText.Remove(iStart, iEnd);		ResetUpDown();		miEditPos = FindPositionAlongLine(iStart, iCount);	}	else	{		Cut(pszDest);	}}
开发者ID:andrewpaterson,项目名称:Codaphela.Library,代码行数:28,


示例14: GetSelectedRows

void CSimpleReport::RowDownMulti(){	CXTPReportSelectedRows* pRows = GetSelectedRows();	if (!pRows)		return;	int total = GetRows()->GetCount() - 1;	int cnt = pRows->GetCount();	CXTPReportRow* pRow = pRows->GetAt(cnt-1);	// 
C++ CvAssert函数代码示例
C++ CustomData_number_of_layers函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。