码迷,mamicode.com
首页 >  
搜索关键字:private    ( 23917个结果
设计模式--单例
单例设计模式用来创建唯一的对象,有些时候我们只需要一个对象,如:线程池,缓存,对话框,注册表,日志对象,等等。这就需要单例设计模式来完成。不用多说,直接上代码。public class TestSingle { private static TestSingle single = null; pri...
分类:其他好文   时间:2014-05-23 03:48:01    阅读次数:235
Java几种常用的实现排序方法
import java.util.Random; public class NumberSort{ /** * 私有构造方法,禁止实例化 */ private NumberSort(){ super(); } /** * 冒泡排序 * 比较相邻的元素。如果第一个比第二个大,就叫唤他们两个位置。 * 对每一组相邻的元素作同样的工作,从开始的第一对到结束后的最后一对,这样剩下的...
分类:编程语言   时间:2014-05-23 02:13:51    阅读次数:364
Android多线程研究(3)——线程同步和互斥及死锁
为什么会有线程同步的概念呢?为什么要同步?什么是线程同步?先看一段代码:package com.maso.test; public class ThreadTest2 implements Runnable{ private TestObj testObj = new TestObj(); public static void main(String[] args) { Thread...
分类:移动开发   时间:2014-05-23 01:29:34    阅读次数:333
Hibernate学习——一般配置
Employee.java package com.study; public class Employee { private int id; private String firstName; private String lastName; private int salary; public Employee() { } public Emplo...
分类:系统相关   时间:2014-05-23 01:28:18    阅读次数:370
asp.net或javascript判断是否手机访问
///  /// 判断手机用户UserAgent ///  ///  private bool IsMobile() {          HttpContext context = HttpContext.Current;     if (context != null)     {         HttpRequest request = context.Request;         i...
分类:移动开发   时间:2014-05-23 01:06:25    阅读次数:258
播放音乐
1、/* MediaPlayer对象 */ public MediaPlayer mMediaPlayer = null;/* 构建MediaPlayer对象 */mMediaPlayer= new MediaPlayer();/* 播放列表 */ private List mMusicList ....
分类:其他好文   时间:2014-05-22 16:52:35    阅读次数:277
Clouds
1.Eucalyptus:Eucalyptus is a Linux-based software architecture that implements scalable private and hybrid clouds within your existingIT infrastructur...
分类:其他好文   时间:2014-05-22 16:52:01    阅读次数:263
录音机录制声音
1、定义/* 录制的音频文件 */ private File mRecAudioFile; private File mRecAudioPath; /* MediaRecorder对象 */ private MediaRecorder mMediaRecorder; /* 录音文件列表 */...
分类:其他好文   时间:2014-05-22 15:20:23    阅读次数:236
调用录音界播放音频文件
/* 播放录音文件 */private void playMusic(File file){Intent intent = new Intent();intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);intent.setAction(android.con...
分类:其他好文   时间:2014-05-22 15:18:27    阅读次数:269
用SurfaceView播放视频
1、定义private int mVideoWidth; private int mVideoHeight;private MediaPlayer mMediaPlayer; private SurfaceView mPreview; private SurfaceHolder hol...
分类:其他好文   时间:2014-05-22 14:54:22    阅读次数:269
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!