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

null-terminated

  • HashTable实例 public class HashTable_msg { public HashTable_msg() { String sum_sql="select

    HashTable实例 public class HashTable_msg { public HashTable_msg() { String sum_sql="select mobilenum,count(*) from SJSJ_Msg where (left(in_date,6)=(select left(CONVERT(varchar(12) , getdate(), 112 ),6)))group by mobilenum" Hashtable<String,Integer> ht = new Hashtable<String,Integer>() try{ ResultSet rs= DBAccess.getInstance().select(sum_sql) while(rs!=null) { ht.put(rs.getString(1),rs.getInt(2)) rs.next() } } catch (Exception e) { Logs.printError(e) } } }

    标签: HashTable_msg public HashTable sum_sql

    上传时间: 2014-12-07

    上传用户:a6697238

  • public class guestbook{   String sDBDriver = "sun.jdbc.odbc.JdbcOdbcDriver"   String sConnStr = "

    public class guestbook{   String sDBDriver = "sun.jdbc.odbc.JdbcOdbcDriver"   String sConnStr = "jdbc:odbc:guestbook"   Connection conn = null   ResultSet rs = null

    标签: String JdbcOdbcDriver guestbook sDBDriver

    上传时间: 2017-05-23

    上传用户:qiaoyue

  • TMS2407开发平台键盘LED试验

    TMS2407开发平台键盘LED试验,键盘输入0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,LED输出0,1,2,3,4,5,6,7,8,9,-,E,H,L,NULL

    标签: 2407 TMS LED 开发平台

    上传时间: 2017-05-29

    上传用户:541657925

  • AddUser 功能 增加用户 参数 szServerName

    AddUser 功能 增加用户 参数 szServerName,主机名,如果为本机增加用户,设置为NULL szUserName,用户名 szPassword,密码

    标签: szServerName AddUser 用户 参数

    上传时间: 2017-07-01

    上传用户:wang0123456789

  • 三: 针对带表头结点的单链表

    三: 针对带表头结点的单链表,试编写下列函数。 (1) 定位函数Locate:在单链表中寻找第i个结点。若找到,则函数返回第i个结点的地址;若找不到,则函数返回NULL。 (2) 求最大值函数max:通过一趟遍历在单链表中确定值最大的结点。 (3) 统计函数number:统计单链表中具有给定值x的所有元素。 (4) 建立函数create:根据一维数组a[n]建立一个单链表,使单链表中各元素的次序与a[n]中各元素的次序相同,要求该程序的时间复杂性为O(n)。 (5) 整理函数tidyup:在非递减有序的单链表中删除值相同的多余结点。

    标签: 表头 单链表

    上传时间: 2017-07-20

    上传用户:CSUSheep

  • 员工管理系统 在一个公司里员工之间都有工作上的联系。对方的联系方式

    员工管理系统 在一个公司里员工之间都有工作上的联系。对方的联系方式,部门这些资料的获取;或是上级对员工资料的更改,工资的调整,员工对资料的查看,修改。 5.1.1 功能描述 1:管理员能对员工资料进行添加,删除,修改操作。普通用户不能进行添加或删除操作 2:界面要求使用简便,操作简单 3:信息要做到保密,不同权限的用户操作不同,看到的信息也不一样 4:对不同的工资段进行高亮标记 §5.2 设计思想 根据不同用户的行为来实现不同的操作 §5.2.1 系统构思 不同用户返回不同的操作,具有不同的权限 §5.2.2 关键技术与算法 修改界面与表格的同步更新,直接双击表格修改数据 §5.2.3关键数据结构 以下是员工的数据 workerID int IDENTITY(1,1) , name varchar (20) NULL, sex varchar (10) NULL, age int NULL, position varchar (20) NULL, cellphone varchar (20) NULL, salary int NULL, userl varchar (20) NOT NULL, userp varchar (20) NOT NULL, classify int NOT NULL

    标签: 管理系统 方式

    上传时间: 2017-08-24

    上传用户:三人用菜

  • 说明: column_list列出要添加数据的列名。在给表或视图中部分列添加数据时

    说明: column_list列出要添加数据的列名。在给表或视图中部分列添加数据时,必须使用该选项说明这部分列名。 DEFAULT VALUES说明向表中所有列插入其缺省值。对于具有INDENTITY属性或timestamp数据类型的列,系统将自动插入下一个适当值。对于没有设置缺省值的列,根据它们是否允许空值,将插入null或返回一错误信息。

    标签: column_list 数据

    上传时间: 2017-08-28

    上传用户:离殇

  • 两个链表的交集

    两个链表的交集 #include<stdio.h> #include<stdlib.h> typedef struct Node{   int data;   struct  Node *next; }Node; void initpointer(struct Node *p){   p=NULL; } int  printlist(struct Node* head){   int flag=1;   head=head->next;   /*   因为标记1的地方你用了头结点,所以第一个数据域无效,应该从下一个头元结点开始   */   if(head==NULL)     printf("NULL\n");   else   {     while(head!=NULL)     {       if(flag==1)       {       printf("%d",head->data);       flag=0;       }       else       {         printf(" %d",head->data);       }       head=head->next;     }     printf("\n");   }   return 0; } struct Node *creatlist(struct Node *head) {      int n;    struct  Node *p1=(struct Node *)malloc(sizeof(struct Node));   p1->next=NULL; while(scanf("%d",&n),n!=-1) {   struct Node *pnode=(struct Node *)malloc(sizeof(struct Node));   pnode->next=NULL;      pnode->data=n;   if(head==NULL)     head=pnode;   p1->next=pnode;   p1=pnode; } return head; } struct Node *Intersect(struct Node *head1, struct Node *head2) { struct Node *p1=head1,*p2=head2;/*我这里没有用头指针和头结点,这里是首元结点head1里面就是第一个数据,一定要理解什么事头指针, 头结点,和首元结点 具体你一定要看这个博客:http://blog.sina.com.cn/s/blog_71e7e6fb0101lipz.html*/ struct Node *head,*p,*q; head = (struct Node *)malloc(sizeof(struct Node)); head->next = NULL; p = head; while( (p1!=NULL)&&(p2!=NULL) ) { if (p1->data == p2->data) { q = (struct Node *)malloc(sizeof(struct Node)); q->data = p1->data; q->next = NULL; p->next = q;//我可以认为你这里用了头结点,也就是说第一个数据域无效     **标记1** p = q; p1 = p1->next; p2 = p2->next; } else if (p1->data < p2->data) { p1 = p1->next; } else { p2 = p2->next; } } return head; } int main() {   struct Node *head=NULL,*headt=NULL,*t;   //initpointer(head);//这里的函数相当于head=NULL;  // initpointer(headt);//上面已经写了headt=NULL那么这里可以不用调用这个函数   head=creatlist(head);   headt=creatlist(headt);   t=Intersect(head,headt);   printlist(t); }

    标签: c语言编程

    上传时间: 2015-04-27

    上传用户:coco2017co

  • asp实现限制一个ip只能访问一次的方法

    asp实现限制一个ip只能访问一次的方法 <%  '/////////////////////////////////////////////////////  '// //  '//作用:一个IP地址只允许访问本页一次 //  '//引用:<!-- #include file="Check_Ip.asp" --> //  '// //  '/////////////////////////////////////////////////////    'Response.Charset = 936 '设置输出编码为简体中文  'Response.Buffer = false '关闭缓冲区    Dim Fso,ts,IpList,Cfs    '设置Cookies函数  Function SetCookie()  Response.Cookies("IsBrow") = "Brow" Response.Cookies("IsBrow").Expires = Date+365  End Function    '记录IP地址函数  Function WriteIp(FileName, IpAddress)  Set Fso = Server.CreateObject("Scripting.FileSystemObject")  Set ts = Fso.OpenTextFile(Server.MapPath(FileName),8,true)  ts.WriteLine IpAddress  ts.Close  Set ts = Nothing  Set Fso = Nothing  End Function    '读取IP地址函数  Function ReadIpList(FileName)  Set Fso = Server.CreateObject("Scripting.FileSystemObject")  If Not Fso.FileExists(Server.MapPath(FileName)) Then  CreateFile("Iplist.txt")  Exit Function  End If    Set ts = Fso.OpenTextFile(Server.MapPath(FileName))  Iplist = ts.ReadAll  ts.Close  Set ts = Nothing  Set Fso = Nothing  ReadIpList = Iplist  End Function    '创建文件函数  Function CreateFile(FileName)  Set Fso = Server.CreateObject("Scripting.FileSystemObject")  Set Cfs = Fso.CreateTextFile(Server.MapPath(FileName))  Cfs.Close  Set Cfs = Nothing  Set Fso = Nothing  End Function    '关闭当前IE窗口函数(注:IE6下通过,其他浏览器未测试)  Function CloseWindow()  'Response.Write "<script>window.location='javascript:window.opener=null;window.close();'</script>"  Response.Redirect "http://www.baidu.com" End Function    Ip = Request.ServerVariables("REMOTE_ADDR") '获取浏览者IP地址    Cookie = Request.Cookies("IsBrow") '获取当前Cookies  'Response.Write Cookie    If Request.ServerVariables("HTTP_X_FORWARDED_FOR") <> "" Then  Response.Write "本站不允许使用代理访问" Response.End()  Else  If Cookie = "Brow" Then  CloseWindow()  Else  If Instr(ReadIpList("Iplist.txt"),Ip) <>0  Then  CloseWindow()  Else  WriteIp "Iplist.txt" , Ip  End If  SetCookie()  End If  End If  %>

    标签: asp 访问

    上传时间: 2016-07-14

    上传用户:helei0915

  • 运动会源代码

    #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