枚举scala不用关注枚举的特别语法,取而代之的是标准库中的类,scala.Enumeration想要创建新的枚举,只需呀拓展这个类的对象即可object Color extends Enumeration{ val Red = Value val Green = Value val Blue...
分类:
其他好文 时间:
2014-12-29 10:25:00
阅读次数:
131
Reverse Words in a StringGiven an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".click...
分类:
其他好文 时间:
2014-12-27 21:41:37
阅读次数:
143
对于想尽快上手的新人来说,这部分内容是又累又没劲,可是又不得不做,没办法……硬着头皮上吧。1、编写grammer,生成wordnet(1)手动编辑grammer文件,并置于config目录下,内容如下:$color = RED | BLUE | YELLOW;(SENT-START ($color)...
分类:
其他好文 时间:
2014-12-27 15:12:13
阅读次数:
269
题目:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".代码:oj在线测试通过Runtime:172 ms 1...
分类:
编程语言 时间:
2014-12-27 01:26:47
阅读次数:
232
有时会看到别人使用bitmap是用到ARGB_8888/RGB_565这类参数,那么这些参数是什么?对bitmap有什么影响?
他们是Bitmap.Config的四种枚举类型。
(ARGB分别是alpha透明度和red、green、blue三色)
ARGB_8888:分别用8位来记录4个值,所以每个像素会占用32位。
ARGB_4444:分别用4位来记录4个值,所以每个像素...
分类:
其他好文 时间:
2014-12-26 16:40:27
阅读次数:
183
开发中使用的颜色可以分为两种,自定义颜色和系统颜色1.自定义颜色:颜色值的定义是通过RGB三原色和一个alpha值来定义的(加色原理)。以井号(#)开始,后面是Alpha-Red-Green-Blue的格式。形如:#RGB#ARGB#RRGGBB#AARRGGBB通常使用#RRGGBB 或者#AAR...
分类:
移动开发 时间:
2014-12-26 12:33:00
阅读次数:
190
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
click to show clarification.
Clarification:
What constitutes...
分类:
其他好文 时间:
2014-12-26 11:14:16
阅读次数:
146
题目:
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
click to show clarification.
Clarification:
What co...
分类:
其他好文 时间:
2014-12-25 22:06:30
阅读次数:
276
在一个7x7的表格当中nth-child(1); td.parents("table").find("tr :nth-child(1)").css("background-color", "blue");得到eq(1);td.parents("table").find("tr :eq(1)").cs...
分类:
Web程序 时间:
2014-12-25 17:40:33
阅读次数:
168
伪元素
a:link{
color: green ;
font-size: 1cm ;
}
a:hover{
color: red ;
font-size: 2cm ;
}
a:active{
color: blue ;
font-size: 2cm ;
}
a:visited{
color:...
分类:
Web程序 时间:
2014-12-24 16:24:28
阅读次数:
1012