虫虫首页|资源下载|资源专辑|精品软件
登录|注册

Count

  • Most satellite dish actuators send a series of pulses to indicate their position. By Counting pulse

    Most satellite dish actuators send a series of pulses to indicate their position. By Counting pulses the positioner knows where the dish is pointing. It is possible to use a serial port and Linux with RTAI patches in order to Count these pulses, thus minimising the external hardware required for a positioner. The zip contains instructions, circuit diagrams and example code.

    标签: satellite actuators Counting indicate

    上传时间: 2014-12-03

    上传用户:netwolf

  • 已知数据文件IN.dat中存有200个四位数

    已知数据文件IN.dat中存有200个四位数,并已调用读函数rData()把这些数存入数组a中,请编写函数spellNum(),其功能是:把个位数字和千位数字重新组成一个新的二位数(新二位数的十位数字是原四位数的个位数字,新二位数的个位数字是原四位数的千位数字),以及把百位数字和十位数字组成另一个新的二位数(新二位数的十位数字是原四位数的百位数字,新二位数的个位数字是原四位数的十位数字),如果新组成的两个二位数一个是奇数,另一个为偶数,并且两个二位数中至少有一个数能被17整除,同时两个新数的十位数字均不为0,则将满足此条件的四位数按从大到小的顺序存入数组b中,并要计算满足上述条件的四位数的个数Count。最后main()函数调用写函数wData(),把结果Count以及数组b中符合条件的四位数输出到OUT.dat文件中。

    标签: 200 dat IN 数据文件

    上传时间: 2014-10-29

    上传用户:李彦东

  • Delphi 泛型容器 TDictionary 的用法 Demo

    Collection of key-value pairs.  TDictionary represents a generic collection of key-value pairs.  This class provides a mapping from a collection of keys to a collection of values. When you create a TDictionary object, you can specify various combinations of initial capacity, equality operation, and initial content.  You can add a key that is associated with a corresponding value with the Add or AddOrSetValue methods. You can remove entries with Remove or Clear, which removes all key-value pairs. Adding or removing a key-value pair and looking up a key are efficient, close to O(1), because keys are hashed. A key must not be nil (though a value may be nil) and there must be an equality comparison operation for keys.  You can test for the presence or keys and values with the TryGetValue, ContainsKey and ContainsValue methods.  The Items property lists all Count dictionary entries. You can also set and get values by indexing the Items property. Setting the value this way overwrites any existing value.  The class TObjectDictionary inherits from TDictionary and provides an automatic mechanism for freeing objects removed from dictionary entries. 

    标签: Delphi 泛型

    上传时间: 2015-07-01

    上传用户:mirage

  • AVR单片机转速表

    /****************************************************************                  外部晶振8M                  PA0~3:四位数码管的位选                  PB0~7:数码管的8位段选                  外部中断0用于计数                  定时器0溢出中断的定时为1ms                  说明 :检测到水流较小时,继电器延时1秒关闭  ******************************************************************/                #include<iom16v.h>   #include<macros.h>   #define uchar unsigned char   #define uint unsigned int       char led_7[10]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F};  //数码管段选        char position[4]={0xfe,0xfd,0xfb,0xf7};//数码管位选        uint sumnum=0;  //用于记录1000ms内进入中断的次数        uint time=0;   //记录进入比较定时器0的次数        uint num=0;     //记录1ms内进入中断的次数        uint Count=0;   //进入外部中断0的次数        uchar flag;        uint sumnum1;   //记录100ms内的数目       /***************************函数声明***************************/        void delay();        void display(uint m );        void init();        void init_0();        void init_2();    void _delay_us(uint l)   {        unsigned int i;        for(i=0;i<l;i++)        {        asm("nop");        }   }           /**************************主函数***********************************/       void main()   {        init();        init_0();        init_2();        while(sumnum<5)        {           PORTD=0XBF;           segdisplay(sumnum1);        }       while(1)       {           segdisplay(sumnum1);       }           }        /*************************扫描数码管时的延时函数*********************/        void delay()    {         uchar i,j;         for(i=6;i>0;i--)         for(j=225;j>0;j--);    }        /************************数码管显示函数*****************************/       void segdisplay( int temp)        {         int seg[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};         int temp1,temp2,temp3,temp4;         temp1=temp/1000;         temp2=(temp/100)%10;         temp3=(temp/10)%10;         temp4=temp%10;         DDRB=0xff;         DDRA|=0x0f;           PORTA=~BIT(3);           PORTB=seg[temp1];           _delay_us(100);           PORTA=~BIT(2);           PORTB=seg[temp2];           _delay_us(100);           PORTA=~BIT(1);           PORTB=seg[temp3];           _delay_us(100);           PORTA=~BIT(0);           PORTB=seg[temp4];           _delay_us(100);       }        /***********************管脚初始化函数*********************/        void init()    {                      DDRD|=0X40;   //PD4 设置为输出             PORTD=0XBF;                DDRA=0XFF;             DDRB=0XFF;             PORTA=0XFF;             PORTB=0XFF;    }        /***********************外部中断0初始化*********************/        void init_0()    {         MCUCR=0X02;   //INT0为下降沿触发         GICR=0X40;   //使能INT0中断         SREG=0X80;  //使能总中断    }        /**********************定时器2初始化***********************/        void init_2()    {         TCCR0=0x03;   // 内部时钟,64 分频(8M/64=125KHz)          TCNT0=0x83;   //装初值           TIMSK=0x01;   // 允许 T/C0溢出中断中断      }          /***********************外部中断0子函数********************/        #pragma interrupt_handler int0_isr:2        void int0_isr(void)        {             Count++;        }        /*********************定时计数器0溢出中断子函数*****************/       #pragma interrupt_handler int0_over:10        void int0_over(void)       {           TCNT0=0x83;   //重装初值            if((time%100) == 0)               sumnum1 = num;           if(time == 1000)           {               sumnum=num;               if(sumnum<10)               {                                      if((flag==1)&&(sumnum<10))                   {                       PORTD=0XFF;                       flag=0;                   }                                      flag++;               }               else                       PORTD=0XBF;               num=0;               time=0;           }           num+=Count;           Count=0;           ++time;        } 

    标签: C语言

    上传时间: 2016-03-09

    上传用户:彦 yan

  • 1602数字时钟

    # include < reg52.h > # include < 24C02.h> # define uint unsigned int # define uchar unsigned char   sbit rs = P3^5;  //定义lcd1602的rs端 sbit lcden = P3^4;//定义lcd1602的lcden端口 sbit s1 = P3^0;//定义功能键s1 sbit s2 = P3^1;//定义功能键s2 sbit s3 = P3^2;//定义功能键s3   sbit beep = P2^3;//定义蜂鸣器   uchar Count, s1num; char miao,fen,shi; uchar code table[] = "Designer:X_ZL ";//定义初始上电时液晶默认显示状态     void delay_ms( xms )   //定义延时函数 { uint i,j; for( i = xms ; i > 0 ; i --) for( j = 110 ; j > 0 ; j --); }  

    标签: 1602 数字时钟程序

    上传时间: 2016-07-28

    上传用户:游戏好吗

  • oracle查询语句

    最近在学习Oracle,对测试人员而言必须掌握两种语言:第一种是DML,数据操纵语言 (Data Manipulation Language) 是SQL语言中,负责对数据库对象运行数据访问工作的指令集,以INSERT、UPDATE、DELETE三种指令为核心,分别代表插入、更新与删除。第二种是:DQL,数据查询语言 (Data Query Language) 是SQL语言中,负责进行数据查询而不会对数据本身进行修改的语句,这是最基本的SQL语句。核心指令为SELECT,以及一些辅助指令,如FROM、WHERE等,FROM:表示来源,可以搭配JOIN做链接查询; WHERE:过滤条件;GROUP BY:在使用聚合函数时用到,如SUM,Count,MAX,AVG;HAVING:对聚合结果进行筛选,这是和WHERE的不同点;ORDER BY:排序。

    标签: oracle 基础 资料

    上传时间: 2016-09-15

    上传用户:天涯云海

  • Detecting Cars Using Gaussian Mixture Models

    This example shows how to detect and Count cars in a video sequence using foreground detector based on Gaussian mixture models (GMMs)

    标签: Detecting Gaussian Mixture Models Using Cars

    上传时间: 2016-12-10

    上传用户:Fgufsett

  • 运动会源代码

    #include <malloc.h>       #include <stdio.h>       #include <stdlib.h>       #include <string.h>       #define NULL 0      #define MaxSize 30          typedef struct athletestruct /*运动员*/     {         char name[20];          int score; /*分数*/         int range; /**/         int item; /*项目*/     }ATH;     typedef struct schoolstruct /*学校*/     {         int Count; /*编号*/         int serial; /**/          int menscore; /*男选手分数*/         int womenscore; /*女选手分数*/         int totalscore; /*总分*/         ATH athlete[MaxSize]; /**/         struct schoolstruct *next;      }SCH;         int nsc,msp,wsp;      int ntsp;      int i,j;      int overgame;      int serial,range;      int n;      SCH *head,*pfirst,*psecond;      int *phead=NULL,*pafirst=NULL,*pasecond=NULL;     void create();         void input ()     {         char answer;          head = (SCH *)malloc(sizeof(SCH)); /**/         head->next = NULL;         pfirst = head;          answer = 'y';         while ( answer == 'y' )         {         Is_Game_DoMain:         printf("\nGET Top 5 when odd\nGET Top 3 when even");         printf("\n输入运动项目序号 (x<=%d):",ntsp);         scanf("%d",pafirst);         overgame = *pafirst;         if ( pafirst != phead )         {             for ( pasecond = phead ; pasecond < pafirst ; pasecond ++ )             {                 if ( overgame == *pasecond )                 {                     printf("\n这个项目已经存在请选择其他的数字\n");                     goto Is_Game_DoMain;                 }             }         }         pafirst = pafirst + 1;         if ( overgame > ntsp )         {             printf("\n项目不存在");             printf("\n请重新输入");             goto Is_Game_DoMain;         }         switch ( overgame%2 )         {         case 0: n = 3;break;         case 1: n = 5;break;         }         for ( i = 1 ; i <= n ; i++ )         {         Is_Serial_DoMain:         printf("\n输入序号 of the NO.%d (0<x<=%d): ",i,nsc);                 scanf("%d",&serial);         if ( serial > nsc )          {             printf("\n超过学校数目,请重新输入");             goto Is_Serial_DoMain;         }         if ( head->next == NULL )          {             create();         }         psecond = head->next ;          while ( psecond != NULL )          {             if ( psecond->serial == serial )             {                 pfirst = psecond;                 pfirst->Count = pfirst->Count + 1;                 goto Store_Data;             }             else             {                 psecond = psecond->next;             }         }         create();         Store_Data:                 pfirst->athlete[pfirst->Count].item = overgame;         pfirst->athlete[pfirst->Count].range = i;         pfirst->serial = serial;         printf("Input name:) : ");                 scanf("%s",pfirst->athlete[pfirst->Count].name);         }         printf("\n继续输入运动项目(y&n)?");         answer = getchar();         printf("\n");         }     }         void calculate() /**/     {         pfirst = head->next;         while ( pfirst->next != NULL )         {             for (i=1;i<=pfirst->Count;i++)             {                 if ( pfirst->athlete[i].item % 2 == 0 )                  {                     switch (pfirst->athlete[i].range)                     {                     case 1:pfirst->athlete[i].score = 5;break;                     case 2:pfirst->athlete[i].score = 3;break;                     case 3:pfirst->athlete[i].score = 2;break;                     }                 }                 else                  {                     switch (pfirst->athlete[i].range)                     {                     case 1:pfirst->athlete[i].score = 7;break;                     case 2:pfirst->athlete[i].score = 5;break;                     case 3:pfirst->athlete[i].score = 3;break;                     case 4:pfirst->athlete[i].score = 2;break;                     case 5:pfirst->athlete[i].score = 1;break;                     }                 }                 if ( pfirst->athlete[i].item <=msp )                  {                     pfirst->menscore = pfirst->menscore + pfirst->athlete[i].score;                 }                 else                  {                     pfirst->womenscore = pfirst->womenscore + pfirst->athlete[i].score;                 }             }             pfirst->totalscore = pfirst->menscore + pfirst->womenscore;             pfirst = pfirst->next;         }     }         void output()     {         pfirst = head->next;         psecond = head->next;         while ( pfirst->next != NULL )          {             // clrscr();              printf("\n第%d号学校的结果成绩:",pfirst->serial);             printf("\n\n项目的数目\t学校的名字\t分数");             for (i=1;i<=ntsp;i++)              {                 for (j=1;j<=pfirst->Count;j++)                  {                     if ( pfirst->athlete[j].item == i )                     {                                                                         printf("\n %d\t\t\t\t\t\t%s\n %d",i,pfirst->athlete[j].name,pfirst->athlete[j].score);break;                                             }                 }             }             printf("\n\n\n\t\t\t\t\t\t按任意建 进入下一页");             getchar();             pfirst = pfirst->next;         }     //  clrscr();          printf("\n运动会结果:\n\n学校编号\t男运动员成绩\t女运动员成绩\t总分");         pfirst = head->next;         while ( pfirst->next != NULL )         {             printf("\n %d\t\t %d\t\t %d\t\t %d",pfirst->serial,pfirst->menscore,pfirst->womenscore,pfirst->totalscore);             pfirst = pfirst->next;         }         printf("\n\n\n\t\t\t\t\t\t\t按任意建结束");         getchar();     }         void create()     {                 pfirst = (struct schoolstruct *)malloc(sizeof(struct schoolstruct));         pfirst->next = head->next ;         head->next = pfirst ;                 pfirst->Count = 1;         pfirst->menscore = 0;         pfirst->womenscore = 0;         pfirst->totalscore = 0;     }     void Save()     {FILE *fp;     if((fp = fopen("school.dat","wb"))==NULL)     {printf("can't open school.dat\n");     fclose(fp);     return;     }     fwrite(pfirst,sizeof(SCH),10,fp);     fclose(fp);     printf("文件已经成功保存\n");     }         void main()     {         system("cls");         printf("\n\t\t\t 运动会分数统计\n");         printf("输入学校数目 (x>= 5):");         scanf("%d",&nsc);          printf("输入男选手的项目(x<=20):");         scanf("%d",&msp);          printf("输入女选手项目(<=20):");         scanf("%d",&wsp);          ntsp = msp + wsp;                  phead = (int *)calloc(ntsp,sizeof(int));         pafirst = phead;         pasecond = phead;         input();         calculate();          output();         Save();     }             

    标签: 源代码

    上传时间: 2016-12-28

    上传用户:150501

  • java入门编程合集

    题目:古典问题:有一对兔子,从出生后第3个月起每个月都生一对兔子,小兔子长到第三个月后每个月又生一对兔子,假如兔子都不死,问每个月的兔子总数为多少?    //这是一个菲波拉契数列问题 public class lianxi01 { public static void main(String[] args) { System.out.println("第1个月的兔子对数:    1"); System.out.println("第2个月的兔子对数:    1"); int f1 = 1, f2 = 1, f, M=24;      for(int i=3; i<=M; i++) {       f = f2;       f2 = f1 + f2;       f1 = f;       System.out.println("第" + i +"个月的兔子对数: "+f2);          } } } 【程序2】    题目:判断101-200之间有多少个素数,并输出所有素数。 程序分析:判断素数的方法:用一个数分别去除2到sqrt(这个数),如果能被整除, 则表明此数不是素数,反之是素数。    public class lianxi02 { public static void main(String[] args) {     int Count = 0;     for(int i=101; i<200; i+=2) {      boolean b = false;      for(int j=2; j<=Math.sqrt(i); j++)      {         if(i % j == 0) { b = false; break; }          else           { b = true; }      }         if(b == true) {Count ++;System.out.println(i );}                                   }     System.out.println( "素数个数是: " + Count); } } 【程序3】    题目:打印出所有的 "水仙花数 ",所谓 "水仙花数 "是指一个三位数,其各位数字立方和等于该数本身。例如:153是一个 "水仙花数 ",因为153=1的三次方+5的三次方+3的三次方。 public class lianxi03 { public static void main(String[] args) {      int b1, b2, b3; 

    标签: java 编程

    上传时间: 2017-12-24

    上传用户:Ariza

  • words Count

    可用作字频统计,词频分析,论文查重,支持中文分析

    标签: 词频统计

    上传时间: 2018-04-30

    上传用户:Dear