原文:Swift中文教程(六)--枚举和结构Enumerations枚举使用enum来创建一个枚举。跟Classes(类)和其他类型的命名方式一样,枚举也可以有Method(方法)。
1 enum Rank: Int { 2 case Ace = 1 3 case Two, Three, Four,...
分类:
其他好文 时间:
2014-06-11 23:21:03
阅读次数:
395
Therefore, it is seriously a great tool around
when your dad is in a round of golf. Your dad will appreciate the golf tool and
be glad to get it in pl...
分类:
其他好文 时间:
2014-06-11 23:03:13
阅读次数:
276
转自:http://www.linuxsa.cn/when-linux-file-name-topsy-turvy-deleted-or-renamed.htmllinux文件名乱码时删除或改名的方式当......一堆......文件出现乱码时,你想用脚本把他们改名,结果又发现字符处理工具awk等都...
分类:
系统相关 时间:
2014-06-11 12:13:39
阅读次数:
311
JAVA中引用com.sun.awt.AWTUtilities时报错的解决办法[转]在Eclipse中设置如下就可以了:When
using com.sun.awt.AWTUtilities, Eclipse gives a error:- Access restriction: The
metho...
分类:
编程语言 时间:
2014-06-11 10:50:44
阅读次数:
444
Liskov Substitution Princple, LSPFor every
object "o1" from type "t1", there is object "o2" from type "t2", when all "o2"
is replaced with "o1" in pro...
分类:
其他好文 时间:
2014-06-11 08:52:44
阅读次数:
221
题目:http://poj.org/problem?id=1328注意 输出 Case
:这里是有个空格的。。和之前序列想法差不多 尽可能 向一边贪心。#include #include #include #include #include
#include #include #include #i...
分类:
其他好文 时间:
2014-06-11 08:00:13
阅读次数:
252
在前几个章节中使用了Comparable作为比较函数。比如对于字符串,就是按字母表的顺序进行排序。有时候想要换一种比较方式,该怎么实现呢?
在Java中可以使用Comparator比较器,以下代码展示了字符串之间不同的比较方式。
String[] a;
...
Arrays.sort();
...
Arrays.sort(a, String.CASE_INSENSITI...
分类:
其他好文 时间:
2014-06-08 15:37:08
阅读次数:
201
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
// Respond to the action bar's Up/Home button
case android.R.id.home:
//这里写重写的方法 一定要retrun ...
分类:
其他好文 时间:
2014-06-08 10:39:02
阅读次数:
278
题目
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.
For example,
Given:
s1 = "aabcc",
s2 = "dbbca",
When s3 = "aadbbcbcac", return true.
When s3 = "aadb...
分类:
其他好文 时间:
2014-06-08 09:14:26
阅读次数:
215
直接进入主题!1. 三元表达式: 由3个数据参与的表达式.二元表达式: 算术表达式一元表达式:
自增自减.2. 三元表达式的语法:bool表达式?值1:值2;int i = 10; i > 0 ? 100 : 200;3.
三元表达式的结果.如果bool表达式的结果为true 那么这个三元表达式的结...
分类:
其他好文 时间:
2014-06-07 17:00:37
阅读次数:
212