码迷,mamicode.com
首页 >  
搜索关键字:try except    ( 18632个结果
MapReduce实现排序功能
期间遇到了无法转value的值为int型,我采用try catch解决 str2 2 str1 1 str3 3 str1 4 str4 7 str2 5 str3 9 用的\t隔开,得到结果  str1 1,4  str2 2,5 str3 3,9 str4 7 我这里map,reduce都是单独出来的类,用了自定义的key package com.kan...
分类:其他好文   时间:2014-06-05 06:52:38    阅读次数:353
jxls导出EXCEL模板
http://jxls.sourceforge.net/ InputStream templateInput = null; InputStream in = null; OutputStream out = null; try { templateInput ...
分类:其他好文   时间:2014-06-03 09:40:13    阅读次数:212
https soap链接示例
1.先安装soap扩展sudo yum install php-soap2.安装openssL3.function issure($sn){//通过soap链接接口 进行确认是否是正确的sn码 try{ $client = new SoapClient("https://118.124.139.23...
分类:其他好文   时间:2014-06-03 07:32:16    阅读次数:280
判断URL是否能链接成功
判断网络文件 存在 3秒之内返回结果方法2: //////判断网络文件是否存在1.5秒得到出结果如这样的格式http://191.168.1.105:8000/CPW/wmgjUpdate.7z/////////privateboolUrlIsExists(stringURL){try{System...
分类:其他好文   时间:2014-05-31 17:27:47    阅读次数:164
Java使用IText(VM模版)导出PDF
public String createPDF(ProjectManageBase projectManageBase) { Map map = new HashMap();// velocity模板中的变量 try { //模版vm的路径 ...
分类:编程语言   时间:2014-05-31 07:57:43    阅读次数:809
android:themes.xml
1 2 13 25 26 You can count on this being a dark 29 background with light text on top, but should try to make no 30 other assumptions ...
分类:移动开发   时间:2014-05-31 06:12:59    阅读次数:492
Java异常处理机制的秘密
一般的try...catch...finally没什么好说的,但你可曾想过在try/catch/finally中throw/return?为什么要想这些没用的东西?因为这种东西曾出现在了笔试题目中。
分类:编程语言   时间:2014-05-30 23:42:06    阅读次数:520
JAVA程序 写供别人调用的接口方法的时候 异常应该怎么处理?
要看出现的是哪种异常了。如果是使用某些定义好的函数,并且函数本身会产生异常处理方法一般两种:1.自己用try{}catch(){}语句捕获异常并处理。2.在定义接口的后面写上throw Exception。把异常抛出让使用接口的人处理异常。两种方法都可以。但如果是RuntimeException异常...
分类:编程语言   时间:2014-05-30 18:30:53    阅读次数:429
Single Number II
Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear runtime comp...
分类:其他好文   时间:2014-05-30 15:15:53    阅读次数:225
java中文乱码解决方法汇总
publicstaticvoidmain(String[]argv){try{ System.out.println(“中文”);//1 System.out.println(“中文”.getBytes());//2 System.out.println(“中文”.getBytes(“GB2312″...
分类:编程语言   时间:2014-05-29 20:24:06    阅读次数:424
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!