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

Next-generation

  • 简单的计算器

    // 学生管理.cpp : Defines the entry point for the application. // #include "stdafx.h" #include "resource.h" #define MAX_LOADSTRING 100 // Global Variables: HINSTANCE hInst; // current instance TCHAR szTitle[MAX_LOADSTRING]; // The title bar text TCHAR szWindowClass[MAX_LOADSTRING]; // The title bar text // Foward declarations of functions included in this code module: ATOM MyRegisterClass(HINSTANCE hInstance); BOOL InitInstance(HINSTANCE, int); LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM); struct person {   char name[10];   int ID;   int cj_yw;   int cj_sx;   struct person* next;   struct person* pro; }per; int APIENTRY WinMain(HINSTANCE hInstance,                      HINSTANCE hPrevInstance,                      LPSTR     lpCmdLine,                      int       nCmdShow) {   // TODO: Place code here. MSG msg; HACCEL hAccelTable; // Initialize global strings LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); LoadString(hInstance, IDC_MY, szWindowClass, MAX_LOADSTRING); MyRegisterClass(hInstance); // Perform application initialization: if (!InitInstance (hInstance, nCmdShow))  { return FALSE; } hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_MY); // Main message loop: while (GetMessage(&msg, NULL, 0, 0))  { if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))  { TranslateMessage(&msg); DispatchMessage(&msg); } } return msg.wParam; } // //  FUNCTION: MyRegisterClass() // //  PURPOSE: Registers the window class. // //  COMMENTS: // //    This function and its usage is only necessary if you want this code //    to be compatible with Win32 systems prior to the 'RegisterClassEx' //    function that was added to Windows 95. It is important to call this function //    so that the application will get 'well formed' small icons associated //    with it. // ATOM MyRegisterClass(HINSTANCE hInstance) { WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX);  wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = (WNDPROC)WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = hInstance; wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_MY); wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wcex.lpszMenuName = (LPCSTR)IDC_MY; wcex.lpszClassName = szWindowClass; wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL); return RegisterClassEx(&wcex); } // //   FUNCTION: InitInstance(HANDLE, int) // //   PURPOSE: Saves instance handle and creates main window // //   COMMENTS: // //        In this function, we save the instance handle in a global variable and //        create and display the main program window. // BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) {    HWND hWnd;    hInst = hInstance; // Store instance handle in our global variable    hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,       CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);    if (!hWnd)    {       return FALSE;    }    ShowWindow(hWnd, nCmdShow);    UpdateWindow(hWnd);    return TRUE; } // //  FUNCTION: WndProc(HWND, unsigned, WORD, LONG) // //  PURPOSE:  Processes messages for the main window. // //  WM_COMMAND - process the application menu //  WM_PAINT - Paint the main window //  WM_DESTROY - post a quit message and return // // LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { int wmId, wmEvent; PAINTSTRUCT ps; HDC hdc; TCHAR szHello[MAX_LOADSTRING]; LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING); switch (message)  { case WM_COMMAND: wmId    = LOWORD(wParam);  wmEvent = HIWORD(wParam);  // Parse the menu selections: switch (wmId) { case IDM_ABOUT:   DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);   break; case IDM_EXIT:   DestroyWindow(hWnd);   break; default:   return DefWindowProc(hWnd, message, wParam, lParam); } break; case WM_PAINT: hdc = BeginPaint(hWnd, &ps); // TODO: Add any drawing code here... RECT rt; GetClientRect(hWnd, &rt); DrawText(hdc, szHello, strlen(szHello), &rt, DT_CENTER); EndPaint(hWnd, &ps); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam);    }    return 0; } // Mesage handler for about box. LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_INITDIALOG: return TRUE; case WM_COMMAND: if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)  { EndDialog(hDlg, LOWORD(wParam)); return TRUE; } break; }     return FALSE; }

    标签: 学生 计算器

    上传时间: 2016-12-29

    上传用户:767483511

  • java学生数据库

    /*import java.util.Scanner; //主类 public class student122 {   //主方法   public static void main(String[] args){     //定义7个元素的字符数组     String[] st = new String[7];     inputSt(st);       //调用输入方法     calculateSt(st);   //调用计算方法     outputSt(st);      //调用输出方法   }   //其他方法   //输入方法 private static void inputSt(String st[]){     System.out.println("输入学生的信息:");   System.out.println("学号 姓名 成绩1,2,3");   //创建键盘输入类   Scanner ss = new Scanner(System.in);   for(int i=0; i<5; i++){     st[i] = ss.next(); //键盘输入1个字符串   } }   //计算方法 private static void calculateSt(String[] st){   int sum = 0;         //总分赋初值 int ave = 0;         //平均分赋初值 for(int i=2;i<5;i++) {   /计总分,字符变换成整数后进行计算   sum += Integer.parseInt(st[i]); } ave = sum/3;         //计算平均分 //整数变换成字符后保存到数组里 st[5] = String.valueOf(sum); st[6] = String.valueOf(ave); }   //输出方法 private static void outputSt(String[] st){     System.out.print("学号 姓名 ");   //不换行   System.out.print("成绩1 成绩2 成绩3 ");   System.out.println("总分 平均分");//换行   //输出学生信息   for(int i=0; i<7; i++){     //按格式输出,小于6个字符,补充空格     System.out.printf("%6s", st[i]);   }   System.out.println();            //输出换行 } }*/   import java.util.Scanner;   public class student122 {   public static void main(String[] args) { // TODO 自动生成的方法存根 String[][] st = new String[3][8]; inputSt(st); calculateSt(st); outputSt(st); }   //输入方法 private static void inputSt(String st[][]) { System.out.println("输入学生信息:"); System.out.println("班级 学号 姓名 成绩:数学 物理 化学"); //创建键盘输入类 Scanner ss = new Scanner(System.in); for(int j = 0; j < 3; j++) { for(int i = 0; i < 6; i++) { st[j][i] = ss.next(); } } } //输出方法 private static void outputSt(String st[][]) { System.out.println("序号 班级 学号 姓名 成绩:数学 物理 化学 总分 平均分"); //输出学生信息 for(int j = 0; j < 3; j++) { System.out.print(j+1 + ":"); for(int i = 0; i < 8; i++) { System.out.printf("%6s", st[j][i]); } System.out.println(); } }     //计算方法     private static void calculateSt(String[][] st)     {      int sum1 = 0;      int sum2 = 0; int sum3 = 0;      int ave1 = 0;      int ave2 = 0;      int ave3 = 0;      for(int i = 3; i < 6; i++)      {      sum1 += Integer.parseInt(st[0][i]);      }      ave1 = sum1/3;           for(int i = 3; i < 6; i++)      {      sum2 += Integer.parseInt(st[1][i]);      }      ave2 = sum2/3;           for(int i = 3; i < 6; i++)      {      sum3 += Integer.parseInt(st[2][i]);      }      ave3 = sum3/3;           st[0][6] = String.valueOf(sum1);      st[1][6] = String.valueOf(sum2);      st[2][6] = String.valueOf(sum3);      st[0][7] = String.valueOf(ave1);      st[1][7] = String.valueOf(ave2);      st[2][7] = String.valueOf(ave3);     } }

    标签: java 数据库

    上传时间: 2017-03-17

    上传用户:simple

  • 单链表习题

    链表习题 1. 编程实现链表的基本操作函数。 (1). void CreatList(LinkList &La,int m) //依次输入m个数据,并依次建立各个元素结点,逐个插入到链表尾;建立带表头结点的单链表La; (2). void ListPrint(LinkList La)  //将单链表La的数据元素从表头到表尾依次显示。 (3).void ListInsert (LinkList &L,int i,ElemType e){ //在带头结点的单链表L中第i个数据元素之前插入数据元素e (4). void ListDelete(LinkList &La, int n, ElemType &e) //删除链表的第n个元素,并用e返回其值。 (5). int Search(LinkList L, ElemType x) //在表中查找是否存在某个元素x,如存在则返回x在表中的位置,否则返回0。 (6). int ListLength(LinkList L)    //求链表L的表长 (7). void GetElem(LinkList L, int i, ElemType &e)   //用e返回L中第i个元素的值 链表的结点类型定义及指向结点的指针类型定义可以参照下列代码:    typedef  struct  Node{     ElemType     data;       // 数据域   struct   Node  *next;    // 指针域 }LNode, *LinkList;

    标签: 单链表

    上传时间: 2017-11-15

    上传用户:BIANJIAXIN

  • 单链表习题

    1. 编程实现链表的基本操作函数。 (1). void CreatList(LinkList &La,int m) //依次输入m个数据,并依次建立各个元素结点,逐个插入到链表尾;建立带表头结点的单链表La; (2). void ListPrint(LinkList La)  //将单链表La的数据元素从表头到表尾依次显示。 (3).void ListInsert (LinkList &L,int i,ElemType e){ //在带头结点的单链表L中第i个数据元素之前插入数据元素e (4). void ListDelete(LinkList &La, int n, ElemType &e) //删除链表的第n个元素,并用e返回其值。 (5). int Search(LinkList L, ElemType x) //在表中查找是否存在某个元素x,如存在则返回x在表中的位置,否则返回0。 (6). int ListLength(LinkList L)    //求链表L的表长 (7). void GetElem(LinkList L, int i, ElemType &e)   //用e返回L中第i个元素的值 链表的结点类型定义及指向结点的指针类型定义可以参照下列代码:    typedef  struct  Node{     ElemType     data;       // 数据域   struct   Node  *next;    // 指针域 }LNode, *LinkList;

    标签: 单链表

    上传时间: 2017-11-15

    上传用户:BIANJIAXIN

  • 3GPP协议

    3rd Generation Partnership Project; Technical Specification Group Radio Access Network; Further advancements for E-UTRA; LTE-Advanced feasibility studies in RAN WG4 (Release 9)

    标签: 3GPP 协议

    上传时间: 2018-04-28

    上传用户:doforfuture

  • 数据结构实验

    #include <stdio.h>   #include <stdlib.h> ///链式栈      typedef struct node   {       int data;       struct node *next;   }Node,*Linklist;      Linklist Createlist()   {       Linklist p;       Linklist h;       int data1;       scanf("%d",&data1);       if(data1 != 0)       {           h = (Node *)malloc(sizeof(Node));           h->data = data1;           h->next = NULL;       }       else if(data1 == 0)       return NULL;       scanf("%d",&data1);       while(data1 != 0)       {           p = (Node *)malloc(sizeof(Node));           p -> data = data1;           p -> next = h;           h = p;           scanf("%d",&data1);       }       return h;   }      void Outputlist(Node *head)   {       Linklist p;       p = head;       while(p != NULL )       {           printf("%d ",p->data);           p = p->next;       }       printf("\n");   }      void Freelist(Node *head)   {       Node *p;       Node *q = NULL;       p = head;       while(p != NULL)       {           q = p;           p = p->next;           free(q);       }   }      int main()   {       Node *head;       head = Createlist();          Outputlist(head);          Freelist(head);          return 0;   }   2.顺序栈 [cpp] view plain copy #include <iostream>   #include <stdio.h>   #include <stdlib.h> ///顺序栈   #define MaxSize 100      using namespace std;      typedef

    标签: 数据结构 实验

    上传时间: 2018-05-09

    上传用户:123456..

  • 数据结构实验

    #include <iostream> #include <stdio.head> #include <stdlib.head> #include <string.head> #define ElemType int #define max 100 using namespace std; typedef struct node1 { ElemType data; struct node1 *next; }Node1,*LinkList;//链栈 typedef struct { ElemType *base; int top; }SqStack;//顺序栈 typedef struct node2 { ElemType data; struct node2 *next; }Node2,*LinkQueue; typedef struct node22 { LinkQueue front; LinkQueue rear; }*LinkList;//链队列 typedef struct { ElemType *base; int front,rear; }SqQueue;//顺序队列 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 //1.采用链式存储实现栈的初始化、入栈、出栈操作。 LinkList CreateStack()//创建栈 { LinkList top; top=NULL; return top; } bool StackEmpty(LinkList s)//判断栈是否为空,0代表空 { if(s==NULL) return 0; else return 1; } LinkList Pushead(LinkList s,int x)//入栈 { LinkList q,top=s; q=(LinkList)malloc(sizeof(Node1)); q->data=x; q->next=top; top=q; return top; } LinkList Pop(LinkList s,int &e)//出栈 { if(!StackEmpty(s)) { printf("栈为空。"); } else { e=s->data; LinkList p=s; s=s->next; free(p); } return s; } void DisplayStack(LinkList s)//遍历输出栈中元素 { if(!StackEmpty(s)) printf("栈为空。"); else { wheadile(s!=NULL) { cout<<s->data<<" "; s=s->next; } cout<<endl; } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 //2.采用顺序存储实现栈的初始化、入栈、出栈操作。 int StackEmpty(int t)//判断栈S是否为空 { SqStack.top=t; if (SqStack.top==0) return 0; else return 1; } int InitStack() { SqStack.top=0; return SqStack.top; } int pushead(int t,int e) { SqStack.top=t; SqStack.base[++SqStack.top]=e; return SqStack.top; } int pop(int t,int *e)//出栈 { SqStack.top=t; if(!StackEmpty(SqStack.top)) { printf("栈为空."); return SqStack.top; } *e=SqStack.base[s.top]; SqStack.top--; return SqStack.top; } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 //3.采用链式存储实现队列的初始化、入队、出队操作。 LinkList InitQueue()//创建 { LinkList head; head->rear=(LinkQueue)malloc(sizeof(Node)); head->front=head->rear; head->front->next=NULL; return head; } void deleteEle(LinkList head,int &e)//出队 { LinkQueue p; p=head->front->next; e=p->data; head->front->next=p->next; if(head->rear==p) head->rear=head->front; free(p); } void EnQueue(LinkList head,int e)//入队 { LinkQueue p=(LinkQueue)malloc(sizeof(Node)); p->data=e; p->next=NULL; head->rear->next=p; head->rear=p; } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 //4.采用顺序存储实现循环队列的初始化、入队、出队操作。 bool InitQueue(SqQueue &head)//创建队列 { head.data=(int *)malloc(sizeof(int)); head.front=head.rear=0; return 1; } bool EnQueue(SqQueue &head,int e)//入队 { if((head.rear+1)%MAXQSIZE==head.front) { printf("队列已满\n"); return 0; } head.data[head.rear]=e; head.rear=(head.rear+1)%MAXQSIZE; return 1; } int QueueLengthead(SqQueue &head)//返回队列长度 { return (head.rear-head.front+MAXQSIZE)%MAXQSIZE; } bool deleteEle(SqQueue &head,int &e)//出队 { if(head.front==head.rear) { cout<<"队列为空!"<<endl; return 0; } e=head.data[head.front]; head.front=(head.front+1)%MAXQSIZE; return 1; } int gethead(SqQueue head)//得到队列头元素 { return head.data[head.front]; } int QueueEmpty(SqQueue head)//判断队列是否为空 { if (head.front==head.rear) return 1; else return 0; } void travelQueue(SqQueue head)//遍历输出 { wheadile(head.front!=head.rear) { printf("%d ",head.data[head.front]); head.front=(head.front+1)%MAXQSIZE; } cout<<endl; } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 //5.在主函数中设计一个简单的菜单,分别测试上述算法。 int main() { LinkList top=CreateStack(); int x; wheadile(scanf("%d",&x)!=-1) { top=Pushead(top,x); } int e; wheadile(StackEmpty(top)) { top=Pop(top,e); printf("%d ",e); }//以上是链栈的测试 int top=InitStack(); int x; wheadile(cin>>x) top=pushead(top,x); int e; wheadile(StackEmpty(top)) { top=pop(top,&e); printf("%d ",e); }//以上是顺序栈的测试 LinkList Q; Q=InitQueue(); int x; wheadile(scanf("%d",&x)!=-1) { EnQueue(Q,x); } int e; wheadile(Q) { deleteEle(Q,e); printf("%d ",e); }//以上是链队列的测试 SqQueue Q1; InitQueue(Q1); int x; wheadile(scanf("%d",&x)!=-1) { EnQueue(Q1,x); } int e; wheadile(QueueEmpty(Q1)) { deleteEle(Q1,e); printf("%d ",e); } return 0; }

    标签: 数据结构 实验

    上传时间: 2018-05-09

    上传用户:123456..

  • keilc51v6.12

      keil C51 v6.12 完全解密版的安装说明      安装方法是先将V6.12安装程序复制到某个目录下,如复制到D:\keilC51  然后执行D:\keilC51\setup\setup.exe 安装程序,选择安装Eval Version版进  行安装。  注册码:K199U-20071-12A9U      当出现Please insert the add-on disk的提示画面,可按next按钮(不用  插入软盘)。      安装好之后就可以使用,没有代码大小的限制,这是完全版,比 Eval版增  加浮点库等内容。

    标签: keilc 51 12 v6

    上传时间: 2020-03-20

    上传用户:mimeme

  • 6LoWPAN+The+Wireless+Embedded+Internet

    The Internet of Things is considered to be the next big opportunity, and challenge, for the Internet engineering community, users of technology, companies and society as a whole. It involves connecting embedded devices such as sensors, home appliances, weather stations and even toys to Internet Protocol (IP) based networks. The number of IP-enabled embedded devices is increasing rapidly, and although hard to estimate, will surely outnumber the number of personal computers (PCs) and servers in the future. With the advances made over the past decade in microcontroller,low-power radio, battery and microelectronic technology, the trend in the industry is for smart embedded devices (called smart objects) to become IP-enabled, and an integral part of the latest services on the Internet. These services are no longer cyber, just including data created by humans, but are to become very connected to the physical world around us by including sensor data, the monitoring and control of machines, and other kinds of physical context. We call this latest frontier of the Internet, consisting of wireless low-power embedded devices, the Wireless Embedded Internet. Applications that this new frontier of the Internet enable are critical to the sustainability, efficiency and safety of society and include home and building automation, healthcare, energy efficiency, smart grids and environmental monitoring to name just a few.

    标签: Embedded Internet Wireless 6LoWPAN The

    上传时间: 2020-05-26

    上传用户:shancjb

  • Ambient Networks

    One traditional view of how wireless networks evolve is of a continuous, inevitable progres- sion to higher link speeds, combined with greater mobility over wider areas. This standpoint certainly captures the development from first and second generation cellular systems focused on voice support, and the early short-range wireless data networks, through to today’s 3G cellular and mobile broadband systems; there is every confidence that the trend will continue some way into the future. 

    标签: Networks Ambient

    上传时间: 2020-05-26

    上传用户:shancjb