码迷,mamicode.com
首页 >  
搜索关键字:try    ( 12995个结果
Common Words
Common WordsLet's continue examining words. You are given two string with words separated by commas. Try to find what is common between these strings....
分类:其他好文   时间:2014-08-05 10:54:19    阅读次数:190
Absolute sort
Absolute sortLet's try some sorting. Here is an array with the specific rules.The array (a tuple) has various numbers. You should sort it, but sort it...
分类:其他好文   时间:2014-08-05 10:50:49    阅读次数:204
JAVA 写中文字符串到指定文件 中文乱码 问题解决
之前试过下面代码里面的注释掉的 方法,都不行,后来想到了不如指定编码格式试试,果真可以了。String as= “中文字符”; //byte[] b = as.getBytes(); try{ File file=new File("F:test.tx...
分类:编程语言   时间:2014-08-05 09:24:09    阅读次数:259
两种 js下载文件的方法(转)
function DownURL(strRemoteURL, strLocalURL){ try{ var xmlHTTP = new ActiveXObject("Microsoft.XMLHTTP"); xmlHTTP.open("Get...
分类:Web程序   时间:2014-08-04 21:19:28    阅读次数:241
eclipse黄色警告(finally block does not complete normally) ,不建议在finally中使用return语句
在eclipse中编写如下的代码,eclipse会给出黄色告警:finally block does not complete normally。 public class Test { public static void main(String[] args) { System.out.println(m1(null)); } public ...
分类:系统相关   时间:2014-08-04 18:02:37    阅读次数:200
经验总结24--try{}catch(){}
捕捉异常。 try{} catch(Exception e) {throw new Exception("发现异常");} 1、建议在写一段代码的时候,对一块内容进行异常捕捉,捕捉后,可以提交到外层,也可进行自己的处理。 比如写入数据库,写入日志,写入文本等。或者重新启动程序之类的处理。 2、建议一块一块进行捕捉,而不要整个代码捕捉一次,这样可以很明确知道出错在哪,方便调试。 3、另...
分类:其他好文   时间:2014-08-04 17:37:17    阅读次数:223
多线程引发OutOfMemoryException
现象:内存是绝对没有问题的,3g内存,发生异常时,任务管理器里显示,可用内存还有1G多!不知道什么原因!int i=0;while ((i++) < 2000) { try { T...
分类:编程语言   时间:2014-08-04 16:58:57    阅读次数:263
保存Bitmap到SD卡
public static void saveBitmapInExternalStorage(Bitmap bitmap,Context context) { try { if(IsExternalStorageAvailableAndWriteable()) { File extStorage = new File(Environment.getExternalStorageD...
分类:其他好文   时间:2014-08-02 20:59:34    阅读次数:190
自己制作精美的App Store 软件截屏
当用户搜索到App的时候,一般都会先看截图,如果截图效果不好,可能用户就不会下载。 不想自己辛苦写的认为还不错的软件,因为截图的原因,而降低了很多下载量吧。轻轻松松做出这样高大上的截屏效果来。Screenshot Maker Pro(iOS – Free to Try)Promotee(OSX...
分类:移动开发   时间:2014-08-02 18:10:43    阅读次数:322
java反射机制,通过类名获取对象,通过方法名和参数调
try {//得到对象Class c = Class.forName("完整类名");Object yourObj = c.newInstance();//得到方法Method methlist[] = cls.getDeclaredMethods();for (int i = 0; i < met...
分类:编程语言   时间:2014-08-02 15:27:53    阅读次数:210
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!