Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe...
分类:
其他好文 时间:
2014-07-07 15:30:23
阅读次数:
169
面相对象的一个核心基础就是多态,当你要根据对象类型的不同要做不同的操作的时候,一个好的办法就是采用多态,把算法封装到子类当中去。重构前代码: 1 public abstract class Customer 2 { 3 } 4 5 public class Employee : Custome...
分类:
其他好文 时间:
2014-07-01 22:42:49
阅读次数:
545
我觉得这个lab最主要就是理解好Virtual memory是怎么map到physical memory的。在CSAPP里面了,通过MMU和TLB电路来实现转换。x86中是用的2级page table。 还要理解stack frame(譬如lab1的project 4.1.1):switch_to_...
分类:
其他好文 时间:
2014-07-01 21:44:49
阅读次数:
539
Given an array of strings, return all groups of strings that are anagrams.
Note: All inputs will be in lower-case.
回文字符串是指: 两个字符串的字符个数完全相同,这两个字符串是Anagrams。因此Anagrams至少指俩字符串。找出字符集合中的Anagrams组。...
分类:
其他好文 时间:
2014-07-01 08:42:11
阅读次数:
250
import Foundation
println("Hello, World!")
var string1 = "Hello BeiJing" //定义一个变量(字符串)
//var string1: String = "Hello, BeiJing" //系统会自动进行类型推断为此表达式
println("string1 = \(string1)")
let string2 = "Hel...
分类:
其他好文 时间:
2014-07-01 06:14:53
阅读次数:
191
[java代码库]-简易计算器(第二种) 第二种方案:在程序中不使用if/switch……case等语句,完成计算器功能。 简易计算器 简易计算器
分类:
编程语言 时间:
2014-06-30 22:49:47
阅读次数:
314
- (void)CallOtherPartWithTelNumber:(NSString *)telNumber andType:(NSInteger)type{ switch (type) { case 1: // 可以返...
分类:
其他好文 时间:
2014-06-30 22:09:43
阅读次数:
257
1、Swift,用来判断option是不是nil,相当于OC的 if(option)
if let name = option{
greeting = “if=====“
}else{
greeting = "else==="
}
2、运行switch中匹配到的子句之后,程序会退出switch语句,并不会继续向下运行,所以不需要在每个子句结尾写break。
3、//使用..创建的范围...
分类:
其他好文 时间:
2014-06-30 20:17:41
阅读次数:
225
Creating a Physical Standby Database
This case is created, operated and followed the steps from oracle online help documentation.
The configuration of the two sites server:
Primary Database:
[roo...
分类:
数据库 时间:
2014-06-30 19:37:39
阅读次数:
313
题目
Given an absolute path for a file (Unix-style), simplify it.
For example,
path = "/home/", => "/home"
path = "/a/./b/../../c/", => "/c"
Corner Cases:
Did you consider the case w...
分类:
其他好文 时间:
2014-06-29 23:19:26
阅读次数:
223