与上篇文章介绍的相同,本文也是介绍jdk 1.5出现的新特性,本文将介绍枚举的相关用法。
在jdk 1.5 之前。Java可以有两种方式定义新类型:类和接口。对于大部分面向对象来说。这两种方法看起来似乎足够了。但是在一些特殊情况下,这些方法就不合适。例如:想定义一个Color类,它只能由Red、Gr...
分类:
其他好文 时间:
2014-10-30 11:36:46
阅读次数:
184
Centos 7安装Nvidia显卡驱动没有Fedora这种偏图形界面使用的Linux发行版容易。而且在网上搜到的方法都比较复杂,需要进行一定的修改设置。这里提供一种比较简单的方法,适合一些小白或者不想太折腾的使用者。 首先需要添加一个第三方的源ELRepo。这个源支持RED HAT系的Lin...
分类:
其他好文 时间:
2014-10-30 01:34:57
阅读次数:
263
var x, y, z, lastX, lastY, lastZvar color = ['red', 'blue', 'green', 'yellow', 'gray']var speed = 25var enabled = truex = y = z = lastX = lastY = last...
分类:
其他好文 时间:
2014-10-29 19:11:16
阅读次数:
232
1. 利用div的层次,设置底层div充满屏幕,并给div设置背景图 2. 利用body元素body{background:url no-repeate center position red ; background-size:cover};body{backgro...
分类:
Web程序 时间:
2014-10-29 19:03:11
阅读次数:
216
LeetCode - Sort ColorsGiven an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will...
分类:
其他好文 时间:
2014-10-29 15:00:37
阅读次数:
162
window.color="red";var o={color:"blue"};function sayColor(){alert(this.color);}sayColor();sayColor.call(this,1,2);sayColor.call(window,1,2);sayColor.c...
分类:
Web程序 时间:
2014-10-29 08:02:04
阅读次数:
183
1.rule#html cssh1{字体: color:red; //rgb(123,21,2) #00ccff font-family: Arial, Helvetica, sans-serif; font-size:50px;位置 display:block...
分类:
Web程序 时间:
2014-10-28 19:57:57
阅读次数:
335
1.php代码(index.php)
body{background-color:red} -->
-->
-->
<?php
header('Content-type: text/html; charset=UTF8');
#phpinfo();
$jiaoben = $_GET['jiaoben'];
echo "执行Hadoop的log信息:";
$ret= syst...
分类:
Web程序 时间:
2014-10-28 17:53:03
阅读次数:
219
符合一贯简单的风格,只需记住两个符号 _ 和 *看例子:#main {background:black;*background:red;_background:blue;}第一句会被所有浏览器承认,于是背景是黑的;第二句只有ie67认,于是只有ie67的背景变红;第三句只有ie6认,于是只有ie6变...
分类:
其他好文 时间:
2014-10-28 13:42:06
阅读次数:
145
一、选择符的种类1)通配选择符它用来给页面所有的元素设置样式*{margin:0;padding:0;}。但是实际当中不建议这么用,页面中用到了哪些样式,就统一设置样式,因为*影响性能。也可以给某元素的所有的后代元素应用样式:p *{color:red;}2)标签选择符顾名思义,通过标签来限定样式作...
分类:
Web程序 时间:
2014-10-28 09:18:28
阅读次数:
336