public synchronized StringBuffer append(String str) { super.append(str); return this; } // 同步方法public AbstractStringBuilder append(String str) { if (s...
分类:
移动开发 时间:
2014-09-21 09:08:40
阅读次数:
225
loadView
1.什么时候被调用?
每次访问UIViewController的view(比如controller.view、self.view)而且view为nil,loadView方法就会被调用。
2.有什么作用?
loadView方法是用来负责创建UIViewController的view
3.默认实现是怎样的?
默认实现即[super loadView...
分类:
其他好文 时间:
2014-09-20 15:21:59
阅读次数:
150
.h文件:#import @interface YLYTabBar : UIView@end.m文件#import "YLYTabBar.h"@implementation YLYTabBar- (id)initWithFrame:(CGRect)frame{ self = [super in...
分类:
移动开发 时间:
2014-09-20 14:56:58
阅读次数:
230
利用KVC方法快速为数据对象赋值,如下例
在.h文件中声明如下形式方法:
- (id)initWithDic:(NSDictionary *)dic;
在对应.m文件中
- (id)initWithDic:(NSDictionary *)dic
{
self = [super
init];
if (self)
...
分类:
其他好文 时间:
2014-09-20 10:05:07
阅读次数:
125
MySQL基准测试工具mysqlslap、sysbench、Super Smackmysqlslap的使用MySQL官网给出了介绍Super Smack是服务器压力测试强有力的工具sysbench是MySQL基准测试工具了sysbench安装直接yum安装测试环境mysql> SELECT VERS...
分类:
数据库 时间:
2014-09-20 10:00:37
阅读次数:
336
今天同事跟我说,他之前在mysql上建的视图没办法更改,更改的时候报如下错误:SQLError1227:Accessdenied;youneedtheSUPERprivilegeforthisoperation起初,我以为是权限的问题,查了半天,权限明明是有的,新增了如下两条授权条件,还是不行:grant操作MySQL视图、查看视图源代..
分类:
数据库 时间:
2014-09-19 19:33:26
阅读次数:
295
通过SpannableStringBuilder来实现改变指定文字style,它就像html里边的元素改变指定文字的文字颜色或背景色
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceSt...
分类:
移动开发 时间:
2014-09-19 19:24:56
阅读次数:
298
@Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); Paint mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); ...
分类:
其他好文 时间:
2014-09-19 17:36:15
阅读次数:
315
#第一组 - (void)setDataDict:(NSDictionary *)dataDict;
这个方法优先执行
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style re...
分类:
移动开发 时间:
2014-09-18 20:46:44
阅读次数:
179
public class MyListView extends ListView {public MyListView(Context context) { super(context);}public MyListView(Context context, AttributeSet attrs) ...
分类:
其他好文 时间:
2014-09-18 13:03:43
阅读次数:
200