2018.7.11

1.谈谈你对Ajax 的理解?(概念、特点、作用)

AJAX 全称为「Asynchronous JavaScript And XML」(异步 JavaScript 和 XML) 是指一种创建交互式网页应用的开发技术、改善用户体验,实现无刷新效果。

优点
a、无刷新更新数据,能在不刷新整个页面的前提下与服务器通信维护数据;
b、异步与服务器通信,不需要打断用户的操作,具有更加迅速的响应能力;
c、提高 Web 程序的性能;
d、基于标准被广泛支持,不需要下载插件;
缺点
a、破坏浏览器「前进」、「后退」按钮的正常功能,可以通过简单的插件弥补;
b、对搜索引擎的支持不足;


2.

表 teacher_course

教师号 星期号 是否有课
1 2
1 3
2 1
3 2
1 2

写一条 sql 语句让你变为这样的表 :

教师号 星期一 星期二 星期三
1 0 2 1
2 1 0 0
3 0 1 0




select 教师号,  
sum(case when 星期号=1 and 是否有课='有' then 1 else 0 end) AS 星期一,  
sum(case when 星期号=2 and 是否有课='有' then 1 else 0 end) AS 星期二,  
sum(case when 星期号=3 and 是否有课='有' then 1 else 0 end) AS 星期三  
from techer
group by 教师号 

3.

public static void main(String[] args) {
int n = 10;
System.out.println("第" + n + "个月兔子总数为" + fun(n));
}

public static int fun(int n) {
if (n == 1 || n == 2) {
return 1;
} else {
return fun(n - 1) + fun(n - 2);
}
}
}

扫描二维码关注公众号,回复: 2311656 查看本文章

猜你喜欢

转载自blog.csdn.net/mrzhang233/article/details/81007908