1 public class ThreadA extends Thread { 2 private static int threadID = 0; 3 4 public ThreadA() { 5 super("ThreadID:" + (++threadID)...
分类:
编程语言 时间:
2014-07-16 18:33:09
阅读次数:
184
public class FileSplit extends InputSplit implements Writable { private Path file; private long start; private long length; private String[] hosts; pu...
分类:
其他好文 时间:
2014-07-16 18:32:45
阅读次数:
236
- (void)viewDidLoad{ [super viewDidLoad]; self.view.backgroundColor = [UIColor whiteColor];}
分类:
其他好文 时间:
2014-07-16 17:06:52
阅读次数:
163
结构
继承关系
public abstract class AsyncTask extends Object
java.lang.Object
android.os.AsyncTask
类概述
AsyncTask能够适当地、简单地用于 UI线程。 这个类不需要操作线程(Thread)就可以完成后台操作将结果返回UI。
异步任务的定义是一个在后台线程上运行,其...
分类:
移动开发 时间:
2014-07-15 10:41:42
阅读次数:
264
在Openfire中自带有Broadcase插件,可以让我们群发消息给全部用户或者组。不过如果是我们通过Servlet来实现这一功能,那么是能够增加一定的灵活性的。具体做法直接看Demo代码:public class SafeServlet extends HttpServlet { priv...
分类:
其他好文 时间:
2014-07-15 00:41:44
阅读次数:
469
private class SimpleView extends ImageView{ int point_x; int point_y; int radius = 0; public SimpleView(Context c...
分类:
移动开发 时间:
2014-07-15 00:28:07
阅读次数:
457
1. 首先将afinal.jar文件拷贝到项目中的libs目录下
2. 让MainActivity不在继承系统的Activity,而是继承FinalActivity
public class MainActivity extends FinalActivity
3. 把MainActivity中onCreate方法的protected改为public
public void...
分类:
其他好文 时间:
2014-07-14 20:36:40
阅读次数:
251
使用关键点:ReflectionClass
class Rbac extends MY_Controller
{
public function index()
{
$arr = glob( __DIR__ .DIRECTORY_SEPARATOR. '*.php');
// $arr = glob(dirname(__DIR__) . ...
分类:
Web程序 时间:
2014-07-14 18:36:44
阅读次数:
307
@interface MoveView : UIView{ CGPoint startPoint;}#import "MoveView.h"@implementation MoveView- (id)initWithFrame:(CGRect)frame{ self = [super i...
分类:
其他好文 时间:
2014-07-14 15:42:42
阅读次数:
157
先上图:
这个UIView可以这样写:
-(id)initWithFrame:(CGRect)frame backImage:(UIImage*)image msgStr:(NSString*)txt
txtColor:(UIColor*)color{
self = [super initWithFrame:frame];
if (self)...
分类:
移动开发 时间:
2014-07-14 11:22:27
阅读次数:
246