当前位置: 首页>>代码示例>>C++>>正文


C++ disp函数代码示例

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


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

示例1: main

/**************主函数**************************/
void main(void)
{ 
   disp();			                    //上电显示1、2、3、4
   delay(1);
   while(1)
	{
//		keya=TM1650_read();
//		delay(50);
//		if (keya!=0)
//		{
//			switch(keya)                 //控制数码管显示数字 	  
//			{	    
//			case 0x44:TM1650_send(0X68,display[5]);  break;    //K11与DIG1     
//			case 0x4D:TM1650_send(0X68,display[6]);  break;    //K12与DIG2           	
//			case 0x56:TM1650_send(0X68,display[7]);  break;    //K13与DIG3  
//			default:  break;
//			} 
//		}	
    } 
} 
开发者ID:mwei0321,项目名称:STCode,代码行数:21,代码来源:TM1650.c

示例2: strlen

void
myApplication::send (void)
{
    cout << NL << "Enter text to write - press <ENTER> when done\n:";
    myLine L;
    cin >> L;
    int l = strlen(L);
    if (!l)
        cerr << "Nothing entered." << endl;
    else
    {
        cout << "Writing '"
             << L
             << char('\'')
             << endl;
        stream() << L << NL;    // Send the entered data, NL terminated
        cout << "Chrs written to Myio object = " << (l + 1) << NL;
        disp ();
    }
}
开发者ID:wisnu88,项目名称:C-Programming-Refference,代码行数:20,代码来源:myiodemo.cpp

示例3: OPS_GetNodeDisp

int OPS_GetNodeDisp(int *nodeTag, int *sizeData, double *data)
{
  Node *theNode = theDomain->getNode(*nodeTag);

  if (theNode == 0) {
    opserr << "OPS_GetNodeDisp - no node with tag " << *nodeTag << endln;
    return -1;
  }
  int size = *sizeData;
  const Vector &disp = theNode->getTrialDisp();

  if (disp.Size() != size) {
    opserr << "OPS_GetNodeDisp - crd size mismatch\n";
    return -1;
  }
  for (int i=0; i < size; i++) 
    data[i] = disp(i);
    
  return 0;
}
开发者ID:cix1,项目名称:OpenSees,代码行数:20,代码来源:elementAPI_TCL.cpp

示例4: bubblesort

void bubblesort(int list[] , int n )
{
     int i = 0;
     
     for( i = 0 ; i < n - 1 ; i++)
     {
          printf("pass %d \n " , i);
          for(int j = 0 ; j < (n-1)-i ; j++)
          {
               if( list[j] > list[j+1] )
               {
                   swap(list , j , j+1 );
                        disp(list , n);
          
               }
          }
          printf("\n");
     }
 
}
开发者ID:sonialamba,项目名称:testrepo,代码行数:20,代码来源:bubblesort.cpp

示例5: disp

/*!

 */
void
DispHolder::doHandleShowInfo( const rcss::rcg::ShowInfoT & show )
{
    DispPtr disp( new rcss::rcg::DispInfoT );

    disp->pmode_ = M_playmode;
    disp->team_[0] = M_teams[0];
    disp->team_[1] = M_teams[1];
    disp->show_ = show;

    M_disp = disp;

    if ( Options::instance().bufferingMode() )
    {
        if ( (int)M_disp_cont.size() <= Options::instance().maxDispBuffer() )
        {
            M_disp_cont.push_back( disp );
        }
    }
}
开发者ID:edymanoloiu,项目名称:FotbalRobotic,代码行数:23,代码来源:disp_holder.cpp

示例6: main

int main()
{
        int ch;
        while(1)
        {
                printf("\nChoices:\n\t1-Insert\n\t2-Insert left\n\t3-Delete node\n\t4-Display\n\t5-Exit\nEnter your choice: ");
                scanf("%d",&ch);
                switch(ch)
                {
                        case 1: ins();
                                break;
                        case 2: insl();
                                break;
                        case 3: del();
                                break;
                        case 4: disp();
                                break;
                        default:return 0;
                }
        }
}
开发者ID:AravindVenugopal,项目名称:CS-VTU-Lab-Manual,代码行数:21,代码来源:11_doublyLinkList.c

