IE 时代终落幕

Chrome-surpass-IE
image-1318

根据 Statcounter 提供的监控数据,Google Chrome 过去一周全球使用量超过 IE,正式成为市场占有率最高的浏览器。这也是过去十三年来 IE 第一次整周平均使用量被其它浏览器所超越,在此之前 Chrome 周末所占份额有时已经超过 IE。

1998 年第四季度,IE 4.0 浏览器在微软的积极研发以及 PC 市场垄断地位的推动下挑翻网景成为市场占有率最高的浏览器。可惜微软之后并未积极推动浏览器技术进步,2001 年推出 IE 6 之后的五年里未曾提供一次升级,成为 Web 开发者的噩梦。

相 对主要竞争对手来说,Chrome 来得很迟。2008 年推出第一版。但就像 1998 年微软主宰桌面操作系统一样,Google 同样主宰着一个平台——搜索引擎,或者说互联网的入口。此外,“快”也是 Google Chrome 一直以来最显眼的特征。从实际速度体验到版本号升级速度都走在竞争对手前面——Chrome 19 本月已经发布

从营销的角度来看,快是最好的宣传点。科技新闻读者很早就开始抛弃 IE,就拿爱范儿来说,Chrome 早已成为第一大浏览器访问来源,两倍于 IE。IE 用户中还有很多是由于公司 IT 政策不得不用。但相对科技用户关心的种种技术细节,快更能吸引普通用户,Google Chomre 的宣传恰好就抓住了“快”

现 在全球三分之一的用户已经转向 Chrome,IE 时代已经落幕。不过浏览器的门槛没有打造搜索引擎或打败 Facebook 那么高,Windows 8 所搭载的 IE 10 已经是真正现代的浏览器,体验远远好过 IE 9,专注于平板市场的 Windows RT(ARM 架构 Windows 8)也将会把第三方浏览器挡在外面。

不过微软真正的挑战很可能还是用户对 IE 的固有印象。记得前年 Bing 搜索引擎研发人员在一篇博文里感慨说,把两组相同的搜索结果给用户看,一组打上 Bing 标识、另一组打上 Google 标识,用户都会觉得 Google 标识的那组更好。或许给 IE 10 换个名字,重新包装后推出会是不错的选择,就像 Windows 8 用微软账号代替 Windows Live 一样。

来自:http://www.ifanr.com/90293

Java:房贷月供计算器

定义类:
[将两个类,放在一个包中.]

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
package cn.puruidong.accp_13;
/*
 * 模拟一个简单的购房商贷
 * 书本第290页
 */
import java.util.Scanner;
public class Mortgage {
    private double allmoney;//总利息
    private double total ;//贷款金额
    private double moonmoney ; //每月还款金额
    private int year ; //贷款年限
   
    public void show (double allmoney,double total,double interestrates,double moonmoney,int year){
        this.allmoney=allmoney;//总利息
        this.total=total;//贷款金额
        this.moonmoney=moonmoney;//每月还款金额
        this.year=year;//贷款年限
    }
   
    public void newshow (){
        Scanner input = new Scanner (System.in);
        System.out.println("请输入贷款金额:");
        total = input.nextInt();//录入
        System.out.println("请选择贷款年限:");
        System.out.println("1,3年(36个月)\t2,5年(60个月)\t3,20年(240个月):");
        year = input.nextInt();//录入
        switch (year){ //使用switch来处理年限数据
        case 1 :
            allmoney = total * 0.0603;//计算总利息
            moonmoney = (total+allmoney)/36; //计算每月还款金额
            System.out.println();
            System.out.println("月供为:"+moonmoney);
            break;
        case 2 :
            allmoney = total * 0.0612;
            moonmoney = (total+allmoney)/60;
            System.out.println();
            System.out.println("月供为:"+moonmoney);
            break;
        case 3 :
            allmoney = total * 0.0639;
            moonmoney = (total+allmoney)/240;
            System.out.println();
            System.out.println("月供为:"+moonmoney);
            break;
            default :
                System.out.println("数字输入错误,请重新输入!");
        }
    }

}

测试类:

1
2
3
4
5
6
7
8
9
10
11
12
package cn.puruidong.accp_13;
/*
 * 房贷的测试,输出
 * 书本第290页,3页
 */
