摘要: 定义colud computing is a model for enabling convenient,ondemand network access to a shared pool of configurablecomputing resources(e.g.,networks,servers,storage,applications,andservices)that can be rapidly provisioned and released with minimalmanagement effort ofservice provider interzction.三种服务模式saas 阅读全文
posted @ 2012-09-08 23:04 retacn_yue 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 保证在java程序中,一个class类只有一个实例存在节省内存,有利于垃圾回收第一种形式:示例代码public class Singleton{//私有的构造器private Singleton(){}private static Singleton instance=new Singleton();//提供外部访问的方法:public static Singleton getInstance(){return instance;}}第二种形式:示例代码public class Singleton{private static Singleton instance=null;public st 阅读全文
posted @ 2012-09-08 18:47 retacn_yue 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 动态操作地图服务1.动态添加一个地图服务String url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer";ArcGISDynamicMapServiceLayer arcGISDynamicMapServiceLayer=new ArcGISDynamicMapServiceLayer(HelloWorld.this,HelloWorld.this.url);map.addLayer(arcGISDynam 阅读全文
posted @ 2012-09-08 18:18 retacn_yue 阅读(224) 评论(0) 推荐(0) 编辑
摘要: public class ClassLoaderTest{public static void main(String[] args){ClassLoader c1=System.class.getClassLoader();System.out.println(c1==null?"null":c1.getClass().getName());c1=javax.swing.Box.class.getClassLoader();System.out.println(c1==null?"null":c1.getClass().getName());c1=su 阅读全文
posted @ 2012-09-08 18:12 retacn_yue 阅读(96) 评论(0) 推荐(0) 编辑
摘要: public class UdpSend {public static void main(String[] args) throws Exception {// TODO: Add your code hereDatagramSocket ds=new DatagramSocket();String strInfo="hello你好";ds.send(new DatagramPacket("hello你好".getBytes(),"hello你好".getBytes().length,InetAddress.getByName(&q 阅读全文
posted @ 2012-09-08 18:04 retacn_yue 阅读(135) 评论(0) 推荐(0) 编辑
摘要: IO 两大主流 16位和8位16位对应writer和reader fileWriter /fileReader 对文件进行读写 示例代码: FileWriter out=new FileWriter("test.txt");out.write("张三");out.close();char[] buf=new char[1024];FileReader in=new FileReader("test.txt");int len=in.read(buf);System.out.println(new String(buf,0,len)); 阅读全文
posted @ 2012-09-08 17:10 retacn_yue 阅读(157) 评论(0) 推荐(0) 编辑
摘要: /*** 边界面局管理** @time 2:59:38 PM* @author retacn yue* @Email zhenhuayue@sina.com*/public class Test_borderLayoutDemo extends Frame {private static final long serialVersionUID = 1L;private Test_borderLayoutDemo() {this.setLayout(new BorderLayout());this.add(new Button(""), BorderLayout.SOUTH) 阅读全文
posted @ 2012-09-08 16:35 retacn_yue 阅读(145) 评论(0) 推荐(0) 编辑
摘要: /*** 选项卡 JApplet是japplet的扩展** @time 9:09:33 AM* @author retacn yue* @Email zhenhuayue@sina.com*/public class Test_JtabedPaneTest extends JApplet {private static final long serialVersionUID = 1L;// 选项组件private JTabbedPane tp = new JTabbedPane(SwingConstants.BOTTOM);// 下接列表组件private JComboBox combo = 阅读全文
posted @ 2012-09-08 16:33 retacn_yue 阅读(198) 评论(0) 推荐(0) 编辑
摘要: /*** 列表* @time 4:53:26 PM* @author retacn yue* @Email zhenhuayue@sina.com*/public class Test_ListComboExample extends JPanel {private static JFrame frame;private static final long serialVersionUID = 1L;/*** 构造器*/private Test_ListComboExample() {setLayout(new GridLayout(2, 2));JList list = new JList. 阅读全文
posted @ 2012-09-08 16:32 retacn_yue 阅读(150) 评论(0) 推荐(0) 编辑
摘要: /*** 原始音频的播放和录制** audio** audioTrack*** @time 下午12:58:03* @author retacn yue* @Email zhenhuayue@sina.com*/@SuppressWarnings("static-access")public class AltAudioRecorderActivity extends Activity implements OnCompletionListener, OnClickListener {private Button btn_stop_play, btn_start_play, 阅读全文
posted @ 2012-09-08 16:14 retacn_yue 阅读(205) 评论(0) 推荐(0) 编辑
摘要: /*** 自定义捕获音频** @time 下午12:58:03* @author retacn yue* @Email zhenhuayue@sina.com*/@SuppressWarnings("unused")public class CustomRecorderActivity extends Activity implements OnCompletionListener, OnClickListener {private Button btn_finish, btn_play, btn_start_record, btn_stop_record;private 阅读全文
posted @ 2012-09-08 16:13 retacn_yue 阅读(289) 评论(0) 推荐(0) 编辑
摘要: /**** 使用意图捕获音频** @time 下午12:58:03* @author retacn yue* @Email zhenhuayue@sina.com*/public class MediaRecorderDemoActivity extends Activity implements OnCompletionListener, OnClickListener {private static final int RECORD_REQUEST = 0;private Button btn_play, btn_record;private Uri audioFileUri;@Overr 阅读全文
posted @ 2012-09-08 16:12 retacn_yue 阅读(141) 评论(0) 推荐(0) 编辑
摘要: /*** 打开内置音乐播放器*/private void getAudio() {Intent intent = new Intent(Intent.ACTION_VIEW);File sdcard = Environment.getExternalStorageDirectory();File audioFile = new File(sdcard.getPath() + "/music/young_for_you.mp3");intent.setDataAndType(Uri.fromFile(audioFile), "audio/mp3");sta 阅读全文
posted @ 2012-09-08 16:08 retacn_yue 阅读(161) 评论(0) 推荐(0) 编辑