示例7: disp

	void disp(_Node_t_* node)
	{
		_Node_t_* pN = node->next;
		_Node_t_* pCN = NULL;

		printf("{");
		while (pN)
		{
			if ( TYPE_NUM == pN->type)
			{
				printf("%d,", pN->nValue);
			}
			else
			{
				pCN = pN->aValue;
				disp(pCN);
			}
			pN = pN->next;
		}
		printf("},");
	}
开发者ID:0x00b,项目名称:some_ccpp_question,代码行数:21,代码来源:numstr2numarray.cpp

示例8: myID

void
DOF_Group::setNodeDisp(const Vector &u)
{
    if (myNode == 0) {
	opserr << "DOF_Group::setNodeDisp: no associated Node\n";
	return;
    }
    
    Vector &disp = *unbalance;
    disp = myNode->getTrialDisp();
    int i;
    
    // get disp for my dof out of vector u
    for (i=0; i<numDOF; i++) {
	int loc = myID(i);
	if (loc >= 0)
	    disp(i) = u(loc);  
    }

    myNode->setTrialDisp(disp);
}
开发者ID:aceskpark,项目名称:osfeo,代码行数:21,代码来源:DOF_Group.cpp

示例9: main

void main() 
{ 
uchar k;

 P0=0xFF; 
P2=0xFF; 


while(1)


 { 
for(j=0;j<17;j++) 
{ 


for(k=0;k<125;k++) 
disp(); 
} 
} 
} 
开发者ID:anan-cn,项目名称:MCU,代码行数:21,代码来源:smggd.c

示例10: main

    void main()

      {
	int ch;
	clrscr();
	while(1)
	{
	printf(" 1.Creating a new node\n 2.Display nodes\n");
	printf(" 3.Inserting a node before position \n");
	printf(" 4.Inserting a node after position entered \n");
	printf(" 5.Deleting a node on nth position \n");
	printf(" 6.Deleting duplicate nodes\n 7.Exit\n");
	scanf("%d",&ch);
	  switch(ch)
	  {
	    case 1:
	     create();
	     break;
	    case 2:
	     disp();
	     break;
	    case 3:
	     insonnoccurb();
	     break;
	    case 4:
	     insonnoccura();
	     break;
	    case 5:
	      delonnoccur();
	      break;
	    case 6:
	      delallsameoccur();
	      break;
	    case 7:
	    return;
	  }

	}

      }
开发者ID:AbhayGoyal,项目名称:Starters,代码行数:40,代码来源:LINKLOCC.C

示例11: listen

size_t listen(dht::DhtRunner& node, std::string chain, map_type& map)
{
    std::future<size_t> token = node.listen(chain,
        [&map](const std::vector<std::shared_ptr<dht::Value>>& values)
        {
            // For every value found...
            for (const auto& value : values)
            {
                // Unpack then register and display it, if it's a new value.
                std::string content = value->unpack<std::string>();
                if(!map.count(content))
                {
                    map.insert(std::make_pair(content, get_timestamp()));
                    disp(content);
                }
            }

            // Continue lookup until no values are left.
            return true;
        });

    if(token.wait_for(std::chrono::seconds(1)) != std::future_status::ready)
    {
        verbose("Warning: Could not create a listener since 1000ms.");
        verbose("         Trying again for 30s...");

        if(token.wait_for(std::chrono::seconds(30))
            != std::future_status::ready)
            verbose("Error: Failure.");
        else
            verbose("         Done.");
    }

    auto v = token.get();
    verbose("Starting listening to "
        + chain
        + " with token "
        + std::to_string(v) + ".");
    return v;
}
开发者ID:Kordump,项目名称:dhtpim,代码行数:40,代码来源:tools.cpp

示例12: Run

