Functional ObjectAdvantages and Disadvantages of Immutable ObjectAdv 1. 不可变对象更具容易被推断出来,因为它不会随着时间的变化而造成值的变化。Adv 2. 不可变对象可以自动地传递不会发生变化,而传递可变对象的话,需要首先对可变...
分类:
其他好文 时间:
2014-06-27 13:55:22
阅读次数:
187
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.
If the last word does not exist, return 0.
Note: A word is d...
分类:
其他好文 时间:
2014-06-27 10:18:32
阅读次数:
151
又被抽去做了一段时间的Fitnesse用例的编写,现在case写了几个星期,有点收获,最近会一起整理出来。SetUp这个页面主要被我用来做环境变量的设置了。环境变量的设置:!note这一部分用来在写测试步骤里包含,来定义用户场景。!note比如!note1,用户一($USERNAME_A)注册帐户,密码..
分类:
其他好文 时间:
2014-06-27 06:00:15
阅读次数:
163
Class and Objectclass TestClass { val some = 1}生成的class文件中会包含一个some()方法,并且这个方法是public的,也就是说类外可以通过类的对象来获取这个some的值修改:class TestClass { private val som.....
分类:
其他好文 时间:
2014-06-26 22:31:24
阅读次数:
270
Basic Types and OperationsSomething new according to Java1 + 2跟(1).+(2)是一样的。val str = "Hello world"str indexOf 'o' 跟 str.indexOf('o')是一样的indexOf有两种形式的...
分类:
其他好文 时间:
2014-06-26 19:26:48
阅读次数:
193
Everything You Wanted to Know About Machine Learning
翻译了理解机器学习的10个重要的观点,加入了自己的理解,这些原则在大部分情况下也许是这样,但是具体问题具体分析才是王道,不加思索的应用只能是一知半解。所以张小龙才说‘我说的都是错的’。 note by 王犇
1. How Does Machine Learning Work...
分类:
其他好文 时间:
2014-06-26 14:15:48
阅读次数:
240
Given a string s consists of upper/lower-case alphabets and empty space characters
' ',
return the length of last word in the string.
If the last word does not exist, return 0.
Note...
分类:
其他好文 时间:
2014-06-26 13:55:01
阅读次数:
179
Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.Analysis: 这个题简单的版本是判断两个单词是不是anagram,一...
分类:
其他好文 时间:
2014-06-26 12:47:48
阅读次数:
144
# Sample ``local.conf`` for user-configurable variables in ``stack.sh``
# NOTE: Copy this file to the root ``devstack`` directory for it to
# work properly.
# ``local.conf`` is a user-maintained set...
分类:
其他好文 时间:
2014-06-26 11:41:09
阅读次数:
272
【题目】
Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
【题意】
给定一个整数数组,其中除了一个数以外,其他数都是成对出现的,...
分类:
其他好文 时间:
2014-06-26 10:13:27
阅读次数:
254