public class TestMortgage {
    public static void main(String[] args) {
            // TODO Auto-generated method stub
            Mortgage center = new Mortgage ();
            center.newshow();
        }
}

Java:人机猜拳

用户类:

1
2
3
4
5
6
7
8
9
10
11
12
13
package cn.puruidong.accp_12;
/*
 * 用户类,包含输入的用户姓名
 */
import java.util.*;
public class yonghu {
    private String name ;
    Scanner input = new Scanner (System.in);
    public void show(){
        System.out.println("请输入姓名:");
        name = input.next();
    }
}

计算机类:

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
package cn.puruidong.accp_12;
/*
 * 计算机类
 * 包含角色选择,及输出
 */
import java.util.Scanner;
public class jisuanji {
     int jisuanjiname ;
    public void showEr (){
        Scanner input = new Scanner (System.in);
        System.out.println("请选择计算机的角色:1.刘邦;2.项羽;3.曹操");
        jisuanjiname = input.nextInt();
        switch (jisuanjiname){
        case 1 :
            System.out.println("您选择与:\t刘邦对战");
            break;
        case 2 :
            System.out.println("您选择与:\t项羽对战");
            break;
        case 3:
            System.out.println("您选择与:\t曹操对战");
            break;
            default :
                System.out.println("抱歉,火星查无此人!");
            break;
        }
    }
   

}

游戏类,三个类放在一个文件夹中,运行Game.java:

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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
 * 人机对战之游戏类
 * 其中包含:用户类调用+计算机类调用
 * 自包含:人出拳+计算机出拳
 * 来自:第十二章
 */
package cn.puruidong.accp_12;
import java.util.Scanner;
public class Game {
     int random ;
     int chuquan;
     Scanner input = new Scanner (System.in);
     public int suiji (){ //计算机随机出拳
            random = (int)(Math.random()*10%3+1);
            switch (random){
            case 1:
                System.out.println("计算机出了:剪刀");
                break;
            case 2:
                System.out.println("计算机出了:石头");
                break;
            case 3:
                System.out.println("计算机出了:布");
                break;
            }
            return random;
        }
     public int chuquan (){ //人出拳
           
            chuquan = input.nextInt();
            switch (chuquan){
            case 1:
                System.out.println("您出了:剪刀");
                break;
            case 2 :
                System.out.println("您出了:石头");
                break;
            case 3 :
                System.out.println("您出了:布");
                break;
                default :
                    System.out.println("抱歉,输入错误!");
                break;
            }
           
            return chuquan ;
        }

public static void main (String[]args){
    System.out.println("*******************************");
    System.out.println("********猜拳\t开始*********");
    System.out.println("*******************************");
     Scanner input = new Scanner (System.in);
    jisuanji center = new jisuanji ();
    yonghu ren = new yonghu ();
    Game spr = new Game ();
    System.out.println("出拳规则:1.剪刀;2.石头;3,布");
    String choose;
    ren.show();
    center.showEr();
    int num1  = 0 ; //记录总局数
    int num2  = 0 ;//记录人胜利的局数
    int num3 = 0;//记录计算机胜利的局数
    do{
    System.out.println("出拳规则:1.剪刀;2.石头;3,布(请出拳):");
    spr.chuquan();
    spr.suiji();
    int panduan1 = spr.random;//定义将变量spr.random赋给常量panduan1,否则在if判断时,将重复调用random
    int panduan2 = spr.chuquan;//同上
     if ((panduan1==1&&panduan2==3)||(panduan1==2&&panduan2==1)||( panduan1==3&&panduan2==2)){
        System.out.println("恭喜,你赢了");
        num2++;
    }
    else if ((panduan1==1&&panduan2==1)||(panduan1==2&&panduan2==2)||(panduan1==3&&panduan2==3)){
        System.out.println("这是平局");
    }
      else {
        System.out.println("o(>﹏<)o你输了真笨");
        num3++;
    }
    num1++;
    System.out.println("请问是否进入下一轮(y/n):");
    choose = input.next();
      }while (!"n".equals(choose));//输入为n时,结束循环,输出结果
    System.out.println("总局数:"+num1);
    System.out.println("人胜利的局数:"+num2);
    System.out.println("计算机胜利的局数:"+num3);
    System.out.println("平局是:"+(num1-(num2+num3)));
    }
}