void Run()
{
    Graphics::Display disp(WIDTH, HEIGHT, TITLE);
    
    Application application;
    application.Start();
    
    timespec ts;
    current_utc_time(&ts);
    long previousTime = ts.tv_nsec;
    float delta = 0;
    
    while (!disp.IsClosed())
    {
        current_utc_time(&ts);
        long currentTime = ts.tv_nsec;
        float prev_delta = delta;
        delta = (float)((currentTime - previousTime)/1000000000.0);
        if(delta < 0) delta = prev_delta;
        Time::setDetlaTime(delta);
        previousTime = currentTime;
        
        /* Logic */
        application.PreUpdate();
        application.Update();
        application.PostUpdate();
        /* End Logic */
        
        /* Rendering */
        disp.PreUpdate();
        application.PreRender();
        application.Render();
        application.PostRender();
        disp.Update();
        disp.PostUpdate();
        /* End Rendering */
        
        Input::CleanUp(); // This should be one of the last things to be called because it is a form of cleanup.
    }
}
开发者ID:xslattery,项目名称:Polaris-cpp-OLD,代码行数:40,代码来源:main.cpp

示例13: keypress

int keypress(struct s3d_evt *event)
{
    struct s3d_key_event *keys = (struct s3d_key_event *)event->buf;
    int key=keys->keysym;
    int mod=keys->modifier;
    switch (key)
    {
    case S3DK_LEFT:
        pos--;
        break;
    case S3DK_RIGHT:
        pos++;
        break;
    case S3DK_UP:
        aim--;
        break;
    case S3DK_DOWN:
        aim++;
        break;
    case S3DK_RETURN:
        savel2();
        break;
    case S3DK_DELETE:
        del();
        break;
    case S3DK_INSERT:
//		    ins();
        break;
    case S3DK_c:
        clr();
        break;
    case S3DK_SPACE:
        spc();
        break;
    case S3DK_F8:
        ll2();
        break;
    }
    disp();
}
开发者ID:koo5,项目名称:lemon-2,代码行数:40,代码来源:fontedit.c

示例14: Muste_Edtgoto

SEXP Muste_Edtgoto(SEXP gotoparm)
	{
	int newfirst,newcur; // ,mousewheel;
	char *gprm[5];
	extern int op_goto2();
	extern int disp();
	char eka[256];
	char toka[256];
	char kolmas[256];
	char neljas[256];
	
	

/*
    mousewheel=muste_get_R_int(".muste$mousewheeltime");
    Rprintf("\neventpeek: %d, mousewheel: %d",muste_eventpeek,mousewheel);
    if (muste_eventpeek==FALSE && mousewheel!=9999) return(gotoparm);
*/	
    if (muste_mousewheel==FALSE || muste_no_selection) return(gotoparm);

	newfirst=muste_get_R_int(".muste$edty.newfirst");
	newcur=muste_get_R_int(".muste$edty.newcur");

    sprintf(eka,"%d",newfirst); gprm[1]=eka;
    sprintf(toka,"%d",newcur); gprm[2]=toka;

	newfirst=muste_get_R_int(".muste$edtx.newfirst");
	newcur=muste_get_R_int(".muste$edtx.newcur");    
    
    sprintf(kolmas,"%d",newfirst); gprm[3]=kolmas;
    sprintf(neljas,"%d",newcur); gprm[4]=neljas;    

    op_goto2(5,gprm);

//    muste_edt_dim();


    disp();
	return(gotoparm);
	}
开发者ID:rforge,项目名称:muste,代码行数:40,代码来源:muste.c

示例15: disp

// 代价转成 视差(代价小的对应点的坐标差值为视差)
Mat StereoProcessor::cost2disparity(int imageNo)
{
    Mat disp(imgSize, CV_32S);
    Mat lowCost(imgSize, COST_MAP_TYPE, Scalar(std::numeric_limits<costType>::max()));

    for(int d = 0; d <= dMax - dMin; d++)
    {
        for(size_t h = 0; h < imgSize.height; h++)
        {
            for(size_t w = 0; w < imgSize.width; w++)
            {
                if (lowCost.at<costType>(h, w) > costMaps[imageNo][d].at<costType>(h, w))//代价较小
                {
                    lowCost.at<costType>(h, w) = costMaps[imageNo][d].at<costType>(h, w);
                    disp.at<int>(h, w) = d + dMin;//保存该代价对应的视差
                }
            }
        }
    }

    return disp;
}
开发者ID:dyz-zju,项目名称:MVision,代码行数:23,代码来源:stereoprocessor.cpp


注:本文中的disp函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。