2012年9月20日

String , StringBuffer 和 StringBuilder 区别

摘要: 转载:http://www.blogjava.net/chenpengyi/archive/2006/05/04/44492.html相信大家对String和StringBuffer的区别也已经很了解了,但是估计还是会有很多同志对这两个类的工作原理有些不清楚的地方,今天我在这里重新把这个概念给大家复习一下,顺便牵出J2SE 5.0里面带来的一个新的字符操作的类——StringBuilder(先别忙着扔我砖头,我还算清醒,我这里说的不是C#,Java也有StringBuilder类)。那么这个StringBuilder和StringBuffer以及我们最早遇见的String类有那些区别呢?在不同 阅读全文

posted @ 2012-09-20 07:10 南瓜饼 阅读(251) 评论(0) 推荐(1) 编辑

2012年9月19日

ios给控件添加动画效果

摘要: 首先要在framework中引入QuatrtzCore.framework,在头文件中需要#import<QuartzCore/QuartzCore.h>CATransition *animation = [CATransition animation]; [animation setDuration:1.25f]; [animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]]; [animation setType:@"cube&qu 阅读全文

posted @ 2012-09-19 19:39 南瓜饼 阅读(588) 评论(0) 推荐(0) 编辑

ios消息推送

摘要: http://mmz06.blog.163.com/blog/static/121416962011111710934946/http://mmz06.blog.163.com/blog/static/121416962011111804613414/ 阅读全文

posted @ 2012-09-19 12:16 南瓜饼 阅读(141) 评论(0) 推荐(0) 编辑

2012年9月18日

IOS简单的协议

摘要: my2.h#import <Foundation/Foundation.h>//委托@protocol playerDelegate<NSObject>-(void)upatemethod:(NSString *)str;@end@interface my2 : NSObject@endmy1.h#import <Foundation/Foundation.h>#import "my2.h"@interface my1 : NSObject<playerDelegate>-(void)mypp;@endmy2.m#import 阅读全文

posted @ 2012-09-18 13:17 南瓜饼 阅读(560) 评论(0) 推荐(0) 编辑

java几种简单的设计模式

摘要: 单例设计模式//单例public class Student { private Student(){} private static Student instance = new Student(); public Student getInstance() { return instance; }}组合设计模式//组合public class Coder { private Computer com; public Coder(Computer com) { this.com = com; }}public class ... 阅读全文

posted @ 2012-09-18 02:33 南瓜饼 阅读(973) 评论(0) 推荐(0) 编辑

2012年9月13日

android的Notification学习

摘要: activity代码package com.example.studyreceiver;import android.app.Activity;import android.content.Intent;import android.os.Bundle;import android.view.Menu;import android.view.View;import android.view.View.OnClickListener;public class MainActivity extends Activity implements OnClickListener { Network... 阅读全文

posted @ 2012-09-13 22:05 南瓜饼 阅读(250) 评论(0) 推荐(0) 编辑

2012年9月12日

android的Service和Notification学习

摘要: 在安卓应用中经常看到比如一连接网络 某个应用就在状态栏上更新一些信息今天花了一个下午研究下贴上代码:package com.example.study;import android.app.Activity;import android.content.Context;import android.content.Intent;import android.net.ConnectivityManager;import android.net.NetworkInfo;import android.os.Bundle;import android.view.Menu;import android. 阅读全文

posted @ 2012-09-12 18:25 南瓜饼 阅读(1103) 评论(0) 推荐(1) 编辑

2012年7月27日

在VMware虚拟机上安装Ubuntu 10.04

摘要: http://www.linuxidc.com/Linux/2010-04/25829.htm 阅读全文

posted @ 2012-07-27 08:31 南瓜饼 阅读(260) 评论(0) 推荐(0) 编辑

2012年7月25日

linux下C语言多线程编程

摘要: #include <pthread.h>#include <stdio.h>#include <sys/time.h>#include <string.h>#define MAX 10pthread_t thread[2];pthread_mutex_t mut;int number=0, i;void *thread1(){ printf ("thread1 : I'm thread 1\n"); for (i = 0; i < MAX; i++) { printf("thread1 : number 阅读全文

posted @ 2012-07-25 20:46 南瓜饼 阅读(17694) 评论(2) 推荐(1) 编辑

2012年6月27日

【转】 equal和hashcode

摘要: 今天下午研究了半天hashcode()和equals()方法,终于有了一点点的明白,写下来与大家分享1. 首先equals()和hashcode()这两个方法都是从object类中继承过来的。equals()方法在object类中定义如下:public boolean equals(Object obj) {return (this == obj);}很明显是对两个对象的地址值进行的比较(即比较引用是否相同)。但是我们必需清楚,当String 、Math、还有Integer、Double。。。。等这些封装类在使用equals()方法时,已经覆盖了object类的equals()方法。比如在St 阅读全文

posted @ 2012-06-27 14:18 南瓜饼 阅读(246) 评论(0) 推荐(0) 编辑

导航