思路: 假设给定字符串用的是ASCII编码,那么总共就只有256个字符,新建一个256个元素的boolean数组, 遍历字符串,将出现的字符在boolean数组所在位置置 1。如果碰到已经置一,表明出现重复字符,返回false。public class IsUniqueChars_1 { ...
分类:
其他好文 时间:
2015-09-16 17:25:31
阅读次数:
143
select (@@key_buffer_size + @@query_cache_size + @@tmp_table_size + @@innodb_buffer_pool_size + @@innodb_additional_mem_pool_size + @@innodb_log_buffe...
分类:
数据库 时间:
2015-09-16 12:38:34
阅读次数:
167
对于手机、pad来说,不管是横屏,还是竖屏,默认的原点都是在屏幕左上角,然后向下、向右为正方向。看图在下面根据实例- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the...
分类:
移动开发 时间:
2015-09-09 17:11:29
阅读次数:
222
- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. UIWebView *webview = [[UIWebView alloc] initWith...
分类:
Web程序 时间:
2015-09-08 12:29:21
阅读次数:
184
#!/bin/sh # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. ?See the NOTICE file distributed with # this work for additional information regar...
分类:
系统相关 时间:
2015-09-06 18:41:51
阅读次数:
227
- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. // 创建一个图层 CALayer *laye...
分类:
移动开发 时间:
2015-09-06 18:17:49
阅读次数:
156
//移除通知- (void)dealloc { [[NSNotificationCenter defaultCenter]removeObserver:nil];}- (void)viewDidLoad { [super viewDidLoad]; // Do any additional s...
分类:
其他好文 时间:
2015-09-01 16:27:48
阅读次数:
144
装饰模式 Decorator PatternAttach additional responsibilities to an object dynamically keeping the same interface.Decorators provide a flexible alternative to subclassing for extending functionality.动态地给一个对...
分类:
编程语言 时间:
2015-08-27 23:08:21
阅读次数:
186
In this tutorial, we will see how to add new line item to magento order totals. What this means is that, how to add an additional Fee or Discount, or any kind of charge to order total of the magent...
分类:
其他好文 时间:
2015-08-27 11:30:02
阅读次数:
287
- (void)viewDidLoad {
[super
viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
UIColor *color = [self
colorWithHexString:@"#81c52b"];
...
分类:
移动开发 时间:
2015-08-26 13:58:48
阅读次数:
165