`
cjliang
  • 浏览: 1317 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论
收藏列表
标题 标签 来源
sql slq
select * from emp;

select '编号是:' || empno || '的雇员,姓名是:' || ename || ',工作是:' || job from emp  where empno = '7369' and ename='smith' and job = 'clear';

select ename,sal*12 income from emp;

select * from emp where sal >1500;

select * from emp where comm is not null;

select * from emp where comm is null;

select * from emp where sal >1500 and comm is not null;

select * from emp where sal >1500 or comm is not null;

select * from emp where sal <1500 or comm is null;
select * from emp where not(sal > 1500 or comm is not null);

select * from emp where sal >1500 and sal < 3000;

select * from emp where sal >= 1500 and sal <= 3000;
select * from emp where sal between 1500 and 3000;

select * from emp where hiredate between '1-1-81' and '31-12-81';

select * from emp where ename = 'smith';

select * from emp where empno = '7369' or empno = '7499' or empno = '7521';
select * from emp where empno in(7369,7499,7521);

select * from emp where empno not in (7369,7499,7521);

select * from emp where ename in ('smith','allen','king');

select * from emp where ename like '_M%';

select * from emp where ename like '%M%';

select * from emp where hiredate like '%81%';

select * from emp where sal like '%5%';

select * from emp where ename <> 7369;
select * from emp where ename != 7369;

select * from emp order by sal asc;
select * from emp order by sal;

select * from emp order by sal desc;

select * from emp where deptno = 20 order by sql desc,hiredate asc;

select upper('hello') from dual;

select lower('HELLO') from dual;

select * from emp where ename = upper('smith');

select initcap('hello world') from dual;

select initcap(ename) from emp;

select concat('hello','world') from dual;

select substr('hello',1,3) 截取字符串,length('hello') 字符串的长度,replace('hello','1','x') 字符串替换  from dual;

select ename ,substr(ename,-3,3) from emp;
select ename,substr(ename,length(ename)-2) from emp;

select round(123.123) from dual;

select round(123.123,2) from dual;

select round(789.536,-2) from dual;

select trunc(789.536) from dual;

select trunc(789.546,2) from dual;

select trunc(789.536,-2) from dual;

select mod(10,3) from dual;

select empno,ename,round((sysdate - hiredate) / 7) from emp where deptno = 10;

select empon,ename,sal,comm,(sal+comm)*12 奖金 from emp;
select empon,ename,sal,comm,nvl(comm,0),(sal+nvl(comm,0))*12 income from emp;

select empno 雇员编号, ename 雇员姓名,hiredate 雇佣日期, decode(job,'CLERK','业务员','SALESMAN','销售人员','MANAGER','经理','ANALYST','分析员','PRESIDENT','总裁') 职位 from emp;

select * from emp natural join dept;
select * from emp e join dept d using(deptno);

select * from emp e, dept d where e.deptno = d.depteno;

select e.ename,e.job,m.ename from emp e,emp m where e.mgr = m.empno;

select e.ename,e,job,m.ename,d.dname from emp e,emp m,dept d where e.mgr = m.empno and e.deptno = d.deptno;

65. 要求查询出每个雇员的姓名, 工资, 部门名称, 工资在公司的等级(salgrade), 及其领导的姓名及工资所在公司的等级
select e.ename, e.sal, d.dname, s.grade, m.ename, m.sal, ms.grade
from emp e, dept d, salgrade s, emp m, salgrade ms
where e.deptno = d.deptno 
and e.sal between s.losal and s.hisal 
and e.mgr = m.empno
and m.sal between ms.losal and ms.hisal;

select e.ename, 
e.sal, 
d.dname, 
decode(s.grade, 1, '第五等级', 2, '第四等级', 3, '第三等级', 4, '第二等级', 5, '第一等级'), 
m.ename, 
m.sal, 
decode(ms.grade, 1, '第五等级', 2, '第四等级', 3, '第三等级', 4, '第二等级', 5, '第一等级')
from emp e, dept d, salgrade s, emp m, salgrade ms
where e.deptno = d.deptno and e.sal between s.losal and s.hisal and e.mgr = m.empno
and m.sal between ms.losal and ms.hisal;
66. select empno, ename, d.deptno, dname, loc from emp e, dept d where e.deptno = d.deptno;
    select empno, ename, d.deptno, dname, loc from emp e inner join dept d on e.deptno = d.deptno;

67. 左外连接
    select empno, ename, d.deptno, dname, loc from emp e, dept d where e.deptno = d.deptno(+);
    select empno, ename, d.deptno, dname, loc from emp e left outer join dept d on e.deptno = d.deptno;
    select empno, ename, d.deptno, dname, loc from emp e left join dept d on e.deptno = d.deptno(+);

68. 右外连接
    select empno, ename, d.deptno, dname, loc from emp e, dept d where e.deptno(+) = d.deptno;
    select empno, ename, d.deptno, dname, loc from emp e right outer join dept d on e.deptno = d.deptno;
    select empno, ename, d.deptno, dname, loc from emp e right join dept d on e.deptno = d.deptno;

69. select e.empno, e.ename, m.empno, m.ename from emp e, emp m where e.mgr = m.empno;

70. select e.empno, e.ename, m.empno, m.ename from emp e, emp m where e.mgr = m.empno(+);

71. 
select * from emp e, dept d where e.deptno = d.deptno and d.deptno = 30;
select * from emp e inner join dept d on e.deptno = d.deptno where d.deptno = 30;
select * from emp e join dept d on e.deptno = d.deptno where d.deptno = 30;
select * from emp e natural join dept d where deptno = 30;
select * from emp e join dept d using(deptno) where deptno = 30;

72. 
select e.ename, d.deptno, d.dname, d.loc from emp e right outer join dept d on e.deptno = d.deptno;
select e.ename, d.deptno, d.dname, d.loc from emp e right join dept d on e.deptno = d.deptno;
select e.ename, d.deptno, d.dname, d.loc from emp e, dept d where e.deptno(+) = d.deptno;

73. select count(ename) from emp;

74. select min(sal) from emp;

75. select max(sal) from emp;

76. select sum(sal) from emp;

77. select avg(sal) from emp;

78. select sum(sal) from emp where deptno = 20;

79. select avg(sal) from emp where deptno = 20;

80. 求出每个部门的雇员数量
select deptno, count(deptno) from emp group by deptno;
select deptno, count(empno) from emp group by deptno;

81. 求出每个部门的平均工资
select deptno, avg(sal) from emp group by deptno;

82. 按部门分组, 并显示部门的名称, 及每个部门的员工数
select d.dname, count(e.empno) from emp e, dept d 
where e.deptno = d.deptno
group by d.dname;

select d.deptno, d.dname, temp.c
from (select deptno, count(e.empno) c from emp e group by e.deptno) temp, dept d
where temp.deptno = d.deptno;

83. 要求显示出平均工资大于 2000 的部门编号和平均工资
select deptno, avg(sal) from emp group by deptno having avg(sal) > 2000;

84. 显示非销售人员工作名称以及从事同一工作雇员的月工资的总和,并且要满足从事同一工作的雇员的月工资合计大于 5000, 输出结果按月工资的合计升序排序.
select job, sum(sal) su from emp where job <> 'SALESMAN' group by job having sum(sal) > 5000 order by su;

select temp.job, sum(temp.sal) s
from (select job, sal from emp e where job <> 'SALESMAN') temp
group by temp.job
having sum(temp.sal) > 5000
order by s;

85. 求出平均工资最高的部门工资
select max(avg(sal)) from emp group by deptno;

86. 要求查询出比雇员编号为 7654 工资高的所有雇员信息
select * from emp where sal >(select sal from emp where empno = 7654);

87. 要求查询出工资比 7654 高, 同时与 7788 从事相同工作的全部雇员信息
select * from emp 
where sal >(select sal from emp where empno = 7654)
and job = (select job from emp where empno = 7788);

88. 要求查询出工资最低的雇员姓名, 工作, 工资
select ename, job, sal from emp where sal = (select min(sal) from emp);

89. 要求查询出: 部门名称,部门的员工数,部门的平均工资,部门的最低收入雇员的姓名
select d.dname, temp.c, temp.a, e.ename 
from dept d, 
(select deptno, count(empno) c, avg(sal) a, min(sal) m from emp group by deptno) temp, 
emp e
where d.deptno = temp.deptno and e.sal = temp.m;

select d.deptno, temp.dname, temp.c, temp.a, e.ename, e.sal
from 
(select d.dname , count(e.empno) c, avg(e.sal) a, min(e.sal) m
from emp e, dept d
where e.deptno = d.deptno
group by d.dname) temp, 
emp e,
dept d
where temp.m = e.sal
and temp.dname = d.dname;

90. 求出每个部门的最低工资的雇员的信息
select * from emp where sal in(select min(sal) from emp group by deptno);
select * from emp where sal =any(select min(sal) from emp group by deptno);
select * from 
(select min(sal) m from emp group by deptno) temp,
emp e
where e.sal = temp.m;

91. 范例 90 中, 比子查询条件中最低(小)的工资要大的雇员信息
select * from emp where sal >any(select min(sal) from emp group by deptno);
select * from emp where sal > (select min(min(sal)) from emp group by deptno);

92. 范例 90 中, 比子查询条件中最高(大)的工资要小的雇员信息
select * from emp where sal <any(select min(sal) from emp group by deptno);
select * from emp where sal < (select max(min(sal)) from emp group by deptno);

93. 范例 90 中, 比子查询条件中最高(大)的工资要大的雇员信息
select * from emp where sal >all(select min(sal) from emp group by deptno);
select * from emp where sal > (select max(min(sal)) from emp group by deptno);

94. 范例 90 中, 比子查询条件中最低(小)的工资要小的雇员信息
select * from emp where sal <all(select min(sal) from emp group by deptno);
select * from emp where sal < (select min(min(sal)) from emp group by deptno);

95. 查找出 20 部门中没有奖金的雇员信息
select * from emp where (sal, nvl(comm, -1)) in (select sal, nvl(comm, -1) from emp where deptno = 20);
select * from emp where deptno = 20 and comm is null;

96. union 操作符返回两个查询选定的所有不重复的行
select deptno from emp union select deptno from dept;

97. union all 操作符合并两个查询选定的所有行,包括重复的行
select deptno from emp union all select deptno from dept;

98. intersect 操作符只返回两个查询都有的行
select deptno from emp intersect select deptno from dept;

99. minus 操作符只返回由第一个查询选定但是没有被第二个查询选定的行, 也就是在第一个查询结果中排除在第二个查询结果中出现的行
select deptno from dept minus select deptno from emp;

a01
第1章 JavaScript概述

学习要点:
1.什么是JavaScript
2.JavaScript特点
3.JavaScript历史
4.JavaScript核心
5.开发工具集



JavaScript诞生于1995年。它当时的目的是为了验证表单输入的验证。因为在JavaScript问世之前,表单的验证都是通过服务器端验证的。而当时都是电话拨号上网的年代,服务器验证数据是一件非常痛苦的事情。
经过许多年的发展,JavaScript从一个简单的输入验证成为一门强大的编程语言。所以,学会使用它是非常简单的,而真正掌握它则需要很漫长的时间。那么本套视频就带领大家进入JavaScript课堂,去学习和理解它。

一.什么是JavaScript

JavaScript是一种具有面向对象能力的、解释型的程序设计语言。更具体一点,它是基于对象和事件驱动并具有相对安全性的客户端脚本语言。因为他不需要在一个语言环境下运行,而只需要支持它的浏览器即可。它的主要目的是,验证发往服务器端的数据、增加Web互动、加强用户体验度等。

二.JavaScript特点

松散性
JavaScript语言核心与C、C++、Java相似,比如条件判断、循环、运算符等。但,它却是一种松散类型的语言,也就是说,它的变量不必具有一个明确的类型。

对象属性
JavaScript中的对象把属性名映射为任意的属性值。它的这种方式很像哈希表或关联数组,而不像C中的结构体或者C++、Java中的对象。

继承机制
JavaScript中的面向对象继承机制是基于原型的,这和另外一种不太为人所知的Self语言很像,而和C++以及Java中的继承大不相同。

三.JavaScript历史


引子
大概在1992年,有一家公司Nombas开发一种叫做C--(C-minus-minus,简称Cmm)的嵌入式脚本语言。后应觉得名字比较晦气,最终改名为ScripEase。而这种可以嵌入网页中的脚本的理念将成为因特网的一块重要基石。

诞生
1995年,当时工作在Netscape(网景)公司的布兰登(Brendan Eich)为解决类似于“向服务器提交数据之前验证”的问题。在Netscape Navigator 2.0与Sun公司联手开发一个称之为LiveScript的脚本语言。为了营销便利,之后更名为JavaScript(目的是在Java这课大树下好乘凉)。

邪恶的后来者
因为JavaScript 1.0如此成功,所以微软也决定进军浏览器,发布了IE 3.0 并搭载了一个JavaScript的克隆版,叫做JScript(这样命名是为了避免与Netscape潜在的许可纠纷),并且也提供了自己的VBScript。

标准的重要
在微软进入后,有3种不同的JavaScript版本同时存在:Netscape Navigator 3.0中的JavaScript、IE中的JScript以及CEnvi中的ScriptEase。与C和其他编程语言不同的是,JavaScript并没有一个标准来统一其语法或特性,而这3种不同的版本恰恰突出了这个问题。随着业界担心的增加,这个语言标准化显然已经势在必行。

ECMA
1997年,JavaScript 1.1作为一个草案提交给欧洲计算机制造商协会(ECMA)。第39技术委员会(TC39)被委派来“标准化一个通用、跨平台、中立于厂商的脚本语言的语法和语义”(http://www.ecma-international.org/memento/TC39.htm)。由来自Netscape、Sun、微软、Borland和其他一些对脚本编程感兴趣的公司的程序员组成的TC39锤炼出了ECMA-262,该标准定义了叫做ECMAScript的全新脚本语言。

灵敏的微软、迟钝的网景
虽然网景开发了JavaScript并首先提交给ECMA标准化,但因计划改写整个浏览器引擎的缘故,网景晚了整整一年才推出“完全遵循ECMA规范”的JavaScript1.3。而微软早在一年前就推出了“完全遵循ECMA规范”的IE4.0。这导致一个直接恶果:JScript成为JavaScript语言的事实标准。

标准的发展
在接下来的几年里,国际标准化组织及国际电工委员会(ISO/IEC)也采纳ECMAScript作为标准(ISO/IEC-16262)。从此,Web浏览器就开始努力(虽然有着不同程度的成功和失败)将ECMAScript作为JavaScript实现的基础。

山寨打败原创
JScript成为JavaScript语言的事实标准,加上Windows绑定着IE浏览器,几乎占据全部市场份额,因此,1999年之后,所有的网页都是基于JScript来开发的。而JavaScript1.x变成可怜的兼容者。

网景的没落与火狐的崛起
网景在微软强大的攻势下,1998年全面溃败。但,星星之火可以燎原。同年成立Mozilla项目中Firefox(火狐浏览器)在支持JavaScript方面无可比拟,在后来的时间里一步步蚕食IE的市场,成为全球第二大浏览器。

谷歌的野心
Google Chrome,又称Google浏览器,是一个由Google(谷歌)公司开发的开放原始码网页浏览器。他以简洁的页面,极速的浏览,一举成为全球第三大浏览器。随着移动互联网的普及,嵌有Android系统的平板电脑和智能手机,在浏览器这块将大有作为。

苹果的战略
Safari浏览器是苹果公司各种产品的默认浏览器,在苹果的一体机(iMac)、笔记本(Mac)、MP4(ipod)、iphone(智能手机)、ipad(平板电脑),并且在windows和Linux平台都有相应版本。目前市场份额全球第四,但随着苹果的产品不断的深入人心,具有称霸之势。

幸存者
Opera的全球市场份额第五,2%左右。它的背后没有财力雄厚的大公司,但它从“浏览器大战”存活下来的,有着非常大的潜力。

四.JavaScript核心

虽然JavaScript和ECMAScript通常被人们用来表达相同的含义,但JavaScript的含义却比ECMA-262中规定的要多得多。一个完整的JavaScript应该由下列三个不同的部分组成。
1.核心(ECMAScript)
2.文档对象模型(DOM)
3.浏览器对象模型(BOM)

ECMAScript介绍
由ECMAScript-262定义的ECMAScript与Web浏览器没有依赖关系。ECMAScript定义的只是这门语言的基础,而在此基础之上可以构建更完善的脚本语言。我们常见的Web浏览器只是ECMAScript实现可能的宿主环境之一。
既然他不依赖于Web浏览器,那么他还在哪些环境中寄宿呢?比如:ActionScript、ScriptEase等。而他的组成部分有:语法、类型、语句、关键字、保留字、操作符、对象等。

ECMAScript版本
ECMAScript目前有四个版本,1、2、3、4、5版本,这里不再进行详细探讨。有兴趣的同学,可以搜索查阅。

Web浏览器对ECMAScript的支持
到了2008年,五大主流浏览器(IE、Firefox、Safari、Chrome、Opera)全部做到了与ECMA-262兼容。其中,只有Firefox力求做到与该标准的第4版兼容。以下是支持表。


浏 览 器	ECMAScript兼容性
Netscape Navigator 2	----
Netscape Navigator 3	----
Netscape Navigator 4 -- 4.05	----
Netscape Navigator 4.06 -- 4.79	第1版
Netscape 6+ (Mozilla 0.6.0+)	第3版
Internet Explorer 3 	----
Internet Explorer 4 	----
Internet Explorer 5 	第1版
Internet Explorer 5.5 -- 7	第3版
Internet Explorer 8	第3.1版(不完全兼容)
Internet Explorer 9	第5版
Opera 6 - 7.1	第2版
Opera 7.2+	第3版
Opera 11+	第5版
Safari 3+ 	第3版
Firefox 1--2	第3版
Firefox 3/4/5/6/7/8/9	第3/5版

文档对象模型(DOM)
文档对象模型(DOM,Document Object Model)是针对XML但经过扩展用于HTML的应用程序编程接口(API,Application Programming Interface)。
DOM有三个级别,每个级别都会新增很多内容模块和标准(有兴趣可以搜索查询)。以下是主流浏览器对DOM支持的情况:

浏 览 器	DOM兼容性
Netscape Navigator 1 -- 4.x	----
Netscape Navigator 6+(Mozilla 0.6.0+)	1级、2级(几乎全部)、3级(部分)
Internet Explorer 2 -- 4.x	----
Internet Explorer 5	1级(最小限度)
Internet Explorer 5.5 -- 7	1级(几乎全部)
Opera 1 -- 6	----
Opera 7 -- 8.x	1级(几乎全部)、2级(部分)
Opera 9+	1级、2级(几乎全部)、3级(部分)
Safari 1.0x	1级
Safari 2+	1级、2级(部分)
Chrome 0.2+	1级、2级(部分)
Firefox 1+	1级、2级(几乎全部)、3级(部分)



浏览器对象模型(BOM)
访问和操作浏览器窗口的浏览器对象模型(BOM,Browser Object Model)。开发人员使用BOM可以控制浏览器显示页面以外的部分。而BOM真正与众不同的地方(也是经常会导致问题的地方),还是它作为JavaScript实现的一部分,至今仍没有相关的标准。

JavaScript版本
身为Netscape“继承人”的Mozilla公司,是目前唯一沿用最初的JavaScript版本编号的浏览器开发商。在网景把JavaScript转手给Mozilla项目的时候,JavaScript在浏览器中最后的版本号是1.3。后来,随着Mozilla继续开发,JavaScript版本号逐步递增。

浏 览 器	JavaScript版本
Netscape Navigator 2	1.0
Netscape Navigator 3	1.1
Netscape Navigator 4	1.2
Netscape Navigator 4.06 	1.3
Netscape 6+ (Mozilla 0.6.0+)	1.5
Firefox 1	1.5
Firefox 1.5	1.6
Firefox 2	1.7
Firefox 3	1.8
Firefox 3.1+	1.9


五.开发工具集

代码编辑器:Notepad++。(在360软件管家里找到,直接下载安装即可)
浏览器:谷歌浏览器,火狐浏览器,IE浏览器,IETest工具等。

PS:学习JavaScript需要一定的基础,必须有xhtml+css基础、至少一门服务器端编程语言的基础(比如PHP)、一门面向对象技术(比如Java)、至少有一个Web开发的项目基础(例如留言板程序等)。















bbb xx
sss
rrr ListView 分段加载
    package com.yangguangfu.listview;  
      
      
    import android.app.ListActivity;  
    import android.os.Bundle;  
    import android.util.Log;  
    import android.view.Gravity;  
    import android.view.View;  
    import android.view.ViewGroup;  
    import android.widget.AbsListView;  
    import android.widget.BaseAdapter;  
    import android.widget.Button;  
    import android.widget.LinearLayout;  
    import android.widget.ListView;  
    import android.widget.TextView;  
    import android.widget.LinearLayout.LayoutParams;  
    /** 
     *  
     * @author 阿福 
     * 
     */  
    public class ButtonLoadingActivity extends ListActivity    {  
        private static final String TAG = "ButtonLoadingActivity";  
             
        private  listViewAdapter adapter = new listViewAdapter();  
        /** 
         * 设置布局显示为目标有多大就多大 
         */  
        private LayoutParams WClayoutParams =new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,LinearLayout.LayoutParams.WRAP_CONTENT);  
        /** 
         * 设置布局显示目标最大化 
         */  
        private LayoutParams FFlayoutParams =new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,LinearLayout.LayoutParams.FILL_PARENT);  
          
        protected void onCreate(Bundle savedInstanceState) {  
                super.onCreate(savedInstanceState);  
                 Log.i(TAG, "onCreate(Bundle savedInstanceState):" );  
                  LinearLayout layout = new LinearLayout(this);  
                  layout.setOrientation(LinearLayout.HORIZONTAL);  
                   
                  Button button = new Button(this);  
                  button.setText("点击加载下五条...");  
                  button.setGravity(Gravity.CENTER_VERTICAL);  
                     
                  layout.addView(button,FFlayoutParams);  
                  layout.setGravity(Gravity.CENTER);  
                  LinearLayout loadingLayout = new LinearLayout(this);  
                  loadingLayout.addView(layout,WClayoutParams);  
                  loadingLayout.setGravity(Gravity.CENTER);  
                     
                     
                  ListView listView = getListView();  
                     
                  listView.addFooterView(loadingLayout);  
                     
                  button.setOnClickListener(new Button.OnClickListener()     
                  {         @Override        
                     public void onClick(View v)    
                  {           
                      adapter.count += 5;    
                      Log.i(TAG, "setOnClickListener:" +  adapter.count);  
                      adapter.notifyDataSetChanged();  
                      }        
                  });    
                   
              setListAdapter(adapter);    
         }  
      
      
        public void onScrollStateChanged(AbsListView v, int s) {  
             Log.i(TAG, "onScrollStateChanged(AbsListView v, int s)");  
        }       
      
        class listViewAdapter extends BaseAdapter {  
            int count = 10; /* starting amount */  
      
            public int getCount() { return count; }  
            public Object getItem(int pos) { return pos; }  
            public long getItemId(int pos) { return pos; }  
      
            public View getView(int pos, View v, ViewGroup p) {  
                     TextView textView = new TextView(ButtonLoadingActivity.this);  
                     textView.setHeight(80);  
                     textView.setTextSize(20);  
                     textView.setText("阿福播放器 " + pos);  
                     Log.i(TAG, "getView:pos:" + pos);  
                    return textView;  
             }  
         }  
      
      
      
    }  
a1 ListView 分段加载
    package com.yangguangfu.listview;  
      
    import android.app.ListActivity;  
    import android.os.Bundle;  
    import android.util.Log;  
    import android.view.Gravity;  
    import android.view.View;  
    import android.view.ViewGroup;  
    import android.widget.AbsListView;  
    import android.widget.BaseAdapter;  
    import android.widget.LinearLayout;  
    import android.widget.ListView;  
    import android.widget.ProgressBar;  
    import android.widget.TextView;  
    import android.widget.AbsListView.OnScrollListener;  
    import android.widget.LinearLayout.LayoutParams;  
    /** 
     *  
     * @author 阿福 
     * 
     */  
    public class MainActivity extends ListActivity implements OnScrollListener {  
          
        private static final String TAG = "MainActivity";  
        private listViewAdapter adapter = new listViewAdapter();  
        private int lastItem = 0;  
        /** 
         * 设置布局显示为目标有多大就多大 
         */  
        private LayoutParams WClayoutParams =new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,LinearLayout.LayoutParams.WRAP_CONTENT);  
        /** 
         * 设置布局显示目标最大化 
         */  
        private LayoutParams FFlayoutParams =new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,LinearLayout.LayoutParams.FILL_PARENT);  
          
        private ProgressBar progressBar;  
      
        protected void onCreate(Bundle savedInstanceState) {  
            super.onCreate(savedInstanceState);  
      
            Log.i(TAG, "onCreate(Bundle savedInstanceState)" );  
            //线性布局  
            LinearLayout layout = new LinearLayout(this);  
           //设置布局 水平方向  
            layout.setOrientation(LinearLayout.HORIZONTAL);  
             //进度条  
            progressBar = new ProgressBar(this);  
             //进度条显示位置  
            progressBar.setPadding(0, 0, 15, 0);  
              
            layout.addView(progressBar, WClayoutParams);  
              
            TextView textView = new TextView(this);  
            textView.setText("加载中...");  
            textView.setGravity(Gravity.CENTER_VERTICAL);  
              
            layout.addView(textView, FFlayoutParams);  
            layout.setGravity(Gravity.CENTER);  
              
            LinearLayout loadingLayout = new LinearLayout(this);  
            loadingLayout.addView(layout, WClayoutParams);  
            loadingLayout.setGravity(Gravity.CENTER);  
              
            //得到一个ListView用来显示条目  
            ListView listView = getListView();  
            //添加到脚页显示  
            listView.addFooterView(loadingLayout);  
            //  
            registerForContextMenu(listView);  
            //  
            setListAdapter(adapter);  
            listView.setOnScrollListener(this);  
        }  
      
        public void onScroll(AbsListView v, int firstVisibleItem,  
                int visibleItemCount, int totalItemCount) {  
            lastItem = firstVisibleItem + visibleItemCount - 1;  
            System.out.println("lastItem:" + lastItem);  
            Log.i(TAG, "lastItem:" + lastItem);  
              
        }  
      
        public void onScrollStateChanged(AbsListView v, int state) {  
            if (lastItem == adapter.count  
                    && state == OnScrollListener.SCROLL_STATE_IDLE) {  
                adapter.count += 10;  
                adapter.notifyDataSetChanged();  
                Log.i(TAG, "lastItem:" + lastItem);  
            }  
        }  
      /** 
       * 要用用于生成显示数据 
       * @author 阿福 
       * 
       */  
        class listViewAdapter extends BaseAdapter {  
            int count = 10;  
      
            public int getCount() {  
                Log.i(TAG, "count:" + count);  
                return count;  
            }  
      
            public Object getItem(int pos) {  
                Log.i(TAG, "pos:" + pos);  
                return pos;  
            }  
      
            public long getItemId(int pos) {  
                return pos;  
            }  
      
            public View getView(int pos, View v, ViewGroup p) {  
                TextView view = new TextView(MainActivity.this);  
                view.setText("阿福播放器 " + pos);  
                Log.i(TAG, "entry: " + pos);  
                view.setTextSize(20f);  
                view.setHeight(80);  
                return view;  
            }  
        }  
    }  
aaa aa aa
aaaa
通杀 网页源代码加密
通杀 网页源代码加密 
在地址栏或按Ctrl+O,输入: 

javascript:s=document.documentElement.outerHTML;document.write('<---body><--- />');document.body.innerText=s;

源代码就出来了。不论加密如何复杂,最终都要
ccccccccccccccccccccc
Global site tag (gtag.js) - Google Analytics