码迷,mamicode.com
首页 >  
搜索关键字:lmt new pbs    ( 74747个结果
JAVA服务器端性能优化----String
String的连接 方法1 使用+= String s = new String(); for (int i = 0; i   s+= "a"; }   方法2 使用带缓冲区的StringBuffer StringBuffer s = new StringBuffer(); for (int i = 0; i  s.append("a") }   方法1执行时间大概在...
分类:编程语言   时间:2014-07-22 23:02:33    阅读次数:311
网络歌曲下载
1、权限2、代码name=etmc.getText().toString();//获取歌曲自定义名称 byte[] bname=name.getBytes(); try { name=new String(bname,"utf-8...
分类:其他好文   时间:2014-07-22 23:00:53    阅读次数:230
hdu 1242:Rescue(BFS广搜 + 优先队列)
RescueTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 14Accepted Submission(s) : 7Font:Times New Ro...
分类:其他好文   时间:2014-07-22 23:00:35    阅读次数:247
服务器可用的Socket
string portNo = "1999"; IPAddress ServerIp = IPAddress.Parse("112.124.46.251"); IPEndPoint iep = new IPEndPoint(ServerIp, int.Pa...
分类:其他好文   时间:2014-07-22 23:00:33    阅读次数:233
java 使用 mysql
首先下载mysql的jdbc驱动。然后新建一个Datamanager类:public class MysqlManager extends DataManager { static private final MysqlManager MYSQL = new MysqlManager(...
分类:数据库   时间:2014-07-22 22:59:14    阅读次数:326
[Javascript] Try...Catch和异常处理
在JavaScript可以使用try...catch来进行异常处理。例如: try { foo.bar(); } catch (e) { alert(e.name + " : " + e.message); } 目前我们可能得到的系统异常主要包含以下6种: EvalError: raised whe...
分类:编程语言   时间:2014-05-01 19:01:02    阅读次数:325
代理模式与装饰器模式的区别
代理模式与装饰器模式的区别,主要大于,从使用者(客户端)的角度来看的://装饰器的客户public class Client{ public static void main(String[] args){ //客户指定了装饰者需要装饰的是哪一个类 ...
分类:其他好文   时间:2014-05-01 18:47:25    阅读次数:354
网络音乐播放
1、权限2、代码播放:new Thread(){ public void run(){ mediaPlayer=MediaPlayer.create(MainActivity.this, Uri.parse(wangZhi)); try{ URL myURL...
分类:其他好文   时间:2014-05-01 18:45:24    阅读次数:288
javafx之新建窗口和启动另外一个程序
在javafx中一个JVM进程只能存在一个Application类,这个Application类只能调用一次launch()方法来启动它。 那我们如果启动一个新的窗口呢? javafx中Stage类继承了Window代表着一个窗口,所以我们只需要构造一个Stage并将之显示即可。 Stage secondWindow=new Stage(); Scene scene=new Scene(ro...
分类:编程语言   时间:2014-04-30 22:33:38    阅读次数:605
字符串创建与存储的机制是什么
在Java语言中,字符串起着非常重要的作用,字符串的声明与初始化主要有如下两种情况: (1) 对于String s1=new String(“abc”)语句与String s2=new String(“abc”)语句,存在两个引用对象s1、s2,两个内容相同的字符串对象”abc”,它们在内存中的地址是不同的。只要用到new总会生成新的对象。...
分类:其他好文   时间:2014-04-30 22:11:39    阅读次数:317
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!