码迷,mamicode.com
首页 > 其他好文 > 详细

华为交流会准备

时间:2016-08-24 19:06:17      阅读:301      评论:0      收藏:0      [点我收藏+]

标签:

1、项目的架构

SpringMVC

1)分层Controller,Service,Dao

a、Dao层整合hibernate做数据持久化

b、Controller层与JSP,通过MVC(视图+模型+控制),实现前端界面和动态数据更新

c、Service服务层,封装Dao数据,给Controller通过服务。

2)依赖注入和面向切面编程AOP

2、写个链表

 1 typedef struct Node {
 2     Element data;
 3     struct Node * next;
 4 }Node;
 5 
 6 Node * list;
 7 
 8 void insert(Node * p) {
 9     if(list==NULL) {
10         list = (Node*)malloc(sizeof(Node));
11         list->data = p->data;
12         return;
13     }
14     Node * temp = (Node*)malloc(sizeof(Node));
15     temp->data = p->data;
16     temp->next = list->next;
17     list->next = temp;
18 }
19 
20 boolean delete(Node *p) {
21     if(list==NULL)
22         return false;
23     Node * pretemp = list;
24     Node * temp = list;
25     while(temp->data!=p->data && temp!=NULL) {pretemp=temp; temp=temp->next;}
26     if(temp!=NULL) {
27         pretemp->next = temp->next;
28         free(temp);
29         return true;
30     }
31     return false;
32 }

3、冒泡算法

 1 void bubble_sort(int array[], int n) {
 2     bool flag = true;
 3     for(int i=0; i<n-1 && flag; i++) {
 4         flag = false;
 5         for(int j=0; j<=n-i-2; j++)
 6             if (array[j] < array[j+1]) {
 7                 int temp = array[j];
 8                 array[j] = array[j+1];
 9                 array[j+1] = temp;
10                 flag = true;
11             }
12     }
13 }

 4、IP地址与掩码

子网划分。主机IP,子网掩码

 1 IP地址为126.150.28.57,子网掩码为255.240.0.0,那么地址类别是(),网络地址是(),直接广播地址是(),受限广播地址是(),主机地址是(),子网内的第一个可用IP地址是(),子网内的最后一个可用IP地址是()
 2 解答:
 3 126.150.28.57/255.240.0.0126.10010110.28.57
 4 地址类别是:A类
 5 网络地址是:126.144.0.0  (主机位全0)
 6 直接广播地址是:126.159.255.255  (主机位全1)
 7 受限广播地址是:255.255.255.255
 8 主机地址是:0.6.28.57  (网络位全0)
 9 子网内的第一个可用IP地址是:126.144.0.1  (网络地址+1)
10 子网内的最后一个可用IP地址是:126.159.255.254  (广播地址-1)

参考链接:http://lyj.fj61.net/show.aspx?id=485&cid=87

5、OSI7层

层次

主要协议

应用层

HTTP、FTP、SMTP、DNS、DSP、Telnet、Gopher、WAIS……

传输层

TCP、UDP、DVP……

网络层

IP、ICMP、AKP、RARP、UUCP……

接口层

Ethernet、Arpanet、PDN……

物理层

只要能传输IP数据报(Datagram)

 
   

 

 

 

 

 

 

 

 

 

 

OSI7层:应用层,表示层,会话层,传输层,数据链路层,物理层

华为交流会准备

标签:

原文地址:http://www.cnblogs.com/LideAiYaner-1wn/p/5804122.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!